@webority/ui-elements 0.149.0 → 0.150.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/dist/WuiCarousel-DthhDxH-.js +1 -0
  2. package/dist/WuiCodeBlock-DHpmEskS.js +1 -0
  3. package/dist/WuiCommandPalette-DqHh4lH6.js +2 -0
  4. package/dist/WuiCommentThread-By-u3c5S.js +1 -0
  5. package/dist/WuiConsentBanner-Bm7tT3_5.js +1 -0
  6. package/dist/WuiContextMenu-sPTmEEVn.js +1 -0
  7. package/dist/WuiDataTable-D8UW2DMH.js +1 -0
  8. package/dist/WuiDatePicker-DLEsnzqG.js +31 -0
  9. package/dist/WuiDateRange-9Xqs5nvv.js +25 -0
  10. package/dist/WuiDock-d5abaLkL.js +1 -0
  11. package/dist/WuiDrawer-B3YFmxl2.js +1 -0
  12. package/dist/WuiHoverCard-CE3dHKaM.js +1 -0
  13. package/dist/WuiImageCrop-ChvH8GKb.js +17 -0
  14. package/dist/WuiInlineEdit-r55qgh8A.js +1 -0
  15. package/dist/WuiLeadPopup-YN4YCbOe.js +382 -0
  16. package/dist/WuiLightbox-D7Nf1SbH.js +1 -0
  17. package/dist/WuiMarkdown-N96OX-To.js +4 -0
  18. package/dist/WuiMentionInput-BFB57FZI.js +1 -0
  19. package/dist/WuiNavigationMenu-CZ3XhFam.js +1 -0
  20. package/dist/WuiNotificationCenter-C6e13nCh.js +1 -0
  21. package/dist/WuiOnboardingChecklist-Cx-TgpBY.js +1 -0
  22. package/dist/WuiOrgTree-DzeLFQxy.js +1 -0
  23. package/dist/{WuiOtp-BqWijfNj.js → WuiOtp-DonxSwVn.js} +2 -2
  24. package/dist/WuiOverflow-CeLUmJR-.js +1 -0
  25. package/dist/WuiPhone-rtex3VDC.js +16 -0
  26. package/dist/WuiRating-DLVduJZ_.js +1 -0
  27. package/dist/WuiRecordPager-7HVGoFlP.js +1 -0
  28. package/dist/WuiRelativeTime-RdC80Zii.js +1 -0
  29. package/dist/WuiResizable-DQZdQVCz.js +1 -0
  30. package/dist/WuiRollingNumber-YRMeRCGW.js +1 -0
  31. package/dist/WuiSavedViews-DtyAoZKb.js +1 -0
  32. package/dist/WuiSelect-D9ABfsdZ.js +9 -0
  33. package/dist/WuiShortcuts-D3rWkaOm.js +1 -0
  34. package/dist/WuiShowMore-CvdNQXrA.js +1 -0
  35. package/dist/WuiSlider-D33Y3_t9.js +51 -0
  36. package/dist/WuiSortable-CBLMNRuZ.js +1 -0
  37. package/dist/WuiTimePicker-DOodgU2O.js +9 -0
  38. package/dist/WuiTour-CrIFLmSK.js +1 -0
  39. package/dist/WuiTree-ZD9GGmtg.js +1 -0
  40. package/dist/WuiTruncate-C2WV1-NN.js +1 -0
  41. package/dist/WuiWhatsNew-dLGyA4g1.js +1 -0
  42. package/dist/WuiWizardStep-Cencr-mT.js +1 -0
  43. package/dist/{anchorOverlay-DDrc2k6y.js → anchorOverlay-CXnWfezA.js} +1 -1
  44. package/dist/buttonClass-GtEi8hAY.js +1 -0
  45. package/dist/calendarMath-D6UUgYTD.js +1 -0
  46. package/dist/chips-2yXiMhK4.js +2 -0
  47. package/dist/commentText-BnX7rA2-.js +1 -0
  48. package/dist/{countries-CvmZ2xpG.js → countries-DQL9nAUt.js} +1 -1
  49. package/dist/country-x5lqC5Xu.js +1 -0
  50. package/dist/customRule-Chp7YwFb.js +1 -0
  51. package/dist/dataTable-D23oUOhU.js +1 -0
  52. package/dist/dom-Do1pAA12.js +1 -0
  53. package/dist/drawerDiscard-CUN8L47U.js +1 -0
  54. package/dist/elementBase-Cxeyx0tU.js +1 -0
  55. package/dist/elements/carousel.js +1 -1
  56. package/dist/elements/code-block.js +1 -1
  57. package/dist/elements/command-palette.js +1 -1
  58. package/dist/elements/comment-thread.js +1 -1
  59. package/dist/elements/consent-banner.js +1 -1
  60. package/dist/elements/context-menu.js +1 -1
  61. package/dist/elements/data-table.js +1 -1
  62. package/dist/elements/date-range.js +1 -1
  63. package/dist/elements/datepicker.js +1 -1
  64. package/dist/elements/dock.js +1 -1
  65. package/dist/elements/drawer.js +1 -1
  66. package/dist/elements/filter-popover.js +1 -1
  67. package/dist/elements/hover-card.js +1 -1
  68. package/dist/elements/image-crop.js +1 -1
  69. package/dist/elements/inline-edit.js +1 -1
  70. package/dist/elements/kanban.js +1 -1
  71. package/dist/elements/lead-popup.js +1 -1
  72. package/dist/elements/lightbox.js +1 -1
  73. package/dist/elements/markdown.js +1 -1
  74. package/dist/elements/mention-input.js +1 -1
  75. package/dist/elements/navigation-menu.js +1 -1
  76. package/dist/elements/notification-center.js +1 -1
  77. package/dist/elements/onboarding-checklist.js +1 -1
  78. package/dist/elements/org-tree.js +1 -1
  79. package/dist/elements/otp.js +1 -1
  80. package/dist/elements/overflow.js +1 -1
  81. package/dist/elements/phone.js +1 -1
  82. package/dist/elements/rating.js +1 -1
  83. package/dist/elements/record-pager.js +1 -1
  84. package/dist/elements/relative-time.js +1 -1
  85. package/dist/elements/resizable.js +1 -1
  86. package/dist/elements/rolling-number.js +1 -1
  87. package/dist/elements/saved-views.js +1 -1
  88. package/dist/elements/select.js +1 -1
  89. package/dist/elements/shortcuts.js +1 -1
  90. package/dist/elements/show-more.js +1 -1
  91. package/dist/elements/slider.js +1 -1
  92. package/dist/elements/sortable.js +1 -1
  93. package/dist/elements/status-icon.js +1 -1
  94. package/dist/elements/timepicker.js +1 -1
  95. package/dist/elements/tour.js +1 -1
  96. package/dist/elements/tree.js +1 -1
  97. package/dist/elements/truncate.js +1 -1
  98. package/dist/elements/whats-new.js +1 -1
  99. package/dist/elements/wizard.js +1 -1
  100. package/dist/{fileViewerImage-CLzN49Fd.js → fileViewerImage-tzF4DDq7.js} +2 -2
  101. package/dist/fileViewerMedia-Bp1uHJvC.js +1 -0
  102. package/dist/{fileViewerPdf-6MAAzmCM.js → fileViewerPdf-BLMhF8NT.js} +11 -11
  103. package/dist/fileViewerUi-ResPjO1o.js +1 -0
  104. package/dist/filterPopover-D8BOb-Hz.js +1 -0
  105. package/dist/formMirror-9IpSgeZb.js +1 -0
  106. package/dist/formatters-C3V6M5zV.js +1 -0
  107. package/dist/helpers.js +1 -1
  108. package/dist/iconGlyphs.g-DPqoOoXy.js +1 -0
  109. package/dist/inlineEditText-H7Pr8IU9.js +1 -0
  110. package/dist/kanban-CJ587-XT.js +1 -0
  111. package/dist/kanbanModel-BdqSa1lJ.js +1 -0
  112. package/dist/listQuery.js +1 -1
  113. package/dist/listboxKeyNav-4LeEjKq6.js +1 -0
  114. package/dist/loader-ByHAB1wi.js +1 -0
  115. package/dist/mentionText-BJsw_opZ.js +1 -0
  116. package/dist/{notificationDays-dNQZGLlB.js → notificationDays-BKVW7xYD.js} +1 -1
  117. package/dist/{optionLabel-CLemms21.js → optionLabel-4xjXWy74.js} +1 -1
  118. package/dist/recents-CmLLdV8O.js +1 -0
  119. package/dist/relativeTime-YTAOONRy.js +1 -0
  120. package/dist/search-BXcvm716.js +1 -0
  121. package/dist/server.js +1 -1
  122. package/dist/shortcutKeys-COVLox98.js +1 -0
  123. package/dist/{statusIcons-Dt2ZVJyk.js → statusIcons-CRtqA_1C.js} +2 -2
  124. package/dist/themeTransition-9LQC6fx8.js +1 -0
  125. package/dist/tourSeenStore-z0Y_Znzx.js +1 -0
  126. package/dist/ui-calendar.global.js +1 -1
  127. package/dist/ui-calendar.js +1 -1
  128. package/dist/ui-chart.global.js +15 -15
  129. package/dist/ui-chart.js +13 -13
  130. package/dist/ui-consent-banner.global.js +1 -1
  131. package/dist/ui-elements/carousel.global.js +1 -1
  132. package/dist/ui-elements/code-block.global.js +1 -1
  133. package/dist/ui-elements/command-palette.global.js +2 -2
  134. package/dist/ui-elements/comment-thread.global.js +1 -1
  135. package/dist/ui-elements/consent-banner.global.js +1 -1
  136. package/dist/ui-elements/context-menu.global.js +1 -1
  137. package/dist/ui-elements/date-range.global.js +4 -4
  138. package/dist/ui-elements/drawer.global.js +1 -1
  139. package/dist/ui-elements/glyphs.global.js +1 -0
  140. package/dist/ui-elements/image-crop.global.js +2 -2
  141. package/dist/ui-elements/inline-edit.global.js +1 -1
  142. package/dist/ui-elements/kanban.global.js +1 -1
  143. package/dist/ui-elements/lead-popup.global.js +3 -3
  144. package/dist/ui-elements/lightbox.global.js +1 -1
  145. package/dist/ui-elements/markdown.global.js +2 -2
  146. package/dist/ui-elements/org-tree.global.js +1 -1
  147. package/dist/ui-elements/phone.global.js +9 -9
  148. package/dist/ui-elements/resizable.global.js +1 -1
  149. package/dist/ui-elements/saved-views.global.js +1 -1
  150. package/dist/ui-elements/select-chips.global.js +2 -2
  151. package/dist/ui-elements/select-recents.global.js +1 -1
  152. package/dist/ui-elements/select-search.global.js +1 -1
  153. package/dist/ui-elements/slider.global.js +2 -2
  154. package/dist/ui-elements/sortable.global.js +1 -1
  155. package/dist/ui-elements/status-icon.global.js +2 -2
  156. package/dist/ui-elements/timepicker.global.js +2 -2
  157. package/dist/ui-elements/tour.global.js +1 -1
  158. package/dist/ui-elements/tree.global.js +1 -1
  159. package/dist/ui-elements/wizard.global.js +1 -1
  160. package/dist/ui-elements.global.js +18 -18
  161. package/dist/ui-elements.js +1 -1
  162. package/dist/ui-file-viewer.global.js +11 -11
  163. package/dist/ui-file-viewer.js +1 -1
  164. package/dist/ui-lead-popup.global.js +1 -1
  165. package/dist/ui-phone.global.js +8 -8
  166. package/dist/ui-rich-text.global.js +57 -57
  167. package/dist/ui-rich-text.js +56 -56
  168. package/dist/ui-tour.global.js +1 -1
  169. package/dist/wuiHttp-523iN_RF.js +1 -0
  170. package/dist/{zone-D82f-GU_.js → zone-BR02ZkHF.js} +1 -1
  171. package/package.json +207 -55
  172. package/types/WuiCalendar.d.ts +69 -0
  173. package/types/WuiCarousel.d.ts +64 -0
  174. package/types/WuiChart.d.ts +77 -0
  175. package/types/WuiCodeBlock.d.ts +27 -0
  176. package/types/WuiCommandPalette.d.ts +135 -0
  177. package/types/WuiCommentThread.d.ts +77 -0
  178. package/types/WuiConsentBanner.d.ts +73 -0
  179. package/types/WuiContextMenu.d.ts +90 -0
  180. package/types/WuiDataTable.d.ts +90 -0
  181. package/types/WuiDatePicker.d.ts +59 -0
  182. package/types/WuiDateRange.d.ts +61 -0
  183. package/types/WuiDock.d.ts +20 -0
  184. package/types/WuiDrawer.d.ts +65 -0
  185. package/types/WuiFileViewer.d.ts +111 -0
  186. package/types/WuiHoverCard.d.ts +29 -0
  187. package/types/WuiImageCrop.d.ts +119 -0
  188. package/types/WuiInlineEdit.d.ts +65 -0
  189. package/types/WuiLeadPopup.d.ts +83 -0
  190. package/types/WuiLightbox.d.ts +80 -0
  191. package/types/WuiMarkdown.d.ts +85 -0
  192. package/types/WuiMentionInput.d.ts +112 -0
  193. package/types/WuiNavigationMenu.d.ts +29 -0
  194. package/types/WuiNotificationCenter.d.ts +34 -0
  195. package/types/WuiOnboardingChecklist.d.ts +34 -0
  196. package/types/WuiOrgTree.d.ts +50 -0
  197. package/types/WuiOtp.d.ts +32 -0
  198. package/types/WuiOverflow.d.ts +29 -0
  199. package/types/WuiPhone.d.ts +37 -0
  200. package/types/WuiRating.d.ts +17 -0
  201. package/types/WuiRecordPager.d.ts +9 -0
  202. package/types/WuiRelativeTime.d.ts +17 -0
  203. package/types/WuiResizable.d.ts +79 -0
  204. package/types/WuiRichText.d.ts +45 -0
  205. package/types/WuiRollingNumber.d.ts +27 -0
  206. package/types/WuiSavedViews.d.ts +41 -0
  207. package/types/WuiSelect.d.ts +138 -0
  208. package/types/WuiShortcuts.d.ts +31 -0
  209. package/types/WuiShowMore.d.ts +16 -0
  210. package/types/WuiSlider.d.ts +126 -0
  211. package/types/WuiSortable.d.ts +127 -0
  212. package/types/WuiTimePicker.d.ts +68 -0
  213. package/types/WuiTour.d.ts +117 -0
  214. package/types/WuiTree.d.ts +112 -0
  215. package/types/WuiTruncate.d.ts +19 -0
  216. package/types/WuiWhatsNew.d.ts +36 -0
  217. package/types/WuiWizard.d.ts +78 -0
  218. package/types/WuiWizardStep.d.ts +5 -0
  219. package/types/anchorOverlay.d.ts +75 -0
  220. package/types/avatarHtml.d.ts +10 -0
  221. package/types/avatarPicker.d.ts +47 -0
  222. package/types/buttonClass.d.ts +8 -0
  223. package/types/calendar.d.ts +3 -0
  224. package/types/calendarAdapter.d.ts +68 -0
  225. package/types/calendarMath.d.ts +40 -0
  226. package/types/calendarModel.d.ts +78 -0
  227. package/types/chart.d.ts +4 -0
  228. package/types/chartAdapter.d.ts +160 -0
  229. package/types/chartSpec.d.ts +382 -0
  230. package/types/codeHighlight.d.ts +25 -0
  231. package/types/collapsibleSearch.d.ts +7 -0
  232. package/types/commandShortcut.d.ts +12 -0
  233. package/types/commentText.d.ts +40 -0
  234. package/types/consentBannerGlobal.d.ts +1 -0
  235. package/types/consentBannerStandalone.d.ts +2 -0
  236. package/types/copyText.d.ts +10 -0
  237. package/types/countries.d.ts +3 -0
  238. package/types/currency.d.ts +6 -0
  239. package/types/dataTable.d.ts +159 -0
  240. package/types/datePresets.d.ts +19 -0
  241. package/types/defaultCountry.d.ts +3 -0
  242. package/types/defineElement.d.ts +6 -0
  243. package/types/devWarn.d.ts +2 -0
  244. package/types/dom.d.ts +8 -0
  245. package/types/drawerSnap.d.ts +24 -0
  246. package/types/elementBase.d.ts +2 -0
  247. package/types/elementRegistry.d.ts +5 -0
  248. package/types/elements/carousel.d.ts +2 -0
  249. package/types/elements/code-block.d.ts +2 -0
  250. package/types/elements/command-palette.d.ts +2 -0
  251. package/types/elements/comment-thread.d.ts +4 -0
  252. package/types/elements/consent-banner.d.ts +2 -0
  253. package/types/elements/context-menu.d.ts +2 -0
  254. package/types/elements/data-table.d.ts +3 -0
  255. package/types/elements/date-range.d.ts +2 -0
  256. package/types/elements/datepicker.d.ts +2 -0
  257. package/types/elements/dock.d.ts +2 -0
  258. package/types/elements/drawer.d.ts +2 -0
  259. package/types/elements/filter-popover.d.ts +2 -0
  260. package/types/elements/hover-card.d.ts +2 -0
  261. package/types/elements/image-crop.d.ts +2 -0
  262. package/types/elements/inline-edit.d.ts +3 -0
  263. package/types/elements/kanban.d.ts +2 -0
  264. package/types/elements/lead-popup.d.ts +2 -0
  265. package/types/elements/lightbox.d.ts +2 -0
  266. package/types/elements/markdown.d.ts +2 -0
  267. package/types/elements/mention-input.d.ts +3 -5
  268. package/types/elements/navigation-menu.d.ts +2 -0
  269. package/types/elements/notification-center.d.ts +2 -0
  270. package/types/elements/onboarding-checklist.d.ts +2 -0
  271. package/types/elements/org-tree.d.ts +2 -0
  272. package/types/elements/otp.d.ts +2 -0
  273. package/types/elements/overflow.d.ts +2 -0
  274. package/types/elements/phone.d.ts +2 -0
  275. package/types/elements/rating.d.ts +2 -0
  276. package/types/elements/record-pager.d.ts +2 -0
  277. package/types/elements/relative-time.d.ts +3 -0
  278. package/types/elements/resizable.d.ts +2 -0
  279. package/types/elements/rolling-number.d.ts +2 -0
  280. package/types/elements/saved-views.d.ts +2 -0
  281. package/types/elements/select.d.ts +2 -0
  282. package/types/elements/shortcuts.d.ts +2 -0
  283. package/types/elements/show-more.d.ts +2 -0
  284. package/types/elements/slider.d.ts +2 -0
  285. package/types/elements/sortable.d.ts +2 -0
  286. package/types/elements/status-icon.d.ts +1 -0
  287. package/types/elements/timepicker.d.ts +2 -0
  288. package/types/elements/tour.d.ts +1 -6
  289. package/types/elements/tree.d.ts +2 -0
  290. package/types/elements/truncate.d.ts +2 -0
  291. package/types/elements/whats-new.d.ts +2 -0
  292. package/types/elements/wizard.d.ts +3 -0
  293. package/types/fieldState.d.ts +4 -0
  294. package/types/fileDrop.d.ts +31 -0
  295. package/types/fileValidation.d.ts +47 -0
  296. package/types/fileViewer.d.ts +3 -0
  297. package/types/fileViewerImage.d.ts +69 -0
  298. package/types/fileViewerMedia.d.ts +62 -0
  299. package/types/fileViewerPdf.d.ts +214 -0
  300. package/types/fileViewerSearch.d.ts +55 -0
  301. package/types/fileViewerUi.d.ts +33 -0
  302. package/types/filterPopover.d.ts +55 -0
  303. package/types/focusOrigin.d.ts +3 -0
  304. package/types/formMirror.d.ts +22 -0
  305. package/types/formatters.d.ts +119 -0
  306. package/types/global/chunks.d.ts +12 -0
  307. package/types/global/core.d.ts +57 -0
  308. package/types/global/glyphs.d.ts +10 -0
  309. package/types/global/loader.d.ts +16 -0
  310. package/types/global/parts/glyphs.d.ts +1 -0
  311. package/types/global/parts/select-chips.d.ts +1 -0
  312. package/types/global/parts/select-country.d.ts +1 -0
  313. package/types/global/parts/select-recents.d.ts +1 -0
  314. package/types/global/parts/select-search.d.ts +1 -0
  315. package/types/global/shared.d.ts +56 -0
  316. package/types/globals.d.ts +238 -0
  317. package/types/helpers.d.ts +29 -3
  318. package/types/iconGlyphs.g.d.ts +7 -0
  319. package/types/iconGlyphsCore.g.d.ts +1 -0
  320. package/types/iconGlyphsLazy.g.d.ts +1 -0
  321. package/types/imageCrop.d.ts +75 -0
  322. package/types/index.d.ts +54 -0
  323. package/types/inlineEditText.d.ts +47 -0
  324. package/types/inputMask.d.ts +70 -0
  325. package/types/kanban.d.ts +157 -0
  326. package/types/kanbanModel.d.ts +77 -0
  327. package/types/leadPopupGlobal.d.ts +1 -0
  328. package/types/leadPopupStandalone.d.ts +2 -0
  329. package/types/listQuery.d.ts +87 -0
  330. package/types/listboxKeyNav.d.ts +63 -0
  331. package/types/mentionText.d.ts +45 -0
  332. package/types/navReveal.d.ts +1 -0
  333. package/types/notificationDays.d.ts +50 -0
  334. package/types/optionLabel.d.ts +27 -0
  335. package/types/overlayRelease.d.ts +12 -0
  336. package/types/pageBarBulk.d.ts +4 -0
  337. package/types/passwordRules.d.ts +50 -0
  338. package/types/phoneData.d.ts +1 -0
  339. package/types/phoneLib.d.ts +15 -0
  340. package/types/phoneLibGlobal.d.ts +3 -0
  341. package/types/razor-js/modules/api.d.ts +33 -0
  342. package/types/razor-js/modules/avatars.d.ts +1 -0
  343. package/types/razor-js/modules/dropZones.d.ts +2 -0
  344. package/types/razor-js/modules/fileHelpers.d.ts +16 -0
  345. package/types/razor-js/modules/filePickers.d.ts +6 -0
  346. package/types/razor-js/modules/filterBars.d.ts +1 -0
  347. package/types/razor-js/modules/imagePickers.d.ts +1 -0
  348. package/types/razor-js/modules/inputs.d.ts +10 -0
  349. package/types/razor-js/modules/look.d.ts +6 -0
  350. package/types/razor-js/modules/overlays.d.ts +5 -0
  351. package/types/razor-js/modules/pageListeners.d.ts +1 -0
  352. package/types/razor-js/modules/popovers.d.ts +1 -0
  353. package/types/razor-js/modules/serverBridge.d.ts +13 -0
  354. package/types/razor-js/modules/shared.d.ts +15 -0
  355. package/types/razor-js/modules/shell.d.ts +1 -0
  356. package/types/razor-js/modules/splitView.d.ts +2 -0
  357. package/types/razor-js/modules/tables.d.ts +9 -0
  358. package/types/razor-js/modules/tabs.d.ts +1 -0
  359. package/types/razor-js/modules/themeCopy.d.ts +2 -0
  360. package/types/razor-js/modules/toast.d.ts +3 -0
  361. package/types/razor-js/modules/validation.d.ts +11 -0
  362. package/types/razor-js/modules/widgets.d.ts +9 -0
  363. package/types/razor-js/webority-ui.d.ts +48 -0
  364. package/types/relativeTime.d.ts +10 -0
  365. package/types/richText.d.ts +2 -0
  366. package/types/richTextAdapter.d.ts +54 -0
  367. package/types/richTextIcons.d.ts +1 -0
  368. package/types/rowDrop.d.ts +12 -0
  369. package/types/scrollEdges.d.ts +10 -0
  370. package/types/select/chips.d.ts +2 -0
  371. package/types/select/country.d.ts +2 -0
  372. package/types/select/customRule.d.ts +3 -0
  373. package/types/select/list.d.ts +32 -0
  374. package/types/select/option.d.ts +21 -0
  375. package/types/select/part.d.ts +103 -0
  376. package/types/select/partRegistry.d.ts +7 -0
  377. package/types/select/parts.d.ts +1 -0
  378. package/types/select/partsGlobal.d.ts +4 -0
  379. package/types/select/recents.d.ts +2 -0
  380. package/types/select/remote.d.ts +2 -0
  381. package/types/select/search.d.ts +5 -0
  382. package/types/server/drawerDiscard.d.ts +9 -0
  383. package/types/server/index.d.ts +9 -0
  384. package/types/server/remoteModal.d.ts +96 -0
  385. package/types/server/serverActions.d.ts +33 -0
  386. package/types/server/serverTable.d.ts +48 -0
  387. package/types/server/shellParts.d.ts +24 -0
  388. package/types/server/toastAction.d.ts +7 -0
  389. package/types/server/toastHeader.d.ts +8 -0
  390. package/types/server/unsavedChanges.d.ts +17 -0
  391. package/types/server/wuiHttp.d.ts +86 -0
  392. package/types/shortcutKeys.d.ts +59 -0
  393. package/types/statusIconImages.d.ts +1 -0
  394. package/types/statusIcons.d.ts +12 -0
  395. package/types/stepperHeader.d.ts +31 -0
  396. package/types/submitOnce.d.ts +3 -0
  397. package/types/tableSelect.d.ts +34 -0
  398. package/types/textMatch.d.ts +9 -0
  399. package/types/themeTransition.d.ts +88 -0
  400. package/types/toastTypes.d.ts +20 -0
  401. package/types/tokenCommit.d.ts +13 -0
  402. package/types/tourAdvance.d.ts +51 -0
  403. package/types/tourEnd.d.ts +17 -0
  404. package/types/tourGlobal.d.ts +4 -0
  405. package/types/tourIsolated.d.ts +2 -0
  406. package/types/tourMedia.d.ts +19 -0
  407. package/types/tourMotion.d.ts +20 -0
  408. package/types/tourOpenMark.d.ts +1 -0
  409. package/types/tourPlacement.d.ts +24 -0
  410. package/types/tourProgress.d.ts +29 -0
  411. package/types/tourSeenStore.d.ts +12 -0
  412. package/types/zone.d.ts +24 -0
  413. package/types/zoneCountries.g.d.ts +1 -0
  414. package/dist/WuiCarousel-C2NWcFxr.js +0 -1
  415. package/dist/WuiCodeBlock-CCCJwsk5.js +0 -1
  416. package/dist/WuiCommandPalette-Bfrbocu6.js +0 -2
  417. package/dist/WuiCommentThread-Dx3vvBWp.js +0 -1
  418. package/dist/WuiConsentBanner-jkeRiC1_.js +0 -1
  419. package/dist/WuiContextMenu-KXD8TFfy.js +0 -1
  420. package/dist/WuiDataTable-DAxAegnG.js +0 -1
  421. package/dist/WuiDatePicker-kEyyILbM.js +0 -31
  422. package/dist/WuiDateRange-B05PsdJ3.js +0 -25
  423. package/dist/WuiDock-Bd2ijOaJ.js +0 -1
  424. package/dist/WuiDrawer-SkxcDhgf.js +0 -1
  425. package/dist/WuiHoverCard-Bqapy8Is.js +0 -1
  426. package/dist/WuiImageCrop-DzzzPagi.js +0 -17
  427. package/dist/WuiInlineEdit-BqgKfVMy.js +0 -1
  428. package/dist/WuiLeadPopup-Dwmg7coE.js +0 -382
  429. package/dist/WuiLightbox-DCTE3ULH.js +0 -1
  430. package/dist/WuiMarkdown-D5vm4sp4.js +0 -4
  431. package/dist/WuiMentionInput-Bi3VQoKo.js +0 -1
  432. package/dist/WuiNavigationMenu-DmH3waKW.js +0 -1
  433. package/dist/WuiNotificationCenter-DawJRGBc.js +0 -1
  434. package/dist/WuiOnboardingChecklist-DXUETu1h.js +0 -1
  435. package/dist/WuiOrgTree-DuaBtFl9.js +0 -1
  436. package/dist/WuiOverflow-DP3qEbDp.js +0 -1
  437. package/dist/WuiPhone-CFne_6XG.js +0 -16
  438. package/dist/WuiRating-DhhqYj5Z.js +0 -1
  439. package/dist/WuiRecordPager-BOaFcs_W.js +0 -1
  440. package/dist/WuiRelativeTime-BG6rgUhw.js +0 -1
  441. package/dist/WuiResizable-mt9EMhjQ.js +0 -1
  442. package/dist/WuiRollingNumber-CF3H6l7t.js +0 -1
  443. package/dist/WuiSavedViews-BMBQUv2K.js +0 -1
  444. package/dist/WuiSelect-oSJPev4N.js +0 -9
  445. package/dist/WuiShortcuts-BEvFCIu9.js +0 -1
  446. package/dist/WuiShowMore-D3VHRZJg.js +0 -1
  447. package/dist/WuiSlider-2kB__6zU.js +0 -51
  448. package/dist/WuiSortable-r5iZtzM1.js +0 -1
  449. package/dist/WuiTimePicker-DqqZPv0T.js +0 -9
  450. package/dist/WuiTour-B-V1PZnw.js +0 -1
  451. package/dist/WuiTree-B3cnH1PG.js +0 -1
  452. package/dist/WuiTruncate-DyDQWMBu.js +0 -1
  453. package/dist/WuiWhatsNew-B5jK2zwZ.js +0 -1
  454. package/dist/WuiWizardStep-CIYuIp4a.js +0 -1
  455. package/dist/buttonClass-Yk0Fwgs6.js +0 -1
  456. package/dist/calendarMath-BC2wGCD-.js +0 -1
  457. package/dist/chips-DbhCYoAp.js +0 -2
  458. package/dist/country-3uo7no9r.js +0 -1
  459. package/dist/customRule-BE7CusA3.js +0 -1
  460. package/dist/dataTable-BoyxeUL4.js +0 -1
  461. package/dist/drawerDiscard-D6YgF59q.js +0 -1
  462. package/dist/elementBase-DV9IZZCu.js +0 -1
  463. package/dist/fileViewerMedia-BQ0lVXy9.js +0 -1
  464. package/dist/fileViewerUi-DQH6_B1a.js +0 -1
  465. package/dist/filterPopover-DniNyLWI.js +0 -1
  466. package/dist/formMirror-BMQTenSi.js +0 -1
  467. package/dist/formatters-Ba0CvsTs.js +0 -1
  468. package/dist/iconGlyphs.g-BlwTSNXS.js +0 -1
  469. package/dist/kanban-BtgxVDE-.js +0 -1
  470. package/dist/listboxKeyNav-DMIvs9d6.js +0 -1
  471. package/dist/loader-Dw3IkGM0.js +0 -1
  472. package/dist/recents-BzN7j9kV.js +0 -1
  473. package/dist/search-CdAH8NGK.js +0 -1
  474. package/dist/shortcutKeys-CvxSh3bV.js +0 -1
  475. package/dist/themeTransition-rHRVbhHB.js +0 -1
  476. package/dist/wuiHttp-BuaTcumE.js +0 -1
package/dist/ui-chart.js CHANGED
@@ -1,21 +1,21 @@
1
- var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};function r(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var i=`12px sans-serif`,a=20,o=100,s=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function c(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-a)/o}return t}var l=c(s),u={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=u.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var d=l[n[c]];s+=d==null?o:d*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+/* @__PURE__ */ new Date}},d=ne([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),f=ne([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),p=Object.prototype.toString,m=Array.prototype,h=m.forEach,g=m.filter,_=m.slice,v=m.map,y=function(){}.constructor,b=y?y.prototype:null,x=`__proto__`,S=2311,C=2**53-1;function w(){return S>=C&&(S=0),S++}function T(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function E(e){if(typeof e!=`object`||!e)return e;var t=e,n=p.call(e);if(n===`[object Array]`){if(!Se(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=E(e[r])}}else if(f[n]){if(!Se(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!d[n]&&!Se(e)&&!ue(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==x&&(t[o]=E(e[o]));return t}function D(e,t,n){if(!V(t)||!V(e))return n?E(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==x){var i=e[r],a=t[r];V(a)&&V(i)&&!R(a)&&!R(i)&&!ue(a)&&!ue(i)&&!ce(a)&&!ce(i)&&!Se(a)&&!Se(i)?D(i,a,n):(n||!(r in e))&&(e[r]=E(t[r]))}return e}function O(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==x&&(e[n]=t[n]);return e}function k(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function A(e,t,n){for(var r=I(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}u.createCanvas;function j(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function ee(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function te(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else A(e,t,n)}function M(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function N(e,t,n){if(e&&t){if(e.forEach&&e.forEach===h)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function P(e,t,n){if(!e)return[];if(!t)return ge(e);if(e.map&&e.map===v)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function ne(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function F(e,t,n){if(!e)return[];if(!t)return ge(e);if(e.filter&&e.filter===g)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function re(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function I(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function ie(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(_.call(arguments)))}}var L=b&&z(b.bind)?b.call.bind(b.bind):ie;function ae(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(_.call(arguments)))}}function R(e){return Array.isArray?Array.isArray(e):p.call(e)===`[object Array]`}function z(e){return typeof e==`function`}function B(e){return typeof e==`string`}function oe(e){return p.call(e)===`[object String]`}function se(e){return typeof e==`number`}function V(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function ce(e){return!!d[p.call(e)]}function le(e){return!!f[p.call(e)]}function ue(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function de(e){return e.colorStops!=null}function fe(e){return e.image!=null}function pe(e){return e!==e}function me(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function H(e,t){return e??t}function he(e,t,n){return e??t??n}function ge(e){var t=[...arguments].slice(1);return _.apply(e,t)}function _e(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function ve(e,t){if(!e)throw Error(t)}function ye(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var be=`__ec_primitive__`;function xe(e){e[be]=!0}function Se(e){return e[be]}var Ce=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return I(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),we=typeof Map==`function`;function Te(){return we?/* @__PURE__ */ new Map:new Ce}var Ee=function(){function e(t){var n=R(t);this.data=Te();var r=this;t instanceof e?t.each(i):t&&N(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return we?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function U(e){return new Ee(e)}function De(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Oe(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&O(n,t),n}function ke(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function W(e,t){return e.hasOwnProperty(t)}function Ae(){}var je=180/Math.PI,Me=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Ne=new(function(){function e(){this.browser=new Me,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Ne.wxa=!0,Ne.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Ne.worker=!0:!Ne.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ne.node=!0,Ne.svgSupported=!0):Pe(navigator.userAgent,Ne);function Pe(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fe=`.`,Ie=`___EC__COMPONENT__CONTAINER___`,Le=`___EC__EXTENDED_CLASS___`;function Re(e){var t={main:``,sub:``};if(e){var n=e.split(Fe);t.main=n[0]||``,t.sub=n[1]||``}return t}function ze(e){ve(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Be(e){return!!(e&&e[Le])}function Ve(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return He(t)?n=function(e){r(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},ee(n,this)),O(n.prototype,e),n[Le]=!0,n.extend=this.extend,n.superCall=Ke,n.superApply=qe,n.superClass=t,n}}function He(e){return z(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Ue(e,t){e.extend=t.extend}var We=Math.round(Math.random()*10);function Ge(e){var t=[`__\0is_clz`,We++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Ke(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function qe(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Je(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ze(r),e.prototype.type=r;var i=Re(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Ie){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Ie]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Re(e),r=[],i=t[n.main];return i&&i[Ie]?N(i,function(e,t){t!==Ie&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Re(e).main]},e.getAllClassMainTypes=function(){var e=[];return N(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Re(e).main];return n&&n[Ie]};function n(e){var n=t[e.main];return n&&n[Ie]||(n=t[e.main]={},n[Ie]=!0),n}}function Ye(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&j(r,s)>=0||i&&j(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Xe=Ye([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Ze=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Xe(this,e,t)},e}(),Qe=function(){function e(e){this.value=e}return e}(),$e=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qe(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),et=function(){function e(e){this._list=new $e,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qe(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),tt=new et(50);function nt(e){if(typeof e==`string`){var t=tt.get(e);return t&&t.image}return e}function rt(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=tt.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!at(t)&&a.pending.push(o)):(t=u.loadImage(e,it,it),t.__zrImageSrc=e,tt.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function it(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function at(e){return e&&e.width&&e.height}function ot(){return[1,0,0,1,0,0]}function st(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ct(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function lt(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function ut(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function dt(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function ft(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function pt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function mt(e,t){return e??=0,t??=0,[e,t]}function ht(e,t){return e[0]=t[0],e[1]=t[1],e}function gt(e){return[e[0],e[1]]}function _t(e,t,n){return e[0]=t,e[1]=n,e}function vt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function yt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function bt(e){return Math.sqrt(xt(e))}function xt(e){return e[0]*e[0]+e[1]*e[1]}function St(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Ct(e,t){var n=bt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function wt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Tt=wt;function Et(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Dt=Et;function Ot(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function kt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function At(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function jt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var G=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Mt=Math.min,Nt=Math.max,Pt=Math.abs,Ft=[`x`,`y`],It=[`width`,`height`],Lt=new G,Rt=new G,zt=new G,Bt=new G,Vt=tn(),Ht=Vt.minTv,Ut=Vt.maxTv,Wt=[0,0],K=function(){function e(e,t,n,r){Kt(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Mt(e.x,this.x),n=Mt(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Nt(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?Nt(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Jt(ot(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&G.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Kt(Zt,t.x,t.y,t.width,t.height)),n instanceof e||(n=Kt(Qt,n.x,n.y,n.width,n.height));var s=!!r;Vt.reset(i,s);var c=Vt.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Wt[0]=1/0,Wt[1]=0,en(l,u,p,m,0,s,a,o),en(d,f,h,g,1,s,a,o),s&&G.copy(r,_?Vt.useDir?Vt.dirMinTv:Ht:Ut)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){qt(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&qt(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{Lt.x=zt.x=t.x,Lt.y=Bt.y=t.y,Rt.x=Bt.x=t.x+t.width,Rt.y=zt.y=t.y+t.height,Lt.transform(n),Bt.transform(n),Rt.transform(n),zt.transform(n),e.x=Mt(Lt.x,Rt.x,zt.x,Bt.x),e.y=Mt(Lt.y,Rt.y,zt.y,Bt.y);var s=Nt(Lt.x,Rt.x,zt.x,Bt.x),c=Nt(Lt.y,Rt.y,zt.y,Bt.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=st(e||[]),ut(e,e,_t($t,-t.x,-t.y)),ft(e,e,_t($t,r,i)),ut(e,e,_t($t,n.x,n.y)),e},e}(),Gt=K.create,Kt=K.set,qt=K.copy,Jt=K.calculateTransform,Yt=K.applyTransform,Xt=K.contain,Zt=new K(0,0,0,0),Qt=new K(0,0,0,0),$t=[];function en(e,t,n,r,i,a,o,s){var c=Pt(t-n),l=Pt(r-e),u=Mt(c,l),d=Ft[i],f=Ft[1-i],p=It[i];t<n||r<e?c<l?(a&&(Ut[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Ut[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Nt(e,n),o[p]=Mt(t,r)-o[d]),a&&(u<Wt[0]||Vt.useDir)&&(Wt[0]=Mt(u,Wt[0]),(c<l||!Vt.bidirectional)&&(Ht[d]=c,Ht[f]=0,Vt.useDir&&Vt.calcDirMTV()),(c>=l||!Vt.bidirectional)&&(Ht[d]=-l,Ht[f]=0,Vt.useDir&&Vt.calcDirMTV())))}function tn(){var e=0,t=new G,n=new G,r={minTv:new G,maxTv:new G,useDir:!1,dirMinTv:new G,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Nt(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return Pt(e)<1e-10}return r}function nn(e){rn||=new et(100),e||=`12px sans-serif`;var t=rn.get(e);return t||(t={font:e,strWidthCache:new et(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:u.measureText(`国`,e).width,asciiCharWidth:u.measureText(`a`,e).width},rn.put(e,t)),t}var rn;function an(e){if(!(on>=sn)){e||=`12px sans-serif`;for(var t=[],n=+/* @__PURE__ */ new Date,r=0;r<=127;r++)t[r]=u.measureText(String.fromCharCode(r),e).width;var i=+/* @__PURE__ */ new Date-n;return i>16?on=sn:i>2&&on++,t}}var on=0,sn=5;function cn(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=an(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function ln(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=u.measureText(t,e.font).width,n.put(t,r)),r}function un(e,t,n,r){var i=ln(nn(t),e),a=mn(t);return new K(fn(0,i,n),pn(0,a,r),i,a)}function dn(e,t,n,r){var i=((e||``)+``).split(`
2
- `);if(i.length===1)return un(i[0],t,n,r);for(var a=new K(0,0,0,0),o=0;o<i.length;o++){var s=un(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function fn(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function pn(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function mn(e){return nn(e).stWideCharWidth}function hn(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function gn(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=hn(r[0],n.width),l+=hn(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var _n=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function vn(e,t,n,r,i,a){if(!n)e.text=``,e.isTruncated=!1;else{var o=(t+``).split(`
1
+ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function n(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var a=`12px sans-serif`,o=20,s=100,c=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function l(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-o)/s}return t}var u=l(c),d={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=d.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=u[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+/* @__PURE__ */ new Date}},f=te([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),p=te([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),m=Object.prototype.toString,h=Array.prototype,g=h.forEach,_=h.filter,v=h.slice,y=h.map,b=function(){}.constructor,x=b?b.prototype:null,S=`__proto__`,C=2311,w=2**53-1;function T(){return C>=w&&(C=0),C++}function E(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function D(e){if(typeof e!=`object`||!e)return e;var t=e,n=m.call(e);if(n===`[object Array]`){if(!xe(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=D(e[r])}}else if(p[n]){if(!xe(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!f[n]&&!xe(e)&&!le(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==S&&(t[o]=D(e[o]));return t}function O(e,t,n){if(!U(t)||!U(e))return n?D(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==S){var i=e[r],a=t[r];U(a)&&U(i)&&!B(a)&&!B(i)&&!le(a)&&!le(i)&&!se(a)&&!se(i)&&!xe(a)&&!xe(i)?O(i,a,n):(n||!(r in e))&&(e[r]=D(t[r]))}return e}function k(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==S&&(e[n]=t[n]);return e}function A(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function j(e,t,n){for(var r=R(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}d.createCanvas;function M(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function ee(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function N(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else j(e,t,n)}function P(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function F(e,t,n){if(e&&t){if(e.forEach&&e.forEach===g)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function I(e,t,n){if(!e)return[];if(!t)return he(e);if(e.map&&e.map===y)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function te(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function L(e,t,n){if(!e)return[];if(!t)return he(e);if(e.filter&&e.filter===_)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function ne(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function R(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function re(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(v.call(arguments)))}}var z=x&&V(x.bind)?x.call.bind(x.bind):re;function ie(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(v.call(arguments)))}}function B(e){return Array.isArray?Array.isArray(e):m.call(e)===`[object Array]`}function V(e){return typeof e==`function`}function H(e){return typeof e==`string`}function ae(e){return m.call(e)===`[object String]`}function oe(e){return typeof e==`number`}function U(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function se(e){return!!f[m.call(e)]}function ce(e){return!!p[m.call(e)]}function le(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function ue(e){return e.colorStops!=null}function de(e){return e.image!=null}function fe(e){return e!==e}function pe(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function W(e,t){return e??t}function me(e,t,n){return e??t??n}function he(e){var t=[...arguments].slice(1);return v.apply(e,t)}function ge(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function _e(e,t){if(!e)throw Error(t)}function ve(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var ye=`__ec_primitive__`;function be(e){e[ye]=!0}function xe(e){return e[ye]}var Se=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return R(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Ce=typeof Map==`function`;function we(){return Ce?/* @__PURE__ */ new Map:new Se}var Te=function(){function e(t){var n=B(t);this.data=we();var r=this;t instanceof e?t.each(i):t&&F(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Ce?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function G(e){return new Te(e)}function Ee(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function De(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&k(n,t),n}function Oe(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function ke(e,t){return e.hasOwnProperty(t)}function Ae(){}var je=180/Math.PI,Me=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Ne=new(function(){function e(){this.browser=new Me,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Ne.wxa=!0,Ne.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Ne.worker=!0:!Ne.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ne.node=!0,Ne.svgSupported=!0):Pe(navigator.userAgent,Ne);function Pe(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fe=`.`,Ie=`___EC__COMPONENT__CONTAINER___`,Le=`___EC__EXTENDED_CLASS___`;function Re(e){var t={main:``,sub:``};if(e){var n=e.split(Fe);t.main=n[0]||``,t.sub=n[1]||``}return t}function ze(e){_e(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Be(e){return!!(e&&e[Le])}function Ve(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return He(t)?n=function(e){i(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},ee(n,this)),k(n.prototype,e),n[Le]=!0,n.extend=this.extend,n.superCall=Ke,n.superApply=qe,n.superClass=t,n}}function He(e){return V(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Ue(e,t){e.extend=t.extend}var We=Math.round(Math.random()*10);function Ge(e){var t=[`__\0is_clz`,We++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Ke(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function qe(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Je(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ze(r),e.prototype.type=r;var i=Re(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Ie){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Ie]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Re(e),r=[],i=t[n.main];return i&&i[Ie]?F(i,function(e,t){t!==Ie&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Re(e).main]},e.getAllClassMainTypes=function(){var e=[];return F(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Re(e).main];return n&&n[Ie]};function n(e){var n=t[e.main];return n&&n[Ie]||(n=t[e.main]={},n[Ie]=!0),n}}function Ye(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&M(r,s)>=0||i&&M(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Xe=Ye([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Ze=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Xe(this,e,t)},e}(),Qe=function(){function e(e){this.value=e}return e}(),$e=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qe(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),et=function(){function e(e){this._list=new $e,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qe(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),tt=new et(50);function nt(e){if(typeof e==`string`){var t=tt.get(e);return t&&t.image}return e}function rt(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=tt.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!at(t)&&a.pending.push(o)):(t=d.loadImage(e,it,it),t.__zrImageSrc=e,tt.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function it(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function at(e){return e&&e.width&&e.height}function ot(){return[1,0,0,1,0,0]}function st(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ct(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function lt(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function ut(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function dt(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function ft(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function pt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function mt(e,t){return e??=0,t??=0,[e,t]}function ht(e,t){return e[0]=t[0],e[1]=t[1],e}function gt(e){return[e[0],e[1]]}function _t(e,t,n){return e[0]=t,e[1]=n,e}function vt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function yt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function bt(e){return Math.sqrt(xt(e))}function xt(e){return e[0]*e[0]+e[1]*e[1]}function St(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Ct(e,t){var n=bt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function wt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Tt=wt;function Et(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Dt=Et;function Ot(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function kt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function At(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function jt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var K=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Mt=Math.min,Nt=Math.max,Pt=Math.abs,Ft=[`x`,`y`],It=[`width`,`height`],Lt=new K,Rt=new K,zt=new K,Bt=new K,Vt=tn(),Ht=Vt.minTv,Ut=Vt.maxTv,Wt=[0,0],q=function(){function e(e,t,n,r){Kt(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Mt(e.x,this.x),n=Mt(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Nt(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?Nt(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Jt(ot(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&K.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Kt(Zt,t.x,t.y,t.width,t.height)),n instanceof e||(n=Kt(Qt,n.x,n.y,n.width,n.height));var s=!!r;Vt.reset(i,s);var c=Vt.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Wt[0]=1/0,Wt[1]=0,en(l,u,p,m,0,s,a,o),en(d,f,h,g,1,s,a,o),s&&K.copy(r,_?Vt.useDir?Vt.dirMinTv:Ht:Ut)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){qt(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&qt(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{Lt.x=zt.x=t.x,Lt.y=Bt.y=t.y,Rt.x=Bt.x=t.x+t.width,Rt.y=zt.y=t.y+t.height,Lt.transform(n),Bt.transform(n),Rt.transform(n),zt.transform(n),e.x=Mt(Lt.x,Rt.x,zt.x,Bt.x),e.y=Mt(Lt.y,Rt.y,zt.y,Bt.y);var s=Nt(Lt.x,Rt.x,zt.x,Bt.x),c=Nt(Lt.y,Rt.y,zt.y,Bt.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=st(e||[]),ut(e,e,_t($t,-t.x,-t.y)),ft(e,e,_t($t,r,i)),ut(e,e,_t($t,n.x,n.y)),e},e}(),Gt=q.create,Kt=q.set,qt=q.copy,Jt=q.calculateTransform,Yt=q.applyTransform,Xt=q.contain,Zt=new q(0,0,0,0),Qt=new q(0,0,0,0),$t=[];function en(e,t,n,r,i,a,o,s){var c=Pt(t-n),l=Pt(r-e),u=Mt(c,l),d=Ft[i],f=Ft[1-i],p=It[i];t<n||r<e?c<l?(a&&(Ut[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Ut[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Nt(e,n),o[p]=Mt(t,r)-o[d]),a&&(u<Wt[0]||Vt.useDir)&&(Wt[0]=Mt(u,Wt[0]),(c<l||!Vt.bidirectional)&&(Ht[d]=c,Ht[f]=0,Vt.useDir&&Vt.calcDirMTV()),(c>=l||!Vt.bidirectional)&&(Ht[d]=-l,Ht[f]=0,Vt.useDir&&Vt.calcDirMTV())))}function tn(){var e=0,t=new K,n=new K,r={minTv:new K,maxTv:new K,useDir:!1,dirMinTv:new K,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Nt(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return Pt(e)<1e-10}return r}function nn(e){rn||=new et(100),e||=`12px sans-serif`;var t=rn.get(e);return t||(t={font:e,strWidthCache:new et(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:d.measureText(`国`,e).width,asciiCharWidth:d.measureText(`a`,e).width},rn.put(e,t)),t}var rn;function an(e){if(!(on>=sn)){e||=`12px sans-serif`;for(var t=[],n=+/* @__PURE__ */ new Date,r=0;r<=127;r++)t[r]=d.measureText(String.fromCharCode(r),e).width;var i=+/* @__PURE__ */ new Date-n;return i>16?on=sn:i>2&&on++,t}}var on=0,sn=5;function cn(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=an(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function ln(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=d.measureText(t,e.font).width,n.put(t,r)),r}function un(e,t,n,r){var i=ln(nn(t),e),a=mn(t);return new q(fn(0,i,n),pn(0,a,r),i,a)}function dn(e,t,n,r){var i=((e||``)+``).split(`
2
+ `);if(i.length===1)return un(i[0],t,n,r);for(var a=new q(0,0,0,0),o=0;o<i.length;o++){var s=un(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function fn(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function pn(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function mn(e){return nn(e).stWideCharWidth}function hn(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function gn(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=hn(r[0],n.width),l+=hn(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var _n=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function vn(e,t,n,r,i,a){if(!n)e.text=``,e.isTruncated=!1;else{var o=(t+``).split(`
3
3
  `);a=yn(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)bn(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
4
- `),e.isTruncated=s}}function yn(e,t,n,r){r||={};var i=O({},r);n=H(n,`...`),i.maxIterations=H(r.maxIterations,2);var a=i.minChar=H(r.minChar,0),o=i.fontMeasureInfo=nn(t),s=o.asciiCharWidth;i.placeholder=H(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=ln(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function bn(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=ln(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?xn(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=ln(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function xn(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=cn(n,e.charCodeAt(i));return i}function Sn(e,t,n,r){var i=Fn(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=mn(l),f=H(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?jn(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
5
- `):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=yn(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)bn(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=nn(l),S=0;S<_.length;S++)w=Math.max(ln(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Cn=function(){function e(){}return e}(),wn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Tn=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function En(e,t,n,r,i){var a=new Tn,o=Fn(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=_n.lastIndex=0,h;(h=_n.exec(o))!=null;){var g=h.index;g>m&&Dn(a,o.substring(m,g),t,p),Dn(a,h[2],t,p,h[1]),m=_n.lastIndex}m<o.length&&Dn(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,ee=j?j[1]+j[3]:0,te=k.font=A.font||t.font;k.contentHeight=mn(te);var M=H(A.height,k.contentHeight);if(k.innerHeight=M,j&&(M+=j[0]+j[2]),k.height=M,k.lineHeight=he(A.lineHeight,t.lineHeight,M),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var N=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<N;break outer}var P=A.width,ne=P==null||P===`auto`;if(typeof P==`string`&&P.charAt(P.length-1)===`%`)k.percentWidth=P,_.push(k),k.contentWidth=ln(nn(te),k.text);else{if(ne){var F=A.backgroundColor,re=F&&F.image;re&&(re=nt(re),at(re)&&(k.width=Math.max(k.width,re.width*M/re.height)))}var I=b&&u!=null?u-D:null;I!=null&&I<k.width?!ne||I<ee?(k.text=``,k.width=k.contentWidth=0):(vn(S,k.text,I-ee,te,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=ln(nn(te),k.text)):k.contentWidth=ln(nn(te),k.text)}k.width+=ee,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=H(u,y),a.outerHeight=a.height=H(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],ie=k.percentWidth;k.width=parseInt(ie,10)/100*a.width}return a}function Dn(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=hn(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
4
+ `),e.isTruncated=s}}function yn(e,t,n,r){r||={};var i=k({},r);n=W(n,`...`),i.maxIterations=W(r.maxIterations,2);var a=i.minChar=W(r.minChar,0),o=i.fontMeasureInfo=nn(t),s=o.asciiCharWidth;i.placeholder=W(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=ln(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function bn(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=ln(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?xn(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=ln(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function xn(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=cn(n,e.charCodeAt(i));return i}function Sn(e,t,n,r){var i=Fn(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=mn(l),f=W(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?jn(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
5
+ `):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=yn(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)bn(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=nn(l),S=0;S<_.length;S++)w=Math.max(ln(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Cn=function(){function e(){}return e}(),wn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Tn=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function En(e,t,n,r,i){var a=new Tn,o=Fn(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=_n.lastIndex=0,h;(h=_n.exec(o))!=null;){var g=h.index;g>m&&Dn(a,o.substring(m,g),t,p),Dn(a,h[2],t,p,h[1]),m=_n.lastIndex}m<o.length&&Dn(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,M=j?j[1]+j[3]:0,ee=k.font=A.font||t.font;k.contentHeight=mn(ee);var N=W(A.height,k.contentHeight);if(k.innerHeight=N,j&&(N+=j[0]+j[2]),k.height=N,k.lineHeight=me(A.lineHeight,t.lineHeight,N),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var P=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<P;break outer}var F=A.width,I=F==null||F===`auto`;if(typeof F==`string`&&F.charAt(F.length-1)===`%`)k.percentWidth=F,_.push(k),k.contentWidth=ln(nn(ee),k.text);else{if(I){var te=A.backgroundColor,L=te&&te.image;L&&(L=nt(L),at(L)&&(k.width=Math.max(k.width,L.width*N/L.height)))}var ne=b&&u!=null?u-D:null;ne!=null&&ne<k.width?!I||ne<M?(k.text=``,k.width=k.contentWidth=0):(vn(S,k.text,ne-M,ee,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=ln(nn(ee),k.text)):k.contentWidth=ln(nn(ee),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=W(u,y),a.outerHeight=a.height=W(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],R=k.percentWidth;k.width=parseInt(R,10)/100*a.width}return a}function Dn(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=hn(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
6
6
  `),l=!0),r.accumWidth=m}else{var h=jn(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
7
- `);for(var g=nn(c),_=0;_<u.length;_++){var v=u[_],y=new Cn;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:ln(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new wn)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new wn([y]))}}function On(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var kn=ne(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function An(e){return!On(e)||!!kn[e]}function jn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=nn(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
8
- `)c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;else{var m=cn(d,p.charCodeAt(0)),h=!r&&!An(p);(a.length?u+m>n:i+u+m>n)?u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m)):(u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p))}}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Mn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;K.set(Nn,fn(n,o,i),pn(r,s,a),o,s),K.intersect(t,Nn,null,Pn);var c=Pn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=fn(c.x,c.width,i,!0),e.baseY=pn(c.y,c.height,a,!0)}}var Nn=new K(0,0,0,0),Pn={outIntersectRect:{},clamp:!0};function Fn(e){return e==null?e=``:e+=``}function In(e){var t=Fn(e.text),n=e.font;return Ln(e,ln(nn(n),t),mn(n),null)}function Ln(e,t,n,r){var i=new K(fn(e.x||0,t,e.textAlign),pn(e.y||0,n,e.textBaseline),t,n),a=r??(Rn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Rn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var zn=st,Bn=5e-5;function Vn(e){return e>Bn||e<-Bn}var Hn=[],Un=[],Wn=ot(),Gn=Math.abs,Kn=function(){function e(){}return e.prototype.getLocalTransform=function(e){return qn(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Vn(this.rotation)||Vn(this.x)||Vn(this.y)||Vn(this.scaleX-1)||Vn(this.scaleY-1)||Vn(this.skewX)||Vn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=ot(),t?this.getLocalTransform(n):zn(n),e&&(t?lt(n,e,n):ct(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||ot(),pt(this.invTransform,n)):n&&(zn(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Hn);var n=Hn[0]<0?-1:1,r=Hn[1]<0?-1:1,i=((Hn[0]-n)*t+n)/Hn[0]||0,a=((Hn[1]-r)*t+r)/Hn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||ot(),lt(Un,e.invTransform,t),t=Un);var n=this.originX,r=this.originY;(n||r)&&(Wn[4]=n,Wn[5]=r,lt(Un,t,Wn),Un[4]-=n,Un[5]-=r,t=Un),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&kt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&kt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Gn(e[0]-1)>1e-10&&Gn(e[3]-1)>1e-10?Math.sqrt(Gn(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Xn(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&dt(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),qn=Kn.getLocalTransform;function Jn(){return new Kn}var Yn=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Xn(e,t){return k(e,t,Yn)}var Zn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zn.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zn.bounceIn(e*2)*.5:Zn.bounceOut(e*2-1)*.5+.5}},Qn=Math.pow,$n=Math.sqrt,er=1e-8,tr=1e-4,nr=$n(3),rr=1/3,ir=mt(),ar=mt(),or=mt();function sr(e){return e>-er&&e<er}function cr(e){return e>er||e<-er}function lr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ur(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sr(u)&&sr(d)){if(sr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$n(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qn(-y,rr):Qn(y,rr),b=b<0?-Qn(-b,rr):Qn(b,rr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$n(u*u*u)),S=Math.acos(x)/3,C=$n(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nr*Math.sin(S)))/(3*o),T=(-s+C*(w-nr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sr(o)){if(cr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sr(u))i[0]=-a/(2*o);else if(u>0){var d=$n(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function mr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ir[0]=c,ir[1]=l;for(var v=0;v<1;v+=.05)ar[0]=lr(e,n,i,o,v),ar[1]=lr(t,r,a,s,v),g=Dt(ir,ar),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<tr);y++)m=d-f,h=d+f,ar[0]=lr(e,n,i,o,m),ar[1]=lr(t,r,a,s,m),g=Dt(ar,ir),m>=0&&g<p?(d=m,p=g):(or[0]=lr(e,n,i,o,h),or[1]=lr(t,r,a,s,h),_=Dt(or,ir),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=lr(e,n,i,o,d),u[1]=lr(t,r,a,s,d)),$n(p)}function hr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=lr(e,n,i,o,m),g=lr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function gr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function _r(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function vr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(sr(a)){if(cr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$n(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function br(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ir[0]=o,ir[1]=s;for(var f=0;f<1;f+=.05){ar[0]=gr(e,n,i,f),ar[1]=gr(t,r,a,f);var p=Dt(ir,ar);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<tr);m++){var h=l-u,g=l+u;ar[0]=gr(e,n,i,h),ar[1]=gr(t,r,a,h);var p=Dt(ar,ir);if(h>=0&&p<d)l=h,d=p;else{or[0]=gr(e,n,i,g),or[1]=gr(t,r,a,g);var _=Dt(or,ir);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=gr(e,n,i,l),c[1]=gr(t,r,a,l)),$n(d)}function Sr(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=gr(e,n,i,f),m=gr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Cr=/cubic-bezier\(([0-9,\.e ]+)\)/;function wr(e){var t=e&&Cr.exec(e);if(t){var n=t[1].split(`,`),r=+ye(n[0]),i=+ye(n[1]),a=+ye(n[2]),o=+ye(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:dr(0,r,a,1,e,s)&&lr(0,i,o,1,s[0])}}}var Tr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ae,this.ondestroy=e.ondestroy||Ae,this.onrestart=e.onrestart||Ae,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused)this._pausedTime+=t;else{var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1}},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=z(e)?e:Zn[e]||wr(e)},e}(),Er={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Dr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Or(e){return e=Math.round(e),e<0?0:e>360?360:e}function kr(e){return e<0?0:e>1?1:e}function Ar(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Dr(parseFloat(t)/100*255):Dr(parseInt(t,10))}function jr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?kr(parseFloat(t)/100):kr(parseFloat(t))}function Mr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Nr(e,t,n){return e+(t-e)*n}function Pr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Fr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ir=new et(20),Lr=null;function Rr(e,t){Lr&&Fr(Lr,t),Lr=Ir.put(e,Lr||t.slice())}function zr(e,t){if(e){t||=[];var n=Ir.get(e);if(n)return Fr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Er)return Fr(t,Er[r]),Rr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Pr(t,0,0,0,1);return}return Pr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Rr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Pr(t,0,0,0,1);return}return Pr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Rr(e,t),t}}else{var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Pr(t,+l[0],+l[1],+l[2],1):Pr(t,0,0,0,1);u=jr(l.pop());case`rgb`:if(l.length>=3)return Pr(t,Ar(l[0]),Ar(l[1]),Ar(l[2]),l.length===3?u:jr(l[3])),Rr(e,t),t;Pr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Pr(t,0,0,0,1);return}return l[3]=jr(l[3]),Br(l,t),Rr(e,t),t;case`hsl`:if(l.length!==3){Pr(t,0,0,0,1);return}return Br(l,t),Rr(e,t),t;default:return}}Pr(t,0,0,0,1)}}}function Br(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=jr(e[1]),i=jr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Pr(t,Dr(Mr(o,a,n+1/3)*255),Dr(Mr(o,a,n)*255),Dr(Mr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Vr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Hr(e,t){var n=zr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return qr(n,n.length===4?`rgba`:`rgb`)}}function Ur(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Dr(Nr(o[0],s[0],c)),n[1]=Dr(Nr(o[1],s[1],c)),n[2]=Dr(Nr(o[2],s[2],c)),n[3]=kr(Nr(o[3],s[3],c)),n}}function Wr(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=zr(t[i]),s=zr(t[a]),c=r-i,l=qr([Dr(Nr(o[0],s[0],c)),Dr(Nr(o[1],s[1],c)),Dr(Nr(o[2],s[2],c)),kr(Nr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gr(e,t,n,r){var i=zr(e);if(e)return i=Vr(i),t!=null&&(i[0]=Or(z(t)?t(i[0]):t)),n!=null&&(i[1]=jr(z(n)?n(i[1]):n)),r!=null&&(i[2]=jr(z(r)?r(i[2]):r)),qr(Br(i),`rgba`)}function Kr(e,t){var n=zr(e);if(n&&t!=null)return n[3]=kr(t),qr(n,`rgba`)}function qr(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Jr(e,t){var n=zr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Yr=new et(100);function Xr(e){if(B(e)){var t=Yr.get(e);return t||(t=Hr(e,-.1),Yr.put(e,t)),t}if(de(e)){var n=O({},e);return n.colorStops=P(e.colorStops,function(e){return{offset:e.offset,color:Hr(e.color,-.1)}}),n}return e}var Zr=Math.round;function Qr(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=zr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var $r=1e-4;function ei(e){return e<$r&&e>-$r}function ti(e){return Zr(e*1e3)/1e3}function ni(e){return Zr(e*1e4)/1e4}function ri(e){return`matrix(`+ti(e[0])+`,`+ti(e[1])+`,`+ti(e[2])+`,`+ti(e[3])+`,`+ni(e[4])+`,`+ni(e[5])+`)`}var ii={left:`start`,right:`end`,center:`middle`,middle:`middle`};function ai(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function oi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function si(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function ci(e){return e&&!!e.image}function li(e){return e&&!!e.svgElement}function ui(e){return ci(e)||li(e)}function di(e){return e.type===`linear`}function fi(e){return e.type===`radial`}function pi(e){return e&&(e.type===`linear`||e.type===`radial`)}function mi(e){return`url(#`+e+`)`}function hi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function gi(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*je,i=H(e.scaleX,1),a=H(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Zr(o*je)+`deg, `+Zr(s*je)+`deg)`),c.join(` `)}var _i=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),vi=Array.prototype.slice;function yi(e,t,n){return(t-e)*n+e}function bi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=yi(t[a],n[a],r);return e}function xi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=yi(t[o][s],n[o][s],r)}return e}function Si(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Ci(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function wi(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Ti(e,t,n){var r=e,i=t;if(r.push&&i.push){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:vi.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Ei(e){if(M(e)){var t=e.length;if(M(e[0])){for(var n=[],r=0;r<t;r++)n.push(vi.call(e[r]));return n}return vi.call(e)}return e}function Di(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Oi(e){return M(e&&e[0])?2:1}var ki=0,Ai=1,ji=2,Mi=3,Ni=4,Pi=5,Fi=6;function Ii(e){return e===Ni||e===Pi}function Li(e){return e===Ai||e===ji}var Ri=[0,0,0,0],zi=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Fi,s=t;if(M(t)){var c=Oi(t);o=c,(c===1&&!se(t[0])||c===2&&!se(t[0][0]))&&(a=!0)}else if(se(t)&&!pe(t))o=ki;else if(B(t)){if(!isNaN(+t))o=ki;else{var l=zr(t);l&&(s=l,o=Mi)}}else if(de(t)){var u=O({},s);u.colorStops=P(t.colorStops,function(e){return{offset:e.offset,color:zr(e.color)}}),di(t)?o=Ni:fi(t)&&(o=Pi),s=u}i===0?this.valType=o:(o!==this.valType||o===Fi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=z(n)?n:Zn[n]||wr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Li(r),c=Ii(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?Ti(d,f,r):c&&wi(d.colorStops,f.colorStops))}if(!o&&r!==Pi&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ki?n[l].additiveValue=n[l].value-p:r===Mi?n[l].additiveValue=Si([],n[l].value,p,-1):Li(r)&&(n[l].additiveValue=r===Ai?Si([],n[l].value,p,-1):Ci([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Mi,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ri:e[s];if((Li(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Li(i))i===Ai?bi(g,f[r],p[r],h):xi(g,f[r],p[r],h);else if(Ii(i)){var _=f[r],v=p[r],y=i===Ni;e[s]={type:y?`linear`:`radial`,x:yi(_.x,v.x,h),y:yi(_.y,v.y,h),colorStops:P(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:yi(e.offset,n.offset,h),color:Di(bi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=yi(_.x2,v.x2,h),e[s].y2=yi(_.y2,v.y2,h)):e[s].r=yi(_.r,v.r,h)}else if(c)bi(g,f[r],p[r],h),n||(e[s]=Di(g));else{var b=yi(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ki?e[n]=e[n]+r:t===Mi?(zr(e[n],Ri),Si(Ri,Ri,r,1),e[n]=Di(Ri)):t===Ai?Si(e[n],e[n],r,1):t===ji&&Ci(e[n],e[n],r,1)},e}(),Bi=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?T(`Can' use additive animation on looped animation.`):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,I(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new zi(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Mi&&c&&(c=Di(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Ei(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ei(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Tr({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return P(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Ei(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=I(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Vi=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Hi=1;Ne.hasGlobalWindow&&(Hi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ui=Hi,Wi=.4,Gi=`#333`,Ki=`#ccc`,qi=`#eee`,Ji=`__zr_normal__`,Yi=Yn.concat([`ignore`]),Xi=ne(Yn,function(e,t){return e[t]=!0,e},{ignore:!1}),Zi={},Qi=new K(0,0,0,0),$i=[],ea=function(){function e(e){this.id=w(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=Qi,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Zi,n,d):gn(Zi,n,d),i.x=Zi.x,i.y=Zi.y,a=Zi.align,o=Zi.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=hn(f[0],d.width),m=hn(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new K(0,0,0,0);i.getLocalTransform($i),pt($i,$i),K.copy(_,d),_.applyTransform($i)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ki:Gi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&zr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,qr(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},O(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(V(e))for(var n=I(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Yi)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ji,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ji;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(j(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i)T(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ca(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ua(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=ca(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,ua(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=j(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=j(r,e),a=j(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];O(t,i),i.textConfig&&(n||={},O(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=O({},r?this.textConfig:n.textConfig),O(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Yi.length;l++){var u=Yi[l],d=i&&Xi[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Kn,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},O(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Bi(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=j(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){ta(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ta(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ta(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();te(ea,Vi),te(ea,Kn);function ta(e,t,n,r,i){n||={};var a=[];sa(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function na(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function ra(e){return M(e[0])}function ia(e,t,n){if(M(t[n])){if(M(e[n])||(e[n]=[]),le(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),na(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(ra(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?na(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else na(a,i,o);a.length=i.length}}else e[n]=t[n]}function aa(e,t){return e===t||M(e)&&M(t)&&oa(e,t)}function oa(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function sa(e,t,n,r,i,a,o,s){for(var c=I(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!V(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(V(v)&&!M(v)&&!de(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}sa(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=j(m,x);m.splice(S,1)}}if(i.force||(h=F(h,function(e){return!aa(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=Ei(n[_]),ia(n,r,_)}}var x=new Bi(n,!1,!1,d?F(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function ca(e,t,n,r){return!(n&&n.hoverLayer||r)||la(e)||t&&la(t)?0:1}function la(e){return e.type===`text`||e.type===`tspan`}function ua(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var da=`__zr_style_`+Math.round(Math.random()*10),fa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},pa={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fa[da]=!0;var ma=[`z`,`z2`,`invisible`],ha=[`invisible`],ga=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=I(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&ya(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new K(0,0,0,0),t?K.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new K(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:O(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Oe(fa,e)},t.prototype.useStyle=function(e){e[da]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[da]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,ma)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l){if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=I(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=I(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l)}if(!c)for(var h=this.__inHover?ha:ma,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return O(e,t),e},t.prototype.getAnimationStyleProps=function(){return pa},t.initDefaultProps=(function(){var e=t.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}(ea),_a=new K(0,0,0,0),va=new K(0,0,0,0);function ya(e,t,n){return _a.copy(e.getBoundingRect()),e.transform&&_a.applyTransform(e.transform),va.width=t,va.height=n,!_a.intersect(va)}var ba=Math.min,xa=Math.max,Sa=Math.sin,Ca=Math.cos,wa=Math.PI*2,Ta=mt(),Ea=mt(),Da=mt();function Oa(e,t,n,r,i,a){i[0]=ba(e,n),i[1]=ba(t,r),a[0]=xa(e,n),a[1]=xa(t,r)}var ka=[],Aa=[];function ja(e,t,n,r,i,a,o,s,c,l){var u=fr,d=lr,f=u(e,n,i,o,ka);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,ka[p]);c[0]=ba(m,c[0]),l[0]=xa(m,l[0])}f=u(t,r,a,s,Aa);for(var p=0;p<f;p++){var h=d(t,r,a,s,Aa[p]);c[1]=ba(h,c[1]),l[1]=xa(h,l[1])}c[0]=ba(e,c[0]),l[0]=xa(e,l[0]),c[0]=ba(o,c[0]),l[0]=xa(o,l[0]),c[1]=ba(t,c[1]),l[1]=xa(t,l[1]),c[1]=ba(s,c[1]),l[1]=xa(s,l[1])}function Ma(e,t,n,r,i,a,o,s){var c=yr,l=gr,u=xa(ba(c(e,n,i),1),0),d=xa(ba(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=ba(e,i,f),o[1]=ba(t,a,p),s[0]=xa(e,i,f),s[1]=xa(t,a,p)}function Na(e,t,n,r,i,a,o,s,c){var l=At,u=jt,d=Math.abs(i-a);if(d%wa<1e-4&&d>1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(Ta[0]=Ca(i)*n+e,Ta[1]=Sa(i)*r+t,Ea[0]=Ca(a)*n+e,Ea[1]=Sa(a)*r+t,l(s,Ta,Ea),u(c,Ta,Ea),i%=wa,i<0&&(i+=wa),a%=wa,a<0&&(a+=wa),i>a&&!o?a+=wa:i<a&&o&&(i+=wa),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Da[0]=Ca(p)*n+e,Da[1]=Sa(p)*r+t,l(s,Da,s),u(c,Da,c))}}var Pa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Fa=[],Ia=[],La=[],Ra=[],za=[],Ba=[],Va=Math.min,Ha=Math.max,Ua=Math.cos,Wa=Math.sin,Ga=Math.abs,Ka=Math.PI,qa=Ka*2,Ja=typeof Float32Array<`u`,Ya=[];function Xa(e){return Math.round(e/Ka*1e8)/1e8%2*Ka}function Za(e,t){var n=Xa(e[0]);n<0&&(n+=qa);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=qa?i=n+qa:t&&n-i>=qa?i=n-qa:!t&&n>i?i=n+(qa-Xa(n-i)):t&&n<i&&(i=n-(qa-Xa(i-n))),e[0]=n,e[1]=i}var Qa=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=Ga(n/Ui/e)||0,this._uy=Ga(n/Ui/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Pa.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Ga(e-this._xi),r=Ga(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Pa.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Pa.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Pa.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Ya[0]=r,Ya[1]=i,Za(Ya,a),r=Ya[0],i=Ya[1];var o=i-r;return this.addData(Pa.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ua(i)*n+e,this._yi=Wa(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Pa.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Pa.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Ja&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(Ja&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Ja&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){La[0]=La[1]=za[0]=za[1]=Number.MAX_VALUE,Ra[0]=Ra[1]=Ba[0]=Ba[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case Pa.M:t=r=e[a++],n=i=e[a++],za[0]=r,za[1]=i,Ba[0]=r,Ba[1]=i;break;case Pa.L:Oa(t,n,e[a],e[a+1],za,Ba),t=e[a++],n=e[a++];break;case Pa.C:ja(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],za,Ba),t=e[a++],n=e[a++];break;case Pa.Q:Ma(t,n,e[a++],e[a++],e[a],e[a+1],za,Ba),t=e[a++],n=e[a++];break;case Pa.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=Ua(f)*u+c,i=Wa(f)*d+l),Na(c,l,u,d,f,p,m,za,Ba),t=Ua(p)*u+c,n=Wa(p)*d+l;break;case Pa.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Oa(r,i,r+h,i+g,za,Ba);break;case Pa.Z:t=r,n=i}At(La,La,za),jt(Ra,Ra,Ba)}return a===0&&(La[0]=La[1]=Ra[0]=Ra[1]=0),new K(La[0],La[1],Ra[0]-La[0],Ra[1]-La[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case Pa.M:i=o=e[d++],a=s=e[d++];break;case Pa.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Ga(_)>n||Ga(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Pa.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=hr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Pa.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Sr(i,a,y,b,h,g,10),i=h,a=g;break;case Pa.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Ua(D)*T+C,s=Wa(D)*E+w),m=Ha(T,E)*Va(qa,Math.abs(O)),i=Ua(k)*T+C,a=Wa(k)*E+w;break;case Pa.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Pa.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==Pa.L&&v>0&&(e.lineTo(y,b),v=0),S){case Pa.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Pa.L:u=n[x++],d=n[x++];var w=Ga(u-c),T=Ga(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Pa.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],te=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pr(c,k,j,te,D,Fa),pr(l,A,ee,M,D,Ia),e.bezierCurveTo(Fa[1],Ia[1],Fa[2],Ia[2],Fa[3],Ia[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,te,M),c=te,l=M;break;case Pa.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,D,Fa),br(l,A,ee,D,Ia),e.quadraticCurveTo(Fa[1],Ia[1],Fa[2],Ia[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Pa.A:var N=n[x++],P=n[x++],ne=n[x++],F=n[x++],re=n[x++],I=n[x++],ie=n[x++],L=!n[x++],ae=ne>F?ne:F,R=Ga(ne-F)>.001,z=re+I,B=!1;if(f){var E=p[g++];h+E>_&&(z=re+I*(_-h)/E,B=!0),h+=E}if(R&&e.ellipse?e.ellipse(N,P,ne,F,ie,re,z,L):e.arc(N,P,ae,re,z,L),B)break lo;C&&(o=Ua(re)*ne+N,s=Wa(re)*F+P),c=Ua(z)*ne+N,l=Wa(z)*F+P;break;case Pa.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var oe=n[x++],se=n[x++];if(f){var E=p[g++];if(h+E>_){var V=_-h;e.moveTo(u,d),e.lineTo(u+Va(V,oe),d),V-=oe,V>0&&e.lineTo(u+oe,d+Va(V,se)),V-=se,V>0&&e.lineTo(u+Ha(oe-V,0),d+se),V-=oe,V>0&&e.lineTo(u,d+Ha(se-V,0));break lo}h+=E}e.rect(u,d,oe,se);break;case Pa.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Pa,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function $a(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function eo(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:mr(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function to(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:xr(e,t,n,r,i,a,s,c,null)<=l/2}var no=Math.PI*2;function ro(e){return e%=no,e<0&&(e+=no),e}var io=Math.PI*2;function ao(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%io<1e-4)return!0;if(a){var d=r;r=ro(i),i=ro(d)}else r=ro(r),i=ro(i);r>i&&(i+=io);var f=Math.atan2(c,s);return f<0&&(f+=io),f>=r&&f<=i||f+io>=r&&f+io<=i}function oo(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var so=Qa.CMD,co=Math.PI*2,lo=1e-4;function uo(e,t){return Math.abs(e-t)<lo}var fo=[-1,-1,-1],po=[-1,-1];function mo(){var e=po[0];po[0]=po[1],po[1]=e}function ho(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;var u=dr(t,r,a,s,l,fo);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=fo[h],_=g===0||g===1?.5:1;lr(e,n,i,o,g)<c||(f<0&&(f=fr(t,r,a,s,po),po[1]<po[0]&&f>1&&mo(),p=lr(t,r,a,s,po[0]),f>1&&(m=lr(t,r,a,s,po[1]))),f===2?g<po[0]?d+=p<t?_:-_:g<po[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<po[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function go(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=vr(t,r,a,s,fo);if(c===0)return 0;var l=yr(t,r,a);if(l>=0&&l<=1){for(var u=0,d=gr(t,r,a,l),f=0;f<c;f++){var p=fo[f]===0||fo[f]===1?.5:1,m=gr(e,n,i,fo[f]);m<o||(fo[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=fo[0]===0||fo[0]===1?.5:1,m=gr(e,n,i,fo[0]);return m<o?0:a<t?p:-p}function _o(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);fo[0]=-c,fo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=co-1e-4){r=0,i=co;var u=a?1:-1;return o>=fo[0]+e&&o<=fo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=co,i+=co);for(var f=0,p=0;p<2;p++){var m=fo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=co+h),(h>=r&&h<=i||h+co>=r&&h+co<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function vo(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===so.M&&m>1&&(n||(s+=oo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case so.M:u=a[m++],d=a[m++],c=u,l=d;break;case so.L:if(n){if($a(c,l,a[m],a[m+1],t,r,i))return!0}else s+=oo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case so.C:if(n){if(eo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=ho(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case so.Q:if(n){if(to(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=go(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case so.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=oo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(ao(_,v,b,x,x+S,C,t,w,i))return!0}else s+=_o(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case so.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if($a(u,d,f,d,t,r,i)||$a(f,d,f,p,t,r,i)||$a(f,p,u,p,t,r,i)||$a(u,p,u,d,t,r,i))return!0}else s+=oo(f,d,f,p,r,i),s+=oo(u,p,u,d,r,i);break;case so.Z:if(n){if($a(c,l,u,d,t,r,i))return!0}else s+=oo(c,l,u,d,r,i);c=u,l=d}}return!n&&!uo(l,d)&&(s+=oo(c,l,u,d,r,i)||0),s!==0}function yo(e,t,n){return vo(e,0,!1,t,n)}function bo(e,t,n,r){return vo(e,t,!0,n,r)}var xo=A({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fa),So={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},pa.style)},Co=Yn.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),wo=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<Co.length;++s)i[Co[s]]=this[Co[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=I(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?O(this.style,o):this.useStyle(o):a===`shape`?O(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(B(e)){var t=Jr(e,0);return t>.5?Gi:t>.2?qi:Ki}if(e)return Ki}return Gi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(B(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Jr(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Qa(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),bo(a,o/s,e,t)))return!0}if(this.hasFill())return yo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:O(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Oe(xo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=O({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=O({},r.shape),O(c,n.shape)):(c=O({},i?this.shape:r.shape),O(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=O({},this.shape);for(var l={},u=I(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return So},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){r(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return E(e.style)},n.prototype.getDefaultShape=function(){return E(e.shape)},n}(t);for(var i in e)typeof e[i]==`function`&&(n.prototype[i]=e[i]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(ga),To=A({strokeFirst:!0,font:i,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},xo),Eo=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return Rn(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Oe(To,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=In(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(ga);Eo.prototype.type=`tspan`;var Do=A({x:0,y:0},fa),Oo={style:A({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},pa.style)};function ko(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Ao=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Oe(Do,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=ko(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return Oo},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new K(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(ga);Ao.prototype.type=`image`;function jo(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Mo=Math.round;function No(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s&&(Mo(r*2)===Mo(i*2)&&(e.x1=e.x2=Fo(r,s,!0)),Mo(a*2)===Mo(o*2)&&(e.y1=e.y2=Fo(a,s,!0))),e}}function Po(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s&&(e.x=Fo(r,s,!0),e.y=Fo(i,s,!0),e.width=Math.max(Fo(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Fo(i+o,s,!1)-e.y,o===0?0:1)),e}}function Fo(e,t,n){if(!t)return e;var r=Mo(e*2);return(r+Mo(t))%2==0?r/2:(r+(n?1:-1))/2}var Io=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Lo={},Ro=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Io},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Po(Lo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?jo(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(wo);Ro.prototype.type=`rect`;var zo={fill:`#000`},Bo=2,Vo={},Ho={style:A({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},pa.style)},Uo=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=zo,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Xo(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new K(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||zo},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return O(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=I(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},O(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Ho},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;Mn(Vo,r.overflowRect,i,a,o,s),i=Vo.baseX,a=Vo.baseY;var c=Sn(ts(e),e,Vo.outerWidth,Vo.outerHeight),l=ns(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=pn(a,c.contentHeight,s);if(l||n){var _=fn(i,f,o),v=pn(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=es(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=$o(`fill`in e?e.fill:(x=!0,r.fill)),C=Qo(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Bo,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Eo),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,Jo(D,e),g+=m,E.setBoundingRect(Ln(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;Mn(Vo,t.overflowRect,i,a,n,r),i=Vo.baseX,a=Vo.baseY;var o=En(ts(e),e,Vo.outerWidth,Vo.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=fn(i,c,n),f=pn(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;ns(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ns(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=es(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Eo),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=$o(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Qo(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Bo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=he(s.opacity,t.opacity,1),Jo(p,s),y&&(p.lineWidth=he(s.lineWidth,t.lineWidth,g),p.lineDash=H(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Ln(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Ro),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=H(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Ao),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=H(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=he(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Yo(e)&&(t=[e.fontStyle,e.fontWeight,qo(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ye(t)||e.textFont||e.font},t}(ga),Wo={left:!0,right:1,center:1},Go={top:1,bottom:1,middle:1},Ko=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function qo(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Jo(e,t){for(var n=0;n<Ko.length;n++){var r=Ko[n],i=t[r];i!=null&&(e[r]=i)}}function Yo(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Xo(e){return Zo(e),N(e.rich,Zo),e}function Zo(e){if(e){e.font=Uo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Wo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Go[n]?n:`top`,e.padding&&=_e(e.padding)}}function Qo(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function $o(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function es(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function ts(e){var t=e.text;return t!=null&&(t+=``),t}function ns(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var rs=1e-4,is=20;function as(e){return e.replace(/^\s+|\s+$/g,``)}var os=Math.min,ss=Math.max,cs=Math.abs,ls=Math.round,us=Math.floor,ds=Math.ceil,fs=Math.pow,ps=Math.log,ms=Math.LN10,hs=Math.PI,gs=Math.random;function _s(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var q=vs;function vs(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return ys(e,t,n)}function ys(e,t,n){return B(e)?xs(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function bs(e){return B(e)&&xs(e)}function xs(e){return!!as(e).match(/%$/)}function Ss(e,t,n){return isNaN(t)?n?``+e:+e:(t=os(ss(0,t),is),e=(+e).toFixed(t),n?e:+e)}function Cs(e){return e.sort(function(e,t){return e-t}),e}function ws(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(ls(e*t)/t===e)return n}return Ts(e)}function Ts(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ss(0,(a<0?0:i-1-a)-r)}function Es(e,t,n){var r=cs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ps(2*cs(n||1)*cs(r))/ms,a=ps(cs(t))/ms,o=ss(0,ds(-i+a));return isFinite(o)||(o=NaN),o}function Ds(e,t){var n=ne(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=fs(10,t),i=P(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=P(i,function(e){return us(e)}),s=ne(o,function(e,t){return e+t},0),c=P(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return P(o,function(e){return e/r})}function Os(e,t){var n=ss(ws(e),ws(t)),r=e+t;return n>is?r:Ss(r,n)}var ks=fs(2,53)-1;function As(e){var t=hs*2;return(e%t+t)%t}function js(e){return e>-rs&&e<rs}var Ms=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ns(e){if(e instanceof Date)return e;if(B(e)){var t=Ms.exec(e);if(!t)return/* @__PURE__ */ new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?/* @__PURE__ */ new Date(NaN):new Date(ls(e))}function Ps(e){return fs(10,Fs(e))}function Fs(e){if(e===0)return 0;var t=us(ps(e)/ms);return e/fs(10,t)>=10&&t++,t}function Is(e,t){var n=Fs(e),r=fs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Ss(e,-n)}function Ls(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function Rs(e){var t=parseFloat(e);return t==e&&(t!==0||!B(e)||e.indexOf(`x`)<=0)?t:NaN}function zs(e){return!isNaN(Rs(e))}function Bs(){return ls(gs()*9)}function Vs(e,t){return t===0?e:Vs(t,e%t)}function Hs(e,t){return e==null?t:t==null?e:e*t/Vs(e,t)}function Us(e){return e!=null&&isFinite(e)}var Ws=`[ECharts] `,Gs={},Ks=typeof console<`u`&&console.warn&&console.log;function qs(e,t,n){if(Ks){if(n){if(Gs[t])return;Gs[t]=!0}console[e](Ws+t)}}function Js(e,t){qs(`error`,e,t)}function Ys(e){throw Error(e)}function Xs(e,t,n){return(t-e)*n+e}var Zs=`series\0`,Qs=`\0_ec_\0`;function $s(e){return e instanceof Array?e:e==null?[]:[e]}function ec(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var tc=/* @__PURE__ */ `fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function nc(e){return V(e)&&!R(e)&&!(e instanceof Date)?e.value:e}function rc(e){return V(e)&&!(e instanceof Array)}function ic(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=U();N(t,function(e,n){V(e)||(t[n]=null)});var s=ac(e,o,n);return(r||i)&&oc(s,e,o,t),r&&sc(s,t),r||i?cc(s,t,i):a&&lc(s,t),uc(s),s}function ac(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||hc(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function oc(e,t,n,r){N(r,function(i,a){if(i&&i.id!=null){var o=fc(i.id),s=n.get(o);if(s!=null){var c=e[s];ve(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function sc(e,t){N(t,function(n,r){if(n&&n.name!=null)for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!hc(n)&&!hc(a)&&dc(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function cc(e,t,n){N(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||hc(r.existing)||r.existing&&t.id!=null&&!dc(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function lc(e,t){N(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function uc(e){var t=U();N(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),N(e,function(e){var n=e.newOption;ve(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),N(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(V(i)){if(a.name=i.name==null?r?r.name:Zs+n:fc(i.name),r)a.id=fc(r.id);else if(i.id!=null)a.id=fc(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function dc(e,t,n){var r=pc(t[e],null),i=pc(n[e],null);return r!=null&&i!=null&&r===i}function fc(e){return pc(e,``)}function pc(e,t){return e==null?t:B(e)?e:se(e)||oe(e)?e+``:t}function mc(e){var t=e.name;return!!(t&&t.indexOf(Zs))}function hc(e){return e&&e.id!=null&&fc(e.id).indexOf(Qs)===0}function gc(e,t,n){N(e,function(e){var r=e.newOption;V(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=_c(t,r,e.existing,n))})}function _c(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function vc(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return R(t.dataIndex)?P(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return R(t.name)?P(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function yc(){var e=`__ec_inner_`+bc++;return function(t){return t[e]||(t[e]={})}}var bc=Bs();function xc(e,t,n){var r=Sc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=Tc(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Sc(e,t){var n;if(B(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=U(),a={},o=!1;return N(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`)a[n]=e;else{var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&j(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Cc={useDefault:!0,enableAll:!1,enableNone:!1},wc={useDefault:!1,enableAll:!0,enableNone:!0};function Tc(e,t,n,r){r||=Cc;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Ec(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Dc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Oc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function kc(e){return e===`auto`?Ne.domSupported?`html`:`richText`:e||`html`}function Ac(e,t){var n=U(),r=[];return N(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function jc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(se(r)){var o=Xs(n||0,r,i);return Ss(o,a?Math.max(ws(n||0),ws(r)):t)}if(B(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Xs(p,m,i);s[d]=Ss(o,a?Math.max(ws(p),ws(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Mc(){return[1/0,-1/0]}function Nc(e,t){Lc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Pc(e,t){Lc(t)&&t<e[0]&&(e[0]=t)}function Fc(e,t){Lc(t)&&t>e[1]&&(e[1]=t)}function Ic(e,t){Rc(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Lc(e){return e!=null&&isFinite(e)}function Rc(e,t){return Lc(e)&&Lc(t)&&e<=t}function zc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Bc(e){Rc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Vc(){var e=`__ec_once_`+Hc++;return function(t,n){W(t,e)||(t[e]=1,n())}}var Hc=Bs();function Uc(e,t,n){var r=U(),i=0;N(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Wc(e){return e.value+``}function Gc(e){return e+``}function Kc(e,t){return H(t,!0)?e.seriesIndex+2:0}function qc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Jc(e,t){return{seriesType:e,overallReset:t}}function Yc(e){return{overallReset:e}}var J=yc(),Xc=function(e,t,n,r){if(r){var i=J(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=J(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Zc=`series`,Qc=U([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),$c=`original`,el=`arrayRows`,tl=`objectRows`,nl=`keyedColumns`,rl=`typedArray`,il=`unknown`,al=`column`,ol=`Roam`,sl=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],cl=function(){function e(e){N(sl,function(t){this[t]=L(e[t],e)},this)}return e}();function ll(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var ul=1,dl={},fl=yc(),pl=yc(),ml=[`emphasis`,`blur`,`select`],hl=[`normal`,`emphasis`,`blur`,`select`],gl=`highlight`,_l=`downplay`,vl=`select`,yl=`unselect`,bl=`toggleSelect`,xl=`selectchanged`;function Sl(e){return e!=null&&e!==`none`}function Cl(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function wl(e){Cl(e,`emphasis`,2)}function Tl(e){e.hoverState===2&&Cl(e,`normal`,0)}function El(e){Cl(e,`blur`,1)}function Dl(e){e.hoverState===1&&Cl(e,`normal`,0)}function Ol(e){e.selected=!0}function kl(e){e.selected=!1}function Al(e,t,n){t(e,n)}function jl(e,t,n){Al(e,t,n),e.isGroup&&e.traverse(function(e){Al(e,t,n)})}function Ml(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Nl(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function Pl(e,t,n,r){var i=n&&j(n,`select`)>=0,a=!1;if(e instanceof wo){var o=fl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Sl(s)||Sl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=O({},r),l=O({},l),l.fill=s):!Sl(l.fill)&&Sl(s)?(a=!0,r=O({},r),l=O({},l),l.fill=Xr(s)):!Sl(l.stroke)&&Sl(c)&&(a||(r=O({},r),l=O({},l)),l.stroke=Xr(c)),r.style=l}}if(r&&r.z2==null){a||(r=O({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Fl(e,t,n){if(n&&n.z2==null){n=O({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Il(e,t,n){var r=j(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Nl(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=O({},n),o=O({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Ll(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Pl(this,e,t,n);if(e===`blur`)return Il(this,e,n);if(e===`select`)return Fl(this,e,n)}return n}function Rl(e){e.stateProxy=Ll;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Ll),n&&(n.stateProxy=Ll)}function zl(e,t){!ql(e,t)&&!e.__highByOuter&&jl(e,wl)}function Bl(e,t){!ql(e,t)&&!e.__highByOuter&&jl(e,Tl)}function Vl(e,t){e.__highByOuter|=1<<(t||0),jl(e,wl)}function Hl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&jl(e,Tl)}function Ul(e){jl(e,El)}function Wl(e){jl(e,Dl)}function Gl(e){jl(e,Ol)}function Kl(e){jl(e,kl)}function ql(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Jl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=pl(i),o=ll(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Dl(e)}),s&&n.push(i)),a.isBlured=!1}),N(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Yl(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Wl(r)}}if(e!=null&&t&&t!==`none`){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||El(e)}),M(t))a(e.getData(),t);else if(V(t))for(var u=I(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),pl(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function Xl(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){pl(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){El(e)})}}}function Zl(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=vc(i,t);a=(R(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=J(o);Yl(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Yl(r,u,d,n)}}}function Ql(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if(J(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function $l(e,t,n){var r=J(e),i=Ql(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Xl(r.componentMainType,r.componentIndex,n),N(a,function(e){return zl(e,t)})):(Yl(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Xl(r.componentMainType,r.componentIndex,n),zl(e,t))}function eu(e,t,n){Jl(n);var r=J(e),i=Ql(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?N(i,function(e){return Bl(e,t)}):Bl(e,t)}function tu(e,t,n){if(mu(t)){var r=t.dataType,i=vc(e.getData(r),t);R(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function nu(e){N(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Gl(t):Kl(t)})})}function ru(e){var t=[];return e.eachSeries(function(e){N(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function iu(e,t,n){du(e,!0),jl(e,Rl),su(e,t,n)}function au(e){du(e,!1)}function ou(e,t,n,r){r?au(e):iu(e,t,n)}function su(e,t,n){var r=J(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var cu=[`emphasis`,`blur`,`select`],lu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function uu(e,t,n,r){n||=`itemStyle`;for(var i=0;i<cu.length;i++){var a=cu[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[lu[n]]()}}function du(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function fu(e){return!!(e&&e.__highDownDispatcher)}function pu(e){var t=dl[e];return t==null&&ul<=32&&(t=dl[e]=ul++),t}function mu(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function hu(e){var t=e.type;return t===`highlight`||t===`downplay`}function gu(e){var t=fl(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var _u=Qa.CMD,vu=[[],[],[]],yu=Math.sqrt,bu=Math.atan2;function xu(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=_u.M,d=_u.C,f=_u.L,p=_u.R,m=_u.A,h=_u.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:var g=t[4],_=t[5],v=yu(t[0]*t[0]+t[1]*t[1]),y=yu(t[2]*t[2]+t[3]*t[3]),b=bu(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],kt(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],kt(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=vu[c];x[0]=n[o++],x[1]=n[o++],kt(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Su=Math.sqrt,Cu=Math.sin,wu=Math.cos,Tu=Math.PI;function Eu(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Du(e,t){return(e[0]*t[0]+e[1]*t[1])/(Eu(e)*Eu(t))}function Ou(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Du(e,t))}function ku(e,t,n,r,i,a,o,s,c,l,u){var d=Tu/180*c,f=wu(d)*(e-n)/2+Cu(d)*(t-r)/2,p=-1*Cu(d)*(e-n)/2+wu(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Su(m),s*=Su(m));var h=(i===a?-1:1)*Su((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+wu(d)*g-Cu(d)*_,y=(t+r)/2+Cu(d)*g+wu(d)*_,b=Ou([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Ou(x,S);if(Du(x,S)<=-1&&(C=Tu),Du(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Tu*1e6)/1e6;C=Tu*2+w%2*Tu}u.addData(l,v,y,o,s,b,C,d,a)}var Au=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ju=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Mu(e){var t=new Qa;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Qa.CMD,c=e.match(Au);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(ju)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,ku(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,ku(w,T,n,r,S,C,y,b,x,f,t)}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var Nu=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(wo);function Pu(e){return e.setData!=null}function Fu(e,t){var n=Mu(e),r=O({},t);return r.buildPath=function(e){var t=Pu(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){xu(n,e),this.dirtyShape()},r}function Iu(e,t){return new Nu(Fu(e,t))}function Lu(e,t){var n=Fu(e,t);return function(e){r(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Nu)}function Ru(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new wo(t);return o.createPathProxy(),o.buildPath=function(e){if(Pu(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var zu=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=j(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=j(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new K(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(K.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(ea);zu.prototype.type=`group`;var Bu=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Vu=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Bu},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(wo);Vu.prototype.type=`circle`;var Hu=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Uu=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hu},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()},t}(wo);Uu.prototype.type=`ellipse`;var Wu=Math.PI,Gu=Wu*2,Ku=Math.sin,qu=Math.cos,Ju=Math.acos,Yu=Math.atan2,Xu=Math.abs,Zu=Math.sqrt,Qu=Math.max,$u=Math.min,ed=1e-4;function td(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<ed))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function nd(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Zu(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Zu(Qu(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function rd(e){var t;if(R(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function id(e,t){var n,r=Qu(t.r,0),i=Qu(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Xu(c-s),p=f>Gu&&f%Gu;if(p>ed&&(f=p),!(r>ed))e.moveTo(l,u);else if(f>Gu-ed)e.moveTo(l+r*qu(s),u+r*Ku(s)),e.arc(l,u,r,s,c,!d),i>ed&&(e.moveTo(l+i*qu(c),u+i*Ku(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*qu(s),j=r*Ku(s),ee=i*qu(c),te=i*Ku(c),M=f>ed;if(M){var N=t.cornerRadius;N&&(n=rd(N),m=n[0],h=n[1],g=n[2],_=n[3]);var P=Xu(r-i)/2;if(v=$u(P,g),y=$u(P,_),b=$u(P,m),x=$u(P,h),w=S=Qu(v,y),T=C=Qu(b,x),(S>ed||C>ed)&&(E=r*qu(c),D=r*Ku(c),O=i*qu(s),k=i*Ku(s),f<Wu)){var ne=td(A,j,O,k,E,D,ee,te);if(ne){var F=A-ne[0],re=j-ne[1],I=E-ne[0],ie=D-ne[1],L=1/Ku(Ju((F*I+re*ie)/(Zu(F*F+re*re)*Zu(I*I+ie*ie)))/2),ae=Zu(ne[0]*ne[0]+ne[1]*ne[1]);w=$u(S,(r-ae)/(L+1)),T=$u(C,(i-ae)/(L-1))}}}if(!M)e.moveTo(l+A,u+j);else if(w>ed){var R=$u(g,w),z=$u(_,w),B=nd(O,k,A,j,r,R,d),oe=nd(E,D,ee,te,r,z,d);e.moveTo(l+B.cx+B.x0,u+B.cy+B.y0),w<S&&R===z?e.arc(l+B.cx,u+B.cy,w,Yu(B.y0,B.x0),Yu(oe.y0,oe.x0),!d):(R>0&&e.arc(l+B.cx,u+B.cy,R,Yu(B.y0,B.x0),Yu(B.y1,B.x1),!d),e.arc(l,u,r,Yu(B.cy+B.y1,B.cx+B.x1),Yu(oe.cy+oe.y1,oe.cx+oe.x1),!d),z>0&&e.arc(l+oe.cx,u+oe.cy,z,Yu(oe.y1,oe.x1),Yu(oe.y0,oe.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>ed)||!M)e.lineTo(l+ee,u+te);else if(T>ed){var R=$u(m,T),z=$u(h,T),B=nd(ee,te,E,D,i,-z,d),oe=nd(A,j,O,k,i,-R,d);e.lineTo(l+B.cx+B.x0,u+B.cy+B.y0),T<C&&R===z?e.arc(l+B.cx,u+B.cy,T,Yu(B.y0,B.x0),Yu(oe.y0,oe.x0),!d):(z>0&&e.arc(l+B.cx,u+B.cy,z,Yu(B.y0,B.x0),Yu(B.y1,B.x1),!d),e.arc(l,u,i,Yu(B.cy+B.y1,B.cx+B.x1),Yu(oe.cy+oe.y1,oe.cx+oe.x1),d),R>0&&e.arc(l+oe.cx,u+oe.cy,R,Yu(oe.y1,oe.x1),Yu(oe.y0,oe.x0),!d))}else e.lineTo(l+ee,u+te),e.arc(l,u,i,c,s,d)}e.closePath()}}}var ad=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),od=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ad},t.prototype.buildPath=function(e,t){id(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(wo);od.prototype.type=`sector`;var sd=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),cd=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new sd},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(wo);cd.prototype.type=`ring`;function ld(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)At(u,u,e[f]),jt(d,d,e[f]);At(u,u,r[0]),jt(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(gt(e[f]));continue}else c=e[f-1],l=e[f+1];yt(a,l,c),St(a,a,t);var h=wt(m,c),g=wt(m,l),_=h+g;_!==0&&(h/=_,g/=_),St(o,a,-h),St(s,a,g);var v=vt([],m,o),y=vt([],m,s);r&&(jt(v,v,u),At(v,v,d),jt(y,y,u),At(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function ud(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=ld(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var dd=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),fd=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new dd},t.prototype.buildPath=function(e,t){ud(e,t,!0)},t}(wo);fd.prototype.type=`polygon`;var pd=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),md=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new pd},t.prototype.buildPath=function(e,t){ud(e,t,!1)},t}(wo);md.prototype.type=`polyline`;var hd={},gd=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),_d=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new gd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=No(hd,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(wo);_d.prototype.type=`line`;var vd=[],yd=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function bd(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?ur:lr)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ur:lr)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?_r:gr)(e.x1,e.cpx1,e.x2,t),(n?_r:gr)(e.y1,e.cpy1,e.y2,t)]}var xd=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new yd},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(br(n,o,i,u,vd),o=vd[1],i=vd[2],br(r,s,a,u,vd),s=vd[1],a=vd[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(pr(n,o,c,i,u,vd),o=vd[1],c=vd[2],i=vd[3],pr(r,s,l,a,u,vd),s=vd[1],l=vd[2],a=vd[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return bd(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=bd(this.shape,e,!0);return Ct(t,t)},t}(wo);xd.prototype.type=`bezier-curve`;var Sd=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Cd=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Sd},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)},t}(wo);Cd.prototype.type=`arc`;var wd=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),wo.prototype.getBoundingRect.call(this)},t}(wo),Td=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Ed=function(e){r(t,e);function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return t}(Td),Dd=function(e){r(t,e);function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return t}(Td),Od=Math.min,kd=Math.max,Ad=Math.abs,jd=[0,0],Md=[0,0],Nd=tn(),Pd=Nd.minTv,Fd=Nd.maxTv,Id=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new G;for(var n=0;n<2;n++)this._axes[n]=new G;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var c=0;c<4;c++)n[c].transform(t);G.sub(r[0],n[1],n[0]),G.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&G.set(t,0,0),Nd.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Nd.negativeSize&&G.copy(t,r?Nd.useDir?Nd.dirMinTv:Pd:Fd),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,jd),e._getProjMinMaxOnAxis(a,t._corners,Md),Nd.negativeSize||jd[1]<Md[0]||jd[0]>Md[1]){if(i=!1,Nd.negativeSize||n)return i;var s=Ad(Md[0]-jd[1]),c=Ad(jd[0]-Md[1]);Od(s,c)>Fd.len()&&(s<c?G.scale(Fd,o,-s*r):G.scale(Fd,o,c*r))}else if(!n){var s=Ad(Md[0]-jd[1]),c=Ad(jd[0]-Md[1]);(Nd.useDir||Od(s,c)<Pd.len())&&((s<c||!Nd.bidirectional)&&(G.scale(Pd,o,s*r),Nd.useDir&&Nd.calcDirMTV()),(s>=c||!Nd.bidirectional)&&(G.scale(Pd,o,-c*r),Nd.useDir&&Nd.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=Od(l,o),s=kd(l,s)}n[0]=o+Nd.touchThreshold,n[1]=s-Nd.touchThreshold,Nd.negativeSize=n[1]<n[0]},e}(),Ld=[],Rd=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new K(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Ld)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(ga),zd=yc();function Bd(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=H(r.duration,200),u=H(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),z(d)&&(d=d(n,i)),z(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Vd(e,t,n,r,i,a,o){var s=!1,c;z(i)?(o=a,a=i,i=null):V(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=Bd(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Hd(e,t,n,r,i,a){Vd(`update`,e,t,n,r,i,a)}function Ud(e,t,n,r,i,a){Vd(`enter`,e,t,n,r,i,a)}function Wd(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function Gd(e,t,n,r,i,a){Wd(e)||Vd(`leave`,e,t,n,r,i,a)}function Kd(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Gd(e,{style:{opacity:0}},t,n,r)}function qd(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Kd(e,t,n,r)}):Kd(e,t,n,r)}function Jd(e){zd(e).oldStyle=e.style}var Yd=/* @__PURE__ */ t({Arc:()=>Cd,BezierCurve:()=>xd,BoundingRect:()=>K,Circle:()=>Vu,CompoundPath:()=>wd,Ellipse:()=>Uu,Group:()=>zu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Ao,IncrementalDisplayable:()=>Rd,Line:()=>_d,LinearGradient:()=>Ed,OrientedBoundingRect:()=>Id,Path:()=>wo,Point:()=>G,Polygon:()=>fd,Polyline:()=>md,RadialGradient:()=>Dd,Rect:()=>Ro,Ring:()=>cd,Sector:()=>od,Text:()=>Uo,WH:()=>Qd,XY:()=>Zd,applyTransform:()=>mf,calcZ2Range:()=>Lf,clipPointsByRect:()=>yf,clipRectByRect:()=>bf,createIcon:()=>xf,decomposeTransform:()=>Vf,ensureCopyRect:()=>Pf,ensureCopyTransform:()=>Ff,expandOrShrinkRect:()=>Ef,extendPath:()=>tf,extendShape:()=>$d,getCurrentCanvasPainter:()=>Uf,getShapeClass:()=>rf,getTransform:()=>pf,groupTransition:()=>vf,initProps:()=>Ud,isBoundingRectAxisAligned:()=>Mf,isElementRemoved:()=>Wd,lineLineIntersect:()=>Cf,linePolygonIntersect:()=>Sf,makeImage:()=>of,makePath:()=>af,mergePath:()=>cf,payloadDisableAnimation:()=>Bf,registerShape:()=>nf,removeElement:()=>Gd,removeElementWithFadeOut:()=>qd,resizePath:()=>lf,retrieveZInfo:()=>If,setTooltipConfig:()=>kf,subPixelOptimize:()=>ff,subPixelOptimizeLine:()=>uf,subPixelOptimizeRect:()=>df,transformDirection:()=>hf,traverseElements:()=>jf,traverseUpdateZ:()=>Rf,updateProps:()=>Hd}),Xd={},Zd=[`x`,`y`],Qd=[`width`,`height`];function $d(e){return wo.extend(e)}var ef=Lu;function tf(e,t){return ef(e,t)}function nf(e,t){Xd[e]=t}function rf(e){if(Xd.hasOwnProperty(e))return Xd[e]}function af(e,t,n,r){var i=Iu(e,t);return n&&(r===`center`&&(n=sf(n,i.getBoundingRect())),lf(i,n)),i}function of(e,t,n){var r=new Ao({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(sf(t,i))}}});return r}function sf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var cf=Ru;function lf(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function uf(e,t){return No(e,e,{lineWidth:t}),e}function df(e,t){return Po(e,e,t),e}var ff=Fo;function pf(e,t){for(var n=st([]);e&&e!==t;)lt(n,e.getLocalTransform(),n),e=e.parent;return n}function mf(e,t,n){return t&&!M(t)&&(t=Kn.getLocalTransform(t)),n&&(t=pt([],t)),kt([],e,t)}function hf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:cs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:cs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=mf(a,t,n),cs(a[0])>cs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function gf(e){return!e.isGroup}function _f(e){return e.shape!=null}function vf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){gf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return _f(e)&&(t.shape=E(e.shape)),t}var a=r(e);t.traverse(function(e){if(gf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Hd(e,r,n,J(e).dataIndex)}}})}function yf(e,t){return P(e,function(e){var n=e[0];n=ss(n,t.x),n=os(n,t.x+t.width);var r=e[1];return r=ss(r,t.y),r=os(r,t.y+t.height),[n,r]})}function bf(e,t){var n=ss(e.x,t.x),r=os(e.x+e.width,t.x+t.width),i=ss(e.y,t.y),a=os(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function xf(e,t,n){var r=O({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),A(i,n),new Ao(r)):af(e.replace(`path://`,``),r,n,`center`)}function Sf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Cf(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Cf(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=wf(u,d,c,l);if(Tf(f))return!1;var p=e-i,m=t-a,h=wf(p,m,c,l)/f;if(h<0||h>1)return!1;var g=wf(p,m,u,d)/f;return!(g<0||g>1)}function wf(e,t,n,r){return e*r-n*t}function Tf(e){return e<=1e-6&&e>=-1e-6}function Ef(e,t,n,r,i){return t==null||(se(t)?Df[0]=Df[1]=Df[2]=Df[3]=t:(Df[0]=t[0],Df[1]=t[1],Df[2]=t[2],Df[3]=t[3]),r&&(Df[0]=ss(0,Df[0]),Df[1]=ss(0,Df[1]),Df[2]=ss(0,Df[2]),Df[3]=ss(0,Df[3])),n&&(Df[0]=-Df[0],Df[1]=-Df[1],Df[2]=-Df[2],Df[3]=-Df[3]),Of(e,Df,`x`,`width`,3,1,i&&i[0]||0),Of(e,Df,`y`,`height`,0,2,i&&i[1]||0)),e}var Df=[0,0,0,0];function Of(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ss(0,os(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:cs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function kf(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=B(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&N(I(c),function(e){W(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=J(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:A({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Af(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function jf(e,t){if(e){if(R(e))for(var n=0;n<e.length;n++)Af(e[n],t);else Af(e,t)}}function Mf(e){return!e||cs(e[1])<Nf&&cs(e[2])<Nf||cs(e[0])<Nf&&cs(e[3])<Nf}var Nf=1e-5;function Pf(e,t){return e?K.copy(e,t):t.clone()}function Ff(e,t){return t?ct(e||ot(),t):void 0}function If(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Lf(e){var t=-1/0,n=1/0;Af(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(e&&!e.isGroup){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function Rf(e,t,n){zf(e,t,n,-1/0)}function zf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=ss(zf(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=ss(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function Bf(e){return e.animation={duration:0},e}function Vf(e,t){return t?ct(Hf.transform,t):st(Hf.transform),Hf.decomposeTransform(),Xn(e,Hf),e}var Hf=new Kn;Hf.transform=ot();function Uf(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}nf(`circle`,Vu),nf(`ellipse`,Uu),nf(`sector`,od),nf(`ring`,cd),nf(`polygon`,fd),nf(`polyline`,md),nf(`rect`,Ro),nf(`line`,_d),nf(`bezierCurve`,xd),nf(`arc`,Cd);var Wf={};function Gf(e,t){for(var n=0;n<ml.length;n++){var r=ml[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function Kf(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s??=z(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<ml.length;l++){var u=ml[l],d=t[u];c[u]=H(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function qf(e,t,n,r){n||=Wf;for(var i=e instanceof Uo,a=!1,o=0;o<hl.length;o++){var s=t[hl[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Uo,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Kf(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Yf(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Xf(u,n,!1));for(var o=0;o<ml.length;o++){var p=ml[o],s=t[p];if(s){var m=c.ensureState(p),h=!!H(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Yf(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Xf(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(ip(c).setLabelText=function(e){var r=Kf(n,t,e);Gf(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Jf(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<ml.length;r++){var i=ml[r];n[i]=e.getModel([i,t])}return n}function Yf(e,t,n,r,i){var a={};return Zf(a,e,n,r,i),t&&O(a,t),a}function Xf(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=H(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function Zf(e,t,n,r,i){n||=Wf;var a=t.ecModel,o=a&&a.option.textStyle,s=Qf(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=H(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);np(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=se(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=sp.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=_e(_),h.__marginType=sp.textMargin)}np(e,t,o,null,null,n,r,i,!0,!1)}function Qf(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Wf).rich;if(n){t||={};for(var r=I(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var $f=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],ep=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],tp=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function np(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Wf;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=H(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=H(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=H(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=H(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<$f.length;_++){var v=$f[_],y=i!==!1&&r?he(t.getShallow(v),r.getShallow(v),n[v]):H(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<ep.length;_++){var v=ep[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<tp.length;_++){var v=tp[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function rp(e,t){var n=t&&t.getModel(`textStyle`);return ye([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}var ip=yc();function ap(e,t,n,r){if(e){var i=ip(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}function op(e,t,n,r,i){var a=ip(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=H(a.interpolatedValue,a.prevValue),c=a.value;function l(r){var l=jc(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,Gf(e,Kf({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?Ud:Hd)(e,{percent:1},r,t,null,l)}var sp={minMargin:1,textMargin:2},cp=[`textStyle`,`color`],lp=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],up=new Uo,dp=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(cp):null)},e.prototype.getFont=function(){return rp({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<lp.length;n++)t[lp[n]]=this.getShallow(lp[n]);return up.useStyle(t),up.update(),up.getBoundingRect()},e}(),fp=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],pp=Ye(fp),mp=function(){function e(){}return e.prototype.getLineStyle=function(e){return pp(this,e)},e}(),hp=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],gp=Ye(hp),_p=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return gp(this,e,t)},e}(),vp=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){D(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(E(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Ne.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Ve(vp),Ge(vp),te(vp,mp),te(vp,_p),te(vp,Ze),te(vp,dp);function yp(e){return e==null?0:e.length||1}function bp(e){return e}var xp=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||bp,this._newKeyGetter=r||bp,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=yp(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=yp(c),d=yp(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=yp(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=yp(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Sp={Must:1,Might:2,Not:3},Cp=yc();function wp(e){Cp(e).datasetMap=U()}function Tp(e,t,n){var r={},i=Dp(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Cp(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),N(e,function(t,n){var i=V(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});N(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function Ep(e,t,n){var r={};if(!Dp(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&N(a,function(e,t){(V(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=Ap(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Sp.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Sp.Not)&&(e.n=c),f(e)&&s[e.n]!==Sp.Not)return e;d||(u===Sp.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function Dp(e){if(!e.get(`data`,!0))return Tc(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Cc).models[0]}function Op(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Tc(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Cc).models}function kp(e,t){return Ap(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Ap(e,t,n,r,i,a){var o,s=5;if(le(e))return Sp.Not;var c,l;if(r){var u=r[a];V(u)?(c=u.name,l=u.type):B(u)&&(c=u)}if(l!=null)return l===`ordinal`?Sp.Must:Sp.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return Sp.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return Sp.Not;var f=_[c];if(!f||le(f))return Sp.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=nc(g);if(!R(y))return Sp.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=B(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?Sp.Might:Sp.Not;if(t&&e!==`-`)return Sp.Must}return Sp.Not}var jp=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&kp(this,n)===Sp.Must&&(r.type=`ordinal`)}}return e}();function Mp(e){return e instanceof jp}function Np(e,t,n){n||=Ip(e);var r=t.seriesLayoutBy,i=Lp(e,n,r,t.sourceHeader,t.dimensions);return new jp({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:E(t)})}function Pp(e){return new jp({data:e,sourceFormat:le(e)?rl:$c})}function Fp(e){return new jp({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:E(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Ip(e){var t=il;if(le(e))t=rl;else if(R(e)){e.length===0&&(t=el);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(R(i)||le(i)){t=el;break}if(V(i)){t=tl;break}}}}else if(V(e)){for(var a in e)if(W(e,a)&&M(e[a])){t=nl;break}}return t}function Lp(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:zp(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Bp(function(e){e!=null&&e!==`-`&&(B(e)?o??=1:o=0)},n,s,10):o=se(r)?r:+!!r,!i&&o===1&&(i=[],Bp(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=Rp(e);else if(t===`keyedColumns`)i||(i=[],N(e,function(e,t){i.push(t)}));else if(t===`original`){var c=nc(e[0]);a=R(c)&&c.length||1}return{startIndex:o,dimensionsDefine:zp(i),dimensionsDetectedCount:a}}function Rp(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return I(n)}function zp(e){if(e){var t=U();return P(e,function(e,n){e=V(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function Bp(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function Vp(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Hp,Up,Wp,Gp,Kp,qp,Jp=function(){function e(e,t){var n=Mp(e)?e:Pp(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),qp(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;qp=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=Kp[am(o,s)];O(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=L(Qp(o,s),null,i,c,l),e.count=L(tm(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Kp=(e={},e[el+`_`+al]={pure:!0,appendData:i},e[el+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[tl]={pure:!0,appendData:i},e[nl]={pure:!0,appendData:function(e){var t=this._data;N(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[$c]={appendData:i},e[rl]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),Yp=function(e){R(e)||Js(`series.data or dataset.source must be an array.`)};Hp={},Hp[el+`_`+al]=Yp,Hp[el+`_row`]=Yp,Hp[tl]=Yp,Hp[nl]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Js(`dimension name must not be null/undefined.`)},Hp[$c]=Yp;var Xp=function(e,t,n,r){return e[r]},Zp=(Up={},Up[el+`_`+al]=function(e,t,n,r){return e[r+t]},Up[el+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},Up[tl]=Xp,Up[nl]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},Up[$c]=Xp,Up);function Qp(e,t){return Zp[am(e,t)]}var $p=function(e,t,n){return e.length},em=(Wp={},Wp[el+`_`+al]=function(e,t,n){return Math.max(0,e.length-t)},Wp[el+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Wp[tl]=$p,Wp[nl]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Wp[$c]=$p,Wp);function tm(e,t){return em[am(e,t)]}var nm=function(e,t,n){return e[t]},rm=(Gp={},Gp[el]=nm,Gp[tl]=function(e,t,n){return e[n]},Gp[nl]=nm,Gp[$c]=function(e,t,n){var r=nc(e);return r instanceof Array?r[t]:r},Gp[rl]=nm,Gp);function im(e){return rm[e]}function am(e,t){return e===`arrayRows`?e+`_`+t:e}function om(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return im(a)(r,o,s)}var c=r;return a===`original`&&(c=nc(r)),c}}}var sm=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function cm(e,t){var n={},r=n.encode={},i=U(),a=[],o=[],s={};N(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;lm(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),dm(n.type)&&(a[0]=t),lm(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}Qc.each(function(e,t){var i=lm(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=P(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new sm(s,t),n}function lm(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function um(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function dm(e){return e!==`ordinal`&&e!==`time`}var fm=function(){function e(e){this.otherDims={},e!=null&&O(this,e)}return e}();function pm(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!se(e)&&e!=null&&e!==`-`&&(e=+Ns(e)),e==null||e===``?NaN:Number(e))}U({number:function(e){return parseFloat(e)},time:function(e){return+Ns(e)},trim:function(e){return B(e)?ye(e):e}});var mm={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function e(e,t){se(t)||Ys(``),this._opFn=mm[e],this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){return se(e)?this._opFn(e,this._rvalFloat):this._opFn(Rs(e),this._rvalFloat)},e})();var hm=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=se(e)?e:Rs(e),r=se(t)?t:Rs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=B(e),s=B(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Rs(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function gm(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function _m(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var vm=typeof Uint32Array>`u`?Array:Uint32Array,ym=typeof Uint16Array>`u`?Array:Uint16Array,bm=typeof Int32Array>`u`?Array:Int32Array,xm=typeof Float64Array>`u`?Array:Float64Array,Sm={float:xm,int:bm,ordinal:Array,number:Array,time:xm},Cm;function wm(e){return e>65535?vm:ym}function Tm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Em(e,t,n,r,i){var a=Sm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var Dm=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=U()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=Cm[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Vp(r),this._dimensions=P(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Sm[t||`float`](this._rawCount),this._rawExtent[i]=Mc(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=Mc());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];Em(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=Cm.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=P(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=Mc()),Em(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),Cs(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=wm(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(wm(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=I(e),i=r.length;if(!i)return this;var a=t.count(),o=new(wm(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=Mc();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(wm(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)?(T++,w<0&&(w=v)):(l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v))}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(wm(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=Mc(),d=new(wm(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++){var h=this.getRawIndex(p+m);o[m]=c[h]}var g=n(o),_=this.getRawIndex(Math.min(p+r(o,g)||0,l-1));c[_]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=Mc();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=gm(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||_m(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&ne(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Tm(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=E(this._extent),e._rawExtent=E(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return pm(e[r],this._dimensions[r])}Cm={arrayRows:e,objectRows:function(e,t,n,r){return pm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return pm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Om=yc(),km={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Am=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Nm(this.source))},e.prototype.getSourceDimensionIndex=function(e){return H(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Vp(this.source),n=!Pm(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),!t||s==null||u&&u.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=km[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function jm(e){return e instanceof Am}function Mm(e){for(var t=U(),n=0;n<(e||[]).length;n++){var r=e[n],i=V(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Nm(e){var t=Om(e);return t.dimNameMap||=Mm(e.dimensionsDefine)}function Pm(e){return e>30}var Fm=V,Im=P,Lm=typeof Int32Array>`u`?Array:Int32Array,Rm=`e\0\0`,zm=-1,Bm=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Vm=[`_approximateExtent`],Hm,Um,Wm,Gm,Km,qm,Jm,Ym=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;jm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=B(u)?new fm({name:u}):u instanceof fm?u:new fm(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=U();N(a,function(e){m.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(se(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof Dm&&(i=e),!i){var a=this.dimensions,o=Mp(e)||M(e)?new Jp(e,a.length):e;i=new Dm;var s=Im(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=cm(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&Jm(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&rc(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=pc(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=pc(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Jm(this,o);Hm(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Fm(e)?O(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Wm(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Um(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return R(e)?r.getValues(Im(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?zm:r},e.prototype.each=function(e,t,n){z(e)&&(n=t,t=e,e=[]);var r=n||this,i=Im(Gm(e),this._getStoreDimIndex,this);this._store.each(i,r?L(t,r):t)},e.prototype.filterSelf=function(e,t,n){z(e)&&(n=t,t=e,e=[]);var r=n||this,i=Im(Gm(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?L(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=I(e),i=[];return N(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){z(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=Im(Gm(e),this._getStoreDimIndex,this),o=qm(this);return o._store=this._store.map(a,i?L(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=Im(Gm(e),this._getStoreDimIndex,this);this._store.modify(a,i?L(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=qm(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=qm(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=qm(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new vp(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new xp(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Um(e,t)},function(e){return Um(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Fm(e)?O(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),R(i)?i=i.slice():Fm(i)&&(i=O({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Fm(t)?O(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Fm(e)?O(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?O(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Xc(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){N(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Im(this.dimensions,this._getDimInfo,this),this.hostModel),Km(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];z(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(ge(arguments)))})},e.internalField=function(){Hm=function(e){var t=e._invertedIndicesMap;N(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Lm(a.categories.length);for(var s=0;s<n.length;s++)n[s]=zm;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Wm=function(e,t,n){return pc(e._getCategory(t,n),null)},Um=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Wm(e,e._idDimIdx,t)),n??=Rm+t,n},Gm=function(e){return R(e)||(e=e==null?[]:[e]),e},qm=function(t){var n=new e(t._schema?t._schema:Im(t.dimensions,t._getDimInfo,t),t.hostModel);return Km(n,t),n},Km=function(e,t){N(Bm.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,N(Vm,function(n){e[n]=E(t[n])}),e._calculationInfo=O({},t._calculationInfo)},Jm=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=Wm(e,i,t)),s==null&&a!=null&&(r[t]=s=Wm(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Xm(e,t){Mp(e)||(e=Pp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=U(),a=[],o=Zm(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Pm(o),c=r===e.dimensionsDefine,l=c?Nm(e):Mm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=U(u),f=new bm(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=V(n)?n:{name:n},o=new fm,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=$s(e).slice();if(n.length===1&&!B(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);N(n,function(e,n){var i=B(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})}});var h=0;N(n,function(e){var t,n,r,i;if(B(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=O({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=$s(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}N(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(A(o,i),t,a),o.name==null&&n){var s=n[a];!V(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&A(o.otherDims,r)})}});function g(e,t,n){Qc.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)N(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=Qm(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(kp(e,S)===Sp.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Uc(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Am({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Zm(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return N(t,function(e){var t;V(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Qm(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var $m={},eh={},th=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n($m,!0),this._normalMasterList=n(eh,!1);function n(n,r){var i=[];return N(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){N(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){e===`matrix`||e===`calendar`?$m[e]=t:eh[e]=t},e.get=function(e){return eh[e]||$m[e]},e}();function nh(e){return!!$m[e]}function rh(e){ih.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var ih=U();function ah(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ih.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function oh(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!nh(n)&&(i=0))}return{coordSysType:n,kind:i}}function sh(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=oh(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var ch=function(e,t){var n=t.getReferringComponents(e,Cc).models[0];return n&&n.coordinateSystem},lh=function(){function e(e){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=e}return e}();function uh(e){var t=e.get(`coordinateSystem`),n=new lh(t),r=dh[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var dh={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Cc).models[0],a=e.getReferringComponents(`yAxis`,Cc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),fh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),fh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Cc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),fh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Cc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),fh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),fh(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),fh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Cc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function fh(e){return e.get(`type`)===`category`}function ph(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;mh(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(N(a,function(e,t){B(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),N(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),u||!m(e)||p&&(e.coordDim===`x`||e.coordDim===`angle`)||i&&i!==e.coordDim||(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;N(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function mh(e){return!jm(e.schema)}function hh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function gh(e,t){return hh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function _h(e,t){var n=e.get(`coordinateSystem`),r=th.get(n),i;return t&&t.coordSysDims&&(i=P(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=um(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function vh(e,t,n){var r,i;return n&&N(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function yh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Pp(e)):(i=r.getSource(),a=i.sourceFormat===$c);var o=uh(t),s=_h(t,o),c=n.useEncodeDefaulter,l=z(c)?c:c?ae(Tp,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Xm(i,u),f=vh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=ph(t,{schema:d,store:p}),h=new Ym(d,t);h.setCalculationInfo(m);var g=f!=null&&bh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function bh(e){if(e.sourceFormat===`original`)return!R(nc(xh(e.data||[])))}function xh(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Sh=Math.round(Math.random()*10);function Ch(e){return[e||``,Sh++].join(`_`)}function wh(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Re(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=Re(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Th(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(N(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),N(u.successor,d?p:f)}N(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return N(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),N(c,function(e){j(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);j(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){var n=[];return N(e,function(e){j(t,e)>=0&&n.push(e)}),n}}function Eh(e,t){return D(D({},e,!0),t,!0)}var Dh=Math.log(2);function Oh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Dh);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Oh(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function kh(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Oh(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Oh(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Ah=`___zrEVENTSAVED`,jh=[];function Mh(e,t,n,r,i){return Ph(jh,t,r,i,!0)&&Ph(e,n,jh[0],jh[1])}function Nh(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Ah];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Ah])}}function Ph(e,t,n,r,i){if(t.getBoundingClientRect&&Ne.domSupported&&!Lh(t)){var a=t[Ah]||(t[Ah]={}),o=Ih(Fh(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Fh(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){N(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Ih(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?kh(s,o):kh(o,s))}function Lh(e){return e.nodeName.toUpperCase()===`CANVAS`}var Rh=/([&<>"'])/g,zh={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Bh(e){return e==null?``:(e+``).replace(Rh,function(e,t){return zh[t]})}var Vh={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Hh={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Uh=`ZH`,Wh=`EN`,Gh=Wh,Kh={},qh={},Jh=Ne.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Gh).toUpperCase().indexOf(Uh)>-1?Uh:Gh}():Gh;function Yh(e,t){e=e.toUpperCase(),qh[e]=new vp(t),Kh[e]=t}function Xh(e){if(B(e)){var t=Kh[e.toUpperCase()]||{};return e===Uh||e===Wh?E(t):D(E(t),E(Kh[Gh]),!1)}return D(E(e),E(Kh[Gh]),!1)}function Zh(e){return qh[e]}function Qh(){return qh[Gh]}Yh(Wh,Vh),Yh(Uh,Hh);var $h=null;function eg(e){$h||=e}function tg(){return $h}function ng(e,t){var n=tg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function rg(e){var t=e.brk;return t?t.breaks:[]}function ig(e){var t=e.brk;return t?t.hasBreaks():!1}var ag=1e3,og=ag*60,sg=og*60,cg=sg*24,lg=cg*365,ug={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},dg={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},fg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,pg=`{yyyy}-{MM}-{dd}`,mg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:pg,hour:pg+` `+dg.hour,minute:pg+` `+dg.minute,second:pg+` `+dg.second,millisecond:fg},hg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],gg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function _g(e){return!B(e)&&!z(e)?vg(e):e}function vg(e){e||={};var t={},n=!0;return N(hg,function(t){n&&=e[t]==null}),N(hg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=hg[s],l=V(a)&&!R(a)?a[c]:a,u=void 0;R(l)?(u=l.slice(),o=u[0]||``):B(l)?(o=l,u=[o]):(o==null?o=dg[r]:ug[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function yg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function bg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function xg(e){return e===bg(e)}function Sg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Cg(e,t,n,r){var i=Ns(e),a=i[Dg(n)](),o=i[Og(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[kg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Ag(n)](),d=(u-1)%12+1,f=i[jg(n)](),p=i[Mg(n)](),m=i[Ng(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof vp?r:Zh(r||Jh)||Qh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,yg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,yg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,yg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,yg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,yg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,yg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,yg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,yg(m,3)).replace(/{S}/g,m+``)}function wg(e,t,n,r,i){var a=null;if(B(n))a=n;else if(z(n)){var o={time:e.time,level:e.time?e.time.level:0},s=tg();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Tg(e.value,i);a=n[u][u][0]}}return Cg(new Date(e.value),a,i,r)}function Tg(e,t){var n=Ns(e),r=n[Og(t)]()+1,i=n[kg(t)](),a=n[Ag(t)](),o=n[jg(t)](),s=n[Mg(t)](),c=n[Ng(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Eg(e,t,n){switch(t){case`year`:e[Fg(n)](0);case`month`:e[Ig(n)](1);case`day`:e[Lg(n)](0);case`hour`:e[Rg(n)](0);case`minute`:e[zg(n)](0);case`second`:e[Bg(n)](0)}return e}function Dg(e){return e?`getUTCFullYear`:`getFullYear`}function Og(e){return e?`getUTCMonth`:`getMonth`}function kg(e){return e?`getUTCDate`:`getDate`}function Ag(e){return e?`getUTCHours`:`getHours`}function jg(e){return e?`getUTCMinutes`:`getMinutes`}function Mg(e){return e?`getUTCSeconds`:`getSeconds`}function Ng(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Pg(e){return e?`setUTCFullYear`:`setFullYear`}function Fg(e){return e?`setUTCMonth`:`setMonth`}function Ig(e){return e?`setUTCDate`:`setDate`}function Lg(e){return e?`setUTCHours`:`setHours`}function Rg(e){return e?`setUTCMinutes`:`setMinutes`}function zg(e){return e?`setUTCSeconds`:`setSeconds`}function Bg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Vg(e){if(!zs(e))return B(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Hg(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Ug=_e;function Wg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ye(e)?e:`-`}function a(e){return Us(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Ns(e):e;if(!isNaN(+c))return Cg(c,r,n);if(s)return`-`}if(t===`ordinal`)return oe(e)?i(e):se(e)&&a(e)?e+``:`-`;var l=Rs(e);return a(l)?Vg(l):oe(e)?i(e):typeof e==`boolean`?e+``:`-`}var Gg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Kg=function(e,t){return`{`+e+(t??``)+`}`};function qg(e,t,n){R(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=Gg[a];e=e.replace(Kg(o),Kg(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(Kg(Gg[c],s),n?Bh(l):l)}return e}function Jg(e,t,n){return N(t,function(t,r){e=e.replace(`{`+r+`}`,n?Bh(t):t)}),e}function Yg(e,t){var n=B(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||`html`;return r?a===`html`?i===`subItem`?`<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:`+Bh(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Bh(r)+`;`+(t||``)+`"></span>`:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function Xg(e,t){return t||=`transparent`,B(e)?e:V(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Zg(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Qg=N,$g=[`left`,`right`,`top`,`bottom`,`width`,`height`],e_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function t_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var n_=t_;ae(t_,`vertical`),ae(t_,`horizontal`);function r_(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function i_(e,t){var n=c_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===s_.point)a=n.refPoint,i=o_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=R(o)?o:[o,o];i=o_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[q(s[0],i.width)+i.x,q(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function a_(e,t){var n=i_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);R(a)||(a=[0,a]);var o=q(r.width,t.getWidth()),s=q(r.height,t.getHeight()),c=Math.min(o,s),l=q(a[0],c/2),u=q(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function o_(e,t,n){n=Ug(n||0);var r=t.width,i=t.height,a=q(e.left,r),o=q(e.top,i),s=q(e.right,r),c=q(e.bottom,i),l=q(e.width,r),u=q(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new K((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var s_={rect:1,point:2};function c_(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=ah(e),l=c.coord,u=c.from;if(o.dataToLayout){a=s_.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=s_.point,s=u,i=o.dataToPoint(l))}return a??=s_.rect,a===s_.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function l_(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new K(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=o_(A({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function u_(e,t){return e[e_[t][0]]!=null||e[e_[t][1]]!=null&&e[e_[t][2]]!=null}function d_(e){var t=e.layoutMode||e.constructor.layoutMode;return V(t)?t:t?{type:t}:null}function f_(e,t,n){var r=n&&n.ignoreSize;!R(r)&&(r=[r,r]);var i=o(e_[0],0),a=o(e_[1],1);c(e_[0],e,i),c(e_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Qg(n,function(t){c[t]=e[t]}),Qg(n,function(e){W(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!W(a,f)&&W(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){Qg(e,function(e){t[e]=n[e]})}}function p_(e){return m_({},e)}function m_(e,t){return t&&e&&Qg($g,function(n){W(t,n)&&(e[n]=t[n])}),e}var h_=yc(),g_=function(e){r(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Ch(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=d_(this),r=n?p_(e):{};D(e,t.getTheme().get(this.mainType)),D(e,this.getDefaultOption()),n&&f_(e,r,n)},t.prototype.mergeOption=function(e,t){D(this.option,e,!0);var n=d_(this);n&&f_(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Be(e))return e.defaultOption;var t=h_(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=D(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Tc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return r_(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(vp);Ue(g_,vp),Je(g_),wh(g_),Th(g_,__);function __(e){var t=[];return N(g_.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=P(t,function(e){return Re(e).main}),e!==`dataset`&&j(t,`dataset`)<=0&&t.unshift(`dataset`),t}var v_=yc(),y_=yc(),b_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=$s(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return C_(this,v_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){w_(this,v_)},e}();function x_(e,t,n,r){return C_(e,y_,$s(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function S_(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function C_(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:S_(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function w_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var T_=/\{@(.+?)\}/g,E_=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&R(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),z(i))return s.status=t,s.dimensionIndex=r,i(s);if(B(i))return qg(i,s).replace(T_,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=om(o,e,i);if(a&&R(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return om(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function D_(e){var t,n;return V(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function O_(e){return new k_(e)}var k_=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(R(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){A_.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:A_.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),R(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),A_=function(){var e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}(),j_=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return pm(e,t)},e}();function M_(e,t){var n=new j_,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&Ys(``);var o=[],s={},c=e.dimensionsDefine;if(c)N(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(W(s,n)&&Ys(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=Qp(i,al);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=L(N_,null,e)),n.cloneRawData=L(P_,null,e),n.count=L(tm(i,al),null,r,a,o);var d=im(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=L(F_,null,o,s),n.cloneAllDimensionInfo=L(I_,null,o),n}function N_(e){var t=e.sourceFormat;return V_(t)||Ys(``),e.data}function P_(e){var t=e.sourceFormat,n=e.data;if(V_(t)||Ys(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(O({},n[i]));return r}}function F_(e,t,n){if(n!=null){if(se(n)||!isNaN(n)&&!W(t,n))return e[n];if(W(t,n))return t[n]}}function I_(e){return E(e)}var L_=U();function R_(e){e=E(e);var t=e.type,n=``;t||Ys(n);var r=t.split(`:`);r.length!==2&&Ys(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,L_.set(t,e)}function z_(e,t,n){var r=$s(e),i=r.length;i||Ys(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=B_(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function B_(e,t,n,r){var i=``;t.length||Ys(i),V(e)||Ys(i);var a=e.type,o=L_.get(a);o||Ys(i);var s=P(t,function(e){return M_(e,o)});return P($s(o.transform({upstream:s[0],upstreamList:s,config:E(e.config)})),function(e,n){var r=``;V(e)||Ys(r),e.data||Ys(r),V_(Ip(e.data))||Ys(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:al,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:al,sourceHeader:0,dimensions:e.dimensions};return Np(e.data,i,null)})}function V_(e){return e===`arrayRows`||e===`objectRows`}var H_=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(U_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=le(o)?rl:$c,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=H(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=H(u.sourceHeader,d.sourceHeader),m=H(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Np(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Np(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&W_(``);var i,a=[],o=[];return N(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&W_(``),a.push(t),o.push(e._getVersionSign())}),n?i=z_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Fp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];U_(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Dm,o.initData(new Jp(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(U_(e)){var t=Dp(e);return t?[t.getSourceManager()]:[]}return P(Op(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(U_(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},e}();function U_(e){return e.mainType===`series`}function W_(e){throw Error(e)}var Y={color:{},darkColor:{},size:{}},G_=Y.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var K_ in O(G_,{primary:G_.neutral80,secondary:G_.neutral70,tertiary:G_.neutral60,quaternary:G_.neutral50,disabled:G_.neutral20,border:G_.neutral30,borderTint:G_.neutral20,borderShade:G_.neutral40,background:G_.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:G_.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:G_.neutral70,axisLineTint:G_.neutral40,axisTick:G_.neutral70,axisTickMinor:G_.neutral60,axisLabel:G_.neutral70,axisSplitLine:G_.neutral15,axisMinorSplitLine:G_.neutral05}),G_)if(G_.hasOwnProperty(K_)){var q_=G_[K_];K_===`theme`?Y.darkColor.theme=G_.theme.slice():K_===`highlight`?Y.darkColor.highlight=`rgba(255,231,130,0.4)`:K_.indexOf(`accent`)===0?Y.darkColor[K_]=Gr(q_,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Y.darkColor[K_]=Gr(q_,null,function(e){return e*.9},function(e){return 1-e**1.5})}Y.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var J_=`line-height:1`;function Y_(e){var t=e.lineHeight;return t==null?J_:`line-height:`+Bh(t+``)+`px`}function X_(e,t){var n=e.color||Y.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Y.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Bh(r+``)+`px;color:`+Bh(n)+`;font-weight:`+Bh(i+``),valueStyle:`font-size:`+Bh(o+``)+`px;color:`+Bh(a)+`;font-weight:`+Bh(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Z_=[0,10,20,30],Q_=[``,`
7
+ `);for(var g=nn(c),_=0;_<u.length;_++){var v=u[_],y=new Cn;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:ln(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new wn)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new wn([y]))}}function On(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var kn=te(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function An(e){return!On(e)||!!kn[e]}function jn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=nn(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
8
+ `)c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;else{var m=cn(d,p.charCodeAt(0)),h=!r&&!An(p);(a.length?u+m>n:i+u+m>n)?u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m)):(u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p))}}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Mn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;q.set(Nn,fn(n,o,i),pn(r,s,a),o,s),q.intersect(t,Nn,null,Pn);var c=Pn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=fn(c.x,c.width,i,!0),e.baseY=pn(c.y,c.height,a,!0)}}var Nn=new q(0,0,0,0),Pn={outIntersectRect:{},clamp:!0};function Fn(e){return e==null?e=``:e+=``}function In(e){var t=Fn(e.text),n=e.font;return Ln(e,ln(nn(n),t),mn(n),null)}function Ln(e,t,n,r){var i=new q(fn(e.x||0,t,e.textAlign),pn(e.y||0,n,e.textBaseline),t,n),a=r??(Rn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Rn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var zn=st,Bn=5e-5;function Vn(e){return e>Bn||e<-Bn}var Hn=[],Un=[],Wn=ot(),Gn=Math.abs,Kn=function(){function e(){}return e.prototype.getLocalTransform=function(e){return qn(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Vn(this.rotation)||Vn(this.x)||Vn(this.y)||Vn(this.scaleX-1)||Vn(this.scaleY-1)||Vn(this.skewX)||Vn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=ot(),t?this.getLocalTransform(n):zn(n),e&&(t?lt(n,e,n):ct(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||ot(),pt(this.invTransform,n)):n&&(zn(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Hn);var n=Hn[0]<0?-1:1,r=Hn[1]<0?-1:1,i=((Hn[0]-n)*t+n)/Hn[0]||0,a=((Hn[1]-r)*t+r)/Hn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||ot(),lt(Un,e.invTransform,t),t=Un);var n=this.originX,r=this.originY;(n||r)&&(Wn[4]=n,Wn[5]=r,lt(Un,t,Wn),Un[4]-=n,Un[5]-=r,t=Un),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&kt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&kt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Gn(e[0]-1)>1e-10&&Gn(e[3]-1)>1e-10?Math.sqrt(Gn(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Xn(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&dt(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),qn=Kn.getLocalTransform;function Jn(){return new Kn}var Yn=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Xn(e,t){return A(e,t,Yn)}var Zn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zn.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zn.bounceIn(e*2)*.5:Zn.bounceOut(e*2-1)*.5+.5}},Qn=Math.pow,$n=Math.sqrt,er=1e-8,tr=1e-4,nr=$n(3),rr=1/3,ir=mt(),ar=mt(),or=mt();function sr(e){return e>-er&&e<er}function cr(e){return e>er||e<-er}function lr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ur(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sr(u)&&sr(d)){if(sr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$n(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qn(-y,rr):Qn(y,rr),b=b<0?-Qn(-b,rr):Qn(b,rr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$n(u*u*u)),S=Math.acos(x)/3,C=$n(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nr*Math.sin(S)))/(3*o),T=(-s+C*(w-nr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sr(o)){if(cr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sr(u))i[0]=-a/(2*o);else if(u>0){var d=$n(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function mr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ir[0]=c,ir[1]=l;for(var v=0;v<1;v+=.05)ar[0]=lr(e,n,i,o,v),ar[1]=lr(t,r,a,s,v),g=Dt(ir,ar),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<tr);y++)m=d-f,h=d+f,ar[0]=lr(e,n,i,o,m),ar[1]=lr(t,r,a,s,m),g=Dt(ar,ir),m>=0&&g<p?(d=m,p=g):(or[0]=lr(e,n,i,o,h),or[1]=lr(t,r,a,s,h),_=Dt(or,ir),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=lr(e,n,i,o,d),u[1]=lr(t,r,a,s,d)),$n(p)}function hr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=lr(e,n,i,o,m),g=lr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function gr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function _r(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function vr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(sr(a)){if(cr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$n(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function br(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ir[0]=o,ir[1]=s;for(var f=0;f<1;f+=.05){ar[0]=gr(e,n,i,f),ar[1]=gr(t,r,a,f);var p=Dt(ir,ar);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<tr);m++){var h=l-u,g=l+u;ar[0]=gr(e,n,i,h),ar[1]=gr(t,r,a,h);var p=Dt(ar,ir);if(h>=0&&p<d)l=h,d=p;else{or[0]=gr(e,n,i,g),or[1]=gr(t,r,a,g);var _=Dt(or,ir);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=gr(e,n,i,l),c[1]=gr(t,r,a,l)),$n(d)}function Sr(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=gr(e,n,i,f),m=gr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Cr=/cubic-bezier\(([0-9,\.e ]+)\)/;function wr(e){var t=e&&Cr.exec(e);if(t){var n=t[1].split(`,`),r=+ve(n[0]),i=+ve(n[1]),a=+ve(n[2]),o=+ve(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:dr(0,r,a,1,e,s)&&lr(0,i,o,1,s[0])}}}var Tr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ae,this.ondestroy=e.ondestroy||Ae,this.onrestart=e.onrestart||Ae,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused)this._pausedTime+=t;else{var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1}},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=V(e)?e:Zn[e]||wr(e)},e}(),Er={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Dr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Or(e){return e=Math.round(e),e<0?0:e>360?360:e}function kr(e){return e<0?0:e>1?1:e}function Ar(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Dr(parseFloat(t)/100*255):Dr(parseInt(t,10))}function jr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?kr(parseFloat(t)/100):kr(parseFloat(t))}function Mr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Nr(e,t,n){return e+(t-e)*n}function Pr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Fr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ir=new et(20),Lr=null;function Rr(e,t){Lr&&Fr(Lr,t),Lr=Ir.put(e,Lr||t.slice())}function zr(e,t){if(e){t||=[];var n=Ir.get(e);if(n)return Fr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Er)return Fr(t,Er[r]),Rr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Pr(t,0,0,0,1);return}return Pr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Rr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Pr(t,0,0,0,1);return}return Pr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Rr(e,t),t}}else{var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Pr(t,+l[0],+l[1],+l[2],1):Pr(t,0,0,0,1);u=jr(l.pop());case`rgb`:if(l.length>=3)return Pr(t,Ar(l[0]),Ar(l[1]),Ar(l[2]),l.length===3?u:jr(l[3])),Rr(e,t),t;Pr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Pr(t,0,0,0,1);return}return l[3]=jr(l[3]),Br(l,t),Rr(e,t),t;case`hsl`:if(l.length!==3){Pr(t,0,0,0,1);return}return Br(l,t),Rr(e,t),t;default:return}}Pr(t,0,0,0,1)}}}function Br(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=jr(e[1]),i=jr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Pr(t,Dr(Mr(o,a,n+1/3)*255),Dr(Mr(o,a,n)*255),Dr(Mr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Vr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Hr(e,t){var n=zr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return qr(n,n.length===4?`rgba`:`rgb`)}}function Ur(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Dr(Nr(o[0],s[0],c)),n[1]=Dr(Nr(o[1],s[1],c)),n[2]=Dr(Nr(o[2],s[2],c)),n[3]=kr(Nr(o[3],s[3],c)),n}}function Wr(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=zr(t[i]),s=zr(t[a]),c=r-i,l=qr([Dr(Nr(o[0],s[0],c)),Dr(Nr(o[1],s[1],c)),Dr(Nr(o[2],s[2],c)),kr(Nr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gr(e,t,n,r){var i=zr(e);if(e)return i=Vr(i),t!=null&&(i[0]=Or(V(t)?t(i[0]):t)),n!=null&&(i[1]=jr(V(n)?n(i[1]):n)),r!=null&&(i[2]=jr(V(r)?r(i[2]):r)),qr(Br(i),`rgba`)}function Kr(e,t){var n=zr(e);if(n&&t!=null)return n[3]=kr(t),qr(n,`rgba`)}function qr(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Jr(e,t){var n=zr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Yr=new et(100);function Xr(e){if(H(e)){var t=Yr.get(e);return t||(t=Hr(e,-.1),Yr.put(e,t)),t}if(ue(e)){var n=k({},e);return n.colorStops=I(e.colorStops,function(e){return{offset:e.offset,color:Hr(e.color,-.1)}}),n}return e}var Zr=Math.round;function Qr(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=zr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var $r=1e-4;function ei(e){return e<$r&&e>-$r}function ti(e){return Zr(e*1e3)/1e3}function ni(e){return Zr(e*1e4)/1e4}function ri(e){return`matrix(`+ti(e[0])+`,`+ti(e[1])+`,`+ti(e[2])+`,`+ti(e[3])+`,`+ni(e[4])+`,`+ni(e[5])+`)`}var ii={left:`start`,right:`end`,center:`middle`,middle:`middle`};function ai(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function oi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function si(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function ci(e){return e&&!!e.image}function li(e){return e&&!!e.svgElement}function ui(e){return ci(e)||li(e)}function di(e){return e.type===`linear`}function fi(e){return e.type===`radial`}function pi(e){return e&&(e.type===`linear`||e.type===`radial`)}function mi(e){return`url(#`+e+`)`}function hi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function gi(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*je,i=W(e.scaleX,1),a=W(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Zr(o*je)+`deg, `+Zr(s*je)+`deg)`),c.join(` `)}var _i=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),vi=Array.prototype.slice;function yi(e,t,n){return(t-e)*n+e}function bi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=yi(t[a],n[a],r);return e}function xi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=yi(t[o][s],n[o][s],r)}return e}function Si(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Ci(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function wi(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Ti(e,t,n){var r=e,i=t;if(r.push&&i.push){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:vi.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Ei(e){if(P(e)){var t=e.length;if(P(e[0])){for(var n=[],r=0;r<t;r++)n.push(vi.call(e[r]));return n}return vi.call(e)}return e}function Di(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Oi(e){return P(e&&e[0])?2:1}var ki=0,Ai=1,ji=2,Mi=3,Ni=4,Pi=5,Fi=6;function Ii(e){return e===Ni||e===Pi}function Li(e){return e===Ai||e===ji}var Ri=[0,0,0,0],zi=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Fi,s=t;if(P(t)){var c=Oi(t);o=c,(c===1&&!oe(t[0])||c===2&&!oe(t[0][0]))&&(a=!0)}else if(oe(t)&&!fe(t))o=ki;else if(H(t)){if(!isNaN(+t))o=ki;else{var l=zr(t);l&&(s=l,o=Mi)}}else if(ue(t)){var u=k({},s);u.colorStops=I(t.colorStops,function(e){return{offset:e.offset,color:zr(e.color)}}),di(t)?o=Ni:fi(t)&&(o=Pi),s=u}i===0?this.valType=o:(o!==this.valType||o===Fi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=V(n)?n:Zn[n]||wr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Li(r),c=Ii(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?Ti(d,f,r):c&&wi(d.colorStops,f.colorStops))}if(!o&&r!==Pi&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ki?n[l].additiveValue=n[l].value-p:r===Mi?n[l].additiveValue=Si([],n[l].value,p,-1):Li(r)&&(n[l].additiveValue=r===Ai?Si([],n[l].value,p,-1):Ci([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Mi,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ri:e[s];if((Li(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Li(i))i===Ai?bi(g,f[r],p[r],h):xi(g,f[r],p[r],h);else if(Ii(i)){var _=f[r],v=p[r],y=i===Ni;e[s]={type:y?`linear`:`radial`,x:yi(_.x,v.x,h),y:yi(_.y,v.y,h),colorStops:I(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:yi(e.offset,n.offset,h),color:Di(bi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=yi(_.x2,v.x2,h),e[s].y2=yi(_.y2,v.y2,h)):e[s].r=yi(_.r,v.r,h)}else if(c)bi(g,f[r],p[r],h),n||(e[s]=Di(g));else{var b=yi(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ki?e[n]=e[n]+r:t===Mi?(zr(e[n],Ri),Si(Ri,Ri,r,1),e[n]=Di(Ri)):t===Ai?Si(e[n],e[n],r,1):t===ji&&Ci(e[n],e[n],r,1)},e}(),Bi=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?E(`Can' use additive animation on looped animation.`):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,R(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new zi(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Mi&&c&&(c=Di(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Ei(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ei(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Tr({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return I(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Ei(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=R(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Vi=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Hi=1;Ne.hasGlobalWindow&&(Hi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ui=Hi,Wi=.4,Gi=`#333`,Ki=`#ccc`,qi=`#eee`,Ji=`__zr_normal__`,Yi=Yn.concat([`ignore`]),Xi=te(Yn,function(e,t){return e[t]=!0,e},{ignore:!1}),Zi={},Qi=new q(0,0,0,0),$i=[],ea=function(){function e(e){this.id=T(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=Qi,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Zi,n,d):gn(Zi,n,d),i.x=Zi.x,i.y=Zi.y,a=Zi.align,o=Zi.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=hn(f[0],d.width),m=hn(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new q(0,0,0,0);i.getLocalTransform($i),pt($i,$i),q.copy(_,d),_.applyTransform($i)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ki:Gi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&zr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,qr(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},k(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(U(e))for(var n=R(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Yi)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ji,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ji;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(M(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i)E(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ca(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ua(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=ca(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,ua(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=M(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=M(r,e),a=M(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];k(t,i),i.textConfig&&(n||={},k(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=k({},r?this.textConfig:n.textConfig),k(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Yi.length;l++){var u=Yi[l],d=i&&Xi[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Kn,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},k(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Bi(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=M(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){ta(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ta(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ta(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();N(ea,Vi),N(ea,Kn);function ta(e,t,n,r,i){n||={};var a=[];sa(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function na(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function ra(e){return P(e[0])}function ia(e,t,n){if(P(t[n])){if(P(e[n])||(e[n]=[]),ce(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),na(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(ra(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?na(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else na(a,i,o);a.length=i.length}}else e[n]=t[n]}function aa(e,t){return e===t||P(e)&&P(t)&&oa(e,t)}function oa(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function sa(e,t,n,r,i,a,o,s){for(var c=R(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!U(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(U(v)&&!P(v)&&!ue(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}sa(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=M(m,x);m.splice(S,1)}}if(i.force||(h=L(h,function(e){return!aa(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=Ei(n[_]),ia(n,r,_)}}var x=new Bi(n,!1,!1,d?L(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function ca(e,t,n,r){return!(n&&n.hoverLayer||r)||la(e)||t&&la(t)?0:1}function la(e){return e.type===`text`||e.type===`tspan`}function ua(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var da=`__zr_style_`+Math.round(Math.random()*10),fa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},pa={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fa[da]=!0;var ma=[`z`,`z2`,`invisible`],ha=[`invisible`],ga=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=R(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&ya(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new q(0,0,0,0),t?q.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new q(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:k(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return De(fa,e)},t.prototype.useStyle=function(e){e[da]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[da]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,ma)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l){if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=R(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=R(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l)}if(!c)for(var h=this.__inHover?ha:ma,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return k(e,t),e},t.prototype.getAnimationStyleProps=function(){return pa},t.initDefaultProps=(function(){var e=t.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}(ea),_a=new q(0,0,0,0),va=new q(0,0,0,0);function ya(e,t,n){return _a.copy(e.getBoundingRect()),e.transform&&_a.applyTransform(e.transform),va.width=t,va.height=n,!_a.intersect(va)}var ba=Math.min,xa=Math.max,Sa=Math.sin,Ca=Math.cos,wa=Math.PI*2,Ta=mt(),Ea=mt(),Da=mt();function Oa(e,t,n,r,i,a){i[0]=ba(e,n),i[1]=ba(t,r),a[0]=xa(e,n),a[1]=xa(t,r)}var ka=[],Aa=[];function ja(e,t,n,r,i,a,o,s,c,l){var u=fr,d=lr,f=u(e,n,i,o,ka);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,ka[p]);c[0]=ba(m,c[0]),l[0]=xa(m,l[0])}f=u(t,r,a,s,Aa);for(var p=0;p<f;p++){var h=d(t,r,a,s,Aa[p]);c[1]=ba(h,c[1]),l[1]=xa(h,l[1])}c[0]=ba(e,c[0]),l[0]=xa(e,l[0]),c[0]=ba(o,c[0]),l[0]=xa(o,l[0]),c[1]=ba(t,c[1]),l[1]=xa(t,l[1]),c[1]=ba(s,c[1]),l[1]=xa(s,l[1])}function Ma(e,t,n,r,i,a,o,s){var c=yr,l=gr,u=xa(ba(c(e,n,i),1),0),d=xa(ba(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=ba(e,i,f),o[1]=ba(t,a,p),s[0]=xa(e,i,f),s[1]=xa(t,a,p)}function Na(e,t,n,r,i,a,o,s,c){var l=At,u=jt,d=Math.abs(i-a);if(d%wa<1e-4&&d>1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(Ta[0]=Ca(i)*n+e,Ta[1]=Sa(i)*r+t,Ea[0]=Ca(a)*n+e,Ea[1]=Sa(a)*r+t,l(s,Ta,Ea),u(c,Ta,Ea),i%=wa,i<0&&(i+=wa),a%=wa,a<0&&(a+=wa),i>a&&!o?a+=wa:i<a&&o&&(i+=wa),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Da[0]=Ca(p)*n+e,Da[1]=Sa(p)*r+t,l(s,Da,s),u(c,Da,c))}}var Pa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Fa=[],Ia=[],La=[],Ra=[],za=[],Ba=[],Va=Math.min,Ha=Math.max,Ua=Math.cos,Wa=Math.sin,Ga=Math.abs,Ka=Math.PI,qa=Ka*2,Ja=typeof Float32Array<`u`,Ya=[];function Xa(e){return Math.round(e/Ka*1e8)/1e8%2*Ka}function Za(e,t){var n=Xa(e[0]);n<0&&(n+=qa);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=qa?i=n+qa:t&&n-i>=qa?i=n-qa:!t&&n>i?i=n+(qa-Xa(n-i)):t&&n<i&&(i=n-(qa-Xa(i-n))),e[0]=n,e[1]=i}var Qa=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=Ga(n/Ui/e)||0,this._uy=Ga(n/Ui/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Pa.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Ga(e-this._xi),r=Ga(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Pa.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Pa.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Pa.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Ya[0]=r,Ya[1]=i,Za(Ya,a),r=Ya[0],i=Ya[1];var o=i-r;return this.addData(Pa.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ua(i)*n+e,this._yi=Wa(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Pa.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Pa.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Ja&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(Ja&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Ja&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){La[0]=La[1]=za[0]=za[1]=Number.MAX_VALUE,Ra[0]=Ra[1]=Ba[0]=Ba[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case Pa.M:t=r=e[a++],n=i=e[a++],za[0]=r,za[1]=i,Ba[0]=r,Ba[1]=i;break;case Pa.L:Oa(t,n,e[a],e[a+1],za,Ba),t=e[a++],n=e[a++];break;case Pa.C:ja(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],za,Ba),t=e[a++],n=e[a++];break;case Pa.Q:Ma(t,n,e[a++],e[a++],e[a],e[a+1],za,Ba),t=e[a++],n=e[a++];break;case Pa.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=Ua(f)*u+c,i=Wa(f)*d+l),Na(c,l,u,d,f,p,m,za,Ba),t=Ua(p)*u+c,n=Wa(p)*d+l;break;case Pa.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Oa(r,i,r+h,i+g,za,Ba);break;case Pa.Z:t=r,n=i}At(La,La,za),jt(Ra,Ra,Ba)}return a===0&&(La[0]=La[1]=Ra[0]=Ra[1]=0),new q(La[0],La[1],Ra[0]-La[0],Ra[1]-La[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case Pa.M:i=o=e[d++],a=s=e[d++];break;case Pa.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Ga(_)>n||Ga(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Pa.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=hr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Pa.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Sr(i,a,y,b,h,g,10),i=h,a=g;break;case Pa.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Ua(D)*T+C,s=Wa(D)*E+w),m=Ha(T,E)*Va(qa,Math.abs(O)),i=Ua(k)*T+C,a=Wa(k)*E+w;break;case Pa.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Pa.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==Pa.L&&v>0&&(e.lineTo(y,b),v=0),S){case Pa.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Pa.L:u=n[x++],d=n[x++];var w=Ga(u-c),T=Ga(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Pa.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],ee=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pr(c,k,j,ee,D,Fa),pr(l,A,M,N,D,Ia),e.bezierCurveTo(Fa[1],Ia[1],Fa[2],Ia[2],Fa[3],Ia[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,ee,N),c=ee,l=N;break;case Pa.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,D,Fa),br(l,A,M,D,Ia),e.quadraticCurveTo(Fa[1],Ia[1],Fa[2],Ia[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Pa.A:var P=n[x++],F=n[x++],I=n[x++],te=n[x++],L=n[x++],ne=n[x++],R=n[x++],re=!n[x++],z=I>te?I:te,ie=Ga(I-te)>.001,B=L+ne,V=!1;if(f){var E=p[g++];h+E>_&&(B=L+ne*(_-h)/E,V=!0),h+=E}if(ie&&e.ellipse?e.ellipse(P,F,I,te,R,L,B,re):e.arc(P,F,z,L,B,re),V)break lo;C&&(o=Ua(L)*I+P,s=Wa(L)*te+F),c=Ua(B)*I+P,l=Wa(B)*te+F;break;case Pa.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var H=n[x++],ae=n[x++];if(f){var E=p[g++];if(h+E>_){var oe=_-h;e.moveTo(u,d),e.lineTo(u+Va(oe,H),d),oe-=H,oe>0&&e.lineTo(u+H,d+Va(oe,ae)),oe-=ae,oe>0&&e.lineTo(u+Ha(H-oe,0),d+ae),oe-=H,oe>0&&e.lineTo(u,d+Ha(ae-oe,0));break lo}h+=E}e.rect(u,d,H,ae);break;case Pa.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Pa,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function $a(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function eo(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:mr(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function to(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:xr(e,t,n,r,i,a,s,c,null)<=l/2}var no=Math.PI*2;function ro(e){return e%=no,e<0&&(e+=no),e}var io=Math.PI*2;function ao(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%io<1e-4)return!0;if(a){var d=r;r=ro(i),i=ro(d)}else r=ro(r),i=ro(i);r>i&&(i+=io);var f=Math.atan2(c,s);return f<0&&(f+=io),f>=r&&f<=i||f+io>=r&&f+io<=i}function oo(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var so=Qa.CMD,co=Math.PI*2,lo=1e-4;function uo(e,t){return Math.abs(e-t)<lo}var fo=[-1,-1,-1],po=[-1,-1];function mo(){var e=po[0];po[0]=po[1],po[1]=e}function ho(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;var u=dr(t,r,a,s,l,fo);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=fo[h],_=g===0||g===1?.5:1;lr(e,n,i,o,g)<c||(f<0&&(f=fr(t,r,a,s,po),po[1]<po[0]&&f>1&&mo(),p=lr(t,r,a,s,po[0]),f>1&&(m=lr(t,r,a,s,po[1]))),f===2?g<po[0]?d+=p<t?_:-_:g<po[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<po[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function go(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=vr(t,r,a,s,fo);if(c===0)return 0;var l=yr(t,r,a);if(l>=0&&l<=1){for(var u=0,d=gr(t,r,a,l),f=0;f<c;f++){var p=fo[f]===0||fo[f]===1?.5:1,m=gr(e,n,i,fo[f]);m<o||(fo[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=fo[0]===0||fo[0]===1?.5:1,m=gr(e,n,i,fo[0]);return m<o?0:a<t?p:-p}function _o(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);fo[0]=-c,fo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=co-1e-4){r=0,i=co;var u=a?1:-1;return o>=fo[0]+e&&o<=fo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=co,i+=co);for(var f=0,p=0;p<2;p++){var m=fo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=co+h),(h>=r&&h<=i||h+co>=r&&h+co<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function vo(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===so.M&&m>1&&(n||(s+=oo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case so.M:u=a[m++],d=a[m++],c=u,l=d;break;case so.L:if(n){if($a(c,l,a[m],a[m+1],t,r,i))return!0}else s+=oo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case so.C:if(n){if(eo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=ho(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case so.Q:if(n){if(to(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=go(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case so.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=oo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(ao(_,v,b,x,x+S,C,t,w,i))return!0}else s+=_o(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case so.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if($a(u,d,f,d,t,r,i)||$a(f,d,f,p,t,r,i)||$a(f,p,u,p,t,r,i)||$a(u,p,u,d,t,r,i))return!0}else s+=oo(f,d,f,p,r,i),s+=oo(u,p,u,d,r,i);break;case so.Z:if(n){if($a(c,l,u,d,t,r,i))return!0}else s+=oo(c,l,u,d,r,i);c=u,l=d}}return!n&&!uo(l,d)&&(s+=oo(c,l,u,d,r,i)||0),s!==0}function yo(e,t,n){return vo(e,0,!1,t,n)}function bo(e,t,n,r){return vo(e,t,!0,n,r)}var xo=j({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fa),So={style:j({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},pa.style)},Co=Yn.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),wo=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<Co.length;++s)i[Co[s]]=this[Co[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=R(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?k(this.style,o):this.useStyle(o):a===`shape`?k(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(H(e)){var t=Jr(e,0);return t>.5?Gi:t>.2?qi:Ki}if(e)return Ki}return Gi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(H(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Jr(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Qa(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),bo(a,o/s,e,t)))return!0}if(this.hasFill())return yo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:k(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return De(xo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=k({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=k({},r.shape),k(c,n.shape)):(c=k({},i?this.shape:r.shape),k(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=k({},this.shape);for(var l={},u=R(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return So},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){i(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return D(e.style)},n.prototype.getDefaultShape=function(){return D(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(ga),To=j({strokeFirst:!0,font:a,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},xo),Eo=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return Rn(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return De(To,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=In(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(ga);Eo.prototype.type=`tspan`;var Do=j({x:0,y:0},fa),Oo={style:j({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},pa.style)};function ko(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Ao=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return De(Do,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=ko(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return Oo},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new q(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(ga);Ao.prototype.type=`image`;function jo(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Mo=Math.round;function No(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s&&(Mo(r*2)===Mo(i*2)&&(e.x1=e.x2=Fo(r,s,!0)),Mo(a*2)===Mo(o*2)&&(e.y1=e.y2=Fo(a,s,!0))),e}}function Po(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s&&(e.x=Fo(r,s,!0),e.y=Fo(i,s,!0),e.width=Math.max(Fo(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Fo(i+o,s,!1)-e.y,o===0?0:1)),e}}function Fo(e,t,n){if(!t)return e;var r=Mo(e*2);return(r+Mo(t))%2==0?r/2:(r+(n?1:-1))/2}var Io=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Lo={},Ro=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Io},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Po(Lo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?jo(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(wo);Ro.prototype.type=`rect`;var zo={fill:`#000`},Bo=2,Vo={},Ho={style:j({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},pa.style)},Uo=function(e){i(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=zo,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Xo(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new q(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||zo},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return k(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=R(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},k(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Ho},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;Mn(Vo,r.overflowRect,i,a,o,s),i=Vo.baseX,a=Vo.baseY;var c=Sn(ts(e),e,Vo.outerWidth,Vo.outerHeight),l=ns(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=pn(a,c.contentHeight,s);if(l||n){var _=fn(i,f,o),v=pn(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=es(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=$o(`fill`in e?e.fill:(x=!0,r.fill)),C=Qo(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Bo,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Eo),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,Jo(D,e),g+=m,E.setBoundingRect(Ln(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;Mn(Vo,t.overflowRect,i,a,n,r),i=Vo.baseX,a=Vo.baseY;var o=En(ts(e),e,Vo.outerWidth,Vo.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=fn(i,c,n),f=pn(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;ns(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ns(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=es(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Eo),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=$o(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Qo(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Bo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=me(s.opacity,t.opacity,1),Jo(p,s),y&&(p.lineWidth=me(s.lineWidth,t.lineWidth,g),p.lineDash=W(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Ln(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Ro),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=W(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Ao),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=W(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=me(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Yo(e)&&(t=[e.fontStyle,e.fontWeight,qo(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ve(t)||e.textFont||e.font},t}(ga),Wo={left:!0,right:1,center:1},Go={top:1,bottom:1,middle:1},Ko=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function qo(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Jo(e,t){for(var n=0;n<Ko.length;n++){var r=Ko[n],i=t[r];i!=null&&(e[r]=i)}}function Yo(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Xo(e){return Zo(e),F(e.rich,Zo),e}function Zo(e){if(e){e.font=Uo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Wo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Go[n]?n:`top`,e.padding&&=ge(e.padding)}}function Qo(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function $o(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function es(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function ts(e){var t=e.text;return t!=null&&(t+=``),t}function ns(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var rs=1e-4,is=20;function as(e){return e.replace(/^\s+|\s+$/g,``)}var os=Math.min,ss=Math.max,cs=Math.abs,ls=Math.round,us=Math.floor,ds=Math.ceil,fs=Math.pow,ps=Math.log,ms=Math.LN10,hs=Math.PI,gs=Math.random;function _s(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var J=vs;function vs(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return ys(e,t,n)}function ys(e,t,n){return H(e)?xs(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function bs(e){return H(e)&&xs(e)}function xs(e){return!!as(e).match(/%$/)}function Ss(e,t,n){return isNaN(t)?n?``+e:+e:(t=os(ss(0,t),is),e=(+e).toFixed(t),n?e:+e)}function Cs(e){return e.sort(function(e,t){return e-t}),e}function ws(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(ls(e*t)/t===e)return n}return Ts(e)}function Ts(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ss(0,(a<0?0:i-1-a)-r)}function Es(e,t,n){var r=cs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ps(2*cs(n||1)*cs(r))/ms,a=ps(cs(t))/ms,o=ss(0,ds(-i+a));return isFinite(o)||(o=NaN),o}function Ds(e,t){var n=te(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=fs(10,t),i=I(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=I(i,function(e){return us(e)}),s=te(o,function(e,t){return e+t},0),c=I(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return I(o,function(e){return e/r})}function Os(e,t){var n=ss(ws(e),ws(t)),r=e+t;return n>is?r:Ss(r,n)}var ks=fs(2,53)-1;function As(e){var t=hs*2;return(e%t+t)%t}function js(e){return e>-rs&&e<rs}var Ms=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ns(e){if(e instanceof Date)return e;if(H(e)){var t=Ms.exec(e);if(!t)return/* @__PURE__ */ new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?/* @__PURE__ */ new Date(NaN):new Date(ls(e))}function Ps(e){return fs(10,Fs(e))}function Fs(e){if(e===0)return 0;var t=us(ps(e)/ms);return e/fs(10,t)>=10&&t++,t}function Is(e,t){var n=Fs(e),r=fs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Ss(e,-n)}function Ls(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function Rs(e){var t=parseFloat(e);return t==e&&(t!==0||!H(e)||e.indexOf(`x`)<=0)?t:NaN}function zs(e){return!isNaN(Rs(e))}function Bs(){return ls(gs()*9)}function Vs(e,t){return t===0?e:Vs(t,e%t)}function Hs(e,t){return e==null?t:t==null?e:e*t/Vs(e,t)}function Us(e){return e!=null&&isFinite(e)}var Ws=`[ECharts] `,Gs={},Ks=typeof console<`u`&&console.warn&&console.log;function qs(e,t,n){if(Ks){if(n){if(Gs[t])return;Gs[t]=!0}console[e](Ws+t)}}function Js(e,t){qs(`error`,e,t)}function Ys(e){throw Error(e)}function Xs(e,t,n){return(t-e)*n+e}var Zs=`series\0`,Qs=`\0_ec_\0`;function $s(e){return e instanceof Array?e:e==null?[]:[e]}function ec(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var tc=/* @__PURE__ */ `fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function nc(e){return U(e)&&!B(e)&&!(e instanceof Date)?e.value:e}function rc(e){return U(e)&&!(e instanceof Array)}function ic(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=G();F(t,function(e,n){U(e)||(t[n]=null)});var s=ac(e,o,n);return(r||i)&&oc(s,e,o,t),r&&sc(s,t),r||i?cc(s,t,i):a&&lc(s,t),uc(s),s}function ac(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||hc(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function oc(e,t,n,r){F(r,function(i,a){if(i&&i.id!=null){var o=fc(i.id),s=n.get(o);if(s!=null){var c=e[s];_e(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function sc(e,t){F(t,function(n,r){if(n&&n.name!=null)for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!hc(n)&&!hc(a)&&dc(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function cc(e,t,n){F(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||hc(r.existing)||r.existing&&t.id!=null&&!dc(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function lc(e,t){F(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function uc(e){var t=G();F(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),F(e,function(e){var n=e.newOption;_e(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),F(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(U(i)){if(a.name=i.name==null?r?r.name:Zs+n:fc(i.name),r)a.id=fc(r.id);else if(i.id!=null)a.id=fc(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function dc(e,t,n){var r=pc(t[e],null),i=pc(n[e],null);return r!=null&&i!=null&&r===i}function fc(e){return pc(e,``)}function pc(e,t){return e==null?t:H(e)?e:oe(e)||ae(e)?e+``:t}function mc(e){var t=e.name;return!!(t&&t.indexOf(Zs))}function hc(e){return e&&e.id!=null&&fc(e.id).indexOf(Qs)===0}function gc(e,t,n){F(e,function(e){var r=e.newOption;U(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=_c(t,r,e.existing,n))})}function _c(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function vc(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return B(t.dataIndex)?I(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return B(t.name)?I(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function yc(){var e=`__ec_inner_`+bc++;return function(t){return t[e]||(t[e]={})}}var bc=Bs();function xc(e,t,n){var r=Sc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=Tc(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Sc(e,t){var n;if(H(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=G(),a={},o=!1;return F(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`)a[n]=e;else{var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&M(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Cc={useDefault:!0,enableAll:!1,enableNone:!1},wc={useDefault:!1,enableAll:!0,enableNone:!0};function Tc(e,t,n,r){r||=Cc;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Ec(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Dc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Oc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function kc(e){return e===`auto`?Ne.domSupported?`html`:`richText`:e||`html`}function Ac(e,t){var n=G(),r=[];return F(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function jc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(oe(r)){var o=Xs(n||0,r,i);return Ss(o,a?Math.max(ws(n||0),ws(r)):t)}if(H(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Xs(p,m,i);s[d]=Ss(o,a?Math.max(ws(p),ws(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Mc(){return[1/0,-1/0]}function Nc(e,t){Lc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Pc(e,t){Lc(t)&&t<e[0]&&(e[0]=t)}function Fc(e,t){Lc(t)&&t>e[1]&&(e[1]=t)}function Ic(e,t){Rc(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Lc(e){return e!=null&&isFinite(e)}function Rc(e,t){return Lc(e)&&Lc(t)&&e<=t}function zc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Bc(e){Rc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Vc(){var e=`__ec_once_`+Hc++;return function(t,n){ke(t,e)||(t[e]=1,n())}}var Hc=Bs();function Uc(e,t,n){var r=G(),i=0;F(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Wc(e){return e.value+``}function Gc(e){return e+``}function Kc(e,t){return W(t,!0)?e.seriesIndex+2:0}function qc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Jc(e,t){return{seriesType:e,overallReset:t}}function Yc(e){return{overallReset:e}}var Xc=yc(),Zc=function(e,t,n,r){if(r){var i=Xc(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Xc(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Qc=`series`,$c=G([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),el=`original`,tl=`arrayRows`,nl=`objectRows`,rl=`keyedColumns`,il=`typedArray`,al=`unknown`,ol=`column`,sl=`Roam`,cl=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],ll=function(){function e(e){F(cl,function(t){this[t]=z(e[t],e)},this)}return e}();function ul(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var dl=1,fl={},pl=yc(),ml=yc(),hl=[`emphasis`,`blur`,`select`],gl=[`normal`,`emphasis`,`blur`,`select`],_l=`highlight`,vl=`downplay`,yl=`select`,bl=`unselect`,xl=`toggleSelect`,Sl=`selectchanged`;function Cl(e){return e!=null&&e!==`none`}function wl(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Tl(e){wl(e,`emphasis`,2)}function El(e){e.hoverState===2&&wl(e,`normal`,0)}function Dl(e){wl(e,`blur`,1)}function Ol(e){e.hoverState===1&&wl(e,`normal`,0)}function kl(e){e.selected=!0}function Al(e){e.selected=!1}function jl(e,t,n){t(e,n)}function Ml(e,t,n){jl(e,t,n),e.isGroup&&e.traverse(function(e){jl(e,t,n)})}function Nl(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Pl(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function Fl(e,t,n,r){var i=n&&M(n,`select`)>=0,a=!1;if(e instanceof wo){var o=pl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Cl(s)||Cl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=k({},r),l=k({},l),l.fill=s):!Cl(l.fill)&&Cl(s)?(a=!0,r=k({},r),l=k({},l),l.fill=Xr(s)):!Cl(l.stroke)&&Cl(c)&&(a||(r=k({},r),l=k({},l)),l.stroke=Xr(c)),r.style=l}}if(r&&r.z2==null){a||(r=k({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Il(e,t,n){if(n&&n.z2==null){n=k({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Ll(e,t,n){var r=M(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Pl(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=k({},n),o=k({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Rl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Fl(this,e,t,n);if(e===`blur`)return Ll(this,e,n);if(e===`select`)return Il(this,e,n)}return n}function zl(e){e.stateProxy=Rl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Rl),n&&(n.stateProxy=Rl)}function Bl(e,t){!Jl(e,t)&&!e.__highByOuter&&Ml(e,Tl)}function Vl(e,t){!Jl(e,t)&&!e.__highByOuter&&Ml(e,El)}function Hl(e,t){e.__highByOuter|=1<<(t||0),Ml(e,Tl)}function Ul(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Ml(e,El)}function Wl(e){Ml(e,Dl)}function Gl(e){Ml(e,Ol)}function Kl(e){Ml(e,kl)}function ql(e){Ml(e,Al)}function Jl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Yl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=ml(i),o=ul(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Ol(e)}),s&&n.push(i)),a.isBlured=!1}),F(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Xl(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Gl(r)}}if(e!=null&&t&&t!==`none`){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||Dl(e)}),P(t))a(e.getData(),t);else if(U(t))for(var u=R(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),ml(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function Zl(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){ml(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){Dl(e)})}}}function Ql(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=vc(i,t);a=(B(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=Xc(o);Xl(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Xl(r,u,d,n)}}}function $l(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if(Xc(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function eu(e,t,n){var r=Xc(e),i=$l(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Zl(r.componentMainType,r.componentIndex,n),F(a,function(e){return Bl(e,t)})):(Xl(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Zl(r.componentMainType,r.componentIndex,n),Bl(e,t))}function tu(e,t,n){Yl(n);var r=Xc(e),i=$l(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?F(i,function(e){return Vl(e,t)}):Vl(e,t)}function nu(e,t,n){if(hu(t)){var r=t.dataType,i=vc(e.getData(r),t);B(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function ru(e){F(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Kl(t):ql(t)})})}function iu(e){var t=[];return e.eachSeries(function(e){F(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function au(e,t,n){fu(e,!0),Ml(e,zl),cu(e,t,n)}function ou(e){fu(e,!1)}function su(e,t,n,r){r?ou(e):au(e,t,n)}function cu(e,t,n){var r=Xc(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var lu=[`emphasis`,`blur`,`select`],uu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function du(e,t,n,r){n||=`itemStyle`;for(var i=0;i<lu.length;i++){var a=lu[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[uu[n]]()}}function fu(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function pu(e){return!!(e&&e.__highDownDispatcher)}function mu(e){var t=fl[e];return t==null&&dl<=32&&(t=fl[e]=dl++),t}function hu(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function gu(e){var t=e.type;return t===`highlight`||t===`downplay`}function _u(e){var t=pl(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var vu=Qa.CMD,yu=[[],[],[]],bu=Math.sqrt,xu=Math.atan2;function Su(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=vu.M,d=vu.C,f=vu.L,p=vu.R,m=vu.A,h=vu.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:var g=t[4],_=t[5],v=bu(t[0]*t[0]+t[1]*t[1]),y=bu(t[2]*t[2]+t[3]*t[3]),b=xu(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],kt(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],kt(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=yu[c];x[0]=n[o++],x[1]=n[o++],kt(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Cu=Math.sqrt,wu=Math.sin,Tu=Math.cos,Eu=Math.PI;function Du(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ou(e,t){return(e[0]*t[0]+e[1]*t[1])/(Du(e)*Du(t))}function ku(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Ou(e,t))}function Au(e,t,n,r,i,a,o,s,c,l,u){var d=Eu/180*c,f=Tu(d)*(e-n)/2+wu(d)*(t-r)/2,p=-1*wu(d)*(e-n)/2+Tu(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Cu(m),s*=Cu(m));var h=(i===a?-1:1)*Cu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Tu(d)*g-wu(d)*_,y=(t+r)/2+wu(d)*g+Tu(d)*_,b=ku([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ku(x,S);if(Ou(x,S)<=-1&&(C=Eu),Ou(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Eu*1e6)/1e6;C=Eu*2+w%2*Eu}u.addData(l,v,y,o,s,b,C,d,a)}var ju=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Nu(e){var t=new Qa;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Qa.CMD,c=e.match(ju);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(Mu)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,Au(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,Au(w,T,n,r,S,C,y,b,x,f,t)}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var Pu=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(wo);function Fu(e){return e.setData!=null}function Iu(e,t){var n=Nu(e),r=k({},t);return r.buildPath=function(e){var t=Fu(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){Su(n,e),this.dirtyShape()},r}function Lu(e,t){return new Pu(Iu(e,t))}function Ru(e,t){var n=Iu(e,t);return function(e){i(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Pu)}function zu(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new wo(t);return o.createPathProxy(),o.buildPath=function(e){if(Fu(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Bu=function(e){i(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=M(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=M(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new q(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(q.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(ea);Bu.prototype.type=`group`;var Vu=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Hu=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Vu},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(wo);Hu.prototype.type=`circle`;var Uu=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Wu=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Uu},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()},t}(wo);Wu.prototype.type=`ellipse`;var Gu=Math.PI,Ku=Gu*2,qu=Math.sin,Ju=Math.cos,Yu=Math.acos,Xu=Math.atan2,Zu=Math.abs,Qu=Math.sqrt,$u=Math.max,ed=Math.min,td=1e-4;function nd(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<td))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function rd(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Qu(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Qu($u(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function id(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function ad(e,t){var n,r=$u(t.r,0),i=$u(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Zu(c-s),p=f>Ku&&f%Ku;if(p>td&&(f=p),!(r>td))e.moveTo(l,u);else if(f>Ku-td)e.moveTo(l+r*Ju(s),u+r*qu(s)),e.arc(l,u,r,s,c,!d),i>td&&(e.moveTo(l+i*Ju(c),u+i*qu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Ju(s),j=r*qu(s),M=i*Ju(c),ee=i*qu(c),N=f>td;if(N){var P=t.cornerRadius;P&&(n=id(P),m=n[0],h=n[1],g=n[2],_=n[3]);var F=Zu(r-i)/2;if(v=ed(F,g),y=ed(F,_),b=ed(F,m),x=ed(F,h),w=S=$u(v,y),T=C=$u(b,x),(S>td||C>td)&&(E=r*Ju(c),D=r*qu(c),O=i*Ju(s),k=i*qu(s),f<Gu)){var I=nd(A,j,O,k,E,D,M,ee);if(I){var te=A-I[0],L=j-I[1],ne=E-I[0],R=D-I[1],re=1/qu(Yu((te*ne+L*R)/(Qu(te*te+L*L)*Qu(ne*ne+R*R)))/2),z=Qu(I[0]*I[0]+I[1]*I[1]);w=ed(S,(r-z)/(re+1)),T=ed(C,(i-z)/(re-1))}}}if(!N)e.moveTo(l+A,u+j);else if(w>td){var ie=ed(g,w),B=ed(_,w),V=rd(O,k,A,j,r,ie,d),H=rd(E,D,M,ee,r,B,d);e.moveTo(l+V.cx+V.x0,u+V.cy+V.y0),w<S&&ie===B?e.arc(l+V.cx,u+V.cy,w,Xu(V.y0,V.x0),Xu(H.y0,H.x0),!d):(ie>0&&e.arc(l+V.cx,u+V.cy,ie,Xu(V.y0,V.x0),Xu(V.y1,V.x1),!d),e.arc(l,u,r,Xu(V.cy+V.y1,V.cx+V.x1),Xu(H.cy+H.y1,H.cx+H.x1),!d),B>0&&e.arc(l+H.cx,u+H.cy,B,Xu(H.y1,H.x1),Xu(H.y0,H.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>td)||!N)e.lineTo(l+M,u+ee);else if(T>td){var ie=ed(m,T),B=ed(h,T),V=rd(M,ee,E,D,i,-B,d),H=rd(A,j,O,k,i,-ie,d);e.lineTo(l+V.cx+V.x0,u+V.cy+V.y0),T<C&&ie===B?e.arc(l+V.cx,u+V.cy,T,Xu(V.y0,V.x0),Xu(H.y0,H.x0),!d):(B>0&&e.arc(l+V.cx,u+V.cy,B,Xu(V.y0,V.x0),Xu(V.y1,V.x1),!d),e.arc(l,u,i,Xu(V.cy+V.y1,V.cx+V.x1),Xu(H.cy+H.y1,H.cx+H.x1),d),ie>0&&e.arc(l+H.cx,u+H.cy,ie,Xu(H.y1,H.x1),Xu(H.y0,H.x0),!d))}else e.lineTo(l+M,u+ee),e.arc(l,u,i,c,s,d)}e.closePath()}}}var od=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),sd=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new od},t.prototype.buildPath=function(e,t){ad(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(wo);sd.prototype.type=`sector`;var cd=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),ld=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cd},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(wo);ld.prototype.type=`ring`;function ud(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)At(u,u,e[f]),jt(d,d,e[f]);At(u,u,r[0]),jt(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(gt(e[f]));continue}else c=e[f-1],l=e[f+1];yt(a,l,c),St(a,a,t);var h=wt(m,c),g=wt(m,l),_=h+g;_!==0&&(h/=_,g/=_),St(o,a,-h),St(s,a,g);var v=vt([],m,o),y=vt([],m,s);r&&(jt(v,v,u),At(v,v,d),jt(y,y,u),At(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function dd(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=ud(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var fd=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),pd=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new fd},t.prototype.buildPath=function(e,t){dd(e,t,!0)},t}(wo);pd.prototype.type=`polygon`;var md=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),hd=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new md},t.prototype.buildPath=function(e,t){dd(e,t,!1)},t}(wo);hd.prototype.type=`polyline`;var gd={},_d=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),vd=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new _d},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=No(gd,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(wo);vd.prototype.type=`line`;var yd=[],bd=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function xd(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?ur:lr)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ur:lr)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?_r:gr)(e.x1,e.cpx1,e.x2,t),(n?_r:gr)(e.y1,e.cpy1,e.y2,t)]}var Sd=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new bd},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(br(n,o,i,u,yd),o=yd[1],i=yd[2],br(r,s,a,u,yd),s=yd[1],a=yd[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(pr(n,o,c,i,u,yd),o=yd[1],c=yd[2],i=yd[3],pr(r,s,l,a,u,yd),s=yd[1],l=yd[2],a=yd[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return xd(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=xd(this.shape,e,!0);return Ct(t,t)},t}(wo);Sd.prototype.type=`bezier-curve`;var Cd=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),wd=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Cd},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)},t}(wo);wd.prototype.type=`arc`;var Td=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),wo.prototype.getBoundingRect.call(this)},t}(wo),Ed=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Dd=function(e){i(t,e);function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return t}(Ed),Od=function(e){i(t,e);function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return t}(Ed),kd=Math.min,Ad=Math.max,jd=Math.abs,Md=[0,0],Nd=[0,0],Pd=tn(),Fd=Pd.minTv,Id=Pd.maxTv,Ld=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new K;for(var n=0;n<2;n++)this._axes[n]=new K;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var c=0;c<4;c++)n[c].transform(t);K.sub(r[0],n[1],n[0]),K.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&K.set(t,0,0),Pd.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Pd.negativeSize&&K.copy(t,r?Pd.useDir?Pd.dirMinTv:Fd:Id),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,Md),e._getProjMinMaxOnAxis(a,t._corners,Nd),Pd.negativeSize||Md[1]<Nd[0]||Md[0]>Nd[1]){if(i=!1,Pd.negativeSize||n)return i;var s=jd(Nd[0]-Md[1]),c=jd(Md[0]-Nd[1]);kd(s,c)>Id.len()&&(s<c?K.scale(Id,o,-s*r):K.scale(Id,o,c*r))}else if(!n){var s=jd(Nd[0]-Md[1]),c=jd(Md[0]-Nd[1]);(Pd.useDir||kd(s,c)<Fd.len())&&((s<c||!Pd.bidirectional)&&(K.scale(Fd,o,s*r),Pd.useDir&&Pd.calcDirMTV()),(s>=c||!Pd.bidirectional)&&(K.scale(Fd,o,-c*r),Pd.useDir&&Pd.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=kd(l,o),s=Ad(l,s)}n[0]=o+Pd.touchThreshold,n[1]=s-Pd.touchThreshold,Pd.negativeSize=n[1]<n[0]},e}(),Rd=[],zd=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new q(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Rd)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(ga),Bd=yc();function Vd(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=W(r.duration,200),u=W(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),V(d)&&(d=d(n,i)),V(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Hd(e,t,n,r,i,a,o){var s=!1,c;V(i)?(o=a,a=i,i=null):U(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=Vd(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Ud(e,t,n,r,i,a){Hd(`update`,e,t,n,r,i,a)}function Wd(e,t,n,r,i,a){Hd(`enter`,e,t,n,r,i,a)}function Gd(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function Kd(e,t,n,r,i,a){Gd(e)||Hd(`leave`,e,t,n,r,i,a)}function qd(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Kd(e,{style:{opacity:0}},t,n,r)}function Jd(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||qd(e,t,n,r)}):qd(e,t,n,r)}function Yd(e){Bd(e).oldStyle=e.style}var Xd=/* @__PURE__ */ t({Arc:()=>wd,BezierCurve:()=>Sd,BoundingRect:()=>q,Circle:()=>Hu,CompoundPath:()=>Td,Ellipse:()=>Wu,Group:()=>Bu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Ao,IncrementalDisplayable:()=>zd,Line:()=>vd,LinearGradient:()=>Dd,OrientedBoundingRect:()=>Ld,Path:()=>wo,Point:()=>K,Polygon:()=>pd,Polyline:()=>hd,RadialGradient:()=>Od,Rect:()=>Ro,Ring:()=>ld,Sector:()=>sd,Text:()=>Uo,WH:()=>$d,XY:()=>Qd,applyTransform:()=>hf,calcZ2Range:()=>Rf,clipPointsByRect:()=>bf,clipRectByRect:()=>xf,createIcon:()=>Sf,decomposeTransform:()=>Hf,ensureCopyRect:()=>Ff,ensureCopyTransform:()=>If,expandOrShrinkRect:()=>Df,extendPath:()=>nf,extendShape:()=>ef,getCurrentCanvasPainter:()=>Wf,getShapeClass:()=>af,getTransform:()=>mf,groupTransition:()=>yf,initProps:()=>Wd,isBoundingRectAxisAligned:()=>Nf,isElementRemoved:()=>Gd,lineLineIntersect:()=>wf,linePolygonIntersect:()=>Cf,makeImage:()=>sf,makePath:()=>of,mergePath:()=>lf,payloadDisableAnimation:()=>Vf,registerShape:()=>rf,removeElement:()=>Kd,removeElementWithFadeOut:()=>Jd,resizePath:()=>uf,retrieveZInfo:()=>Lf,setTooltipConfig:()=>Af,subPixelOptimize:()=>pf,subPixelOptimizeLine:()=>df,subPixelOptimizeRect:()=>ff,transformDirection:()=>gf,traverseElements:()=>Mf,traverseUpdateZ:()=>zf,updateProps:()=>Ud}),Zd={},Qd=[`x`,`y`],$d=[`width`,`height`];function ef(e){return wo.extend(e)}var tf=Ru;function nf(e,t){return tf(e,t)}function rf(e,t){Zd[e]=t}function af(e){if(Zd.hasOwnProperty(e))return Zd[e]}function of(e,t,n,r){var i=Lu(e,t);return n&&(r===`center`&&(n=cf(n,i.getBoundingRect())),uf(i,n)),i}function sf(e,t,n){var r=new Ao({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(cf(t,i))}}});return r}function cf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var lf=zu;function uf(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function df(e,t){return No(e,e,{lineWidth:t}),e}function ff(e,t){return Po(e,e,t),e}var pf=Fo;function mf(e,t){for(var n=st([]);e&&e!==t;)lt(n,e.getLocalTransform(),n),e=e.parent;return n}function hf(e,t,n){return t&&!P(t)&&(t=Kn.getLocalTransform(t)),n&&(t=pt([],t)),kt([],e,t)}function gf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:cs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:cs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=hf(a,t,n),cs(a[0])>cs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function _f(e){return!e.isGroup}function vf(e){return e.shape!=null}function yf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){_f(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return vf(e)&&(t.shape=D(e.shape)),t}var a=r(e);t.traverse(function(e){if(_f(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Ud(e,r,n,Xc(e).dataIndex)}}})}function bf(e,t){return I(e,function(e){var n=e[0];n=ss(n,t.x),n=os(n,t.x+t.width);var r=e[1];return r=ss(r,t.y),r=os(r,t.y+t.height),[n,r]})}function xf(e,t){var n=ss(e.x,t.x),r=os(e.x+e.width,t.x+t.width),i=ss(e.y,t.y),a=os(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function Sf(e,t,n){var r=k({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),j(i,n),new Ao(r)):of(e.replace(`path://`,``),r,n,`center`)}function Cf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(wf(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function wf(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Tf(u,d,c,l);if(Ef(f))return!1;var p=e-i,m=t-a,h=Tf(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Tf(p,m,u,d)/f;return!(g<0||g>1)}function Tf(e,t,n,r){return e*r-n*t}function Ef(e){return e<=1e-6&&e>=-1e-6}function Df(e,t,n,r,i){return t==null||(oe(t)?Of[0]=Of[1]=Of[2]=Of[3]=t:(Of[0]=t[0],Of[1]=t[1],Of[2]=t[2],Of[3]=t[3]),r&&(Of[0]=ss(0,Of[0]),Of[1]=ss(0,Of[1]),Of[2]=ss(0,Of[2]),Of[3]=ss(0,Of[3])),n&&(Of[0]=-Of[0],Of[1]=-Of[1],Of[2]=-Of[2],Of[3]=-Of[3]),kf(e,Of,`x`,`width`,3,1,i&&i[0]||0),kf(e,Of,`y`,`height`,0,2,i&&i[1]||0)),e}var Of=[0,0,0,0];function kf(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ss(0,os(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:cs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Af(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=H(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&F(R(c),function(e){ke(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Xc(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:j({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function jf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Mf(e,t){if(e){if(B(e))for(var n=0;n<e.length;n++)jf(e[n],t);else jf(e,t)}}function Nf(e){return!e||cs(e[1])<Pf&&cs(e[2])<Pf||cs(e[0])<Pf&&cs(e[3])<Pf}var Pf=1e-5;function Ff(e,t){return e?q.copy(e,t):t.clone()}function If(e,t){return t?ct(e||ot(),t):void 0}function Lf(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Rf(e){var t=-1/0,n=1/0;jf(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(e&&!e.isGroup){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function zf(e,t,n){Bf(e,t,n,-1/0)}function Bf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=ss(Bf(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=ss(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function Vf(e){return e.animation={duration:0},e}function Hf(e,t){return t?ct(Uf.transform,t):st(Uf.transform),Uf.decomposeTransform(),Xn(e,Uf),e}var Uf=new Kn;Uf.transform=ot();function Wf(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}rf(`circle`,Hu),rf(`ellipse`,Wu),rf(`sector`,sd),rf(`ring`,ld),rf(`polygon`,pd),rf(`polyline`,hd),rf(`rect`,Ro),rf(`line`,vd),rf(`bezierCurve`,Sd),rf(`arc`,wd);var Gf={};function Kf(e,t){for(var n=0;n<hl.length;n++){var r=hl[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function qf(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s??=V(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<hl.length;l++){var u=hl[l],d=t[u];c[u]=W(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Jf(e,t,n,r){n||=Gf;for(var i=e instanceof Uo,a=!1,o=0;o<gl.length;o++){var s=t[gl[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Uo,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=qf(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Xf(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Zf(u,n,!1));for(var o=0;o<hl.length;o++){var p=hl[o],s=t[p];if(s){var m=c.ensureState(p),h=!!W(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Xf(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Zf(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(ap(c).setLabelText=function(e){var r=qf(n,t,e);Kf(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Yf(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<hl.length;r++){var i=hl[r];n[i]=e.getModel([i,t])}return n}function Xf(e,t,n,r,i){var a={};return Qf(a,e,n,r,i),t&&k(a,t),a}function Zf(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=W(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function Qf(e,t,n,r,i){n||=Gf;var a=t.ecModel,o=a&&a.option.textStyle,s=$f(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=W(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);rp(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=oe(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=cp.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=ge(_),h.__marginType=cp.textMargin)}rp(e,t,o,null,null,n,r,i,!0,!1)}function $f(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Gf).rich;if(n){t||={};for(var r=R(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var ep=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],tp=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],np=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function rp(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Gf;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=W(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=W(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=W(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=W(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<ep.length;_++){var v=ep[_],y=i!==!1&&r?me(t.getShallow(v),r.getShallow(v),n[v]):W(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<tp.length;_++){var v=tp[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<np.length;_++){var v=np[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function ip(e,t){var n=t&&t.getModel(`textStyle`);return ve([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}var ap=yc();function op(e,t,n,r){if(e){var i=ap(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}function sp(e,t,n,r,i){var a=ap(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=W(a.interpolatedValue,a.prevValue),c=a.value;function l(r){var l=jc(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,Kf(e,qf({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?Wd:Ud)(e,{percent:1},r,t,null,l)}var cp={minMargin:1,textMargin:2},lp=[`textStyle`,`color`],up=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],dp=new Uo,fp=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(lp):null)},e.prototype.getFont=function(){return ip({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<up.length;n++)t[up[n]]=this.getShallow(up[n]);return dp.useStyle(t),dp.update(),dp.getBoundingRect()},e}(),pp=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],mp=Ye(pp),hp=function(){function e(){}return e.prototype.getLineStyle=function(e){return mp(this,e)},e}(),gp=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],_p=Ye(gp),vp=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return _p(this,e,t)},e}(),yp=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){O(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(D(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Ne.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Ve(yp),Ge(yp),N(yp,hp),N(yp,vp),N(yp,Ze),N(yp,fp);function bp(e){return e==null?0:e.length||1}function xp(e){return e}var Sp=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||xp,this._newKeyGetter=r||xp,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=bp(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=bp(c),d=bp(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=bp(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=bp(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Cp={Must:1,Might:2,Not:3},wp=yc();function Tp(e){wp(e).datasetMap=G()}function Ep(e,t,n){var r={},i=Op(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=wp(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),F(e,function(t,n){var i=U(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});F(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function Dp(e,t,n){var r={};if(!Op(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&F(a,function(e,t){(U(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=jp(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Cp.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Cp.Not)&&(e.n=c),f(e)&&s[e.n]!==Cp.Not)return e;d||(u===Cp.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function Op(e){if(!e.get(`data`,!0))return Tc(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Cc).models[0]}function kp(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Tc(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Cc).models}function Ap(e,t){return jp(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function jp(e,t,n,r,i,a){var o,s=5;if(ce(e))return Cp.Not;var c,l;if(r){var u=r[a];U(u)?(c=u.name,l=u.type):H(u)&&(c=u)}if(l!=null)return l===`ordinal`?Cp.Must:Cp.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return Cp.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return Cp.Not;var f=_[c];if(!f||ce(f))return Cp.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=nc(g);if(!B(y))return Cp.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=H(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?Cp.Might:Cp.Not;if(t&&e!==`-`)return Cp.Must}return Cp.Not}var Mp=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&Ap(this,n)===Cp.Must&&(r.type=`ordinal`)}}return e}();function Np(e){return e instanceof Mp}function Pp(e,t,n){n||=Lp(e);var r=t.seriesLayoutBy,i=Rp(e,n,r,t.sourceHeader,t.dimensions);return new Mp({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:D(t)})}function Fp(e){return new Mp({data:e,sourceFormat:ce(e)?il:el})}function Ip(e){return new Mp({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:D(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Lp(e){var t=al;if(ce(e))t=il;else if(B(e)){e.length===0&&(t=tl);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(B(i)||ce(i)){t=tl;break}if(U(i)){t=nl;break}}}}else if(U(e)){for(var a in e)if(ke(e,a)&&P(e[a])){t=rl;break}}return t}function Rp(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Bp(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Vp(function(e){e!=null&&e!==`-`&&(H(e)?o??=1:o=0)},n,s,10):o=oe(r)?r:+!!r,!i&&o===1&&(i=[],Vp(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=zp(e);else if(t===`keyedColumns`)i||(i=[],F(e,function(e,t){i.push(t)}));else if(t===`original`){var c=nc(e[0]);a=B(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Bp(i),dimensionsDetectedCount:a}}function zp(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return R(n)}function Bp(e){if(e){var t=G();return I(e,function(e,n){e=U(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function Vp(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function Hp(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Up,Wp,Gp,Kp,qp,Jp,Yp=function(){function e(e,t){var n=Np(e)?e:Fp(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),Jp(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Jp=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=qp[om(o,s)];k(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=z($p(o,s),null,i,c,l),e.count=z(nm(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};qp=(e={},e[tl+`_`+ol]={pure:!0,appendData:i},e[tl+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[nl]={pure:!0,appendData:i},e[rl]={pure:!0,appendData:function(e){var t=this._data;F(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[el]={appendData:i},e[il]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),Xp=function(e){B(e)||Js(`series.data or dataset.source must be an array.`)};Up={},Up[tl+`_`+ol]=Xp,Up[tl+`_row`]=Xp,Up[nl]=Xp,Up[rl]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Js(`dimension name must not be null/undefined.`)},Up[el]=Xp;var Zp=function(e,t,n,r){return e[r]},Qp=(Wp={},Wp[tl+`_`+ol]=function(e,t,n,r){return e[r+t]},Wp[tl+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},Wp[nl]=Zp,Wp[rl]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},Wp[el]=Zp,Wp);function $p(e,t){return Qp[om(e,t)]}var em=function(e,t,n){return e.length},tm=(Gp={},Gp[tl+`_`+ol]=function(e,t,n){return Math.max(0,e.length-t)},Gp[tl+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Gp[nl]=em,Gp[rl]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Gp[el]=em,Gp);function nm(e,t){return tm[om(e,t)]}var rm=function(e,t,n){return e[t]},im=(Kp={},Kp[tl]=rm,Kp[nl]=function(e,t,n){return e[n]},Kp[rl]=rm,Kp[el]=function(e,t,n){var r=nc(e);return r instanceof Array?r[t]:r},Kp[il]=rm,Kp);function am(e){return im[e]}function om(e,t){return e===`arrayRows`?e+`_`+t:e}function sm(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return am(a)(r,o,s)}var c=r;return a===`original`&&(c=nc(r)),c}}}var cm=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function lm(e,t){var n={},r=n.encode={},i=G(),a=[],o=[],s={};F(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;um(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),fm(n.type)&&(a[0]=t),um(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}$c.each(function(e,t){var i=um(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=I(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new cm(s,t),n}function um(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function dm(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function fm(e){return e!==`ordinal`&&e!==`time`}var pm=function(){function e(e){this.otherDims={},e!=null&&k(this,e)}return e}();function mm(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!oe(e)&&e!=null&&e!==`-`&&(e=+Ns(e)),e==null||e===``?NaN:Number(e))}G({number:function(e){return parseFloat(e)},time:function(e){return+Ns(e)},trim:function(e){return H(e)?ve(e):e}});var hm={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function e(e,t){oe(t)||Ys(``),this._opFn=hm[e],this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){return oe(e)?this._opFn(e,this._rvalFloat):this._opFn(Rs(e),this._rvalFloat)},e})();var gm=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=oe(e)?e:Rs(e),r=oe(t)?t:Rs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=H(e),s=H(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Rs(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function _m(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function vm(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var ym=typeof Uint32Array>`u`?Array:Uint32Array,bm=typeof Uint16Array>`u`?Array:Uint16Array,xm=typeof Int32Array>`u`?Array:Int32Array,Sm=typeof Float64Array>`u`?Array:Float64Array,Cm={float:Sm,int:xm,ordinal:Array,number:Array,time:Sm},wm;function Tm(e){return e>65535?ym:bm}function Em(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Dm(e,t,n,r,i){var a=Cm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var Om=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=G()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=wm[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Hp(r),this._dimensions=I(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Cm[t||`float`](this._rawCount),this._rawExtent[i]=Mc(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=Mc());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];Dm(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=wm.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=I(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=Mc()),Dm(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),Cs(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=Tm(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(Tm(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=R(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Tm(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=Mc();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Tm(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)?(T++,w<0&&(w=v)):(l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v))}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(Tm(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=Mc(),d=new(Tm(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++){var h=this.getRawIndex(p+m);o[m]=c[h]}var g=n(o),_=this.getRawIndex(Math.min(p+r(o,g)||0,l-1));c[_]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=Mc();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=_m(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||vm(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&te(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Em(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=D(this._extent),e._rawExtent=D(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return mm(e[r],this._dimensions[r])}wm={arrayRows:e,objectRows:function(e,t,n,r){return mm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return mm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),km=yc(),Am={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},jm=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Pm(this.source))},e.prototype.getSourceDimensionIndex=function(e){return W(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Hp(this.source),n=!Fm(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),!t||s==null||u&&u.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=Am[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Mm(e){return e instanceof jm}function Nm(e){for(var t=G(),n=0;n<(e||[]).length;n++){var r=e[n],i=U(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Pm(e){var t=km(e);return t.dimNameMap||=Nm(e.dimensionsDefine)}function Fm(e){return e>30}var Im=U,Lm=I,Rm=typeof Int32Array>`u`?Array:Int32Array,zm=`e\0\0`,Bm=-1,Vm=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Hm=[`_approximateExtent`],Um,Wm,Gm,Km,qm,Jm,Ym,Xm=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Mm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=H(u)?new pm({name:u}):u instanceof pm?u:new pm(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=G();F(a,function(e){m.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(oe(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof Om&&(i=e),!i){var a=this.dimensions,o=Np(e)||P(e)?new Yp(e,a.length):e;i=new Om;var s=Lm(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=lm(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&Ym(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&rc(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=pc(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=pc(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Ym(this,o);Um(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Im(e)?k(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Gm(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Wm(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return B(e)?r.getValues(Lm(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?Bm:r},e.prototype.each=function(e,t,n){V(e)&&(n=t,t=e,e=[]);var r=n||this,i=Lm(Km(e),this._getStoreDimIndex,this);this._store.each(i,r?z(t,r):t)},e.prototype.filterSelf=function(e,t,n){V(e)&&(n=t,t=e,e=[]);var r=n||this,i=Lm(Km(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?z(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=R(e),i=[];return F(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){V(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=Lm(Km(e),this._getStoreDimIndex,this),o=Jm(this);return o._store=this._store.map(a,i?z(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=Lm(Km(e),this._getStoreDimIndex,this);this._store.modify(a,i?z(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Jm(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Jm(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Jm(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new yp(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Sp(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Wm(e,t)},function(e){return Wm(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Im(e)?k(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():Im(i)&&(i=k({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Im(t)?k(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Im(e)?k(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?k(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Zc(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){F(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Lm(this.dimensions,this._getDimInfo,this),this.hostModel),qm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];V(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(he(arguments)))})},e.internalField=function(){Um=function(e){var t=e._invertedIndicesMap;F(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Rm(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Bm;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Gm=function(e,t,n){return pc(e._getCategory(t,n),null)},Wm=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Gm(e,e._idDimIdx,t)),n??=zm+t,n},Km=function(e){return B(e)||(e=e==null?[]:[e]),e},Jm=function(t){var n=new e(t._schema?t._schema:Lm(t.dimensions,t._getDimInfo,t),t.hostModel);return qm(n,t),n},qm=function(e,t){F(Vm.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,F(Hm,function(n){e[n]=D(t[n])}),e._calculationInfo=k({},t._calculationInfo)},Ym=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=Gm(e,i,t)),s==null&&a!=null&&(r[t]=s=Gm(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Zm(e,t){Np(e)||(e=Fp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=G(),a=[],o=Qm(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Fm(o),c=r===e.dimensionsDefine,l=c?Pm(e):Nm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=G(u),f=new xm(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=U(n)?n:{name:n},o=new pm,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=$s(e).slice();if(n.length===1&&!H(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);F(n,function(e,n){var i=H(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})}});var h=0;F(n,function(e){var t,n,r,i;if(H(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=k({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=$s(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}F(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(j(o,i),t,a),o.name==null&&n){var s=n[a];!U(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&j(o.otherDims,r)})}});function g(e,t,n){$c.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)F(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=$m(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Ap(e,S)===Cp.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Uc(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new jm({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Qm(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return F(t,function(e){var t;U(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function $m(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var eh={},th={},nh=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(eh,!0),this._normalMasterList=n(th,!1);function n(n,r){var i=[];return F(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){F(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){e===`matrix`||e===`calendar`?eh[e]=t:th[e]=t},e.get=function(e){return th[e]||eh[e]},e}();function rh(e){return!!eh[e]}function ih(e){ah.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var ah=G();function oh(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ah.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function sh(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!rh(n)&&(i=0))}return{coordSysType:n,kind:i}}function ch(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=sh(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var lh=function(e,t){var n=t.getReferringComponents(e,Cc).models[0];return n&&n.coordinateSystem},uh=function(){function e(e){this.coordSysDims=[],this.axisMap=G(),this.categoryAxisMap=G(),this.coordSysName=e}return e}();function dh(e){var t=e.get(`coordinateSystem`),n=new uh(t),r=fh[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var fh={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Cc).models[0],a=e.getReferringComponents(`yAxis`,Cc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),ph(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),ph(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Cc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),ph(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Cc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),ph(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),ph(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();F(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),ph(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Cc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function ph(e){return e.get(`type`)===`category`}function mh(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;hh(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(F(a,function(e,t){H(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),F(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),u||!m(e)||p&&(e.coordDim===`x`||e.coordDim===`angle`)||i&&i!==e.coordDim||(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;F(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function hh(e){return!Mm(e.schema)}function gh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function _h(e,t){return gh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function vh(e,t){var n=e.get(`coordinateSystem`),r=nh.get(n),i;return t&&t.coordSysDims&&(i=I(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=dm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function yh(e,t,n){var r,i;return n&&F(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function bh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Fp(e)):(i=r.getSource(),a=i.sourceFormat===el);var o=dh(t),s=vh(t,o),c=n.useEncodeDefaulter,l=V(c)?c:c?ie(Ep,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Zm(i,u),f=yh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=mh(t,{schema:d,store:p}),h=new Xm(d,t);h.setCalculationInfo(m);var g=f!=null&&xh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function xh(e){if(e.sourceFormat===`original`)return!B(nc(Sh(e.data||[])))}function Sh(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Ch=Math.round(Math.random()*10);function wh(e){return[e||``,Ch++].join(`_`)}function Th(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Re(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=Re(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Eh(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(F(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),F(u.successor,d?p:f)}F(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return F(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),F(c,function(e){M(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);M(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){var n=[];return F(e,function(e){M(t,e)>=0&&n.push(e)}),n}}function Dh(e,t){return O(O({},e,!0),t,!0)}var Oh=Math.log(2);function kh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Oh);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*kh(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Ah(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=kh(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*kh(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var jh=`___zrEVENTSAVED`,Mh=[];function Nh(e,t,n,r,i){return Fh(Mh,t,r,i,!0)&&Fh(e,n,Mh[0],Mh[1])}function Ph(e,t){e&&n(e),t&&n(t);function n(e){var t=e[jh];t&&(t.clearMarkers&&t.clearMarkers(),delete e[jh])}}function Fh(e,t,n,r,i){if(t.getBoundingClientRect&&Ne.domSupported&&!Rh(t)){var a=t[jh]||(t[jh]={}),o=Lh(Ih(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Ih(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){F(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Lh(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ah(s,o):Ah(o,s))}function Rh(e){return e.nodeName.toUpperCase()===`CANVAS`}var zh=/([&<>"'])/g,Bh={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Vh(e){return e==null?``:(e+``).replace(zh,function(e,t){return Bh[t]})}var Hh={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Uh={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Wh=`ZH`,Gh=`EN`,Kh=Gh,qh={},Jh={},Yh=Ne.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Kh).toUpperCase().indexOf(Wh)>-1?Wh:Kh}():Kh;function Xh(e,t){e=e.toUpperCase(),Jh[e]=new yp(t),qh[e]=t}function Zh(e){if(H(e)){var t=qh[e.toUpperCase()]||{};return e===Wh||e===Gh?D(t):O(D(t),D(qh[Kh]),!1)}return O(D(e),D(qh[Kh]),!1)}function Qh(e){return Jh[e]}function $h(){return Jh[Kh]}Xh(Gh,Hh),Xh(Wh,Uh);var eg=null;function tg(e){eg||=e}function ng(){return eg}function rg(e,t){var n=ng(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function ig(e){var t=e.brk;return t?t.breaks:[]}function ag(e){var t=e.brk;return t?t.hasBreaks():!1}var og=1e3,sg=og*60,cg=sg*60,lg=cg*24,ug=lg*365,dg={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},fg={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},pg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,mg=`{yyyy}-{MM}-{dd}`,hg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:mg,hour:mg+` `+fg.hour,minute:mg+` `+fg.minute,second:mg+` `+fg.second,millisecond:pg},gg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],_g=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function vg(e){return!H(e)&&!V(e)?yg(e):e}function yg(e){e||={};var t={},n=!0;return F(gg,function(t){n&&=e[t]==null}),F(gg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=gg[s],l=U(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):H(l)?(o=l,u=[o]):(o==null?o=fg[r]:dg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function bg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function xg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Sg(e){return e===xg(e)}function Cg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function wg(e,t,n,r){var i=Ns(e),a=i[Og(n)](),o=i[kg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[Ag(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[jg(n)](),d=(u-1)%12+1,f=i[Mg(n)](),p=i[Ng(n)](),m=i[Pg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof yp?r:Qh(r||Yh)||$h()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,bg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,bg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,bg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,bg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,bg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,bg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,bg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,bg(m,3)).replace(/{S}/g,m+``)}function Tg(e,t,n,r,i){var a=null;if(H(n))a=n;else if(V(n)){var o={time:e.time,level:e.time?e.time.level:0},s=ng();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Eg(e.value,i);a=n[u][u][0]}}return wg(new Date(e.value),a,i,r)}function Eg(e,t){var n=Ns(e),r=n[kg(t)]()+1,i=n[Ag(t)](),a=n[jg(t)](),o=n[Mg(t)](),s=n[Ng(t)](),c=n[Pg(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Dg(e,t,n){switch(t){case`year`:e[Ig(n)](0);case`month`:e[Lg(n)](1);case`day`:e[Rg(n)](0);case`hour`:e[zg(n)](0);case`minute`:e[Bg(n)](0);case`second`:e[Vg(n)](0)}return e}function Og(e){return e?`getUTCFullYear`:`getFullYear`}function kg(e){return e?`getUTCMonth`:`getMonth`}function Ag(e){return e?`getUTCDate`:`getDate`}function jg(e){return e?`getUTCHours`:`getHours`}function Mg(e){return e?`getUTCMinutes`:`getMinutes`}function Ng(e){return e?`getUTCSeconds`:`getSeconds`}function Pg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Fg(e){return e?`setUTCFullYear`:`setFullYear`}function Ig(e){return e?`setUTCMonth`:`setMonth`}function Lg(e){return e?`setUTCDate`:`setDate`}function Rg(e){return e?`setUTCHours`:`setHours`}function zg(e){return e?`setUTCMinutes`:`setMinutes`}function Bg(e){return e?`setUTCSeconds`:`setSeconds`}function Vg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Hg(e){if(!zs(e))return H(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Ug(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Wg=ge;function Gg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ve(e)?e:`-`}function a(e){return Us(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Ns(e):e;if(!isNaN(+c))return wg(c,r,n);if(s)return`-`}if(t===`ordinal`)return ae(e)?i(e):oe(e)&&a(e)?e+``:`-`;var l=Rs(e);return a(l)?Hg(l):ae(e)?i(e):typeof e==`boolean`?e+``:`-`}var Kg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],qg=function(e,t){return`{`+e+(t??``)+`}`};function Jg(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=Kg[a];e=e.replace(qg(o),qg(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(qg(Kg[c],s),n?Vh(l):l)}return e}function Yg(e,t,n){return F(t,function(t,r){e=e.replace(`{`+r+`}`,n?Vh(t):t)}),e}function Xg(e,t){var n=H(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||`html`;return r?a===`html`?i===`subItem`?`<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:`+Vh(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Vh(r)+`;`+(t||``)+`"></span>`:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function Zg(e,t){return t||=`transparent`,H(e)?e:U(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Qg(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var $g=F,e_=[`left`,`right`,`top`,`bottom`,`width`,`height`],t_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function n_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var r_=n_;ie(n_,`vertical`),ie(n_,`horizontal`);function i_(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function a_(e,t){var n=l_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===c_.point)a=n.refPoint,i=s_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=B(o)?o:[o,o];i=s_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[J(s[0],i.width)+i.x,J(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function o_(e,t){var n=a_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);B(a)||(a=[0,a]);var o=J(r.width,t.getWidth()),s=J(r.height,t.getHeight()),c=Math.min(o,s),l=J(a[0],c/2),u=J(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function s_(e,t,n){n=Wg(n||0);var r=t.width,i=t.height,a=J(e.left,r),o=J(e.top,i),s=J(e.right,r),c=J(e.bottom,i),l=J(e.width,r),u=J(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new q((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var c_={rect:1,point:2};function l_(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=oh(e),l=c.coord,u=c.from;if(o.dataToLayout){a=c_.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=c_.point,s=u,i=o.dataToPoint(l))}return a??=c_.rect,a===c_.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function u_(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new q(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=s_(j({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function d_(e,t){return e[t_[t][0]]!=null||e[t_[t][1]]!=null&&e[t_[t][2]]!=null}function f_(e){var t=e.layoutMode||e.constructor.layoutMode;return U(t)?t:t?{type:t}:null}function p_(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(t_[0],0),a=o(t_[1],1);c(t_[0],e,i),c(t_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if($g(n,function(t){c[t]=e[t]}),$g(n,function(e){ke(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!ke(a,f)&&ke(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){$g(e,function(e){t[e]=n[e]})}}function m_(e){return h_({},e)}function h_(e,t){return t&&e&&$g(e_,function(n){ke(t,n)&&(e[n]=t[n])}),e}var g_=yc(),__=function(e){i(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=wh(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=f_(this),r=n?m_(e):{};O(e,t.getTheme().get(this.mainType)),O(e,this.getDefaultOption()),n&&p_(e,r,n)},t.prototype.mergeOption=function(e,t){O(this.option,e,!0);var n=f_(this);n&&p_(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Be(e))return e.defaultOption;var t=g_(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=O(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Tc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return i_(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(yp);Ue(__,yp),Je(__),Th(__),Eh(__,v_);function v_(e){var t=[];return F(__.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=I(t,function(e){return Re(e).main}),e!==`dataset`&&M(t,`dataset`)<=0&&t.unshift(`dataset`),t}var y_=yc(),b_=yc(),x_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=$s(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return w_(this,y_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){T_(this,y_)},e}();function S_(e,t,n,r){return w_(e,b_,$s(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function C_(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function w_(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:C_(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function T_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var E_=/\{@(.+?)\}/g,D_=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),V(i))return s.status=t,s.dimensionIndex=r,i(s);if(H(i))return Jg(i,s).replace(E_,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=sm(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return sm(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function O_(e){var t,n;return U(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function k_(e){return new A_(e)}var A_=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(B(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){j_.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:j_.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),B(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),j_=function(){var e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}(),M_=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return mm(e,t)},e}();function N_(e,t){var n=new M_,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&Ys(``);var o=[],s={},c=e.dimensionsDefine;if(c)F(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(ke(s,n)&&Ys(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=$p(i,ol);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=z(P_,null,e)),n.cloneRawData=z(F_,null,e),n.count=z(nm(i,ol),null,r,a,o);var d=am(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=z(I_,null,o,s),n.cloneAllDimensionInfo=z(L_,null,o),n}function P_(e){var t=e.sourceFormat;return H_(t)||Ys(``),e.data}function F_(e){var t=e.sourceFormat,n=e.data;if(H_(t)||Ys(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(k({},n[i]));return r}}function I_(e,t,n){if(n!=null){if(oe(n)||!isNaN(n)&&!ke(t,n))return e[n];if(ke(t,n))return t[n]}}function L_(e){return D(e)}var R_=G();function z_(e){e=D(e);var t=e.type,n=``;t||Ys(n);var r=t.split(`:`);r.length!==2&&Ys(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,R_.set(t,e)}function B_(e,t,n){var r=$s(e),i=r.length;i||Ys(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=V_(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function V_(e,t,n,r){var i=``;t.length||Ys(i),U(e)||Ys(i);var a=e.type,o=R_.get(a);o||Ys(i);var s=I(t,function(e){return N_(e,o)});return I($s(o.transform({upstream:s[0],upstreamList:s,config:D(e.config)})),function(e,n){var r=``;U(e)||Ys(r),e.data||Ys(r),H_(Lp(e.data))||Ys(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:ol,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:ol,sourceHeader:0,dimensions:e.dimensions};return Pp(e.data,i,null)})}function H_(e){return e===`arrayRows`||e===`objectRows`}var U_=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(W_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ce(o)?il:el,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=W(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=W(u.sourceHeader,d.sourceHeader),m=W(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Pp(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Pp(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&G_(``);var i,a=[],o=[];return F(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&G_(``),a.push(t),o.push(e._getVersionSign())}),n?i=B_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ip(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];W_(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Om,o.initData(new Yp(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(W_(e)){var t=Op(e);return t?[t.getSourceManager()]:[]}return I(kp(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(W_(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},e}();function W_(e){return e.mainType===`series`}function G_(e){throw Error(e)}var Y={color:{},darkColor:{},size:{}},K_=Y.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var q_ in k(K_,{primary:K_.neutral80,secondary:K_.neutral70,tertiary:K_.neutral60,quaternary:K_.neutral50,disabled:K_.neutral20,border:K_.neutral30,borderTint:K_.neutral20,borderShade:K_.neutral40,background:K_.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:K_.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:K_.neutral70,axisLineTint:K_.neutral40,axisTick:K_.neutral70,axisTickMinor:K_.neutral60,axisLabel:K_.neutral70,axisSplitLine:K_.neutral15,axisMinorSplitLine:K_.neutral05}),K_)if(K_.hasOwnProperty(q_)){var J_=K_[q_];q_===`theme`?Y.darkColor.theme=K_.theme.slice():q_===`highlight`?Y.darkColor.highlight=`rgba(255,231,130,0.4)`:q_.indexOf(`accent`)===0?Y.darkColor[q_]=Gr(J_,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Y.darkColor[q_]=Gr(J_,null,function(e){return e*.9},function(e){return 1-e**1.5})}Y.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Y_=`line-height:1`;function X_(e){var t=e.lineHeight;return t==null?Y_:`line-height:`+Vh(t+``)+`px`}function Z_(e,t){var n=e.color||Y.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Y.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Vh(r+``)+`px;color:`+Vh(n)+`;font-weight:`+Vh(i+``),valueStyle:`font-size:`+Vh(o+``)+`px;color:`+Vh(a)+`;font-weight:`+Vh(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Q_=[0,10,20,30],$_=[``,`
9
9
  `,`
10
10
 
11
11
  `,`
12
12
 
13
13
 
14
- `];function $_(e,t){return t.type=e,t}function ev(e){return e.type===`section`}function tv(e){return ev(e)?rv:iv}function nv(e){if(ev(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return N(e.blocks,function(e){var n=nv(e);n>=t&&(t=n+ +(r&&(!n||ev(e)&&!e.noHeader)))}),t}return 0}function rv(e,t,n,r){var i=t.noHeader,a=ov(nv(t)),o=[],s=t.blocks||[];ve(!s||R(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(W(l,c)){var u=new hm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}N(s,function(n,i){var s=t.valueFormatter,c=tv(n)(s?O(O({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):sv(r,o.join(``),i?n:a.html);if(i)return d;var f=Wg(t.header,`ordinal`,e.useUTC),p=X_(r,e.renderMode).nameStyle,m=Y_(r);return e.renderMode===`richText`?uv(e,f,p)+a.richText+d:sv(r,`<div style="`+p+`;`+m+`;">`+Bh(f)+`</div>`+d,n)}function iv(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=R(e)?e:[e],P(e,function(e,t){return Wg(e,R(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Y.color.secondary,i),f=a?``:Wg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=X_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:uv(e,f,v))+(o?``:dv(e,m,h,g,y)):sv(r,(s?``:d)+(a?``:cv(f,!s,v))+(o?``:lv(m,h,g,y)),n)}}function av(e,t,n,r,i,a){if(e)return tv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function ov(e){return{html:Z_[e],richText:Q_[e]}}function sv(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Y_(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function cv(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Bh(e)+`</span>`}function lv(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=R(e)?e:[e],`<span style="`+i+`;`+r+`">`+P(e,function(e){return Bh(e)}).join(`&nbsp;&nbsp;`)+`</span>`}function uv(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function dv(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(R(t)?t.join(` `):t,a)}function fv(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return Xg(n)}function pv(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var mv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Bs()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Yg({color:t,type:e,renderMode:n,markerId:r});return B(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};R(t)?N(t,function(e){return O(n,e)}):O(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function hv(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=R(s),l=fv(t,n),u,d,f,p;if(o>1||c&&!o){var m=gv(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=om(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=mc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return $_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[$_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ye(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function gv(e,t,n,r,i){var a=t.getData(),o=ne(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?N(r,function(e){u(om(a,n,e),e)}):N(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push($_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var _v=yc();function vv(e,t){return e.getName(t)||e.getId(t)}var yv=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=O_({count:Sv,reset:Cv}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(_v(this).sourceManager=new H_(this)).prepareSource();var r=this.getInitialData(e,n);Tv(r,this),this.dataTask.context.data=r,_v(this).dataBeforeProcessed=r,bv(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=d_(this),r=n?p_(e):{},i=this.subType;g_.hasClass(i)&&(i+=`Series`),D(e,t.getTheme().get(this.subType)),D(e,this.getDefaultOption()),ec(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&f_(e,r,n)},t.prototype.mergeOption=function(e,t){e=D(this.option,e,!0),this.fillDataTextStyle(e.data);var n=d_(this);n&&f_(this.option,e,n);var r=_v(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Tv(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,_v(this).dataBeforeProcessed=i,bv(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!le(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&ec(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=Dv(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return _v(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=Dv(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}_v(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return U(e)},t.prototype.getSourceManager=function(){return _v(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return _v(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return hv({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ne.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=b_.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var a=0;a<e.length;a++){var o=e[a],s=vv(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=I(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[vv(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){V(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=vv(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=vv(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return g_.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(g_);te(yv,E_),te(yv,b_),Ue(yv,g_);function bv(e){var t=e.name;mc(e)||(e.name=xv(e)||t)}function xv(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return N(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Sv(e){return e.model.getRawData().count()}function Cv(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),wv}function wv(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Tv(e,t){N(De(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ae(Ev,t))})}function Ev(e,t){var n=Dv(e);return n&&n.setOutputEnd((t||this).count()),t}function Dv(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Ov=wo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),kv={line:_d,rect:Ro,roundRect:Ro,square:Ro,circle:Vu,diamond:wo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:wo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:wo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Ov},Av={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},jv={};N(kv,function(e,t){jv[t]=new e});var Mv=wo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=gn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=jv[r];i||=(r=`rect`,jv[r]),Av[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Nv(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Y.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Pv(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?of(e.slice(8),new K(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?af(e.slice(7),{},new K(t,n,r,i),o?`center`:`cover`):new Mv({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Nv,a&&c.setColor(a),c}function Fv(e){return R(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Iv(e,t){if(e!=null)return R(e)||(e=[e,e]),[q(e[0],t[0])||0,q(H(e[1],e[0]),t[1])||0]}var Lv=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return yh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new zu,n=Pv(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Pv(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Y.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(yv);function Rv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=om(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(om(e,t,n[o]));return a.join(` `)}}function zv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!R(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Bv=function(e){r(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Pv(e,-1,-1,2,2,null,a);o.attr({z2:H(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Vv,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Vl(this.childAt(0))},t.prototype.downplay=function(){Hl(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Hd(f,p,o,n),Jd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Ud(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Jf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Iv(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Ao){var S=a.style;a.useStyle(O({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(O({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;qf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Rv(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var k=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*k,D.scaleY=this._sizeY*k,this.setSymbolScale(1),ou(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=J(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Gd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Gd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Fv(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(zu);function Vv(e,t){this.parent.drift(e,t)}function Hv(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Uv(e){return e!=null&&!V(e)&&(e={isIgnore:e}),e||{}}function Wv(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Jf(t),cursorStyle:t.get(`cursor`)}}function Gv(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Kv=function(){function e(e){this.group=new zu,this._SymbolCtor=e||Bv}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Uv(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Wv(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Hv(e,i,r,t)&&Gv(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Hv(e,p,u,t))n.remove(f);else{var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Hd(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);Hv(t,s,i,e)?(o||=Gv(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Wv(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=Uv(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(Hv(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){jf(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function qv(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Jv(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=P(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return hh(t,d[0])&&(f=!0,d[0]=p),hh(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Jv(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:se(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Yv(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Xv(e,t){return!isFinite(e)||!isFinite(t)}var Zv=typeof Float32Array<`u`?Float32Array:void 0,Qv=typeof Float64Array<`u`?Float64Array:void 0;function $v(e){return ey({ctor:Zv},e).arr}function ey(e,t){var n=e.arr,r=e.ctor;if(t>ks&&(t=ks),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function ty(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function ny(e,t,n,r,i,a,o,s){for(var c=ty(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=qv(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Yv(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var ee=l.length,te=$v(ee),M=$v(ee),N=$v(ee),P=$v(ee),ne=[],y=0;y<m.length;y++){var F=m[y],re=y*2,I=F*2;te[re]=l[I],te[re+1]=l[I+1],M[re]=u[I],M[re+1]=u[I+1],N[re]=d[I],N[re+1]=d[I+1],P[re]=f[I],P[re+1]=f[I+1],ne[y]=p[F]}return{current:te,next:M,stackedOnCurrent:N,stackedOnNext:P,status:ne}}var ry=Math.min,iy=Math.max;function ay(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(Xv(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;Xv(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||Xv(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,te=C-v,M=void 0,N=void 0;if(s===`x`){M=Math.abs(A),N=Math.abs(j);var P=E>0?1:-1;p=_-P*M*o,m=v,O=_+P*N*o,k=v}else if(s===`y`){M=Math.abs(ee),N=Math.abs(te);var ne=D>0?1:-1;p=_,m=v-ne*M*o,O=_,k=v+ne*N*o}else M=Math.sqrt(A*A+ee*ee),N=Math.sqrt(j*j+te*te),T=N/(N+M),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=ry(O,iy(S,_)),k=ry(k,iy(C,v)),O=iy(O,ry(S,_)),k=iy(k,ry(C,v)),E=O-_,D=k-v,p=_-E*M/N,m=v-D*M/N,p=ry(p,iy(l,_)),m=ry(m,iy(u,v)),p=iy(p,ry(l,_)),m=iy(m,ry(u,v)),E=_-p,D=v-m,O=_+E*N/M,k=v+D*N/M}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var oy=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),sy=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new oy},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Xv(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Xv(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=ay(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=Qa.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?dr(i,u,f,m,e,s):dr(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?lr(a,d,p,h,b):lr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(wo),cy=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(oy),ly=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new cy},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Xv(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Xv(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=ay(e,n,i,a,a,1,t.smooth,o,t.connectNulls);ay(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(wo);function uy(){var e=yc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var dy=yc(),fy=uy(),py=function(){function e(){this.group=new zu,this.uid=Ch(`viewChart`),this.renderTask=O_({plan:gy,reset:_y}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&hy(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&hy(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){jf(this.group,e)},e.markUpdateMethod=function(e,t){dy(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function my(e,t,n){e&&fu(e)&&(t===`emphasis`?Vl:Hl)(e,n)}function hy(e,t,n){var r=vc(e,t),i=t&&t.highlightKey!=null?pu(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){my(e,n,i)}):N($s(r),function(t){my(e.getItemGraphicEl(t),n,i)})}Ve(py,[`dispose`]),Je(py);function gy(e){return fy(e.model)}function _y(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&dy(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),vy[c]}var vy={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function yy(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new Ro({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=z(i)?function(e){i(e,d)}:null;Ud(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function by(e,t,n){var r=e.getArea(),i=Ss(r.r0,1),a=Ss(r.r,1),o=new od({shape:{cx:Ss(e.cx,1),cy:Ss(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Ud(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function xy(e,t,n,r,i){return e?e.type===`polar`?by(e,t,n):e.type===`cartesian2d`?yy(e,t,n,r,i):null:null}function Sy(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function Cy(e,t){return e.type===t}function wy(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}function Ty(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||W(e,`text`)))}function Ey(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},W(r,`text`)&&(o.text=r.text),W(r,`rich`)&&(o.rich=r.rich),W(r,`textFill`)&&(o.fill=r.textFill),W(r,`textStroke`)&&(o.stroke=r.textStroke),W(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),W(r,`fontSize`)&&(o.fontSize=r.fontSize),W(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),W(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=W(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),W(r,`textPosition`)&&(i.position=r.textPosition),W(r,`textOffset`)&&(i.offset=r.textOffset),W(r,`textRotation`)&&(i.rotation=r.textRotation),W(r,`textDistance`)&&(i.distance=r.textDistance)}return Dy(o,e),N(o.rich,function(e){Dy(e,e)}),{textConfig:i,textContent:a}}function Dy(e,t){t&&(t.font=t.textFont||t.font,W(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),W(t,`textAlign`)&&(e.align=t.textAlign),W(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),W(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),W(t,`textWidth`)&&(e.width=t.textWidth),W(t,`textHeight`)&&(e.height=t.textHeight),W(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),W(t,`textPadding`)&&(e.padding=t.textPadding),W(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),W(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),W(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),W(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),W(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),W(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),W(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}var Oy=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Je(Oy);var ky=0,Ay=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ky,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&P(r,jy);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!B(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=U(this.categories)},e}();function jy(e){return V(e)&&e.value!=null?e.value:e+``}var My=I({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function Ny(e,t,n){var r;e||={};var i=tg();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(N(My,function(t){a[t]&&(e[t]=L(a[t],a))}),r=a)}return r??By(e,n),{brk:r,mapper:e}}function Py(e,t){N(My,function(n){e[n]=t[n]})}function Fy(e,t){e.freeze=Ae}function Iy(e){return e.getExtentUnsafe(0,2)}function Ly(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Ry(e){var t=Ly(e,3);return t[1]-t[0]}function zy(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function By(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Mc(),O(n,Vy),n}var Vy={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=Ly(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Hy(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Hy(r,e,t,n)},freeze:function(){}};function Hy(e,t,n,r){Rc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Uy(e){return Wy(e)||Ky(e)}function Wy(e){return e.type===`interval`}function Gy(e){return e.type===`time`}function Ky(e){return e.type===`log`}function qy(e){return e.type===`ordinal`}function Jy(e){var t=Fs(e),n=fs(10,t),r=ls(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ss(r*n,-t)}function Yy(e){return ws(e)+2}function Xy(e,t){return ps(e)/ps(t)}function Zy(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return fs(t,e)}function Qy(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=cs(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return Lc(r[0])&&Lc(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function $y(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function eb(e,t){return e||=t,ls(ss(e,1))}function tb(e,t,n){var r=Iy(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var nb=function(e){r(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Py(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Ay({}),R(i)&&(i=new Ay({categories:P(i,function(e){return V(e)?e.value:e})})),r._ordinalMeta=i;var a=Ny(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Fy(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:B(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=ls(e),e},t.prototype.getTicks=function(){var e=[];return tb(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=os(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Iy(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(ls(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(Oy);Oy.registerClass(nb);function rb(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=Yy(f);u<t-1;){var m=Ss(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=tg();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var ib=function(e){r(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Ny(r,ng(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return E(this._cfg)},t.prototype.setConfig=function(e){var t=Iy(this);this._cfg=e=E(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Yy(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Iy(this),i=t.niceExtent,a=t.intervalPrecision,o=tg(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?Ss(i[0]-n,a):r[0]});for(var d=function(e,t){return ls((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=os(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Ss(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Ss(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Ss(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return rb(this,e,rg(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=ws(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Vg(Ss(e.value,n,!0))},t.type=`interval`,t}(Oy);Oy.registerClass(ib);var ab=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},ob=function(e){r(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Ny(r,ng(r,n),null).brk,r}return t.prototype.getLabel=function(e){return Cg(e.value,mg[Sg(bg(this._minLevelUnit))]||mg.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return wg(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Iy(this),r=tg(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return tg().addBreaksToTicks(o,i.breaks,n),o;o=gb(this._minLevelUnit,this._approxInterval,s,n,zy(this),i);var c=hg.length-1,l=0;return N(o,function(e){e.time&&(c=Math.min(c,j(hg,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&tg().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&tg().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(j(hg,Tg(e.vmin,s)),j(hg,Tg(e.vmax,s))),n=0,r=0;r<hg.length;r++)if(!cb(hg[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:hg[Math.max(i,t)],upperTimeUnit:hg[i]}}),o},t.prototype.getMinorTicks=function(e){return rb(this,e,rg(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return se(e)?Math.round(e):+Ns(e)},t.type=`time`,t}(Oy),sb=[[`second`,ag],[`minute`,og],[`hour`,sg],[`quarter-day`,sg*6],[`half-day`,sg*12],[`day`,cg*1.2],[`half-week`,cg*3.5],[`week`,cg*7],[`month`,cg*31],[`quarter`,cg*95],[`half-year`,lg/2],[`year`,lg]];function cb(e,t,n,r){return Eg(new Date(t),e,r).getTime()===Eg(new Date(n),e,r).getTime()}function lb(e,t){return e/=cg,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ub(e){var t=30*cg;return e/=t,e>6?6:e>3?3:e>2?2:1}function db(e){return e/=sg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function fb(e,t){return e/=t?og:ag,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function pb(e){return ss(Is(e,!0),1)}function mb(e,t,n){var r=Math.max(0,j(hg,t)-1);return Eg(new Date(e),hg[r],n).getTime()}function hb(e,t){var n=/* @__PURE__ */ new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function gb(e,t,n,r,i,a){var o=gg,s=0;function c(e,t,n,i,o,c,l){for(var u=hb(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!cb(bg(e),r[0],r[1],n)){s&&(i=[{value:mb(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,d=i[l+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/cg/365)),p=Dg(n),m=Pg(n);break;case`half-year`:case`quarter`:case`month`:f=ub(t),p=Og(n),m=Fg(n);break;case`week`:case`half-week`:case`day`:f=lb(t,31),p=kg(n),m=Ig(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=db(t),p=Ag(n),m=Lg(n);break;case`minute`:f=fb(t,!0),p=jg(n),m=Rg(n);break;case`second`:f=fb(t,!1),p=Mg(n),m=zg(n);break;case`millisecond`:f=pb(t),p=Ng(n),m=Bg(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=bg(o[m]);if(xg(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?bg(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=F(P(u,function(e){return F(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=Tg(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Uc(S,Wc,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=Tg(r[0],n),k=Tg(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}var _b=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=cg,n[1]+=cg),n[1]===-1/0&&n[0]===1/0){var r=/* @__PURE__ */ new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-cg}e.setExtent(n[0],n[1]);var i=eb(t.splitNumber,10),a=zy(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=sb.length,l=Math.min(ab(sb,a,0,c),c-1),u=sb[l][1],d=sb[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Oy.registerClass(ob);var vb=0,yb=1,bb=2,xb=function(e){r(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=ib.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[vb]=i[yb]=a[vb]=a[yb]=NaN,Py(r,t.mapperMethods);var s=tg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},bb,l),r.powStub=new ib({breakParsed:l.original}),r.intervalStub=new ib({breakParsed:l.transformed}),Fy(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=tg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return P(i.getTicks(e||{}),function(e){var i=e.value,o=Zy(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,rg(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return rb(this,e,rg(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Xy(e,this.base))},scale:function(e){return Zy(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Xy(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Sb.depth=n,Cb.lookup=this._lookup,Zy(n===2?e:this.intervalStub.transformOut(e,Sb),this.base,Cb)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Rc(t,n)||t<=0||n<=0)){var r=wb,i=wb;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[vb]=t,r[yb]=n);var o=this.base;this.intervalStub.setExtent2(e,i[vb]=Xy(t,o),i[yb]=Xy(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Rc(t[0],t[1])&&Us(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(Oy);Oy.registerClass(xb);var Sb={},Cb={},wb=[],Tb={value:1,category:1,time:1,log:1},Eb=yc();function Db(e){var t=e.get(`type`);return(t==null||!W(Tb,t)&&!Oy.getClass(t))&&(t=`value`),t}function Ob(e,t,n){var r=tg(),i;switch(r&&(i=zb(e,t,n)),t){case`category`:return new nb({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Mc()});case`time`:return new ob({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new xb({logBase:e.get(`logBase`),breakOption:i});case`value`:return new ib({breakOption:i});default:return new((Oy.getClass(t))||ib)({})}}function kb(e,t,n){var r=n?Ly(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Rc(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Ab(e){Eb(e).noOnMyZero=!0}function jb(e){return Eb(e).noOnMyZero}function Mb(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=_g(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(B(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(z(t)){if(e.type===`category`)return function(n,r){return t(Nb(e,n),n.value-e.scale.getExtent()[0],null)};var r=tg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Nb(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Nb(e,t){var n=e.scale;return qy(n)?n.getLabel(t):t.value}function Pb(e){return e.get(`interval`)??`auto`}function Fb(e){return e.type===`category`&&Pb(e.getLabelModel())===0}function Ib(e,t){var n={};return N(e.mapDimensionsAll(t),function(t){n[gh(e,t)]=!0}),I(n)}function Lb(e){return e===`middle`||e===`center`}function Rb(e){return e.getShallow(`show`)}function zb(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!tg()||!n||!Bb(t)?void 0:r}function Bb(e){return e!==`category`}function Vb(e,t,n,r,i,a){var o=Ky(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=$y(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Hb(e,t){return qy(e)?e.getRawOrdinalNumber(t.value):t.value}function Ub(e,t){return qy(e)&&!!t.get(`boundaryGap`)}function Wb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Gb(e){for(var t=Mc(),n=Mc(),r=0;r<e.length;){var i=e[r++],a=e[r++];Xv(i,a)||(Nc(t,i),Nc(n,a))}return[t,n]}function Kb(e,t){var n=Gb(e),r=n[0],i=n[1],a=Gb(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function qb(e){return se(e)?e:e?.5:0}function Jb(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=$v(r*2),a=0;a<r;a++){var o=Yv(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Yb(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;Xv(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Xb(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Wr((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Zb(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=P(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Xb(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;N(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new Ed(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Qb(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&$b(a,t))){var o=t.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(e){e.tick.offInterval||(s[Hb(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function $b(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Bv.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function ex(e){for(var t=e.length/2;t>0&&Xv(e[t*2-2],e[t*2-1]);t--);return t-1}function tx(e,t){return[e[t*2],e[t*2+1]]}function nx(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!Xv(o,e[l*2+1-i])){if(l===0)a=o;else{if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}}return{range:[s,c],t:(t-a)/(o-a)}}function rx(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<ml.length;t++)if(e.get([ml[t],`endLabel`,`show`]))return!0;return!1}function ix(e,t,n,r){if(Cy(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=rx(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=yy(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return by(t,n,r)}function ax(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var ox=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new zu,t=new Kv;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=L(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=qv(r,a,_),y=g&&Jb(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Qb(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Zb(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Yb(y,c,r,w,x),c=Yb(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Xg(E)),m.setClipPath(ix(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Xg(E));var D=m.getClipPath();D?Ud(D,{shape:ix(this,r,!1,e).shape},e):m.setClipPath(ix(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),Wb(this._stackedOnPoints,y)&&Wb(this._points,c)||(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Yb(y,c,r,w,x),c=Yb(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),j=O.get(`blurScope`),ee=O.get(`disabled`);if(f.useStyle(A(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),uu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var te=f.getState(`emphasis`).style;te.lineWidth=+f.style.lineWidth+1}J(f).seriesIndex=e.seriesIndex,ou(f,k,j,ee);var M=qb(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var P=a.getCalculationInfo(`stackedOnSeries`),ne=0;p.useStyle(A(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),P&&(ne=qb(P.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:ne,smoothMonotone:N,connectNulls:x}),uu(p,e,`areaStyle`),J(p).seriesIndex=e.seriesIndex,ou(p,k,j,ee)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),I=e.get(`triggerLineEvent`),ie=I===!0||re===!0||re===`line`,L=I===!0||re===!0||re===`area`;this.packEventData(e,f,ie),p&&this.packEventData(e,p,L)},t.prototype.packEventData=function(e,t,n){J(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=vc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Xv(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Bv(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else py.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=vc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else py.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Ml(this._polyline,e),t&&Ml(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new sy({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ly({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);z(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=z(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=z(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(rx(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Uo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=ex(o);c>=0&&(qf(a,Jf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Rv(i,e):zv(i,n)},enableTextSetter:!0},ax(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=nx(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=tx(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=jc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=tx(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=ip(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=ny(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Yb(u.stackedOnCurrent,u.current,n,i,o),d=Yb(u.current,null,n,i,o),m=Yb(u.stackedOnNext,u.next,n,i,o),p=Yb(u.next,null,n,i,o)),Kb(d,p)>3e3||c&&Kb(f,m)>3e3)s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));else{s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Hd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Hd(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})}},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(py);function sx(e,t){return{seriesType:e,plan:uy(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=P(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);hh(n,o[0])&&(o[0]=c),hh(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&$v(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var cx={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},lx=function(e){return Math.round(e.length/2)};function ux(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;B(i)?p=cx[i]:z(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,lx))}}}}}function dx(e){e.registerChartView(ox),e.registerSeriesModel(Lv),e.registerLayout(sx(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ux(`line`))}var fx=yc(),px=yc(),mx={estimate:1,determine:2};function hx(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function gx(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:P(vx(n,r),function(t,n){return{formattedLabel:Mb(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?yx(e,t):Sx(e)}function _x(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:vx(i,r)}:e.type===`category`?xx(e,t):{ticks:r.getTicks(n)}}function vx(e,t){var n=t.getExtent(),r=[];return N(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Uc(r,Gc,null),Cs(r),P(r,function(e){return{value:e}})}function yx(e,t){var n=e.getLabelModel(),r=bx(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function bx(e,t,n){var r=Tx(e),i=Pb(t),a=n.kind===mx.estimate;if(!a){var o=Dx(r,i);if(o)return o}var s,c;z(i)?s=Px(e,i,!1):(c=i===`auto`?kx(e,n):i,s=Px(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Ox(r,i,l),!0}):Ox(r,i,l),l}function xx(e,t){var n=Cx(e),r=Pb(t),i=Dx(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),z(r))a=Px(e,r,!0);else if(r===`auto`){var s=bx(e,e.getLabelModel(),hx(mx.determine));o=s.labelCategoryInterval,a=P(s.labels,function(e){return e.tick})}else o=r,a=Px(e,o,!0);return Ox(n,r,{ticks:a,tickCategoryInterval:o})}function Sx(e){var t=e.scale.getTicks(),n=Mb(e);return{labels:P(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Cx=Ex(`axisTick`),Tx=Ex(`axisLabel`);function Ex(e){return function(t){return px(t)[e]||(px(t)[e]={list:[]})}}function Dx(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function Ox(e,t,n){return e.list.push({key:t,value:n}),n}function kx(e,t){if(t.kind===mx.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return px(e).autoInterval=n,!0}),n}return px(e).autoInterval??(px(e).autoInterval=e.calculateCategoryInterval(t))}function Ax(e,t){var n=t.kind,r=Nx(e),i=Mb(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=dn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===mx.estimate?(t.out.noPxChangeTryDetermine.push(L(jx,null,e,S,c)),S):Mx(e,S,c)??S}function jx(e,t,n){return Mx(e,t,n)==null}function Mx(e,t,n){var r=fx(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Nx(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Px(e,t,n){var r=Mb(e),i=e.scale,a=[],o=z(t);return tb(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Fx=yc();function Ix(e){Fx(e).prepare={}}function Lx(e){Fx(e).fullUpdate={}}function Rx(e){return Fx(e).prepare}function zx(e){return Fx(e).fullUpdate}var Bx=Vc(),Vx=yc(),Hx=yc();function Ux(e,t){var n=e.model,r=Vx(zx(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Wx(e,t){return qx(Ux(e,t))}function Gx(e,t){var n=[];return Kx(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(qx(e))}),n}function Kx(e,t){var n=Vx(zx(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function qx(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function Jx(e,t){var n=e.model.ecModel,r=Vx(zx(n)).axSer;r&&Xx(n,r.get(e.model.uid),t)}function Yx(e,t,n){var r=Ux(e,t);r&&Xx(e.model.ecModel,r.sers,n)}function Xx(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function Zx(e,t,n){var r=Vx(zx(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function Qx(e,t){var n=e.model,r=Vx(zx(n.ecModel)).keys;r&&N(r.get(n.uid),function(e){t(e)})}function $x(e){var t=Hx(Rx(e)),n=t.keyed||=U();Kx(e,function(t,r,i){var a=n.get(r)||n.set(r,U()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&tS.liPosMinGap(e,t,o)})}function eS(e,t){tS[e]=t}var tS={};function nS(e,t,n){if(e){var r=t.ecModel,i=Vx(zx(r)),a=e.model.uid,o=i.axSer||=U();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=aS.get(rS(s,c,n))||aS.get(rS(s,c,null));if(l){var u=i.keyed||=U(),d=i.keys||=U(),f=l.key,p=u.get(f)||u.set(f,U()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function rS(e,t,n){return e+`|&`+H(t,!0)+`|&`+(n||``)}function iS(e,t){var n=rS(t.seriesType,t.baseAxis,t.coordSysType);aS.set(n,t),Bx(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:$x})})}var aS=U(),oS=.8;function sS(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Ry(r);Us(o)||(o=NaN);var s=e.getExtent(),c=cs(s[1]-s[0]);return qy(r)?cS(n,e,o,c):i&&lS(n,e,o,c,i),a!=null&&(n.w=Us(n.w)?ss(a,n.w):a),n}function cS(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function lS(e,t,n,r,i){var a=!1,o=-1/0;N(i.key?[Wx(t,i.key)]:Gx(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Us(n)&&n>0&&Us(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*oS,e.w2=e.w*n/r)}var uS=[0,1],dS=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),_s(e,uS,fS(this),t)},e.prototype.coordToData=function(e,t){var n=_s(e,fS(this),uS,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=P(_x(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Hb(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=pS(this,n,r);return P(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(qy(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),P(this.scale.getMinorTicks(e),function(e){return P(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=hx(mx.determine),gx(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return sS(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=hx(mx.determine),Ax(this,e)},e}();function fS(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function pS(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=sS(e).w;if(!i)return!1;N(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var mS=function(e){r(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(dS),hS=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],gS=1,_S=2,vS=gS|_S;function yS(e,t,n){n||=vS,t?e.dirty|=n:e.dirty&=~n}function bS(e,t){return t||=vS,e.dirty==null||!!(e.dirty&t)}function xS(e){if(e)return bS(e)&&SS(e,e.label,e),e}function SS(e,t,n){var r=t.getComputedTransform();e.transform=Ff(e.transform,r);var i=e.localRect=Pf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=sp.textMargin);for(var d=0;d<4;d++)CS[d]=u===sp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===sp.textMargin&&Ef(i,CS,!1,!1);var f=e.rect=Pf(e.rect,i);return r&&f.applyTransform(r),u===sp.minMargin&&Ef(f,CS,!1,!1),e.axisAligned=Mf(r),(e.label=e.label||{}).ignore=t.ignore,yS(e,!1),yS(e,!0,_S),e}var CS=[0,0,0,0];function wS(e,t,n){return e.transform=Ff(e.transform,n),e.localRect=Pf(e.localRect,t),e.rect=Pf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Mf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function TS(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function ES(e,t){for(var n=0;n<hS.length;n++){var r=hS[n];e[r]??(e[r]=t[r])}return xS(e)}function DS(e){var t=e.obb;return(!t||bS(e,_S))&&(e.obb=t||=new Id,t.fromBoundingRect(e.localRect,e.transform),yS(e,!1,_S)),t}function OS(e,t,n,r,i){var a=e.length,o=Zd[t],s=Qd[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function kS(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.defaultAttr,i=n.labelLine;n.label.attr(`ignore`,r.ignore),i&&i.attr(`ignore`,r.labelGuideIgnore)}}function AS(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=xS(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(jS(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function jS(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:DS(e).intersect(DS(t),n,r)}var MS=null;function NS(e){MS||=e}function PS(){return MS}var FS=`expandAxisBreak`,IS=`collapseAxisBreak`,LS=`toggleAxisBreak`,RS=`axisbreakchanged`,zS={type:FS,event:RS,update:`update`,refineEvent:HS},BS={type:IS,event:RS,update:`update`,refineEvent:HS},VS={type:LS,event:RS,update:`update`,refineEvent:HS};function HS(e,t,n,r){var i=[];return N(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function US(e){e.registerAction(zS,t),e.registerAction(BS,t),e.registerAction(VS,t);function t(e,t){var n=[],r=xc(t,e);function i(t,i){N(r[t],function(t){N(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(A((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var WS=Math.PI,GS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],KS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],qS=yc(),JS=yc(),YS=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function XS(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=bC(e.axisName)&&Lb(e.nameLocation);N(r,function(e){var t=xS(e);if(t&&!t.label.ignore){o.push(t);var n=a.transGroup;c&&(n.transform?pt(ZS,n.transform):st(ZS),t.transform&&lt(ZS,ZS,t.transform),K.copy(QS,t.localRect),QS.applyTransform(ZS),s?s.union(QS):K.copy(s=new K(0,0,0,0),QS))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new K(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var ZS=ot(),QS=new K(0,0,0,0),$S=function(e,t,n,r,i,a){if(Lb(e.nameLocation)){var o=a.stOccupiedRect;o&&eC(wS({},o,a.transGroup.transform),r,i)}else tC(a.labelInfoList,a.dirVec,r,i)};function eC(e,t,n){var r=new G;jS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&TS(t,r)}function tC(e,t,n,r){for(var i=G.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||eC(s,n,r)}}var nC=function(){function e(e,t,n,r){this.group=new zu,this._axisModel=e,this._api=t,this._local={},this._shared=r||new YS($S),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=H(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=H(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:H(e.nameDirection,1),tickDirection:H(e.tickDirection,1),labelDirection:H(e.labelDirection,1),labelOffset:H(e.labelOffset,0),silent:H(e.silent,!0),axisName:r,nameLocation:he(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:bC(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new zu({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new G(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},N(rC,function(r){e[r]&&iC[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=As(t-e),i,a;return js(r)?(a=n>0?`top`:`bottom`,i=`center`):js(r-WS)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<WS?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),rC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],iC={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(kt(u,u,l),kt(d,d,l));var p=O({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&ig(r.axis.scale))PS().buildAxisBreakLine(r,i,a,m);else{var h=new _d(O({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));uf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);B(g)&&(g=[g,g]),(B(_)||se(_))&&(_=[_,_]);var v=Iv(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];N([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Pv(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){pC(t,i,s)&&aC(e,t,n,r,i,a,o,mx.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){pC(t,i,s)&&aC(e,t,n,r,i,a,o,mx.determine);var c=dC(e,i,a,r);cC(e,t.labelLayoutList,c),fC(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(bC(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new G(0,0),_=new G(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=ot();_.transform(dt(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*WS/180);var b,x;Lb(u)?b=nC.innerTextLayout(e.rotation,y??e.rotation,d):(b=oC(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=me(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Uo({x:g.x,y:g.y,rotation:b.rotation,silent:nC.isLabelSilent(r),style:Yf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(kf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=nC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,J(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=xS({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Lb(u)?GS[E]:KS[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function aC(e,t,n,r,i,a,o,s){hC(t)||mC(e,t,i,s,r,o);var c=t.labelLayoutList;_C(e,r,c,a),SC(r,e.rotation,c);var l=e.optionHideOverlap;sC(r,c,l),l&&AS(F(c,function(e){return e&&!e.label.ignore})),XS(e,n,r,c)}function oC(e,t,n,r){var i=As(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return js(i-WS/2)?(o=c?`bottom`:`top`,a=`center`):js(i-WS*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<WS*1.5&&i>WS/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function sC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Fb(r))return;function a(e,a,o){var s=xS(t[a]),c=xS(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=qS(s.label).labelInfo.tick;if(Gy(l)&&u.notNice||qy(l)&&u.offInterval){lC(s.label);return}}if(e===!1||s.suggestIgnore)lC(s.label);else if(c.suggestIgnore)lC(c.label);else{var d=.1;if(!n){var f=[0,0,0,0];s=ES({marginForce:f},s),c=ES({marginForce:f},c)}jS(s,c,null,{touchThreshold:d})&&lC(e?c.label:s.label)}}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function cC(e,t,n){e.showMinorTicks||N(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=JS(r),a=qS(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){lC(r);return}}})}function lC(e){e&&(e.ignore=!0)}function uC(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(kt(o,o,t),kt(s,s,t));var u=new _d({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});uf(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=JS(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function dC(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=uC(i.getTicksCoords(),n.transform,c,A(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function fC(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(e.showMinorTicks&&!a.scale.isBlank()){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=A(c.getLineStyle(),A(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=uC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function pC(e,t,n){if(hC(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),gC(e,null,null,null))}return!0}function mC(e,t,n,r,i,a){var o=i.axis,s=me(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new zu;n.add(c);var l=hx(r);if(!s||o.scale.isBlank())gC(t,[],c,l);else{var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(me(e.raw.labelRotate,u.get(`rotate`))||0)*WS/180,p=nC.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;N(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Hb(o.scale,n);if(m&&m[f]){var y=m[f];V(y)&&y.textStyle&&(l=new vp(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=H(l.getShallow(`alignMinLabel`,!0),x),C=H(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=H(l.getShallow(`verticalAlignMinLabel`,!0),w),E=H(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Uo({x:0,y:0,rotation:0,silent:nC.isLabelSilent(i),z2:D,style:Yf(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:z(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=qS(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,kf({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=nC.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var ee=j.parsedBreak;A.break={start:ee.vmin,end:ee.vmax}}o.type===`category`&&(A.dataIndex=f),J(O).eventData=A,j&&xC(i,a,O,j)}h.push(O),c.add(O)}),gC(t,P(h,function(e){return{label:e,priority:qS(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}}function hC(e){return!!e.labelLayoutList}function gC(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function _C(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);N(n,function(n,a){var o=xS(n);if(o){var s=o.label,c=qS(s);o.suggestIgnore=s.ignore,s.ignore=!1,Xn(vC,yC);var l=t.axis;vC.x=l.dataToCoord(Hb(l.scale,c.labelInfo.tick)),vC.y=e.labelOffset+e.labelDirection*i,vC.rotation=c.layoutRotation,r.add(vC),vC.updateTransform(),r.remove(vC),vC.decomposeTransform(),Xn(s,vC),s.markRedraw(),yS(o,!0),xS(o)}})}var vC=new Ro,yC=new Ro;function bC(e){return!!e}function xC(e,t,n,r){n.on(`click`,function(n){var i={type:FS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function SC(e,t,n){var r=tg();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&qS(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&N(i,function(r){PS().adjustBreakLabelPair(e.axis.inverse,t,[xS(n[r[0]]),xS(n[r[1]])])})}}function CC(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),me(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function wC(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function TC(e){var t={xAxisModel:null,yAxisModel:null};return N(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Cc).models[0]}),t}function EC(e,t,n,r,i,a){for(var o=CC(e,n),s=!1,c=!1,l=0;l<t.length;l++)Uy(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new nC(n,r,o,i)}function DC(e,t,n){var r=CC(t,n);e.updateCfg(r)}var OC=yc(),kC=3,AC=function(){function e(e,t,n,r,i){var a=qy(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Wy(e)||Ky(e)||Gy(e))&&(Pc(l,MC(e,t.get(`dataMin`,!0))),Fc(l,MC(e,t.get(`dataMax`,!0)))),zc(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=MC(e,z(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=MC(e,z(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=NC(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!Lc(u[0])&&(u[0]=NaN),!Lc(u[1])&&(u[1]=NaN);var g=s||pe(u[0])||pe(u[1])||a&&!o,_=Wy(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=MC(e,t.get(`startValue`,!0)),x=b!=null;!Us(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Us(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),jC(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),jC(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function jC(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Bc(t))}function MC(e,t){return t==null?null:pe(t)?NaN:e.parse(t)}function NC(e,t){var n;if(qy(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=R(r)?r:[r,r]}return[PC(n[0]),PC(n[1])]}function PC(e){return hn(typeof e==`boolean`?0:e,1)||0}function FC(e){var t=OC(e.scale);return t.extent||=Mc(),t}function IC(e,t){FC(e).dimIdxInCoord=t.get(e.dim)}function LC(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||RC(n,e,i,r,t)}function RC(e,t,n,r,i){var a=FC(t),o=a.extent,s=!1;Jx(t,function(r){if(r.boxCoordinateSystem){var i=ah(r).coord,c=a.dimIdxInCoord;if(c>=0&&R(i)){var l=i[c];l!=null&&!R(l)&&Nc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;N(Ib(u,n),function(e){Ic(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=WC(e,t,r);BC(e,new AC(e,r,o,s,c),i),a.extent=null}function zC(e,t){var n=e.scale;BC(n,new AC(n,e.model,t,!1,!1),kC)}function BC(e,t,n){e.rawExtentInfo=t,t.from=n}function VC(e,t){HC.set(e,t)}var HC=U();function UC(e,t,n,r,i){e.rawExtentInfo||zC({scale:e,model:t},i||Mc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function WC(e,t,n){var r=Ub(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Qx(t,function(e){a=!!HC.get(e)||a}),a}function GC(e,t,n,r){if(n.ctnShp){var i;if(Qx(e,function(t){var n=HC.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Pc(i,a[0]),Fc(i,a[1]),Ab(e))}}),i){var a=t.getExtent();if(qy(t))e.onBand||t.setExtent2(1,os(a[0],a[0]+i[0]),ss(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=os(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ss(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function KC(){eS(`liPosMinGap`,qC)}function qC(e,t,n){var r=U(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=gm(u);function f(n){Xx(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),i&&i.hasKey(t.uid)||(o=!0),p+=n.count()}),i&&i.keys().length===r.keys().length||(o=!0),!o&&a!=null)t.liPosMinGap=a;else{ey(JC,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||_m(d,a))&&(l&&(a=c.transformIn(a,null)),JC.arr[m++]=a)}});var h=JC.typed?JC.arr.subarray(0,m):(JC.arr.length=m,JC.arr);JC.typed?h.sort():Cs(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Us(g)?g:m>0?-2:-1,n.serUids=r}}var JC=ey({ctor:Qv},50);function YC(e){return function(t,n){var r=sS(t,{fromStat:{key:e}});if(Us(r.w2))return[-r.w2/2,r.w2/2]}}function XC(e,t){return e+`|&`+t}function ZC(e){return KC(),{liPosMinGap:!qy(e.scale)}}function QC(e,t,n,r){iS(e,{key:t,seriesType:n,coordSysType:r,getMetrics:ZC})}function $C(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var ew={left:0,right:0,top:0,bottom:0},tw=[`25%`,`25%`],nw=`cartesian2d`,rw=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=p_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&f_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&f_(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:ew,outerBoundsContain:`all`,outerBoundsClampWidth:tw[0],outerBoundsClampHeight:tw[1],backgroundColor:Y.color.transparent,borderWidth:1,borderColor:Y.color.neutral30},t}(g_),iw=Vc(),aw=`__ec_stack_`;function ow(e){return e.get(`stack`)||aw+e.seriesIndex}function sw(e,t){var n=cw(e,t);return n.columnMap=lw(n),n}function cw(e,t){var n=XC(t,nw),r=[],i=sS(e,{fromStat:{key:n},min:1});return Yx(e,n,function(e){r.push({barWidth:q(e.get(`barWidth`),i.w),barMaxWidth:q(e.get(`barMaxWidth`),i.w),barMinWidth:q(e.get(`barMinWidth`)||(fw(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:ow(e)})}),{bandWidthResult:i,seriesInfo:r}}function lw(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};N(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;W(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=os(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=ss(35-o.length*4,15)+`%`;var c=q(i,t),l=q(a,1),u=(n-c)/(r+(r-1)*l);u=ss(u,0),N(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=os(o,i)),a&&(o=ss(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=os(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=ss(u,0);var d=0,f;N(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return N(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function uw(e){return{seriesType:e,overallReset:function(t){var n=XC(e,nw);Zx(t,n,function(t){var r=sw(t,e);Yx(t,n,function(e){var t=r.columnMap[ow(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function dw(e){return{seriesType:e,plan:uy(),reset:function(e){if(wC(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=hh(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord($C(i))),p=fw(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&$v(r*3),c=p&&s&&$v(r*3),l=p&&$v(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,cs(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,cs(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function fw(e){return e.pipelineContext&&e.pipelineContext.large}function pw(e){return YC(XC(e,nw))}function mw(e){iw(e,function(){function t(t){var n=XC(t,nw);QC(e,n,t,nw),VC(n,pw(t))}t(`bar`),t(`pictorialBar`)})}var hw=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return yh(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)N(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(yv);yv.registerClass(hw);var gw=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return yh(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=qc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Eh(hw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Y.color.primary,borderWidth:2}},realtimeSort:!1}),t}(hw),_w=`\0__throttleOriginMethod`,vw=`\0__throttleRate`,yw=`\0__throttleType`;function bw(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=(/* @__PURE__ */ new Date()).getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=(/* @__PURE__ */ new Date()).getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function xw(e,t,n,r){var i=e[t];if(i){var a=i[_w]||i,o=i[yw];if(i[vw]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=bw(a,n,r===`debounce`),i[_w]=a,i[yw]=r,i[vw]=n}return i}}function Sw(e,t){var n=e[t];n&&n[_w]&&(n.clear&&n.clear(),e[t]=n[_w])}var Cw=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),ww=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Cw},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(wo);function Tw(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return gn(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+Dw(m,s+_,!1),x=u+p*y(m)+Ow(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+Dw(m,-s+_,!1),x=u+p*y(m)+Ow(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+Dw(h,s+_,!0),x=u+p*y(h)+Ow(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+Dw(h,-s+_,!0),x=u+p*y(h)+Ow(h,-s+_,!0),S=`right`,C=`middle`;break;default:return gn(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function Ew(e,t,n,r){if(se(r))e.setTextConfig({rotation:r});else if(R(t))e.setTextConfig({rotation:0});else{var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}}function Dw(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Ow(e,t,n){return t*Math.cos(e)*(n?1:-1)}function kw(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;R(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:P(r,function(e){return hn(e,i)})}}var Aw=Math.max,jw=Math.min,Mw=function(e){r(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){jf(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=Fw(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=Vw[s.type](a,e);if(!t)return null;var n=Qw(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=Vw[s.type](a,t,n);if(r&&(h&&S(t),a.hasValue(t)&&Bw[s.type](r))){var o=!1;f&&(o=Nw[s.type](p,r));var g=Pw[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),Ww(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?Iw(d,u,g,r,t,l,!1,!1):Ud(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=Vw[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=Vw[s.type](a,t),E=Zw(l,T,s);Hd(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!Bw[s.type](C))i.remove(D);else{var O=!1;if(f&&(O=Nw[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&qd(D,e,n),D=null),D?Jd(D):D=Pw[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=ip(k);A.prevValue!=null&&(A.prevValue=A.value)}}else Ww(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?Iw(d,u,D,C,t,l,!0,x):Hd(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&qd(n,e,t)}).execute();var C=this._backgroundGroup||=new zu;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),Jw(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),Jw(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&xy(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:P(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){qd(t,e,J(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(py),Nw={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=Aw(t.x,e.x),s=jw(t.x+t.width,i),c=Aw(t.y,e.y),l=jw(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=jw(t.r,e.r),a=Aw(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},Pw={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Ro({shape:O({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?ww:od,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=Tw(Uw(i),{isRoundCap:l===ww}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Hd:Ud)(u,{shape:p},a)}return u}};function Fw(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function Iw(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Hd:Ud)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Hd:Ud)(n,{shape:l},u,i)}function Lw(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var Rw=[`x`,`y`,`width`,`height`],zw=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],Bw={cartesian2d:function(e){return!Lw(e,Rw)},polar:function(e){return!Lw(e,zw)}},Vw={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?Gw(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function Hw(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Uw(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function Ww(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;O(u,kw(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?$w(i,a.coordinateSystem):eT(i,a.coordinateSystem),p=Jf(r);qf(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Rv(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,Ew(e,h===`outside`?f:h,Uw(o),r.get([`label`,`rotate`]))}ap(m,p,a.getRawValue(n),function(e){return zv(t,e)});var g=r.getModel([`emphasis`]);ou(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),uu(e,r),Hw(i)&&(e.style.fill=`none`,e.style.stroke=`none`,N(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Gw(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var Kw=function(){function e(){}return e}(),qw=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new Kw},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(wo);function Jw(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Kc(e):0;if(l){var d=new qw({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new qw({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,J(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,Yw),f.on(`mousemove`,Yw)),n&&n.push(f)}var Yw=bw(function(e){var t=this,n=Xw(t,e.offsetX,e.offsetY);J(t).dataIndex=n>=0?n:null},30,!1);function Xw(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function Zw(e,t,n){if(Cy(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function Qw(e,t,n){return new(e.type===`polar`?od:Ro)({shape:Zw(t,n,e),silent:!0,z2:0})}function $w(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function eT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function tT(e){e.registerChartView(Mw),e.registerSeriesModel(gw),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,uw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,dw(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ux(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),mw(e)}function nT(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}N([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=O({},t),i.dispatchAction(O(t,{type:e[1],seriesIndex:n(r,t)}))})})}function rT(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=vc(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:R(l)?c.getName(l[0]):c.getName(l),selected:B(r)?r:O({},r)})}})}function iT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(rT(`map`,`selectchanged`,t,r,e),rT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(rT(`map`,`selected`,t,r,e),rT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(rT(`map`,`unselected`,t,r,e),rT(`pie`,`unselected`,t,r,e))})}function aT(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function oT(e,t,n){t=R(t)&&{coordDimensions:t}||O({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Xm(r,t).dimensions,a=new Ym(i,e);return a.initData(r,n),a}var sT=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),cT=yc(),lT=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new sT(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return oT(this,{coordDimensions:[`value`],encodeDefaulter:ae(Ep,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=cT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Ds(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(yv);rh({fullType:lT.type,getCoord2:function(e){return e.getShallow(`center`)}});var uT=Math.PI*2,dT=Qa.CMD,fT=[`top`,`right`,`bottom`,`left`];function pT(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0)}}function mT(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%uT<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=ro(i),i=ro(f)}else r=ro(r),i=ro(i);r>i&&(i+=uT);var p=Math.atan2(s,o);if(p<0&&(p+=uT),p>=r&&p<=i||p+uT>=r&&p+uT<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v<y?(c[0]=m,c[1]=h,Math.sqrt(v)):(c[0]=g,c[1]=_,Math.sqrt(y))}function hT(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}function gT(e,t,n,r,i,a,o){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,c=t+r,l=o[0]=Math.min(Math.max(i,e),s),u=o[1]=Math.min(Math.max(a,t),c);return Math.sqrt((l-i)*(l-i)+(u-a)*(u-a))}var _T=[];function vT(e,t,n){var r=gT(t.x,t.y,t.width,t.height,e.x,e.y,_T);return n.set(_T[0],_T[1]),r}function yT(e,t,n){for(var r=0,i=0,a=0,o=0,s,c,l=1/0,u=t.data,d=e.x,f=e.y,p=0;p<u.length;){var m=u[p++];p===1&&(r=u[p],i=u[p+1],a=r,o=i);var h=l;switch(m){case dT.M:a=u[p++],o=u[p++],r=a,i=o;break;case dT.L:h=hT(r,i,u[p],u[p+1],d,f,_T,!0),r=u[p++],i=u[p++];break;case dT.C:h=mr(r,i,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,f,_T),r=u[p++],i=u[p++];break;case dT.Q:h=xr(r,i,u[p++],u[p++],u[p],u[p+1],d,f,_T),r=u[p++],i=u[p++];break;case dT.A:var g=u[p++],_=u[p++],v=u[p++],y=u[p++],b=u[p++],x=u[p++];p+=1;var S=!!(1-u[p++]);s=Math.cos(b)*v+g,c=Math.sin(b)*y+_,p<=1&&(a=s,o=c);var C=(d-g)*y/v+g;h=mT(g,_,y,b,b+x,S,C,f,_T),r=Math.cos(b+x)*v+g,i=Math.sin(b+x)*y+_;break;case dT.R:a=r=u[p++],o=i=u[p++];var w=u[p++],T=u[p++];h=gT(a,o,w,T,d,f,_T);break;case dT.Z:h=hT(r,i,a,o,d,f,_T,!0),r=a,i=o}h<l&&(l=h,n.set(_T[0],_T[1]))}return l}var bT=new G,xT=new G,ST=new G,CT=new G,wT=new G;function TT(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||fT,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var c=1/0,l=i.anchor,u=e.getComputedTransform(),d=u&&pt([],u),f=t.get(`length2`)||0;l&&ST.copy(l);for(var p=0;p<o.length;p++){var m=o[p];pT(m,0,s,bT,CT),G.scaleAndAdd(xT,bT,CT,f),xT.transform(d);var h=e.getBoundingRect(),g=l?l.distance(xT):e instanceof wo?yT(xT,e.path,ST):vT(xT,h,ST);g<c&&(c=g,xT.transform(u),ST.transform(u),ST.toArray(a[0]),xT.toArray(a[1]),bT.toArray(a[2]))}OT(a,t.get(`minTurnAngle`)),n.setShape({points:a})}}}var ET=[],DT=new G;function OT(e,t){if(t<=180&&t>0){t=t/180*Math.PI,bT.fromArray(e[0]),xT.fromArray(e[1]),ST.fromArray(e[2]),G.sub(CT,bT,xT),G.sub(wT,ST,xT);var n=CT.len(),r=wT.len();if(!(n<.001||r<.001)){CT.scale(1/n),wT.scale(1/r);var i=CT.dot(wT);if(Math.cos(t)<i){var a=hT(xT.x,xT.y,ST.x,ST.y,bT.x,bT.y,ET,!1);DT.fromArray(ET),DT.scaleAndAdd(wT,a/Math.tan(Math.PI-t));var o=ST.x===xT.x?(DT.y-xT.y)/(ST.y-xT.y):(DT.x-xT.x)/(ST.x-xT.x);if(isNaN(o))return;o<0?G.copy(DT,xT):o>1&&G.copy(DT,ST),DT.toArray(e[1])}}}}function kT(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,bT.fromArray(e[0]),xT.fromArray(e[1]),ST.fromArray(e[2]),G.sub(CT,xT,bT),G.sub(wT,ST,xT);var r=CT.len(),i=wT.len();if(!(r<.001||i<.001)&&(CT.scale(1/r),wT.scale(1/i),CT.dot(t)<Math.cos(n))){var a=hT(xT.x,xT.y,ST.x,ST.y,bT.x,bT.y,ET,!1);DT.fromArray(ET);var o=Math.PI/2,s=o+Math.acos(wT.dot(t))-n;if(s>=o)G.copy(DT,ST);else{DT.scaleAndAdd(wT,a/Math.tan(Math.PI/2-s));var c=ST.x===xT.x?(DT.y-xT.y)/(ST.y-xT.y):(DT.x-xT.x)/(ST.x-xT.x);if(isNaN(c))return;c<0?G.copy(DT,xT):c>1&&G.copy(DT,ST)}DT.toArray(e[1])}}}function AT(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function jT(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Tt(r[0],r[1]),a=Tt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Ot([],r[1],r[0],o/i),c=Ot([],r[1],r[2],o/a),l=Ot([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function MT(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i)r&&e.removeTextGuideLine();else{for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<hl.length;c++){var l=hl[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:H(i.states[l]&&i.states[l].ignore,s))||!H(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&AT(r,!0,l,u);continue}r||(r=new md,e.setTextGuideLine(r),d||!s&&o||AT(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),AT(r,!1,l,u)}}if(r){A(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=jT}}}function NT(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<ml.length;r++){var i=ml[r];n[i]=e.getModel([i,t])}return n}var PT=Math.PI/180;function FT(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;LT(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}OS(e,1,c,c+o)&&d(e)}function IT(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;VT(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!VT(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,LT(m,g,!1)}}FT(l,t,n,r,1,i,a,o,s,d),FT(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!VT(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function LT(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}RT(a,r)}}}function RT(e,t){BT.rect=e,SS(BT,t,zT)}var zT={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},BT={};function VT(e){return e.position===`center`}function HT(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*PT,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=q(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=q(T,l);var E=w.get(`length2`);if(E=q(E,l),Math.abs(d.endAngle-d.startAngle)<o)N(h.states,p),h.ignore=!0,g&&(N(g.states,p),g.ignore=!0);else if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,ee,te;r=d.cx,i=d.cy;var M=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,te=`center`;else{var P=(M?(d.r+d.r0)/2*O:d.r*O)+r,ne=(M?(d.r+d.r0)/2*k:d.r*k)+i;if(A=P+O*3,j=ne+k*3,!M){var F=P+O*(T+c-d.r),re=ne+k*(T+c-d.r),I=F+(O<0?-1:1)*E,ie=re;A=x===`edge`?O<0?u+S:u+l-S:I+(O<0?-b:b),j=ie,ee=[[P,ne],[F,re],[I,ie]]}te=M?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var L=Math.PI,ae=0,R=v.get(`rotate`);if(se(R))ae=L/180*R;else if(y===`center`)ae=0;else if(R===`radial`||R===!0)ae=O<0?-D+L:-D;else if(R===`tangential`||R===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var z=Math.atan2(O,k);z<0&&(z=L*2+z),k>0&&R!==`tangential-noflip`&&(z=L+z),ae=z-L}if(a=!!ae,h.x=A,h.y=j,h.rotation=ae,h.setStyle({verticalAlign:`middle`}),M){h.setStyle({align:te});var B=h.states.select;B&&(B.x+=h.x,B.y+=h.y)}else{var oe=new K(0,0,0,0);RT(oe,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new G(O,k),linePoints:ee,textAlign:te,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:oe,unconstrainedWidth:oe.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:M})}}),!a&&e.get(`avoidLabelOverlap`)&&IT(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(N(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(N(v.states,p),v.ignore=!0):(OT(x,g.minTurnAngle),kT(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new G(x[0][0],x[0][1])})}}}var UT=Math.PI*2,WT=Math.PI/180,GT=Jc(`pie`,KT);function KT(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=a_(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*WT,d=e.get(`endAngle`),f=e.get(`padAngle`)*WT;d=d===`auto`?u-UT:-d*WT;var p=e.get(`minAngle`)*WT+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;Za(S,!_),u=S[0],d=S[1];var w=qT(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e))n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});else{r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?_s(e,b,[c,s]):s}),O=i}}),E<UT&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}var qT=yc(),JT=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Uo;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=O(kw(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle))i.setShape(l);else{if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Ud(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Ud(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Hd(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Ud(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Jd(i),Hd(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),uu(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=O({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},kw(s.getModel(`itemStyle`),c)),O(i.ensureState(`select`),{x:p,y:m,shape:kw(o.getModel([`select`,`itemStyle`]),c)}),O(i.ensureState(`blur`),{shape:kw(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&O(g.ensureState(`select`),{x:p,y:m}),O(_.ensureState(`select`),{x:p,y:m}),ou(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;qf(r,Jf(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new md,this.setTextGuideLine(d)),MT(this,NT(i),{stroke:s,opacity:he(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(od),YT=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new od({shape:E(qT(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new JT(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){qd(a.getItemGraphicEl(t),e,t)}).execute(),HT(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(py);function XT(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(se(r)&&!isNaN(r)&&r<0)})}}}function ZT(e){e.registerChartView(YT),e.registerSeriesModel(lT),nT(`pie`,e.registerAction),e.registerLayout(GT),e.registerProcessor(aT(`pie`)),e.registerProcessor(XT(`pie`))}var QT=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),$T=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new QT(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new QT(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new QT(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new QT(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new QT(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new QT(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),eE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tE=[],nE=Ne.browser.firefox&&+Ne.browser.version.split(`.`)[0]<39;function rE(e,t,n,r){return n||={},r?iE(e,t,n):nE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?iE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function iE(e,t,n){if(Ne.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Lh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ph(tE,e,r,i)){n.zrX=tE[0],n.zrY=tE[1];return}}n.zrX=n.zrY=0}function aE(e){return e||window.event}function oE(e,t,n){if(t=aE(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&rE(e,i,t,n)}else{rE(e,t,t,n);var a=sE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&eE.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function sE(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function cE(e,t,n,r){e.addEventListener(t,n,r)}function lE(e,t,n,r){e.removeEventListener(t,n,r)}var uE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function dE(e){return e.which===2||e.which===3}var fE=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=rE(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in hE)if(hE.hasOwnProperty(t)){var n=hE[t](this._track,e);if(n)return n}},e}();function pE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function mE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var hE={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=pE(r)/pE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=mE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},gE=`silent`;function _E(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:vE}}function vE(){uE(this.event)}var yE=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vi),bE=function(){function e(e,t){this.x=e,this.y=t}return e}(),xE=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],SE=new K(0,0,0,0),CE=function(e){r(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new bE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new yE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new $T(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(N(xE,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=EE(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new bE(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new bE(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=_E(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new bE(e,t);if(TE(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new K(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u===n||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(SE.copy(u.getBoundingRect()),u.transform&&SE.applyTransform(u.transform),SE.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(TE(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new fE;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new bE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Vi);N([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){CE.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=EE(this,n,r),a,o;if(e===`mouseup`&&i||(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Tt(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function wE(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||gE}return!1}function TE(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=wE(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==gE)){t.target=o;break}}}function EE(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var DE=32,OE=7;function kE(e){for(var t=0;e>=DE;)t|=e&1,e>>=1;return e+t}function AE(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;jE(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function jE(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function ME(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function NE(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function PE(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function FE(e,t){var n=OE,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=PE(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=NE(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0)for(c=0;c<i;c++)e[d+c]=o[l+c];else if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else{for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=PE(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=NE(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=OE||m>=OE);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0)for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];else if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else{for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-PE(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-NE(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=OE||g>=OE);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function IE(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<DE)a=AE(e,n,r,t),ME(e,n,r,n+a,t);else{var o=FE(e,t),s=kE(i);do{if(a=AE(e,n,r,t),a<s){var c=i;c>s&&(c=s),ME(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}}var LE=!1;function RE(){LE||(LE=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function zE(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var BE=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=zE}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,IE(n,zE)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(RE(),p.z=0),isNaN(p.z2)&&(RE(),p.z2=0),isNaN(p.zlevel)&&(RE(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=j(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),VE=Ne.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function HE(){return(/* @__PURE__ */ new Date()).getTime()}var UE=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=HE()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(VE(t),!e._paused&&e.update())}VE(t)},t.prototype.start=function(){this._running||(this._time=HE(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=HE(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=HE()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Bi(e,t.loop);return this.addAnimator(n),n},t}(Vi),WE=300,GE=Ne.domSupported,KE=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:P(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),qE={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},JE=!1;function YE(e){var t=e.pointerType;return t===`pen`||t===`touch`}function XE(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function ZE(e){e&&(e.zrByTouch=!0)}function QE(e,t){return oE(e.dom,new eD(e,t),!0)}function $E(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var eD=function(){function e(e,t){this.stopPropagation=Ae,this.stopImmediatePropagation=Ae,this.preventDefault=Ae,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),tD={mousedown:function(e){e=oE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=oE(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=oE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=oE(this.dom,e);var t=e.toElement||e.relatedTarget;$E(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){JE=!0,e=oE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){JE||(e=oE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=oE(this.dom,e),ZE(e),this.__lastTouchMoment=/* @__PURE__ */ new Date,this.handler.processGesture(e,`start`),tD.mousemove.call(this,e),tD.mousedown.call(this,e)},touchmove:function(e){e=oE(this.dom,e),ZE(e),this.handler.processGesture(e,`change`),tD.mousemove.call(this,e)},touchend:function(e){e=oE(this.dom,e),ZE(e),this.handler.processGesture(e,`end`),tD.mouseup.call(this,e),+/* @__PURE__ */ new Date-this.__lastTouchMoment<WE&&tD.click.call(this,e)},pointerdown:function(e){tD.mousedown.call(this,e)},pointermove:function(e){YE(e)||tD.mousemove.call(this,e)},pointerup:function(e){tD.mouseup.call(this,e)},pointerout:function(e){YE(e)||tD.mouseout.call(this,e)}};N([`click`,`dblclick`,`contextmenu`],function(e){tD[e]=function(t){t=oE(this.dom,t),this.trigger(e,t)}});var nD={pointermove:function(e){YE(e)||nD.mousemove.call(this,e)},pointerup:function(e){nD.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function rD(e,t){var n=t.domHandlers;Ne.pointerEventsSupported?N(KE.pointer,function(r){aD(t,r,function(t){n[r].call(e,t)})}):(Ne.touchEventsSupported&&N(KE.touch,function(r){aD(t,r,function(i){n[r].call(e,i),XE(t)})}),N(KE.mouse,function(r){aD(t,r,function(i){i=aE(i),t.touching||n[r].call(e,i)})}))}function iD(e,t){Ne.pointerEventsSupported?N(qE.pointer,n):Ne.touchEventsSupported||N(qE.mouse,n);function n(n){function r(r){r=aE(r),$E(e,r.target)||(r=QE(e,r),t.domHandlers[n].call(e,r))}aD(t,n,r,{capture:!0})}}function aD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,cE(e.domTarget,t,n,r)}function oD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&lE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var sD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),cD=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new sD(t,tD),GE&&(r._globalHandlerScope=new sD(document,nD)),rD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){oD(this._localHandlerScope),GE&&oD(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,GE&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?iD(this,t):oD(t)}},t}(Vi),lD={},uD={};function dD(e){delete uD[e]}function fD(e){if(!e)return!1;if(typeof e==`string`)return Jr(e,1)<Wi;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Jr(t[i].color,1);return n/=r,n<Wi}return!1}var pD=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new BE,a=n.renderer||`canvas`;lD[a]||(a=I(lD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new lD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Ne.node&&!Ne.worker&&!s?new cD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Ne.touchEventsSupported:!!l,d=44,f;u&&(f=H(n.pointerSize,d)),this.handler=new CE(i,o,c,o.root,f),this.animation=new UE({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=fD(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=HE(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=HE();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof zu&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,dD(this.id))},e}();function mD(e,t){var n=new pD(w(),e,t);return uD[n.id]=n,n}function hD(e,t){lD[e]=t}var gD;function _D(e){if(typeof gD==`function`)return gD(e)}function vD(e){gD=e}var yD=``;typeof navigator<`u`&&(yD=navigator.platform||``);var bD=`rgba(0, 0, 0, 0.2)`,xD=Y.color.theme[0],SD=Gr(xD,null,null,.9),CD={darkMode:`auto`,colorBy:`series`,color:Y.color.theme,gradientColor:[SD,xD],aria:{decal:{decals:[{color:bD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:bD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:bD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:bD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:bD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:bD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:yD.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},wD=U();function TD(e,t,n){var r=wD.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var ED,DD,OD,kD=`\0_ec_inner`,AD=1,jD=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new vp(r),this._locale=new vp(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=ID(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,ID(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?OD(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&N(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=U(),s=t&&t.replaceMergeMainTypeMap;wp(this),N(e,function(e,t){e!=null&&(g_.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?E(e):D(n[t],e,!0))}),s&&s.each(function(e,t){g_.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),g_.topologicalTravel(a,g_.getAllClassMainTypes(),c,this);function c(t){var a=TD(this,t,$s(e[t])),o=r.get(t),c=ic(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);gc(c,t,g_),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;N(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=g_.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=O({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),O(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&ED(this)}this._seriesIndices||ED(this)},t.prototype.getOption=function(){var e=E(this.option);return N(e,function(t,n){if(g_.hasClass(n)){for(var r=$s(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!hc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[kD],e},t.prototype.setTheme=function(e){this._theme=new vp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?F(a,function(e){return!!e}):PD(`name`,i,a):PD(`id`,r,a):(o=[],N($s(n),function(e){a[e]&&o.push(a[e])})),FD(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(FD(r?this.queryComponents(r):F(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?F(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(z(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=B(e)?r.get(e):V(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=pc(e,null);return F(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return F(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return F(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){DD(this),N(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){N(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){DD(this),N(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return N(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return DD(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){DD(this);var n=[];N(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=U(n)},t.prototype.restoreData=function(e){ED(this);var t=this._componentsMap,n=[];t.each(function(e,t){g_.hasClass(t)&&n.push(t)}),g_.topologicalTravel(n,g_.getAllClassMainTypes(),function(n){N(t.get(n),function(t){t&&(n!==`series`||!MD(t,e))&&t.restoreData()})})},t.internalField=function(){ED=function(e){var t=e._seriesIndices=[];N(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=U(t)},DD=function(e){},OD=function(e,t){e.option={},e.option[kD]=AD,e._componentsMap=U({series:[]}),e._componentsCount=U();var n=t.aria;V(n)&&n.enabled==null&&(n.enabled=!0),ND(t,e._theme.option),D(t,CD,!1),e._mergeOption(t,null)}}(),t}(vp);function MD(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function ND(e,t){var n=e.color&&!e.colorLayer;N(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||g_.hasClass(r)||(typeof t==`object`?e[r]=e[r]?D(e[r],t,!1):E(t):e[r]??(e[r]=t))})}function PD(e,t,n){if(R(t)){var r=U();return N(t,function(e){e!=null&&pc(e,null)!=null&&r.set(e,!0)}),F(n,function(t){return t&&r.get(t[e])})}var i=pc(t,null);return F(n,function(t){return t&&i!=null&&t[e]===i})}function FD(e,t){return t.hasOwnProperty(`subType`)?F(e,function(e){return e&&e.subType===t.subType}):e}function ID(e){var t=U();return e&&N($s(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}te(jD,b_);var LD=/^(min|max)?(.+)$/,RD=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(N($s(e.series),function(e){e&&e.data&&le(e.data)&&xe(e.data)}),N($s(e.dataset),function(e){e&&e.source&&le(e.source)&&xe(e.source)})),e=E(e);var r=this._optionBackup,i=zD(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],E(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=E(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)BD(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!HD(a,this._currentMediaIndices)&&(o=P(a,function(e){return E(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function zD(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&R(l)&&N(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),N(c,function(e){return f(e)}),N(r,function(e){return f(e.option)});function f(e){N(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function BD(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return N(e,function(e,t){var n=t.match(LD);if(n&&n[1]&&n[2]){var a=n[1];VD(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function VD(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function HD(e,t){return e.join(`,`)===t.join(`,`)}var UD=N,WD=V,GD=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function KD(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=GD.length;n<r;n++){var i=GD[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?D(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?D(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function qD(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,A(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function JD(e){qD(e,`itemStyle`),qD(e,`lineStyle`),qD(e,`areaStyle`),qD(e,`label`),qD(e,`labelLine`),qD(e,`upperLabel`),qD(e,`edgeLabel`)}function YD(e,t){var n=WD(e)&&e[t],r=WD(n)&&n.textStyle;if(r)for(var i=0,a=tc.length;i<a;i++){var o=tc[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function XD(e){e&&(JD(e),YD(e,`label`),e.emphasis&&YD(e.emphasis,`label`))}function ZD(e){if(WD(e)){KD(e),JD(e),YD(e,`label`),YD(e,`upperLabel`),YD(e,`edgeLabel`),e.emphasis&&(YD(e.emphasis,`label`),YD(e.emphasis,`upperLabel`),YD(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(KD(t),XD(t));var n=e.markLine;n&&(KD(n),XD(n));var r=e.markArea;r&&XD(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!le(a))for(var o=0;o<a.length;o++)XD(a[o]);N(e.categories,function(e){JD(e)})}if(i&&!le(i))for(var o=0;o<i.length;o++)XD(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)XD(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)R(c[o])?(XD(c[o][0]),XD(c[o][1])):XD(c[o]);e.type===`gauge`?(YD(e,`axisLabel`),YD(e,`title`),YD(e,`detail`)):e.type===`treemap`?(qD(e.breadcrumb,`itemStyle`),N(e.levels,function(e){JD(e)})):e.type===`tree`&&JD(e.leaves)}}function QD(e){return R(e)?e:e?[e]:[]}function $D(e){return(R(e)?e[0]:e)||{}}function eO(e,t){UD(QD(e.series),function(e){WD(e)&&ZD(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),UD(n,function(t){UD(QD(e[t]),function(e){e&&(YD(e,`axisLabel`),YD(e.axisPointer,`label`))})}),UD(QD(e.parallel),function(e){var t=e&&e.parallelAxisDefault;YD(t,`axisLabel`),YD(t&&t.axisPointer,`label`)}),UD(QD(e.calendar),function(e){qD(e,`itemStyle`),YD(e,`dayLabel`),YD(e,`monthLabel`),YD(e,`yearLabel`)}),UD(QD(e.radar),function(e){YD(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),UD(QD(e.geo),function(e){WD(e)&&(XD(e),UD(QD(e.regions),function(e){XD(e)}))}),UD(QD(e.timeline),function(e){XD(e),qD(e,`label`),qD(e,`itemStyle`),qD(e,`controlStyle`,!0);var t=e.data;R(t)&&N(t,function(e){V(e)&&(qD(e,`label`),qD(e,`itemStyle`))})}),UD(QD(e.toolbox),function(e){qD(e,`iconStyle`),UD(e.feature,function(e){qD(e,`iconStyle`)})}),YD($D(e.axisPointer),`label`),YD($D(e.tooltip).axisPointer,`label`)}function tO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function nO(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function rO(e){e&&N(iO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var iO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],aO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],oO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function sO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<oO.length;n++){var r=oO[n][1],i=oO[n][0];t[r]!=null&&(t[i]=t[r])}}function cO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function lO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function uO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function dO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&dO(e[n].children,t)}function fO(e,t){eO(e,t),e.series=$s(e.series),N(e.series,function(e){if(V(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),cO(e.label);var n=e.data;if(n&&!le(n))for(var r=0;r<n.length;r++)cO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=tO(e,`pointer.color`);i!=null&&nO(e,`itemStyle.color`,i)}else if(t===`bar`){sO(e),sO(e.backgroundStyle),sO(e.emphasis);var n=e.data;if(n&&!le(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(sO(n[r]),sO(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),lO(e),dO(e.data,lO)}else t===`graph`||t===`sankey`?uO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&A(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),rO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),N(aO,function(t){var n=e[t];n&&(R(n)||(n=[n]),N(n,function(e){rO(e)}))})}var pO=Yc(mO);function mO(e){var t=U();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),N(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),hO(e))})}function hO(e){N(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Os(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var gO=function(){function e(){this.group=new zu,this.uid=Ch(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Ve(gO),Je(gO);var _O=yc(),vO={itemStyle:Ye(hp,!0),lineStyle:Ye(fp,!0)},yO={lineStyle:`stroke`,itemStyle:`fill`};function bO(e,t){return e.visualStyleMapper||vO[t]||(console.warn(`Unknown style type '`+t+`'.`),vO.itemStyle)}function xO(e,t){return e.visualDrawType||yO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var SO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=bO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=xO(e,r),c=a[s],l=z(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||z(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||z(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=O({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},CO=new vp,wO={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=bO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){CO.option=n[r];var o=i(CO);O(e.ensureUniqueItemVisual(t,`style`),o),CO.option.decal&&(e.setItemVisual(t,`decal`,CO.option.decal),CO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},TO={performRawSeries:!0,overallReset:function(e){var t=U();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();_O(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=_O(e).scope,a=xO(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},EO=Math.PI;function DO(e,t){t||={},A(t,{text:`loading`,textColor:Y.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Y.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new zu,r=new Ro({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Uo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ro({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Cd({shape:{startAngle:-EO/2,endAngle:-EO/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:EO*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:EO*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var OO=function(){function e(e,t,n,r){this._stageTaskMap=U(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):qc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=U();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;N(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ve(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;N(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=U(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||O_({plan:NO,reset:PO,count:LO}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||O_({reset:kO});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=U(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;ve(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):N(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,O_({reset:AO,onDirty:MO})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return z(e)&&(e={overallReset:e,seriesType:RO(e)}),e.uid=Ch(`stageHandler`),t&&(e.visualType=t),e},e}();function kO(e){e.overallReset(e.ecModel,e.api,e.payload)}function AO(e){return e.dirtyOnOverallProgress&&jO}function jO(){this.agent.dirty(),this.getDownstream().dirty()}function MO(){this.agent&&this.agent.dirty()}function NO(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function PO(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$s(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?P(t,function(e,t){return IO(t)}):FO}var FO=IO(0);function IO(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function LO(e){return e.data.count()}function RO(e){VO=null;try{e(zO,BO)}catch{}return VO}var zO={},BO={},VO;HO(zO,jD),HO(BO,cl),zO.eachSeriesByType=zO.eachRawSeriesByType=function(e){VO=e},zO.eachComponent=function(e){e.mainType===`series`&&e.subType&&(VO=e.subType)};function HO(e,t){for(var n in t.prototype)e[n]=Ae}var X=Y.darkColor,UO=X.background,WO=function(){return{axisLine:{lineStyle:{color:X.axisLine}},splitLine:{lineStyle:{color:X.axisSplitLine}},splitArea:{areaStyle:{color:[X.backgroundTint,X.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:X.axisMinorSplitLine}},axisLabel:{color:X.axisLabel},axisName:{}}},GO={label:{color:X.secondary},itemStyle:{borderColor:X.borderTint},dividerLineStyle:{color:X.border}},KO={darkMode:!0,color:X.theme,backgroundColor:UO,axisPointer:{lineStyle:{color:X.border},crossStyle:{color:X.borderShade},label:{color:X.tertiary}},legend:{textStyle:{color:X.secondary},pageTextStyle:{color:X.tertiary}},textStyle:{color:X.secondary},title:{textStyle:{color:X.primary},subtextStyle:{color:X.quaternary}},toolbox:{iconStyle:{borderColor:X.accent50},feature:{dataView:{backgroundColor:UO,textColor:X.primary,textareaColor:X.background,textareaBorderColor:X.border,buttonColor:X.accent50,buttonTextColor:X.neutral00}}},tooltip:{backgroundColor:X.neutral20,defaultBorderColor:X.border,textStyle:{color:X.tertiary}},dataZoom:{borderColor:X.accent10,textStyle:{color:X.tertiary},brushStyle:{color:X.backgroundTint},handleStyle:{color:X.neutral00,borderColor:X.accent20},moveHandleStyle:{color:X.accent40},emphasis:{handleStyle:{borderColor:X.accent50}},dataBackground:{lineStyle:{color:X.accent30},areaStyle:{color:X.accent20}},selectedDataBackground:{lineStyle:{color:X.accent50},areaStyle:{color:X.accent30}}},visualMap:{textStyle:{color:X.secondary},handleStyle:{borderColor:X.neutral30}},timeline:{lineStyle:{color:X.accent10},label:{color:X.tertiary},controlStyle:{color:X.accent30,borderColor:X.accent30}},calendar:{itemStyle:{color:X.neutral00,borderColor:X.neutral20},dayLabel:{color:X.tertiary},monthLabel:{color:X.secondary},yearLabel:{color:X.secondary}},matrix:{x:GO,y:GO,backgroundColor:{borderColor:X.axisLine},body:{itemStyle:{borderColor:X.borderTint}}},timeAxis:WO(),logAxis:WO(),valueAxis:WO(),categoryAxis:WO(),line:{symbol:`circle`},graph:{color:X.theme},gauge:{title:{color:X.secondary},axisLine:{lineStyle:{color:[[1,X.neutral05]]}},axisLabel:{color:X.axisLabel},detail:{color:X.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:X.background}},radar:function(){var e=WO();return e.axisName={color:X.axisLabel},e.axisLine.lineStyle.color=X.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:X.neutral20,textStyle:{color:X.secondary}},emphasis:{itemStyle:{color:X.neutral30}}}},sunburst:{itemStyle:{borderColor:X.background}},map:{itemStyle:{borderColor:X.border,areaColor:X.neutral10},label:{color:X.tertiary},emphasis:{label:{color:X.primary},itemStyle:{areaColor:X.highlight}},select:{label:{color:X.primary},itemStyle:{areaColor:X.highlight}}},geo:{itemStyle:{borderColor:X.border,areaColor:X.neutral10},emphasis:{label:{color:X.primary},itemStyle:{areaColor:X.highlight}},select:{label:{color:X.primary},itemStyle:{color:X.highlight}}}};KO.categoryAxis.splitLine.show=!1;var qO=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(B(e)){var i=Re(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};N(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),JO=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],YO=JO.concat([`symbolKeepAspect`]),XO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<JO.length;o++){var s=JO[o],c=e.get(s);z(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(O({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=I(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},ZO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<YO.length;r++){var i=YO[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function QO(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function $O(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function ek(e,t,n,r){switch(n){case`color`:var i=e.ensureUniqueItemVisual(t,`style`);i[e.getVisual(`drawType`)]=r,e.setItemVisual(t,`colorFromPalette`,!1);break;case`opacity`:e.ensureUniqueItemVisual(t,`style`).opacity=r;break;case`symbol`:case`symbolSize`:case`liftZ`:e.setItemVisual(t,n,r)}}function tk(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var nk=new Vi,rk={};function ik(e,t){rk[e]=t}function ak(e){return rk[e]}var ok={};function sk(e,t){ok[e]=t}var ck=Math.round(Math.random()*9),lk=typeof Object.defineProperty==`function`,uk=function(){function e(){this._id=`__ec_inner_`+ck++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return lk?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function dk(e){return isFinite(e)}function fk(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=dk(r)?r:0,i=dk(i)?i:1,a=dk(a)?a:0,o=dk(o)?o:0,e.createLinearGradient(r,a,i,o)}function pk(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=dk(o)?o:.5,s=dk(s)?s:.5,c=c>=0&&dk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function mk(e,t,n){for(var r=t.type===`radial`?pk(e,t,n):fk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function hk(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function gk(e){return parseInt(e,10)}function _k(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||gk(s[r])||gk(e.style[r]))-(gk(s[a])||0)-(gk(s[o])||0)||0}function vk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:se(e)?[e]:R(e)?e:null}function yk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&vk(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=P(n,function(e){return e/i}),r/=i)}return[n,r]}var bk=new Qa(!0);function xk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Sk(e){return typeof e==`string`&&e!==`none`}function Ck(e){var t=e.fill;return t!=null&&t!==`none`}function wk(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Tk(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Ek(e,t,n){var r=rt(t.image,t.__image,n);if(at(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*je),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Dk(e,t,n,r,i){var a,o=xk(n),s=Ck(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||bk,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?mk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?mk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Ek(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Ek(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=yk(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Tk(e,n),s&&wk(e,n)):(s&&wk(e,n),o&&Tk(e,n)),T&&e.setLineDash([])}function Ok(e,t,n){var r=t.__image=rt(n.image,t.__image,t,t.onload);if(r&&at(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function kk(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=yk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(xk(n)&&e.strokeText(i,n.x,n.y),Ck(n)&&e.fillText(i,n.x,n.y)):(Ck(n)&&e.fillText(i,n.x,n.y),xk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Ak=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],jk=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Mk(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Uk(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fa.opacity:o}(r||t.blend!==n.blend)&&(a||=(Uk(e,i),!0),e.globalCompositeOperation=t.blend||fa.blend);for(var s=0;s<Ak.length;s++){var c=Ak[s];(r||t[c]!==n[c])&&(a||=(Uk(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(Uk(e,i),!0),e.shadowColor=t.shadowColor||fa.shadowColor),a}function Nk(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=Mk(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(Uk(e,i),!0),Sk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(Uk(e,i),!0),Sk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(Uk(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(Uk(e,i),!0),e.lineWidth=c)}for(var l=0;l<jk.length;l++){var u=jk[l],d=u[0];(r||a[d]!==o[d])&&(s||=(Uk(e,i),!0),e[d]=a[d]||u[1])}return s}function Pk(e,t,n,r,i){return Mk(e,t.style,n&&n.style,r,i)}function Fk(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function Ik(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),Fk(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function Lk(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var Rk=1,zk=2,Bk=3,Vk=4;function Hk(e){var t=Ck(e),n=xk(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function Uk(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function Wk(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};Gk(e,t,n),Kk(e,n)}function Gk(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))t.__dirty&=-2,t.__isRendered=!1;else{var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||hk(i,a))&&(a&&(Uk(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(Uk(e,n),e.save(),Ik(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped)t.__dirty&=-2,t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof wo&&t.autoBatch&&Hk(o);s||Lk(r,l.transform)?(Uk(e,n),Fk(e,t)):u||Uk(e,n),t instanceof wo?(n.lastDrawType!==Rk&&(c=!0,n.lastDrawType=Rk),Nk(e,t,l,c,n),u&&(n.batchFill||n.batchStroke)||e.beginPath(),Dk(e,t,o,u,n)):t instanceof Eo?(n.lastDrawType!==Bk&&(c=!0,n.lastDrawType=Bk),Nk(e,t,l,c,n),kk(e,t,o)):t instanceof Ao?(n.lastDrawType!==zk&&(c=!0,n.lastDrawType=zk),Pk(e,t,l,c,n),Ok(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==Vk&&(c=!0,n.lastDrawType=Vk),qk(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&Uk(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}}function Kk(e,t){Uk(e,t),t.prevElClipPaths&&e.restore()}function qk(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();for(var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Gk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}Kk(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Gk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}Kk(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Jk=new uk,Yk=new et(100),Xk=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function Zk(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&Jk.delete(e);var a=Jk.get(e);if(a)return a;var o=A(e,{symbol:`rect`,symbolSize:1,symbolKeepAspect:!0,color:`rgba(0, 0, 0, 0.2)`,backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor===`none`&&(o.backgroundColor=null);var s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,Jk.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<Xk.length;++s){var c=o[Xk[s]];if(c!=null&&!R(c)&&!B(c)&&!se(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var d=Yk.get(l);d&&(i?e.svgElement=d:e.image=d)}var f=$k(o.dashArrayX),p=eA(o.dashArrayY),m=Qk(o.symbol),h=tA(f),g=nA(p),_=!i&&u.createCanvas(),v=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},y=x(),b;_&&(_.width=y.width*n,_.height=y.height*n,b=_.getContext(`2d`)),S(),a&&Yk.put(l,_||v),e.image=_,e.svgElement=v,e.svgWidth=y.width,e.svgHeight=y.height;function x(){for(var e=1,t=0,n=h.length;t<n;++t)e=Hs(e,h[t]);for(var r=1,t=0,n=m.length;t<n;++t)r=Hs(r,m[t].length);e*=r;var i=g*h.length*m.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function S(){b&&(b.clearRect(0,0,_.width,_.height),o.backgroundColor&&(b.fillStyle=o.backgroundColor,b.fillRect(0,0,_.width,_.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;for(var a=-g,s=0,c=0,l=0;a<y.height;){if(s%2==0){for(var u=c/2%m.length,d=0,h=0,x=0;d<y.width*2;){for(var S=0,t=0;t<f[l].length;++t)S+=f[l][t];if(S<=0)break;if(h%2==0){var C=(1-o.symbolSize)*.5,w=d+f[l][h]*C,T=a+p[s]*C,E=f[l][h]*o.symbolSize,D=p[s]*o.symbolSize,O=x/2%m[u].length;k(w,T,E,D,m[u][O])}d+=f[l][h],++x,++h,h===f[l].length&&(h=0)}++l,l===f.length&&(l=0)}a+=p[s],++c,++s,s===p.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=Pv(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&v.children.push(d)}else Wk(b,u)}}}}function Qk(e){if(!e||e.length===0)return[[`rect`]];if(B(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!B(e[n])){t=!1;break}if(t)return Qk([e]);for(var r=[],n=0;n<e.length;++n)B(e[n])?r.push([e[n]]):r.push(e[n]);return r}function $k(e){if(!e||e.length===0)return[[0,0]];if(se(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!se(e[r])){n=!1;break}if(n)return $k([e]);for(var i=[],r=0;r<e.length;++r)if(se(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=P(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function eA(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(se(e)){var t=Math.ceil(e);return[t,t]}var n=P(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function tA(e){return P(e,function(e){return nA(e)})}function nA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var rA=Yc(iA);function iA(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=Zk(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=Zk(i,t)}}})}var aA=1,oA=800,sA=900,cA=920,lA=1e3,uA=2e3,dA=5e3,fA=1e3,pA=1100,mA=2e3,hA=3e3,gA=4e3,_A=4500,vA=4600,yA=5e3,bA=6e3,xA=7e3,SA={PROCESSOR:{SERIES_FILTER:oA,AXIS_STATISTICS:cA,FILTER:lA,STATISTIC:dA,STATISTICS:dA},VISUAL:{LAYOUT:fA,PROGRESSIVE_LAYOUT:pA,GLOBAL:mA,CHART:hA,POST_CHART_LAYOUT:vA,COMPONENT:gA,BRUSH:yA,CHART_ITEM:_A,ARIA:bA,DECAL:xA}},CA=`__flagInMainProcess`,wA=`__mainProcessVersion`,TA=`__pendingUpdate`,EA=`__needsUpdateStatus`,DA=/^[a-zA-Z0-9_]+$/,OA=`__connectUpdateStatus`,kA=0,AA=1,jA=2;function MA(e){return function(){var t=[...arguments];if(this.isDisposed())this.id;else return PA(this,e,t)}}function NA(e){return function(){var t=[...arguments];return PA(this,e,t)}}function PA(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Vi.prototype[t].apply(e,n)}var FA=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Vi),IA=FA.prototype;IA.on=NA(`on`),IA.off=NA(`off`);var LA,RA,zA,BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj=function(e){r(t,e);function t(t,n,r){var i=e.call(this,new qO)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[wA]=1,r.ssr&&vD(function(e){var t=J(e),n=t.dataIndex;if(n!=null){var r=U();return r.set(`series_index`,t.seriesIndex),r.set(`data_index`,n),t.ssrType&&r.set(`ssr_type`,t.ssrType),r}});var c=i._zr=mD(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:H(r.useDirtyRect,s),useCoarsePointer:H(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=bw(L(c.flush,c),17),i._updateTheme(n),i._locale=Xh(r.locale||Jh),i._coordSysMgr=new th;var l=i._api=ZA(i);function u(e,t){return e.__prio-t.__prio}return IE(uj,u),IE(cj,u),i._scheduler=new OO(i,l,cj,uj),i._messageCenter=new FA,i._initEvents(),i.resize=L(i.resize,i),c.animation.on(`frame`,i._onframe,i),KA(c,i),qA(c,i),xe(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(ej(this),this[TA]){var r=this[TA].silent;this[CA]=!0,tj(this);try{LA(this),BA.update.call(this,null,this[TA].updateParams)}catch(e){throw this[CA]=!1,this[TA]=null,e}this._zr.flush(),this[CA]=!1,this[TA]=null,WA.call(this,r),GA.call(this,r)}else if(e.unfinished){var i=aA;do{e.unfinished=!1;var a=u.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),HA(this,t),e.performVisualTasks(t),XA(this,this._model,n,`remain`,{}),i-=u.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[CA]){if(this._disposed)this.id;else{var r,i,a;if(V(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[CA]=!0,tj(this),!this._model||t){var o=new RD(this._api),s=this._theme,c=this._model=new jD;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},lj);var l={seriesTransition:a,optionChanged:!0};if(n)this[TA]={silent:r,updateParams:l},this[CA]=!1,this.getZr().wakeUp();else{try{LA(this),BA.update.call(this,null,l)}catch(e){throw this[TA]=null,this[CA]=!1,e}this._ssr||this._zr.flush(),this[TA]=null,this[CA]=!1,WA.call(this,r),GA.call(this,r)}}}},t.prototype.setTheme=function(e,t){if(!this[CA]){if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[TA]&&(r??=this[TA].silent,i=this[TA].updateParams,this[TA]=null),this[CA]=!0,tj(this);try{this._updateTheme(e),n.setTheme(this._theme),LA(this),BA.update.call(this,{type:`setTheme`},i)}catch(e){throw this[CA]=!1,e}this[CA]=!1,WA.call(this,r),GA.call(this,r)}}}},t.prototype._updateTheme=function(e){B(e)&&(e=dj[e]),e&&(e=E(e),e&&fO(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ne.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return N(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed)this.id;else{e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;N(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return N(r,function(e){e.group.ignore=!1}),a}},t.prototype.getConnectedDataURL=function(e){if(this._disposed)this.id;else{var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(mj[n]){var o=a,s=a,c=-a,l=-a,d=[],f=e&&e.pixelRatio||this.getDevicePixelRatio();N(pj,function(a,u){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(E(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),d.push({dom:f,left:p.left,top:p.top})}}),o*=f,s*=f,c*=f,l*=f;var p=c-o,m=l-s,h=u.createCanvas(),g=mD(h,{renderer:t?`svg`:`canvas`});if(g.resize({width:p,height:m}),t){var _=``;return N(d,function(e){var t=e.left-o,n=e.top-s;_+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),g.painter.getSvgRoot().innerHTML=_,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Ro({shape:{x:0,y:0,width:p,height:m},style:{fill:e.connectedBackgroundColor}})),N(d,function(e){var t=new Ao({style:{x:e.left*f-o,y:e.top*f-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),h.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)}},t.prototype.convertToPixel=function(e,t,n){return VA(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return VA(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return VA(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed)this.id;else{var n=this._model,r;return N(xc(n,e),function(e,n){n.indexOf(`Models`)>=0&&N(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r}},t.prototype.getVisual=function(e,t){var n=this._model,r=xc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?$O(i,t):QO(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;N(ij,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&tk(i,function(e){var t=J(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=O({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;N(sj,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),iT(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Dc(this.getDom(),gj,``);var e=this,t=e._api,n=e._model;N(e._componentsViews,function(e){e.dispose(n,t)}),N(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete pj[e.id]}},t.prototype.resize=function(e){if(!this[CA]){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[TA]&&(r??=this[TA].silent,n=!0,this[TA]=null),this[CA]=!0,tj(this);try{n&&LA(this),BA.update.call(this,{type:`resize`,animation:O({duration:0},e&&e.animation)})}catch(e){throw this[CA]=!1,e}this[CA]=!1,WA.call(this,r),GA.call(this,r)}}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(V(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),fj[e]){var n=fj[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=O({},e);return t.type=oj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(V(t)||(t={silent:!!t}),aj[e.type]&&this._model){if(this[CA])this._pendingActions.push(e);else{var n=t.silent;UA.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ne.browser.weChat&&this._throttledZrFlush(),WA.call(this,n),GA.call(this,n)}}},t.prototype.updateLabelLayout=function(){nk.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){LA=function(e){Ix(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),RA(e,!0),RA(e,!1),t.plan()},RA=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=Re(e.type);u=new(t?gO.getClass(d.main,d.sub):py.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},zA=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){N([].concat(e._componentsViews,e._chartsViews),l);return}var o=Ec(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=U(),N($s(s),function(e){var t=pc(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(hu(n)){if(t instanceof yv)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&Zl(t,n,e._api);else{var r=Ql(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Xl(t.mainType,t.componentIndex,e._api),a&&N(a,function(e){n.type===`highlight`?Vl(e):Hl(e)})}}else mu(n)&&t instanceof yv&&(tu(t,n,e._api),nu(t),$A(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},BA={prepareAndUpdate:function(e){LA(this),BA.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){Lx(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),nk.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),HA(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),JA(this,r,i,e,n),nk.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=U();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),XA(t,n,r,e,{},a),nk.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),py.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),JA(this,n,this._api,e,{}),nk.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),py.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),nk.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){BA.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed)e.id;else for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=xc(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}VA=e,HA=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},UA=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=aj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Re(s[0]);this[CA]=!0,tj(this);var u=[e],d=!1;e.batch&&(d=!0,u=P(e.batch,function(t){return t=A(O({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=mu(e),_=hu(e);if(_&&Jl(this._api),N(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=O({},t),p.type=h,f.push(p),_){var a=Sc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;zA(n,c,t,u),$A(n)}else g?(zA(n,c,t,`series`),$A(n)):l&&zA(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[TA]?(LA(this),BA.update.call(this,e),this[TA]=null):BA[c].call(this,e)}catch(e){throw this[CA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[CA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;ve(V(y)),v=A({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},WA=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();UA.call(this,n,e)}},GA=function(e){!e&&this.trigger(`updated`)},KA=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[TA]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},qA=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=tk(n,fu);r&&($l(r,e,t._api),$A(t))}).on(`mouseout`,function(e){var n=e.target,r=tk(n,fu);r&&(eu(r,e,t._api),$A(t))}).on(`click`,function(e){var n=e.target,r=tk(n,function(e){return J(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=J(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;IE(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),N(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}JA=function(e,t,r,i,a){n(t),YA(e,t,r,i,a),N(e._chartsViews,function(e){e.__alive=!1}),XA(e,t,r,i,a),N(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},YA=function(e,t,n,r,i,a){N(a||e._componentsViews,function(e){var i=e.__model;c(i,e),e.render(i,t,n,r),s(i,e),l(i,e)})},XA=function(e,t,n,r,i,u){var d=e._scheduler;i=O(i||{},{updatedSeries:t.getSeries()}),nk.trigger(`series:beforeupdate`,t,n,i);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),c(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),o(t,n),nu(t)}),d.unfinished=f||d.unfinished,nk.trigger(`series:layoutlabels`,t,n,i),nk.trigger(`series:transition`,t,n,i),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];s(t,n),l(t,n)}),a(e,t),nk.trigger(`series:afterupdate`,t,n,i)},$A=function(e){e[EA]=!0,e.getZr().wakeUp()},tj=function(e){e[wA]=(e[wA]+1)%1e6},ej=function(e){e[EA]&&(e.getZr().storage.traverse(function(e){Wd(e)||i(e)}),e[EA]=!1)};function i(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function a(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>H(t.get(`hoverLayerThreshold`),CD.hoverLayerThreshold)&&!Ne.node&&!Ne.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function o(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function s(e,t){if(!e.preventAutoZ){var n=If(e);t.eachRendered(function(e){return Rf(e,n.z,n.zlevel),!0})}}function c(e,t){t.eachRendered(function(e){if(!Wd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function l(e,t){var n=e.getModel(`stateAnimation`),r=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Wd(e))return;if(e instanceof wo&&gu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(r){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&i(e)}})}ZA=function(e){return new(function(t){r(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Vl(t,n),$A(e)},n.prototype.leaveEmphasis=function(t,n){Hl(t,n),$A(e)},n.prototype.enterBlur=function(t){Ul(t),$A(e)},n.prototype.leaveBlur=function(t){Wl(t),$A(e)},n.prototype.enterSelect=function(t){Gl(t),$A(e)},n.prototype.leaveSelect=function(t){Kl(t),$A(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[wA]},n.prototype.usingTHL=function(){return e._usingTHL},n}(cl))(e)},QA=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[OA]=t}}N(oj,function(n,r){e._messageCenter.on(r,function(n){if(mj[e.group]&&e[OA]!==kA){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];N(pj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,kA),N(i,function(e){e[OA]!==AA&&e.dispatchAction(r)}),t(i,jA)}})})}}(),t}(Vi),rj=nj.prototype;rj.on=MA(`on`),rj.off=MA(`off`),rj.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var ij=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],aj={},oj={},sj={},cj=[],lj=[],uj=[],dj={},fj={},pj={},mj={},hj=/* @__PURE__ */ new Date-0;/* @__PURE__ */ new Date-0;var gj=`_echarts_instance_`;function _j(e,t,n){var r=!(n&&n.ssr);if(r){var i=vj(e);if(i)return i}var a=new nj(e,t,n);return a.id=`ec_`+hj++,pj[a.id]=a,r&&Dc(e,gj,a.id),QA(a),nk.trigger(`afterinit`,a),a}function vj(e){return pj[Oc(e,gj)]}function yj(e,t){dj[e]=t}function bj(e){j(lj,e)<0&&lj.push(e)}function xj(e,t){Aj(cj,e,t,uA)}function Sj(e){wj(`afterinit`,e)}function Cj(e){wj(`afterupdate`,e)}function wj(e,t){nk.on(e,t)}function Tj(e,t,n){var r,i,a,o,s;z(t)&&(n=t,t=``),V(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;aj[r]||(ve(DA.test(r)&&DA.test(i)),a&&ve(i!==r),aj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},sj[i]=1,a&&s&&(sj[l]=1),oj[l]=r)}function Ej(e,t){th.register(e,t)}function Dj(e,t){Aj(uj,e,t,fA,`layout`,!0)}function Oj(e,t){Aj(uj,e,t,hA,`visual`,!0)}var kj=[];function Aj(e,t,n,r,i,a){if((z(t)||V(t))&&(n=t,t=r),!(j(kj,n)>=0)){kj.push(n);var o=OO.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function jj(e,t){fj[e]=t}function Mj(e,t,n){var r=ak(`registerMap`);r&&r(e,t,n)}var Nj=R_;Oj(mA,SO),Oj(_A,wO),Oj(_A,TO),Oj(mA,XO),Oj(_A,ZO),Oj(xA,rA),bj(fO),xj(sA,pO),jj(`default`,DO),Tj({type:gl,event:gl,update:gl},Ae),Tj({type:_l,event:_l,update:_l},Ae),Tj({type:vl,event:xl,update:vl,action:Ae,refineEvent:Pj,publishNonRefinedEvent:!0}),Tj({type:yl,event:xl,update:yl,action:Ae,refineEvent:Pj,publishNonRefinedEvent:!0}),Tj({type:bl,event:xl,update:bl,action:Ae,refineEvent:Pj,publishNonRefinedEvent:!0});function Pj(e,t,n,r){return{eventContent:{selected:ru(n),isFromClick:t.isFromClick||!1}}}yj(`default`,{}),yj(`dark`,KO);var Fj=[],Ij={registerPreprocessor:bj,registerProcessor:xj,registerPostInit:Sj,registerPostUpdate:Cj,registerUpdateLifecycle:wj,registerAction:Tj,registerCoordinateSystem:Ej,registerLayout:Dj,registerVisual:Oj,registerTransform:Nj,registerLoading:jj,registerMap:Mj,registerImpl:ik,PRIORITY:SA,ComponentModel:g_,ComponentView:gO,SeriesModel:yv,ChartView:py,registerComponentModel:function(e){g_.registerClass(e)},registerComponentView:function(e){gO.registerClass(e)},registerSeriesModel:function(e){yv.registerClass(e)},registerChartView:function(e){py.registerClass(e)},registerCustomSeries:function(e,t){sk(e,t)},registerSubTypeDefaulter:function(e,t){g_.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){hD(e,t)}};function Lj(e){R(e)?N(e,function(e){Lj(e)}):j(Fj,e)>=0||(Fj.push(e),z(e)&&(e={install:e}),e.install(Ij))}var Rj=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return yh(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Y.color.primary}},universalTransition:{divideShape:`clone`}},t}(yv),zj=4,Bj=function(){function e(){}return e}(),Vj=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new Bj},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<zj,c=this.softClipShape,l;if(s)this._ctx=o;else{for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||(!c||c.contain(u,d))&&(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)}},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||(!i||i.contain(o,s))&&r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new K(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(wo),Hj=function(){function e(){this.group=new zu}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new Vj({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=Pv(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<zj;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=J(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Uj=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,Wj(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Kc(t),Wj(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=sx(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(Wj(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new Hj:new Kv,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(py);function Wj(e){return{clipShape:Sy(e)}}var Gj=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),Kj=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Cc).models[0]},t.type=`cartesian2dAxis`,t}(g_);te(Kj,Gj);var qj={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Y.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Y.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Y.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Y.color.backgroundTint,Y.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Y.color.neutral00,borderColor:Y.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},Jj=D({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},qj),Yj=D({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Y.color.axisMinorSplitLine,width:1}}},qj),Xj={category:Jj,value:Yj,time:D({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},Yj),log:A({logBase:10},Yj)};function Zj(e,t,n,i){N(Tb,function(a,o){var s=D(D({},Xj[o],!0),i,!0),c=function(e){r(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+o,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=d_(this),r=n?p_(e):{};D(e,t.getTheme().get(o+`Axis`)),D(e,this.getDefaultOption()),e.type=Qj(e),n&&f_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Ay.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=PS();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+o,n.defaultOption=s,n}(n);e.registerComponentModel(c)}),e.registerSubTypeDefaulter(t+`Axis`,Qj)}function Qj(e){return e.type||(e.data?`category`:`value`)}var $j=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return P(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),F(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),eM=[`x`,`y`];function tM(e){return(e.type===`interval`||e.type===`time`)&&!ig(e)}var nM=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=nw,t.dimensions=eM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(tM(e)&&tM(t)){var n=Ly(e,null),r=Ly(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=pt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return kt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return kt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new K(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}($j);function rM(e,t){var n=e.scale,r=e.model,i=UC(n,r,r.ecModel,e,null),a=Ky(n),o=Ky(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=cs(l[0].value-l[1].value),g=cs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=Qy(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*ss(c,2):Jy(E),D=Yy(E)}function j(){w=Ss(k-E*f,D)}function ee(){T=Ss(O+E*p,D)}function te(){k=f?Ss(w+E*f,D):w}function M(){O=p?Ss(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var N=e.getExtent(),P=cs(N[1]-N[0]);D=Es([T,w],P,.5/m),te(),M(),Us(D)&&(E=Ss(E,D))}else{var ne=C[1]-C[0];E=a?ss(Ps(ne),1):Is(ne/m,2),D=Yy(E),b[0]?(w=C[0],A(function(){if(te(),O=Ss(k+E*m,D),ee(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(M(),k=Ss(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Ss(ds(C[0]/E)*E,D),O=Ss(us(C[1]/E)*E,D);var e=ls((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=us(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Ss(k-E*n[0],D),O=Ss(O+E*n[1],D),j(),ee(),w<=C[0]&&T>=C[1])return!0}})}Vb(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function iM(e,t){var n=Ky(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Qy(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?oM(r,t):aM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Yy(d)),i[0]||(s[0]=Ss(us(s[0]/u)*u,l)),i[1]||(s[1]=Ss(ds(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Vb(e,i,o,s,a,c)}function aM(e,t){var n=eb(t.splitNumber,5),r=zy(e),i=t.minInterval,a=t.maxInterval,o=Is(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Yy(o),c=e.getExtent(),l=[Ss(ds(c[0]/o)*o,s),Ss(us(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function oM(e,t){var n=eb(t.splitNumber,10),r=e.getExtent(),i=zy(e),a=ss(Ps(i),1);n/i*a<=.5&&(a*=10);var o=Yy(a),s=[Ss(ds(r[0]/a)*a,o),Ss(us(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function sM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;cM(t,n,r,i,null)}function cM(e,t,n,r,i){var a=UC(e,t,r,n,i),o=Wy(e)||Gy(e);lM(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&GC(n,e,a,r)}function lM(e,t){uM[e.type](e,t)}var uM={interval:iM,log:iM,time:_b,ordinal:Ae},dM=[[3,1],[0,2]],fM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=eM,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;N(this._axesList,function(e){LC(e,1);var t=e.scale;qy(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=I(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):sM(i)}N(n,function(e){_M(e,e.__alignTo)?sM(e):rM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};N(n.x,function(e){mM(n,`y`,e,i)}),N(n.y,function(e){mM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=c_(e,t),i=this._rect=o_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(yM(a,i),!n){var c=CM(i,o,a,s,t),l=void 0;if(s)xM?(xM(this._axesList,i),yM(a,i)):l=SM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=TM(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=SM(d,f,p,i,a,c,r))}wM(i,a,mx.determine,null,l,r),N(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}V(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Cc).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Cc).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,j(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,N(o.x,function(t,n){N(o.y,function(i,a){var o=`x`+n+`y`+a,s=new nM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),gM(o.x),gM(o.y);function c(t){return function(n,r){if(pM(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Db(n),u=new mS(t,Ob(n,l,!0),[0,0],l,c);u.onBand=Ub(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return N(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);j(t,i)<0&&t.push(i),j(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),N(o._axesList,function(t){IC(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;sh({targetModel:e,coordSysType:nw,coordSysProvider:r});function r(){var r=TC(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(nS(t,e,nw),nS(n,e,nw))},this),r},e.dimensions=eM,e.dimIdxMap=Mm(eM),e}();function pM(e,t){return e.getCoordSysModel()===t}function mM(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)hM(s,i[c])&&(a=i[c]);else for(var l in i)if(W(i,l)&&hM(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function hM(e,t){if(!t)return!1;var n=t.scale,r=kb(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&jb(t)&&(i=!1),i}function gM(e){for(var t=I(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Uy(a.scale)&&zb(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&N(r,function(e){e.__alignTo=n})}function _M(e,t){return ig(e.scale)||ig(t.scale)||t.scale.getTicks().length<2}function vM(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function yM(e,t){N(e.x,function(e){return bM(e,t.x,t.width)}),N(e.y,function(e){return bM(e,t.y,t.height)})}function bM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),vM(e,t)}var xM;function SM(e,t,n,r,i,a,o){wM(r,i,mx.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=re(s,function(e){return e>0})==null;return Ef(r,s,!0,!0,n),yM(i,r),c;function l(e){N(i[Zd[e]],function(t){if(Rb(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Hb(t.scale,qS(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Lb(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[Zd[n]]-t[Zd[n]],a=t[Qd[n]]+t[Zd[n]]-(e[Qd[n]]+e[Zd[n]]);i=d(i,1-r),a=d(a,r);var o=dM[n][0],c=dM[n][1];s[o]=ss(s[o],i),s[c]=ss(s[c],a)}function d(e,t){return e>0&&!pe(t)&&t>1e-4&&(e/=t),e}}function CM(e,t,n,r,i){var a=new YS(EM);return N(n,function(n){return N(n,function(n){if(Rb(n.model)){var o=!r;n.axisBuilder=EC(e,t,n.model,i,a,o)}})}),a}function wM(e,t,n,r,i,a){var o=n===mx.determine;N(t,function(t){return N(t,function(t){Rb(t.model)&&(DC(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Zd[1-t]]=e[Qd[t]]<=a.refContainer[Qd[t]]*.5?0:1-t==1?2:1}N(t,function(e,t){return N(e,function(e){Rb(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function TM(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=o_(e.get(`outerBounds`,!0)||ew,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||j([`all`,`axisLabel`],a)<0?`all`:a,s=[ys(H(e.get(`outerBoundsClampWidth`,!0),tw[0]),t.width),ys(H(e.get(`outerBoundsClampHeight`,!0),tw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var EM=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;$S(e,t,n,r,i,a),Lb(e.nameLocation)||N(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&tC(e.labelInfoList,e.dirVec,r,i)})};function DM(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return OM(n,e,t),n.seriesInvolved&&AM(n,e),n}function OM(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];N(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=LM(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(N(n.getAxes(),ae(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&N(f.baseAxes,ae(p,!d||`cross`,u)),d&&N(f.otherAxes,ae(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||IM(d))){s??=d.get(`triggerTooltip`),d=r?kM(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=LM(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:IM(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=jM(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function kM(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};N(s,function(e){c[e]=E(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&A(l,u.textStyle)}return e.model.getModel(`axisPointer`,new vp(c,n,r))}function AM(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&N(e.coordSysAxesInfo[LM(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function jM(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(MM(a[r+`AxisId`],n.id)||MM(a[r+`AxisIndex`],n.componentIndex)||MM(a[r+`AxisName`],n.name))return i}}function MM(e,t){return e===`all`||R(e)&&j(e,t)>=0||e===t}function NM(e){var t=PM(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=IM(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function PM(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[LM(e)]}function FM(e){var t=PM(e);return t&&t.axisPointerModel}function IM(e){return!!e.get([`handle`,`show`])}function LM(e){return e.type+`||`+e.id}var RM={},zM=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&NM(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=FM(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){RM[e]=t},t.getAxisPointerClass=function(e){return e&&RM[e]},t.type=`axis`,t}(gO),BM=yc();function VM(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=BM(e).splitAreaColors,f=U(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=R(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new Ro({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:A({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}BM(e).splitAreaColors=f}}}function HM(e){BM(e).splitAreaColors=null}var UM=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],WM=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new zu,this.group.add(this._axisGroup),Rb(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),N(UM,function(e){t.get([e,`show`])&&GM[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||vf(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){HM(this)},t.type=`cartesianAxis`,t}(zM),GM={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=R(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new _d({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:A({stroke:c[x]},_),silent:!0});uf(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new _d({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});uf(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){VM(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=PS(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},KM=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(WM),qM=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=KM.type,t}return t.type=`yAxis`,t}(WM),JM=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Ro({shape:e.coordinateSystem.getRect(),style:A({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(gO),YM={offset:0};function XM(e){e.registerComponentView(JM),e.registerComponentModel(rw),e.registerCoordinateSystem(`cartesian2d`,fM),Zj(e,`x`,Kj,YM),Zj(e,`y`,Kj,YM),e.registerComponentView(KM),e.registerComponentView(qM),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function ZM(e){Lj(XM),e.registerSeriesModel(Rj),e.registerChartView(Uj),e.registerLayout(sx(`scatter`))}var QM=yc();function $M(e,t){return!!QM(e)[t]}Tj({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Ae);var eN={axisPointer:1,tooltip:1,brush:1};function tN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||eN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=If(r),o=If(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var nN=function(e){r(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=L(n._mousedownHandler,n),i=L(n._mousemoveHandler,n),a=L(n._mouseupHandler,n),o=L(n._mousewheelHandler,n),s=L(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=If(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:H(c.z2,-1/0)},p=O({},n.triggerInfo);this._opt=A(O({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,this._enabled&&this._controlType===e||(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(oN(t,`mousedown`,r,f),oN(t,`mousemove`,i,f),oN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(oN(t,`mousewheel`,o,f),oN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,sN(t,`mousedown`,r),sN(t,`mousemove`,i),sN(t,`mouseup`,a),sN(t,`mousewheel`,o),sN(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(tN(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(dE(e)||rN(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||$M(t,`globalPan`)||rN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!dN(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i)}else{t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&uE(e.event),e.__ecRoamConsumed=!0,uN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}}},t.prototype._mouseupHandler=function(e){if(!rN(e)){var t=this._zr;if(!dE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!rN(e)){var t=dN(`zoomOnMouseWheel`,e,this._opt),n=dN(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(r!==0&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!($M(this._zr,`globalPan`)||rN(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(uE(r.event),r.__ecRoamConsumed=!0,uN(e,t,n,r,i))},t}(Vi);function rN(e){return e.__ecRoamConsumed}var iN=yc();function aN(e){var t=iN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function oN(e,t,n,r){for(var i=aN(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),cN(e,t)}function sN(e,t,n){for(var r=aN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||lN(e,t);return}}function cN(e,t){var n=aN(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function lN(e,t){var n=aN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function uN(e,t,n,r,i){i.isAvailableBehavior=L(dN,null,n,r),e.trigger(t,i)}function dN(e,t,n){var r=n[e];return!e||r&&(!B(r)||t.event[r+`Key`])}function fN(e){return e}var pN=`view`,mN=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=pN,i.dimensions=[`x`,`y`];var a=fN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Jn(),o[1]=Jn(),o[2]=Jn(),a.mtRaw=ot(),a.mtRawInv=ot(),a.mtOverall=ot(),a.mtOverallInv=ot(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return gN(null,this)},t.prototype.getViewRect=function(){return _N(null,this)},t.prototype.getRoamTransform=function(){return qn(fN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?fN(this).mtRaw:fN(this).mtOverall;return n||=[],r?kt(n,e,r):ht(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=fN(this).mtOverallInv;return r?kt(n,e,r):ht(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=LN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=LN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=fN(this);return qt(hN,t.dataRect),Yt(hN,hN,t.mtOverall),Xt(hN,e[0],e[1])},t.dimensions=[`x`,`y`],t}(Kn),hN=Gt();function gN(e,t){return qt(e||Gt(),fN(t).dataRect)}function _N(e,t){return qt(e||Gt(),fN(t).viewRect)}function vN(e,t,n){return Xn(e||Jn(),fN(t).trans[n])}function yN(e){return!!(e.dataRect&&e.viewRect)}function bN(e,t,n,r){r===1?PN(e,t.trans[0],n):Xn(e,n)}function xN(e,t,n){qn(n,SN),lt(SN,SN,t.mtRawInv),Vf(e,SN)}var SN=ot();function CN(e,t){var n=fN(e);n.centerOption=t.getShallow(`center`);var r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=nP(t.getShallow(`zoom`)||1,r)||1,yN(n)&&EN(n)}function wN(e,t,n,r,i){var a=fN(e);a.dataRect=new K(t,n,r,i),yN(a)&&EN(a)}function TN(e,t,n,r,i){var a=fN(e);a.viewRect=new K(t,n,r,i),yN(a)&&EN(a)}function EN(e){DN(e),AN(e),MN(e)}function DN(e){var t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=qt(kN,t),t.y=-t.y-t.height),Jt(ON,t,n),Vf(r,ON),i&&(r.scaleY=-r.scaleY);var a=qn(r,e.mtRaw);pt(e.mtRawInv,a)}var ON=ot(),kN=Gt();function AN(e){var t=RN(e),n=YN(jN,e,e.centerOption)?kt(jN,jN,e.mtRaw):t,r=e.zoom,i=e.trans[1];i.x=t[0]-r*n[0],i.y=t[1]-r*n[1],i.scaleX=i.scaleY=r}var jN=[];function MN(e){var t=e.trans,n=t[1],r=t[0],i=t[2];PN(i,r,n);var a=qn(i,e.mtOverall),o=pt(e.mtOverallInv,a);NN(e,i,a,o),NN(e.lgGeo,i,a,o)}function NN(e,t,n,r){e&&(Xn(e,t),ct(e.transform||=[],n),ct(e.invTransform||=[],r))}function PN(e,t,n){qn(t,FN),qn(n,IN),lt(IN,IN,FN),Vf(e,IN)}var FN=ot(),IN=ot();function LN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function RN(e){var t=e.viewRect;return zN[0]=t.x+t.width/2,zN[1]=t.y+t.height/2,zN}var zN=[];function BN(e,t,n,r){var i=fN(n);i.syncBackEl=e,i.syncBackType=t,r?Hd(e,vN(null,n,t),r):(vN(e,n,t),e.dirty())}function VN(e,t,n,r){var i=fN(e),a=i.syncBackEl;a?(a.stopAnimation(),bN(HN,i,a,i.syncBackType)):Xn(HN,i.trans[2]),xN(UN,i,HN),r?qN(HN,UN,i,r):Xn(HN,UN),xN(HN,i,HN),$N(i,t,n,HN)}var HN=Jn(),UN=Jn();function WN(e,t,n){var r=GN(t);r&&(VN(r,t,n,e),CN(r,t))}function GN(e){return e.__ownRoamView?e.__ownRoamView():null}function KN(e,t,n,r){n.setUpdatePayload(Bf(e));var i=ll(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function qN(e,t,n,r){r.dx!=null&&r.dy!=null&&(e.x+=r.dx,e.y+=r.dy);var i=r.zoom;if(i!=null){var a=JN(t),o=nP(a*i,n.zoomLimit)/a;e.x-=(r.originX-e.x)*(o-1),e.y-=(r.originY-e.y)*(o-1),e.scaleX*=o,e.scaleY*=o}}function JN(e){return e.scaleX}function YN(e,t,n){var r=t.dataRect;if(!n)return!1;var i=t.lgCt;return i?_t(e,q(n[0],i.w),q(n[1],i.h)):r&&_t(e,q(n[0],r.width,r.x),q(n[1],r.height,r.y)),!0}function XN(e,t){var n=e.centerOption,r=e.dataRect;return!n||e.lgCt?t.slice():[ZN(0,t,n,r),ZN(1,t,n,r)]}function ZN(e,t,n,r){return n&&r&&r[Qd[e]]&&bs(n[e])?(t[e]-r[Zd[e]])/r[Qd[e]]*100+`%`:t[e]}function QN(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function $N(e,t,n,r){var i=RN(e),a=JN(r),o=cs(a)>1e-6;eP[0]=o?(i[0]-r.x)/a:i[0],eP[1]=o?(i[1]-r.y)/a:i[1],kt(eP,eP,e.mtRawInv);var s=XN(e,eP);tP(t,s,a),N(n,function(e){e!==t&&tP(e,s.slice(),a)})}var eP=[];function tP(e,t,n){var r=e.option;r.center=t,r.zoom=n}function nP(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function rP(e,t,n,r,i,a,o,s){if(!GN(e)){n.disable();return}n.enable(H(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Bf(A({type:sP(r,e.subType,ol)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function iP(e){return function(t,n,r){return aP.copy(e.getBoundingRect()),aP.applyTransform(e.getComputedTransform()),aP.contain(n,r)}}var aP=new K(0,0,0,0);function oP(e,t,n){var r=sP(t,n,ol);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Ec(e,t,n),function(t){WN(e,t),KN(e,t,r,i)})})}function sP(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function cP(e,t,n,r,i,a,o){var s=new mN(null,QN(e.ecModel,t));return wN(s,n,r,i,a),o?TN(s,o.x,o.y,o.width,o.height):TN(s,n,r,i,a),CN(s,e),s}var lP=yc();function uP(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,_P(t,n,e),N(n,function(n){N(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,ae(dP,e))})}),t.wrapMethod(`cloneShallow`,ae(pP,e)),N(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,ae(fP,e))}),ve(n[t.dataType]===t)}function dP(e,t){if(gP(this)){var n=O({},lP(this).datas);n[this.dataType]=t,_P(t,n,e)}else vP(t,this.dataType,lP(this).mainData,e);return t}function fP(e,t){return e.struct&&e.struct.update(),t}function pP(e,t){return N(lP(t).datas,function(n,r){n!==t&&vP(n.cloneShallow(),r,t,e)}),t}function mP(e){var t=lP(this).mainData;return e==null||t==null?t:lP(t).datas[e]}function hP(){var e=lP(this).mainData;return e==null?[{data:e}]:P(I(lP(e).datas),function(t){return{type:t,data:lP(e).datas[t]}})}function gP(e){return lP(e).mainData===e}function _P(e,t,n){lP(e).datas={},N(t,function(t,r){vP(t,r,e,n)})}function vP(e,t,n,r){lP(n).datas[t]=e,lP(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=mP,e.getLinkedDataAll=hP}var yP=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){z(e)&&(n=t,t=e,e=null),e||={},B(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),bP=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,R(n)?n.length:1),a.push(e);var r=new yP(pc(e.name,``),i);t?xP(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=Xm(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Ym(c,n);return l.initData(a),r&&r(l),uP({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function xP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function SP(e,t,n){if(e&&j(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(B(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function CP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function wP(e,t){return j(CP(e),t)>=0}function TP(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var EP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function DP(e){for(var t=0;t<EP.length;t++)e.registerAction({type:EP[t],update:`updateView`},Ae);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=SP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=wP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function OP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=x_(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var kP=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};AP(n);var r=e.levels||[],i=new vp({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=jP(r,t);var a=P(r||[],function(e){return new vp(e,i,t)},this),o=bP.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return $_(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=TP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},O(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=U(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){OP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Y.size.l,top:Y.size.xxxl,right:Y.size.l,bottom:Y.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Y.size.m,emptyItemWidth:25,itemStyle:{color:Y.color.backgroundShade,textStyle:{color:Y.color.secondary}},emphasis:{itemStyle:{color:Y.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Y.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Y.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(yv);function AP(e){var t=0;N(e.children,function(e){AP(e);var n=e.value;R(n)&&(n=n[0]),t+=n});var n=e.value;R(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),R(e.value)?e.value[0]=n:e.value=n}function jP(e,t){var n=$s(t.get(`color`)),r=$s(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;N(e,function(e){var t=new vp(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var MP=8,NP=8,PP=5,FP=function(){function e(e){this.group=new zu,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),i.get(`show`)&&n){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=c_(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=o_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),l_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=pc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+MP*2,t.emptyItemWidth);t.totalWidth+=o+NP,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new fd({shape:{points:IP(c,0,_,u,m===f.length-1,m===0)},style:A(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Uo({style:Yf(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:ae(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Yf(o,{text:v}),y.ensureState(`emphasis`).style=p,ou(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),LP(y,e,g),c+=_+NP}},e.prototype.remove=function(){this.group.removeAll()},e}();function IP(e,t,n,r,i,a){var o=[[i?e:e-PP,t],[e+n,t],[e+n,t+r],[i?e:e-PP,t+r]];return!a&&o.splice(2,0,[e+n+PP,t+r/2]),!i&&o.push([e,t+r/2]),o}function LP(e,t,n){J(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&TP(n,t)}}var RP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function zP(){return new RP}var BP=Math.max,VP=Math.min,HP=N,UP=[`itemStyle`,`borderWidth`],WP=[`itemStyle`,`gapWidth`],GP=[`upperLabel`,`show`],KP=[`upperLabel`,`height`],qP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=c_(e,n).refContainer,o=o_(e.getBoxLayoutParams(),a),s=r&&r.type,c=SP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=CP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,tF(e,c,u,o)):l?(f=!0,O({},l)):O({},o);if(f){var m=aF(o,p);m=oF(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),JP(u,g,!1,0),_=u.getLayout(),HP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(O({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(nF(o,l,c),!0),e.setLayoutInfo(o),rF(v,new K(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function JP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(UP),l=s.get(WP)/2,u=iF(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=BP(i-2*f,0),a=BP(a-f-p,0);var m=i*a,h=YP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=VP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=$P(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,eF(y,_,g,l,!1),_=VP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&eF(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)JP(h[b],t,n,r+1)}}}function YP(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=F(o,function(e){return!e.isRemoved()}),ZP(o,s);var l=QP(t,o,s);if(l.sum===0||(l.sum=XP(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function XP(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function ZP(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function QP(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=Mc(),HP(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function $P(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?BP(l*r/c,c/(l*i)):1/0}function eF(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=BP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=BP(v-2*r,0);m[s[o]]=n[s[o]]+VP(r,g/2),m[s[a]]=l+VP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function tF(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=O({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(UP),v=Math.max(_,iF(g));u+=4*_*_+(3*_+v)*u**.5,u>ks&&(u=ks),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function nF(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function rF(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new K(t.x-a.x,t.y-a.y,t.width,t.height);HP(e.viewChildren||[],function(e){rF(e,c,n,r,i+1)})}}function iF(e){return e.get(GP)?e.get(KP):0}function aF(e,t){return t.width/e.width||t.height/e.height||1}function oF(e,t){return nP(e,t.get(`scaleLimit`,!0))}var sF=zu,cF=Ro,lF=3,uF=`label`,dF=`upperLabel`,fF=100,pF=20,mF=30,hF=Ye([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),gF=function(e){var t=hF(e);return t.stroke=t.fill=t.lineWidth=null,t},_F=yc(),vF=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=yF(),n}return t.prototype.render=function(e,t,n,r){if(!(j(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=SP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new sF,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=yF(),o=yF(),s=this._storage,c=[];function l(e,r,i,l){return bF(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,N(e,function(e,t){!e.isRemoved()&&o(t,t)})):new xp(t,e,a,a).add(o).update(o).remove(ae(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=yF();return e&&N(e,function(e,n){var r=t[n];N(e,function(e){e&&(r.push(e),_F(e).willDelete=!0)})}),t}function p(){N(u,function(e){N(e,function(e){e.parent&&e.parent.remove(e)})}),N(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(z(i)?0:i)||0,s=(z(a)?null:a)||`cubicOut`,c=zP();N(t.willDeleteEls,function(e,t){N(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=_F(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),N(this._storage,function(e,n){N(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof zu?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=O({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(L(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new nN(e.getZr()),r.on(`pan`,L(this._onPan,this)),r.on(`zoom`,L(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>lF||Math.abs(e.dy)>lF)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new K(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=aF(c,o),u=l*r;u=oF(u,i);var d=u/l;t-=c.x,n-=c.y;var f=ot();ut(f,f,[-t,-n]),ft(f,f,[d,d]),ut(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&Zg(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new FP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(wP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=yF(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(py);function yF(){return{nodeGroup:[],background:[],content:[]}}function bF(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=L(`nodeGroup`,sF);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),_F(D).nodeWidth=p,_F(D).nodeHeight=m,u.isAboveViewRoot)return D;var k=L(`background`,cF,l,pF);k&&ne(D,k,x&&u.upperLabelHeight);var A=f.getModel(`emphasis`),j=A.get(`focus`),ee=A.get(`blurScope`),te=A.get(`disabled`),M=j===`ancestor`?o.getAncestorsIndices():j===`descendant`?o.getDescendantIndices():j;if(x)fu(D)&&du(D,!1),k&&(du(k,!te),d.setItemGraphicEl(o.dataIndex,k),su(k,M,ee));else{var N=L(`content`,cF,l,mF);N&&F(D,N),k.disableMorphing=!0,k&&fu(k)&&du(k,!1),du(D,!te),d.setItemGraphicEl(o.dataIndex,D);var P=f.getShallow(`cursor`);P&&N.attr(`cursor`,P),su(D,M,ee)}return D;function ne(t,n,r){var i=J(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)re(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=gF(S);c.fill=s;var l=hF(C);l.fill=C.get(`borderColor`);var u=hF(w);u.fill=w.get(`borderColor`);var d=hF(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;I(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Rl(n)}t.add(n)}function F(t,n){var r=J(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)re(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=gF(S);l.fill=c,l.decal=s.decal;var u=hF(C),d=hF(w),f=hF(T);I(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Rl(n)}t.add(n)}function re(e){!e.invisible&&a.push(e)}function I(t,n,r,i){var a=f.getModel(i?dF:uF),s=pc(f.get(`name`),null),c=a.getShallow(`show`);qf(t,Jf(f,i?dF:uF),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=_e(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ie(d,i,u);var m=l.getState(`emphasis`);ie(m?m.style:null,i,u)}}function ie(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function L(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ae(c,s)):g||(s=new r,s instanceof ga&&(s.z2=xF(a,o)),R(c,s)),t[e][_]=s}function ae(e,t){var n=e[_]={};t instanceof sF?(n.oldX=t.x,n.oldY=t.y):n.oldShape=O({},t.shape)}function R(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof zu;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function xF(e,t){return e*fF+t}var SF=N,CF=V,wF=-1,TF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=E(t);this.type=r,this.mappingMethod=n,this._normalizeData=LF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(OF(i),EF(i)):n===`category`?i.categories?DF(i):OF(i,!0):(ve(n!==`linear`||i.dataExtent),OF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return L(this._normalizeData,this)},e.listVisualTypes=function(){return I(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){V(e)?N(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=R(t)?[]:V(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&SF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(R(e))e=e.slice();else if(CF(e)){var t=[];SF(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||B(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(RF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(RF(u[0],l[0],e))return a}else if(RF(u[0],l[0],e)&&RF(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:jF(`color`),getColorMapper:function(){var e=this.option;return L(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),MF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Ur(t,e.parsedVisual,r),i?r:qr(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return qr(Ur(e,this.option.parsedVisual),`rgba`)},category:MF,piecewise:function(e,t){var n=FF.call(this,t);return n??=qr(Ur(e,this.option.parsedVisual),`rgba`),n},fixed:NF}},colorHue:kF(function(e,t){return Gr(e,t)}),colorSaturation:kF(function(e,t){return Gr(e,null,t)}),colorLightness:kF(function(e,t){return Gr(e,null,null,t)}),colorAlpha:kF(function(e,t){return Kr(e,t)}),decal:{applyVisual:jF(`decal`),_normalizedToVisual:{linear:null,category:MF,piecewise:null,fixed:null}},opacity:{applyVisual:jF(`opacity`),_normalizedToVisual:PF([0,1])},liftZ:{applyVisual:jF(`liftZ`),_normalizedToVisual:{linear:NF,category:NF,piecewise:NF,fixed:NF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:AF,category:MF,piecewise:function(e,t){var n=FF.call(this,t);return n??=AF.call(this,e),n},fixed:NF}},symbolSize:{applyVisual:jF(`symbolSize`),_normalizedToVisual:PF([0,1])}},e}();function EF(e){var t=e.pieceList;e.hasSpecialVisual=!1,N(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function DF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(SF(t,function(e,t){n[e]=t}),!R(r)){var i=[];V(r)?SF(r,function(e,t){var r=n[t];i[r??wF]=e}):i[wF]=r,r=IF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function OF(e,t){var n=e.visual,r=[];V(n)?SF(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),IF(e,r)}function kF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:PF([0,1])}}function AF(e){var t=this.option.visual;return t[Math.round(_s(e,[0,1],[0,t.length-1],!0))]||{}}function jF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function MF(e){var t=this.option.visual;return t[this.option.loop&&e!==wF?e%t.length:e]}function NF(){return this.option.visual[0]}function PF(e){return{linear:function(t){return _s(t,e,this.option.visual,!0)},category:MF,piecewise:function(t,n){var r=FF.call(this,n);return r??=_s(t,e,this.option.visual,!0),r},fixed:NF}}function FF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[TF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function IF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=P(t,function(e){return zr(e)||[0,0,0,1]})),t}var LF={linear:function(e){return _s(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=TF.findPieceIndex(e,t,!0);if(n!=null)return _s(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??wF},fixed:Ae};function RF(e,t,n){return e?t<=n:t<n}var zF=`itemStyle`,BF=yc(),VF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||HF(t,{},e.getViewRoot().getAncestors(),e)}};function HF(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(a&&!a.invisible&&a.isInView){var s=i.getModel(zF),c=UF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=WF(c),u=GF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=WF(c),l.fill=f;else{var m=qF(e,i,a,s,c,p);N(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&HF(e,YF(i,c,e,t,m,r),n,r)})}}}function UF(e,t,n){var r=O({},t),i=n.designatedVisualItemStyle;return N([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function WF(e){var t=KF(e,`color`);if(t){var n=KF(e,`colorAlpha`),r=KF(e,`colorSaturation`);return r&&(t=Gr(t,null,null,r)),n&&(t=Kr(t,n)),t}}function GF(e,t){return t==null?null:Gr(t,null,null,e)}function KF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function qF(e,t,n,r,i,a){if(a&&a.length){var o=JF(t,`color`)||i.color!=null&&i.color!==`none`&&(JF(t,`colorAlpha`)||JF(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new TF(d);return BF(f).drColorMappingBy=u,f}}}function JF(e,t){var n=e.get(t);return R(n)&&n.length?{name:t,range:n}:null}function YF(e,t,n,r,i,a){var o=O({},t);if(i){var s=i.type,c=s===`color`&&BF(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function XF(e){e.registerSeriesModel(kP),e.registerChartView(vF),e.registerVisual(VF),e.registerLayout(qP),DP(e)}function ZF(e){return`_EC_`+e}var QF=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[ZF(e)]){var r=new $F(e,t);return r.hostGraph=this,this.nodes.push(r),n[ZF(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[ZF(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(se(e)&&(e=this.nodes[e]),se(t)&&(t=this.nodes[t]),e instanceof $F||(e=r[ZF(e)]),t instanceof $F||(t=r[ZF(t)]),e&&t){var a=e.id+`-`+t.id,o=new eI(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof $F&&(e=e.id),t instanceof $F&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof $F||(t=this._nodesMap[ZF(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(r,t,null))for(var o=[t];o.length;)for(var s=o.shift(),c=s[i],a=0;a<c.length;a++){var l=c[a],u=l.node1===s?l.node2:l.node1;if(!u.__visited){if(e.call(r,u,s))return;o.push(u),u.__visited=!0}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),$F=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??``,this.dataIndex=t??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=U(),t=U(),n=0,r=this.edges.length;n<r;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var c=a[s];s++,t.set(c.dataIndex,!0);for(var l=c.inEdges,u=0,d=l.length,f=void 0,p=void 0;u<d;u++)f=l[u],p=f.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s<o.length;){var m=o[s];s++,t.set(m.dataIndex,!0);for(var h=m.outEdges,u=0,g=h.length,_=void 0,v=void 0;u<g;u++)_=h[u],v=_.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),eI=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=U(),t=U();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var a=n[i];i++,t.set(a.dataIndex,!0);for(var o=a.inEdges,s=0,c=o.length,l=void 0,u=void 0;s<c;s++)l=a.inEdges[s],u=l.dataIndex,u>=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i<r.length;){var d=r[i];i++,t.set(d.dataIndex,!0);for(var f=d.outEdges,s=0,c=f.length,p=void 0,m=void 0;s<c;s++)p=d.outEdges[s],m=p.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function tI(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}te($F,tI(`hostGraph`,`data`)),te(eI,tI(`hostGraph`,`edgeData`));function nI(e,t,n,r,i){for(var a=new QF(r),o=0;o<e.length;o++)a.addNode(me(e[o].id,e[o].name,o),o);for(var s=[],c=[],l=0,o=0;o<t.length;o++){var u=t[o],d=u.source,f=u.target;a.addEdge(d,f,l)&&(c.push(u),s.push(me(pc(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=yh(e,n);else{var h=th.get(p),g=h&&h.dimensions||[];j(g,`value`)<0&&g.concat([`value`]);var _=Xm(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Ym(_,n),m.initData(e)}var v=new Ym([`value`],n);return v.initData(c,s),i&&i(m,v),uP({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var rI=_d.prototype,iI=xd.prototype,aI=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(aI);function oI(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var sI=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new aI},t.prototype.buildPath=function(e,t){oI(t)?rI.buildPath.call(this,e,t):iI.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return oI(this.shape)?rI.pointAt.call(this,e):iI.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=oI(t)?[t.x2-t.x1,t.y2-t.y1]:iI.tangentAt.call(this,e);return Ct(n,n)},t}(wo),cI=[`fromSymbol`,`toSymbol`];function lI(e){return`_`+e+`Type`}function uI(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=Fv(i),l=Iv(o||0,c);return r+c+l+(a||``)+(s||``)}function dI(e,t,n){var r=t.getItemVisual(n,e);if(r&&r!==`none`){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=Fv(i),l=Iv(o||0,c),u=Pv(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:a*Math.PI/180||0,u.name=e,u}}function fI(e){var t=new sI({name:`line`,subPixelOptimize:!0});return pI(t.shape,e),t}function pI(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var mI=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=fI(i);o.shape.percent=0,Ud(o,{z2:H(a,0),shape:{percent:1}},r,t),this.add(o),N(cI,function(n){var r=dI(n,e,t);this.add(r),this[lI(n)]=uI(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};pI(o.shape,a),Hd(i,o,r,t),N(cI,function(n){var r=uI(n,e,t),i=lI(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=dI(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Jf(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,N(cI,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<ml.length;n++){var r=ml[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);qf(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Y.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?Ss(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);R(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),ou(this,u,d,l)},t.prototype.highlight=function(){Vl(this)},t.prototype.downplay=function(){Hl(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);pI(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=yt([],l,c);Ct(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(zu),hI=function(){function e(e){this.group=new zu,this._LineCtor=e||mI}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=_I(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=_I(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!gI(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(yI(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){jf(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(yI(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);yI(t.getItemLayout(r))?(a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)):this.group.remove(a)},e}();function gI(e){return e.animators&&e.animators.length>0}function _I(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Jf(t)}}function vI(e){return isNaN(e[0])||isNaN(e[1])}function yI(e){return e&&!vI(e[0])&&!vI(e[1])}var bI=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),xI=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new bI},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(wo);function SI(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:q(n[0],t.getWidth()),cy:q(n[1],t.getHeight()),r:q(e.get(`radius`),a/2)}}function CI(e,t){var n=e==null?``:e+``;return t&&(B(t)?n=t.replace(`{value}`,n):z(t)&&(n=t(e))),n}var wI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=SI(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?ww:od,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Za(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v<r.length;v++){var y=Math.min(Math.max(r[v][0],0),1);c=s+h*y;var b=new u({shape:{startAngle:g,endAngle:c,cx:i.cx,cy:i.cy,clockwise:o,r0:i.r-p,r:i.r},silent:!0});b.setStyle({fill:r[v][1]}),b.setStyle(f.getLineStyle([`color`,`width`])),_.push(b),g=c}_.reverse(),N(_,function(e){return a.add(e)});var x=function(e){if(e<=0)return r[0][1];for(var t=0;t<r.length;t++)if(r[t][0]>=e&&(t===0?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,i,s,c,o,p),this._renderTitleAndDetail(e,t,n,x,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,x,i,s,c,o,p)},t.prototype._renderTicks=function(e,t,n,r,i,a,o,s,c){for(var l=this.group,u=i.cx,d=i.cy,f=i.r,p=+e.get(`min`),m=+e.get(`max`),h=e.getModel(`splitLine`),g=e.getModel(`axisTick`),_=e.getModel(`axisLabel`),v=e.get(`splitNumber`),y=g.get(`splitNumber`),b=q(h.get(`length`),f),x=q(g.get(`length`),f),S=a,C=(o-a)/v,w=C/y,T=h.getModel(`lineStyle`).getLineStyle(),E=g.getModel(`lineStyle`).getLineStyle(),D=h.get(`distance`),O,k,A=0;A<=v;A++){if(O=Math.cos(S),k=Math.sin(S),h.get(`show`)){var j=D?D+c:c,ee=new _d({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-b-j)+u,y2:k*(f-b-j)+d},style:T,silent:!0});T.stroke===`auto`&&ee.setStyle({stroke:r(A/v)}),l.add(ee)}if(_.get(`show`)){var j=_.get(`distance`)+D,te=CI(Ss(A*(m-p)/v+p,14),_.get(`formatter`)),M=r(A/v),N=O*(f-b-j)+u,P=k*(f-b-j)+d,ne=_.get(`rotate`),F=0;ne===`radial`?(F=-S+2*Math.PI,F>Math.PI/2&&(F+=Math.PI)):ne===`tangential`?F=-S-Math.PI/2:se(ne)&&(F=ne*Math.PI/180),F===0?l.add(new Uo({style:Yf(_,{text:te,x:N,y:P,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:M}),silent:!0})):l.add(new Uo({style:Yf(_,{text:te,x:N,y:P,verticalAlign:`middle`,align:`center`},{inheritColor:M}),silent:!0,originX:N,originY:P,rotation:F}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var re=0;re<=y;re++){O=Math.cos(S),k=Math.sin(S);var I=new _d({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&I.setStyle({stroke:r((A+re/y)/v)}),l.add(I),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=q(r.get(`width`),i.r),o=q(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=q(c[0],i.r),u=q(c[1],i.r),d=r.get(`keepAspect`),f=s?Pv(s,l-a/2,u-o,a,o,null,d):new xI({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?ww:od,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=_s(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Ud(r,{rotation:-((isNaN(+n)?x[0]:_s(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Ud(i,{shape:{endAngle:_s(n,b,x,m.get(`clip`))}},e),l.add(i),Xc(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,Hd(s,{rotation:-((isNaN(+r)?x[0]:_s(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);Hd(v,{shape:{endAngle:_s(r,b,x,m.get(`clip`))}},e),l.add(v),Xc(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(_s(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof Ao){var d=c.style;c.useStyle(O({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,uu(c,t),ou(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,uu(m,t),ou(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=Pv(i,t.cx-r/2+q(a[0],t.r),t.cy-r/2+q(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new zu,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Uo({silent:!0}),f[e]=new Uo({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new zu,g=r(_s(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+q(v[0],i.r),b=i.cy+q(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Yf(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+q(C[0],i.r),T=i.cy+q(C[1],i.r),E=q(S.get(`width`),i.r),D=q(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Yf(S,{x:w,y:T,text:CI(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),ap(x,{normal:S},a,function(e){return CI(e,k)}),p&&op(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return CI(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(py),TI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return oT(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Y.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Y.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Y.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Y.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Y.color.neutral00,borderWidth:0,borderColor:Y.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Y.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Y.color.transparent,borderWidth:0,borderColor:Y.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Y.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(yv);function EI(e){e.registerChartView(wI),e.registerSeriesModel(TI)}var DI=`funnel`,OI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new sT(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return oT(this,{coordDimensions:[`value`],encodeDefaulter:ae(Ep,this)})},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+DI,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Y.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Y.color.primary}}},t}(yv),kI=[`itemStyle`,`opacity`],AI=function(e){r(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new md,o=new Uo;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(kI);c??=1,n||Jd(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Ud(r,{style:{opacity:c}},i,t)):Hd(r,{style:{opacity:c},shape:{points:o.points}},i,t),uu(r,a),this._updateLabel(e,t),ou(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;qf(i,Jf(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new G(d[0][0],d[0][1]):null},Hd(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),MT(n,NT(o),{stroke:l})},t}(fd),jI=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=DI,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new AI(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){qd(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=DI,t}(py);function MI(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o<s;o++)i[o]=o;return z(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function NI(e){var t=e.hostModel,n=II(t);e.each(function(t){var r=e.getItemModel(t),i=r.getModel(`label`).get(`position`),a=r.getModel(`labelLine`),o=e.getItemLayout(t),s=o.points,c=i===`inner`||i===`inside`||i===`center`||i===`insideLeft`||i===`insideRight`,l,u,d,f;if(c)i===`insideLeft`?(u=(s[0][0]+s[3][0])/2+5,d=(s[0][1]+s[3][1])/2,l=`left`):i===`insideRight`?(u=(s[1][0]+s[2][0])/2-5,d=(s[1][1]+s[2][1])/2,l=`right`):(u=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,d=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l=`center`),f=[[u,d],[u,d]];else{var p=void 0,m=void 0,h=void 0,g=void 0,_=a.get(`length`);B(i)&&(!n&&j([`top`,`bottom`],i)>-1&&(i=`left`),n&&j([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}var PI=Jc(DI,FI);function FI(e,t){e.eachSeriesByType(DI,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=c_(e,t),o=o_(e.getBoxLayoutParams(),a.refContainer),s=II(e),c=o.width,l=o.height,u=MI(n,i),d=o.x,f=o.y,p=s?[q(e.get(`minSize`),l),q(e.get(`maxSize`),l)]:[q(e.get(`minSize`),c),q(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=_s(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i)}return[[t,a],[t,a+i]]}var o=_s(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;x<u.length;x++){var S=u[x],C=u[x+1],w=n.getItemModel(S);if(s){var T=w.get([`itemStyle`,`width`]);T==null?T=y:(T=q(T,c),i===`ascending`&&(T=-T));var E=b(S,d),D=b(C,d+T);d+=T+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}else{var O=w.get([`itemStyle`,`height`]);O==null?O=y:(O=q(O,l),i===`ascending`&&(O=-O));var E=b(S,f),D=b(C,f+O);f+=O+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}}NI(n)})}function II(e){return e.get(`orient`)===`horizontal`}function LI(e){e.registerChartView(jI),e.registerSeriesModel(OI),e.registerLayout(PI),e.registerProcessor(aT(DI))}function RI(e,t,n,r,i,a){e||=0;var o=Os(n[1],-n[0]);if(i!=null&&(i=BI(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(Os(t[1],-t[0]));s=BI(s,[0,o]),i=a=BI(s,[i,a]),r=0}t[0]=BI(t[0],n),t[1]=BI(t[1],n);var c=zI(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=Os(u[0],l):u[1]=Os(u[1],-l),t[r]=BI(t[r],u);var d=zI(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=Os(t[r],c.sign*i)),d=zI(t,r),a!=null&&d.span>a&&(t[1-r]=Os(t[r],d.sign*a)),t}function zI(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function BI(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var VI=`sankey`,HI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o<i.length;o++)i[o].depth!=null&&i[o].depth>=0&&(a[i[o].depth]=new vp(i[o],this,t));return nI(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return $_(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return $_(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+VI,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Y.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Y.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(yv),UI=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),WI=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new UI},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Vl(this)},t.prototype.downplay=function(){Hl(this)},t}(wo),GI=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=VI,t._mainGroup=new zu,t}return t.prototype.init=function(e,t){this._controller=new nN(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),rP(e,n,this._controller,iP(i),null),r.eachEdge(function(t){var n=new WI,r=J(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),KI(n.style,u,t);var k=``+a.get(`value`),A=Jf(a,`edgeLabel`);qf(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,he(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);uu(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return KI(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);ou(n,ee===`adjacency`?t.getAdjacentDataIndices():ee===`trajectory`?t.getTrajectoryDataIndices():ee,j.get(`blurScope`),j.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new Ro({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});qf(f,Jf(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),uu(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),J(f).dataType=`node`;var p=u.get(`focus`);ou(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(qI(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){BN(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=cP(e,t,n.x,n.y,n.width,n.height);BN(this.group,2,r,this._firstRender?null:e)},t.type=VI,t}(py);function KI(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);B(r)&&B(i)&&(e.fill=new Ed(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function qI(e,t,n){var r=new Ro({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Ud(r,{shape:{width:e.width+20}},t,n),r}var JI=Jc(VI,YI);function YI(e,t){e.eachSeriesByType(VI,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=c_(e,t).refContainer,a=o_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;ZI(l),XI(l,u,n,r,o,s,F(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function XI(e,t,n,r,i,a,o,s,c){QI(e,t,n,i,a,s,c),rL(e,t,a,i,r,o,s),gL(e,s)}function ZI(e){N(e,function(e){var t=mL(e.outEdges,pL),n=mL(e.inEdges,pL),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function QI(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<e.length;f++)c[f]=e[f].inEdges.length,c[f]===0&&l.push(e[f]);for(var p=-1;l.length;){for(var m=0;m<l.length;m++){var h=l[m],g=h.hostGraph.data.getRawDataItem(h.dataIndex),_=g.depth!=null&&g.depth>=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;v<h.outEdges.length;v++){var y=h.outEdges[v],b=j(t,y);s[b]=0;var x=y.node2,S=j(e,x);--c[S]===0&&j(u,x)<0&&u.push(x)}}++d,l=u,u=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw Error(`Sankey is a DAG, the original data has cycle!`);var C=p>d-1?p:d-1;o&&o!==`left`&&eL(e,o,a,C),nL(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function $I(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function eL(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var c=a[s];c.setLayout({skNodeHeight:o},!0);for(var l=0;l<c.inEdges.length;l++){var u=c.inEdges[l];j(i,u.node1)<0&&i.push(u.node1)}}a=i,i=[],++o}N(e,function(e){$I(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&tL(e,r)}function tL(e,t){N(e,function(e){!$I(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function nL(e,t,n){N(e,function(e){var r=e.getLayout().depth*t;n===`vertical`?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}function rL(e,t,n,r,i,a,o){var s=iL(e,o);aL(s,t,n,r,i,o),oL(s,i,n,r,o);for(var c=1;a>0;a--)c*=.99,sL(s,c,o),oL(s,i,n,r,o),hL(s,c,o),oL(s,i,n,r,o)}function iL(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Ac(e,function(e){return e.getLayout()[r]});return Cs(i.keys),N(i.keys,function(e){n.push(i.buckets.get(e))}),n}function aL(e,t,n,r,i,a){var o=1/0;N(e,function(e){var t=e.length,s=0;N(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c<o&&(o=c)}),N(e,function(e){N(e,function(e,t){var n=e.getLayout().value*o;a===`vertical`?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),N(t,function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)})}function oL(e,t,n,r,i){var a=i===`vertical`?`x`:`y`;N(e,function(e){e.sort(function(e,t){return e.getLayout()[a]-t.getLayout()[a]});for(var o,s,c,l=0,u=e.length,d=i===`vertical`?`dx`:`dy`,f=0;f<u;f++)s=e[f],c=l-s.getLayout()[a],c>0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function sL(e,t,n){N(e.slice().reverse(),function(e){N(e,function(e){if(e.outEdges.length){var r=mL(e.outEdges,cL,n)/mL(e.outEdges,pL);if(isNaN(r)){var i=e.outEdges.length;r=i?mL(e.outEdges,lL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-fL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-fL(e,n))*t;e.setLayout({y:o},!0)}}})})}function cL(e,t){return fL(e.node2,t)*e.getValue()}function lL(e,t){return fL(e.node2,t)}function uL(e,t){return fL(e.node1,t)*e.getValue()}function dL(e,t){return fL(e.node1,t)}function fL(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function pL(e){return e.getValue()}function mL(e,t,n){for(var r=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],n);isNaN(o)||(r+=o)}return r}function hL(e,t,n){N(e,function(e){N(e,function(e){if(e.inEdges.length){var r=mL(e.inEdges,uL,n)/mL(e.inEdges,pL);if(isNaN(r)){var i=e.inEdges.length;r=i?mL(e.inEdges,dL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-fL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-fL(e,n))*t;e.setLayout({y:o},!0)}}})})}function gL(e,t){var n=t===`vertical`?`x`:`y`;N(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),N(e,function(e){var t=0,n=0;N(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),N(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}var _L=Jc(VI,vL);function vL(e){e.eachSeriesByType(VI,function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var i=1/0,a=-1/0;N(n,function(e){var t=e.getLayout().value;t<i&&(i=t),t>a&&(a=t)}),N(n,function(t){var n=new TF({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&N(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function yL(e){e.registerChartView(GI),e.registerSeriesModel(HI),e.registerLayout(JI),e.registerVisual(_L),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:Zc,subType:VI,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),oP(e,Zc,VI)}var bL=256,xL=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=u.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p<f;++p){var m=e[p],h=m[0],g=m[1],_=m[2],v=r(_);d.globalAlpha=v,d.drawImage(o,h-l,g-l)}if(!u.width||!u.height)return u;for(var y=d.getImageData(0,0,u.width,u.height),b=y.data,x=0,S=b.length,C=this.minOpacity,w=this.maxOpacity-C;x<S;){var v=b[x+3]/256,T=Math.floor(v*(bL-1))*4;if(v>0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=u.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Y.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=/* @__PURE__ */ new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function SL(e,t,n){var r=e[1]-e[0];t=P(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r<i;r++){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}if(r===i)for(r=a-1;r>=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<i&&n[r]}}function CL(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}var wL=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):wy(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(wy(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){jf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=Cy(a,`cartesian2d`),s=Cy(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=sS(f).w+.5,l=sS(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Jf(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;E<r;E++){var D=void 0,O=h.getItemVisual(E,`style`);if(o){var k=h.get(T[0],E),A=h.get(T[1],E);if(isNaN(h.get(T[2],E))||isNaN(k)||isNaN(A)||k<u[0]||k>u[1]||A<d[0]||A>d[1])continue;var j=a.dataToPoint([k,A]);D=new Ro({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(pe(ee.x))continue;D=new Ro({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var te=a.dataToLayout([h.get(T[0],E)]),ee=te.contentRect||te.rect;if(pe(ee.x)||pe(ee.y))continue;D=new Ro({z2:1,shape:ee,style:O})}if(h.hasItemOption){var M=h.getItemModel(E),N=M.getModel(`emphasis`);g=N.getModel(`itemStyle`).getItemStyle(),_=M.getModel([`blur`,`itemStyle`]).getItemStyle(),v=M.getModel([`select`,`itemStyle`]).getItemStyle(),y=M.get([`itemStyle`,`borderRadius`]),S=N.get(`focus`),C=N.get(`blurScope`),w=N.get(`disabled`),b=Jf(M)}D.shape.r=y;var P=e.getRawValue(E),ne=`-`;P&&P[2]!=null&&(ne=P[2]+``),qf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:ne}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,ou(D,S,C,w),D.incremental=Kc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new xL;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?CL(v,n.option.range):SL(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Ao({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(py),TL=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return yh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=th.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Y.color.primary}}},t}(yv);function EL(e){e.registerChartView(wL),e.registerSeriesModel(TL)}var DL={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},OL=I(DL);ne(Yn,function(e,t){return e[t]=1,e},{}),Yn.join(`, `);var kL=[``,`style`,`shape`,`extra`],AL=yc();function jL(e,t,n,r,i){var a=e+`Animation`,o=Bd(e,r,i)||{},s=AL(t).userDuring;return o.duration>0&&(o.during=s?L(VL,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),O(o,n[a]),o}function ML(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=AL(e),l=t.style;c.userDuring=t.during;var u={},d={};if(GL(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];UL(`shape`,h,f[m])}else UL(`shape`,t,d),UL(`extra`,t,d);if(!a&&s&&(WL(e,t,u),HL(`shape`,e,t,u),HL(`extra`,e,t,u),KL(e,t,l,u)),d.style=l,IL(e,d,o),RL(e,t),s){if(a){var g={};N(kL,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),O(e?g[e]:g,n.enterFrom))});var _=jL(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else LL(e,t,i||0,n,u)}NL(e,t),l?e.dirty():e.markRedraw()}function NL(e,t){for(var n=AL(e).leaveToProps,r=0;r<kL.length;r++){var i=kL[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=AL(e).leaveToProps={},i&&(n[i]=n[i]||{}),O(i?n[i]:n,a.leaveTo))}}function PL(e,t,n,r){if(e){var i=e.parent,a=AL(e).leaveToProps;if(a){var o=jL(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function FL(e){return e===`all`}function IL(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function LL(e,t,n,r,i){if(i){var a=jL(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function RL(e,t){W(t,`silent`)&&(e.silent=t.silent),W(t,`ignore`)&&(e.ignore=t.ignore),e instanceof ga&&W(t,`invisible`)&&(e.invisible=t.invisible),e instanceof wo&&W(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var zL={},BL={setTransform:function(e,t){return zL.el[e]=t,this},getTransform:function(e){return zL.el[e]},setShape:function(e,t){var n=zL.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=zL.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=zL.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=zL.el.style;if(t)return t[e]},setExtra:function(e,t){var n=zL.el.extra||(zL.el.extra={});return n[e]=t,this},getExtra:function(e){var t=zL.el.extra;if(t)return t[e]}};function VL(){var e=this,t=e.el;if(t){var n=AL(t).userDuring,r=e.userDuring;n===r?(zL.el=t,r(BL)):e.el=e.userDuring=null}}function HL(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c){if(!o&&(o=r[e]={}),FL(c))O(o,a);else for(var l=$s(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(FL(s)||j(s,e)>=0){!o&&(o=r[e]={});for(var p=I(a),u=0;u<p.length;u++){var d=p[u],f=a[d];qL(i[d],f)&&(o[d]=f)}}}}}function UL(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=I(r),o=0;o<a.length;o++){var s=a[o];i[s]=Ei(r[s])}}function WL(e,t,n){for(var r=t.transition,i=FL(r)?Yn:$s(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function GL(e,t,n){for(var r=0;r<OL.length;r++){var i=OL[r],a=DL[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<Yn.length;r++){var s=Yn[r];t[s]!=null&&(n[s]=t[s])}}function KL(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!FL(o)){var c=$s(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(FL(s)||FL(o)||j(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=I(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function qL(e,t){return M(e)?e!==t:e!=null&&isFinite(e)}var JL=yc(),YL=[`percent`,`easing`,`shape`,`style`,`extra`];function XL(e){e.stopAnimation(`keyframe`),e.attr(JL(e))}function ZL(e,t,n){if(n.isAnimationEnabled()&&t){if(R(t))N(t,function(t){ZL(e,t,n)});else{var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Bd(`enter`,n,0);i=a&&a.duration}if(r&&i){var o=JL(e);N(kL,function(n){if(!n||e[n]){var a;r.sort(function(e,t){return e.percent-t.percent}),N(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=I(c);if(n||(l=F(l,function(e){return j(YL,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;N(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}}var QL=yc(),$L=E,eR=L,tR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`)o&&o.hide(),s&&s.hide();else{o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new zu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=ae(nR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}oR(o,t,!0),this._renderHandle(i)}}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&sS(r).w>o)return!0;if(a){var s=PM(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=QL(e).pointerEl=new Yd[i.type]($L(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=QL(e).labelEl=new Uo($L(t.label));e.add(i),iR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=QL(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=QL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),iR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`)r&&n.remove(r),this._handle=null;else{var o;this._handle||(o=!0,r=this._handle=xf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){uE(e.event)},onmousedown:eR(this._onHandleDragMove,this,0,0),drift:eR(this._onHandleDragMove,this),ondragend:eR(this._onHandleDragEnd,this)}),n.add(r)),oR(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);R(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,xw(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}}},e.prototype._moveHandleToValue=function(e,t){nR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,aR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(aR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(aR(r)),QL(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Sw(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function nR(e,t,n,r){rR(QL(n).lastProp,r)||(QL(n).lastProp=r,t?Hd(n,r,e):(n.stopAnimation(),n.attr(r)))}function rR(e,t){if(V(e)&&V(t)){var n=!0;return N(t,function(t,r){n&&=rR(e[r],t)}),!!n}return e===t}function iR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function aR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function oR(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function sR(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function cR(e,t,n,r,i){var a=uR(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=Ug(o.get(`padding`)||0),c=o.getFont(),l=dn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),lR(u,d,f,r);var h=o.get(`backgroundColor`);h&&h!==`auto`||(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Yf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function lR(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function uR(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Nb(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};N(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),B(o)?a=o.replace(`{value}`,a):z(o)&&(a=o(s))}return a}function dR(e,t,n){var r=ot();return dt(r,r,n.rotation),ut(r,r,n.position),mf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function fR(e,t,n,r,i,a){var o=nC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),cR(t,r,i,a,{position:dR(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function pR(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function mR(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function hR(e,t,n){return sS(e,{fromStat:{sers:P(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function gR(e,t,n){return[ss(os(t[0],t[1]),e-n/2),os(e+n/2,ss(t[0],t[1]))]}var _R=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=vR(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=sR(r),f=yR[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}fR(t,e,CC(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=CC(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=dR(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=vR(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=os(o[1],l[c]),l[c]=ss(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(tR);function vR(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var yR={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:pR([t,r[0]],[t,r[1]],bR(e))}},shadow:function(e,t,n,r,i,a){var o=hR(e,i,a),s=r[1]-r[0],c=gR(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:mR([l,r[0]],[u-l,s],bR(e))}}};function bR(e){return e.dim===`x`?0:1}var xR=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Y.color.border,width:1,type:`dashed`},shadowStyle:{color:Y.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Y.color.neutral00,padding:[5,7,5,7],backgroundColor:Y.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Y.color.accent40,throttle:40}},t}(g_),SR=yc(),CR=N;function wR(e,t,n){if(!Ne.node){var r=t.getZr();SR(r).records||(SR(r).records={}),TR(r,t);var i=SR(r).records[e]||(SR(r).records[e]={});i.handler=n}}function TR(e,t){if(SR(e).initialized)return;SR(e).initialized=!0,n(`click`,ae(OR,`click`)),n(`mousemove`,ae(OR,`mousemove`)),n(`mousewheel`,ae(OR,`mousewheel`)),n(`globalout`,DR);function n(n,r){e.on(n,function(n){var i=kR(t);CR(SR(e).records,function(e){e&&r(e,n,i.dispatchAction)}),ER(i.pendings,t)})}}function ER(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function DR(e,t,n){e.handler(`leave`,null,n)}function OR(e,t,n,r){t.handler(e,n,r)}function kR(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function AR(e,t){if(!Ne.node){var n=t.getZr();(SR(n).records||{})[e]&&(SR(n).records[e]=null)}}var jR=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;wR(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){AR(`axisPointer`,t)},t.prototype.dispose=function(e,t){AR(`axisPointer`,t)},t.type=`axisPointer`,t}(gO);function MR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=vc(a,e);if(o==null||o<0||R(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(P(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var NR=yc();function PR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||L(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){WR(i)&&(i=MR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=WR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||WR(i),f={},p={},m={list:[],map:{}},h={showPointer:ae(LR,p),showTooltip:ae(RR,m)};N(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);N(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=HR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&FR(e,o,h,!1,f)}})});var g={};return N(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&N(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,UR(t),UR(e)))),g[e.key]=a}})}),N(g,function(e,t){FR(u[t],e,h,!0,f)}),zR(p,u,f),BR(m,i,e,o),VR(u,o,n),f}}function FR(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries)n.showPointer(e,t);else{var o=IR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&O(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}}function IR(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return N(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Us(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),N(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function LR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function RR(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=LM(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function zR(e,t,n){var r=n.axesInfo=[];N(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function BR(e,t,n,r){if(WR(t)||!e.list.length)r({type:`hideTip`});else{var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}}function VR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=NR(r)[i]||{},o=NR(r)[i]={};N(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&N(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}N(a,function(e,t){!o[t]&&c.push(l(e))}),N(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function HR(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function UR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function WR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function GR(e){zM.registerAxisPointerClass(`CartesianAxisPointer`,_R),e.registerComponentModel(xR),e.registerComponentView(jR),e.registerPreprocessor(function(e){if(e){e.axisPointer&&e.axisPointer.length!==0||(e.axisPointer={});var t=e.axisPointer.link;t&&!R(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=DM(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},PR)}function KR(e){Lj(XM),Lj(GR)}var qR=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=p_(t);e.prototype.init.apply(this,arguments),JR(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),JR(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Y.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Y.color.neutral00,borderWidth:1,borderColor:Y.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Y.size.s,color:Y.color.secondary},monthLabel:{show:!0,position:`start`,margin:Y.size.s,align:`center`,formatter:null,color:Y.color.secondary},yearLabel:{show:!0,position:null,margin:Y.size.xl,formatter:null,color:Y.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(g_);function JR(e,t){var n=e.cellSize,r=R(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),f_(e,t,{type:`box`,ignoreSize:P([0,1],function(e){return u_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var YR=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new Ro({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new md({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return B(e)&&e?Jg(e,t):z(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new Uo({z2:30,style:Yf(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||B(a))&&(a&&(t=Zh(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m<l[u].length-1;m++){var h=l[u][m].slice(),g=this._firstDayOfMonth[m];f&&(h[d]=(this._firstDayPoints[m][d]+l[0][m+1][d])/2);var _=i.get(`formatter`),v=a[g.m-1],y={yyyy:g.y,yy:(g.y+``).slice(2),MM:g.m,M:+g.m,nameMap:v},b=new Uo({z2:30,style:O(Yf(i,{text:this._formatterLabel(_,y)}),this._monthTextPositionControl(h,f,n,s,o)),silent:p});r.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,i){var a=`center`,o=`middle`,s=e[0],c=e[1],l=n===`start`;return t===`horizontal`?(s=s+r+(l?1:-1)*i[0]/2,a=l?`right`:`left`):(c=c+r+(l?1:-1)*i[1]/2,o=l?`bottom`:`top`),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderWeekText=function(e,t,n,r,i){var a=e.getModel(`dayLabel`);if(a.get(`show`)){var o=e.coordinateSystem,s=a.get(`position`),c=a.get(`nameMap`),l=a.get(`margin`),u=o.getFirstDayOfWeek();(!c||B(c))&&(c&&(t=Zh(c)||t),c=t.get([`time`,`dayOfWeekShort`])||P(t.get([`time`,`dayOfWeekAbbr`]),function(e){return e[0]}));var d=o.getNextNDay(n.end.time,7-n.lweek).time,f=[o.getCellWidth(),o.getCellHeight()];l=q(l,Math.min(f[1],f[0])),s===`start`&&(d=o.getNextNDay(n.start.time,-(7+n.fweek)).time,l=-l);for(var p=a.get(`silent`),m=0;m<7;m++){var h=o.getNextNDay(d,m),g=o.dataToCalendarLayout([h.time],!1).center,_=m;_=Math.abs((m+u)%7);var v=new Uo({z2:30,style:O(Yf(a,{text:c[_]}),this._weekTextPositionControl(g,r,s,l,f)),silent:p});i.add(v)}}},t.type=`calendar`,t}(gO),XR=864e5,ZR=function(){function e(t,n,r){this.type=`calendar`,this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(n,r)}return e.getDimensionsInfo=function(){return[{name:`time`,type:`time`},`value`]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){e=Ns(e);var t=e.getFullYear(),n=e.getMonth()+1,r=n<10?`0`+n:``+n,i=e.getDate(),a=i<10?`0`+i:``+i,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+``,m:r,d:a,day:o,time:e.getTime(),formatedDate:t+`-`+r+`-`+a,date:e}},e.prototype.getNextNDay=function(e,t){return t||=0,t===0||(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t)),this.getDateInfo(e)},e.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel(`dayLabel`).get(`firstDay`),this._orient=this._model.get(`orient`),this._lineWidth=this._model.getModel(`itemStyle`).getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=[`width`,`height`],i=this._model.getCellSize().slice(),a=this._model.getBoxLayoutParams(),o=this._orient===`horizontal`?[n,7]:[7,n];N([0,1],function(e){l(i,e)&&(a[r[e]]=i[e]*o[e])});var s={width:t.getWidth(),height:t.getHeight()},c=this._rect=o_(a,s);N([0,1],function(e){l(i,e)||(i[e]=c[r[e]]/o[e])});function l(e,t){return e[t]!=null&&e[t]!==`auto`}this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t,n){n||=[],R(e)&&(e=e[0]),t??=!0;var r=this.getDateInfo(e),i=this._rangeInfo,a=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+XR))return n[0]=n[1]=NaN,n;var o=r.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient===`vertical`?(n[0]=this._rect.x+o*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+o*this._sh+this._sh/2),n},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToLayout=function(e,t,n){n||={};var r=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},a=this.dataToPoint(e,t);return r.x=a[0]-this._sw/2,r.y=a[1]-this._sh/2,r.width=this._sw,r.height=this._sh,K.copy(i,r),Ef(i,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient===`vertical`?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=QR(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=QR(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=QR(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn(`Not implemented.`),!1},e.prototype._initRangeOption=function(){var e=this._model.get(`range`),t;if(R(e)&&e.length===1&&(e=e[0]),R(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+`-01-01`,n+`-12-31`]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),i=r.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[r.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/XR)-Math.floor(t[0].time/XR)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){sh({targetModel:t,coordSysType:`calendar`,coordSysProvider:ch})}),r},e.dimensions=[`time`,`value`],e}();function QR(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function $R(e){e.registerComponentModel(qR),e.registerComponentView(YR),e.registerCoordinateSystem(`calendar`,ZR)}function ez(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function tz(e,t){var n;return N(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function nz(e,t,n){var r=O({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(D(i,r,!0),f_(i,r,{ignoreSize:!0}),m_(n,i),az(n,i),az(n,i,`shape`),az(n,i,`style`),az(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var rz=[`transition`,`enterFrom`,`leaveTo`],iz=rz.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function az(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?rz:iz,i=0;i<r.length;i++){var a=r[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function oz(e,t){if(e&&(e.hv=t.hv=[tz(t,[`left`,`right`]),tz(t,[`top`,`bottom`])],e.type===`group`)){var n=e,r=t;n.width??=r.width=0,n.height??=r.height=0}}var sz=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,a=[];this._flatten(r,a,null);var o=ic(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];N(o,function(e,t){var n=e.newOption;n&&(s.push(n),ez(e,n),nz(i,t,n),oz(i[t],n))},this),n.elements=F(i,function(e){return e&&delete e.$action,e!=null})},t.prototype._flatten=function(e,t,n){N(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type=`graphic`,t.defaultOption={elements:[]},t}(g_),cz={path:null,compoundPath:null,group:zu,image:Ao,text:Uo},lz=yc(),uz=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this._elMap=U()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,i=e.get(`z`),a=e.get(`zlevel`);N(t,function(t){var o=pc(t.id,null),s=o==null?null:n.get(o),c=pc(t.parentId,null),l=c==null?r:n.get(c),u=t.type,d=t.style;u===`text`&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var f=t.textContent,p=t.textConfig;if(d&&Ty(d,u,!!p,!!f)){var m=Ey(d,u,!0);!p&&m.textConfig&&(p=t.textConfig=m.textConfig),!f&&m.textContent&&(f=m.textContent)}var h=hz(t),g=t.$action||`merge`,_=g===`merge`,v=g===`replace`;if(_){var y=!s,b=s;y?b=fz(o,l,t.type,n):(b&&(lz(b).isNew=!1),XL(b)),b&&(ML(b,h,e,{isInit:y}),mz(b,t,i,a))}else if(v){pz(s,t,n,e);var x=fz(o,l,t.type,n);x&&(ML(x,h,e,{isInit:!0}),mz(x,t,i,a))}else g===`remove`&&(NL(s,t),pz(s,t,n,e));var S=n.get(o);if(S&&f){if(_){var C=S.getTextContent();C?C.attr(f):S.setTextContent(new Uo(f))}else v&&S.setTextContent(new Uo(f))}if(S){var w=t.clipPath;if(w){var T=w.type,E=void 0,y=!1;if(_){var D=S.getClipPath();y=!D||lz(D).type!==T,E=y?dz(T):D}else v&&(y=!0,E=dz(T));S.setClipPath(E),ML(E,w,e,{isInit:y}),ZL(E,w.keyframeAnimation,e)}var O=lz(S);S.setTextConfig(p),O.option=t,gz(S,e,t),kf({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),ZL(S,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,i=this._elMap,a=t.getWidth(),o=t.getHeight(),s=[`x`,`y`],c=0;c<n.length;c++){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d&&d.isGroup){var f=d.parent,p=f===r,m=lz(d),h=lz(f);m.width=q(m.option.width,p?a:h.width)||0,m.height=q(m.option.height,p?o:h.height)||0}}for(var c=n.length-1;c>=0;c--){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=lz(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=l_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!lz(d).isNew&&v){for(var y=l.transition,b={},x=0;x<s.length;x++){var S=s[x],C=_[S];y&&(FL(y)||j(y,S)>=0)?b[S]=C:d[S]=C}Hd(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){pz(n,lz(n).option,t,e._lastGraphicModel)}),this._elMap=U()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(gO);function dz(e){var t=new(W(cz,e)?cz[e]:rf(e))({});return lz(t).type=e,t}function fz(e,t,n,r){var i=dz(n);return t.add(i),r.set(e,i),lz(i).id=e,lz(i).isNew=!0,i}function pz(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){pz(e,t,n,r)}),PL(e,t,r),n.removeKey(lz(e).id))}function mz(e,t,n,r){e.isGroup||N([[`cursor`,ga.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];W(t,r)?e[r]=H(t[r],n[1]):e[r]??(e[r]=n[1])}),N(I(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=z(r)?r:null}}),W(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function hz(e){return e=O({},e),N([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat($g),function(t){delete e[t]}),e}function gz(e,t,n){var r=J(e).eventData;e.silent||e.ignore||r||(r=J(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function _z(e){e.registerComponentModel(sz),e.registerComponentView(uz),e.registerPreprocessor(function(e){var t=e.graphic;R(t)?e.graphic=!t[0]||!t[0].elements?[{elements:t}]:[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var vz=[`x`,`y`,`radius`,`angle`,`single`],yz=yc(),bz=[`cartesian2d`,`polar`,`singleAxis`];function xz(e){return j(bz,e.get(`coordinateSystem`))>=0}function Sz(e){return e+`Axis`}function Cz(e,t){var n=U(),r=[],i=U();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function wz(e){var t=e.ecModel,n={infoList:[],infoMap:U()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(Sz(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function Tz(e){var t=yz(Rx(e));return t.axisProxyMap||=U()}function Ez(e){if(e)return Tz(e.ecModel).get(e.uid)}function Dz(e,t){Tz(e.ecModel).set(e.uid,t)}function Oz(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?Ez(n.model):null}var kz=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),Az=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=jz(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=jz(e);D(this.option,e,!0),D(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;N([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=U();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return N(vz,function(n){var r=this.getReferringComponents(Sz(n),wc);if(r.specified){t=!0;var i=new kz;N(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new kz;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Cc).models[0];o&&N(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Cc).models[0]&&a.add(e.componentIndex)})}}}r&&N(vz,function(t){if(r){var i=n.findComponents({mainType:Sz(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new kz;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);N([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(Sz(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){N(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return Ez(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(Sz(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;N([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;N([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return Ez(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],a=this._targetAxisInfoMap.get(i),o=0;o<a.indexList.length;o++){var s=this.getAxisProxy(i,a.indexList[o]);if(s.hostedBy(this))return s;t||=s}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type=`dataZoom`,t.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],t.defaultOption={z:4,filterMode:`filter`,start:0,end:100},t}(g_);function jz(e){var t={};return N([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Mz=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type=`dataZoom`,t}(gO),Nz=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getWindow=function(){return E(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(xz(t)){var n=Sz(this._dimName),r=t.getReferringComponents(n,Cc).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)},e.prototype.getMinMaxSpan=function(){return E(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t=this._extent,n=this.getAxisModel().axis,r=n.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],c,l=[!1,!1];N([`start`,`end`],function(n,u){var d=e[n],f=e[n+`Value`];i[u]===`percent`?(d??=a[u],f=_s(d,a,t),l[u]=!0):(c=!0,f==null?f=t[u]:(f=r.parse(f),r.sanitize&&(f=r.sanitize(f,t))),d=_s(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),Cs(s),Cs(o);var u=this._minMaxSpan;c?d(s,o,t,a,!1):d(o,s,a,t,!0);function d(e,t,n,r,i){var a=i?`Span`:`ValueSpan`;RI(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(var o=0;o<2;o++)t[o]=_s(e[o],n,r,!0),i&&(t[o]=t[o],l[o]=!0);Bc(t)}var f=qy(r)||Gy(r),p=n.getExtent(),m=cs(p[1]-p[0]),h=f?0:Es(s,m,.5);N([[0,ds],[1,us]],function(e){var n=e[0],r=e[1];l[n]&&isFinite(h)&&(s[n]=Ss(s[n],h),s[n]=os(t[1],ss(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],f&&(s[n]=r(s[n]))))}),Bc(s);var g=[_s(s[0],t,a,!0),_s(s[1],t,a,!0)];return Bc(g),{value:s,percent:o,percentInverted:g,valuePrecision:h}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;LC(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=A({start:t[0],end:t[1]},i));var a=this._window=this.calculateDataWindow(i),o=a.percent,s=a.value;o[0]!==0&&r.setZoomMM(0,s[0]),o[1]!==100&&r.setZoomMM(1,s[1])}},e.prototype.filterData=function(e,t){if(!this.hostedBy(e))return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._window.value;if(i===`none`)return;N(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var s=t.getStore(),c=P(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,o=0;o<r.length;o++){var l=s.get(c[o],e),u=!isNaN(l),d=l<a[0],f=l>a[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else N(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});N(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;N([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=_s(i,[0,100],n,!0)-n[0]):i=_s(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),Pz={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(Sz(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!Ez(i)){var o=new Nz(t,r,a,e);n.push(o),Dz(i,o)}});var r=U();return N(n,function(e){N(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=Oz(e,i);a?n.push([i,a]):i.reset(e,null)}),N(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function Fz(e){e.registerAction(`dataZoom`,function(e,t){N(Cz(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Iz=Vc();function Lz(e){Iz(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Pz),Fz(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function Rz(e,t){var n=Ug(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Ro({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var zz=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Y.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Y.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Y.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Y.color.tertiary,fontSize:14}},t}(g_);function Bz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Vz(e){if(Ne.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var Hz=Vz([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Uz=Vz([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function Wz(e,t){if(!e)return t;t=Hg(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function Gz(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var Kz=Wz(Uz,`transition`),qz=Wz(Hz,`transform`),Jz=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Ne.transform3dSupported?`will-change:transform;`:``);function Yz(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function Xz(e,t,n){if(!B(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=Xg(t);var a=Yz(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=qz+`:`,l;j([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function Zz(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Ne.transformSupported?``+qz+i:`,left`+i+`,top`+i)),Kz+`:`+a}function Qz(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ne.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ne.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+qz+`:`+o+`;`:[[`top`,0],[`left`,0],[Hz,o]]}function $z(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=H(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),N([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function eB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=pv(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(Zz(a,n,r)),o&&i.push(`background-color:`+o),N([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Hg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push($z(d)),f!=null&&i.push(`padding:`+Ug(f).join(`px `)+`px`),i.join(`;`)+`;`}function tB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Mh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var nB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ne.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(B(i)?document.querySelector(i):ue(i)?i:z(i)&&i(e.getDom()));tB(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;oE(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Gz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Jz+eB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Qz(i[0],i[1],!0)+(`border-color:`+Xg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null)a.innerHTML=``;else{var o=``;if(B(i)&&n.get(`trigger`)===`item`&&!Bz(n)&&(o=Xz(n,r,i)),B(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,R(e)||(e=[e]);for(var s=0;s<e.length;s++)ue(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(tB(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;N(Qz(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,Ne.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(L(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Nh(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),rB=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),oB(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;V(e)&&Ys(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Uo({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:pv(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),N([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),N([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=aB(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;oB(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=iB(i.borderWidth||0),o=aB(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(L(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function iB(e){return Math.max(0,e)}function aB(e){var t=iB(e.shadowBlur||0),n=iB(e.shadowOffsetX||0),r=iB(e.shadowOffsetY||0);return{left:iB(t-n),right:iB(t+n),top:iB(t-r),bottom:iB(t+r)}}function oB(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var sB=new Ro({shape:{x:-1,y:-1,width:2,height:2}}),cB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!Ne.node&&t.getDom()){var n=e.getComponent(`tooltip`),r=this._renderMode=kc(n.get(`renderMode`));this._tooltipContent=r===`richText`?new rB(t):new nB(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!Ne.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?xw(this,`_updatePosition`,50,`fixRate`):Sw(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);wR(`itemTooltip`,this._api,L(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ne.node&&n.getDom()){var i=uB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=hB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=sB;c.x=r.x,c.y=r.y,c.update(),J(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=MR(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(uB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&lB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(J(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;tk(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(J(e).dataIndex==null?J(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=L(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=lB([t.tooltipOption],r),o=this._renderMode,s=[],c=$_(`section`,{blocks:[],noHeader:!0}),l=[],u=new mv;N(e,function(e){N(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=uR(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=$_(`section`,{header:f,noHeader:!ye(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),N(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Nb(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,Xg(m.color),o);var h=D_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=lB([a],r).get(`valueFormatter`);p.blocks.push(_?O({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=av(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
14
+ `];function ev(e,t){return t.type=e,t}function tv(e){return e.type===`section`}function nv(e){return tv(e)?iv:av}function rv(e){if(tv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return F(e.blocks,function(e){var n=rv(e);n>=t&&(t=n+ +(r&&(!n||tv(e)&&!e.noHeader)))}),t}return 0}function iv(e,t,n,r){var i=t.noHeader,a=sv(rv(t)),o=[],s=t.blocks||[];_e(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(ke(l,c)){var u=new gm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}F(s,function(n,i){var s=t.valueFormatter,c=nv(n)(s?k(k({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):cv(r,o.join(``),i?n:a.html);if(i)return d;var f=Gg(t.header,`ordinal`,e.useUTC),p=Z_(r,e.renderMode).nameStyle,m=X_(r);return e.renderMode===`richText`?dv(e,f,p)+a.richText+d:cv(r,`<div style="`+p+`;`+m+`;">`+Vh(f)+`</div>`+d,n)}function av(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],I(e,function(e,t){return Gg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Y.color.secondary,i),f=a?``:Gg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=Z_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:dv(e,f,v))+(o?``:fv(e,m,h,g,y)):cv(r,(s?``:d)+(a?``:lv(f,!s,v))+(o?``:uv(m,h,g,y)),n)}}function ov(e,t,n,r,i,a){if(e)return nv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function sv(e){return{html:Q_[e],richText:$_[e]}}function cv(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=X_(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function lv(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Vh(e)+`</span>`}function uv(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],`<span style="`+i+`;`+r+`">`+I(e,function(e){return Vh(e)}).join(`&nbsp;&nbsp;`)+`</span>`}function dv(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function fv(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function pv(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return Zg(n)}function mv(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var hv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Bs()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Xg({color:t,type:e,renderMode:n,markerId:r});return H(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?F(t,function(e){return k(n,e)}):k(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function gv(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=pv(t,n),u,d,f,p;if(o>1||c&&!o){var m=_v(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=sm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=mc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return ev(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[ev(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ve(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function _v(e,t,n,r,i){var a=t.getData(),o=te(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?F(r,function(e){u(sm(a,n,e),e)}):F(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(ev(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var vv=yc();function yv(e,t){return e.getName(t)||e.getId(t)}var bv=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=k_({count:Cv,reset:wv}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(vv(this).sourceManager=new U_(this)).prepareSource();var r=this.getInitialData(e,n);Ev(r,this),this.dataTask.context.data=r,vv(this).dataBeforeProcessed=r,xv(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=f_(this),r=n?m_(e):{},i=this.subType;__.hasClass(i)&&(i+=`Series`),O(e,t.getTheme().get(this.subType)),O(e,this.getDefaultOption()),ec(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&p_(e,r,n)},t.prototype.mergeOption=function(e,t){e=O(this.option,e,!0),this.fillDataTextStyle(e.data);var n=f_(this);n&&p_(this.option,e,n);var r=vv(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Ev(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,vv(this).dataBeforeProcessed=i,xv(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ce(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&ec(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=Ov(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return vv(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=Ov(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}vv(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return G(e)},t.prototype.getSourceManager=function(){return vv(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return vv(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return gv({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ne.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=x_.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var a=0;a<e.length;a++){var o=e[a],s=yv(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=R(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[yv(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){U(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=yv(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=yv(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return __.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(__);N(bv,D_),N(bv,x_),Ue(bv,__);function xv(e){var t=e.name;mc(e)||(e.name=Sv(e)||t)}function Sv(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return F(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Cv(e){return e.model.getRawData().count()}function wv(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Tv}function Tv(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Ev(e,t){F(Ee(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ie(Dv,t))})}function Dv(e,t){var n=Ov(e);return n&&n.setOutputEnd((t||this).count()),t}function Ov(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var kv=wo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Av={line:vd,rect:Ro,roundRect:Ro,square:Ro,circle:Hu,diamond:wo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:wo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:wo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:kv},jv={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Mv={};F(Av,function(e,t){Mv[t]=new e});var Nv=wo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=gn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Mv[r];i||=(r=`rect`,Mv[r]),jv[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Pv(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Y.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Fv(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?sf(e.slice(8),new q(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?of(e.slice(7),{},new q(t,n,r,i),o?`center`:`cover`):new Nv({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Pv,a&&c.setColor(a),c}function Iv(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Lv(e,t){if(e!=null)return B(e)||(e=[e,e]),[J(e[0],t[0])||0,J(W(e[1],e[0]),t[1])||0]}var Rv=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return bh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Bu,n=Fv(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Fv(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Y.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(bv);function zv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=sm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(sm(e,t,n[o]));return a.join(` `)}}function Bv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!B(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Vv=function(e){i(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Fv(e,-1,-1,2,2,null,a);o.attr({z2:W(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Hv,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Hl(this.childAt(0))},t.prototype.downplay=function(){Ul(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Ud(f,p,o,n),Yd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Wd(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Yf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Lv(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Ao){var S=a.style;a.useStyle(k({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(k({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Jf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):zv(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),su(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Xc(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Kd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Kd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Iv(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Bu);function Hv(e,t){this.parent.drift(e,t)}function Uv(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Wv(e){return e!=null&&!U(e)&&(e={isIgnore:e}),e||{}}function Gv(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Yf(t),cursorStyle:t.get(`cursor`)}}function Kv(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var qv=function(){function e(e){this.group=new Bu,this._SymbolCtor=e||Vv}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Wv(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Gv(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Uv(e,i,r,t)&&Kv(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Uv(e,p,u,t))n.remove(f);else{var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Ud(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);Uv(t,s,i,e)?(o||=Kv(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Gv(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=Wv(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(Uv(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){Mf(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function Jv(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Yv(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=I(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return gh(t,d[0])&&(f=!0,d[0]=p),gh(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Yv(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:oe(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Xv(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Zv(e,t){return!isFinite(e)||!isFinite(t)}var Qv=typeof Float32Array<`u`?Float32Array:void 0,$v=typeof Float64Array<`u`?Float64Array:void 0;function ey(e){return ty({ctor:Qv},e).arr}function ty(e,t){var n=e.arr,r=e.ctor;if(t>ks&&(t=ks),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function ny(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function ry(e,t,n,r,i,a,o,s){for(var c=ny(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Jv(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Xv(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,ee=ey(M),N=ey(M),P=ey(M),F=ey(M),I=[],y=0;y<m.length;y++){var te=m[y],L=y*2,ne=te*2;ee[L]=l[ne],ee[L+1]=l[ne+1],N[L]=u[ne],N[L+1]=u[ne+1],P[L]=d[ne],P[L+1]=d[ne+1],F[L]=f[ne],F[L+1]=f[ne+1],I[y]=p[te]}return{current:ee,next:N,stackedOnCurrent:P,stackedOnNext:F,status:I}}var iy=Math.min,ay=Math.max;function oy(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(Zv(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;Zv(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||Zv(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,ee=C-v,N=void 0,P=void 0;if(s===`x`){N=Math.abs(A),P=Math.abs(j);var F=E>0?1:-1;p=_-F*N*o,m=v,O=_+F*P*o,k=v}else if(s===`y`){N=Math.abs(M),P=Math.abs(ee);var I=D>0?1:-1;p=_,m=v-I*N*o,O=_,k=v+I*P*o}else N=Math.sqrt(A*A+M*M),P=Math.sqrt(j*j+ee*ee),T=P/(P+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=iy(O,ay(S,_)),k=iy(k,ay(C,v)),O=ay(O,iy(S,_)),k=ay(k,iy(C,v)),E=O-_,D=k-v,p=_-E*N/P,m=v-D*N/P,p=iy(p,ay(l,_)),m=iy(m,ay(u,v)),p=ay(p,iy(l,_)),m=ay(m,iy(u,v)),E=_-p,D=v-m,O=_+E*P/N,k=v+D*P/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var sy=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),cy=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new sy},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Zv(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Zv(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=oy(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=Qa.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?dr(i,u,f,m,e,s):dr(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?lr(a,d,p,h,b):lr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(wo),ly=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(sy),uy=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ly},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Zv(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Zv(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=oy(e,n,i,a,a,1,t.smooth,o,t.connectNulls);oy(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(wo);function dy(){var e=yc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var fy=yc(),py=dy(),my=function(){function e(){this.group=new Bu,this.uid=wh(`viewChart`),this.renderTask=k_({plan:_y,reset:vy}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&gy(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&gy(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Mf(this.group,e)},e.markUpdateMethod=function(e,t){fy(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function hy(e,t,n){e&&pu(e)&&(t===`emphasis`?Hl:Ul)(e,n)}function gy(e,t,n){var r=vc(e,t),i=t&&t.highlightKey!=null?mu(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){hy(e,n,i)}):F($s(r),function(t){hy(e.getItemGraphicEl(t),n,i)})}Ve(my,[`dispose`]),Je(my);function _y(e){return py(e.model)}function vy(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&fy(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),yy[c]}var yy={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function by(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new Ro({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=V(i)?function(e){i(e,d)}:null;Wd(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function xy(e,t,n){var r=e.getArea(),i=Ss(r.r0,1),a=Ss(r.r,1),o=new sd({shape:{cx:Ss(e.cx,1),cy:Ss(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Wd(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function Sy(e,t,n,r,i){return e?e.type===`polar`?xy(e,t,n):e.type===`cartesian2d`?by(e,t,n,r,i):null:null}function Cy(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function wy(e,t){return e.type===t}function Ty(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}function Ey(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||ke(e,`text`)))}function Dy(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},ke(r,`text`)&&(o.text=r.text),ke(r,`rich`)&&(o.rich=r.rich),ke(r,`textFill`)&&(o.fill=r.textFill),ke(r,`textStroke`)&&(o.stroke=r.textStroke),ke(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),ke(r,`fontSize`)&&(o.fontSize=r.fontSize),ke(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),ke(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=ke(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),ke(r,`textPosition`)&&(i.position=r.textPosition),ke(r,`textOffset`)&&(i.offset=r.textOffset),ke(r,`textRotation`)&&(i.rotation=r.textRotation),ke(r,`textDistance`)&&(i.distance=r.textDistance)}return Oy(o,e),F(o.rich,function(e){Oy(e,e)}),{textConfig:i,textContent:a}}function Oy(e,t){t&&(t.font=t.textFont||t.font,ke(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),ke(t,`textAlign`)&&(e.align=t.textAlign),ke(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),ke(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),ke(t,`textWidth`)&&(e.width=t.textWidth),ke(t,`textHeight`)&&(e.height=t.textHeight),ke(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),ke(t,`textPadding`)&&(e.padding=t.textPadding),ke(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),ke(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),ke(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),ke(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),ke(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),ke(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),ke(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}var ky=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Je(ky);var Ay=0,jy=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Ay,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&I(r,My);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!H(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=G(this.categories)},e}();function My(e){return U(e)&&e.value!=null?e.value:e+``}var Ny=R({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function Py(e,t,n){var r;e||={};var i=ng();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(F(Ny,function(t){a[t]&&(e[t]=z(a[t],a))}),r=a)}return r??Vy(e,n),{brk:r,mapper:e}}function Fy(e,t){F(Ny,function(n){e[n]=t[n]})}function Iy(e,t){e.freeze=Ae}function Ly(e){return e.getExtentUnsafe(0,2)}function Ry(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function zy(e){var t=Ry(e,3);return t[1]-t[0]}function By(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Vy(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Mc(),k(n,Hy),n}var Hy={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=Ry(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Uy(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Uy(r,e,t,n)},freeze:function(){}};function Uy(e,t,n,r){Rc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Wy(e){return Gy(e)||qy(e)}function Gy(e){return e.type===`interval`}function Ky(e){return e.type===`time`}function qy(e){return e.type===`log`}function Jy(e){return e.type===`ordinal`}function Yy(e){var t=Fs(e),n=fs(10,t),r=ls(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ss(r*n,-t)}function Xy(e){return ws(e)+2}function Zy(e,t){return ps(e)/ps(t)}function Qy(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return fs(t,e)}function $y(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=cs(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return Lc(r[0])&&Lc(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function eb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function tb(e,t){return e||=t,ls(ss(e,1))}function nb(e,t,n){var r=Ly(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var rb=function(e){i(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Fy(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new jy({}),B(i)&&(i=new jy({categories:I(i,function(e){return U(e)?e.value:e})})),r._ordinalMeta=i;var a=Py(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Iy(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:H(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=ls(e),e},t.prototype.getTicks=function(){var e=[];return nb(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=os(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Ly(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(ls(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(ky);ky.registerClass(rb);function ib(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=Xy(f);u<t-1;){var m=Ss(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=ng();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var ab=function(e){i(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Py(r,rg(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return D(this._cfg)},t.prototype.setConfig=function(e){var t=Ly(this);this._cfg=e=D(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Xy(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Ly(this),i=t.niceExtent,a=t.intervalPrecision,o=ng(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?Ss(i[0]-n,a):r[0]});for(var d=function(e,t){return ls((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=os(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Ss(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Ss(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Ss(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return ib(this,e,ig(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=ws(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Hg(Ss(e.value,n,!0))},t.type=`interval`,t}(ky);ky.registerClass(ab);var ob=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},sb=function(e){i(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Py(r,rg(r,n),null).brk,r}return t.prototype.getLabel=function(e){return wg(e.value,hg[Cg(xg(this._minLevelUnit))]||hg.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return Tg(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Ly(this),r=ng(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return ng().addBreaksToTicks(o,i.breaks,n),o;o=_b(this._minLevelUnit,this._approxInterval,s,n,By(this),i);var c=gg.length-1,l=0;return F(o,function(e){e.time&&(c=Math.min(c,M(gg,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&ng().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&ng().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(M(gg,Eg(e.vmin,s)),M(gg,Eg(e.vmax,s))),n=0,r=0;r<gg.length;r++)if(!lb(gg[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:gg[Math.max(i,t)],upperTimeUnit:gg[i]}}),o},t.prototype.getMinorTicks=function(e){return ib(this,e,ig(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return oe(e)?Math.round(e):+Ns(e)},t.type=`time`,t}(ky),cb=[[`second`,og],[`minute`,sg],[`hour`,cg],[`quarter-day`,cg*6],[`half-day`,cg*12],[`day`,lg*1.2],[`half-week`,lg*3.5],[`week`,lg*7],[`month`,lg*31],[`quarter`,lg*95],[`half-year`,ug/2],[`year`,ug]];function lb(e,t,n,r){return Dg(new Date(t),e,r).getTime()===Dg(new Date(n),e,r).getTime()}function ub(e,t){return e/=lg,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function db(e){var t=30*lg;return e/=t,e>6?6:e>3?3:e>2?2:1}function fb(e){return e/=cg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function pb(e,t){return e/=t?sg:og,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function mb(e){return ss(Is(e,!0),1)}function hb(e,t,n){var r=Math.max(0,M(gg,t)-1);return Dg(new Date(e),gg[r],n).getTime()}function gb(e,t){var n=/* @__PURE__ */ new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function _b(e,t,n,r,i,a){var o=_g,s=0;function c(e,t,n,i,o,c,l){for(var u=gb(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!lb(xg(e),r[0],r[1],n)){s&&(i=[{value:hb(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,d=i[l+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/lg/365)),p=Og(n),m=Fg(n);break;case`half-year`:case`quarter`:case`month`:f=db(t),p=kg(n),m=Ig(n);break;case`week`:case`half-week`:case`day`:f=ub(t,31),p=Ag(n),m=Lg(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=fb(t),p=jg(n),m=Rg(n);break;case`minute`:f=pb(t,!0),p=Mg(n),m=zg(n);break;case`second`:f=pb(t,!1),p=Ng(n),m=Bg(n);break;case`millisecond`:f=mb(t),p=Pg(n),m=Vg(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=xg(o[m]);if(Sg(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?xg(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=L(I(u,function(e){return L(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=Eg(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Uc(S,Wc,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=Eg(r[0],n),k=Eg(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}var vb=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=lg,n[1]+=lg),n[1]===-1/0&&n[0]===1/0){var r=/* @__PURE__ */ new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-lg}e.setExtent(n[0],n[1]);var i=tb(t.splitNumber,10),a=By(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=cb.length,l=Math.min(ob(cb,a,0,c),c-1),u=cb[l][1],d=cb[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};ky.registerClass(sb);var yb=0,bb=1,xb=2,Sb=function(e){i(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=ab.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[yb]=i[bb]=a[yb]=a[bb]=NaN,Fy(r,t.mapperMethods);var s=ng(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},xb,l),r.powStub=new ab({breakParsed:l.original}),r.intervalStub=new ab({breakParsed:l.transformed}),Iy(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=ng(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return I(i.getTicks(e||{}),function(e){var i=e.value,o=Qy(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,ig(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return ib(this,e,ig(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Zy(e,this.base))},scale:function(e){return Qy(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Zy(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Cb.depth=n,wb.lookup=this._lookup,Qy(n===2?e:this.intervalStub.transformOut(e,Cb),this.base,wb)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Rc(t,n)||t<=0||n<=0)){var r=Tb,i=Tb;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[yb]=t,r[bb]=n);var o=this.base;this.intervalStub.setExtent2(e,i[yb]=Zy(t,o),i[bb]=Zy(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Rc(t[0],t[1])&&Us(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(ky);ky.registerClass(Sb);var Cb={},wb={},Tb=[],Eb={value:1,category:1,time:1,log:1},Db=yc();function Ob(e){var t=e.get(`type`);return(t==null||!ke(Eb,t)&&!ky.getClass(t))&&(t=`value`),t}function kb(e,t,n){var r=ng(),i;switch(r&&(i=Bb(e,t,n)),t){case`category`:return new rb({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Mc()});case`time`:return new sb({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Sb({logBase:e.get(`logBase`),breakOption:i});case`value`:return new ab({breakOption:i});default:return new((ky.getClass(t))||ab)({})}}function Ab(e,t,n){var r=n?Ry(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Rc(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function jb(e){Db(e).noOnMyZero=!0}function Mb(e){return Db(e).noOnMyZero}function Nb(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=vg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(H(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(V(t)){if(e.type===`category`)return function(n,r){return t(Pb(e,n),n.value-e.scale.getExtent()[0],null)};var r=ng();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Pb(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Pb(e,t){var n=e.scale;return Jy(n)?n.getLabel(t):t.value}function Fb(e){return e.get(`interval`)??`auto`}function Ib(e){return e.type===`category`&&Fb(e.getLabelModel())===0}function Lb(e,t){var n={};return F(e.mapDimensionsAll(t),function(t){n[_h(e,t)]=!0}),R(n)}function Rb(e){return e===`middle`||e===`center`}function zb(e){return e.getShallow(`show`)}function Bb(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!ng()||!n||!Vb(t)?void 0:r}function Vb(e){return e!==`category`}function Hb(e,t,n,r,i,a){var o=qy(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=eb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Ub(e,t){return Jy(e)?e.getRawOrdinalNumber(t.value):t.value}function Wb(e,t){return Jy(e)&&!!t.get(`boundaryGap`)}function Gb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Kb(e){for(var t=Mc(),n=Mc(),r=0;r<e.length;){var i=e[r++],a=e[r++];Zv(i,a)||(Nc(t,i),Nc(n,a))}return[t,n]}function qb(e,t){var n=Kb(e),r=n[0],i=n[1],a=Kb(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function Jb(e){return oe(e)?e:e?.5:0}function Yb(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=ey(r*2),a=0;a<r;a++){var o=Xv(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Xb(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;Zv(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Zb(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Wr((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Qb(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=I(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Zb(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;F(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new Dd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function $b(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&ex(a,t))){var o=t.mapDimension(a.dim),s={};return F(a.getViewLabels(),function(e){e.tick.offInterval||(s[Ub(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function ex(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Vv.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function tx(e){for(var t=e.length/2;t>0&&Zv(e[t*2-2],e[t*2-1]);t--);return t-1}function nx(e,t){return[e[t*2],e[t*2+1]]}function rx(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!Zv(o,e[l*2+1-i])){if(l===0)a=o;else{if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}}return{range:[s,c],t:(t-a)/(o-a)}}function ix(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<hl.length;t++)if(e.get([hl[t],`endLabel`,`show`]))return!0;return!1}function ax(e,t,n,r){if(wy(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=ix(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=by(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return xy(t,n,r)}function ox(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var sx=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Bu,t=new qv;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=z(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=Jv(r,a,_),y=g&&Yb(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&$b(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Qb(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Xb(y,c,r,w,x),c=Xb(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Zg(E)),m.setClipPath(ax(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Zg(E));var D=m.getClipPath();D?Wd(D,{shape:ax(this,r,!1,e).shape},e):m.setClipPath(ax(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),Gb(this._stackedOnPoints,y)&&Gb(this._points,c)||(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Xb(y,c,r,w,x),c=Xb(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),M=O.get(`disabled`);if(f.useStyle(j(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),du(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}Xc(f).seriesIndex=e.seriesIndex,su(f,k,A,M);var N=Jb(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var F=a.getCalculationInfo(`stackedOnSeries`),I=0;p.useStyle(j(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),F&&(I=Jb(F.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:I,smoothMonotone:P,connectNulls:x}),du(p,e,`areaStyle`),Xc(p).seriesIndex=e.seriesIndex,su(p,k,A,M)}var te=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var L=e.get(`triggerEvent`),ne=e.get(`triggerLineEvent`),R=ne===!0||L===!0||L===`line`,re=ne===!0||L===!0||L===`area`;this.packEventData(e,f,R),p&&this.packEventData(e,p,re)},t.prototype.packEventData=function(e,t,n){Xc(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=vc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Zv(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Vv(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else my.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=vc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else my.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Nl(this._polyline,e),t&&Nl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new cy({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new uy({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);V(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=V(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=V(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(ix(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Uo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=tx(o);c>=0&&(Jf(a,Yf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?zv(i,e):Bv(i,n)},enableTextSetter:!0},ox(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=rx(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=nx(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=jc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=nx(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=ap(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=ry(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Xb(u.stackedOnCurrent,u.current,n,i,o),d=Xb(u.current,null,n,i,o),m=Xb(u.stackedOnNext,u.next,n,i,o),p=Xb(u.next,null,n,i,o)),qb(d,p)>3e3||c&&qb(f,m)>3e3)s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));else{s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Ud(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Ud(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})}},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(my);function cx(e,t){return{seriesType:e,plan:dy(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=I(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);gh(n,o[0])&&(o[0]=c),gh(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&ey(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var lx={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},ux=function(e){return Math.round(e.length/2)};function dx(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;H(i)?p=lx[i]:V(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,ux))}}}}}function fx(e){e.registerChartView(sx),e.registerSeriesModel(Rv),e.registerLayout(cx(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dx(`line`))}var px=yc(),mx=yc(),hx={estimate:1,determine:2};function gx(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function _x(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:I(yx(n,r),function(t,n){return{formattedLabel:Nb(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?bx(e,t):Cx(e)}function vx(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:yx(i,r)}:e.type===`category`?Sx(e,t):{ticks:r.getTicks(n)}}function yx(e,t){var n=t.getExtent(),r=[];return F(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Uc(r,Gc,null),Cs(r),I(r,function(e){return{value:e}})}function bx(e,t){var n=e.getLabelModel(),r=xx(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function xx(e,t,n){var r=Ex(e),i=Fb(t),a=n.kind===hx.estimate;if(!a){var o=Ox(r,i);if(o)return o}var s,c;V(i)?s=Fx(e,i,!1):(c=i===`auto`?Ax(e,n):i,s=Fx(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return kx(r,i,l),!0}):kx(r,i,l),l}function Sx(e,t){var n=Tx(e),r=Fb(t),i=Ox(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),V(r))a=Fx(e,r,!0);else if(r===`auto`){var s=xx(e,e.getLabelModel(),gx(hx.determine));o=s.labelCategoryInterval,a=I(s.labels,function(e){return e.tick})}else o=r,a=Fx(e,o,!0);return kx(n,r,{ticks:a,tickCategoryInterval:o})}function Cx(e){var t=e.scale.getTicks(),n=Nb(e);return{labels:I(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Tx=Dx(`axisTick`),Ex=Dx(`axisLabel`);function Dx(e){return function(t){return mx(t)[e]||(mx(t)[e]={list:[]})}}function Ox(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function kx(e,t,n){return e.list.push({key:t,value:n}),n}function Ax(e,t){if(t.kind===hx.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return mx(e).autoInterval=n,!0}),n}return mx(e).autoInterval??(mx(e).autoInterval=e.calculateCategoryInterval(t))}function jx(e,t){var n=t.kind,r=Px(e),i=Nb(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=dn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===hx.estimate?(t.out.noPxChangeTryDetermine.push(z(Mx,null,e,S,c)),S):Nx(e,S,c)??S}function Mx(e,t,n){return Nx(e,t,n)==null}function Nx(e,t,n){var r=px(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Px(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Fx(e,t,n){var r=Nb(e),i=e.scale,a=[],o=V(t);return nb(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Ix=yc();function Lx(e){Ix(e).prepare={}}function Rx(e){Ix(e).fullUpdate={}}function zx(e){return Ix(e).prepare}function Bx(e){return Ix(e).fullUpdate}var Vx=Vc(),Hx=yc(),Ux=yc();function Wx(e,t){var n=e.model,r=Hx(Bx(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Gx(e,t){return Jx(Wx(e,t))}function Kx(e,t){var n=[];return qx(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(Jx(e))}),n}function qx(e,t){var n=Hx(Bx(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function Jx(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function Yx(e,t){var n=e.model.ecModel,r=Hx(Bx(n)).axSer;r&&Zx(n,r.get(e.model.uid),t)}function Xx(e,t,n){var r=Wx(e,t);r&&Zx(e.model.ecModel,r.sers,n)}function Zx(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function Qx(e,t,n){var r=Hx(Bx(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function $x(e,t){var n=e.model,r=Hx(Bx(n.ecModel)).keys;r&&F(r.get(n.uid),function(e){t(e)})}function eS(e){var t=Ux(zx(e)),n=t.keyed||=G();qx(e,function(t,r,i){var a=n.get(r)||n.set(r,G()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&nS.liPosMinGap(e,t,o)})}function tS(e,t){nS[e]=t}var nS={};function rS(e,t,n){if(e){var r=t.ecModel,i=Hx(Bx(r)),a=e.model.uid,o=i.axSer||=G();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=oS.get(iS(s,c,n))||oS.get(iS(s,c,null));if(l){var u=i.keyed||=G(),d=i.keys||=G(),f=l.key,p=u.get(f)||u.set(f,G()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function iS(e,t,n){return e+`|&`+W(t,!0)+`|&`+(n||``)}function aS(e,t){var n=iS(t.seriesType,t.baseAxis,t.coordSysType);oS.set(n,t),Vx(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:eS})})}var oS=G(),sS=.8;function cS(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=zy(r);Us(o)||(o=NaN);var s=e.getExtent(),c=cs(s[1]-s[0]);return Jy(r)?lS(n,e,o,c):i&&uS(n,e,o,c,i),a!=null&&(n.w=Us(n.w)?ss(a,n.w):a),n}function lS(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function uS(e,t,n,r,i){var a=!1,o=-1/0;F(i.key?[Gx(t,i.key)]:Kx(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Us(n)&&n>0&&Us(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*sS,e.w2=e.w*n/r)}var dS=[0,1],fS=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),_s(e,dS,pS(this),t)},e.prototype.coordToData=function(e,t){var n=_s(e,pS(this),dS,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=I(vx(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Ub(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=mS(this,n,r);return I(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Jy(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),I(this.scale.getMinorTicks(e),function(e){return I(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=gx(hx.determine),_x(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return cS(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=gx(hx.determine),jx(this,e)},e}();function pS(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function mS(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=cS(e).w;if(!i)return!1;F(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var hS=function(e){i(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(fS),gS=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],_S=1,vS=2,yS=_S|vS;function bS(e,t,n){n||=yS,t?e.dirty|=n:e.dirty&=~n}function xS(e,t){return t||=yS,e.dirty==null||!!(e.dirty&t)}function SS(e){if(e)return xS(e)&&CS(e,e.label,e),e}function CS(e,t,n){var r=t.getComputedTransform();e.transform=If(e.transform,r);var i=e.localRect=Ff(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=cp.textMargin);for(var d=0;d<4;d++)wS[d]=u===cp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cp.textMargin&&Df(i,wS,!1,!1);var f=e.rect=Ff(e.rect,i);return r&&f.applyTransform(r),u===cp.minMargin&&Df(f,wS,!1,!1),e.axisAligned=Nf(r),(e.label=e.label||{}).ignore=t.ignore,bS(e,!1),bS(e,!0,vS),e}var wS=[0,0,0,0];function TS(e,t,n){return e.transform=If(e.transform,n),e.localRect=Ff(e.localRect,t),e.rect=Ff(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Nf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function ES(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function DS(e,t){for(var n=0;n<gS.length;n++){var r=gS[n];e[r]??(e[r]=t[r])}return SS(e)}function OS(e){var t=e.obb;return(!t||xS(e,vS))&&(e.obb=t||=new Ld,t.fromBoundingRect(e.localRect,e.transform),bS(e,!1,vS)),t}function kS(e,t,n,r,i){var a=e.length,o=Qd[t],s=$d[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function AS(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.defaultAttr,i=n.labelLine;n.label.attr(`ignore`,r.ignore),i&&i.attr(`ignore`,r.labelGuideIgnore)}}function jS(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=SS(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(MS(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function MS(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:OS(e).intersect(OS(t),n,r)}var NS=null;function PS(e){NS||=e}function FS(){return NS}var IS=`expandAxisBreak`,LS=`collapseAxisBreak`,RS=`toggleAxisBreak`,zS=`axisbreakchanged`,BS={type:IS,event:zS,update:`update`,refineEvent:US},VS={type:LS,event:zS,update:`update`,refineEvent:US},HS={type:RS,event:zS,update:`update`,refineEvent:US};function US(e,t,n,r){var i=[];return F(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function WS(e){e.registerAction(BS,t),e.registerAction(VS,t),e.registerAction(HS,t);function t(e,t){var n=[],r=xc(t,e);function i(t,i){F(r[t],function(t){F(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(j((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var GS=Math.PI,KS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],qS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],JS=yc(),YS=yc(),XS=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function ZS(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=xC(e.axisName)&&Rb(e.nameLocation);F(r,function(e){var t=SS(e);if(t&&!t.label.ignore){o.push(t);var n=a.transGroup;c&&(n.transform?pt(QS,n.transform):st(QS),t.transform&&lt(QS,QS,t.transform),q.copy($S,t.localRect),$S.applyTransform(QS),s?s.union($S):q.copy(s=new q(0,0,0,0),$S))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new q(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var QS=ot(),$S=new q(0,0,0,0),eC=function(e,t,n,r,i,a){if(Rb(e.nameLocation)){var o=a.stOccupiedRect;o&&tC(TS({},o,a.transGroup.transform),r,i)}else nC(a.labelInfoList,a.dirVec,r,i)};function tC(e,t,n){var r=new K;MS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&ES(t,r)}function nC(e,t,n,r){for(var i=K.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||tC(s,n,r)}}var rC=function(){function e(e,t,n,r){this.group=new Bu,this._axisModel=e,this._api=t,this._local={},this._shared=r||new XS(eC),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=W(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=W(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:W(e.nameDirection,1),tickDirection:W(e.tickDirection,1),labelDirection:W(e.labelDirection,1),labelOffset:W(e.labelOffset,0),silent:W(e.silent,!0),axisName:r,nameLocation:me(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:xC(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Bu({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new K(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},F(iC,function(r){e[r]&&aC[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=As(t-e),i,a;return js(r)?(a=n>0?`top`:`bottom`,i=`center`):js(r-GS)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<GS?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),iC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],aC={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(kt(u,u,l),kt(d,d,l));var p=k({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&ag(r.axis.scale))FS().buildAxisBreakLine(r,i,a,m);else{var h=new vd(k({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));df(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);H(g)&&(g=[g,g]),(H(_)||oe(_))&&(_=[_,_]);var v=Lv(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];F([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Fv(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){mC(t,i,s)&&oC(e,t,n,r,i,a,o,hx.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){mC(t,i,s)&&oC(e,t,n,r,i,a,o,hx.determine);var c=fC(e,i,a,r);lC(e,t.labelLayoutList,c),pC(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(xC(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new K(0,0),_=new K(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=ot();_.transform(dt(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*GS/180);var b,x;Rb(u)?b=rC.innerTextLayout(e.rotation,y??e.rotation,d):(b=sC(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=pe(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Uo({x:g.x,y:g.y,rotation:b.rotation,silent:rC.isLabelSilent(r),style:Xf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Af({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=rC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Xc(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=SS({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Rb(u)?KS[E]:qS[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function oC(e,t,n,r,i,a,o,s){gC(t)||hC(e,t,i,s,r,o);var c=t.labelLayoutList;vC(e,r,c,a),CC(r,e.rotation,c);var l=e.optionHideOverlap;cC(r,c,l),l&&jS(L(c,function(e){return e&&!e.label.ignore})),ZS(e,n,r,c)}function sC(e,t,n,r){var i=As(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return js(i-GS/2)?(o=c?`bottom`:`top`,a=`center`):js(i-GS*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<GS*1.5&&i>GS/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function cC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Ib(r))return;function a(e,a,o){var s=SS(t[a]),c=SS(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=JS(s.label).labelInfo.tick;if(Ky(l)&&u.notNice||Jy(l)&&u.offInterval){uC(s.label);return}}if(e===!1||s.suggestIgnore)uC(s.label);else if(c.suggestIgnore)uC(c.label);else{var d=.1;if(!n){var f=[0,0,0,0];s=DS({marginForce:f},s),c=DS({marginForce:f},c)}MS(s,c,null,{touchThreshold:d})&&uC(e?c.label:s.label)}}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function lC(e,t,n){e.showMinorTicks||F(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=YS(r),a=JS(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){uC(r);return}}})}function uC(e){e&&(e.ignore=!0)}function dC(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(kt(o,o,t),kt(s,s,t));var u=new vd({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});df(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=YS(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function fC(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=dC(i.getTicksCoords(),n.transform,c,j(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function pC(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(e.showMinorTicks&&!a.scale.isBlank()){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=j(c.getLineStyle(),j(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=dC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function mC(e,t,n){if(gC(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),_C(e,null,null,null))}return!0}function hC(e,t,n,r,i,a){var o=i.axis,s=pe(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Bu;n.add(c);var l=gx(r);if(!s||o.scale.isBlank())_C(t,[],c,l);else{var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(pe(e.raw.labelRotate,u.get(`rotate`))||0)*GS/180,p=rC.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;F(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Ub(o.scale,n);if(m&&m[f]){var y=m[f];U(y)&&y.textStyle&&(l=new yp(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=W(l.getShallow(`alignMinLabel`,!0),x),C=W(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=W(l.getShallow(`verticalAlignMinLabel`,!0),w),E=W(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Uo({x:0,y:0,rotation:0,silent:rC.isLabelSilent(i),z2:D,style:Xf(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:V(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=JS(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,Af({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=rC.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),Xc(O).eventData=A,j&&SC(i,a,O,j)}h.push(O),c.add(O)}),_C(t,I(h,function(e){return{label:e,priority:JS(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}}function gC(e){return!!e.labelLayoutList}function _C(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function vC(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);F(n,function(n,a){var o=SS(n);if(o){var s=o.label,c=JS(s);o.suggestIgnore=s.ignore,s.ignore=!1,Xn(yC,bC);var l=t.axis;yC.x=l.dataToCoord(Ub(l.scale,c.labelInfo.tick)),yC.y=e.labelOffset+e.labelDirection*i,yC.rotation=c.layoutRotation,r.add(yC),yC.updateTransform(),r.remove(yC),yC.decomposeTransform(),Xn(s,yC),s.markRedraw(),bS(o,!0),SS(o)}})}var yC=new Ro,bC=new Ro;function xC(e){return!!e}function SC(e,t,n,r){n.on(`click`,function(n){var i={type:IS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function CC(e,t,n){var r=ng();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&JS(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&F(i,function(r){FS().adjustBreakLabelPair(e.axis.inverse,t,[SS(n[r[0]]),SS(n[r[1]])])})}}function wC(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),pe(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function TC(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function EC(e){var t={xAxisModel:null,yAxisModel:null};return F(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Cc).models[0]}),t}function DC(e,t,n,r,i,a){for(var o=wC(e,n),s=!1,c=!1,l=0;l<t.length;l++)Wy(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new rC(n,r,o,i)}function OC(e,t,n){var r=wC(t,n);e.updateCfg(r)}var kC=yc(),AC=3,jC=function(){function e(e,t,n,r,i){var a=Jy(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Gy(e)||qy(e)||Ky(e))&&(Pc(l,NC(e,t.get(`dataMin`,!0))),Fc(l,NC(e,t.get(`dataMax`,!0)))),zc(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=NC(e,V(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=NC(e,V(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=PC(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!Lc(u[0])&&(u[0]=NaN),!Lc(u[1])&&(u[1]=NaN);var g=s||fe(u[0])||fe(u[1])||a&&!o,_=Gy(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=NC(e,t.get(`startValue`,!0)),x=b!=null;!Us(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Us(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),MC(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),MC(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function MC(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Bc(t))}function NC(e,t){return t==null?null:fe(t)?NaN:e.parse(t)}function PC(e,t){var n;if(Jy(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[FC(n[0]),FC(n[1])]}function FC(e){return hn(typeof e==`boolean`?0:e,1)||0}function IC(e){var t=kC(e.scale);return t.extent||=Mc(),t}function LC(e,t){IC(e).dimIdxInCoord=t.get(e.dim)}function RC(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||zC(n,e,i,r,t)}function zC(e,t,n,r,i){var a=IC(t),o=a.extent,s=!1;Yx(t,function(r){if(r.boxCoordinateSystem){var i=oh(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Nc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;F(Lb(u,n),function(e){Ic(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=GC(e,t,r);VC(e,new jC(e,r,o,s,c),i),a.extent=null}function BC(e,t){var n=e.scale;VC(n,new jC(n,e.model,t,!1,!1),AC)}function VC(e,t,n){e.rawExtentInfo=t,t.from=n}function HC(e,t){UC.set(e,t)}var UC=G();function WC(e,t,n,r,i){e.rawExtentInfo||BC({scale:e,model:t},i||Mc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function GC(e,t,n){var r=Wb(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return $x(t,function(e){a=!!UC.get(e)||a}),a}function KC(e,t,n,r){if(n.ctnShp){var i;if($x(e,function(t){var n=UC.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Pc(i,a[0]),Fc(i,a[1]),jb(e))}}),i){var a=t.getExtent();if(Jy(t))e.onBand||t.setExtent2(1,os(a[0],a[0]+i[0]),ss(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=os(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ss(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function qC(){tS(`liPosMinGap`,JC)}function JC(e,t,n){var r=G(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=_m(u);function f(n){Zx(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),i&&i.hasKey(t.uid)||(o=!0),p+=n.count()}),i&&i.keys().length===r.keys().length||(o=!0),!o&&a!=null)t.liPosMinGap=a;else{ty(YC,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||vm(d,a))&&(l&&(a=c.transformIn(a,null)),YC.arr[m++]=a)}});var h=YC.typed?YC.arr.subarray(0,m):(YC.arr.length=m,YC.arr);YC.typed?h.sort():Cs(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Us(g)?g:m>0?-2:-1,n.serUids=r}}var YC=ty({ctor:$v},50);function XC(e){return function(t,n){var r=cS(t,{fromStat:{key:e}});if(Us(r.w2))return[-r.w2/2,r.w2/2]}}function ZC(e,t){return e+`|&`+t}function QC(e){return qC(),{liPosMinGap:!Jy(e.scale)}}function $C(e,t,n,r){aS(e,{key:t,seriesType:n,coordSysType:r,getMetrics:QC})}function ew(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var tw={left:0,right:0,top:0,bottom:0},nw=[`25%`,`25%`],rw=`cartesian2d`,iw=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=m_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&p_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&p_(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:tw,outerBoundsContain:`all`,outerBoundsClampWidth:nw[0],outerBoundsClampHeight:nw[1],backgroundColor:Y.color.transparent,borderWidth:1,borderColor:Y.color.neutral30},t}(__),aw=Vc(),ow=`__ec_stack_`;function sw(e){return e.get(`stack`)||ow+e.seriesIndex}function cw(e,t){var n=lw(e,t);return n.columnMap=uw(n),n}function lw(e,t){var n=ZC(t,rw),r=[],i=cS(e,{fromStat:{key:n},min:1});return Xx(e,n,function(e){r.push({barWidth:J(e.get(`barWidth`),i.w),barMaxWidth:J(e.get(`barMaxWidth`),i.w),barMinWidth:J(e.get(`barMinWidth`)||(pw(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:sw(e)})}),{bandWidthResult:i,seriesInfo:r}}function uw(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};F(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;ke(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=os(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=ss(35-o.length*4,15)+`%`;var c=J(i,t),l=J(a,1),u=(n-c)/(r+(r-1)*l);u=ss(u,0),F(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=os(o,i)),a&&(o=ss(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=os(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=ss(u,0);var d=0,f;F(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return F(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function dw(e){return{seriesType:e,overallReset:function(t){var n=ZC(e,rw);Qx(t,n,function(t){var r=cw(t,e);Xx(t,n,function(e){var t=r.columnMap[sw(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function fw(e){return{seriesType:e,plan:dy(),reset:function(e){if(TC(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=gh(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(ew(i))),p=pw(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&ey(r*3),c=p&&s&&ey(r*3),l=p&&ey(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,cs(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,cs(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function pw(e){return e.pipelineContext&&e.pipelineContext.large}function mw(e){return XC(ZC(e,rw))}function hw(e){aw(e,function(){function t(t){var n=ZC(t,rw);$C(e,n,t,rw),HC(n,mw(t))}t(`bar`),t(`pictorialBar`)})}var gw=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return bh(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)F(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(bv);bv.registerClass(gw);var _w=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return bh(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=qc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Dh(gw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Y.color.primary,borderWidth:2}},realtimeSort:!1}),t}(gw),vw=`\0__throttleOriginMethod`,yw=`\0__throttleRate`,bw=`\0__throttleType`;function xw(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=(/* @__PURE__ */ new Date()).getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=(/* @__PURE__ */ new Date()).getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Sw(e,t,n,r){var i=e[t];if(i){var a=i[vw]||i,o=i[bw];if(i[yw]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=xw(a,n,r===`debounce`),i[vw]=a,i[bw]=r,i[yw]=n}return i}}function Cw(e,t){var n=e[t];n&&n[vw]&&(n.clear&&n.clear(),e[t]=n[vw])}var ww=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Tw=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new ww},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(wo);function Ew(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return gn(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+Ow(m,s+_,!1),x=u+p*y(m)+kw(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+Ow(m,-s+_,!1),x=u+p*y(m)+kw(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+Ow(h,s+_,!0),x=u+p*y(h)+kw(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+Ow(h,-s+_,!0),x=u+p*y(h)+kw(h,-s+_,!0),S=`right`,C=`middle`;break;default:return gn(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function Dw(e,t,n,r){if(oe(r))e.setTextConfig({rotation:r});else if(B(t))e.setTextConfig({rotation:0});else{var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}}function Ow(e,t,n){return t*Math.sin(e)*(n?-1:1)}function kw(e,t,n){return t*Math.cos(e)*(n?1:-1)}function Aw(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;B(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:I(r,function(e){return hn(e,i)})}}var jw=Math.max,Mw=Math.min,Nw=function(e){i(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Mf(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=Iw(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=Hw[s.type](a,e);if(!t)return null;var n=$w(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=Hw[s.type](a,t,n);if(r&&(h&&S(t),a.hasValue(t)&&Vw[s.type](r))){var o=!1;f&&(o=Pw[s.type](p,r));var g=Fw[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),Gw(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?Lw(d,u,g,r,t,l,!1,!1):Wd(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=Hw[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=Hw[s.type](a,t),E=Qw(l,T,s);Ud(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!Vw[s.type](C))i.remove(D);else{var O=!1;if(f&&(O=Pw[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Jd(D,e,n),D=null),D?Yd(D):D=Fw[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=ap(k);A.prevValue!=null&&(A.prevValue=A.value)}}else Gw(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?Lw(d,u,D,C,t,l,!0,x):Ud(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Jd(n,e,t)}).execute();var C=this._backgroundGroup||=new Bu;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),Yw(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),Yw(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&Sy(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:I(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Jd(t,e,Xc(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(my),Pw={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=jw(t.x,e.x),s=Mw(t.x+t.width,i),c=jw(t.y,e.y),l=Mw(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=Mw(t.r,e.r),a=jw(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},Fw={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Ro({shape:k({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?Tw:sd,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=Ew(Ww(i),{isRoundCap:l===Tw}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Ud:Wd)(u,{shape:p},a)}return u}};function Iw(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function Lw(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Ud:Wd)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Ud:Wd)(n,{shape:l},u,i)}function Rw(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var zw=[`x`,`y`,`width`,`height`],Bw=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],Vw={cartesian2d:function(e){return!Rw(e,zw)},polar:function(e){return!Rw(e,Bw)}},Hw={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?Kw(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function Uw(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Ww(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function Gw(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;k(u,Aw(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?eT(i,a.coordinateSystem):tT(i,a.coordinateSystem),p=Yf(r);Jf(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:zv(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,Dw(e,h===`outside`?f:h,Ww(o),r.get([`label`,`rotate`]))}op(m,p,a.getRawValue(n),function(e){return Bv(t,e)});var g=r.getModel([`emphasis`]);su(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),du(e,r),Uw(i)&&(e.style.fill=`none`,e.style.stroke=`none`,F(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Kw(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var qw=function(){function e(){}return e}(),Jw=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new qw},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(wo);function Yw(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Kc(e):0;if(l){var d=new Jw({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new Jw({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,Xc(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,Xw),f.on(`mousemove`,Xw)),n&&n.push(f)}var Xw=xw(function(e){var t=this,n=Zw(t,e.offsetX,e.offsetY);Xc(t).dataIndex=n>=0?n:null},30,!1);function Zw(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function Qw(e,t,n){if(wy(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function $w(e,t,n){return new(e.type===`polar`?sd:Ro)({shape:Qw(t,n,e),silent:!0,z2:0})}function eT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function tT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function nT(e){e.registerChartView(Nw),e.registerSeriesModel(_w),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,dw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,fw(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dx(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),hw(e)}function rT(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}F([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=k({},t),i.dispatchAction(k(t,{type:e[1],seriesIndex:n(r,t)}))})})}function iT(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=vc(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:B(l)?c.getName(l[0]):c.getName(l),selected:H(r)?r:k({},r)})}})}function aT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(iT(`map`,`selectchanged`,t,r,e),iT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(iT(`map`,`selected`,t,r,e),iT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(iT(`map`,`unselected`,t,r,e),iT(`pie`,`unselected`,t,r,e))})}function oT(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function sT(e,t,n){t=B(t)&&{coordDimensions:t}||k({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Zm(r,t).dimensions,a=new Xm(i,e);return a.initData(r,n),a}var cT=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),lT=yc(),uT=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new cT(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return sT(this,{coordDimensions:[`value`],encodeDefaulter:ie(Dp,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=lT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Ds(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(bv);ih({fullType:uT.type,getCoord2:function(e){return e.getShallow(`center`)}});var dT=Math.PI*2,fT=Qa.CMD,pT=[`top`,`right`,`bottom`,`left`];function mT(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0)}}function hT(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%dT<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=ro(i),i=ro(f)}else r=ro(r),i=ro(i);r>i&&(i+=dT);var p=Math.atan2(s,o);if(p<0&&(p+=dT),p>=r&&p<=i||p+dT>=r&&p+dT<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v<y?(c[0]=m,c[1]=h,Math.sqrt(v)):(c[0]=g,c[1]=_,Math.sqrt(y))}function gT(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}function _T(e,t,n,r,i,a,o){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,c=t+r,l=o[0]=Math.min(Math.max(i,e),s),u=o[1]=Math.min(Math.max(a,t),c);return Math.sqrt((l-i)*(l-i)+(u-a)*(u-a))}var vT=[];function yT(e,t,n){var r=_T(t.x,t.y,t.width,t.height,e.x,e.y,vT);return n.set(vT[0],vT[1]),r}function bT(e,t,n){for(var r=0,i=0,a=0,o=0,s,c,l=1/0,u=t.data,d=e.x,f=e.y,p=0;p<u.length;){var m=u[p++];p===1&&(r=u[p],i=u[p+1],a=r,o=i);var h=l;switch(m){case fT.M:a=u[p++],o=u[p++],r=a,i=o;break;case fT.L:h=gT(r,i,u[p],u[p+1],d,f,vT,!0),r=u[p++],i=u[p++];break;case fT.C:h=mr(r,i,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,f,vT),r=u[p++],i=u[p++];break;case fT.Q:h=xr(r,i,u[p++],u[p++],u[p],u[p+1],d,f,vT),r=u[p++],i=u[p++];break;case fT.A:var g=u[p++],_=u[p++],v=u[p++],y=u[p++],b=u[p++],x=u[p++];p+=1;var S=!!(1-u[p++]);s=Math.cos(b)*v+g,c=Math.sin(b)*y+_,p<=1&&(a=s,o=c);var C=(d-g)*y/v+g;h=hT(g,_,y,b,b+x,S,C,f,vT),r=Math.cos(b+x)*v+g,i=Math.sin(b+x)*y+_;break;case fT.R:a=r=u[p++],o=i=u[p++];var w=u[p++],T=u[p++];h=_T(a,o,w,T,d,f,vT);break;case fT.Z:h=gT(r,i,a,o,d,f,vT,!0),r=a,i=o}h<l&&(l=h,n.set(vT[0],vT[1]))}return l}var xT=new K,ST=new K,CT=new K,wT=new K,TT=new K;function ET(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||pT,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var c=1/0,l=i.anchor,u=e.getComputedTransform(),d=u&&pt([],u),f=t.get(`length2`)||0;l&&CT.copy(l);for(var p=0;p<o.length;p++){var m=o[p];mT(m,0,s,xT,wT),K.scaleAndAdd(ST,xT,wT,f),ST.transform(d);var h=e.getBoundingRect(),g=l?l.distance(ST):e instanceof wo?bT(ST,e.path,CT):yT(ST,h,CT);g<c&&(c=g,ST.transform(u),CT.transform(u),CT.toArray(a[0]),ST.toArray(a[1]),xT.toArray(a[2]))}kT(a,t.get(`minTurnAngle`)),n.setShape({points:a})}}}var DT=[],OT=new K;function kT(e,t){if(t<=180&&t>0){t=t/180*Math.PI,xT.fromArray(e[0]),ST.fromArray(e[1]),CT.fromArray(e[2]),K.sub(wT,xT,ST),K.sub(TT,CT,ST);var n=wT.len(),r=TT.len();if(!(n<.001||r<.001)){wT.scale(1/n),TT.scale(1/r);var i=wT.dot(TT);if(Math.cos(t)<i){var a=gT(ST.x,ST.y,CT.x,CT.y,xT.x,xT.y,DT,!1);OT.fromArray(DT),OT.scaleAndAdd(TT,a/Math.tan(Math.PI-t));var o=CT.x===ST.x?(OT.y-ST.y)/(CT.y-ST.y):(OT.x-ST.x)/(CT.x-ST.x);if(isNaN(o))return;o<0?K.copy(OT,ST):o>1&&K.copy(OT,CT),OT.toArray(e[1])}}}}function AT(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,xT.fromArray(e[0]),ST.fromArray(e[1]),CT.fromArray(e[2]),K.sub(wT,ST,xT),K.sub(TT,CT,ST);var r=wT.len(),i=TT.len();if(!(r<.001||i<.001)&&(wT.scale(1/r),TT.scale(1/i),wT.dot(t)<Math.cos(n))){var a=gT(ST.x,ST.y,CT.x,CT.y,xT.x,xT.y,DT,!1);OT.fromArray(DT);var o=Math.PI/2,s=o+Math.acos(TT.dot(t))-n;if(s>=o)K.copy(OT,CT);else{OT.scaleAndAdd(TT,a/Math.tan(Math.PI/2-s));var c=CT.x===ST.x?(OT.y-ST.y)/(CT.y-ST.y):(OT.x-ST.x)/(CT.x-ST.x);if(isNaN(c))return;c<0?K.copy(OT,ST):c>1&&K.copy(OT,CT)}OT.toArray(e[1])}}}function jT(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function MT(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Tt(r[0],r[1]),a=Tt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Ot([],r[1],r[0],o/i),c=Ot([],r[1],r[2],o/a),l=Ot([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function NT(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i)r&&e.removeTextGuideLine();else{for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<gl.length;c++){var l=gl[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:W(i.states[l]&&i.states[l].ignore,s))||!W(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&jT(r,!0,l,u);continue}r||(r=new hd,e.setTextGuideLine(r),d||!s&&o||jT(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),jT(r,!1,l,u)}}if(r){j(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=MT}}}function PT(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<hl.length;r++){var i=hl[r];n[i]=e.getModel([i,t])}return n}var FT=Math.PI/180;function IT(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;RT(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}kS(e,1,c,c+o)&&d(e)}function LT(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;HT(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!HT(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,RT(m,g,!1)}}IT(l,t,n,r,1,i,a,o,s,d),IT(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!HT(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function RT(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}zT(a,r)}}}function zT(e,t){VT.rect=e,CS(VT,t,BT)}var BT={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},VT={};function HT(e){return e.position===`center`}function UT(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*FT,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=J(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=J(T,l);var E=w.get(`length2`);if(E=J(E,l),Math.abs(d.endAngle-d.startAngle)<o)F(h.states,p),h.ignore=!0,g&&(F(g.states,p),g.ignore=!0);else if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,M,ee;r=d.cx,i=d.cy;var N=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,ee=`center`;else{var P=(N?(d.r+d.r0)/2*O:d.r*O)+r,I=(N?(d.r+d.r0)/2*k:d.r*k)+i;if(A=P+O*3,j=I+k*3,!N){var te=P+O*(T+c-d.r),L=I+k*(T+c-d.r),ne=te+(O<0?-1:1)*E,R=L;A=x===`edge`?O<0?u+S:u+l-S:ne+(O<0?-b:b),j=R,M=[[P,I],[te,L],[ne,R]]}ee=N?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var re=Math.PI,z=0,ie=v.get(`rotate`);if(oe(ie))z=re/180*ie;else if(y===`center`)z=0;else if(ie===`radial`||ie===!0)z=O<0?-D+re:-D;else if(ie===`tangential`||ie===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var B=Math.atan2(O,k);B<0&&(B=re*2+B),k>0&&ie!==`tangential-noflip`&&(B=re+B),z=B-re}if(a=!!z,h.x=A,h.y=j,h.rotation=z,h.setStyle({verticalAlign:`middle`}),N){h.setStyle({align:ee});var V=h.states.select;V&&(V.x+=h.x,V.y+=h.y)}else{var H=new q(0,0,0,0);zT(H,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new K(O,k),linePoints:M,textAlign:ee,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:H,unconstrainedWidth:H.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:N})}}),!a&&e.get(`avoidLabelOverlap`)&&LT(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(F(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(F(v.states,p),v.ignore=!0):(kT(x,g.minTurnAngle),AT(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new K(x[0][0],x[0][1])})}}}var WT=Math.PI*2,GT=Math.PI/180,KT=Jc(`pie`,qT);function qT(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=o_(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*GT,d=e.get(`endAngle`),f=e.get(`padAngle`)*GT;d=d===`auto`?u-WT:-d*GT;var p=e.get(`minAngle`)*GT+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;Za(S,!_),u=S[0],d=S[1];var w=JT(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e))n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});else{r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?_s(e,b,[c,s]):s}),O=i}}),E<WT&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}var JT=yc(),YT=function(e){i(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Uo;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=k(Aw(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle))i.setShape(l);else{if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Wd(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Wd(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Ud(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Wd(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Yd(i),Ud(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),du(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=k({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},Aw(s.getModel(`itemStyle`),c)),k(i.ensureState(`select`),{x:p,y:m,shape:Aw(o.getModel([`select`,`itemStyle`]),c)}),k(i.ensureState(`blur`),{shape:Aw(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&k(g.ensureState(`select`),{x:p,y:m}),k(_.ensureState(`select`),{x:p,y:m}),su(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Jf(r,Yf(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new hd,this.setTextGuideLine(d)),NT(this,PT(i),{stroke:s,opacity:me(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(sd),XT=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new sd({shape:D(JT(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new YT(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Jd(a.getItemGraphicEl(t),e,t)}).execute(),UT(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(my);function ZT(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(oe(r)&&!isNaN(r)&&r<0)})}}}function QT(e){e.registerChartView(XT),e.registerSeriesModel(uT),rT(`pie`,e.registerAction),e.registerLayout(KT),e.registerProcessor(oT(`pie`)),e.registerProcessor(ZT(`pie`))}var $T=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),eE=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new $T(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new $T(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new $T(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new $T(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new $T(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new $T(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),tE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,nE=[],rE=Ne.browser.firefox&&+Ne.browser.version.split(`.`)[0]<39;function iE(e,t,n,r){return n||={},r?aE(e,t,n):rE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?aE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function aE(e,t,n){if(Ne.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Rh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Fh(nE,e,r,i)){n.zrX=nE[0],n.zrY=nE[1];return}}n.zrX=n.zrY=0}function oE(e){return e||window.event}function sE(e,t,n){if(t=oE(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&iE(e,i,t,n)}else{iE(e,t,t,n);var a=cE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&tE.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function cE(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function lE(e,t,n,r){e.addEventListener(t,n,r)}function uE(e,t,n,r){e.removeEventListener(t,n,r)}var dE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function fE(e){return e.which===2||e.which===3}var pE=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=iE(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in gE)if(gE.hasOwnProperty(t)){var n=gE[t](this._track,e);if(n)return n}},e}();function mE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function hE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var gE={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=mE(r)/mE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=hE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},_E=`silent`;function vE(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:yE}}function yE(){dE(this.event)}var bE=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vi),xE=function(){function e(e,t){this.x=e,this.y=t}return e}(),SE=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],CE=new q(0,0,0,0),wE=function(e){i(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new xE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new bE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new eE(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(F(SE,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=DE(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new xE(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new xE(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=vE(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new xE(e,t);if(EE(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new q(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u===n||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(CE.copy(u.getBoundingRect()),u.transform&&CE.applyTransform(u.transform),CE.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(EE(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new pE;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new xE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Vi);F([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){wE.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=DE(this,n,r),a,o;if(e===`mouseup`&&i||(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Tt(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function TE(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||_E}return!1}function EE(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=TE(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==_E)){t.target=o;break}}}function DE(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var OE=32,kE=7;function AE(e){for(var t=0;e>=OE;)t|=e&1,e>>=1;return e+t}function jE(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;ME(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function ME(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function NE(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function PE(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function FE(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function IE(e,t){var n=kE,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=FE(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=PE(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0)for(c=0;c<i;c++)e[d+c]=o[l+c];else if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else{for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=FE(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=PE(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=kE||m>=kE);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0)for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];else if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else{for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-FE(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-PE(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=kE||g>=kE);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function LE(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<OE)a=jE(e,n,r,t),NE(e,n,r,n+a,t);else{var o=IE(e,t),s=AE(i);do{if(a=jE(e,n,r,t),a<s){var c=i;c>s&&(c=s),NE(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}}var RE=!1;function zE(){RE||(RE=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function BE(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var VE=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=BE}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,LE(n,BE)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(zE(),p.z=0),isNaN(p.z2)&&(zE(),p.z2=0),isNaN(p.zlevel)&&(zE(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=M(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),HE=Ne.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function UE(){return(/* @__PURE__ */ new Date()).getTime()}var WE=function(e){i(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=UE()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(HE(t),!e._paused&&e.update())}HE(t)},t.prototype.start=function(){this._running||(this._time=UE(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=UE(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=UE()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Bi(e,t.loop);return this.addAnimator(n),n},t}(Vi),GE=300,KE=Ne.domSupported,qE=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:I(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),JE={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},YE=!1;function XE(e){var t=e.pointerType;return t===`pen`||t===`touch`}function ZE(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function QE(e){e&&(e.zrByTouch=!0)}function $E(e,t){return sE(e.dom,new tD(e,t),!0)}function eD(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var tD=function(){function e(e,t){this.stopPropagation=Ae,this.stopImmediatePropagation=Ae,this.preventDefault=Ae,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),nD={mousedown:function(e){e=sE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=sE(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=sE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=sE(this.dom,e);var t=e.toElement||e.relatedTarget;eD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){YE=!0,e=sE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){YE||(e=sE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=sE(this.dom,e),QE(e),this.__lastTouchMoment=/* @__PURE__ */ new Date,this.handler.processGesture(e,`start`),nD.mousemove.call(this,e),nD.mousedown.call(this,e)},touchmove:function(e){e=sE(this.dom,e),QE(e),this.handler.processGesture(e,`change`),nD.mousemove.call(this,e)},touchend:function(e){e=sE(this.dom,e),QE(e),this.handler.processGesture(e,`end`),nD.mouseup.call(this,e),+/* @__PURE__ */ new Date-this.__lastTouchMoment<GE&&nD.click.call(this,e)},pointerdown:function(e){nD.mousedown.call(this,e)},pointermove:function(e){XE(e)||nD.mousemove.call(this,e)},pointerup:function(e){nD.mouseup.call(this,e)},pointerout:function(e){XE(e)||nD.mouseout.call(this,e)}};F([`click`,`dblclick`,`contextmenu`],function(e){nD[e]=function(t){t=sE(this.dom,t),this.trigger(e,t)}});var rD={pointermove:function(e){XE(e)||rD.mousemove.call(this,e)},pointerup:function(e){rD.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function iD(e,t){var n=t.domHandlers;Ne.pointerEventsSupported?F(qE.pointer,function(r){oD(t,r,function(t){n[r].call(e,t)})}):(Ne.touchEventsSupported&&F(qE.touch,function(r){oD(t,r,function(i){n[r].call(e,i),ZE(t)})}),F(qE.mouse,function(r){oD(t,r,function(i){i=oE(i),t.touching||n[r].call(e,i)})}))}function aD(e,t){Ne.pointerEventsSupported?F(JE.pointer,n):Ne.touchEventsSupported||F(JE.mouse,n);function n(n){function r(r){r=oE(r),eD(e,r.target)||(r=$E(e,r),t.domHandlers[n].call(e,r))}oD(t,n,r,{capture:!0})}}function oD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,lE(e.domTarget,t,n,r)}function sD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&uE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var cD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),lD=function(e){i(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new cD(t,nD),KE&&(r._globalHandlerScope=new cD(document,rD)),iD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){sD(this._localHandlerScope),KE&&sD(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,KE&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?aD(this,t):sD(t)}},t}(Vi),uD={},dD={};function fD(e){delete dD[e]}function pD(e){if(!e)return!1;if(typeof e==`string`)return Jr(e,1)<Wi;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Jr(t[i].color,1);return n/=r,n<Wi}return!1}var mD=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new VE,a=n.renderer||`canvas`;uD[a]||(a=R(uD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new uD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Ne.node&&!Ne.worker&&!s?new lD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Ne.touchEventsSupported:!!l,d=44,f;u&&(f=W(n.pointerSize,d)),this.handler=new wE(i,o,c,o.root,f),this.animation=new WE({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=pD(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=UE(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=UE();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Bu&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,fD(this.id))},e}();function hD(e,t){var n=new mD(T(),e,t);return dD[n.id]=n,n}function gD(e,t){uD[e]=t}var _D;function vD(e){if(typeof _D==`function`)return _D(e)}function yD(e){_D=e}var bD=``;typeof navigator<`u`&&(bD=navigator.platform||``);var xD=`rgba(0, 0, 0, 0.2)`,SD=Y.color.theme[0],CD=Gr(SD,null,null,.9),wD={darkMode:`auto`,colorBy:`series`,color:Y.color.theme,gradientColor:[CD,SD],aria:{decal:{decals:[{color:xD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:xD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:xD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:xD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:xD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:xD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:bD.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},TD=G();function ED(e,t,n){var r=TD.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var DD,OD,kD,AD=`\0_ec_inner`,jD=1,MD=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new yp(r),this._locale=new yp(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=LD(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,LD(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?kD(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&F(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=G(),s=t&&t.replaceMergeMainTypeMap;Tp(this),F(e,function(e,t){e!=null&&(__.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?D(e):O(n[t],e,!0))}),s&&s.each(function(e,t){__.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),__.topologicalTravel(a,__.getAllClassMainTypes(),c,this);function c(t){var a=ED(this,t,$s(e[t])),o=r.get(t),c=ic(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);gc(c,t,__),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;F(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=__.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=k({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),k(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&DD(this)}this._seriesIndices||DD(this)},t.prototype.getOption=function(){var e=D(this.option);return F(e,function(t,n){if(__.hasClass(n)){for(var r=$s(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!hc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[AD],e},t.prototype.setTheme=function(e){this._theme=new yp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?L(a,function(e){return!!e}):FD(`name`,i,a):FD(`id`,r,a):(o=[],F($s(n),function(e){a[e]&&o.push(a[e])})),ID(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(ID(r?this.queryComponents(r):L(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?L(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(V(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=H(e)?r.get(e):U(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=pc(e,null);return L(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return L(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return L(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){OD(this),F(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){F(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){OD(this),F(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return F(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return OD(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){OD(this);var n=[];F(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=G(n)},t.prototype.restoreData=function(e){DD(this);var t=this._componentsMap,n=[];t.each(function(e,t){__.hasClass(t)&&n.push(t)}),__.topologicalTravel(n,__.getAllClassMainTypes(),function(n){F(t.get(n),function(t){t&&(n!==`series`||!ND(t,e))&&t.restoreData()})})},t.internalField=function(){DD=function(e){var t=e._seriesIndices=[];F(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=G(t)},OD=function(e){},kD=function(e,t){e.option={},e.option[AD]=jD,e._componentsMap=G({series:[]}),e._componentsCount=G();var n=t.aria;U(n)&&n.enabled==null&&(n.enabled=!0),PD(t,e._theme.option),O(t,wD,!1),e._mergeOption(t,null)}}(),t}(yp);function ND(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function PD(e,t){var n=e.color&&!e.colorLayer;F(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||__.hasClass(r)||(typeof t==`object`?e[r]=e[r]?O(e[r],t,!1):D(t):e[r]??(e[r]=t))})}function FD(e,t,n){if(B(t)){var r=G();return F(t,function(e){e!=null&&pc(e,null)!=null&&r.set(e,!0)}),L(n,function(t){return t&&r.get(t[e])})}var i=pc(t,null);return L(n,function(t){return t&&i!=null&&t[e]===i})}function ID(e,t){return t.hasOwnProperty(`subType`)?L(e,function(e){return e&&e.subType===t.subType}):e}function LD(e){var t=G();return e&&F($s(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}N(MD,x_);var RD=/^(min|max)?(.+)$/,zD=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(F($s(e.series),function(e){e&&e.data&&ce(e.data)&&be(e.data)}),F($s(e.dataset),function(e){e&&e.source&&ce(e.source)&&be(e.source)})),e=D(e);var r=this._optionBackup,i=BD(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],D(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=D(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)VD(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!UD(a,this._currentMediaIndices)&&(o=I(a,function(e){return D(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function BD(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&B(l)&&F(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),F(c,function(e){return f(e)}),F(r,function(e){return f(e.option)});function f(e){F(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function VD(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return F(e,function(e,t){var n=t.match(RD);if(n&&n[1]&&n[2]){var a=n[1];HD(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function HD(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function UD(e,t){return e.join(`,`)===t.join(`,`)}var WD=F,GD=U,KD=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function qD(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=KD.length;n<r;n++){var i=KD[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?O(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?O(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function JD(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,j(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function YD(e){JD(e,`itemStyle`),JD(e,`lineStyle`),JD(e,`areaStyle`),JD(e,`label`),JD(e,`labelLine`),JD(e,`upperLabel`),JD(e,`edgeLabel`)}function XD(e,t){var n=GD(e)&&e[t],r=GD(n)&&n.textStyle;if(r)for(var i=0,a=tc.length;i<a;i++){var o=tc[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function ZD(e){e&&(YD(e),XD(e,`label`),e.emphasis&&XD(e.emphasis,`label`))}function QD(e){if(GD(e)){qD(e),YD(e),XD(e,`label`),XD(e,`upperLabel`),XD(e,`edgeLabel`),e.emphasis&&(XD(e.emphasis,`label`),XD(e.emphasis,`upperLabel`),XD(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(qD(t),ZD(t));var n=e.markLine;n&&(qD(n),ZD(n));var r=e.markArea;r&&ZD(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!ce(a))for(var o=0;o<a.length;o++)ZD(a[o]);F(e.categories,function(e){YD(e)})}if(i&&!ce(i))for(var o=0;o<i.length;o++)ZD(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ZD(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)B(c[o])?(ZD(c[o][0]),ZD(c[o][1])):ZD(c[o]);e.type===`gauge`?(XD(e,`axisLabel`),XD(e,`title`),XD(e,`detail`)):e.type===`treemap`?(JD(e.breadcrumb,`itemStyle`),F(e.levels,function(e){YD(e)})):e.type===`tree`&&YD(e.leaves)}}function $D(e){return B(e)?e:e?[e]:[]}function eO(e){return(B(e)?e[0]:e)||{}}function tO(e,t){WD($D(e.series),function(e){GD(e)&&QD(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),WD(n,function(t){WD($D(e[t]),function(e){e&&(XD(e,`axisLabel`),XD(e.axisPointer,`label`))})}),WD($D(e.parallel),function(e){var t=e&&e.parallelAxisDefault;XD(t,`axisLabel`),XD(t&&t.axisPointer,`label`)}),WD($D(e.calendar),function(e){JD(e,`itemStyle`),XD(e,`dayLabel`),XD(e,`monthLabel`),XD(e,`yearLabel`)}),WD($D(e.radar),function(e){XD(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),WD($D(e.geo),function(e){GD(e)&&(ZD(e),WD($D(e.regions),function(e){ZD(e)}))}),WD($D(e.timeline),function(e){ZD(e),JD(e,`label`),JD(e,`itemStyle`),JD(e,`controlStyle`,!0);var t=e.data;B(t)&&F(t,function(e){U(e)&&(JD(e,`label`),JD(e,`itemStyle`))})}),WD($D(e.toolbox),function(e){JD(e,`iconStyle`),WD(e.feature,function(e){JD(e,`iconStyle`)})}),XD(eO(e.axisPointer),`label`),XD(eO(e.tooltip).axisPointer,`label`)}function nO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function rO(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function iO(e){e&&F(aO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var aO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],oO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],sO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function cO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<sO.length;n++){var r=sO[n][1],i=sO[n][0];t[r]!=null&&(t[i]=t[r])}}function lO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function uO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function dO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function fO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&fO(e[n].children,t)}function pO(e,t){tO(e,t),e.series=$s(e.series),F(e.series,function(e){if(U(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),lO(e.label);var n=e.data;if(n&&!ce(n))for(var r=0;r<n.length;r++)lO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=nO(e,`pointer.color`);i!=null&&rO(e,`itemStyle.color`,i)}else if(t===`bar`){cO(e),cO(e.backgroundStyle),cO(e.emphasis);var n=e.data;if(n&&!ce(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(cO(n[r]),cO(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),uO(e),fO(e.data,uO)}else t===`graph`||t===`sankey`?dO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&j(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),iO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),F(oO,function(t){var n=e[t];n&&(B(n)||(n=[n]),F(n,function(e){iO(e)}))})}var mO=Yc(hO);function hO(e){var t=G();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),F(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),gO(e))})}function gO(e){F(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Os(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var _O=function(){function e(){this.group=new Bu,this.uid=wh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Ve(_O),Je(_O);var vO=yc(),yO={itemStyle:Ye(gp,!0),lineStyle:Ye(pp,!0)},bO={lineStyle:`stroke`,itemStyle:`fill`};function xO(e,t){return e.visualStyleMapper||yO[t]||(console.warn(`Unknown style type '`+t+`'.`),yO.itemStyle)}function SO(e,t){return e.visualDrawType||bO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var CO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=xO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=SO(e,r),c=a[s],l=V(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||V(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||V(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=k({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},wO=new yp,TO={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=xO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){wO.option=n[r];var o=i(wO);k(e.ensureUniqueItemVisual(t,`style`),o),wO.option.decal&&(e.setItemVisual(t,`decal`,wO.option.decal),wO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},EO={performRawSeries:!0,overallReset:function(e){var t=G();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();vO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=vO(e).scope,a=SO(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},DO=Math.PI;function OO(e,t){t||={},j(t,{text:`loading`,textColor:Y.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Y.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Bu,r=new Ro({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Uo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ro({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new wd({shape:{startAngle:-DO/2,endAngle:-DO/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:DO*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:DO*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var kO=function(){function e(e,t,n,r){this._stageTaskMap=G(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):qc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=G();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;F(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});_e(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;F(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=G(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||k_({plan:PO,reset:FO,count:RO}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||k_({reset:AO});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=G(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;_e(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):F(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,k_({reset:jO,onDirty:NO})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return V(e)&&(e={overallReset:e,seriesType:zO(e)}),e.uid=wh(`stageHandler`),t&&(e.visualType=t),e},e}();function AO(e){e.overallReset(e.ecModel,e.api,e.payload)}function jO(e){return e.dirtyOnOverallProgress&&MO}function MO(){this.agent.dirty(),this.getDownstream().dirty()}function NO(){this.agent&&this.agent.dirty()}function PO(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function FO(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$s(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?I(t,function(e,t){return LO(t)}):IO}var IO=LO(0);function LO(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function RO(e){return e.data.count()}function zO(e){HO=null;try{e(BO,VO)}catch{}return HO}var BO={},VO={},HO;UO(BO,MD),UO(VO,ll),BO.eachSeriesByType=BO.eachRawSeriesByType=function(e){HO=e},BO.eachComponent=function(e){e.mainType===`series`&&e.subType&&(HO=e.subType)};function UO(e,t){for(var n in t.prototype)e[n]=Ae}var X=Y.darkColor,WO=X.background,GO=function(){return{axisLine:{lineStyle:{color:X.axisLine}},splitLine:{lineStyle:{color:X.axisSplitLine}},splitArea:{areaStyle:{color:[X.backgroundTint,X.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:X.axisMinorSplitLine}},axisLabel:{color:X.axisLabel},axisName:{}}},KO={label:{color:X.secondary},itemStyle:{borderColor:X.borderTint},dividerLineStyle:{color:X.border}},qO={darkMode:!0,color:X.theme,backgroundColor:WO,axisPointer:{lineStyle:{color:X.border},crossStyle:{color:X.borderShade},label:{color:X.tertiary}},legend:{textStyle:{color:X.secondary},pageTextStyle:{color:X.tertiary}},textStyle:{color:X.secondary},title:{textStyle:{color:X.primary},subtextStyle:{color:X.quaternary}},toolbox:{iconStyle:{borderColor:X.accent50},feature:{dataView:{backgroundColor:WO,textColor:X.primary,textareaColor:X.background,textareaBorderColor:X.border,buttonColor:X.accent50,buttonTextColor:X.neutral00}}},tooltip:{backgroundColor:X.neutral20,defaultBorderColor:X.border,textStyle:{color:X.tertiary}},dataZoom:{borderColor:X.accent10,textStyle:{color:X.tertiary},brushStyle:{color:X.backgroundTint},handleStyle:{color:X.neutral00,borderColor:X.accent20},moveHandleStyle:{color:X.accent40},emphasis:{handleStyle:{borderColor:X.accent50}},dataBackground:{lineStyle:{color:X.accent30},areaStyle:{color:X.accent20}},selectedDataBackground:{lineStyle:{color:X.accent50},areaStyle:{color:X.accent30}}},visualMap:{textStyle:{color:X.secondary},handleStyle:{borderColor:X.neutral30}},timeline:{lineStyle:{color:X.accent10},label:{color:X.tertiary},controlStyle:{color:X.accent30,borderColor:X.accent30}},calendar:{itemStyle:{color:X.neutral00,borderColor:X.neutral20},dayLabel:{color:X.tertiary},monthLabel:{color:X.secondary},yearLabel:{color:X.secondary}},matrix:{x:KO,y:KO,backgroundColor:{borderColor:X.axisLine},body:{itemStyle:{borderColor:X.borderTint}}},timeAxis:GO(),logAxis:GO(),valueAxis:GO(),categoryAxis:GO(),line:{symbol:`circle`},graph:{color:X.theme},gauge:{title:{color:X.secondary},axisLine:{lineStyle:{color:[[1,X.neutral05]]}},axisLabel:{color:X.axisLabel},detail:{color:X.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:X.background}},radar:function(){var e=GO();return e.axisName={color:X.axisLabel},e.axisLine.lineStyle.color=X.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:X.neutral20,textStyle:{color:X.secondary}},emphasis:{itemStyle:{color:X.neutral30}}}},sunburst:{itemStyle:{borderColor:X.background}},map:{itemStyle:{borderColor:X.border,areaColor:X.neutral10},label:{color:X.tertiary},emphasis:{label:{color:X.primary},itemStyle:{areaColor:X.highlight}},select:{label:{color:X.primary},itemStyle:{areaColor:X.highlight}}},geo:{itemStyle:{borderColor:X.border,areaColor:X.neutral10},emphasis:{label:{color:X.primary},itemStyle:{areaColor:X.highlight}},select:{label:{color:X.primary},itemStyle:{color:X.highlight}}}};qO.categoryAxis.splitLine.show=!1;var JO=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(H(e)){var i=Re(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};F(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),YO=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],XO=YO.concat([`symbolKeepAspect`]),ZO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<YO.length;o++){var s=YO[o],c=e.get(s);V(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(k({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=R(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},QO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<XO.length;r++){var i=XO[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function $O(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function ek(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function tk(e,t,n,r){switch(n){case`color`:var i=e.ensureUniqueItemVisual(t,`style`);i[e.getVisual(`drawType`)]=r,e.setItemVisual(t,`colorFromPalette`,!1);break;case`opacity`:e.ensureUniqueItemVisual(t,`style`).opacity=r;break;case`symbol`:case`symbolSize`:case`liftZ`:e.setItemVisual(t,n,r)}}function nk(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var rk=new Vi,ik={};function ak(e,t){ik[e]=t}function ok(e){return ik[e]}var sk={};function ck(e,t){sk[e]=t}var lk=Math.round(Math.random()*9),uk=typeof Object.defineProperty==`function`,dk=function(){function e(){this._id=`__ec_inner_`+lk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return uk?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function fk(e){return isFinite(e)}function pk(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=fk(r)?r:0,i=fk(i)?i:1,a=fk(a)?a:0,o=fk(o)?o:0,e.createLinearGradient(r,a,i,o)}function mk(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=fk(o)?o:.5,s=fk(s)?s:.5,c=c>=0&&fk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function hk(e,t,n){for(var r=t.type===`radial`?mk(e,t,n):pk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function gk(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function _k(e){return parseInt(e,10)}function vk(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||_k(s[r])||_k(e.style[r]))-(_k(s[a])||0)-(_k(s[o])||0)||0}function yk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:oe(e)?[e]:B(e)?e:null}function bk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&yk(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=I(n,function(e){return e/i}),r/=i)}return[n,r]}var xk=new Qa(!0);function Sk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Ck(e){return typeof e==`string`&&e!==`none`}function wk(e){var t=e.fill;return t!=null&&t!==`none`}function Tk(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Ek(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Dk(e,t,n){var r=rt(t.image,t.__image,n);if(at(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*je),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Ok(e,t,n,r,i){var a,o=Sk(n),s=wk(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||xk,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?hk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?hk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Dk(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Dk(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=bk(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Ek(e,n),s&&Tk(e,n)):(s&&Tk(e,n),o&&Ek(e,n)),T&&e.setLineDash([])}function kk(e,t,n){var r=t.__image=rt(n.image,t.__image,t,t.onload);if(r&&at(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function Ak(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=bk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Sk(n)&&e.strokeText(i,n.x,n.y),wk(n)&&e.fillText(i,n.x,n.y)):(wk(n)&&e.fillText(i,n.x,n.y),Sk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var jk=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Mk=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Nk(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Wk(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fa.opacity:o}(r||t.blend!==n.blend)&&(a||=(Wk(e,i),!0),e.globalCompositeOperation=t.blend||fa.blend);for(var s=0;s<jk.length;s++){var c=jk[s];(r||t[c]!==n[c])&&(a||=(Wk(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(Wk(e,i),!0),e.shadowColor=t.shadowColor||fa.shadowColor),a}function Pk(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=Nk(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(Wk(e,i),!0),Ck(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(Wk(e,i),!0),Ck(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(Wk(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(Wk(e,i),!0),e.lineWidth=c)}for(var l=0;l<Mk.length;l++){var u=Mk[l],d=u[0];(r||a[d]!==o[d])&&(s||=(Wk(e,i),!0),e[d]=a[d]||u[1])}return s}function Fk(e,t,n,r,i){return Nk(e,t.style,n&&n.style,r,i)}function Ik(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function Lk(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),Ik(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function Rk(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var zk=1,Bk=2,Vk=3,Hk=4;function Uk(e){var t=wk(e),n=Sk(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function Wk(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function Gk(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};Kk(e,t,n),qk(e,n)}function Kk(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))t.__dirty&=-2,t.__isRendered=!1;else{var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||gk(i,a))&&(a&&(Wk(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(Wk(e,n),e.save(),Lk(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped)t.__dirty&=-2,t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof wo&&t.autoBatch&&Uk(o);s||Rk(r,l.transform)?(Wk(e,n),Ik(e,t)):u||Wk(e,n),t instanceof wo?(n.lastDrawType!==zk&&(c=!0,n.lastDrawType=zk),Pk(e,t,l,c,n),u&&(n.batchFill||n.batchStroke)||e.beginPath(),Ok(e,t,o,u,n)):t instanceof Eo?(n.lastDrawType!==Vk&&(c=!0,n.lastDrawType=Vk),Pk(e,t,l,c,n),Ak(e,t,o)):t instanceof Ao?(n.lastDrawType!==Bk&&(c=!0,n.lastDrawType=Bk),Fk(e,t,l,c,n),kk(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==Hk&&(c=!0,n.lastDrawType=Hk),Jk(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&Wk(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}}function qk(e,t){Wk(e,t),t.prevElClipPaths&&e.restore()}function Jk(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();for(var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Kk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}qk(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Kk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}qk(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Yk=new dk,Xk=new et(100),Zk=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function Qk(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&Yk.delete(e);var a=Yk.get(e);if(a)return a;var o=j(e,{symbol:`rect`,symbolSize:1,symbolKeepAspect:!0,color:`rgba(0, 0, 0, 0.2)`,backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor===`none`&&(o.backgroundColor=null);var s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,Yk.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<Zk.length;++s){var c=o[Zk[s]];if(c!=null&&!B(c)&&!H(c)&&!oe(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=Xk.get(l);u&&(i?e.svgElement=u:e.image=u)}var f=eA(o.dashArrayX),p=tA(o.dashArrayY),m=$k(o.symbol),h=nA(f),g=rA(p),_=!i&&d.createCanvas(),v=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},y=x(),b;_&&(_.width=y.width*n,_.height=y.height*n,b=_.getContext(`2d`)),S(),a&&Xk.put(l,_||v),e.image=_,e.svgElement=v,e.svgWidth=y.width,e.svgHeight=y.height;function x(){for(var e=1,t=0,n=h.length;t<n;++t)e=Hs(e,h[t]);for(var r=1,t=0,n=m.length;t<n;++t)r=Hs(r,m[t].length);e*=r;var i=g*h.length*m.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function S(){b&&(b.clearRect(0,0,_.width,_.height),o.backgroundColor&&(b.fillStyle=o.backgroundColor,b.fillRect(0,0,_.width,_.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;for(var a=-g,s=0,c=0,l=0;a<y.height;){if(s%2==0){for(var u=c/2%m.length,d=0,h=0,x=0;d<y.width*2;){for(var S=0,t=0;t<f[l].length;++t)S+=f[l][t];if(S<=0)break;if(h%2==0){var C=(1-o.symbolSize)*.5,w=d+f[l][h]*C,T=a+p[s]*C,E=f[l][h]*o.symbolSize,D=p[s]*o.symbolSize,O=x/2%m[u].length;k(w,T,E,D,m[u][O])}d+=f[l][h],++x,++h,h===f[l].length&&(h=0)}++l,l===f.length&&(l=0)}a+=p[s],++c,++s,s===p.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=Fv(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&v.children.push(d)}else Gk(b,u)}}}}function $k(e){if(!e||e.length===0)return[[`rect`]];if(H(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!H(e[n])){t=!1;break}if(t)return $k([e]);for(var r=[],n=0;n<e.length;++n)H(e[n])?r.push([e[n]]):r.push(e[n]);return r}function eA(e){if(!e||e.length===0)return[[0,0]];if(oe(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!oe(e[r])){n=!1;break}if(n)return eA([e]);for(var i=[],r=0;r<e.length;++r)if(oe(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=I(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function tA(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(oe(e)){var t=Math.ceil(e);return[t,t]}var n=I(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function nA(e){return I(e,function(e){return rA(e)})}function rA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var iA=Yc(aA);function aA(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=Qk(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=Qk(i,t)}}})}var oA=1,sA=800,cA=900,lA=920,uA=1e3,dA=2e3,fA=5e3,pA=1e3,mA=1100,hA=2e3,gA=3e3,_A=4e3,vA=4500,yA=4600,bA=5e3,xA=6e3,SA=7e3,CA={PROCESSOR:{SERIES_FILTER:sA,AXIS_STATISTICS:lA,FILTER:uA,STATISTIC:fA,STATISTICS:fA},VISUAL:{LAYOUT:pA,PROGRESSIVE_LAYOUT:mA,GLOBAL:hA,CHART:gA,POST_CHART_LAYOUT:yA,COMPONENT:_A,BRUSH:bA,CHART_ITEM:vA,ARIA:xA,DECAL:SA}},wA=`__flagInMainProcess`,TA=`__mainProcessVersion`,EA=`__pendingUpdate`,DA=`__needsUpdateStatus`,OA=/^[a-zA-Z0-9_]+$/,kA=`__connectUpdateStatus`,AA=0,jA=1,MA=2;function NA(e){return function(){var t=[...arguments];if(this.isDisposed())this.id;else return FA(this,e,t)}}function PA(e){return function(){var t=[...arguments];return FA(this,e,t)}}function FA(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Vi.prototype[t].apply(e,n)}var IA=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Vi),LA=IA.prototype;LA.on=PA(`on`),LA.off=PA(`off`);var RA,zA,BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj=function(e){i(t,e);function t(t,n,r){var i=e.call(this,new JO)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[TA]=1,r.ssr&&yD(function(e){var t=Xc(e),n=t.dataIndex;if(n!=null){var r=G();return r.set(`series_index`,t.seriesIndex),r.set(`data_index`,n),t.ssrType&&r.set(`ssr_type`,t.ssrType),r}});var c=i._zr=hD(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:W(r.useDirtyRect,s),useCoarsePointer:W(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=xw(z(c.flush,c),17),i._updateTheme(n),i._locale=Zh(r.locale||Yh),i._coordSysMgr=new nh;var l=i._api=QA(i);function u(e,t){return e.__prio-t.__prio}return LE(dj,u),LE(lj,u),i._scheduler=new kO(i,l,lj,dj),i._messageCenter=new IA,i._initEvents(),i.resize=z(i.resize,i),c.animation.on(`frame`,i._onframe,i),qA(c,i),JA(c,i),be(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(tj(this),this[EA]){var r=this[EA].silent;this[wA]=!0,nj(this);try{RA(this),VA.update.call(this,null,this[EA].updateParams)}catch(e){throw this[wA]=!1,this[EA]=null,e}this._zr.flush(),this[wA]=!1,this[EA]=null,GA.call(this,r),KA.call(this,r)}else if(e.unfinished){var i=oA;do{e.unfinished=!1;var a=d.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),UA(this,t),e.performVisualTasks(t),ZA(this,this._model,n,`remain`,{}),i-=d.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[wA]){if(this._disposed)this.id;else{var r,i,a;if(U(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[wA]=!0,nj(this),!this._model||t){var o=new zD(this._api),s=this._theme,c=this._model=new MD;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},uj);var l={seriesTransition:a,optionChanged:!0};if(n)this[EA]={silent:r,updateParams:l},this[wA]=!1,this.getZr().wakeUp();else{try{RA(this),VA.update.call(this,null,l)}catch(e){throw this[EA]=null,this[wA]=!1,e}this._ssr||this._zr.flush(),this[EA]=null,this[wA]=!1,GA.call(this,r),KA.call(this,r)}}}},t.prototype.setTheme=function(e,t){if(!this[wA]){if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[EA]&&(r??=this[EA].silent,i=this[EA].updateParams,this[EA]=null),this[wA]=!0,nj(this);try{this._updateTheme(e),n.setTheme(this._theme),RA(this),VA.update.call(this,{type:`setTheme`},i)}catch(e){throw this[wA]=!1,e}this[wA]=!1,GA.call(this,r),KA.call(this,r)}}}},t.prototype._updateTheme=function(e){H(e)&&(e=fj[e]),e&&(e=D(e),e&&pO(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ne.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return F(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed)this.id;else{e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;F(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return F(r,function(e){e.group.ignore=!1}),a}},t.prototype.getConnectedDataURL=function(e){if(this._disposed)this.id;else{var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(hj[n]){var o=a,s=a,c=-a,l=-a,u=[],f=e&&e.pixelRatio||this.getDevicePixelRatio();F(mj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(D(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=f,s*=f,c*=f,l*=f;var p=c-o,m=l-s,h=d.createCanvas(),g=hD(h,{renderer:t?`svg`:`canvas`});if(g.resize({width:p,height:m}),t){var _=``;return F(u,function(e){var t=e.left-o,n=e.top-s;_+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),g.painter.getSvgRoot().innerHTML=_,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Ro({shape:{x:0,y:0,width:p,height:m},style:{fill:e.connectedBackgroundColor}})),F(u,function(e){var t=new Ao({style:{x:e.left*f-o,y:e.top*f-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),h.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)}},t.prototype.convertToPixel=function(e,t,n){return HA(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return HA(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return HA(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed)this.id;else{var n=this._model,r;return F(xc(n,e),function(e,n){n.indexOf(`Models`)>=0&&F(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r}},t.prototype.getVisual=function(e,t){var n=this._model,r=xc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?ek(i,t):$O(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;F(aj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&nk(i,function(e){var t=Xc(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=k({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;F(cj,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),aT(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Dc(this.getDom(),_j,``);var e=this,t=e._api,n=e._model;F(e._componentsViews,function(e){e.dispose(n,t)}),F(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete mj[e.id]}},t.prototype.resize=function(e){if(!this[wA]){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[EA]&&(r??=this[EA].silent,n=!0,this[EA]=null),this[wA]=!0,nj(this);try{n&&RA(this),VA.update.call(this,{type:`resize`,animation:k({duration:0},e&&e.animation)})}catch(e){throw this[wA]=!1,e}this[wA]=!1,GA.call(this,r),KA.call(this,r)}}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(U(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),pj[e]){var n=pj[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=k({},e);return t.type=sj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(U(t)||(t={silent:!!t}),oj[e.type]&&this._model){if(this[wA])this._pendingActions.push(e);else{var n=t.silent;WA.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ne.browser.weChat&&this._throttledZrFlush(),GA.call(this,n),KA.call(this,n)}}},t.prototype.updateLabelLayout=function(){rk.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){RA=function(e){Lx(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),zA(e,!0),zA(e,!1),t.plan()},zA=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=Re(e.type);u=new(t?_O.getClass(d.main,d.sub):my.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},BA=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){F([].concat(e._componentsViews,e._chartsViews),l);return}var o=Ec(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=G(),F($s(s),function(e){var t=pc(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(gu(n)){if(t instanceof bv)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&Ql(t,n,e._api);else{var r=$l(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Zl(t.mainType,t.componentIndex,e._api),a&&F(a,function(e){n.type===`highlight`?Hl(e):Ul(e)})}}else hu(n)&&t instanceof bv&&(nu(t,n,e._api),ru(t),ej(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},VA={prepareAndUpdate:function(e){RA(this),VA.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){Rx(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),rk.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),UA(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),YA(this,r,i,e,n),rk.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=G();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),ZA(t,n,r,e,{},a),rk.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),my.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),YA(this,n,this._api,e,{}),rk.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),my.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),rk.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){VA.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed)e.id;else for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=xc(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}HA=e,UA=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},WA=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=oj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Re(s[0]);this[wA]=!0,nj(this);var u=[e],d=!1;e.batch&&(d=!0,u=I(e.batch,function(t){return t=j(k({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=hu(e),_=gu(e);if(_&&Yl(this._api),F(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=k({},t),p.type=h,f.push(p),_){var a=Sc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;BA(n,c,t,u),ej(n)}else g?(BA(n,c,t,`series`),ej(n)):l&&BA(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[EA]?(RA(this),VA.update.call(this,e),this[EA]=null):VA[c].call(this,e)}catch(e){throw this[wA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[wA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;_e(U(y)),v=j({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},GA=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();WA.call(this,n,e)}},KA=function(e){!e&&this.trigger(`updated`)},qA=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[EA]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},JA=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=nk(n,pu);r&&(eu(r,e,t._api),ej(t))}).on(`mouseout`,function(e){var n=e.target,r=nk(n,pu);r&&(tu(r,e,t._api),ej(t))}).on(`click`,function(e){var n=e.target,r=nk(n,function(e){return Xc(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Xc(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;LE(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),F(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}YA=function(e,t,r,i,a){n(t),XA(e,t,r,i,a),F(e._chartsViews,function(e){e.__alive=!1}),ZA(e,t,r,i,a),F(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},XA=function(e,t,n,r,i,a){F(a||e._componentsViews,function(e){var i=e.__model;c(i,e),e.render(i,t,n,r),s(i,e),l(i,e)})},ZA=function(e,t,n,r,i,u){var d=e._scheduler;i=k(i||{},{updatedSeries:t.getSeries()}),rk.trigger(`series:beforeupdate`,t,n,i);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),c(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),o(t,n),ru(t)}),d.unfinished=f||d.unfinished,rk.trigger(`series:layoutlabels`,t,n,i),rk.trigger(`series:transition`,t,n,i),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];s(t,n),l(t,n)}),a(e,t),rk.trigger(`series:afterupdate`,t,n,i)},ej=function(e){e[DA]=!0,e.getZr().wakeUp()},nj=function(e){e[TA]=(e[TA]+1)%1e6},tj=function(e){e[DA]&&(e.getZr().storage.traverse(function(e){Gd(e)||r(e)}),e[DA]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function a(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>W(t.get(`hoverLayerThreshold`),wD.hoverLayerThreshold)&&!Ne.node&&!Ne.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function o(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function s(e,t){if(!e.preventAutoZ){var n=Lf(e);t.eachRendered(function(e){return zf(e,n.z,n.zlevel),!0})}}function c(e,t){t.eachRendered(function(e){if(!Gd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function l(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Gd(e))return;if(e instanceof wo&&_u(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}QA=function(e){return new(function(t){i(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Hl(t,n),ej(e)},n.prototype.leaveEmphasis=function(t,n){Ul(t,n),ej(e)},n.prototype.enterBlur=function(t){Wl(t),ej(e)},n.prototype.leaveBlur=function(t){Gl(t),ej(e)},n.prototype.enterSelect=function(t){Kl(t),ej(e)},n.prototype.leaveSelect=function(t){ql(t),ej(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[TA]},n.prototype.usingTHL=function(){return e._usingTHL},n}(ll))(e)},$A=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[kA]=t}}F(sj,function(n,r){e._messageCenter.on(r,function(n){if(hj[e.group]&&e[kA]!==AA){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];F(mj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,AA),F(i,function(e){e[kA]!==jA&&e.dispatchAction(r)}),t(i,MA)}})})}}(),t}(Vi),ij=rj.prototype;ij.on=NA(`on`),ij.off=NA(`off`),ij.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var aj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],oj={},sj={},cj={},lj=[],uj=[],dj=[],fj={},pj={},mj={},hj={},gj=/* @__PURE__ */ new Date-0;/* @__PURE__ */ new Date-0;var _j=`_echarts_instance_`;function vj(e,t,n){var r=!(n&&n.ssr);if(r){var i=yj(e);if(i)return i}var a=new rj(e,t,n);return a.id=`ec_`+gj++,mj[a.id]=a,r&&Dc(e,_j,a.id),$A(a),rk.trigger(`afterinit`,a),a}function yj(e){return mj[Oc(e,_j)]}function bj(e,t){fj[e]=t}function xj(e){M(uj,e)<0&&uj.push(e)}function Sj(e,t){jj(lj,e,t,dA)}function Cj(e){Tj(`afterinit`,e)}function wj(e){Tj(`afterupdate`,e)}function Tj(e,t){rk.on(e,t)}function Ej(e,t,n){var r,i,a,o,s;V(t)&&(n=t,t=``),U(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;oj[r]||(_e(OA.test(r)&&OA.test(i)),a&&_e(i!==r),oj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},cj[i]=1,a&&s&&(cj[l]=1),sj[l]=r)}function Dj(e,t){nh.register(e,t)}function Oj(e,t){jj(dj,e,t,pA,`layout`,!0)}function kj(e,t){jj(dj,e,t,gA,`visual`,!0)}var Aj=[];function jj(e,t,n,r,i,a){if((V(t)||U(t))&&(n=t,t=r),!(M(Aj,n)>=0)){Aj.push(n);var o=kO.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function Mj(e,t){pj[e]=t}function Nj(e,t,n){var r=ok(`registerMap`);r&&r(e,t,n)}var Pj=z_;kj(hA,CO),kj(vA,TO),kj(vA,EO),kj(hA,ZO),kj(vA,QO),kj(SA,iA),xj(pO),Sj(cA,mO),Mj(`default`,OO),Ej({type:_l,event:_l,update:_l},Ae),Ej({type:vl,event:vl,update:vl},Ae),Ej({type:yl,event:Sl,update:yl,action:Ae,refineEvent:Fj,publishNonRefinedEvent:!0}),Ej({type:bl,event:Sl,update:bl,action:Ae,refineEvent:Fj,publishNonRefinedEvent:!0}),Ej({type:xl,event:Sl,update:xl,action:Ae,refineEvent:Fj,publishNonRefinedEvent:!0});function Fj(e,t,n,r){return{eventContent:{selected:iu(n),isFromClick:t.isFromClick||!1}}}bj(`default`,{}),bj(`dark`,qO);var Ij=[],Lj={registerPreprocessor:xj,registerProcessor:Sj,registerPostInit:Cj,registerPostUpdate:wj,registerUpdateLifecycle:Tj,registerAction:Ej,registerCoordinateSystem:Dj,registerLayout:Oj,registerVisual:kj,registerTransform:Pj,registerLoading:Mj,registerMap:Nj,registerImpl:ak,PRIORITY:CA,ComponentModel:__,ComponentView:_O,SeriesModel:bv,ChartView:my,registerComponentModel:function(e){__.registerClass(e)},registerComponentView:function(e){_O.registerClass(e)},registerSeriesModel:function(e){bv.registerClass(e)},registerChartView:function(e){my.registerClass(e)},registerCustomSeries:function(e,t){ck(e,t)},registerSubTypeDefaulter:function(e,t){__.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){gD(e,t)}};function Rj(e){B(e)?F(e,function(e){Rj(e)}):M(Ij,e)>=0||(Ij.push(e),V(e)&&(e={install:e}),e.install(Lj))}var zj=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return bh(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Y.color.primary}},universalTransition:{divideShape:`clone`}},t}(bv),Bj=4,Vj=function(){function e(){}return e}(),Hj=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new Vj},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<Bj,c=this.softClipShape,l;if(s)this._ctx=o;else{for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||(!c||c.contain(u,d))&&(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)}},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||(!i||i.contain(o,s))&&r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new q(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(wo),Uj=function(){function e(){this.group=new Bu}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new Hj({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=Fv(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<Bj;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=Xc(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Wj=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,Gj(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Kc(t),Gj(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=cx(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(Gj(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new Uj:new qv,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(my);function Gj(e){return{clipShape:Cy(e)}}var Kj=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),qj=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Cc).models[0]},t.type=`cartesian2dAxis`,t}(__);N(qj,Kj);var Jj={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Y.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Y.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Y.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Y.color.backgroundTint,Y.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Y.color.neutral00,borderColor:Y.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},Yj=O({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},Jj),Xj=O({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Y.color.axisMinorSplitLine,width:1}}},Jj),Zj={category:Yj,value:Xj,time:O({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},Xj),log:j({logBase:10},Xj)};function Qj(e,t,n,r){F(Eb,function(a,o){var s=O(O({},Zj[o],!0),r,!0),c=function(e){i(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+o,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=f_(this),r=n?m_(e):{};O(e,t.getTheme().get(o+`Axis`)),O(e,this.getDefaultOption()),e.type=$j(e),n&&p_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=jy.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=FS();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+o,n.defaultOption=s,n}(n);e.registerComponentModel(c)}),e.registerSubTypeDefaulter(t+`Axis`,$j)}function $j(e){return e.type||(e.data?`category`:`value`)}var eM=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return I(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),L(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),tM=[`x`,`y`];function nM(e){return(e.type===`interval`||e.type===`time`)&&!ag(e)}var rM=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=rw,t.dimensions=tM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(nM(e)&&nM(t)){var n=Ry(e,null),r=Ry(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=pt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new q(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return kt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return kt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new q(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(eM);function iM(e,t){var n=e.scale,r=e.model,i=WC(n,r,r.ecModel,e,null),a=qy(n),o=qy(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=cs(l[0].value-l[1].value),g=cs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=$y(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*ss(c,2):Yy(E),D=Xy(E)}function j(){w=Ss(k-E*f,D)}function M(){T=Ss(O+E*p,D)}function ee(){k=f?Ss(w+E*f,D):w}function N(){O=p?Ss(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var P=e.getExtent(),F=cs(P[1]-P[0]);D=Es([T,w],F,.5/m),ee(),N(),Us(D)&&(E=Ss(E,D))}else{var I=C[1]-C[0];E=a?ss(Ps(I),1):Is(I/m,2),D=Xy(E),b[0]?(w=C[0],A(function(){if(ee(),O=Ss(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=Ss(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Ss(ds(C[0]/E)*E,D),O=Ss(us(C[1]/E)*E,D);var e=ls((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=us(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Ss(k-E*n[0],D),O=Ss(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}Hb(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function aM(e,t){var n=qy(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=$y(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?sM(r,t):oM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Xy(d)),i[0]||(s[0]=Ss(us(s[0]/u)*u,l)),i[1]||(s[1]=Ss(ds(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Hb(e,i,o,s,a,c)}function oM(e,t){var n=tb(t.splitNumber,5),r=By(e),i=t.minInterval,a=t.maxInterval,o=Is(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Xy(o),c=e.getExtent(),l=[Ss(ds(c[0]/o)*o,s),Ss(us(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function sM(e,t){var n=tb(t.splitNumber,10),r=e.getExtent(),i=By(e),a=ss(Ps(i),1);n/i*a<=.5&&(a*=10);var o=Xy(a),s=[Ss(ds(r[0]/a)*a,o),Ss(us(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function cM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;lM(t,n,r,i,null)}function lM(e,t,n,r,i){var a=WC(e,t,r,n,i),o=Gy(e)||Ky(e);uM(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&KC(n,e,a,r)}function uM(e,t){dM[e.type](e,t)}var dM={interval:aM,log:aM,time:vb,ordinal:Ae},fM=[[3,1],[0,2]],pM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=tM,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;F(this._axesList,function(e){RC(e,1);var t=e.scale;Jy(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=R(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):cM(i)}F(n,function(e){vM(e,e.__alignTo)?cM(e):iM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};F(n.x,function(e){hM(n,`y`,e,i)}),F(n.y,function(e){hM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=l_(e,t),i=this._rect=s_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(bM(a,i),!n){var c=wM(i,o,a,s,t),l=void 0;if(s)SM?(SM(this._axesList,i),bM(a,i)):l=CM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=EM(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=CM(d,f,p,i,a,c,r))}TM(i,a,hx.determine,null,l,r),F(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}U(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Cc).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Cc).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,M(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,F(o.x,function(t,n){F(o.y,function(i,a){var o=`x`+n+`y`+a,s=new rM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),_M(o.x),_M(o.y);function c(t){return function(n,r){if(mM(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Ob(n),u=new hS(t,kb(n,l,!0),[0,0],l,c);u.onBand=Wb(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return F(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);M(t,i)<0&&t.push(i),M(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),F(o._axesList,function(t){LC(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;ch({targetModel:e,coordSysType:rw,coordSysProvider:r});function r(){var r=EC(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(rS(t,e,rw),rS(n,e,rw))},this),r},e.dimensions=tM,e.dimIdxMap=Nm(tM),e}();function mM(e,t){return e.getCoordSysModel()===t}function hM(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)gM(s,i[c])&&(a=i[c]);else for(var l in i)if(ke(i,l)&&gM(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function gM(e,t){if(!t)return!1;var n=t.scale,r=Ab(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Mb(t)&&(i=!1),i}function _M(e){for(var t=R(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Wy(a.scale)&&Bb(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&F(r,function(e){e.__alignTo=n})}function vM(e,t){return ag(e.scale)||ag(t.scale)||t.scale.getTicks().length<2}function yM(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function bM(e,t){F(e.x,function(e){return xM(e,t.x,t.width)}),F(e.y,function(e){return xM(e,t.y,t.height)})}function xM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),yM(e,t)}var SM;function CM(e,t,n,r,i,a,o){TM(r,i,hx.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=ne(s,function(e){return e>0})==null;return Df(r,s,!0,!0,n),bM(i,r),c;function l(e){F(i[Qd[e]],function(t){if(zb(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Ub(t.scale,JS(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Rb(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[Qd[n]]-t[Qd[n]],a=t[$d[n]]+t[Qd[n]]-(e[$d[n]]+e[Qd[n]]);i=d(i,1-r),a=d(a,r);var o=fM[n][0],c=fM[n][1];s[o]=ss(s[o],i),s[c]=ss(s[c],a)}function d(e,t){return e>0&&!fe(t)&&t>1e-4&&(e/=t),e}}function wM(e,t,n,r,i){var a=new XS(DM);return F(n,function(n){return F(n,function(n){if(zb(n.model)){var o=!r;n.axisBuilder=DC(e,t,n.model,i,a,o)}})}),a}function TM(e,t,n,r,i,a){var o=n===hx.determine;F(t,function(t){return F(t,function(t){zb(t.model)&&(OC(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Qd[1-t]]=e[$d[t]]<=a.refContainer[$d[t]]*.5?0:1-t==1?2:1}F(t,function(e,t){return F(e,function(e){zb(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function EM(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=s_(e.get(`outerBounds`,!0)||tw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||M([`all`,`axisLabel`],a)<0?`all`:a,s=[ys(W(e.get(`outerBoundsClampWidth`,!0),nw[0]),t.width),ys(W(e.get(`outerBoundsClampHeight`,!0),nw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var DM=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;eC(e,t,n,r,i,a),Rb(e.nameLocation)||F(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&nC(e.labelInfoList,e.dirVec,r,i)})};function OM(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return kM(n,e,t),n.seriesInvolved&&jM(n,e),n}function kM(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];F(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=RM(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(F(n.getAxes(),ie(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&F(f.baseAxes,ie(p,!d||`cross`,u)),d&&F(f.otherAxes,ie(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||LM(d))){s??=d.get(`triggerTooltip`),d=r?AM(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=RM(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:LM(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=MM(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function AM(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};F(s,function(e){c[e]=D(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&j(l,u.textStyle)}return e.model.getModel(`axisPointer`,new yp(c,n,r))}function jM(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&F(e.coordSysAxesInfo[RM(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function MM(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(NM(a[r+`AxisId`],n.id)||NM(a[r+`AxisIndex`],n.componentIndex)||NM(a[r+`AxisName`],n.name))return i}}function NM(e,t){return e===`all`||B(e)&&M(e,t)>=0||e===t}function PM(e){var t=FM(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=LM(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function FM(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[RM(e)]}function IM(e){var t=FM(e);return t&&t.axisPointerModel}function LM(e){return!!e.get([`handle`,`show`])}function RM(e){return e.type+`||`+e.id}var zM={},BM=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&PM(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=IM(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){zM[e]=t},t.getAxisPointerClass=function(e){return e&&zM[e]},t.type=`axis`,t}(_O),VM=yc();function HM(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=VM(e).splitAreaColors,f=G(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=B(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new Ro({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:j({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}VM(e).splitAreaColors=f}}}function UM(e){VM(e).splitAreaColors=null}var WM=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],GM=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Bu,this.group.add(this._axisGroup),zb(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),F(WM,function(e){t.get([e,`show`])&&KM[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||yf(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){UM(this)},t.type=`cartesianAxis`,t}(BM),KM={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=B(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new vd({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:j({stroke:c[x]},_),silent:!0});df(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new vd({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});df(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){HM(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=FS(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},qM=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(GM),JM=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=qM.type,t}return t.type=`yAxis`,t}(GM),YM=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Ro({shape:e.coordinateSystem.getRect(),style:j({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(_O),XM={offset:0};function ZM(e){e.registerComponentView(YM),e.registerComponentModel(iw),e.registerCoordinateSystem(`cartesian2d`,pM),Qj(e,`x`,qj,XM),Qj(e,`y`,qj,XM),e.registerComponentView(qM),e.registerComponentView(JM),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function QM(e){Rj(ZM),e.registerSeriesModel(zj),e.registerChartView(Wj),e.registerLayout(cx(`scatter`))}var $M=yc();function eN(e,t){return!!$M(e)[t]}Ej({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Ae);var tN={axisPointer:1,tooltip:1,brush:1};function nN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||tN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Lf(r),o=Lf(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var rN=function(e){i(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=z(n._mousedownHandler,n),i=z(n._mousemoveHandler,n),a=z(n._mouseupHandler,n),o=z(n._mousewheelHandler,n),s=z(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Lf(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:W(c.z2,-1/0)},p=k({},n.triggerInfo);this._opt=j(k({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,this._enabled&&this._controlType===e||(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(sN(t,`mousedown`,r,f),sN(t,`mousemove`,i,f),sN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(sN(t,`mousewheel`,o,f),sN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,cN(t,`mousedown`,r),cN(t,`mousemove`,i),cN(t,`mouseup`,a),cN(t,`mousewheel`,o),cN(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(nN(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(fE(e)||iN(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||eN(t,`globalPan`)||iN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!fN(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i)}else{t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&dE(e.event),e.__ecRoamConsumed=!0,dN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}}},t.prototype._mouseupHandler=function(e){if(!iN(e)){var t=this._zr;if(!fE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!iN(e)){var t=fN(`zoomOnMouseWheel`,e,this._opt),n=fN(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(r!==0&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(eN(this._zr,`globalPan`)||iN(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(dE(r.event),r.__ecRoamConsumed=!0,dN(e,t,n,r,i))},t}(Vi);function iN(e){return e.__ecRoamConsumed}var aN=yc();function oN(e){var t=aN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function sN(e,t,n,r){for(var i=oN(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),lN(e,t)}function cN(e,t,n){for(var r=oN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||uN(e,t);return}}function lN(e,t){var n=oN(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function uN(e,t){var n=oN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function dN(e,t,n,r,i){i.isAvailableBehavior=z(fN,null,n,r),e.trigger(t,i)}function fN(e,t,n){var r=n[e];return!e||r&&(!H(r)||t.event[r+`Key`])}function pN(e){return e}var mN=`view`,hN=function(e){i(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=mN,i.dimensions=[`x`,`y`];var a=pN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Jn(),o[1]=Jn(),o[2]=Jn(),a.mtRaw=ot(),a.mtRawInv=ot(),a.mtOverall=ot(),a.mtOverallInv=ot(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return _N(null,this)},t.prototype.getViewRect=function(){return vN(null,this)},t.prototype.getRoamTransform=function(){return qn(pN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?pN(this).mtRaw:pN(this).mtOverall;return n||=[],r?kt(n,e,r):ht(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=pN(this).mtOverallInv;return r?kt(n,e,r):ht(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=RN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=RN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=pN(this);return qt(gN,t.dataRect),Yt(gN,gN,t.mtOverall),Xt(gN,e[0],e[1])},t.dimensions=[`x`,`y`],t}(Kn),gN=Gt();function _N(e,t){return qt(e||Gt(),pN(t).dataRect)}function vN(e,t){return qt(e||Gt(),pN(t).viewRect)}function yN(e,t,n){return Xn(e||Jn(),pN(t).trans[n])}function bN(e){return!!(e.dataRect&&e.viewRect)}function xN(e,t,n,r){r===1?FN(e,t.trans[0],n):Xn(e,n)}function SN(e,t,n){qn(n,CN),lt(CN,CN,t.mtRawInv),Hf(e,CN)}var CN=ot();function wN(e,t){var n=pN(e);n.centerOption=t.getShallow(`center`);var r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=rP(t.getShallow(`zoom`)||1,r)||1,bN(n)&&DN(n)}function TN(e,t,n,r,i){var a=pN(e);a.dataRect=new q(t,n,r,i),bN(a)&&DN(a)}function EN(e,t,n,r,i){var a=pN(e);a.viewRect=new q(t,n,r,i),bN(a)&&DN(a)}function DN(e){ON(e),jN(e),NN(e)}function ON(e){var t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=qt(AN,t),t.y=-t.y-t.height),Jt(kN,t,n),Hf(r,kN),i&&(r.scaleY=-r.scaleY);var a=qn(r,e.mtRaw);pt(e.mtRawInv,a)}var kN=ot(),AN=Gt();function jN(e){var t=zN(e),n=XN(MN,e,e.centerOption)?kt(MN,MN,e.mtRaw):t,r=e.zoom,i=e.trans[1];i.x=t[0]-r*n[0],i.y=t[1]-r*n[1],i.scaleX=i.scaleY=r}var MN=[];function NN(e){var t=e.trans,n=t[1],r=t[0],i=t[2];FN(i,r,n);var a=qn(i,e.mtOverall),o=pt(e.mtOverallInv,a);PN(e,i,a,o),PN(e.lgGeo,i,a,o)}function PN(e,t,n,r){e&&(Xn(e,t),ct(e.transform||=[],n),ct(e.invTransform||=[],r))}function FN(e,t,n){qn(t,IN),qn(n,LN),lt(LN,LN,IN),Hf(e,LN)}var IN=ot(),LN=ot();function RN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function zN(e){var t=e.viewRect;return BN[0]=t.x+t.width/2,BN[1]=t.y+t.height/2,BN}var BN=[];function VN(e,t,n,r){var i=pN(n);i.syncBackEl=e,i.syncBackType=t,r?Ud(e,yN(null,n,t),r):(yN(e,n,t),e.dirty())}function HN(e,t,n,r){var i=pN(e),a=i.syncBackEl;a?(a.stopAnimation(),xN(UN,i,a,i.syncBackType)):Xn(UN,i.trans[2]),SN(WN,i,UN),r?JN(UN,WN,i,r):Xn(UN,WN),SN(UN,i,UN),eP(i,t,n,UN)}var UN=Jn(),WN=Jn();function GN(e,t,n){var r=KN(t);r&&(HN(r,t,n,e),wN(r,t))}function KN(e){return e.__ownRoamView?e.__ownRoamView():null}function qN(e,t,n,r){n.setUpdatePayload(Vf(e));var i=ul(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function JN(e,t,n,r){r.dx!=null&&r.dy!=null&&(e.x+=r.dx,e.y+=r.dy);var i=r.zoom;if(i!=null){var a=YN(t),o=rP(a*i,n.zoomLimit)/a;e.x-=(r.originX-e.x)*(o-1),e.y-=(r.originY-e.y)*(o-1),e.scaleX*=o,e.scaleY*=o}}function YN(e){return e.scaleX}function XN(e,t,n){var r=t.dataRect;if(!n)return!1;var i=t.lgCt;return i?_t(e,J(n[0],i.w),J(n[1],i.h)):r&&_t(e,J(n[0],r.width,r.x),J(n[1],r.height,r.y)),!0}function ZN(e,t){var n=e.centerOption,r=e.dataRect;return!n||e.lgCt?t.slice():[QN(0,t,n,r),QN(1,t,n,r)]}function QN(e,t,n,r){return n&&r&&r[$d[e]]&&bs(n[e])?(t[e]-r[Qd[e]])/r[$d[e]]*100+`%`:t[e]}function $N(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function eP(e,t,n,r){var i=zN(e),a=YN(r),o=cs(a)>1e-6;tP[0]=o?(i[0]-r.x)/a:i[0],tP[1]=o?(i[1]-r.y)/a:i[1],kt(tP,tP,e.mtRawInv);var s=ZN(e,tP);nP(t,s,a),F(n,function(e){e!==t&&nP(e,s.slice(),a)})}var tP=[];function nP(e,t,n){var r=e.option;r.center=t,r.zoom=n}function rP(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function iP(e,t,n,r,i,a,o,s){if(!KN(e)){n.disable();return}n.enable(W(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Vf(j({type:cP(r,e.subType,sl)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function aP(e){return function(t,n,r){return oP.copy(e.getBoundingRect()),oP.applyTransform(e.getComputedTransform()),oP.contain(n,r)}}var oP=new q(0,0,0,0);function sP(e,t,n){var r=cP(t,n,sl);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Ec(e,t,n),function(t){GN(e,t),qN(e,t,r,i)})})}function cP(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function lP(e,t,n,r,i,a,o){var s=new hN(null,$N(e.ecModel,t));return TN(s,n,r,i,a),o?EN(s,o.x,o.y,o.width,o.height):EN(s,n,r,i,a),wN(s,e),s}var uP=yc();function dP(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,vP(t,n,e),F(n,function(n){F(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,ie(fP,e))})}),t.wrapMethod(`cloneShallow`,ie(mP,e)),F(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,ie(pP,e))}),_e(n[t.dataType]===t)}function fP(e,t){if(_P(this)){var n=k({},uP(this).datas);n[this.dataType]=t,vP(t,n,e)}else yP(t,this.dataType,uP(this).mainData,e);return t}function pP(e,t){return e.struct&&e.struct.update(),t}function mP(e,t){return F(uP(t).datas,function(n,r){n!==t&&yP(n.cloneShallow(),r,t,e)}),t}function hP(e){var t=uP(this).mainData;return e==null||t==null?t:uP(t).datas[e]}function gP(){var e=uP(this).mainData;return e==null?[{data:e}]:I(R(uP(e).datas),function(t){return{type:t,data:uP(e).datas[t]}})}function _P(e){return uP(e).mainData===e}function vP(e,t,n){uP(e).datas={},F(t,function(t,r){yP(t,r,e,n)})}function yP(e,t,n,r){uP(n).datas[t]=e,uP(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=hP,e.getLinkedDataAll=gP}var bP=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){V(e)&&(n=t,t=e,e=null),e||={},H(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),xP=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,B(n)?n.length:1),a.push(e);var r=new bP(pc(e.name,``),i);t?SP(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=Zm(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Xm(c,n);return l.initData(a),r&&r(l),dP({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function SP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function CP(e,t,n){if(e&&M(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(H(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function wP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function TP(e,t){return M(wP(e),t)>=0}function EP(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var DP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function OP(e){for(var t=0;t<DP.length;t++)e.registerAction({type:DP[t],update:`updateView`},Ae);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=CP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=TP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function kP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=S_(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var AP=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};jP(n);var r=e.levels||[],i=new yp({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=MP(r,t);var a=I(r||[],function(e){return new yp(e,i,t)},this),o=xP.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return ev(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=EP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},k(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=G(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){kP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Y.size.l,top:Y.size.xxxl,right:Y.size.l,bottom:Y.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Y.size.m,emptyItemWidth:25,itemStyle:{color:Y.color.backgroundShade,textStyle:{color:Y.color.secondary}},emphasis:{itemStyle:{color:Y.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Y.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Y.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(bv);function jP(e){var t=0;F(e.children,function(e){jP(e);var n=e.value;B(n)&&(n=n[0]),t+=n});var n=e.value;B(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),B(e.value)?e.value[0]=n:e.value=n}function MP(e,t){var n=$s(t.get(`color`)),r=$s(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new yp(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var NP=8,PP=8,FP=5,IP=function(){function e(e){this.group=new Bu,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),i.get(`show`)&&n){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=l_(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=s_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),u_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=pc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+NP*2,t.emptyItemWidth);t.totalWidth+=o+PP,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new pd({shape:{points:LP(c,0,_,u,m===f.length-1,m===0)},style:j(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Uo({style:Xf(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:ie(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Xf(o,{text:v}),y.ensureState(`emphasis`).style=p,su(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),RP(y,e,g),c+=_+PP}},e.prototype.remove=function(){this.group.removeAll()},e}();function LP(e,t,n,r,i,a){var o=[[i?e:e-FP,t],[e+n,t],[e+n,t+r],[i?e:e-FP,t+r]];return!a&&o.splice(2,0,[e+n+FP,t+r/2]),!i&&o.push([e,t+r/2]),o}function RP(e,t,n){Xc(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&EP(n,t)}}var zP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function BP(){return new zP}var VP=Math.max,HP=Math.min,UP=F,WP=[`itemStyle`,`borderWidth`],GP=[`itemStyle`,`gapWidth`],KP=[`upperLabel`,`show`],qP=[`upperLabel`,`height`],JP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=l_(e,n).refContainer,o=s_(e.getBoxLayoutParams(),a),s=r&&r.type,c=CP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=wP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,nF(e,c,u,o)):l?(f=!0,k({},l)):k({},o);if(f){var m=oF(o,p);m=sF(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),YP(u,g,!1,0),_=u.getLayout(),UP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(k({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(rF(o,l,c),!0),e.setLayoutInfo(o),iF(v,new q(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function YP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(WP),l=s.get(GP)/2,u=aF(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=VP(i-2*f,0),a=VP(a-f-p,0);var m=i*a,h=XP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=HP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=eF(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,tF(y,_,g,l,!1),_=HP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&tF(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)YP(h[b],t,n,r+1)}}}function XP(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=L(o,function(e){return!e.isRemoved()}),QP(o,s);var l=$P(t,o,s);if(l.sum===0||(l.sum=ZP(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function ZP(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function QP(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function $P(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=Mc(),UP(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function eF(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?VP(l*r/c,c/(l*i)):1/0}function tF(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=VP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=VP(v-2*r,0);m[s[o]]=n[s[o]]+HP(r,g/2),m[s[a]]=l+HP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function nF(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=k({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(WP),v=Math.max(_,aF(g));u+=4*_*_+(3*_+v)*u**.5,u>ks&&(u=ks),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function rF(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function iF(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new q(t.x-a.x,t.y-a.y,t.width,t.height);UP(e.viewChildren||[],function(e){iF(e,c,n,r,i+1)})}}function aF(e){return e.get(KP)?e.get(qP):0}function oF(e,t){return t.width/e.width||t.height/e.height||1}function sF(e,t){return rP(e,t.get(`scaleLimit`,!0))}var cF=Bu,lF=Ro,uF=3,dF=`label`,fF=`upperLabel`,pF=100,mF=20,hF=30,gF=Ye([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),_F=function(e){var t=gF(e);return t.stroke=t.fill=t.lineWidth=null,t},vF=yc(),yF=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=bF(),n}return t.prototype.render=function(e,t,n,r){if(!(M(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=CP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new cF,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=bF(),o=bF(),s=this._storage,c=[];function l(e,r,i,l){return xF(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,F(e,function(e,t){!e.isRemoved()&&o(t,t)})):new Sp(t,e,a,a).add(o).update(o).remove(ie(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=bF();return e&&F(e,function(e,n){var r=t[n];F(e,function(e){e&&(r.push(e),vF(e).willDelete=!0)})}),t}function p(){F(u,function(e){F(e,function(e){e.parent&&e.parent.remove(e)})}),F(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(V(i)?0:i)||0,s=(V(a)?null:a)||`cubicOut`,c=BP();F(t.willDeleteEls,function(e,t){F(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=vF(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),F(this._storage,function(e,n){F(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof Bu?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=k({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(z(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new rN(e.getZr()),r.on(`pan`,z(this._onPan,this)),r.on(`zoom`,z(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>uF||Math.abs(e.dy)>uF)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new q(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=oF(c,o),u=l*r;u=sF(u,i);var d=u/l;t-=c.x,n-=c.y;var f=ot();ut(f,f,[-t,-n]),ft(f,f,[d,d]),ut(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&Qg(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new IP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(TP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=bF(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(my);function bF(){return{nodeGroup:[],background:[],content:[]}}function xF(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=re(`nodeGroup`,cF);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),vF(D).nodeWidth=p,vF(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=re(`background`,lF,l,mF);O&&I(D,O,x&&u.upperLabelHeight);var A=f.getModel(`emphasis`),j=A.get(`focus`),M=A.get(`blurScope`),ee=A.get(`disabled`),N=j===`ancestor`?o.getAncestorsIndices():j===`descendant`?o.getDescendantIndices():j;if(x)pu(D)&&fu(D,!1),O&&(fu(O,!ee),d.setItemGraphicEl(o.dataIndex,O),cu(O,N,M));else{var P=re(`content`,lF,l,hF);P&&te(D,P),O.disableMorphing=!0,O&&pu(O)&&fu(O,!1),fu(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var F=f.getShallow(`cursor`);F&&P.attr(`cursor`,F),cu(D,N,M)}return D;function I(t,n,r){var i=Xc(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)L(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=_F(S);c.fill=s;var l=gF(C);l.fill=C.get(`borderColor`);var u=gF(w);u.fill=w.get(`borderColor`);var d=gF(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;ne(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,zl(n)}t.add(n)}function te(t,n){var r=Xc(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)L(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=_F(S);l.fill=c,l.decal=s.decal;var u=gF(C),d=gF(w),f=gF(T);ne(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,zl(n)}t.add(n)}function L(e){!e.invisible&&a.push(e)}function ne(t,n,r,i){var a=f.getModel(i?fF:dF),s=pc(f.get(`name`),null),c=a.getShallow(`show`);Jf(t,Yf(f,i?fF:dF),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=ge(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,R(d,i,u);var m=l.getState(`emphasis`);R(m?m.style:null,i,u)}}function R(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function re(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,z(c,s)):g||(s=new r,s instanceof ga&&(s.z2=SF(a,o)),ie(c,s)),t[e][_]=s}function z(e,t){var n=e[_]={};t instanceof cF?(n.oldX=t.x,n.oldY=t.y):n.oldShape=k({},t.shape)}function ie(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Bu;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function SF(e,t){return e*pF+t}var CF=F,wF=U,TF=-1,EF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=D(t);this.type=r,this.mappingMethod=n,this._normalizeData=RF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(kF(i),DF(i)):n===`category`?i.categories?OF(i):kF(i,!0):(_e(n!==`linear`||i.dataExtent),kF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return z(this._normalizeData,this)},e.listVisualTypes=function(){return R(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){U(e)?F(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=B(t)?[]:U(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&CF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(B(e))e=e.slice();else if(wF(e)){var t=[];CF(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||H(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(zF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(zF(u[0],l[0],e))return a}else if(zF(u[0],l[0],e)&&zF(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:MF(`color`),getColorMapper:function(){var e=this.option;return z(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),NF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Ur(t,e.parsedVisual,r),i?r:qr(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return qr(Ur(e,this.option.parsedVisual),`rgba`)},category:NF,piecewise:function(e,t){var n=IF.call(this,t);return n??=qr(Ur(e,this.option.parsedVisual),`rgba`),n},fixed:PF}},colorHue:AF(function(e,t){return Gr(e,t)}),colorSaturation:AF(function(e,t){return Gr(e,null,t)}),colorLightness:AF(function(e,t){return Gr(e,null,null,t)}),colorAlpha:AF(function(e,t){return Kr(e,t)}),decal:{applyVisual:MF(`decal`),_normalizedToVisual:{linear:null,category:NF,piecewise:null,fixed:null}},opacity:{applyVisual:MF(`opacity`),_normalizedToVisual:FF([0,1])},liftZ:{applyVisual:MF(`liftZ`),_normalizedToVisual:{linear:PF,category:PF,piecewise:PF,fixed:PF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:jF,category:NF,piecewise:function(e,t){var n=IF.call(this,t);return n??=jF.call(this,e),n},fixed:PF}},symbolSize:{applyVisual:MF(`symbolSize`),_normalizedToVisual:FF([0,1])}},e}();function DF(e){var t=e.pieceList;e.hasSpecialVisual=!1,F(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function OF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(CF(t,function(e,t){n[e]=t}),!B(r)){var i=[];U(r)?CF(r,function(e,t){var r=n[t];i[r??TF]=e}):i[TF]=r,r=LF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function kF(e,t){var n=e.visual,r=[];U(n)?CF(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),LF(e,r)}function AF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:FF([0,1])}}function jF(e){var t=this.option.visual;return t[Math.round(_s(e,[0,1],[0,t.length-1],!0))]||{}}function MF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function NF(e){var t=this.option.visual;return t[this.option.loop&&e!==TF?e%t.length:e]}function PF(){return this.option.visual[0]}function FF(e){return{linear:function(t){return _s(t,e,this.option.visual,!0)},category:NF,piecewise:function(t,n){var r=IF.call(this,n);return r??=_s(t,e,this.option.visual,!0),r},fixed:PF}}function IF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[EF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function LF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return zr(e)||[0,0,0,1]})),t}var RF={linear:function(e){return _s(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=EF.findPieceIndex(e,t,!0);if(n!=null)return _s(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??TF},fixed:Ae};function zF(e,t,n){return e?t<=n:t<n}var BF=`itemStyle`,VF=yc(),HF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||UF(t,{},e.getViewRoot().getAncestors(),e)}};function UF(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(a&&!a.invisible&&a.isInView){var s=i.getModel(BF),c=WF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=GF(c),u=KF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=GF(c),l.fill=f;else{var m=JF(e,i,a,s,c,p);F(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&UF(e,XF(i,c,e,t,m,r),n,r)})}}}function WF(e,t,n){var r=k({},t),i=n.designatedVisualItemStyle;return F([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function GF(e){var t=qF(e,`color`);if(t){var n=qF(e,`colorAlpha`),r=qF(e,`colorSaturation`);return r&&(t=Gr(t,null,null,r)),n&&(t=Kr(t,n)),t}}function KF(e,t){return t==null?null:Gr(t,null,null,e)}function qF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function JF(e,t,n,r,i,a){if(a&&a.length){var o=YF(t,`color`)||i.color!=null&&i.color!==`none`&&(YF(t,`colorAlpha`)||YF(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new EF(d);return VF(f).drColorMappingBy=u,f}}}function YF(e,t){var n=e.get(t);return B(n)&&n.length?{name:t,range:n}:null}function XF(e,t,n,r,i,a){var o=k({},t);if(i){var s=i.type,c=s===`color`&&VF(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function ZF(e){e.registerSeriesModel(AP),e.registerChartView(yF),e.registerVisual(HF),e.registerLayout(JP),OP(e)}function QF(e){return`_EC_`+e}var $F=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[QF(e)]){var r=new eI(e,t);return r.hostGraph=this,this.nodes.push(r),n[QF(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[QF(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(oe(e)&&(e=this.nodes[e]),oe(t)&&(t=this.nodes[t]),e instanceof eI||(e=r[QF(e)]),t instanceof eI||(t=r[QF(t)]),e&&t){var a=e.id+`-`+t.id,o=new tI(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof eI&&(e=e.id),t instanceof eI&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof eI||(t=this._nodesMap[QF(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(r,t,null))for(var o=[t];o.length;)for(var s=o.shift(),c=s[i],a=0;a<c.length;a++){var l=c[a],u=l.node1===s?l.node2:l.node1;if(!u.__visited){if(e.call(r,u,s))return;o.push(u),u.__visited=!0}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),eI=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??``,this.dataIndex=t??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=G(),t=G(),n=0,r=this.edges.length;n<r;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var c=a[s];s++,t.set(c.dataIndex,!0);for(var l=c.inEdges,u=0,d=l.length,f=void 0,p=void 0;u<d;u++)f=l[u],p=f.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s<o.length;){var m=o[s];s++,t.set(m.dataIndex,!0);for(var h=m.outEdges,u=0,g=h.length,_=void 0,v=void 0;u<g;u++)_=h[u],v=_.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),tI=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=G(),t=G();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var a=n[i];i++,t.set(a.dataIndex,!0);for(var o=a.inEdges,s=0,c=o.length,l=void 0,u=void 0;s<c;s++)l=a.inEdges[s],u=l.dataIndex,u>=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i<r.length;){var d=r[i];i++,t.set(d.dataIndex,!0);for(var f=d.outEdges,s=0,c=f.length,p=void 0,m=void 0;s<c;s++)p=d.outEdges[s],m=p.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function nI(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}N(eI,nI(`hostGraph`,`data`)),N(tI,nI(`hostGraph`,`edgeData`));function rI(e,t,n,r,i){for(var a=new $F(r),o=0;o<e.length;o++)a.addNode(pe(e[o].id,e[o].name,o),o);for(var s=[],c=[],l=0,o=0;o<t.length;o++){var u=t[o],d=u.source,f=u.target;a.addEdge(d,f,l)&&(c.push(u),s.push(pe(pc(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=bh(e,n);else{var h=nh.get(p),g=h&&h.dimensions||[];M(g,`value`)<0&&g.concat([`value`]);var _=Zm(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Xm(_,n),m.initData(e)}var v=new Xm([`value`],n);return v.initData(c,s),i&&i(m,v),dP({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var iI=vd.prototype,aI=Sd.prototype,oI=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(oI);function sI(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var cI=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new oI},t.prototype.buildPath=function(e,t){sI(t)?iI.buildPath.call(this,e,t):aI.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return sI(this.shape)?iI.pointAt.call(this,e):aI.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=sI(t)?[t.x2-t.x1,t.y2-t.y1]:aI.tangentAt.call(this,e);return Ct(n,n)},t}(wo),lI=[`fromSymbol`,`toSymbol`];function uI(e){return`_`+e+`Type`}function dI(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=Iv(i),l=Lv(o||0,c);return r+c+l+(a||``)+(s||``)}function fI(e,t,n){var r=t.getItemVisual(n,e);if(r&&r!==`none`){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=Iv(i),l=Lv(o||0,c),u=Fv(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:a*Math.PI/180||0,u.name=e,u}}function pI(e){var t=new cI({name:`line`,subPixelOptimize:!0});return mI(t.shape,e),t}function mI(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var hI=function(e){i(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=pI(i);o.shape.percent=0,Wd(o,{z2:W(a,0),shape:{percent:1}},r,t),this.add(o),F(lI,function(n){var r=fI(n,e,t);this.add(r),this[uI(n)]=dI(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};mI(o.shape,a),Ud(i,o,r,t),F(lI,function(n){var r=dI(n,e,t),i=uI(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=fI(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Yf(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,F(lI,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<hl.length;n++){var r=hl[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);Jf(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Y.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?Ss(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);B(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),su(this,u,d,l)},t.prototype.highlight=function(){Hl(this)},t.prototype.downplay=function(){Ul(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);mI(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=yt([],l,c);Ct(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Bu),gI=function(){function e(e){this.group=new Bu,this._LineCtor=e||hI}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=vI(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vI(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!_I(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(bI(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){Mf(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(bI(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);bI(t.getItemLayout(r))?(a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)):this.group.remove(a)},e}();function _I(e){return e.animators&&e.animators.length>0}function vI(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Yf(t)}}function yI(e){return isNaN(e[0])||isNaN(e[1])}function bI(e){return e&&!yI(e[0])&&!yI(e[1])}var xI=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),SI=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new xI},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(wo);function CI(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:J(n[0],t.getWidth()),cy:J(n[1],t.getHeight()),r:J(e.get(`radius`),a/2)}}function wI(e,t){var n=e==null?``:e+``;return t&&(H(t)?n=t.replace(`{value}`,n):V(t)&&(n=t(e))),n}var TI=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=CI(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?Tw:sd,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Za(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v<r.length;v++){var y=Math.min(Math.max(r[v][0],0),1);c=s+h*y;var b=new u({shape:{startAngle:g,endAngle:c,cx:i.cx,cy:i.cy,clockwise:o,r0:i.r-p,r:i.r},silent:!0});b.setStyle({fill:r[v][1]}),b.setStyle(f.getLineStyle([`color`,`width`])),_.push(b),g=c}_.reverse(),F(_,function(e){return a.add(e)});var x=function(e){if(e<=0)return r[0][1];for(var t=0;t<r.length;t++)if(r[t][0]>=e&&(t===0?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,i,s,c,o,p),this._renderTitleAndDetail(e,t,n,x,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,x,i,s,c,o,p)},t.prototype._renderTicks=function(e,t,n,r,i,a,o,s,c){for(var l=this.group,u=i.cx,d=i.cy,f=i.r,p=+e.get(`min`),m=+e.get(`max`),h=e.getModel(`splitLine`),g=e.getModel(`axisTick`),_=e.getModel(`axisLabel`),v=e.get(`splitNumber`),y=g.get(`splitNumber`),b=J(h.get(`length`),f),x=J(g.get(`length`),f),S=a,C=(o-a)/v,w=C/y,T=h.getModel(`lineStyle`).getLineStyle(),E=g.getModel(`lineStyle`).getLineStyle(),D=h.get(`distance`),O,k,A=0;A<=v;A++){if(O=Math.cos(S),k=Math.sin(S),h.get(`show`)){var j=D?D+c:c,M=new vd({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-b-j)+u,y2:k*(f-b-j)+d},style:T,silent:!0});T.stroke===`auto`&&M.setStyle({stroke:r(A/v)}),l.add(M)}if(_.get(`show`)){var j=_.get(`distance`)+D,ee=wI(Ss(A*(m-p)/v+p,14),_.get(`formatter`)),N=r(A/v),P=O*(f-b-j)+u,F=k*(f-b-j)+d,I=_.get(`rotate`),te=0;I===`radial`?(te=-S+2*Math.PI,te>Math.PI/2&&(te+=Math.PI)):I===`tangential`?te=-S-Math.PI/2:oe(I)&&(te=I*Math.PI/180),te===0?l.add(new Uo({style:Xf(_,{text:ee,x:P,y:F,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:N}),silent:!0})):l.add(new Uo({style:Xf(_,{text:ee,x:P,y:F,verticalAlign:`middle`,align:`center`},{inheritColor:N}),silent:!0,originX:P,originY:F,rotation:te}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var L=0;L<=y;L++){O=Math.cos(S),k=Math.sin(S);var ne=new vd({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&ne.setStyle({stroke:r((A+L/y)/v)}),l.add(ne),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=J(r.get(`width`),i.r),o=J(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=J(c[0],i.r),u=J(c[1],i.r),d=r.get(`keepAspect`),f=s?Fv(s,l-a/2,u-o,a,o,null,d):new SI({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?Tw:sd,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=_s(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Wd(r,{rotation:-((isNaN(+n)?x[0]:_s(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Wd(i,{shape:{endAngle:_s(n,b,x,m.get(`clip`))}},e),l.add(i),Zc(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,Ud(s,{rotation:-((isNaN(+r)?x[0]:_s(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);Ud(v,{shape:{endAngle:_s(r,b,x,m.get(`clip`))}},e),l.add(v),Zc(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(_s(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof Ao){var d=c.style;c.useStyle(k({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,du(c,t),su(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,du(m,t),su(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=Fv(i,t.cx-r/2+J(a[0],t.r),t.cy-r/2+J(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new Bu,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Uo({silent:!0}),f[e]=new Uo({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new Bu,g=r(_s(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+J(v[0],i.r),b=i.cy+J(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Xf(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+J(C[0],i.r),T=i.cy+J(C[1],i.r),E=J(S.get(`width`),i.r),D=J(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Xf(S,{x:w,y:T,text:wI(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),op(x,{normal:S},a,function(e){return wI(e,k)}),p&&sp(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return wI(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(my),EI=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return sT(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Y.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Y.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Y.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Y.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Y.color.neutral00,borderWidth:0,borderColor:Y.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Y.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Y.color.transparent,borderWidth:0,borderColor:Y.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Y.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(bv);function DI(e){e.registerChartView(TI),e.registerSeriesModel(EI)}var OI=`funnel`,kI=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new cT(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return sT(this,{coordDimensions:[`value`],encodeDefaulter:ie(Dp,this)})},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+OI,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Y.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Y.color.primary}}},t}(bv),AI=[`itemStyle`,`opacity`],jI=function(e){i(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new hd,o=new Uo;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(AI);c??=1,n||Yd(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Wd(r,{style:{opacity:c}},i,t)):Ud(r,{style:{opacity:c},shape:{points:o.points}},i,t),du(r,a),this._updateLabel(e,t),su(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Jf(i,Yf(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new K(d[0][0],d[0][1]):null},Ud(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),NT(n,PT(o),{stroke:l})},t}(pd),MI=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=OI,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new jI(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Jd(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=OI,t}(my);function NI(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o<s;o++)i[o]=o;return V(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function PI(e){var t=e.hostModel,n=LI(t);e.each(function(t){var r=e.getItemModel(t),i=r.getModel(`label`).get(`position`),a=r.getModel(`labelLine`),o=e.getItemLayout(t),s=o.points,c=i===`inner`||i===`inside`||i===`center`||i===`insideLeft`||i===`insideRight`,l,u,d,f;if(c)i===`insideLeft`?(u=(s[0][0]+s[3][0])/2+5,d=(s[0][1]+s[3][1])/2,l=`left`):i===`insideRight`?(u=(s[1][0]+s[2][0])/2-5,d=(s[1][1]+s[2][1])/2,l=`right`):(u=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,d=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l=`center`),f=[[u,d],[u,d]];else{var p=void 0,m=void 0,h=void 0,g=void 0,_=a.get(`length`);H(i)&&(!n&&M([`top`,`bottom`],i)>-1&&(i=`left`),n&&M([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}var FI=Jc(OI,II);function II(e,t){e.eachSeriesByType(OI,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=l_(e,t),o=s_(e.getBoxLayoutParams(),a.refContainer),s=LI(e),c=o.width,l=o.height,u=NI(n,i),d=o.x,f=o.y,p=s?[J(e.get(`minSize`),l),J(e.get(`maxSize`),l)]:[J(e.get(`minSize`),c),J(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=_s(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i)}return[[t,a],[t,a+i]]}var o=_s(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;x<u.length;x++){var S=u[x],C=u[x+1],w=n.getItemModel(S);if(s){var T=w.get([`itemStyle`,`width`]);T==null?T=y:(T=J(T,c),i===`ascending`&&(T=-T));var E=b(S,d),D=b(C,d+T);d+=T+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}else{var O=w.get([`itemStyle`,`height`]);O==null?O=y:(O=J(O,l),i===`ascending`&&(O=-O));var E=b(S,f),D=b(C,f+O);f+=O+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}}PI(n)})}function LI(e){return e.get(`orient`)===`horizontal`}function RI(e){e.registerChartView(MI),e.registerSeriesModel(kI),e.registerLayout(FI),e.registerProcessor(oT(OI))}function zI(e,t,n,r,i,a){e||=0;var o=Os(n[1],-n[0]);if(i!=null&&(i=VI(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(Os(t[1],-t[0]));s=VI(s,[0,o]),i=a=VI(s,[i,a]),r=0}t[0]=VI(t[0],n),t[1]=VI(t[1],n);var c=BI(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=Os(u[0],l):u[1]=Os(u[1],-l),t[r]=VI(t[r],u);var d=BI(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=Os(t[r],c.sign*i)),d=BI(t,r),a!=null&&d.span>a&&(t[1-r]=Os(t[r],d.sign*a)),t}function BI(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function VI(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var HI=`sankey`,UI=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o<i.length;o++)i[o].depth!=null&&i[o].depth>=0&&(a[i[o].depth]=new yp(i[o],this,t));return rI(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return ev(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return ev(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+HI,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Y.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Y.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(bv),WI=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),GI=function(e){i(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new WI},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Hl(this)},t.prototype.downplay=function(){Ul(this)},t}(wo),KI=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=HI,t._mainGroup=new Bu,t}return t.prototype.init=function(e,t){this._controller=new rN(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),iP(e,n,this._controller,aP(i),null),r.eachEdge(function(t){var n=new GI,r=Xc(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),qI(n.style,u,t);var k=``+a.get(`value`),A=Yf(a,`edgeLabel`);Jf(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,me(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);du(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return qI(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var M=j.get(`focus`);su(n,M===`adjacency`?t.getAdjacentDataIndices():M===`trajectory`?t.getTrajectoryDataIndices():M,j.get(`blurScope`),j.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new Ro({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});Jf(f,Yf(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),du(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Xc(f).dataType=`node`;var p=u.get(`focus`);su(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(JI(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){VN(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=lP(e,t,n.x,n.y,n.width,n.height);VN(this.group,2,r,this._firstRender?null:e)},t.type=HI,t}(my);function qI(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);H(r)&&H(i)&&(e.fill=new Dd(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function JI(e,t,n){var r=new Ro({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Wd(r,{shape:{width:e.width+20}},t,n),r}var YI=Jc(HI,XI);function XI(e,t){e.eachSeriesByType(HI,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=l_(e,t).refContainer,a=s_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;QI(l),ZI(l,u,n,r,o,s,L(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function ZI(e,t,n,r,i,a,o,s,c){$I(e,t,n,i,a,s,c),iL(e,t,a,i,r,o,s),_L(e,s)}function QI(e){F(e,function(e){var t=hL(e.outEdges,mL),n=hL(e.inEdges,mL),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function $I(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<e.length;f++)c[f]=e[f].inEdges.length,c[f]===0&&l.push(e[f]);for(var p=-1;l.length;){for(var m=0;m<l.length;m++){var h=l[m],g=h.hostGraph.data.getRawDataItem(h.dataIndex),_=g.depth!=null&&g.depth>=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;v<h.outEdges.length;v++){var y=h.outEdges[v],b=M(t,y);s[b]=0;var x=y.node2,S=M(e,x);--c[S]===0&&M(u,x)<0&&u.push(x)}}++d,l=u,u=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw Error(`Sankey is a DAG, the original data has cycle!`);var C=p>d-1?p:d-1;o&&o!==`left`&&tL(e,o,a,C),rL(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function eL(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function tL(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var c=a[s];c.setLayout({skNodeHeight:o},!0);for(var l=0;l<c.inEdges.length;l++){var u=c.inEdges[l];M(i,u.node1)<0&&i.push(u.node1)}}a=i,i=[],++o}F(e,function(e){eL(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&nL(e,r)}function nL(e,t){F(e,function(e){!eL(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function rL(e,t,n){F(e,function(e){var r=e.getLayout().depth*t;n===`vertical`?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}function iL(e,t,n,r,i,a,o){var s=aL(e,o);oL(s,t,n,r,i,o),sL(s,i,n,r,o);for(var c=1;a>0;a--)c*=.99,cL(s,c,o),sL(s,i,n,r,o),gL(s,c,o),sL(s,i,n,r,o)}function aL(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Ac(e,function(e){return e.getLayout()[r]});return Cs(i.keys),F(i.keys,function(e){n.push(i.buckets.get(e))}),n}function oL(e,t,n,r,i,a){var o=1/0;F(e,function(e){var t=e.length,s=0;F(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c<o&&(o=c)}),F(e,function(e){F(e,function(e,t){var n=e.getLayout().value*o;a===`vertical`?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),F(t,function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)})}function sL(e,t,n,r,i){var a=i===`vertical`?`x`:`y`;F(e,function(e){e.sort(function(e,t){return e.getLayout()[a]-t.getLayout()[a]});for(var o,s,c,l=0,u=e.length,d=i===`vertical`?`dx`:`dy`,f=0;f<u;f++)s=e[f],c=l-s.getLayout()[a],c>0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function cL(e,t,n){F(e.slice().reverse(),function(e){F(e,function(e){if(e.outEdges.length){var r=hL(e.outEdges,lL,n)/hL(e.outEdges,mL);if(isNaN(r)){var i=e.outEdges.length;r=i?hL(e.outEdges,uL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-pL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-pL(e,n))*t;e.setLayout({y:o},!0)}}})})}function lL(e,t){return pL(e.node2,t)*e.getValue()}function uL(e,t){return pL(e.node2,t)}function dL(e,t){return pL(e.node1,t)*e.getValue()}function fL(e,t){return pL(e.node1,t)}function pL(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function mL(e){return e.getValue()}function hL(e,t,n){for(var r=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],n);isNaN(o)||(r+=o)}return r}function gL(e,t,n){F(e,function(e){F(e,function(e){if(e.inEdges.length){var r=hL(e.inEdges,dL,n)/hL(e.inEdges,mL);if(isNaN(r)){var i=e.inEdges.length;r=i?hL(e.inEdges,fL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-pL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-pL(e,n))*t;e.setLayout({y:o},!0)}}})})}function _L(e,t){var n=t===`vertical`?`x`:`y`;F(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),F(e,function(e){var t=0,n=0;F(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),F(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}var vL=Jc(HI,yL);function yL(e){e.eachSeriesByType(HI,function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var i=1/0,a=-1/0;F(n,function(e){var t=e.getLayout().value;t<i&&(i=t),t>a&&(a=t)}),F(n,function(t){var n=new EF({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&F(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function bL(e){e.registerChartView(KI),e.registerSeriesModel(UI),e.registerLayout(YI),e.registerVisual(vL),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:Qc,subType:HI,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),sP(e,Qc,HI)}var xL=256,SL=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=d.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p<f;++p){var m=e[p],h=m[0],g=m[1],_=m[2],v=r(_);d.globalAlpha=v,d.drawImage(o,h-l,g-l)}if(!u.width||!u.height)return u;for(var y=d.getImageData(0,0,u.width,u.height),b=y.data,x=0,S=b.length,C=this.minOpacity,w=this.maxOpacity-C;x<S;){var v=b[x+3]/256,T=Math.floor(v*(xL-1))*4;if(v>0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=d.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Y.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=/* @__PURE__ */ new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function CL(e,t,n){var r=e[1]-e[0];t=I(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r<i;r++){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}if(r===i)for(r=a-1;r>=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<i&&n[r]}}function wL(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}var TL=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):Ty(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(Ty(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Mf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=wy(a,`cartesian2d`),s=wy(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=cS(f).w+.5,l=cS(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Yf(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;E<r;E++){var D=void 0,O=h.getItemVisual(E,`style`);if(o){var k=h.get(T[0],E),A=h.get(T[1],E);if(isNaN(h.get(T[2],E))||isNaN(k)||isNaN(A)||k<u[0]||k>u[1]||A<d[0]||A>d[1])continue;var j=a.dataToPoint([k,A]);D=new Ro({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var M=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(fe(M.x))continue;D=new Ro({z2:1,shape:M,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var ee=a.dataToLayout([h.get(T[0],E)]),M=ee.contentRect||ee.rect;if(fe(M.x)||fe(M.y))continue;D=new Ro({z2:1,shape:M,style:O})}if(h.hasItemOption){var N=h.getItemModel(E),P=N.getModel(`emphasis`);g=P.getModel(`itemStyle`).getItemStyle(),_=N.getModel([`blur`,`itemStyle`]).getItemStyle(),v=N.getModel([`select`,`itemStyle`]).getItemStyle(),y=N.get([`itemStyle`,`borderRadius`]),S=P.get(`focus`),C=P.get(`blurScope`),w=P.get(`disabled`),b=Yf(N)}D.shape.r=y;var F=e.getRawValue(E),I=`-`;F&&F[2]!=null&&(I=F[2]+``),Jf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:I}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,su(D,S,C,w),D.incremental=Kc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new SL;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?wL(v,n.option.range):CL(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Ao({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(my),EL=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return bh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=nh.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Y.color.primary}}},t}(bv);function DL(e){e.registerChartView(TL),e.registerSeriesModel(EL)}var OL={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},kL=R(OL);te(Yn,function(e,t){return e[t]=1,e},{}),Yn.join(`, `);var AL=[``,`style`,`shape`,`extra`],jL=yc();function ML(e,t,n,r,i){var a=e+`Animation`,o=Vd(e,r,i)||{},s=jL(t).userDuring;return o.duration>0&&(o.during=s?z(HL,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),k(o,n[a]),o}function NL(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=jL(e),l=t.style;c.userDuring=t.during;var u={},d={};if(KL(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];WL(`shape`,h,f[m])}else WL(`shape`,t,d),WL(`extra`,t,d);if(!a&&s&&(GL(e,t,u),UL(`shape`,e,t,u),UL(`extra`,e,t,u),qL(e,t,l,u)),d.style=l,LL(e,d,o),zL(e,t),s){if(a){var g={};F(AL,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),k(e?g[e]:g,n.enterFrom))});var _=ML(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else RL(e,t,i||0,n,u)}PL(e,t),l?e.dirty():e.markRedraw()}function PL(e,t){for(var n=jL(e).leaveToProps,r=0;r<AL.length;r++){var i=AL[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=jL(e).leaveToProps={},i&&(n[i]=n[i]||{}),k(i?n[i]:n,a.leaveTo))}}function FL(e,t,n,r){if(e){var i=e.parent,a=jL(e).leaveToProps;if(a){var o=ML(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function IL(e){return e===`all`}function LL(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function RL(e,t,n,r,i){if(i){var a=ML(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function zL(e,t){ke(t,`silent`)&&(e.silent=t.silent),ke(t,`ignore`)&&(e.ignore=t.ignore),e instanceof ga&&ke(t,`invisible`)&&(e.invisible=t.invisible),e instanceof wo&&ke(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var BL={},VL={setTransform:function(e,t){return BL.el[e]=t,this},getTransform:function(e){return BL.el[e]},setShape:function(e,t){var n=BL.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=BL.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=BL.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=BL.el.style;if(t)return t[e]},setExtra:function(e,t){var n=BL.el.extra||(BL.el.extra={});return n[e]=t,this},getExtra:function(e){var t=BL.el.extra;if(t)return t[e]}};function HL(){var e=this,t=e.el;if(t){var n=jL(t).userDuring,r=e.userDuring;n===r?(BL.el=t,r(VL)):e.el=e.userDuring=null}}function UL(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c){if(!o&&(o=r[e]={}),IL(c))k(o,a);else for(var l=$s(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(IL(s)||M(s,e)>=0){!o&&(o=r[e]={});for(var p=R(a),u=0;u<p.length;u++){var d=p[u],f=a[d];JL(i[d],f)&&(o[d]=f)}}}}}function WL(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=R(r),o=0;o<a.length;o++){var s=a[o];i[s]=Ei(r[s])}}function GL(e,t,n){for(var r=t.transition,i=IL(r)?Yn:$s(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function KL(e,t,n){for(var r=0;r<kL.length;r++){var i=kL[r],a=OL[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<Yn.length;r++){var s=Yn[r];t[s]!=null&&(n[s]=t[s])}}function qL(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!IL(o)){var c=$s(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(IL(s)||IL(o)||M(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=R(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function JL(e,t){return P(e)?e!==t:e!=null&&isFinite(e)}var YL=yc(),XL=[`percent`,`easing`,`shape`,`style`,`extra`];function ZL(e){e.stopAnimation(`keyframe`),e.attr(YL(e))}function QL(e,t,n){if(n.isAnimationEnabled()&&t){if(B(t))F(t,function(t){QL(e,t,n)});else{var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Vd(`enter`,n,0);i=a&&a.duration}if(r&&i){var o=YL(e);F(AL,function(n){if(!n||e[n]){var a;r.sort(function(e,t){return e.percent-t.percent}),F(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=R(c);if(n||(l=L(l,function(e){return M(XL,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;F(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}}var $L=yc(),eR=D,tR=z,nR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`)o&&o.hide(),s&&s.hide();else{o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Bu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=ie(rR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}sR(o,t,!0),this._renderHandle(i)}}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&cS(r).w>o)return!0;if(a){var s=FM(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=$L(e).pointerEl=new Xd[i.type](eR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=$L(e).labelEl=new Uo(eR(t.label));e.add(i),aR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=$L(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=$L(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),aR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`)r&&n.remove(r),this._handle=null;else{var o;this._handle||(o=!0,r=this._handle=Sf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){dE(e.event)},onmousedown:tR(this._onHandleDragMove,this,0,0),drift:tR(this._onHandleDragMove,this),ondragend:tR(this._onHandleDragEnd,this)}),n.add(r)),sR(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Sw(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}}},e.prototype._moveHandleToValue=function(e,t){rR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,oR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(oR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(oR(r)),$L(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Cw(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function rR(e,t,n,r){iR($L(n).lastProp,r)||($L(n).lastProp=r,t?Ud(n,r,e):(n.stopAnimation(),n.attr(r)))}function iR(e,t){if(U(e)&&U(t)){var n=!0;return F(t,function(t,r){n&&=iR(e[r],t)}),!!n}return e===t}function aR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function oR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function sR(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function cR(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function lR(e,t,n,r,i){var a=dR(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=Wg(o.get(`padding`)||0),c=o.getFont(),l=dn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),uR(u,d,f,r);var h=o.get(`backgroundColor`);h&&h!==`auto`||(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Xf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function uR(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function dR(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Pb(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};F(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),H(o)?a=o.replace(`{value}`,a):V(o)&&(a=o(s))}return a}function fR(e,t,n){var r=ot();return dt(r,r,n.rotation),ut(r,r,n.position),hf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function pR(e,t,n,r,i,a){var o=rC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),lR(t,r,i,a,{position:fR(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function mR(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function hR(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function gR(e,t,n){return cS(e,{fromStat:{sers:I(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function _R(e,t,n){return[ss(os(t[0],t[1]),e-n/2),os(e+n/2,ss(t[0],t[1]))]}var vR=function(e){i(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=yR(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=cR(r),f=bR[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}pR(t,e,wC(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=wC(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=fR(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=yR(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=os(o[1],l[c]),l[c]=ss(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(nR);function yR(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var bR={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:mR([t,r[0]],[t,r[1]],xR(e))}},shadow:function(e,t,n,r,i,a){var o=gR(e,i,a),s=r[1]-r[0],c=_R(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:hR([l,r[0]],[u-l,s],xR(e))}}};function xR(e){return e.dim===`x`?0:1}var SR=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Y.color.border,width:1,type:`dashed`},shadowStyle:{color:Y.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Y.color.neutral00,padding:[5,7,5,7],backgroundColor:Y.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Y.color.accent40,throttle:40}},t}(__),CR=yc(),wR=F;function TR(e,t,n){if(!Ne.node){var r=t.getZr();CR(r).records||(CR(r).records={}),ER(r,t);var i=CR(r).records[e]||(CR(r).records[e]={});i.handler=n}}function ER(e,t){if(CR(e).initialized)return;CR(e).initialized=!0,n(`click`,ie(kR,`click`)),n(`mousemove`,ie(kR,`mousemove`)),n(`mousewheel`,ie(kR,`mousewheel`)),n(`globalout`,OR);function n(n,r){e.on(n,function(n){var i=AR(t);wR(CR(e).records,function(e){e&&r(e,n,i.dispatchAction)}),DR(i.pendings,t)})}}function DR(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function OR(e,t,n){e.handler(`leave`,null,n)}function kR(e,t,n,r){t.handler(e,n,r)}function AR(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function jR(e,t){if(!Ne.node){var n=t.getZr();(CR(n).records||{})[e]&&(CR(n).records[e]=null)}}var MR=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;TR(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){jR(`axisPointer`,t)},t.prototype.dispose=function(e,t){jR(`axisPointer`,t)},t.type=`axisPointer`,t}(_O);function NR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=vc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(I(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var PR=yc();function FR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||z(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){GR(i)&&(i=NR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=GR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||GR(i),f={},p={},m={list:[],map:{}},h={showPointer:ie(RR,p),showTooltip:ie(zR,m)};F(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);F(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=UR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&IR(e,o,h,!1,f)}})});var g={};return F(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&F(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,WR(t),WR(e)))),g[e.key]=a}})}),F(g,function(e,t){IR(u[t],e,h,!0,f)}),BR(p,u,f),VR(m,i,e,o),HR(u,o,n),f}}function IR(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries)n.showPointer(e,t);else{var o=LR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&k(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}}function LR(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return F(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Us(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),F(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function RR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function zR(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=RM(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function BR(e,t,n){var r=n.axesInfo=[];F(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function VR(e,t,n,r){if(GR(t)||!e.list.length)r({type:`hideTip`});else{var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}}function HR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=PR(r)[i]||{},o=PR(r)[i]={};F(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&F(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}F(a,function(e,t){!o[t]&&c.push(l(e))}),F(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function UR(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function WR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function GR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function KR(e){BM.registerAxisPointerClass(`CartesianAxisPointer`,vR),e.registerComponentModel(SR),e.registerComponentView(MR),e.registerPreprocessor(function(e){if(e){e.axisPointer&&e.axisPointer.length!==0||(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=OM(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},FR)}function qR(e){Rj(ZM),Rj(KR)}var JR=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=m_(t);e.prototype.init.apply(this,arguments),YR(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),YR(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Y.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Y.color.neutral00,borderWidth:1,borderColor:Y.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Y.size.s,color:Y.color.secondary},monthLabel:{show:!0,position:`start`,margin:Y.size.s,align:`center`,formatter:null,color:Y.color.secondary},yearLabel:{show:!0,position:null,margin:Y.size.xl,formatter:null,color:Y.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(__);function YR(e,t){var n=e.cellSize,r=B(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),p_(e,t,{type:`box`,ignoreSize:I([0,1],function(e){return d_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var XR=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new Ro({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new hd({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return H(e)&&e?Yg(e,t):V(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new Uo({z2:30,style:Xf(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||H(a))&&(a&&(t=Qh(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m<l[u].length-1;m++){var h=l[u][m].slice(),g=this._firstDayOfMonth[m];f&&(h[d]=(this._firstDayPoints[m][d]+l[0][m+1][d])/2);var _=i.get(`formatter`),v=a[g.m-1],y={yyyy:g.y,yy:(g.y+``).slice(2),MM:g.m,M:+g.m,nameMap:v},b=new Uo({z2:30,style:k(Xf(i,{text:this._formatterLabel(_,y)}),this._monthTextPositionControl(h,f,n,s,o)),silent:p});r.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,i){var a=`center`,o=`middle`,s=e[0],c=e[1],l=n===`start`;return t===`horizontal`?(s=s+r+(l?1:-1)*i[0]/2,a=l?`right`:`left`):(c=c+r+(l?1:-1)*i[1]/2,o=l?`bottom`:`top`),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderWeekText=function(e,t,n,r,i){var a=e.getModel(`dayLabel`);if(a.get(`show`)){var o=e.coordinateSystem,s=a.get(`position`),c=a.get(`nameMap`),l=a.get(`margin`),u=o.getFirstDayOfWeek();(!c||H(c))&&(c&&(t=Qh(c)||t),c=t.get([`time`,`dayOfWeekShort`])||I(t.get([`time`,`dayOfWeekAbbr`]),function(e){return e[0]}));var d=o.getNextNDay(n.end.time,7-n.lweek).time,f=[o.getCellWidth(),o.getCellHeight()];l=J(l,Math.min(f[1],f[0])),s===`start`&&(d=o.getNextNDay(n.start.time,-(7+n.fweek)).time,l=-l);for(var p=a.get(`silent`),m=0;m<7;m++){var h=o.getNextNDay(d,m),g=o.dataToCalendarLayout([h.time],!1).center,_=m;_=Math.abs((m+u)%7);var v=new Uo({z2:30,style:k(Xf(a,{text:c[_]}),this._weekTextPositionControl(g,r,s,l,f)),silent:p});i.add(v)}}},t.type=`calendar`,t}(_O),ZR=864e5,QR=function(){function e(t,n,r){this.type=`calendar`,this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(n,r)}return e.getDimensionsInfo=function(){return[{name:`time`,type:`time`},`value`]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){e=Ns(e);var t=e.getFullYear(),n=e.getMonth()+1,r=n<10?`0`+n:``+n,i=e.getDate(),a=i<10?`0`+i:``+i,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+``,m:r,d:a,day:o,time:e.getTime(),formatedDate:t+`-`+r+`-`+a,date:e}},e.prototype.getNextNDay=function(e,t){return t||=0,t===0||(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t)),this.getDateInfo(e)},e.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel(`dayLabel`).get(`firstDay`),this._orient=this._model.get(`orient`),this._lineWidth=this._model.getModel(`itemStyle`).getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=[`width`,`height`],i=this._model.getCellSize().slice(),a=this._model.getBoxLayoutParams(),o=this._orient===`horizontal`?[n,7]:[7,n];F([0,1],function(e){l(i,e)&&(a[r[e]]=i[e]*o[e])});var s={width:t.getWidth(),height:t.getHeight()},c=this._rect=s_(a,s);F([0,1],function(e){l(i,e)||(i[e]=c[r[e]]/o[e])});function l(e,t){return e[t]!=null&&e[t]!==`auto`}this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t,n){n||=[],B(e)&&(e=e[0]),t??=!0;var r=this.getDateInfo(e),i=this._rangeInfo,a=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+ZR))return n[0]=n[1]=NaN,n;var o=r.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient===`vertical`?(n[0]=this._rect.x+o*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+o*this._sh+this._sh/2),n},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToLayout=function(e,t,n){n||={};var r=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},a=this.dataToPoint(e,t);return r.x=a[0]-this._sw/2,r.y=a[1]-this._sh/2,r.width=this._sw,r.height=this._sh,q.copy(i,r),Df(i,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient===`vertical`?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=$R(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=$R(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=$R(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn(`Not implemented.`),!1},e.prototype._initRangeOption=function(){var e=this._model.get(`range`),t;if(B(e)&&e.length===1&&(e=e[0]),B(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+`-01-01`,n+`-12-31`]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),i=r.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[r.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/ZR)-Math.floor(t[0].time/ZR)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){ch({targetModel:t,coordSysType:`calendar`,coordSysProvider:lh})}),r},e.dimensions=[`time`,`value`],e}();function $R(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function ez(e){e.registerComponentModel(JR),e.registerComponentView(XR),e.registerCoordinateSystem(`calendar`,QR)}function tz(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function nz(e,t){var n;return F(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function rz(e,t,n){var r=k({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(O(i,r,!0),p_(i,r,{ignoreSize:!0}),h_(n,i),oz(n,i),oz(n,i,`shape`),oz(n,i,`style`),oz(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var iz=[`transition`,`enterFrom`,`leaveTo`],az=iz.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function oz(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?iz:az,i=0;i<r.length;i++){var a=r[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function sz(e,t){if(e&&(e.hv=t.hv=[nz(t,[`left`,`right`]),nz(t,[`top`,`bottom`])],e.type===`group`)){var n=e,r=t;n.width??=r.width=0,n.height??=r.height=0}}var cz=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,a=[];this._flatten(r,a,null);var o=ic(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];F(o,function(e,t){var n=e.newOption;n&&(s.push(n),tz(e,n),rz(i,t,n),sz(i[t],n))},this),n.elements=L(i,function(e){return e&&delete e.$action,e!=null})},t.prototype._flatten=function(e,t,n){F(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type=`graphic`,t.defaultOption={elements:[]},t}(__),lz={path:null,compoundPath:null,group:Bu,image:Ao,text:Uo},uz=yc(),dz=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this._elMap=G()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,i=e.get(`z`),a=e.get(`zlevel`);F(t,function(t){var o=pc(t.id,null),s=o==null?null:n.get(o),c=pc(t.parentId,null),l=c==null?r:n.get(c),u=t.type,d=t.style;u===`text`&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var f=t.textContent,p=t.textConfig;if(d&&Ey(d,u,!!p,!!f)){var m=Dy(d,u,!0);!p&&m.textConfig&&(p=t.textConfig=m.textConfig),!f&&m.textContent&&(f=m.textContent)}var h=gz(t),g=t.$action||`merge`,_=g===`merge`,v=g===`replace`;if(_){var y=!s,b=s;y?b=pz(o,l,t.type,n):(b&&(uz(b).isNew=!1),ZL(b)),b&&(NL(b,h,e,{isInit:y}),hz(b,t,i,a))}else if(v){mz(s,t,n,e);var x=pz(o,l,t.type,n);x&&(NL(x,h,e,{isInit:!0}),hz(x,t,i,a))}else g===`remove`&&(PL(s,t),mz(s,t,n,e));var S=n.get(o);if(S&&f){if(_){var C=S.getTextContent();C?C.attr(f):S.setTextContent(new Uo(f))}else v&&S.setTextContent(new Uo(f))}if(S){var w=t.clipPath;if(w){var T=w.type,E=void 0,y=!1;if(_){var D=S.getClipPath();y=!D||uz(D).type!==T,E=y?fz(T):D}else v&&(y=!0,E=fz(T));S.setClipPath(E),NL(E,w,e,{isInit:y}),QL(E,w.keyframeAnimation,e)}var O=uz(S);S.setTextConfig(p),O.option=t,_z(S,e,t),Af({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),QL(S,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,i=this._elMap,a=t.getWidth(),o=t.getHeight(),s=[`x`,`y`],c=0;c<n.length;c++){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d&&d.isGroup){var f=d.parent,p=f===r,m=uz(d),h=uz(f);m.width=J(m.option.width,p?a:h.width)||0,m.height=J(m.option.height,p?o:h.height)||0}}for(var c=n.length-1;c>=0;c--){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=uz(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=u_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!uz(d).isNew&&v){for(var y=l.transition,b={},x=0;x<s.length;x++){var S=s[x],C=_[S];y&&(IL(y)||M(y,S)>=0)?b[S]=C:d[S]=C}Ud(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){mz(n,uz(n).option,t,e._lastGraphicModel)}),this._elMap=G()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(_O);function fz(e){var t=new(ke(lz,e)?lz[e]:af(e))({});return uz(t).type=e,t}function pz(e,t,n,r){var i=fz(n);return t.add(i),r.set(e,i),uz(i).id=e,uz(i).isNew=!0,i}function mz(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){mz(e,t,n,r)}),FL(e,t,r),n.removeKey(uz(e).id))}function hz(e,t,n,r){e.isGroup||F([[`cursor`,ga.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];ke(t,r)?e[r]=W(t[r],n[1]):e[r]??(e[r]=n[1])}),F(R(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=V(r)?r:null}}),ke(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function gz(e){return e=k({},e),F([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(e_),function(t){delete e[t]}),e}function _z(e,t,n){var r=Xc(e).eventData;e.silent||e.ignore||r||(r=Xc(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function vz(e){e.registerComponentModel(cz),e.registerComponentView(dz),e.registerPreprocessor(function(e){var t=e.graphic;B(t)?e.graphic=!t[0]||!t[0].elements?[{elements:t}]:[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var yz=[`x`,`y`,`radius`,`angle`,`single`],bz=yc(),xz=[`cartesian2d`,`polar`,`singleAxis`];function Sz(e){return M(xz,e.get(`coordinateSystem`))>=0}function Cz(e){return e+`Axis`}function wz(e,t){var n=G(),r=[],i=G();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function Tz(e){var t=e.ecModel,n={infoList:[],infoMap:G()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(Cz(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function Ez(e){var t=bz(zx(e));return t.axisProxyMap||=G()}function Dz(e){if(e)return Ez(e.ecModel).get(e.uid)}function Oz(e,t){Ez(e.ecModel).set(e.uid,t)}function kz(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?Dz(n.model):null}var Az=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),jz=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=Mz(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Mz(e);O(this.option,e,!0),O(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;F([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=G();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return F(yz,function(n){var r=this.getReferringComponents(Cz(n),wc);if(r.specified){t=!0;var i=new Az;F(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new Az;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Cc).models[0];o&&F(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Cc).models[0]&&a.add(e.componentIndex)})}}}r&&F(yz,function(t){if(r){var i=n.findComponents({mainType:Cz(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new Az;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);F([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(Cz(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){F(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return Dz(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(Cz(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;F([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;F([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return Dz(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],a=this._targetAxisInfoMap.get(i),o=0;o<a.indexList.length;o++){var s=this.getAxisProxy(i,a.indexList[o]);if(s.hostedBy(this))return s;t||=s}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type=`dataZoom`,t.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],t.defaultOption={z:4,filterMode:`filter`,start:0,end:100},t}(__);function Mz(e){var t={};return F([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Nz=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type=`dataZoom`,t}(_O),Pz=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getWindow=function(){return D(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Sz(t)){var n=Cz(this._dimName),r=t.getReferringComponents(n,Cc).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)},e.prototype.getMinMaxSpan=function(){return D(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t=this._extent,n=this.getAxisModel().axis,r=n.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],c,l=[!1,!1];F([`start`,`end`],function(n,u){var d=e[n],f=e[n+`Value`];i[u]===`percent`?(d??=a[u],f=_s(d,a,t),l[u]=!0):(c=!0,f==null?f=t[u]:(f=r.parse(f),r.sanitize&&(f=r.sanitize(f,t))),d=_s(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),Cs(s),Cs(o);var u=this._minMaxSpan;c?d(s,o,t,a,!1):d(o,s,a,t,!0);function d(e,t,n,r,i){var a=i?`Span`:`ValueSpan`;zI(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(var o=0;o<2;o++)t[o]=_s(e[o],n,r,!0),i&&(t[o]=t[o],l[o]=!0);Bc(t)}var f=Jy(r)||Ky(r),p=n.getExtent(),m=cs(p[1]-p[0]),h=f?0:Es(s,m,.5);F([[0,ds],[1,us]],function(e){var n=e[0],r=e[1];l[n]&&isFinite(h)&&(s[n]=Ss(s[n],h),s[n]=os(t[1],ss(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],f&&(s[n]=r(s[n]))))}),Bc(s);var g=[_s(s[0],t,a,!0),_s(s[1],t,a,!0)];return Bc(g),{value:s,percent:o,percentInverted:g,valuePrecision:h}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;RC(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=j({start:t[0],end:t[1]},i));var a=this._window=this.calculateDataWindow(i),o=a.percent,s=a.value;o[0]!==0&&r.setZoomMM(0,s[0]),o[1]!==100&&r.setZoomMM(1,s[1])}},e.prototype.filterData=function(e,t){if(!this.hostedBy(e))return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._window.value;if(i===`none`)return;F(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var s=t.getStore(),c=I(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,o=0;o<r.length;o++){var l=s.get(c[o],e),u=!isNaN(l),d=l<a[0],f=l>a[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else F(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});F(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;F([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=_s(i,[0,100],n,!0)-n[0]):i=_s(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),Fz={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(Cz(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!Dz(i)){var o=new Pz(t,r,a,e);n.push(o),Oz(i,o)}});var r=G();return F(n,function(e){F(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=kz(e,i);a?n.push([i,a]):i.reset(e,null)}),F(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function Iz(e){e.registerAction(`dataZoom`,function(e,t){F(wz(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Lz=Vc();function Rz(e){Lz(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Fz),Iz(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function zz(e,t){var n=Wg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Ro({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Bz=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Y.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Y.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Y.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Y.color.tertiary,fontSize:14}},t}(__);function Vz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Hz(e){if(Ne.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var Uz=Hz([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Wz=Hz([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function Gz(e,t){if(!e)return t;t=Ug(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function Kz(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var qz=Gz(Wz,`transition`),Jz=Gz(Uz,`transform`),Yz=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Ne.transform3dSupported?`will-change:transform;`:``);function Xz(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function Zz(e,t,n){if(!H(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=Zg(t);var a=Xz(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=Jz+`:`,l;M([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function Qz(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Ne.transformSupported?``+Jz+i:`,left`+i+`,top`+i)),qz+`:`+a}function $z(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ne.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ne.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Jz+`:`+o+`;`:[[`top`,0],[`left`,0],[Uz,o]]}function eB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=W(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),F([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function tB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=mv(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(Qz(a,n,r)),o&&i.push(`background-color:`+o),F([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Ug(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(eB(d)),f!=null&&i.push(`padding:`+Wg(f).join(`px `)+`px`),i.join(`;`)+`;`}function nB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Nh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var rB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ne.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(H(i)?document.querySelector(i):le(i)?i:V(i)&&i(e.getDom()));nB(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;sE(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Kz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Yz+tB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+$z(i[0],i[1],!0)+(`border-color:`+Zg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null)a.innerHTML=``;else{var o=``;if(H(i)&&n.get(`trigger`)===`item`&&!Vz(n)&&(o=Zz(n,r,i)),H(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s<e.length;s++)le(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(nB(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;F($z(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,Ne.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(z(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Ph(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),iB=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),sB(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;U(e)&&Ys(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Uo({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:mv(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),F([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),F([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=oB(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;sB(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=aB(i.borderWidth||0),o=oB(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(z(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function aB(e){return Math.max(0,e)}function oB(e){var t=aB(e.shadowBlur||0),n=aB(e.shadowOffsetX||0),r=aB(e.shadowOffsetY||0);return{left:aB(t-n),right:aB(t+n),top:aB(t-r),bottom:aB(t+r)}}function sB(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var cB=new Ro({shape:{x:-1,y:-1,width:2,height:2}}),lB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!Ne.node&&t.getDom()){var n=e.getComponent(`tooltip`),r=this._renderMode=kc(n.get(`renderMode`));this._tooltipContent=r===`richText`?new iB(t):new rB(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!Ne.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?Sw(this,`_updatePosition`,50,`fixRate`):Cw(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);TR(`itemTooltip`,this._api,z(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ne.node&&n.getDom()){var i=dB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=gB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=cB;c.x=r.x,c.y=r.y,c.update(),Xc(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=NR(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(dB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&uB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Xc(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;nk(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Xc(e).dataIndex==null?Xc(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=z(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=uB([t.tooltipOption],r),o=this._renderMode,s=[],c=ev(`section`,{blocks:[],noHeader:!0}),l=[],u=new hv;F(e,function(e){F(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=dR(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=ev(`section`,{header:f,noHeader:!ve(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),F(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Pb(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,Zg(m.color),o);var h=O_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=uB([a],r).get(`valueFormatter`);p.blocks.push(_?k({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ov(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
15
15
 
16
- `:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=J(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=lB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new mv;h.marker=g.makeTooltipMarker(`item`,Xg(h.color),d);var _=D_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?av(y?O({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=J(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(B(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=E(a),a.content=Bh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=lB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new mv;this._showOrMove(d,function(){var n=E(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(B(u)){var p=e.ecModel.get(`useUTC`),m=R(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Cg(m.axisValue,d,p)),d=qg(d,n,!0)}else if(z(u)){var g=L(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||R(t))return{color:r||i};if(!R(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),z(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),R(t))n=q(t[0],s),r=q(t[1],c);else if(V(t)){var p=t;p.width=l[0],p.height=l[1];var m=o_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(B(t)&&o){var h=pB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=dB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=mB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=mB(d)?l[1]/2:d===`bottom`?l[1]:0),Bz(e)){var h=fB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&N(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&N(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&N(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&N(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Ne.node&&t.getDom()&&(Sw(this,`_updatePosition`),this._tooltipContent.dispose(),AR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(gO);function lB(e,t,n){var r=t.ecModel,i;n?(i=new vp(n,r,r),i=new vp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof vp&&(o=o.get(`tooltip`,!0)),B(o)&&(o={formatter:o}),o&&(i=new vp(o,i,r)))}return i}function uB(e,t){return e.dispatchAction||L(t.dispatchAction,t)}function dB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function fB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function pB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function mB(e){return e===`center`||e===`middle`}function hB(e,t,n){var r=Sc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Tc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=J(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function gB(e){Lj(GR),e.registerComponentModel(zz),e.registerComponentView(cB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ae),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ae)}var _B=N;function vB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function yB(e,t,n){var r={};return _B(t,function(t){var a=r[t]=i();_B(e[t],function(e,r){if(TF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new TF(i),r===`opacity`&&(i=E(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new TF(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function bB(e,t,n){var r;N(n,function(e){t.hasOwnProperty(e)&&vB(t[e])&&(r=!0)}),r&&N(n,function(n){t.hasOwnProperty(n)&&vB(t[n])?e[n]=E(t[n]):delete e[n]})}function xB(e,t,n,r){var i={};return N(e,function(e){i[e]=TF.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return QO(a,l,e)}function c(e,t){ek(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var SB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Y.size.m,backgroundColor:Y.color.transparent,borderColor:Y.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Y.color.primary},subtextStyle:{fontSize:12,color:Y.color.quaternary}},t}(g_),CB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=H(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Uo({style:Yf(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Uo({style:Yf(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){Zg(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Zg(p,`_`+e.get(`subtarget`))}),J(c).eventData=J(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=o_(g,c_(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Ro({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(gO);function wB(e){e.registerComponentModel(SB),e.registerComponentView(CB)}function TB(e,t){if(!e)return!1;for(var n=R(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function EB(e){ec(e,`label`,[`show`])}var DB=yc(),OB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Ne.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=DB(e)[i];!n||!n.data?DB(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&EB(n),N(n.data,function(e){e instanceof Array?(EB(e[0]),EB(e[1])):EB(e)}),a=this.createMarkerModelFromSeries(n,this,t),O(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),DB(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return $_(`section`,{header:this.name,blocks:[$_(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=E_.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return DB(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(g_);te(OB,E_.prototype);function kB(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function AB(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function jB(e,t,n,r,i,a,o){var s=[],c=hh(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=RB(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=ws(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var MB={min:ae(jB,`min`),max:ae(jB,`max`),average:ae(jB,`average`),median:ae(jB,`median`)};function NB(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!AB(t)&&!R(t.coord)&&R(i)){var a=PB(t,n,r,e);if(t=E(t),t.type&&MB[t.type]&&a.baseAxis&&a.valueAxis){var o=j(i,a.baseAxis.dim),s=j(i,a.valueAxis.dim),c=MB[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!R(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&MB[t.type]){var u=r.getOtherAxis(l);u&&(t.value=RB(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)MB[d[f]]&&(d[f]=RB(n,n.mapDimension(i[f]),d[f]));return t}}function PB(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(FB(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function FB(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function IB(e,t){return e&&e.containData&&t.coord&&!kB(t)?e.containData(t.coord):!0}function LB(e,t){return e?function(e,n,r,i){return pm(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return pm(e.value,t[i])}}function RB(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var zB=yc(),BB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=U()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){zB(e).keep=!1}),t.eachSeries(function(e){var i=OB.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!zB(e).keep&&r.group.remove(e.group)}),VB(t,i,this.type)},t.prototype.markKeep=function(e){zB(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;N(e,function(e){var r=OB.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Ul(e):Wl(e))})})},t.type=`marker`,t}(gO);function VB(e,t,n){e.eachSeries(function(e){var r=OB.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=If(r),o=a.z,s=a.zlevel;Rf(i.group,o,s)}})}var HB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(OB),UB=yc(),WB=function(e,t,n,r){var i=e.getData(),a;if(R(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=me(r.yAxis,r.xAxis);else{var l=PB(r,i,t,e);s=l.valueAxis,c=RB(i,gh(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=E(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&se(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[NB(e,a[0]),NB(e,a[1]),O({},a[2])];return h[2].type=h[2].type||null,D(h[2],h[0]),D(h[2],h[1]),h};function GB(e){return!isNaN(e)&&!isFinite(e)}function KB(e,t,n,r){var i=1-e,a=r.dimensions[e];return GB(t[i])&&GB(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function qB(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(KB(1,n,r,e)||KB(0,n,r,e)))return!0}return IB(e,t[0])&&IB(e,t[1])}function JB(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=q(o.get(`x`),i.getWidth()),l=q(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(Cy(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;GB(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):GB(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var YB=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=OB.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=UB(t).from,a=UB(t).to;i.each(function(t){JB(i,t,!0,e,n),JB(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new hI);this.group.add(c.group);var l=XB(i,e,t),u=l.from,d=l.to,f=l.line;UB(t).from=u,UB(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);R(p)||(p=[p,p]),R(m)||(m=[m,m]),R(h)||(h=[h,h]),R(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:H(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){J(e).dataModel=t,e.traverse(function(e){J(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);JB(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=$O(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:H(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:H(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:H(a.get(`symbolSize`),m[+!i]),symbol:H(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(BB);function XB(e,t,n){var r=e?P(e&&e.dimensions,function(e){var n=t.getData();return O(O({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Ym(r,n),a=new Ym(r,n),o=new Ym([],n),s=P(n.get(`data`),ae(WB,t,e,n));e&&(s=F(s,ae(qB,e)));var c=LB(!!e,r);return i.initData(P(s,function(e){return e[0]}),null,c),a.initData(P(s,function(e){return e[1]}),null,c),o.initData(P(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function ZB(e){e.registerComponentModel(HB),e.registerComponentView(YB),e.registerPreprocessor(function(e){TB(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var QB=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},$B=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),R(t)&&N(t,function(e,r){B(e)&&(e={type:e}),t[r]=D(e,QB(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&mc(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=U(),a=P(r,function(e){return(B(e)||se(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new vp(e,this,this.ecModel))},this);this._data=F(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;N(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;N(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;N(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&j(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Y.size.m,align:`auto`,backgroundColor:Y.color.transparent,borderColor:Y.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Y.color.disabled,inactiveBorderColor:Y.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Y.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Y.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Y.color.tertiary,borderWidth:1,borderColor:Y.color.border},emphasis:{selectorLabel:{show:!0,color:Y.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(g_),eV=ae,tV=N,nV=zu,rV=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new nV),this.group.add(this._selectorGroup=new nV),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);i&&i!==`auto`||(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=c_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=o_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=o_(A({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Rz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=U(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),tV(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
17
- `)){var p=new nV;p.newline=!0,s.add(p)}else{var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,eV(oV,f,null,r,d)).on(`mouseover`,eV(sV,m.name,null,r,d)).on(`mouseout`,eV(cV,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=J(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=zr(h.fill);_&&_[3]===0&&(_[3]=.2,h=O(O({},h),{fill:qr(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,eV(oV,null,f,r,d)).on(`mouseover`,eV(sV,null,f,r,d)).on(`mouseout`,eV(cV,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=J(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};J(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();tV(e,function(e){var r=e.type,i=new Uo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),qf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),iu(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=iV(c,r,o,s,d,m,u),y=new nV,b=r.getModel(`textStyle`);if(z(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(aV({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;B(w)&&w?T=w.replace(`{name}`,t??``):z(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Uo({style:Yf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Ro({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&kf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),iu(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();n_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){n_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(gO);function iV(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),tV(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Zk(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function aV(e){var t=e.icon||`roundRect`,n=Pv(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Y.color.neutral00,n.style.lineWidth=2),n}function oV(e,t,n,r){cV(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),sV(e,t,n,r)}function sV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function cV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function lV(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),uV(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){N(i,function(t,n){e[t?`select`:`unSelect`](n)}),uV(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function uV(e,t){var n=t||{};return N(e.getData(),function(t){var r=t.get(`name`);if(r!==`
18
- `&&r!==``){var i=e.isSelected(r);n[r]=W(n,r)?n[r]&&i:i}}),n}function dV(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,ae(lV,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,ae(lV,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,ae(lV,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,ae(lV,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,ae(lV,`unSelect`))}var fV=Yc(pV);function pV(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function mV(e){e.registerComponentModel($B),e.registerComponentView(rV),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,fV),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),dV(e)}var hV=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=p_(t);e.prototype.init.call(this,t,n,r),gV(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),gV(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Eh($B.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Y.color.accent50,pageIconInactiveColor:Y.color.accent10,pageIconSize:15,pageTextStyle:{color:Y.color.tertiary},animationDurationUpdate:800}),t}($B);function gV(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,f_(t,n,{type:`box`,ignoreSize:!!i})}var _V=zu,vV=[`width`,`height`],yV=[`x`,`y`],bV=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new _V),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new _V)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=R(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Uo({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=xf(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:L(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=vV[s],l=yV[s],u=vV[1-s],d=yV[1-s];i&&n_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=E(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;n_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),n_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=H(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Ro({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Hd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;N([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,B(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=vV[i],o=yV[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(rV);function xV(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function SV(e){Lj(mV),e.registerComponentModel(hV),e.registerComponentView(bV),xV(e)}function CV(e){Lj(mV),Lj(SV)}var wV=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=Eh(Az.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Az),TV=yc();function EV(e,t,n){TV(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function DV(e,t){for(var n=TV(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||OV(n,o))}}}function OV(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function kV(e,t){var n={model:t,containsPoint:ae(jV,t),dispatchAction:ae(AV,e),dataZoomInfoMap:null,controller:null},r=n.controller=new nN(e.getZr());return N([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function AV(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function jV(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function MV(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:!t.get(`zoomLock`,!0)||`move`;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=H(t.get(`cursorGrab`,!0),s),c=H(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function NV(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=TV(t),r=n.coordSysRecordMap||=U();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){N(wz(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,kV(t,n.model));(a.dataZoomInfoMap||=U()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i)OV(r,e);else{var s=MV(a,e,t);n.enable(s.controlType,s.opt),xw(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var PV=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),EV(r,t,{pan:L(FV.pan,this),zoom:L(FV.zoom,this),scrollMove:L(FV.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){DV(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(Mz),FV={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=LV[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(RI(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:IV(function(e,t,n,r,i,a){var o=LV[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:IV(function(e,t,n,r,i,a){return LV[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function IV(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(RI(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var LV={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function RV(e){Lz(e),e.registerComponentModel(wV),e.registerComponentView(PV),NV(e)}var zV=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=Eh(Az.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Y.color.accent10,borderRadius:0,backgroundColor:Y.color.transparent,dataBackground:{lineStyle:{color:Y.color.accent30,width:.5},areaStyle:{color:Y.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Y.color.accent40,width:.5},areaStyle:{color:Y.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Y.color.neutral00,borderColor:Y.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Y.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Y.color.tertiary},brushSelect:!0,brushStyle:{color:Y.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Y.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Az),BV=Ro,VV=1,HV=30,UV=7,WV=`horizontal`,GV=`vertical`,KV=5,qV=[`line`,`bar`,`candlestick`,`scatter`],JV={easing:`cubicOut`,duration:100,delay:0},YV=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=L(this._onBrush,this),this._onBrushEnd=L(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),xw(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&i.type===`dataZoom`&&i.from===this.uid||this._buildView(),this._updateView())},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Sw(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new zu;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?UV:0,r=c_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===WV?{right:r.width-i.x-i.width,top:r.height-HV-a-n,width:i.width,height:HV}:{right:a,top:i.y,width:HV,height:i.height},s=p_(e.option);N([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=o_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===GV&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===WV&&!i?{scaleY:o?1:-1,scaleX:1}:n===WV&&i?{scaleY:o?1:-1,scaleX:-1}:n===GV&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new BV({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new BV({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:L(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)v||(y+=g);else{y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:_s(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new zu,r=new fd({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new md({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){N(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&j(qV,e.get(`type`))<0)){var o=r.getComponent(Sz(i),a).axis,s=ZV(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new BV({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new BV({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:VV,fill:Y.color.transparent}})),N([0,1],function(t){var a=o.get(`handleIcon`);!jv[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=Pv(a,-1,0,2,2,null,!0);s.attr({cursor:QV(this._orient),draggable:!0,drift:L(this._onDragMove,this,t),ondragend:L(this._onDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=q(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),iu(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Uo({silent:!0,invisible:!f,style:Yf(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=q(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Ro({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=Pv(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Y.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Ro({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:L(this._onActualMoveZoneDrift,this),ondragstart:L(this._onActualMoveZoneDragStart,this),ondragend:L(this._onActualMoveZoneDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[_s(e[0],[0,100],t,!0),_s(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];RI(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:_s(a.minSpan,o,i,!0),a.maxSpan==null?null:_s(a.maxSpan,o,i,!0));var s=this._range,c=this._range=Cs([_s(r[0],i,o,!0),_s(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Cs(n.slice()),i=this._size;N([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new Ro,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=Oz(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[XV(t,0,l,s),XV(t,1,l,s)]}}var p=Cs(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=pf(n.handles[e].parent,this.group),o=hf(e===0?`right`:`left`,t),s=this._handleWidth/2+KV,c=mf([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===WV?`middle`:o,align:i===WV?o:`center`,text:a[e]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,uE(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=mf([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new G(t,n),this._brushing=!0,this._brushStartTime=+/* @__PURE__ */ new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+/* @__PURE__ */ new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();RI(0,a,r,0,o.minSpan==null?null:_s(o.minSpan,i,r,!0),o.maxSpan==null?null:_s(o.maxSpan,i,r,!0)),this._range=Cs([_s(a[0],r,i,!0),_s(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(uE(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new BV({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?JV:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=wz(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(Mz);function XV(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:qy(r)||Gy(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Ss(o,a,!0):o+``;return z(i)?i(o,s):B(i)?i.replace(`{value}`,s):s}function ZV(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function QV(e){return e===`vertical`?`ns-resize`:`ew-resize`}function $V(e){e.registerComponentModel(zV),e.registerComponentView(YV),Lz(e)}function eH(e){Lj(RV),Lj($V)}var tH={get:function(e,t,n){var r=E((nH[e]||{})[t]);return n&&R(r)?r[r.length-1]:r}},nH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Y.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},rH=TF.mapVisual,iH=TF.eachVisual,aH=R,oH=N,sH=Cs,cH=_s,lH=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&bB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=L(e,this),this.controllerVisuals=yB(this.option.controller,t,e),this.targetVisuals=yB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return oH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Tc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return P(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){N(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],R(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return B(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):z(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=sH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=re(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};D(r,n),D(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){aH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},oH(r,function(e,t){if(TF.isValidType(t)){var n=tH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;oH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&E(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&E(n)||(a?s[0]:[s[0],s[0]])),c.symbol=rH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;iH(l,function(e){e>u&&(u=e)}),c.symbolSize=rH(l,function(e){return cH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Y.color.transparent,borderColor:Y.color.borderTint,contentColor:Y.color.theme[0],inactiveColor:Y.color.disabled,borderWidth:0,padding:Y.size.m,textGap:10,precision:0,textStyle:{color:Y.color.secondary}},t}(g_),uH=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Ug(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Ro({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return N(TF.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),TF.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=c_(t,n).refContainer;l_(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(gO),dH=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function fH(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=dH[o],c=[0,null,10],l={},u=0;u<3;u++)l[dH[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=o_(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function pH(e,t){return N(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var mH={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},hH=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},gH=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(xB(t.stateList,t.targetVisuals,L(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(L(_H,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function _H(e,t,n,r){for(var i=t.targetVisuals[r],a=TF.prepareVisualTypes(i),o={color:$O(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var vH=N;function yH(e){var t=e&&e.visualMap;R(t)||(t=t?[t]:[]),vH(t,function(e){if(e){bH(e,`splitList`)&&!bH(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&R(t)&&vH(t,function(e){V(e)&&(bH(e,`start`)&&!bH(e,`min`)&&(e.min=e.start),bH(e,`end`)&&!bH(e,`max`)&&(e.max=e.end))})}})}function bH(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var xH=!1;function SH(e){xH||(xH=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(mH,hH),N(gH,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(yH))}var CH=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],wH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=E(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=P(this._pieceList,function(e){return e=E(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=TF.listVisualTypes(),i=this.isCategory();N(t.pieces,function(e){N(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),N(n,function(e,n){var r=!1;N(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&N(this.stateList,function(e){(t[e]||(t[e]={}))[n]=tH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,N(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;N(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=E(e)},t.prototype.getValueState=function(e){var t=TF.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){TF.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return N(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Eh(lH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(lH),wH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Ls(e),N(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;N(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),TH(t,e)},pieces:function(e){var t=this.option;N(t.pieces,function(t,n){V(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=TF.retrieveVisuals(t),e.push(r)},this),TH(t,e),Ls(e),N(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function TH(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var EH=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=me(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),N(o.viewPieceList,function(o){var s=o.piece,u=new zu;u.onclick=L(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Uo({style:Yf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:H(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),n_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:pH(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return fH(e,this.api,e.itemSize);var n=t.align;return n&&n!==`auto`||(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new zu,o=this.visualMapModel.textStyleModel;a.add(new Uo({style:Yf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=P(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Pv(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=E(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,N(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(uH);function DH(e){e.registerComponentModel(CH),e.registerComponentView(EH),SH(e)}function OH(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function kH(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:OH(r&&r.shape.points)}}var AH=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],jH=new Kn,MH=yc(),NH=yc();function PH(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];t[i]!=null&&(e[i]=t[i])}}var FH=[`x`,`y`,`rotation`],IH=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,i){var a=r.style,o=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),c=r.getBoundingRect().plain();K.applyTransform(c,c,s),s?jH.setLocalTransform(s):(jH.x=jH.y=jH.rotation=jH.originX=jH.originY=0,jH.scaleX=jH.scaleY=1),jH.rotation=ro(jH.rotation);var l=r.__hostTarget,u;if(l){u=l.getBoundingRect().plain();var d=l.getComputedTransform();K.applyTransform(u,u,d)}var f=u&&l.getTextGuideLine();this._labelList.push({label:r,labelLine:f,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:f&&f.ignore,x:jH.x,y:jH.y,scaleX:jH.scaleX,scaleY:jH.scaleY,rotation:jH.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:o.position,attachedRot:o.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get(`labelLayout`);(z(r)||I(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),a=J(e);i&&!i.disableLabelLayout&&t._addLabel(a.dataIndex,a.dataType,n,i,r)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){TT(e,t)}}for(var i=0;i<this._labelList.length;i++){var a=this._labelList[i],o=a.label,s=o.__hostTarget,c=a.defaultAttr,l=void 0;l=z(a.layoutOptionOrCb)?a.layoutOptionOrCb(kH(a,s)):a.layoutOptionOrCb,l||={},a.layoutOption=l;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:l.x!=null||l.y!=null?null:c.attachedPos,rotation:l.rotate==null?c.attachedRot:l.rotate*u,offset:[l.dx||0,l.dy||0]});var d=!1;if(l.x==null?(o.x=c.x,o.setStyle(`x`,c.style.x)):(o.x=q(l.x,t),o.setStyle(`x`,0),d=!0),l.y==null?(o.y=c.y,o.setStyle(`y`,c.style.y)):(o.y=q(l.y,n),o.setStyle(`y`,0),d=!0),l.labelLinePoints){var f=s.getTextGuideLine();f&&(f.setShape({points:l.labelLinePoints}),d=!1)}var p=MH(o);p.needsUpdateLabelLine=d,o.rotation=l.rotate==null?c.rotation:l.rotate*u,o.scaleX=c.scaleX,o.scaleY=c.scaleY;for(var m=0;m<AH.length;m++){var h=AH[m];o.setStyle(h,l[h]==null?c.style[h]:l[h])}if(l.draggable){if(o.draggable=!0,o.cursor=`move`,s){var g=a.seriesModel;a.dataIndex!=null&&(g=a.seriesModel.getData(a.dataType).getItemModel(a.dataIndex)),o.on(`drag`,r(s,g.getModel(`labelLine`)))}}else o.off(`drag`),o.cursor=c.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),r=[];N(this._labelList,function(e){e.defaultAttr.ignore||r.push(ES({},e))});var i=F(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=F(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});OS(i,0,0,t),OS(a,1,0,n);var o=F(r,function(e){return e.layoutOption.hideOverlap});kS(o),AS(o)},e.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var a=!r,o=t.getTextContent();!a&&o&&(a=MH(o).needsUpdateLabelLine),a&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=J(e),i=r.dataIndex;if(n&&i!=null){var a=t.getData(r.dataType),o=a.getItemModel(i),s={},c=a.getItemVisual(i,`style`);c&&(s.stroke=c[a.getVisual(`drawType`)]);var l=o.getModel(`labelLine`);MT(e,NT(o),s),TT(e,l)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Wd(e))){var i=MH(n),a=i.oldLayout,o=J(e),s=o.dataIndex,c={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(o.dataType);if(a){n.attr(a);var u=e.prevStates;u&&(j(u,`select`)>=0&&n.attr(i.oldLayoutSelect),j(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Hd(n,c,t,s)}else if(n.attr(c),!ip(n).valueAnimation){var d=H(n.style.opacity,1);n.style.opacity=0,Ud(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};PH(f,c,FH),PH(f,n.states.select,FH)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};PH(p,c,FH),PH(p,n.states.emphasis,FH)}op(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=NH(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Hd(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Ud(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),LH=yc();function RH(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=LH(t).labelManager;r||=LH(t).labelManager=new IH,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=LH(t).labelManager;N(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var zH=function(){function e(t,n){Py(this,e.decoratedMethods),this._outOfBrk=By(null,n);var r=this._linear=By(null,n);Fy(this,r),this.breaks=t&&t.breaks||[]}return e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var r=this.breaks[n];if(r.vmin<e&&e<r.vmax)return t(e,r.vmax)}return 0},e.decoratedMethods={needTransform:function(){return!this.breaks.length},getExtent:function(){return this._outOfBrk.getExtent()},getExtentUnsafe:function(e,t){return t==null||t===2?this._outOfBrk.getExtentUnsafe(e,null):this._linear.getExtentUnsafe(e,null)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){Rc(t,n)&&(e===0&&UH(this,[t,n]),this._outOfBrk.setExtent2(e,t,n),this._linear.setExtent2(e,this.transformIn(t,null),this.transformIn(n,null)))},normalize:function(e){return this._linear.normalize(this.transformIn(e,null))},scale:function(e){return this.transformOut(this._linear.scale(e),null)},contain:function(e){return this._outOfBrk.contain(e)},transformIn:function(e,t){if(t&&t.depth===2)return e;for(var n=VH,r=HH,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(e<=o.vmax){e>o.vmin?n+=o.vmin-r+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:n+=e-r,r=o.vmax,i=!1;break}n+=o.vmin-r+o.gapReal,r=o.vmax}return i&&(n+=e-r),n},transformOut:function(e,t){if(t&&t.depth===2)return e;for(var n=VH,r=HH,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],c=n+s.vmin-r,l=c+s.gapReal;if(e<=l){a=e>c?s.vmin+(e-c)/(l-c)*(s.vmax-s.vmin):r+e-n,r=s.vmax,i=!1;break}n=l,r=s.vmax}return i&&(a=r+e-n),a}},e}();function BH(e,t){return new zH(e,t)}var VH=0,HH=0;function UH(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};N(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=KH(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c)){if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));N(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:ss(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function WH(e,t,n,r,i,a){e!==`no`&&N(n,function(n){var o=KH(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&l<o.vmax+u&&(e!==`preserve_extent_bound`||l!==a[0]&&l!==a[1])&&t.splice(s,1)}})}function GH(e,t,n,r){N(t,function(t){var i=KH(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort(function(e,t){return e.value-t.value})}function KH(e,t){var n=ss(e.vmin,t[0]),r=os(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function qH(e,t,n){var r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999}N(e,function(e){if(e&&e.start!=null&&e.end!=null&&!e.isExpanded){var a={breakOption:E(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(B(e.gap)){var s=ye(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t.parse(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&N([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return N(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:F(r,function(e){return!!e})}}function JH(e,t){return YH(t)===YH(e)}function YH(e){return e.start+`_\0_`+e.end}function XH(e,t,n){var r=[];N(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),N(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=re(r,function(n){return JH(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return N(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function ZH(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=re(n,function(e){return JH(e.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:E(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function QH(e,t,n,r,i){i.original=qH(e,t,n);var a=i.transformed=qH(e,t,n),o=i.lookup;a.breaks=P(a.breaks,function(e,n){var i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}var $H={vmin:`start`,vmax:`end`};function eU(e,t){return t&&(e||={},e.break={type:$H[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function tU(){eg({createBreakScaleMapper:BH,pruneTicksByBreak:WH,addBreaksToTicks:GH,parseAxisBreakOption:qH,identifyAxisBreak:JH,serializeAxisBreakIdentifier:YH,retrieveAxisBreakPairs:XH,getTicksBreakOutwardTransform:ZH,parseAxisBreakOptionInwardTransform:QH,makeAxisLabelFormatterParamBreak:eU})}var nU=yc();function rU(e,t){var n=re(e,function(e){return tg().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function iU(e){N(e,function(e){return e.shouldRemove=!0})}function aU(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function oU(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!tg())return;var o=tg().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new zu({ignoreModelZ:!0}),y=a.isHorizontal(),b=nU(t).visualList||(nU(t).visualList=[]);iU(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();var s=rU(b,t);s.shouldRemove=!1;var c=new zu;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:FS,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[a.dim+`AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)},S=0;S<o.length;S++)x(S);e.add(v),aU(b);function C(e,t,n,i,a,o){var s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[Zd[v]]+r[Qd[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[Zd[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return No(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);for(var x=[],S=[],C=!0,w=r[Zd[v]],T=0;;T++){var E=w===r[Zd[v]],D=w>=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(T<e.length?A=e[T]:(A=Math.random(),e.push(A)),w+=A*(u-l)+l,C=!C,D)break}var j=tg().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new md({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new md({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var ee=S.slice();ee.reverse();var te=x.concat(ee);t.add(new fd({anid:`break_c_`+j,shape:{points:te},style:{fill:_,opacity:p.opacity},z:f}))}}}function sU(e,t,n,r){var i=e.axis,a=n.transform;ve(r.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=P(tg().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1),function(e){var t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:tg().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u<s.length;u++){var d=s[u],f=Math.max(d.coordPair[0],o[0]),p=Math.min(d.coordPair[1],o[1]);c<=f&&m(c,f,l,d),c=p,l=d}c<=o[1]&&m(c,o[1],l,null);function m(e,n,i,o){function s(e,t){a&&(kt(e,e,a),kt(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};No(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}var l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);var p=new _d(O({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_`+(i?i.brkId:`\0`)+`_\0_`+(o?o.brkId:`\0`)}}function cU(e,t,n){if(re(n,function(e){return!e}))return;var r=new G;if(!jS(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=ot();dt(i,i,-t);var a=P(n,function(e){return e.transform?lt(ot(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new G(t[Qd[e]]*a[0][0],t[Qd[e]]*a[0][1]);return Math.abs(r.y)<1e-5}var s=.5;if(o(0)||o(1)){var c=P(n,function(e,t){var n=e.localRect.clone();return n.applyTransform(a[t]),n}),l=new G;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(i);var u=r.clone().transform(i),d=(c[0].x+c[1].x+(u.x>=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new G,h=new G;G.scale(m,r,-s),G.scale(h,r,1-s),TS(n[0],m),TS(n[1],h)}function lU(e,t){var n={breaks:[]};return N(t.breaks,function(r){if(r){var i=re(e.get(`breaks`,!0),function(e){return tg().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function uU(){NS({adjustBreakLabelPair:cU,buildAxisBreakLine:sU,rectCoordBuildBreakAxis:oU,updateModelAxisBreak:lU})}function dU(e){US(e),tU(),uU()}var fU=Math.sin,pU=Math.cos,mU=Math.PI,hU=Math.PI*2,gU=180/mU,_U=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=ei(u-hU)||(l?c>=hU:-c>=hU),f=c>0?c%hU:c%hU+hU,p=!1;p=d?!0:!ei(u)&&f>=mU==!!l;var m=e+n*pU(a),h=t+r*fU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*gU);if(d){var _=1/this._p,v=(l?1:-1)*(hU-_);this._add(`A`,n,r,g,1,+l,e+n*pU(a+v),t+r*fU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*pU(o),b=t+r*fU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),vU=`none`,yU=Math.round;function bU(e){var t=e.fill;return t!=null&&t!==vU}function xU(e){var t=e.stroke;return t!=null&&t!==vU}var SU=[`lineCap`,`miterLimit`,`lineJoin`],CU=P(SU,function(e){return`stroke-`+e.toLowerCase()});function wU(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof Ao)e(`opacity`,i);else{if(bU(t)){var a=Qr(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,vU);if(xU(t)){var s=Qr(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=yk(n),p=f[0],m=f[1];p&&(m=yU(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,vU);for(var h=0;h<SU.length;h++){var g=SU[h];if(r||t[g]!==xo[g]){var _=t[g]||xo[g];_&&e(CU[h],_)}}}else r&&e(`stroke`,vU)}}var TU=`http://www.w3.org/2000/svg`,EU=`http://www.w3.org/1999/xlink`,DU=`http://www.w3.org/2000/xmlns/`,OU=`http://www.w3.org/XML/1998/namespace`,kU=`ecmeta_`;function AU(e){return document.createElementNS(TU,e)}function jU(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function MU(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function NU(e){return`</`+e+`>`}function PU(e,t){t||={};var n=t.newline?`
19
- `:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return MU(i,a)+(i===`style`?o||``:Bh(o))+(t?``+n+P(t,function(e){return r(e)}).join(n)+n:``)+NU(i)}return r(e)}function FU(e,t,n){n||={};var r=n.newline?`
20
- `:``,i=` {`+r,a=r+`}`,o=P(I(e),function(t){return t+i+P(I(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=P(I(t),function(e){return`@keyframes `+e+i+P(I(t[e]),function(n){return n+i+P(I(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function IU(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function LU(e,t,n,r){return jU(`svg`,`root`,{width:e,height:t,xmlns:TU,"xmlns:xlink":EU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var RU=0;function zU(){return RU++}var BU={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},VU=`transform-origin`;function HU(e,t,n){var r=O({},e.shape);O(r,t),e.buildPath(n,r);var i=new _U;return i.reset(hi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function UU(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[VU]=n+`px `+r+`px`)}var WU={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function GU(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function KU(e,t,n){var r=e.shape.paths,i={},a,o;if(N(r,function(e){var t=IU(n.zrId);t.animation=!0,JU(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=I(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=GU(i,n);return a.replace(o,s)}}function qU(e){return B(e)?BU[e]?`cubic-bezier(`+BU[e]+`)`:wr(e)?e:``:``}function JU(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof wd){var s=KU(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=qU(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=qU(d.easing),m=d.rawValue;(B(m)||se(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};Xn(g,e),O(g,s[h]);var _=gi(g),v=s[h][u];l[h]=_?{transform:_}:{},UU(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new Qa);var S=y.len();y.reset(),l[h].d=HU(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return WU[e]})}for(var w=I(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],k=w[f];if(l[D][VU]!==l[k][VU]){T=!1;break}E=l[D][VU]}if(T&&E){for(var h in l)l[h][VU]&&delete l[h][VU];t[VU]=E}if(F(w,function(e){return I(l[e]).length>0}).length)return GU(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+zU();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function YU(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};XU(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Xr(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),XU(r,t,n,!0)}}}function XU(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+zU(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var ZU=Math.round;function QU(e){return e&&B(e.src)}function $U(e){return e&&z(e.toDataURL)}function eW(e,t,n,r){wU(function(i,a){var o=i===`fill`||i===`stroke`;o&&pi(a)?hW(t,e,i,r):o&&ui(a)?gW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),mW(n,e,r)}function tW(e,t){var n=_D(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[kU+`silent`]=`true`))}function nW(e){return ei(e[0]-1)&&ei(e[1])&&ei(e[2])&&ei(e[3]-1)}function rW(e){return ei(e[4])&&ei(e[5])}function iW(e,t,n){if(t&&!(rW(t)&&nW(t))){var r=n?10:1e4;e.transform=nW(t)?`translate(`+ZU(t[4]*r)/r+` `+ZU(t[5]*r)/r+`)`:ri(t)}}function aW(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(ZU(r[a][0]*n)/n),i.push(ZU(r[a][1]*n)/n);t.points=i.join(` `)}function oW(e){return!e.smooth}function sW(e){var t=P(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=ZU(o*r)/r)}}}var cW={circle:[sW([`cx`,`cy`,`r`])],polyline:[aW,oW],polygon:[aW,oW]};function lW(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function uW(e,t){var n=e.style,r=e.shape,i=cW[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&hi(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&lW(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;m.__svgPathVersion===p&&h&&c===m.__svgPathStrokePercent||(h||=m.__svgPathBuilder=new _U,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return iW(a,e.transform),eW(a,n,e,t),tW(a,e),t.animation&&JU(e,a,t),t.emphasis&&YU(e,a,t),jU(s,e.id+``,a)}function dW(e,t){var n=e.style,r=n.image;if(r&&!B(r)&&(QU(r)?r=r.src:$U(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),iW(c,e.transform),eW(c,n,e,t),tW(c,e),t.animation&&JU(e,c,t),jU(`image`,e.id+``,c)}}function fW(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=ai(n.y||0,mn(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":ii[n.textAlign]||n.textAlign};if(Yo(n)){var c=``,l=n.fontStyle,u=qo(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),iW(s,e.transform),eW(s,n,e,t),tW(s,e),t.animation&&JU(e,s,t),jU(`text`,e.id+``,s,void 0,r)}}function pW(e,t){if(e instanceof wo)return uW(e,t);if(e instanceof Ao)return dW(e,t);if(e instanceof Eo)return fW(e,t)}function mW(e,t,n){var r=e.style;if(oi(r)){var i=si(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=Qr(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=jU(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[jU(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=mi(o)}}function hW(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(di(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(fi(i))a=`radialGradient`,o.cx=H(i.x,.5),o.cy=H(i.y,.5),o.r=H(i.r,.5);else return;for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=ni(s[l].offset)*100+`%`,f=s[l].color,p=Qr(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(jU(`stop`,l+``,g))}var _=PU(jU(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=jU(a,y,o,c)),t[n]=mi(y)}function gW(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(ci(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(B(h)?m=h:QU(h)?m=h.src:$U(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;ve(f,g),ve(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=jU(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=E(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=gi(i);x&&(o.patternTransform=x);var S=jU(`pattern`,``,o,[d]),C=PU(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=jU(`pattern`,T,o,[d])),t[n]=mi(T)}}function _W(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=jU(`clipPath`,a,o,[uW(e,n)])}t[`clip-path`]=mi(a)}function vW(e){return document.createTextNode(e)}function yW(e,t,n){e.insertBefore(t,n)}function bW(e,t){e.removeChild(t)}function xW(e,t){e.appendChild(t)}function SW(e){return e.parentNode}function CW(e){return e.nextSibling}function wW(e,t){e.textContent=t}var TW=58,EW=120,DW=jU(``,``);function OW(e){return e===void 0}function kW(e){return e!==void 0}function AW(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function jW(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function MW(e){var t,n=e.children,r=e.tag;if(kW(r)){var i=e.elm=AU(r);if(FW(DW,e),R(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&xW(i,MW(a))}else kW(e.text)&&!V(e.text)&&xW(i,vW(e.text))}else e.elm=vW(e.text);return e.elm}function NW(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&yW(e,MW(a),t)}}function PW(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(kW(i.tag)?bW(SW(i.elm),i.elm):bW(e,i.elm))}}function FW(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===EW?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(DU,n,o):n.charCodeAt(3)===TW?r.setAttributeNS(OU,n,o):n.charCodeAt(5)===TW?r.setAttributeNS(EU,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function IW(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:jW(o,l)?(LW(o,l),o=t[++r],l=n[++i]):jW(s,u)?(LW(s,u),s=t[--a],u=n[--c]):jW(o,u)?(LW(o,u),yW(e,o.elm,CW(s.elm)),o=t[++r],u=n[--c]):jW(s,l)?(LW(s,l),yW(e,s.elm,o.elm),s=t[--a],l=n[++i]):(OW(d)&&(d=AW(t,r,a)),f=d[l.key],OW(f)?yW(e,MW(l),o.elm):(p=t[f],p.tag===l.tag?(LW(p,l),t[f]=void 0,yW(e,p.elm,o.elm)):yW(e,MW(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,NW(e,m,n,i,c)):PW(e,t,r,a))}function LW(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(FW(e,t),OW(t.text)?kW(r)&&kW(i)?r!==i&&IW(n,r,i):kW(i)?(kW(e.text)&&wW(n,``),NW(n,null,i,0,i.length-1)):kW(r)?PW(n,r,0,r.length-1):kW(e.text)&&wW(n,``):e.text!==t.text&&(kW(r)&&PW(n,r,0,r.length-1),wW(n,t.text)))}function RW(e,t){if(jW(e,t))LW(e,t);else{var n=e.elm,r=SW(n);MW(t),r!==null&&(yW(r,t.elm,CW(n)),PW(r,[e],0,0))}return t}var zW=0,BW=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=VW(`configLayer`),this.storage=t,this._opts=n=O({},n),this.root=e,this._id=`zr`+zW++,this._oldVNode=LU(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=AU(`svg`);FW(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,RW(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return pW(e,IU(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=IU(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=HW(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=jU(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=P(I(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(jU(`defs`,`defs`,{},c)),e.animation){var l=FU(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=jU(`style`,`stl`,{},[],l);a.push(u)}}return LU(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},PU(this.renderToVNode({animation:H(e.cssAnimation,!0),emphasis:H(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:H(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};_W(d[g],_,t);var v=jU(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=pW(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=_k(r,0,n),t=_k(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(ui(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=_i(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function VW(e){return function(){}}function HW(e,t,n,r){var i;if(n&&n!==`none`){if(i=jU(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),pi(n))hW({fill:n},i.attrs,`fill`,r);else if(ui(n))gW({style:{fill:n},dirty:Ae,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=Qr(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function UW(e){e.registerPainter(`svg`,BW)}function WW(e,t,n){var r=u.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function GW(e){return!e.__cursors.get(0)}function KW(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var qW=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ui,typeof t==`string`?a=WW(t,n,r):V(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(ke(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=KW(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=WW(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new K(0,0,0,0);function c(e){if(e.isFinite()&&!e.isZero()){if(i.length===0){var t=new K(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new K(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new K(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=KW(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;)if(i[u].isZero())i.splice(u,1);else{for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;de(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||mk(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):fe(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=Ek(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&N(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Vi),JW=1e5,YW=314159,XW=void 0,ZW=1,QW=2;function $W(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function eG(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function tG(e,t,n,r){var i=new qW(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,nG(i),i}function nG(e){e.__cursorStack=[],e.__cursors=U()}function rG(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function iG(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,rG({key:r})))}function aG(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function oG(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function sG(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];n&&(n&cG&&!s.__builtin__||n&lG&&s.__builtin__||n&uG&&s===e.hoverlayer)||t(s,a,o,i)}}var cG=1,lG=2,uG=4,dG=cG|uG,fG=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=O({},n||{}),this.dpr=n.devicePixelRatio||Ui,this._singleCanvas=i,this.root=e,e.style&&(ke(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=tG(a,this,YW,0);c.initContext(),this._insertLayer(c,YW,0,!0),this._domRoot=e}else{this._width=_k(e,0,n),this._height=_k(e,1,n);var l=this._domRoot=eG(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!V(e)?{paintAll:!!e}:e||{},n=H(t.refresh,!0),r=H(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=QW),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return sG(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},lG),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=XW,n!==XW&&(!t&&n===QW&&(t=this._i.hoverlayer=this._ensureLayer(JW)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),Gk(i,s,r),c&&(s.style=l)}}i&&(Kk(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(JW)},e.prototype.paintOne=function(e,t){Wk(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)sG(this._i,function(e){e.afterBrush&&e.afterBrush()},dG),this._paintHoverList(e);else{var i=this;VE(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(YW).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),sG(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},cG)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return sG(this._i,function(i){var a=!1;if(aG(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!GW(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}aG(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},dG),Ne.wxa&&sG(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=GW(e),c=s&&u.getTime(),l=t.drawIdx,d=t.notClearIdx,f=d>=0?Math.min(d,l):l;f<t.endIdx;f++){var p=n[f];if(!(f<l&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=QW),r!=null){var m=p.getPaintRect();m&&m.intersect(r)&&(Gk(o,p,a),p.setPrevPaintRect(m))}else Gk(o,p,a);if(s&&u.getTime()-c>15){f++;break}}}Kk(o,a),t.drawIdx=Math.max(f,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=YW,t=0);var i=oG(this._i,e)[t];return i||(i=tG(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&D(i,this._layerConfig[e],!0),(n||r&&e!==YW)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&$W(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=oG(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),oG(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return sG(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return sG(this._i,function(n,r){e.call(t,n,r)},cG)},e.prototype.eachOtherLayer=function(e,t){return sG(this._i,function(n,r){e.call(t,n,r)},lG)},e.prototype.getLayers=function(){var e={};return sG(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}sG(n._i,function(e){e.__dirty=!1,aG(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},dG);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__))T(`ZLevel `+d+` has been used by unknown layer `+o.id);else{if((!s||f!==s.key)&&(s=iG(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}}sG(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(GW(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(aG(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===XW&&(n._hoverLayerDirty=ZW))},dG)},e.prototype.clear=function(){return sG(this._i,function(e){e.clear(),nG(e)},cG),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,sG(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?D(n[e],t,!0):n[e]=t,sG(this._i,function(e,t){D(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=_k(i,0,r),t=_k(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,sG(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(YW).resize(e,t)}return this},e.prototype.clearLayer=function(e){N(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[YW][0].dom;var t=new qW(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;sG(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];Gk(n,l,a)}Kk(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function pG(e){e.registerPainter(`canvas`,fG)}var mG=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`}),hG=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),gG=(e=`INR`)=>mG[e]??`${e} `;function _G(e,...t){console.warn(e,...t)}function vG(e,...t){console.error(e,...t)}var yG=`Asia/Kolkata`,bG=198e5,xG=/* @__PURE__ */ new Map;function SG(e){let t=xG.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),xG.set(e,t)),t}function CG(e){if(typeof e!=`string`||e===``)return!1;try{return SG(e),!0}catch{return!1}}function wG(e,t=yG){if(t===`Asia/Kolkata`){let t=new Date(e+bG);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(SG(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:n.year,month:n.month-1,day:n.day,hour:n.hour%24,minute:n.minute,second:n.second}}function TG(e,t=yG){if(t===`Asia/Kolkata`)return bG;let n=wG(e,t),r=/* @__PURE__ */ new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function EG(e,t=yG){let n=e-TG(e,t);return n=e-TG(n,t),n}var DG=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],OG=[`rupees`,`paise`],kG=[`ms`,`s`,`min`,`h`],AG=[`day`,`month`,`year`,`datetime`,`time`],jG=`−`,MG=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],NG=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],PG=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],FG=e=>!e||e===`INR`?`en-IN`:`en-US`,IG=(e,t)=>Number.isInteger(e)&&e>=0&&e<=20?e:t,LG=/* @__PURE__ */ new Map,RG=(e,t=`en-IN`)=>{let n=`${t}:${e}`;return LG.has(n)||LG.set(n,new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e})),LG.get(n)},zG=/* @__PURE__ */ new Map,BG=(e,t=`en-IN`)=>{let n=`${t}:${e}`;return zG.has(n)||zG.set(n,new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e})),zG.get(n)},VG=e=>typeof e==`number`&&Number.isFinite(e),HG=e=>e<0&&!Object.is(Math.abs(e),0)?jG:``,UG=(e,t)=>t===`paise`?e/100:e;function WG(e,{decimals:t}={}){if(!VG(e))return`-`;let n=RG(IG(t,2)).format(Math.abs(e));return n===`0`?`0`:HG(e)+n}function GG(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!VG(e))return`-`;let i=UG(e,t),a=BG(IG(n,0),FG(r)).format(Math.abs(i));return(Number(a.replace(/,/g,``))===0?``:HG(i))+gG(r)+a}var KG=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function qG(e,{currency:t,unit:n=`rupees`}={}){if(!VG(e))return`-`;let r=t?UG(e,n):e,i=t?gG(t):``,a=t?FG(t):`en-IN`,o=a===`en-IN`?NG:PG,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=RG(KG(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:HG(r))+i+e;c=o.length-1}let[l,u]=o[c],d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f));return p>=100&&c>0&&(--c,[l,u]=o[c],d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${HG(r)}${i}${RG(f,a).format(p)} ${u}`}function JG(e,{decimals:t}={}){return VG(e)?`${WG(e*100,{decimals:IG(t,1)})}%`:`-`}function YG(e,{unit:t=`s`}={}){if(!VG(e))return`-`;let n={ms:1,s:1e3,min:6e4,h:36e5}[t]??1e3,r=Math.abs(e*n),i=HG(e);if(Math.round(r)<1e3)return`${i}${RG(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${RG(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${RG(0).format(l)}h ${s(c%60)}m`}function XG(e,t=yG){if(e instanceof Date)return e.getTime();if(VG(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?EG(a.getTime(),t):NaN}return Date.parse(e)}function ZG(e,t=yG){let{year:n,month:r,day:i,hour:a,minute:o}=wG(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function QG(e,{pattern:t=`day`,timeZone:n=yG}={}){let r=XG(e,n);if(!Number.isFinite(r))return`-`;let i=ZG(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${MG[i.month]}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${MG[i.month]}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function $G(e,{timeZone:t=yG}={}){let n=XG(e,t);if(!Number.isFinite(n))return`-`;let r=ZG(n,t);return`${String(r.day).padStart(2,`0`)}-${MG[r.month]}`}function Z(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return QG(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return GG(e,t);case`percent`:return JG(e,t);case`compact`:return qG(e,t);case`duration`:return YG(e,t);default:return WG(e,t)}}function eK(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e.currency??`INR`,unit:e.unit}:!t||t===`number`?{style:`compact`}:e}var tK=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],nK=[`none`,`stacked`,`percent`],rK=[`category`,`time`,`value`],iK=[`auto`,`svg`,`canvas`],aK=[`ready`,`loading`,`empty`,`error`],oK=[`chart`,`table`],sK=8,cK=6,lK=`Other`,uK=`No data to show for this chart.`,dK=`This chart couldn't load. Try again in a moment.`,fK=`Loading chart`,pK=`This chart has more series than it can show clearly.`,mK=`This chart has more groups than it can show clearly.`,hK={line:`Line chart`,area:`Area chart`,column:`Column chart`,bar:`Bar chart`,donut:`Donut chart`,heatmap:`Heatmap`,calendar:`Calendar heatmap`,funnel:`Funnel chart`,gauge:`Gauge`,waterfall:`Waterfall chart`,treemap:`Treemap`,sankey:`Sankey diagram`,scatter:`Scatter plot`,bubble:`Bubble chart`,multiples:`Small multiples`},gK=[`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`],_K=e=>gK.includes(e),vK=[`area`,`column`,`bar`],yK=[`line`,`area`,`column`,`bar`,`multiples`],bK={line:[`category`,`time`],area:[`category`,`time`],column:[`category`,`time`],bar:[`category`,`time`],multiples:[`category`,`time`],calendar:[`time`],scatter:[`value`],bubble:[`value`]},xK={group:[`heatmap`,`treemap`,`scatter`,`bubble`],to:[`sankey`],size:[`bubble`],trend:[`scatter`,`bubble`],zoom:[`line`,`area`],bands:[`gauge`],centerLabel:[`donut`],valueLabels:[`column`,`bar`]},SK={gauge:240,calendar:200,treemap:340,sankey:340},CK=100,wK=72,TK=32,EK=[`type`,`title`,`description`,`data`,`x`,`series`,`group`,`to`,`size`,`trend`,`zoom`,`bands`,`stack`,`y`,`target`,`centerLabel`,`valueLabels`,`height`,`state`,`emptyText`,`errorText`,`loadingText`,`renderer`,`timeZone`],DK=[`key`,`kind`,`format`,`label`,`labelFit`],OK=[`auto`,`all`,`rotate`,`ellipsis`],kK=[`key`,`label`,`format`],AK=[`key`,`label`],jK=[`key`,`label`,`format`],MK=[`upTo`,`label`],NK=[`label`,`format`,`min`,`max`,`wholeNumbers`],PK=[`value`,`label`],FK=[`style`,`currency`,`unit`,`decimals`,`pattern`],IK=/* @__PURE__ */ new Set;function LK(e){IK.has(e)||(IK.add(e),_G(`[@webority/ui-elements] <wui-chart> ${e}`))}var RK=e=>e.map(e=>`"${e}"`).join(` | `);function zK(e,t,n){t==null||n.includes(t)||LK(`received ${e}="${String(t)}", which is not one of ${RK(n)}. The chart uses its default instead.`)}function BK(e,t,n){for(let r of Object.keys(t))n.includes(r)||(/^(y2|secondary)/i.test(r)?LK(`ignores ${e}.${r}: a chart has one value axis by design. Show the second measure as its own chart.`):LK(`ignores the unknown key ${e}.${r}. Known keys: ${n.join(`, `)}.`))}function VK(e,t){if(t!=null){if(typeof t!=`object`)LK(`expects ${e} to be an object such as { style: "currency" }.`);else{if(BK(e,t,FK),zK(`${e}.style`,t.style,DG),t.currency!=null&&!hG(t.currency)&&LK(`received ${e}.currency="${String(t.currency)}", which is not an ISO 4217 code such as "INR". The chart uses INR instead.`),t.unit!=null){let n=t.style===`duration`?kG:OG;zK(`${e}.unit`,t.unit,n)}zK(`${e}.pattern`,t.pattern,AG),t.decimals!=null&&!(Number.isInteger(t.decimals)&&t.decimals>=0&&t.decimals<=20)&&LK(`received ${e}.decimals=${String(t.decimals)}, which is not a whole number from 0 to 20. The chart uses its default instead.`)}}}var HK=e=>typeof e==`number`&&Number.isFinite(e),UK=e=>typeof e==`object`&&!!e&&!Array.isArray(e),WK=e=>e?.currency==null||hG(e.currency)?e:{...e,currency:void 0};function GK(e){let t=(e,t=dK)=>(vG(`[@webority/ui-elements] <wui-chart> ${e}`),{spec:null,problem:t});if(!UK(e))return t('has no spec: set the `spec` property or add a <script type="application/json"> child.');if(BK(`spec`,e,EK),zK(`type`,e.type,tK),!tK.includes(e.type))return t(`cannot draw type "${String(e.type)}".`);let n=e.type;typeof e.title==`string`&&e.title.trim()||LK("needs a `title`: it names the chart for screen readers and names exported files.");for(let[t,r]of Object.entries(xK))e[t]!=null&&!r.includes(n)&&LK(`ignores spec.${t} on a ${n} chart: it applies to ${r.join(`, `)}.`);let r=UK(e.x)?e.x:{};BK(`spec.x`,r,DK);let i=bK[n]??[`category`];zK(`x.kind`,r.kind,rK),rK.includes(r.kind)&&!i.includes(r.kind)&&LK(`ignores x.kind="${r.kind}" on a ${n} chart: it takes ${RK(i)}.`),zK(`x.labelFit`,r.labelFit,OK),VK(`x.format`,r.format),typeof r.key!=`string`&&n!==`gauge`&&LK("needs `x.key`, the column holding each row's x value or slice name.");let a=UK(e.y)?e.y:{};BK(`spec.y`,a,NK),VK(`y.format`,a.format);let o=Array.isArray(e.series)?e.series.filter(UK):[];for(let[e,t]of o.entries())BK(`spec.series[${e}]`,t,kK),VK(`series[${e}].format`,t.format),typeof t.key!=`string`&&LK(`needs series[${e}].key, the column holding that series' values.`);if(o.length===0)return t(`has no series to draw.`);let s=o.map(e=>e.key).filter(e=>typeof e==`string`),c=s.find((e,t)=>s.indexOf(e)!==t);if(c!==void 0)return t(`has two series with the key "${c}": each series needs its own key.`);if(o.length>8)return t(`refuses ${o.length} series: 8 is the most that stay distinguishable. Fold the smallest into an Other series, or split the chart.`,pK);let l=_K(n);if(l&&o.length>1){let e=n===`donut`?`Compare parts across groups with a percent-stacked column instead.`:`Show the other measures as their own charts, or use small multiples.`;LK(`draws one series as a ${n}; it got ${o.length} and shows the first. ${e}`)}let u=(e,t,n,r)=>t==null?null:UK(t)?(BK(e,t,n),typeof t.key==`string`?(VK(`${e}.format`,t.format),{key:t.key,label:typeof t.label==`string`?t.label:``,format:WK(t.format)}):(LK(`needs ${e}.key, the column holding ${r}.`),null)):(LK(`expects ${e} to be an object such as { key: "column" }.`),null),d=xK.group.includes(n)?u(`spec.group`,e.group,AK,`each row's group`):null,f=n===`sankey`?u(`spec.to`,e.to,AK,`where each flow ends`):null,p=n===`bubble`?u(`spec.size`,e.size,jK,`each bubble's size`):null;if((n===`heatmap`||n===`treemap`)&&!d)return t(`needs \`group.key\` to draw a ${n}: the column holding each ${n===`heatmap`?`row`:`parent`}.`);if(n===`sankey`&&!f)return t("needs `to.key` to draw a sankey: the column holding where each flow ends.");if(n===`bubble`&&!p)return t("needs `size.key` to draw a bubble chart: the column holding each bubble's size.");let m=vK.includes(n)?nK:[`none`];zK(`stack`,e.stack,m),zK(`state`,e.state,aK),zK(`renderer`,e.renderer,iK),e.timeZone!=null&&!CG(e.timeZone)&&LK(`received timeZone="${String(e.timeZone)}", which is not a time zone this browser knows. The chart uses Asia/Kolkata instead.`);let h=CG(e.timeZone)?e.timeZone:yG;e.target!=null&&(UK(e.target)&&BK(`spec.target`,e.target,PK),UK(e.target)&&HK(e.target.value)||LK("ignores a `target` without a numeric `value`.")),e.trend!=null&&typeof e.trend!=`boolean`&&LK("expects `trend` to be true or false."),e.zoom!=null&&typeof e.zoom!=`boolean`&&LK("expects `zoom` to be true or false.");let g=[];if(n===`gauge`&&e.bands!=null){let t=Array.isArray(e.bands)?e.bands.filter(UK):[];for(let e of t)BK(`spec.bands[]`,e,MK);g=t.filter(e=>HK(e.upTo)&&typeof e.label==`string`&&e.label).map(e=>({upTo:e.upTo,label:e.label})).sort((e,t)=>e.upTo-t.upTo),Array.isArray(e.bands)&&g.length===t.length||LK("ignores a gauge band without a numeric `upTo` and a `label`.")}let _=WK(a.format??o[0].format),v=(l?o.slice(0,1):o).map(e=>({key:e.key,label:typeof e.label==`string`&&e.label?e.label:String(e.key),format:WK(e.format)??_})),y=i.includes(r.kind)?r.kind:i[0],b=Array.isArray(e.data)?e.data.filter(UK):[],x=-1,S=null;n===`donut`&&b.length>6&&(S=b,{data:b,otherIndex:x}=JK(b,r.key,v[0].key),LK(`draws at most 6 donut slices; the smallest ${e.data.length-5} are shown as "${lK}". Send fewer rows, or use a bar chart for many parts.`));let C=v[0].key,w=(e,t)=>{let n=b.filter(e);n.length!==b.length&&LK(`leaves out ${b.length-n.length} row(s) ${t}.`),b=n},T=e=>e!=null&&e!==``,E=e=>HK(e)&&e>0;if(y===`time`&&yK.includes(n)&&w(e=>Number.isFinite(XG(e[r.key],h)),`without a readable date`),n===`gauge`&&b.length>1)LK(`draws one value as a gauge; it got ${b.length} rows and shows the first.`),b=b.slice(0,1);else if(n===`scatter`||n===`bubble`){w(e=>HK(e[r.key])&&HK(e[C])&&(n!==`bubble`||E(e[p.key])),`without a number for x and y (and a positive size)`);let e=new Set(d?b.map(e=>String(e[d.key]??``)):[]);if(e.size>3)return t(`refuses ${e.size} colour groups on a ${n} chart: 3 is the most that stay tellable apart. Keep the three that matter and fold the rest into one, or split the chart.`,mK)}else if(n===`calendar`)w(e=>Number.isFinite(XG(e[r.key],h)),`without a readable date`);else if(n===`heatmap`)w(e=>T(e[r.key])&&T(e[d.key]),`without a column or a row`);else if(n===`treemap`){w(e=>T(e[r.key])&&T(e[d.key])&&E(e[C]),`without a name, a parent and a positive size`);let e=new Set(b.map(e=>String(e[d.key])));if(e.size>8)return t(`refuses ${e.size} parents in a treemap: 8 is the most that keep their own colour. Fold the smallest into one, or split the chart.`,mK)}else if(n===`sankey`){w(e=>T(e[r.key])&&T(e[f.key])&&E(e[C]),`without a start, an end and a positive size`);let e=KK(b,r.key,f.key);if(e)return t(e.reason,e.text)}else if(n===`waterfall`){let e=qK(b,C);if(e?.refuse)return t(e.refuse);e&&LK(e.warn)}let D=HK(e.height)&&e.height>0?e.height:null;if(n===`multiples`){let e=wK*v.length+TK;D!=null&&D<e&&(LK(`needs at least ${e}px of height for ${v.length} small charts; it got ${D}px and draws at ${e}px.`),D=e),D??=CK*v.length+40}D??=SK[n]??320;let O=m.includes(e.stack)?e.stack:`none`,k=xK.valueLabels.includes(n)&&e.valueLabels===!0;k&&O!==`none`&&LK(`ignores valueLabels on a stacked chart.`);let A=k&&O===`none`;return{problem:null,spec:{type:n,title:typeof e.title==`string`?e.title.trim():``,description:typeof e.description==`string`?e.description:``,data:b,allData:S??b,x:{key:r.key,kind:y,format:WK(r.format)??(y===`time`?{style:`date`}:y===`value`?{style:`number`}:void 0),label:r.label??``,labelFit:OK.includes(r.labelFit)?r.labelFit:`auto`},series:v,group:d,to:f,size:p,trend:xK.trend.includes(n)&&e.trend===!0,zoom:xK.zoom.includes(n)?(e.zoom??b.length>5e3)===!0:!1,bands:g,stack:O,y:{label:a.label??``,format:_,min:HK(a.min)?a.min:void 0,max:HK(a.max)?a.max:void 0,wholeNumbers:a.wholeNumbers===!0},target:UK(e.target)&&HK(e.target.value)?{value:e.target.value,label:String(e.target.label??``)}:null,centerLabel:n===`donut`&&typeof e.centerLabel==`string`&&e.centerLabel.trim()?e.centerLabel.trim():``,valueLabels:A,height:D,state:aK.includes(e.state)?e.state:`ready`,emptyText:typeof e.emptyText==`string`&&e.emptyText?e.emptyText:uK,errorText:typeof e.errorText==`string`&&e.errorText?e.errorText:dK,loadingText:typeof e.loadingText==`string`&&e.loadingText?e.loadingText:fK,renderer:iK.includes(e.renderer)?e.renderer:`auto`,timeZone:h,otherIndex:x}}}function KK(e,t,n){let r=e.map(e=>[String(e[t]),String(e[n])]),i=/* @__PURE__ */ new Map;for(let[e,t]of r)i.has(e)||i.set(e,0),i.set(t,(i.get(t)??0)+1);let a=[...i].filter(([,e])=>e===0).map(([e])=>e);if(a.length>8)return{reason:`refuses ${a.length} flow starts in a sankey: 8 is the most that keep their own colour. Fold the smallest into one, or split the chart.`,text:mK};let o=0;for(;a.length;){let e=a.pop();o+=1;for(let[t,n]of r)t===e&&(i.set(n,i.get(n)-1),i.get(n)===0&&a.push(n))}return o<i.size?{reason:`cannot draw a sankey whose flows loop back on themselves.`,text:dK}:null}function qK(e,t){let n=e.map(e=>HK(e[t])?e[t]:0),r=n[n.length-1]??0,i=n[0]??0,a=i;for(let e of n.slice(1,-1))i+=e,a=Math.min(a,i);return a<0||n.length>1&&r<0?{refuse:`cannot draw a waterfall whose running total goes below zero.`}:n.length>2&&Math.abs(r-i)>.5?{warn:`draws the waterfall's closing total (${r}) as given, though the opening total plus the steps is ${i}.`}:null}function JK(e,t,n){let r=new Set(e.map((e,t)=>({i:t,v:HK(e[n])?e[n]:0})).sort((e,t)=>t.v-e.v).slice(0,5).map(e=>e.i)),i=e.reduce((e,t,i)=>r.has(i)||!HK(t[n])?e:e+t[n],0),a=e.filter((e,t)=>r.has(t)),o=new Set(a.map(e=>String(e[t]))),s=lK;for(let e=2;o.has(s);e+=1)s=`${lK} (${e})`;return a.push({[t]:s,[n]:i}),{data:a,otherIndex:a.length-1}}function Q(e,t,n){let r=e.data[n]?.[t];return HK(r)?r:null}function YK(e){return e.type===`gauge`||e.series.some(t=>e.data.some((n,r)=>Q(e,t.key,r)!=null))}function $(e,t){let n=e.data[t]?.[e.x.key];return n==null||n===``?`-`:e.x.format?Z(n,{...e.x.format,timeZone:e.timeZone}):String(n)}function XK(e,t){return XG(e.data[t]?.[e.x.key],e.timeZone)}function ZK(e,t){let n=e.group?e.data[t]?.[e.group.key]:null;return n==null||n===``?`-`:String(n)}function QK(e,t){let n=e.to?e.data[t]?.[e.to.key]:null;return n==null||n===``?`-`:String(n)}var $K=e=>[...new Set(e)];function eq(e){return e.group?$K(e.data.map((t,n)=>ZK(e,n))):[]}function tq(e){return _K(e.type)?e.data.length:e.data.length*e.series.length}function nq(e){return e.renderer===`auto`?tq(e)>5e3?`canvas`:`svg`:e.renderer}function rq(e){switch(e.type){case`donut`:return e.data.map((t,n)=>$(e,n));case`scatter`:case`bubble`:return eq(e);case`line`:case`area`:case`column`:case`bar`:return e.series.map(e=>e.key);default:return[]}}function iq(e){return[`line`,`area`,`column`,`bar`].includes(e.type)?e.series.map(e=>e.label):rq(e)}function aq(e,t,n){return e.type===`donut`?n.has($(e,t)):(e.type===`scatter`||e.type===`bubble`)&&e.group?n.has(ZK(e,t)):!1}function oq(e,t){return e.data.map((n,r)=>{let i=e.series.filter(e=>!t.has(e.key)).reduce((t,n)=>t+Math.abs(Q(e,n.key,r)??0),0);return Object.fromEntries(e.series.map(t=>[t.key,i&&Q(e,t.key,r)!=null?Q(e,t.key,r)/i:null]))})}var sq=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];function cq(e,t=yG){return`${sq[new Date(e+TG(e,t)).getUTCDay()]}, ${QG(e,{timeZone:t})}`}var lq=e=>e.reduce((e,t)=>t<e?t:e,1/0),uq=e=>e.reduce((e,t)=>t>e?t:e,-1/0),dq=(e,t)=>e.data.map((n,r)=>Q(e,t,r)).filter(e=>e!=null),fq=(e,t)=>t?Z(e/t,{style:`percent`}):`-`;function pq(e,t){let n=e.filter(HK);if(!n.length)return[];let r=lq(n),i=uq(n),a=[t[1],t[2],t[3],t[5],t[6]];if(r===i)return[{from:r,to:i,colour:a[2]}];let o=(i-r)/a.length;return a.map((e,t)=>({from:r+o*t,to:t===a.length-1?i:r+o*(t+1),colour:e}))}function mq(e,t){if(t==null||!e.length)return;let n=e.length-1,r=e.findIndex((e,r)=>t>=e.from&&(r===n?t<=e.to:t<e.to));return e[r<0?n:r].colour}function hq(e,t){return Array.from({length:e},(n,r)=>t[e===1?6:Math.round(6-r*4/(e-1))])}function gq(e,t){return e.bands.find(e=>t<=e.upTo)??e.bands[e.bands.length-1]??null}var _q=(e,t)=>t==null?`-`:gq(e,t).label;function vq(e){return{min:e.y.min??0,max:e.y.max??100}}function yq(e){let t=e.series[0].key,n=e.data.length-1,r=0;return e.data.map((i,a)=>{let o=Q(e,t,a)??0,s=a===0||a===n,c=s?0:r,l=s?o:r+o;return a===0?r=o:s||(r=l),{index:a,total:s,value:o,from:c,to:l,level:s?o:l}})}function bq(e,t){let n=e.series[0].key,r=e.data.map(t=>({from:String(t[e.x.key]),to:String(t[e.to.key]),value:t[n]})),i=/* @__PURE__ */ new Map;for(let e of r)i.has(e.from)||i.set(e.from,[]),i.set(e.to,[...i.get(e.to)??[],e]);let a=/* @__PURE__ */ new Map,o=0;for(let[e,n]of i)n.length||a.set(e,t[o++%t.length]);let s=[...a.keys()],c=new Map([...i].filter(([,e])=>e.length).map(([e,t])=>[e,t.length]));for(;s.length;){let e=s.shift();for(let t of r.filter(t=>t.from===e)){if(c.set(t.to,c.get(t.to)-1),c.get(t.to)>0)continue;let e=i.get(t.to).reduce((e,t)=>t.value>e.value?t:e);a.set(t.to,a.get(e.from)),s.push(t.to)}}return a}function xq(e){let t=e.series[0].key,n=new Map(eq(e).map(e=>[e,0]));return e.data.forEach((r,i)=>{n.set(ZK(e,i),n.get(ZK(e,i))+r[t])}),n}function Sq(e,t,n){let{palette:r,neutral:i,seq:a}=n,o=e.series[0].key;switch(e.type){case`donut`:return Tq(e,t,n);case`funnel`:return hq(e.data.length,a)[t];case`heatmap`:case`calendar`:return mq(pq(dq(e,o),a),Q(e,o,t));case`gauge`:return r[0];case`waterfall`:{let n=yq(e)[t];return n.total?r[0]:n.value>=0?r[2]:r[7]}case`treemap`:return r[[...xq(e).keys()].indexOf(ZK(e,t))%r.length];case`sankey`:return bq(e,r).get(String(e.data[t][e.x.key]));case`scatter`:case`bubble`:return r[Math.max(0,eq(e).indexOf(ZK(e,t)))];default:return r[0]??i}}function Cq(e,t,n,r){let i=e.series[0],a=Q(e,i.key,t),o=()=>Sq(e,t,r);switch(e.type){case`donut`:{let r=e.data.reduce((t,r,a)=>t+(n.has($(e,a))?0:Q(e,i.key,a)??0),0);return{title:$(e,t),rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:`Share`,value:r&&a!=null?Z(a/r,{style:`percent`}):`-`}],foot:``}}case`heatmap`:return{title:`${ZK(e,t)}, ${$(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)}],foot:``};case`calendar`:return{title:cq(XK(e,t),e.timeZone),rows:[{color:o(),label:i.label,value:Z(a,i.format)}],foot:``};case`funnel`:{let n=Q(e,i.key,0),r=t?Q(e,i.key,t-1):null,s=[{color:o(),label:i.label,value:Z(a,i.format)}];return t&&s.push({label:`Of previous step`,value:fq(a,r)}),s.push({label:`Of ${$(e,0)}`,value:fq(a,n)}),{title:$(e,t),rows:s,foot:``}}case`gauge`:{let{min:n,max:r}=vq(e),s=a==null?null:gq(e,a),c=[{color:o(),label:i.label,value:Z(a,i.format)}];return c.push({label:`Scale`,value:`${Z(n,i.format)} to ${Z(r,i.format)}`}),s&&c.push({label:`Band`,value:s.label}),{title:e.data[t]?.[e.x.key]==null?i.label:$(e,t),rows:c,foot:``}}case`waterfall`:{let n=yq(e)[t],r=yq(e)[0].value,a=n.total?[{color:o(),label:i.label,value:Z(n.value,i.format)}]:[{color:o(),label:`Change`,value:wq(n.value,i.format)},{label:`Running total`,value:Z(n.level,i.format)}],s=!n.total&&r?`${wq(n.value/r*100,{style:`number`,decimals:2},`%`)} of opening`:``;return{title:$(e,t),rows:a,foot:s}}case`treemap`:{let n=ZK(e,t),r=xq(e).get(n);return{title:`${n} / ${$(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:`Share of ${n}`,value:fq(a,r)}],foot:``}}case`sankey`:{let n=String(e.data[t][e.x.key]),r=e.data.reduce((t,r,a)=>String(r[e.x.key])===n?t+(Q(e,i.key,a)??0):t,0);return{title:`${n} to ${QK(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:`Share of ${n}`,value:fq(a,r)}],foot:``}}case`scatter`:case`bubble`:{let n=[{color:o(),label:e.x.label||String(e.x.key),value:$(e,t)},{label:i.label,value:Z(a,i.format)}];return e.size&&n.push({label:e.size.label||String(e.size.key),value:Z(e.data[t][e.size.key],e.size.format)}),{title:e.group?ZK(e,t):i.label,rows:n,foot:``}}}let s=e.stack===`percent`?oq(e,n)[t]:null,c=e.series.map((e,t)=>({s:e,i:t})).filter(({s:e})=>!n.has(e.key)),l=c.map(({s:n,i})=>{let a=Q(e,n.key,t),o=Z(a,n.format);return{color:e.type===`multiples`?r.palette[0]:r.palette[i],line:e.type===`line`||e.type===`multiples`,label:n.label,value:s&&a!=null?`${o} (${Z(s[n.key],{style:`percent`})})`:o}}),u=``;if(e.stack!==`none`&&c.length>1&&(u=`Total ${Z(c.reduce((n,{s:r})=>n+(Q(e,r.key,t)??0),0),c[0].s.format)}`),e.target&&c.length===1){let n=Q(e,c[0].s.key,t);if(n!=null){let t=n-e.target.value,r=e.target.label||`target`;u=`${t>=0?`Above`:`Below`} ${r} by ${Z(Math.abs(t),c[0].s.format)}`}}return{title:$(e,t),rows:l,foot:u}}function wq(e,t,n=``){let r=`${Z(Math.abs(e),t)}${n}`;return e>0?`+${r}`:e<0?`−${r}`:r}function Tq(e,t,n){return t===e.otherIndex?n.neutral:n.palette[t%n.palette.length]}function Eq(e){let t=(e,t)=>{let n=document.createElement(`div`);return n.className=e,t!=null&&(n.textContent=t),n},n=t(`wui-chart-tooltip-body`);e.title&&n.append(t(`wui-chart-tooltip-title`,e.title));for(let r of e.rows){let e=t(`wui-chart-tooltip-row`);if(r.color){let t=document.createElement(`span`);t.className=r.line?`wui-chart-tooltip-swatch wui-chart-tooltip-swatch-line`:`wui-chart-tooltip-swatch`,t.style.background=r.color,e.append(t)}let i=document.createElement(`span`);i.className=`wui-chart-tooltip-label`,i.textContent=r.label;let a=document.createElement(`span`);a.className=`wui-chart-tooltip-value`,a.textContent=r.value,e.append(i,a),n.append(e)}return e.foot&&n.append(t(`wui-chart-tooltip-foot`,e.foot)),n}function Dq(e){let t=[e.title,...e.rows.map(e=>`${e.label} ${e.value}`)];return e.foot&&t.push(e.foot),t.filter(Boolean).join(`. `)}function Oq(e){return e.x.label?e.x.label:{gauge:`Measure`,funnel:`Stage`,waterfall:`Step`,sankey:`From`,scatter:`X`,bubble:`X`}[e.type]??(e.x.kind===`time`?`Date`:`Category`)}function kq(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=t.series[0],r=(e,r=n)=>Z(Q(t,r.key,e),r.format),i=(e,n,r=n.length)=>({caption:t.title,head:e,rows:n.slice(0,500),total:r,truncated:r>500}),a=t.data.map((e,t)=>t);switch(t.type){case`heatmap`:{let e=$K(a.map(e=>$(t,e))),n=eq(t),o=new Map(a.map(e=>[`${ZK(t,e)}\u0000${$(t,e)}`,r(e)]));return i([t.group.label||`Row`,...e],n.map(t=>({head:t,cells:e.map(e=>o.get(`${t}\u0000${e}`)??`-`)})))}case`funnel`:{let e=Q(t,n.key,0);return i([Oq(t),n.label,`Of previous step`,`Of ${$(t,0)}`],a.map(i=>({head:$(t,i),cells:[r(i),i?fq(Q(t,n.key,i),Q(t,n.key,i-1)):`-`,fq(Q(t,n.key,i),e)]})))}case`gauge`:return i([Oq(t),n.label,...t.bands.length?[`Band`]:[]],a.map(e=>({head:t.data[e][t.x.key]==null?n.label:$(t,e),cells:[r(e),...t.bands.length?[_q(t,Q(t,n.key,e))]:[]]})));case`waterfall`:return i([Oq(t),`Change`,`Running total`],yq(t).map(e=>({head:$(t,e.index),cells:[e.total?`-`:wq(e.value,n.format),Z(e.level,n.format)]})));case`treemap`:{let e=xq(t);return i([t.group.label||`Group`,t.x.label||`Item`,n.label,`Share of group`],a.map(i=>({head:ZK(t,i),cells:[$(t,i),r(i),fq(Q(t,n.key,i),e.get(ZK(t,i)))]})))}case`sankey`:return i([Oq(t),t.to.label||`To`,n.label],a.map(e=>({head:$(t,e),cells:[QK(t,e),r(e)]})));case`scatter`:case`bubble`:return i([Oq(t),n.label,...t.size?[t.size.label||t.size.key]:[],...t.group?[t.group.label||`Group`]:[]],a.map(e=>({head:$(t,e),cells:[r(e),...t.size?[Z(t.data[e][t.size.key],t.size.format)]:[],...t.group?[ZK(t,e)]:[]]})))}let o=t.type===`donut`,s=o?t.data.reduce((e,r,i)=>e+(Q(t,n.key,i)??0),0):0,c=[Oq(t),...t.series.map(e=>e.label)];return o&&c.push(`Share`),i(c,a.slice(0,500).map(e=>{let i=t.series.map(t=>r(e,t));if(o){let r=Q(t,n.key,e);i.push(s&&r!=null?Z(r/s,{style:`percent`}):`-`)}return{head:$(t,e),cells:i}}),t.data.length)}function Aq(e){switch(e?.style){case`currency`:case`compact`:return e.currency||e.style===`currency`?` (${e.currency??`INR`})`:``;case`percent`:return` (%)`;case`duration`:return` (${e.unit??`s`})`;default:return``}}function jq(e,t){return e==null?e:t?.unit===`paise`?e/100:t?.style===`percent`?Number((e*100).toPrecision(12)):e}function Mq(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=e=>{if(e==null)return``;let t=String(e);return typeof e==`string`&&/^[=+\-@\t\r]/.test(t)&&(t=`'${t}`),/[",\r\n]/.test(t)?`"${t.replace(/"/g,`""`)}"`:t},r={head:t.x.label||t.x.key,value:e=>{let n=e[t.x.key];return t.x.kind===`time`?QG(n,{pattern:t.x.format?.pattern??`day`,timeZone:t.timeZone}):n}},i=t.series.map(e=>({head:`${e.label}${Aq(e.format)}`,value:t=>jq(HK(t[e.key])?t[e.key]:null,e.format)})),a=t.group?{head:t.group.label||t.group.key,value:e=>e[t.group.key]}:null,o;switch(t.type){case`heatmap`:o=[r,a,...i];break;case`treemap`:o=[a,r,...i];break;case`sankey`:o=[r,{head:t.to.label||t.to.key,value:e=>e[t.to.key]},...i];break;case`bubble`:o=[r,...i,{head:`${t.size.label||t.size.key}${Aq(t.size.format)}`,value:e=>jq(e[t.size.key],t.size.format)},...a?[a]:[]];break;case`scatter`:o=[r,...i,...a?[a]:[]];break;case`gauge`:o=typeof t.x.key==`string`?[r,...i]:i;break;default:o=[r,...i]}let s=[o.map(e=>n(e.head)).join(`,`)];for(let e of t.data)s.push(o.map(t=>n(t.value(e))).join(`,`));return`${s.join(`\r
21
- `)}`}function Nq(e){return(e?.title??``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)||`chart`}var Pq=(e,t,n)=>{if(!t.length)return null;let r=lq(t),i=uq(t);return r===i?`${e} is ${Z(r,n)}.`:`${e} runs from ${Z(r,n)} to ${Z(i,n)}.`};function Fq(e,t=/* @__PURE__ */ new Set){let n=[];e.description&&n.push(e.description.replace(/\.?\s*$/,`.`));let r=rq(e);if(r.length&&r.every(e=>t.has(e)))return n.push(`Every series is hidden.`),n.join(` `);let i=e.data.length,a=e.data.map((e,t)=>t).filter(n=>!aq(e,n,t)),o=e.series[0],s=dq(e,o.key),c=s.reduce((e,t)=>e+t,0),l=()=>e.data.reduce((t,n,r)=>(Q(e,o.key,r)??-1/0)>(Q(e,o.key,t)??-1/0)?r:t,0),u=()=>e.data.reduce((t,n,r)=>(Q(e,o.key,r)??1/0)<(Q(e,o.key,t)??1/0)?r:t,0);switch(e.type){case`donut`:{let t=a.reduce((t,n)=>t+(Q(e,o.key,n)??0),0),r=a.reduce((t,n)=>(Q(e,o.key,n)??-1/0)>(Q(e,o.key,t)??-1/0)?n:t,a[0]);return n.push(`${hK.donut} of ${o.label} in ${a.length} ${a.length===1?`part`:`parts`}, ${Z(t,o.format)} in all.`),a.length&&t&&n.push(`${$(e,r)} is the largest, at ${Z(Q(e,o.key,r)/t,{style:`percent`})}.`),n.join(` `)}case`heatmap`:if(n.push(`${hK.heatmap} of ${o.label} by ${e.group.label||`row`} and ${e.x.label||`column`}, ${i} cells.`),s.length){let t=l(),r=u();n.push(`Highest is ${Iq(e,t)} at ${ZK(e,t)}, ${$(e,t)}; lowest is ${Iq(e,r)} at ${ZK(e,r)}, ${$(e,r)}.`)}return n.join(` `);case`calendar`:return n.push(`${hK.calendar} of ${o.label}, ${i} ${i===1?`day`:`days`}${i>1?`, from ${$(e,0)} to ${$(e,i-1)}`:``}.`),s.length&&n.push(`Highest is ${Iq(e,l())} on ${$(e,l())}; lowest is ${Iq(e,u())} on ${$(e,u())}.`),n.join(` `);case`funnel`:return n.push(`${hK.funnel} of ${o.label} in ${i} stages.`),i>1&&n.push(`${$(e,0)} is ${Iq(e,0)} and ${$(e,i-1)} is ${Iq(e,i-1)}, ${fq(Q(e,o.key,i-1),Q(e,o.key,0))} of the start.`),n.join(` `);case`gauge`:{let t=Q(e,o.key,0),{min:r,max:i}=vq(e),a=t==null?null:gq(e,t);return n.push(`${hK.gauge}: ${o.label} is ${Z(t,o.format)} on a scale from ${Z(r,o.format)} to ${Z(i,o.format)}${a?`, in the ${a.label} band`:``}.`),n.join(` `)}case`waterfall`:{let t=yq(e);if(n.push(`${hK.waterfall} of ${o.label}.`),i>1){let r=t.filter(e=>!e.total);n.push(`It opens at ${Z(t[0].value,o.format)} and closes at ${Z(t[i-1].value,o.format)}.`);let a=r.reduce((e,t)=>t.value>(e?.value??0)?t:e,null),s=r.reduce((e,t)=>t.value<(e?.value??0)?t:e,null);a&&n.push(`The largest rise is ${$(e,a.index)}, ${wq(a.value,o.format)}.`),s&&n.push(`The largest fall is ${$(e,s.index)}, ${wq(s.value,o.format)}.`)}return n.join(` `)}case`treemap`:{let t=xq(e);if(!t.size)return`${hK.treemap} of ${o.label}: no items.`;let[r,a]=[...t].reduce((e,t)=>t[1]>e[1]?t:e);return n.push(`${hK.treemap} of ${o.label}: ${i} items in ${t.size} groups, ${Z(c,o.format)} in all.`),n.push(`${r} is the largest group, at ${fq(a,c)}.`),n.join(` `)}case`sankey`:{let t=$K(e.data.flatMap(t=>[String(t[e.x.key]),String(t[e.to.key])])),r=l();return n.push(`${hK.sankey} of ${o.label}: ${i} flows between ${t.length} places.`),n.push(`The largest flow is ${$(e,r)} to ${QK(e,r)}, ${Iq(e,r)}.`),n.join(` `)}case`scatter`:case`bubble`:{let r=eq(e).filter(e=>!t.has(e));n.push(`${hK[e.type]} of ${o.label} against ${e.x.label||e.x.key}, ${a.length} points${r.length?` in ${r.length} groups: ${r.join(`, `)}`:``}.`);let i=a.map(t=>e.data[t][e.x.key]).filter(HK),s=a.map(t=>Q(e,o.key,t)).filter(e=>e!=null);for(let t of[Pq(e.x.label||String(e.x.key),i,e.x.format),Pq(o.label,s,o.format)])t&&n.push(t);return n.join(` `)}}let d=e.stack===`percent`?`, stacked to 100%`:e.stack===`stacked`?`, stacked`:``,f=e.series.filter(e=>!t.has(e.key));n.push(`${hK[e.type]} of ${f.map(e=>e.label).join(`, `)}${d}${e.type===`multiples`?`, sharing one x axis`:``}.`),i&&n.push(`${i} ${i===1?`point`:`points`}, ${i>1?`from ${$(e,0)} to ${$(e,i-1)}`:$(e,0)}.`);for(let t of f){let r=Pq(t.label,dq(e,t.key),t.format);r&&n.push(r)}return n.join(` `)}var Iq=(e,t)=>Z(Q(e,e.series[0].key,t),e.series[0].format);function Lq(e){return e.stack===`percent`?{style:`percent`,decimals:0}:eK(e.y.format)}var Rq=864e5,zq={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},Bq=[`donut`,`funnel`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`];function Vq(e,t){let n=e.data.map((e,t)=>t).filter(n=>!aq(e,n,t));if(e.type!==`scatter`&&e.type!==`bubble`)return n;let r=t=>e.data[t][e.x.key];return n.sort((e,t)=>r(e)-r(t)||e-t)}function Hq(e){let t=$K(e.data.map((t,n)=>$(e,n))),n=eq(e),r=new Map(e.data.map((r,i)=>[`${t.indexOf($(e,i))},${n.indexOf(ZK(e,i))}`,i]));return{columns:t.length,rows:n.length,at:r,position:r=>[t.indexOf($(e,r)),n.indexOf(ZK(e,r))]}}function Uq(e,t,n,r){if(n===`Escape`)return null;let i=e.data.length;if(!i)return t;if(e.type===`gauge`)return n in zq||n===`Home`||n===`End`?{index:0,series:0}:t;if(e.type===`heatmap`||e.type===`calendar`)return Wq(e,t,n);let a=Bq.includes(e.type),o=e.series.map((e,t)=>r.has(e.key)?-1:t).filter(e=>e>=0),s=a?Vq(e,r):null;if(a?!s.length:!o.length)return t;let c=t??{index:a?s[0]:0,series:a?0:o[0]};if(t==null&&n in zq)return c;if(a){let e=Math.max(0,s.indexOf(c.index));return n===`Home`?{index:s[0],series:0}:n===`End`?{index:s[s.length-1],series:0}:n in zq?{index:s[(e+zq[n]+s.length)%s.length],series:0}:t}if(n===`Home`)return{...c,index:0};if(n===`End`)return{...c,index:i-1};if(!(n in zq))return t;if(e.type===`bar`?n===`ArrowUp`||n===`ArrowDown`:n===`ArrowLeft`||n===`ArrowRight`)return{...c,index:Math.min(i-1,Math.max(0,c.index+zq[n]))};let l=Math.max(0,o.indexOf(c.series)),u=e.type===`bar`?zq[n]:-zq[n];return{...c,series:o[Math.min(o.length-1,Math.max(0,l+u))]}}function Wq(e,t,n){let r=e.data.length,i=e.type===`calendar`,a=i?e.data.map((e,t)=>t).sort((t,n)=>XK(e,t)-XK(e,n)):null,o=i?null:Hq(e),s=t??{index:i?a[0]:0,series:0};if(t==null&&n in zq)return s;if(n===`Home`)return{index:i?a[0]:0,series:0};if(n===`End`)return{index:i?a[r-1]:r-1,series:0};if(!(n in zq))return t;if(i){let t=n===`ArrowDown`||n===`ArrowUp`?zq[n]:zq[n]*7,r=t=>{let n=XK(e,t);return Math.floor((n+TG(n,e.timeZone))/Rq)},i=r(s.index),o=a.filter(e=>t>0?r(e)>i:r(e)<i);if(!o.length)return{index:s.index,series:0};let c=i+t;return{index:o.reduce((e,t)=>Math.abs(r(t)-c)<Math.abs(r(e)-c)?t:e),series:0}}let[c,l]=o.position(s.index),[u,d]=n===`ArrowLeft`||n===`ArrowRight`?[zq[n],0]:[0,zq[n]];return{index:o.at.get(`${c+u},${l+d}`)??s.index,series:0}}Lj([dx,tT,ZT,EL,LI,EI,XF,yL,ZM,KR,gB,CV,ZB,_z,$R,DH,eH,wB,dU,RH,UW,pG]);var Gq=[`series`,`graphic`,`grid`,`xAxis`,`yAxis`,`title`,`visualMap`,`calendar`,`dataZoom`],Kq=e=>String(e).replace(/[{}]/g,e=>e===`{`?`{`:`}`);function qq(e,t,n,r,i=!1){let a=eK(e);if(i)return a.currency?{style:`currency`,currency:a.currency,unit:a.unit,decimals:0}:{style:`number`,decimals:0};if(a.style!==`compact`||!Number.isFinite(t)||!Number.isFinite(n))return a;let o=(n-t)/r;if(!(o>0)||o>=Math.max(Math.abs(t),Math.abs(n))*.02)return a;let s=Math.min(6,Math.max(0,Math.ceil(-Math.log10(o))));return a.currency?{style:`currency`,currency:a.currency,unit:a.unit,decimals:s}:{style:`number`,decimals:s}}var Jq=(e,t)=>{let n=e.filter(e=>e!=null&&Number.isFinite(e));return[Math.min(...t?[0,...n]:n),Math.max(...t?[0,...n]:n)]},Yq=24,Xq=4,Zq=.6,Qq=(e,t)=>String(e).length*t*Zq;function $q(e){let t=String(e??``).trim(),n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);if(n){let e=n[1].length===3?[...n[1]].map(e=>e+e).join(``):n[1];return[0,2,4].map(t=>Number.parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(t);return r?r.slice(1,4).map(Number):null}function eJ(e,t){let n=$q(e);return n?`rgba(${n.join(`,`)},${t})`:String(e??``).trim()}function tJ(e,t,n){let r=$q(e),i=$q(t);return r&&i?`rgb(${r.map((e,t)=>Math.round(e+(i[t]-e)*n)).join(`,`)})`:e}var nJ=e=>e.map(e=>e/255).map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4).reduce((e,t,n)=>e+t*[.2126,.7152,.0722][n],0),rJ=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05);function iJ(e,t){let n=$q(e),r=$q(t.text),i=$q(t.surface);return!n||!r||!i||rJ(nJ(n),nJ(r))>=rJ(nJ(n),nJ(i))?t.text:t.surface}var aJ=(e,t)=>({type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:eJ(e,t)},{offset:1,color:eJ(e,0)}]}),oJ=(e,t)=>e+TG(e,t);function sJ(e){let t=e.x.format?.pattern;return n=>{let r=EG(n,e.timeZone);if(t===`month`||t===`year`)return QG(r,{pattern:t,timeZone:e.timeZone});let i=wG(r,e.timeZone);return i.hour||i.minute?QG(r,{pattern:`time`,timeZone:e.timeZone}):$G(r,{timeZone:e.timeZone})}}function cJ(e,t,n){let r=Xq,i=e=>n?e?[r,0,0,r]:[0,r,r,0]:e?[0,0,r,r]:[r,r,0,0];return e.data.map((n,r)=>{let a={};if(e.stack===`none`){for(let t of e.series)a[t.key]=i((Q(e,t.key,r)??0)<0);return a}let o=null,s=null;for(let n of e.series){let i=Q(e,n.key,r);t.has(n.key)||i==null||i===0||(i>0?o=n.key:s=n.key)}for(let t of e.series)a[t.key]=t.key===o?i(!1):t.key===s?i(!0):0;return a})}function lJ(e,t,n,r){let i=n.width<576,a=r.animation!==!1&&!t.reducedMotion&&tq(e)<=5e3,o=rq(e),s=Object.fromEntries(o.map(e=>[e,!r.hidden.has(e)])),c={palette:t.palette,neutral:t.neutral,seq:t.seq},l={backgroundColor:t.surface,borderColor:t.grid,borderWidth:1,padding:[10,12],confine:!0,className:`wui-chart-tooltip`,extraCssText:`box-shadow:${t.shadow};border-radius:10px;`,textStyle:{fontFamily:t.font,color:t.textBody,fontSize:12},transitionDuration:a?.25:0},u={backgroundColor:`transparent`,animation:a,animationDuration:1e3,animationEasing:`cubicOut`,animationDurationUpdate:650,animationEasingUpdate:`cubicInOut`,textStyle:{fontFamily:t.font,color:t.label},color:t.palette,legend:{show:!1,data:o,selected:s}},d={base:u,tooltipBase:l,colours:c,compact:i,animate:a},f=eY[e.type];if(f)return f(e,t,n,r,d);let p=e.type===`bar`,m=e.x.kind===`time`,h=e.stack===`percent`?oq(e,r.hidden):null,g=p||e.type===`column`?cJ(e,r.hidden,p):null,_=e.series.length===1,v=r.renderer===`canvas`,[y,b]=Jq(e.series.flatMap(t=>e.data.map((n,r)=>Q(e,t.key,r))),!0),x=e.stack===`percent`?Lq(e):qq(e.y.format,e.y.min??y,e.y.max??b,i?3:4,e.y.wholeNumbers),S=h?.some(e=>Object.values(e).some(e=>e!=null&&e<0))?-1:0,C=e.series.findIndex(e=>!r.hidden.has(e.key)),w=e.series.filter(e=>!r.hidden.has(e.key)),T=m&&!e.valueLabels?[]:e.data.map((t,n)=>$(e,n)),E=()=>{let t=e.stack===`percent`?[1,S]:[e.y.max??b,e.y.min??y];return n.width-Math.max(...t.map(e=>Qq(Z(e,x),12)))-20},D=!1;if(e.valueLabels){let t=p?n.width-CJ(T.map(e=>Qq(e,12)))-20:NJ(T.length,E())/Math.max(1,w.length);D=w.flatMap(t=>e.data.map((n,r)=>Q(e,t.key,r))).filter(e=>e!=null).every(e=>Qq(Z(e,x),12)<=t)}let O={type:m?`time`:`category`,boundaryGap:!m&&(e.type===`column`||p),inverse:p,axisLine:{show:!0,lineStyle:{color:t.axis}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{color:t.label,fontSize:12,margin:12,...m||e.type!==`column`||e.x.labelFit===`auto`?{hideOverlap:!0}:FJ(e.x.labelFit,T,E()),...m?{formatter:sJ(e)}:{}},...m?{}:{data:T}},k={type:`value`,splitNumber:i?3:4,min:e.stack===`percent`?S:e.y.min,max:e.stack===`percent`?1:e.y.max,minInterval:e.y.wholeNumbers?1:void 0,interval:e.stack===`percent`?.25:void 0,axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:t.grid,type:`solid`,width:1}},axisLabel:{color:t.label,fontSize:12,formatter:e=>Z(e,x)},...e.y.label?{name:e.y.label,nameLocation:`end`,nameGap:12,nameTextStyle:{color:t.label,fontSize:12,align:p?`right`:`left`}}:{}},A=e.zoom,j=_&&e.type!==`column`&&!p&&!i,ee=e.series.map((n,r)=>{let o=t.palette[r],s=e.data.some((t,r)=>Q(e,n.key,r)!=null&&Q(e,n.key,r-1)==null&&Q(e,n.key,r+1)==null),c=t=>{let r=Q(e,n.key,t),i=h?h[t][n.key]:r;return m?[oJ(XK(e,t),e.timeZone),i]:i},l={id:n.key,name:n.key,stack:e.stack===`none`?void 0:`total`,emphasis:{focus:_?`none`:`series`,blurScope:`coordinateSystem`},blur:{itemStyle:{opacity:.22},lineStyle:{opacity:.22},areaStyle:{opacity:.08}}};if(e.type===`line`||e.type===`area`){let n=e.type===`area`?_||e.stack!==`none`?t.dark?.34:.22:.1:0;return{...l,type:`line`,data:e.data.map((e,t)=>c(t)),smooth:.35,smoothMonotone:`x`,connectNulls:!1,symbol:`circle`,showSymbol:s,symbolSize:8,sampling:v?`lttb`:void 0,lineStyle:{width:2,color:o,..._&&!v?{shadowColor:eJ(o,.35),shadowBlur:10,shadowOffsetY:6}:{}},itemStyle:{color:o,borderColor:t.surface,borderWidth:2},areaStyle:n?{color:aJ(o,n)}:void 0,endLabel:j?{show:!0,formatter:e=>Z(Array.isArray(e.value)?e.value[1]:e.value,x),color:o,fontWeight:600,fontSize:12,distance:8,fontFamily:t.font,valueAnimation:a}:void 0,markLine:r===C?uJ(e,t,!1,a):void 0}}return{...l,type:`bar`,barMaxWidth:Yq,barCategoryGap:i?`28%`:`38%`,itemStyle:{color:o,borderColor:t.surface,borderWidth:e.stack===`none`?0:1},animationDelay:a?e=>e*45+r*110:0,data:e.data.map((e,t)=>({value:c(t),itemStyle:{borderRadius:g[t][n.key]}})),label:e.valueLabels?{show:D,position:p?`right`:`top`,distance:6,fontFamily:t.font,fontSize:12,fontWeight:600,color:t.text,formatter:e=>e.value==null?``:Z(e.value,x)}:void 0,markLine:r===C?uJ(e,t,p,a):void 0}});return{...u,useUTC:m,grid:{left:4,right:j?64:i?8:16,top:e.y.label?28:D&&e.type===`column`?24:12,bottom:A?44:4,outerBoundsMode:`same`},dataZoom:A?ZJ(e,t,t.palette[0],r.zoom):void 0,tooltip:{...l,trigger:`axis`,axisPointer:e.type===`line`||e.type===`area`?{type:`line`,lineStyle:{color:t.axis}}:{type:`shadow`,shadowStyle:{color:eJ(t.neutral,t.dark?.12:.1)}},formatter:t=>Eq(Cq(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,c))},xAxis:p?k:O,yAxis:p?O:k,series:ee}}function uJ(e,t,n,r){if(!e.target)return;let i=e.series[0].format;return{silent:!0,symbol:`none`,animation:r,lineStyle:{color:t.label,type:[5,4],width:1},label:{position:`insideEndTop`,formatter:()=>[e.target.label,Z(e.target.value,i)].filter(Boolean).join(` `),color:t.textMuted,fontSize:12,fontFamily:t.font,backgroundColor:t.surface,padding:[2,6],borderRadius:4},data:[n?{xAxis:e.target.value}:{yAxis:e.target.value}]}}function dJ(e,t,n,r,{base:i,tooltipBase:a,colours:o,compact:s}){let c=e.series[0],l=e.data.map((t,n)=>$(e,n)),u=e.data.reduce((t,n,i)=>t+(r.hidden.has(l[i])?0:Q(e,c.key,i)??0),0);return{...i,tooltip:{...a,trigger:`item`,formatter:t=>Eq(Cq(e,t.dataIndex,r.hidden,o))},graphic:[{type:`group`,left:`center`,top:`middle`,silent:!0,children:[{type:`text`,style:{text:Z(u,eK(c.format)),x:0,y:-10,align:`center`,verticalAlign:`middle`,fill:t.text,fontSize:s?18:22,fontWeight:650,fontFamily:t.font}},{type:`text`,style:{text:e.centerLabel||`Total`,x:0,y:14,align:`center`,verticalAlign:`middle`,fill:t.label,fontSize:12,fontFamily:t.font}}]}],series:[{id:c.key,name:c.key,type:`pie`,radius:s?[`50%`,`70%`]:[`54%`,`72%`],center:[`50%`,`50%`],padAngle:1.6,minAngle:3,startAngle:90,avoidLabelOverlap:!0,itemStyle:{borderRadius:6,borderColor:t.surface,borderWidth:2},animationType:`expansion`,animationDuration:1100,label:s?{show:!1}:{show:!0,position:`outside`,color:t.label,fontFamily:t.font,fontSize:12,lineHeight:16,formatter:e=>`${e.name}\n${Z(e.percent/100,{style:`percent`,decimals:0})}`},labelLine:{length:10,length2:8,smooth:.2,lineStyle:{color:t.axis}},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:6,itemStyle:{shadowBlur:16,shadowColor:`rgba(0,0,0,0.18)`}},data:e.data.map((t,n)=>({name:l[n],value:Q(e,c.key,n)??0,itemStyle:{color:Tq(e,n,o)}}))}]}}var fJ=e=>[...new Set(e)],pJ=(e,t)=>e.data.map((n,r)=>Q(e,t,r));function mJ(e,t){return{...e,trigger:`item`,formatter:e=>t(e)}}var hJ=(e,t,n={})=>({type:`category`,data:t,axisLine:{lineStyle:{color:e.axis}},axisTick:{show:!1},axisLabel:{color:e.label,fontSize:12,margin:12,hideOverlap:!0},...n}),gJ=(e,t,n={})=>({type:`value`,splitNumber:4,axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:e.grid,type:`solid`,width:1}},axisLabel:{color:e.label,fontSize:12,formatter:t},...n});function _J(e,t,n){return{type:`piecewise`,orient:`horizontal`,right:4,bottom:0,pieces:t.map((e,n)=>({gte:e.from,[n===t.length-1?`lte`:`lt`]:e.to,color:e.colour})),itemWidth:11,itemHeight:11,itemGap:3,itemSymbol:`roundRect`,showLabel:!1,text:[`More`,`Less`],textGap:8,selectedMode:!1,textStyle:{color:e.label,fontSize:12,fontFamily:e.font},...n}}function vJ(e,t,n,r,i){let a=e.series[0],o=fJ(e.data.map((t,n)=>$(e,n))),s=eq(e),c=pq(pJ(e,a.key),t.seq);return{...i.base,grid:{left:4,right:4,top:8,bottom:40,outerBoundsMode:`same`},tooltip:mJ(i.tooltipBase,t=>Eq(Cq(e,t.dataIndex,r.hidden,i.colours))),xAxis:hJ(t,o,{axisLine:{show:!1},splitArea:{show:!1}}),yAxis:hJ(t,s,{inverse:!0,axisLine:{show:!1}}),visualMap:_J(t,c),series:[{type:`heatmap`,data:e.data.map((t,n)=>[o.indexOf($(e,n)),s.indexOf(ZK(e,n)),Q(e,a.key,n)??`-`]),itemStyle:{borderColor:t.surface,borderWidth:2,borderRadius:4},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}},progressive:0,animationDuration:800}]}}var yJ=6048e5,bJ=(e,t)=>{let n=wG(e,t);return`${n.year}-${String(n.month+1).padStart(2,`0`)}-${String(n.day).padStart(2,`0`)}`};function xJ(e,t){let n=e.data.map((t,n)=>XK(e,n)).filter(Number.isFinite),r=SJ(n),i=CJ(n),a=Math.ceil((i-r)/yJ)+1,o=Math.floor((t.height-62)/7),s=Math.max(wJ,Math.min(TJ,o,Math.floor((t.width-44)/a))),c=Math.max(1,Math.floor((t.width-44)/s));return{cell:s,from:a>c?i-(c-1)*yJ:r,to:i}}var SJ=e=>e.reduce((e,t)=>t<e?t:e,1/0),CJ=e=>e.reduce((e,t)=>t>e?t:e,-1/0),wJ=9,TJ=24;function EJ(e,t,n,r,i){let a=e.series[0],{cell:o,from:s,to:c}=xJ(e,n),l=pq(pJ(e,a.key),t.seq);return{...i.base,tooltip:mJ(i.tooltipBase,t=>Eq(Cq(e,t.dataIndex,r.hidden,i.colours))),visualMap:_J(t,l,{right:4}),calendar:{range:[bJ(s,e.timeZone),bJ(c,e.timeZone)],top:24,left:34,cellSize:[o,o],splitLine:{show:!1},itemStyle:{color:t.seq[0],borderColor:t.surface,borderWidth:o<16?2:3},dayLabel:{firstDay:1,nameMap:[``,`Mon`,``,`Wed`,``,`Fri`,``],color:t.label,fontSize:12,fontFamily:t.font,margin:8},monthLabel:{color:t.label,fontSize:12,fontFamily:t.font,margin:8},yearLabel:{show:!1}},series:[{type:`heatmap`,coordinateSystem:`calendar`,data:e.data.map((t,n)=>[bJ(XK(e,n),e.timeZone),Q(e,a.key,n)??`-`]),itemStyle:{borderRadius:3,borderColor:t.surface,borderWidth:2},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}}}]}}function DJ(e,t,n,r,i){let a=e.series[0],o=hq(e.data.length,t.seq),s=Q(e,a.key,0);return{...i.base,tooltip:mJ(i.tooltipBase,t=>Eq(Cq(e,t.dataIndex,r.hidden,i.colours))),series:[{type:`funnel`,sort:`none`,gap:3,left:0,right:0,top:4,bottom:4,minSize:`38%`,maxSize:`100%`,funnelAlign:`center`,animationDuration:900,itemStyle:{borderColor:t.surface,borderWidth:0,borderRadius:6},emphasis:{itemStyle:{shadowBlur:14,shadowColor:`rgba(0,0,0,0.18)`}},label:{show:!0,position:`inside`,fontFamily:t.font,lineHeight:17},data:e.data.map((n,r)=>{let i=iJ(o[r],t),c=Q(e,a.key,r),l=r?`${fq(c,Q(e,a.key,r-1))} of previous step`:`${fq(c,s)} of ${Kq($(e,0))}`;return{name:$(e,r),value:c??0,itemStyle:{color:o[r]},label:{formatter:`{n|${Kq($(e,r))}} {v|${Kq(Z(c,a.format))}}\n{p|${r?l:`first stage`}}`,rich:{n:{color:i,fontSize:12.5,fontWeight:500,fontFamily:t.font},v:{color:i,fontSize:13,fontWeight:700,fontFamily:t.font},p:{color:eJ(i,.78),fontSize:12,fontFamily:t.font}}}}})}]}}function OJ(e,t,n,r,i){let a=e.series[0],{min:o,max:s}=vq(e),c=Q(e,a.key,0),l=c??o,u=c==null?null:gq(e,c),d=t.palette[0],f=s-o||1,p=e.bands.length?e.bands.map((e,n)=>[Math.min(1,Math.max(0,(e.upTo-o)/f)),t.seq[1+Math.min(n,3)]]):[[1,t.grid]];return e.bands.length&&p[p.length-1][0]<1&&p.push([1,t.grid]),{...i.base,tooltip:mJ(i.tooltipBase,()=>Eq(Cq(e,0,r.hidden,i.colours))),series:[{type:`gauge`,startAngle:215,endAngle:-35,min:o,max:s,radius:`96%`,center:[`50%`,`58%`],splitNumber:10,pointer:{show:!1},anchor:{show:!1},progress:{show:c!=null,width:14,roundCap:!0,itemStyle:{color:d,shadowBlur:i.animate?12:0,shadowColor:eJ(d,.35)}},axisLine:{roundCap:!0,lineStyle:{width:14,color:p}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{offsetCenter:[0,`30%`],color:t.label,fontSize:12.5,fontFamily:t.font},detail:{valueAnimation:i.animate,offsetCenter:[0,`-4%`],fontFamily:t.font,formatter:e=>`{v|${Kq(c==null?Z(null):Z(e,a.format))}}{u|/${Kq(Z(s,a.format))}}${u?`\n{s|${Kq(u.label)}}`:``}`,rich:{v:{fontSize:36,fontWeight:650,color:t.text,fontFamily:t.font,padding:[0,2,0,0]},u:{fontSize:14,color:t.label,fontFamily:t.font,padding:[12,0,0,0]},s:{fontSize:12,color:t.label,fontFamily:t.font,padding:[8,0,0,0]}}},data:[{value:l,name:e.data[0]?.[e.x.key]==null?a.label:$(e,0)}]}]}}function kJ(e){let t=CJ(e.map(e=>e.level).concat(e.map(e=>e.from),e.map(e=>e.to))),n=SJ(e.filter(e=>!e.total).map(e=>Math.min(e.from,e.to)).concat(e.filter(e=>e.total).map(e=>e.value))),r=CJ(e.filter(e=>!e.total).map(e=>Math.abs(e.value)));if(!(t>0)||!(n>t*.4)||!(r<t*.15))return null;let i=10**Math.floor(Math.log10(t))/10,a=Math.round(t*.08/i)*i,o=Math.floor(n*.965/i)*i;return o>a?{start:a,end:o}:null}var AJ=4,jJ=72,MJ=12,NJ=(e,t)=>Math.floor(t/Math.max(1,e)-AJ);function PJ(e,t){return CJ(e.flatMap(e=>String(e).split(/\s+/)).map(e=>Qq(e,MJ)))<=t?{interval:0,width:t,overflow:`break`}:{interval:0,rotate:45,width:jJ,overflow:`truncate`}}function FJ(e,t,n){let r=NJ(t.length,n);return e===`all`?{...PJ(t,r),hideOverlap:!1}:e===`rotate`?{interval:0,rotate:45,width:jJ,overflow:`truncate`,hideOverlap:!1}:e===`ellipsis`?{interval:0,rotate:0,width:Math.max(1,r),overflow:`truncate`,hideOverlap:!1}:{hideOverlap:!0}}function IJ(e,t,n){let r=NJ(e.length,n),i=PJ(e,r);return{nameSize:MJ,valueSize:12,category:`rotate`in i?{...i,hideOverlap:!0}:i,showValues:t.every(e=>Qq(e,12)<=r)}}function LJ(e,t,n,r,i){let a=e.series[0],o=yq(e),s=Lq(e),c=kJ(o),l=t=>Sq(e,t.index,i.colours),u=o.map(t=>$(e,t.index)),d=o.map(e=>e.total?Z(e.value,s):wq(e.value,s)),f=o.flatMap(e=>[e.from,e.to]),p=Math.max(Qq(Z(CJ(f),s),11),Qq(Z(SJ(f),s),11))+8,m=IJ(u,d,n.width-p-12);return{...i.base,grid:{left:4,right:8,top:28,bottom:4,outerBoundsMode:`same`},tooltip:{...i.tooltipBase,trigger:`axis`,axisPointer:{type:`shadow`,shadowStyle:{color:eJ(t.neutral,.1)}},formatter:t=>Eq(Cq(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:hJ(t,u,{axisLabel:{color:t.label,fontSize:m.nameSize,margin:12,...m.category}}),yAxis:gJ(t,e=>Z(e,s),{min:0,splitNumber:5,...c?{breaks:[{start:c.start,end:c.end,gap:`6%`}],breakArea:{show:!0,itemStyle:{color:t.surface,borderColor:t.axis,borderWidth:1,borderType:`solid`,opacity:1},zigzagAmplitude:3,zigzagZ:200}}:{}}),series:[{type:`line`,step:`end`,data:o.map(e=>e.level),symbol:`none`,silent:!0,z:1,lineStyle:{color:t.axis,width:1},tooltip:{show:!1},animation:!1,emphasis:{disabled:!0}},{type:`bar`,stack:`w`,data:o.map(e=>Math.min(e.from,e.to)),silent:!0,itemStyle:{color:`transparent`},emphasis:{disabled:!0},tooltip:{show:!1},barMaxWidth:48},{name:a.key,type:`bar`,stack:`w`,z:3,barMaxWidth:48,barCategoryGap:`34%`,itemStyle:{borderRadius:5},emphasis:{itemStyle:{shadowBlur:10,shadowColor:`rgba(0,0,0,0.15)`}},animationDelay:i.animate?e=>e*140:0,label:{show:m.showValues,position:`top`,distance:6,fontFamily:t.font,fontSize:m.valueSize,fontWeight:600,color:t.text,formatter:e=>d[e.dataIndex]},data:o.map(e=>({value:Math.abs(e.to-e.from),itemStyle:{color:l(e)}}))}]}}function RJ(e){let t=e.series[0].key;return eq(e).map(n=>({name:n,rows:e.data.map((e,t)=>t).filter(t=>ZK(e,t)===n).sort((n,r)=>Q(e,t,r)-Q(e,t,n)||n-r)}))}function zJ(e,t,n,r,i){let a=e.series[0],o=xq(e),s=[...o.values()].reduce((e,t)=>e+t,0),c=(e,t)=>{let r=e/s*n.width*n.height*.82;return r>5200&&Math.max(Qq(t[0],12),Qq(t[1],11.5))+20<=Math.sqrt(r)},l=RJ(e).map(({name:n,rows:r},i)=>{let s=o.get(n),l=t.palette[i%t.palette.length],u=iJ(l,t);return{name:n,value:s,itemStyle:{color:l,borderColor:l},upperLabel:{color:u,formatter:`{n|${Kq(n)}} {v|${Kq(Z(s,a.format))}}`,rich:{n:{fontWeight:600,fontSize:12,color:u,fontFamily:t.font},v:{fontSize:12,color:eJ(u,.8),fontFamily:t.font}}},children:r.map((n,r)=>{let i=tJ(l,t.surface,Math.min(.55,r*.14)),o=iJ(i,t),s=Q(e,a.key,n);return{name:$(e,n),value:s,row:n,itemStyle:{color:i},label:{show:c(s,[$(e,n),Z(s,a.format)]),formatter:`{n|${Kq($(e,n))}}\n{v|${Kq(Z(s,a.format))}}`,rich:{n:{color:o,fontSize:12,fontWeight:500,fontFamily:t.font,lineHeight:16},v:{color:eJ(o,.82),fontSize:12,fontFamily:t.font}}}}})}});return{...i.base,tooltip:mJ(i.tooltipBase,t=>t.data?.row==null?Eq({title:t.name,rows:[{color:t.color,label:a.label,value:Z(t.value,a.format)},{label:`Share of all`,value:fq(t.value,s)}],foot:``}):Eq(Cq(e,t.data.row,r.hidden,i.colours))),series:[{type:`treemap`,roam:!1,nodeClick:!1,breadcrumb:{show:!1},left:0,right:0,top:0,bottom:0,animationDurationUpdate:700,label:{show:!0,position:`insideTopLeft`,padding:[8,10],overflow:`truncate`,fontFamily:t.font},upperLabel:{show:!0,height:28,padding:[0,10],fontFamily:t.font},levels:[{itemStyle:{borderWidth:0,gapWidth:4,borderColor:t.surface}},{itemStyle:{borderWidth:3,gapWidth:2,borderRadius:8}},{itemStyle:{borderWidth:0,gapWidth:0,borderRadius:5},emphasis:{itemStyle:{borderColor:t.text,borderWidth:0}}}],data:l}]}}function BJ(e){let t=e.data.map(t=>[String(t[e.x.key]),String(t[e.to.key])]),n=new Map(t.flatMap(([e,t])=>[[e,0],[t,0]]));for(let e=0;e<n.size;e+=1)for(let[e,r]of t)n.set(r,Math.max(n.get(r),n.get(e)+1));return n}function VJ(e,t,n,r,i){let a=e.series[0],o=bq(e,t.palette),s=BJ(e),c=CJ([...s.values()]),l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map;e.data.forEach((t,n)=>{let r=Q(e,a.key,n)??0;l.set(String(t[e.x.key]),(l.get(String(t[e.x.key]))??0)+r),u.set(String(t[e.to.key]),(u.get(String(t[e.to.key]))??0)+r)});let d=e=>u.get(e)??l.get(e)??0,f=e=>({position:e,color:t.text,fontFamily:t.font,fontSize:12,formatter:e=>`{n|${Kq(e.name)}}\n{v|${Z(d(e.name),{style:`compact`})}}`,rich:{n:{color:t.textBody,fontSize:12,fontFamily:t.font,lineHeight:15},v:{color:t.label,fontSize:12,fontFamily:t.font}}});return{...i.base,tooltip:mJ(i.tooltipBase,t=>Eq(t.dataType===`edge`?Cq(e,t.dataIndex,r.hidden,i.colours):{title:t.name,rows:[{color:t.color,label:a.label,value:Z(d(t.name),a.format)}],foot:``})),series:[{type:`sankey`,left:0,right:0,top:6,bottom:6,nodeWidth:10,nodeGap:i.compact?10:14,nodeAlign:`justify`,draggable:!1,layoutIterations:64,animationDuration:1200,emphasis:{focus:`adjacency`,lineStyle:{opacity:.55}},itemStyle:{borderWidth:0,borderRadius:3},lineStyle:{curveness:.5},levels:Array.from({length:c+1},(e,t)=>({depth:t,label:f(t===c&&c>0?`left`:`right`)})),data:[...s.keys()].map(e=>({name:e,itemStyle:{color:o.get(e)}})),links:e.data.map(n=>({source:String(n[e.x.key]),target:String(n[e.to.key]),value:n[a.key],lineStyle:{color:o.get(String(n[e.x.key])),opacity:t.dark?.32:.26}}))}]}}function HJ(e){let t=e.length,n=e.reduce((e,t)=>e+t[0],0)/t,r=e.reduce((e,t)=>e+t[1],0)/t,i=e.reduce((e,t)=>e+(t[0]-n)**2,0);if(!t||!i)return null;let a=e.reduce((e,t)=>e+(t[0]-n)*(t[1]-r),0)/i,o=SJ(e.map(e=>e[1])),s=CJ(e.map(e=>e[1])),c=e=>{let t=r+a*(e-n);return t<o?[e+(o-t)/a,o]:t>s?[e+(s-t)/a,s]:[e,t]};return[c(SJ(e.map(e=>e[0]))),c(CJ(e.map(e=>e[0])))]}var UJ=44,WJ=28,GJ=8;function KJ(e,t,n,r,i){let a=e.series[0],o=eq(e),s=e.type===`bubble`,c=CJ(s?e.data.map(t=>t[e.size.key]):[]),l=e=>Math.max(GJ,(i.compact?WJ:UJ)*Math.sqrt(e/c)),u=t=>e.data.map((e,t)=>t).filter(n=>!e.group||ZK(e,n)===t),d=(e.group?o:[null]).filter(e=>e==null||!r.hidden.has(e)).flatMap(e=>u(e)),f=e.trend?HJ(d.map(t=>[e.data[t][e.x.key],Q(e,a.key,t)])):null,p=e.data.map(t=>t[e.x.key]),m=e.data.map((t,n)=>Q(e,a.key,n)),[h,g]=Jq(p,!1),[_,v]=Jq(m,!1),y=qq(e.y.format,e.y.min??_,e.y.max??v,4),b=qq(e.x.format,h,g,4),x=(e.group?o:[null]).map((n,r)=>({name:n??a.key,type:`scatter`,symbolSize:s?e=>l(e[2]):i.compact?8:10,itemStyle:{color:eJ(t.palette[r],.85),borderColor:t.surface,borderWidth:1.5},emphasis:{focus:`series`,scale:1.5,itemStyle:{color:t.palette[r]}},blur:{itemStyle:{opacity:.15}},animationDelay:i.animate?e=>e*6+r*120:0,data:u(n).map(t=>({value:[e.data[t][e.x.key],Q(e,a.key,t),...s?[e.data[t][e.size.key]]:[]],row:t}))}));return f&&x.push({name:`Trend`,type:`line`,data:f,symbol:`none`,silent:!0,z:1,tooltip:{show:!1},lineStyle:{color:t.label,width:1.5,type:[6,4]},emphasis:{disabled:!0},endLabel:{show:!0,formatter:`Trend`,color:t.label,fontSize:12,fontFamily:t.font,offset:[-30,-12]}}),{...i.base,grid:{left:4,right:16,top:e.y.label?28:12,bottom:e.x.label?24:4,outerBoundsMode:`same`},tooltip:mJ(i.tooltipBase,t=>t.data?.row==null?``:Eq(Cq(e,t.data.row,r.hidden,i.colours))),xAxis:gJ(t,e=>Z(e,b),{scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t.axis}},...e.x.label?{name:e.x.label,nameLocation:`middle`,nameGap:28,nameTextStyle:{color:t.label,fontSize:12,fontFamily:t.font}}:{}}),yAxis:gJ(t,e=>Z(e,y),{min:e.y.min,max:e.y.max,...e.y.label?{name:e.y.label,nameLocation:`end`,nameGap:12,nameTextStyle:{color:t.label,fontSize:12,fontFamily:t.font,align:`left`}}:{}}),series:x}}var qJ=32,JJ=8,YJ=26;function XJ(e,t,n,r,i){let a=e.x.kind===`time`,o=e.series.length,s=(n.height-6-YJ)/o,c=s-qJ-JJ,l=t.palette[0],u=e.data.map((t,n)=>$(e,n)),d=e.series.flatMap((n,r)=>{let i=pJ(e,n.key).filter(e=>e!=null).pop();return[{text:n.label,left:0,top:6+r*s,textStyle:{fontSize:12.5,fontWeight:600,color:t.text,fontFamily:t.font}},{text:`Latest ${Z(i,n.format)}`,right:8,top:7+r*s,textStyle:{fontSize:12,fontWeight:500,color:t.label,fontFamily:t.font}}]}),f=(t,n)=>{let r=Q(e,t.key,n);return a?[oJ(XK(e,n),e.timeZone),r]:r};return{...i.base,useUTC:a,title:d,grid:e.series.map((e,t)=>({left:52,right:8,top:6+t*s+qJ,height:c})),axisPointer:{link:[{xAxisIndex:`all`}],lineStyle:{color:t.axis},label:{show:!1}},tooltip:{...i.tooltipBase,trigger:`axis`,axisPointer:{type:`line`,lineStyle:{color:t.axis}},formatter:t=>Eq(Cq(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:e.series.map((n,r)=>({...a?{type:`time`}:hJ(t,u,{boundaryGap:!1}),gridIndex:r,axisLine:{lineStyle:{color:r===o-1?t.axis:t.grid}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:r===o-1,color:t.label,fontSize:12,hideOverlap:!0,margin:10,...a?{formatter:sJ(e)}:{}}})),yAxis:e.series.map((n,r)=>{let[i,a]=Jq(pJ(e,n.key),!1),o=qq(n.format,e.y.min??i,e.y.max??a,2);return gJ(t,e=>Z(e,o),{gridIndex:r,splitNumber:2,scale:e.y.min==null,min:e.y.min,max:e.y.max,axisLabel:{color:t.label,fontSize:12,formatter:e=>Z(e,o)}})}),series:e.series.map((n,r)=>({id:n.key,name:n.key,type:`line`,xAxisIndex:r,yAxisIndex:r,data:e.data.map((e,t)=>f(n,t)),smooth:.3,symbol:`circle`,showSymbol:!1,symbolSize:7,lineStyle:{width:1.75,color:l},itemStyle:{color:l,borderColor:t.surface,borderWidth:2},areaStyle:{color:aJ(l,t.dark?.26:.16)},animationDelay:i.animate?r*160:0,emphasis:{disabled:!0}}))}}function ZJ(e,t,n,r){let i=r?.start??(e.data.length>5e3?70:0),a=r?.end??100;return[{type:`inside`,start:i,end:a},{type:`slider`,start:i,end:a,height:26,bottom:8,left:52,right:12,borderColor:`transparent`,backgroundColor:t.grid,borderRadius:6,fillerColor:eJ(n,t.dark?.22:.12),handleStyle:{color:t.surface,borderColor:t.axis},moveHandleSize:0,brushSelect:!1,dataBackground:{lineStyle:{color:t.axis,width:.75},areaStyle:{color:eJ(t.neutral,.15)}},selectedDataBackground:{lineStyle:{color:n,width:.75},areaStyle:{color:eJ(n,.18)}},textStyle:{color:t.label,fontSize:12,fontFamily:t.font}}]}function QJ(e,t,n){switch(e.type){case`scatter`:case`bubble`:{if(!e.group)return{seriesIndex:0,dataIndex:n};let t=ZK(e,n),r=e.data.map((e,t)=>t).filter(n=>ZK(e,n)===t);return{seriesIndex:eq(e).indexOf(t),dataIndex:r.indexOf(n)}}case`waterfall`:return{seriesIndex:2,dataIndex:n};case`sankey`:return{seriesIndex:0,dataIndex:n,dataType:`edge`,tip:!1};case`treemap`:{let t=1;for(let r of RJ(e)){let e=r.rows.indexOf(n);if(e>=0)return{seriesIndex:0,dataIndex:t+1+e};t+=1+r.rows.length}return{seriesIndex:0,dataIndex:n}}case`gauge`:case`donut`:case`heatmap`:case`calendar`:case`funnel`:return{seriesIndex:0,dataIndex:n};default:return{seriesIndex:t,dataIndex:n}}}function $J(e,t){switch(e.type){case`scatter`:case`bubble`:return t.data?.row==null?null:{series:0,row:t.data.row};case`treemap`:return t.data?.row==null?null:{series:0,row:t.data.row};case`sankey`:return t.dataType===`edge`?{series:0,row:t.dataIndex}:null;case`waterfall`:return t.seriesIndex===2?{series:0,row:t.dataIndex}:null;case`line`:case`area`:case`column`:case`bar`:case`multiples`:return{series:t.seriesIndex,row:t.dataIndex};default:return{series:0,row:t.dataIndex}}}var eY={donut:dJ,heatmap:vJ,calendar:EJ,funnel:DJ,gauge:OJ,waterfall:LJ,treemap:zJ,sankey:VJ,scatter:KJ,bubble:KJ,multiples:XJ};function tY(e,t,n,r,{pixelRatio:i=2}={}){let a=document.createElement(`div`);a.style.cssText=`position:fixed;left:-10000px;top:0;width:${n.width}px;height:${n.height}px;`,document.body.append(a);let o=_j(a,null,{renderer:`canvas`,devicePixelRatio:i,width:n.width,height:n.height});try{return o.setOption(lJ(e,t,n,{...r,renderer:`canvas`,animation:!1})),o.getDataURL({type:`png`,pixelRatio:i,backgroundColor:t.surface})}finally{o.dispose(),a.remove()}}function nY(e,{renderer:t}){let n=_j(e,null,{renderer:t}),r=!1,i=null;return{renderer:t,render(e,t,a,o,{replace:s=!1}={}){let c=r&&!s?n.getOption()?.dataZoom?.[0]:null,l=Number.isFinite(c?.start)&&Number.isFinite(c?.end)?{start:c.start,end:c.end}:null,u=lJ(e,t,a,{...o,zoom:l});i=e,n.setOption(u,s||!r?{notMerge:!0}:{replaceMerge:Gq}),r=!0},focusPoint(e,t){let{tip:r=!0,...a}=QJ(i,e,t);n.dispatchAction({type:`downplay`}),n.dispatchAction({type:`highlight`,...a}),r&&n.dispatchAction({type:`showTip`,...a})},clearFocus(){n.dispatchAction({type:`hideTip`}),n.dispatchAction({type:`downplay`})},resize(){n.resize()},onSelect(e){n.on(`click`,t=>{if(t.componentType!==`series`)return;let n=$J(i,t);n&&e({seriesIndex:n.series,dataIndex:n.row})})},onFinished(e){n.on(`finished`,e)},dispose(){n.dispose()}}}var rY=typeof HTMLElement>`u`?class{}:HTMLElement,iY=`wui-chart:select`,aY=`wui-chart:legend-change`,oY=`wui-chart:ready`,sY=[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`],cY=`(prefers-color-scheme: dark)`,lY=`(prefers-reduced-motion: reduce)`,uY=e=>typeof window.matchMedia==`function`?window.matchMedia(e):null,dY=!1;function fY(e){let t=getComputedStyle(e),n=e=>t.getPropertyValue(e).trim(),r=e.closest(`[data-bs-theme], [data-theme]`)??document.documentElement,i=r.getAttribute(`data-bs-theme`)||r.getAttribute(`data-theme`),a={palette:[1,2,3,4,5,6,7,8].map(e=>n(`--color-chart-${e}`)),seq:[0,1,2,3,4,5,6].map(e=>n(`--color-chart-seq-${e}`)),neutral:n(`--color-chart-neutral`),grid:n(`--color-chart-grid`),axis:n(`--color-chart-axis`),label:n(`--color-chart-label`),surface:n(`--color-surface`),text:n(`--color-text`),textBody:n(`--color-text-body`),textMuted:n(`--color-text-muted`),shadow:n(`--wui-shadow-popover`),font:t.fontFamily,dark:i===`dark`||i===`auto`&&!!uY(cY)?.matches,reducedMotion:!!uY(lY)?.matches};return!a.palette[0]&&!dY&&(dY=!0,_G(`[@webority/ui-elements] <wui-chart> found no --color-chart-* colours: load @webority/theme on the page.`)),a}var pY=/* @__PURE__ */ new Set,mY=null;function hY(e){if(pY.add(e),mY)return;let t=()=>{for(let e of pY)e._themeChanged()},n=new MutationObserver(t);n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`data-bs-theme`,`class`]});let r=new MutationObserver(t);r.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[`data-theme`,`data-bs-theme`]});let i=[uY(cY),uY(lY)].filter(Boolean);for(let e of i)e.addEventListener?.(`change`,t);mY=()=>{n.disconnect(),r.disconnect();for(let e of i)e.removeEventListener?.(`change`,t);mY=null}}function gY(e){pY.delete(e),pY.size||mY?.()}function _Y(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.append(n),n.click(),n.remove()}var vY=(e,t,n)=>{let r=document.createElement(e);return t&&(r.className=t),n!=null&&(r.textContent=n),r},yY=0,bY=class extends rY{static get observedAttributes(){return[`view`]}constructor(){super(),yY+=1,this.uid=`wui-chart-${yY}`,this._spec=null,this._normal=null,this._hidden=/* @__PURE__ */ new Set,this._focus=null}get spec(){return this._spec}set spec(e){this._spec=e??null,this._normal=null,this._clearFocus(),this._parts&&this._update()}get view(){return this.getAttribute(`view`)===`table`?`table`:`chart`}set view(e){this.setAttribute(`view`,String(e??`chart`))}connectedCallback(){if(Object.hasOwn(this,`spec`)){let e=this.spec;delete this.spec,this._spec=e??null}this._spec??=this._readScript(),this._spec==null&&!this.querySelector(`:scope > script[type='application/json']`)&&(this._awaitingSpec=!0,queueMicrotask(()=>{this._awaitingSpec=!1,this._parts&&this._update()})),this._build(),hY(this),this._theme=fY(this),this._width=this.clientWidth,this._resizeObserver=new ResizeObserver(()=>this._resized()),this._resizeObserver.observe(this),typeof IntersectionObserver==`function`?(this._visible=!1,this._intersection=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(this._intersection.disconnect(),this._visible=!0,this._update())},{threshold:.05}),this._intersection.observe(this)):this._visible=!0,this._update()}disconnectedCallback(){gY(this),this._resizeObserver?.disconnect(),this._intersection?.disconnect(),this._engine?.dispose(),this._engine=null,this._drawn=!1,this._parts=null,this.removeAttribute(`data-ready`)}attributeChangedCallback(e,t,n){t!==n&&this._parts&&(zK(`view`,n,oK),this._update())}toCsv(){let{spec:e}=this._normalized();return e?Mq(e):``}toPng(){let{spec:e}=this._normalized();return e?tY(e,this._theme??fY(this),this._size(e),{hidden:this._hidden,renderer:nq(e)}):``}exportCsv(e){let t=URL.createObjectURL(new Blob([this.toCsv()],{type:`text/csv;charset=utf-8`}));_Y(t,e??`${Nq(this._normalized().spec)}.csv`),setTimeout(()=>URL.revokeObjectURL(t),2e3)}exportPng(e){let t=this.toPng();t&&_Y(t,e??`${Nq(this._normalized().spec)}.png`)}_readScript(){let e=this.querySelector(`:scope > script[type="application/json"]`);if(!e)return null;try{return JSON.parse(e.textContent)}catch(e){return vG(`[@webority/ui-elements] <wui-chart> could not read its JSON spec:`,e?.message),null}}_normalized(){return this._normal??=GK(this._spec),this._normal}_build(){let e=vY(`div`,`wui-chart-legend`);e.setAttribute(`role`,`group`),e.setAttribute(`aria-label`,`Legend`),e.hidden=!0,e.addEventListener(`click`,e=>{let t=e.target.closest?.(`.wui-chart-legend-item`);t&&this._toggle(t.dataset.key)});let t=vY(`div`,`wui-chart-surface`);t.tabIndex=0,t.setAttribute(`role`,`group`),t.setAttribute(`aria-roledescription`,`chart`),t.addEventListener(`keydown`,e=>this._onKey(e)),t.addEventListener(`blur`,()=>this._clearFocus());let n=vY(`div`,`wui-chart-canvas`);n.setAttribute(`aria-hidden`,`true`),t.append(n);let r=vY(`div`,`wui-chart-state`);r.setAttribute(`role`,`status`),r.hidden=!0;let i=vY(`div`,`wui-chart-table-wrap visually-hidden`),a=vY(`p`,`visually-hidden`);a.id=`${this.uid}-summary`;let o=vY(`div`,`visually-hidden`);o.setAttribute(`aria-live`,`polite`),this.replaceChildren(e,t,r,i,a,o),this.setAttribute(`role`,`figure`),this.setAttribute(`aria-describedby`,a.id),this._parts={legend:e,surface:t,canvas:n,state:r,tableWrap:i,summary:a,live:o},this._legendSignature=null,this._tableSpec=null}_size(e){return{width:this._parts?.surface.clientWidth||this.clientWidth||800,height:e.height}}_update(){if(!this._parts||this._awaitingSpec&&this._spec==null)return;let{spec:e,problem:t}=this._normalized(),n=this._parts,r=t?`error`:e.state===`ready`&&(!e.data.length||!YK(e))?`empty`:e.state,i=`${e?.height??320}px`,a=this.view===`table`,o=e&&(r===`ready`||r===`loading`&&this._drawn),s=r===`loading`&&o;if(this.setAttribute(`aria-label`,e?.title||`Chart`),r===`loading`?this.setAttribute(`aria-busy`,`true`):this.removeAttribute(`aria-busy`),this.setAttribute(`data-state`,r),n.surface.setAttribute(`aria-label`,`${e?.title||`Chart`}: use the arrow keys to read the values`),n.summary.textContent=e?Fq(e,this._hidden):``,e){if(!s){let t=new Set(rq(e));for(let e of this._hidden)t.has(e)||this._hidden.delete(e)}this._renderTable(e)}else n.tableWrap.replaceChildren();s||this._renderLegend(e,o&&!a),this._renderState(r,t??(r===`error`?e.errorText:r===`loading`?e?.loadingText??`Loading chart`:e?.emptyText),i,o);let c=r===`ready`&&!a;s||this.toggleAttribute(`data-ready`,!c);let l=n.surface.hidden&&o&&!a;n.surface.hidden=!o||a,n.surface.style.height=i,n.tableWrap.className=a&&e?`wui-chart-table-wrap`:`wui-chart-table-wrap visually-hidden`,n.tableWrap.style.height=a&&e?i:``,a&&e?(n.tableWrap.tabIndex=0,n.tableWrap.setAttribute(`role`,`region`),n.tableWrap.setAttribute(`aria-label`,`${e.title||`Chart`} data`)):(n.tableWrap.removeAttribute(`tabindex`),n.tableWrap.removeAttribute(`role`),n.tableWrap.removeAttribute(`aria-label`)),l&&this._engine?.resize(),r===`ready`&&!a&&this._visible&&this._draw()}_renderState(e,t,n,r){let i=this._parts.state,a=!r&&e!==`ready`;i.hidden=!a,a?(i.style.height=n,e===`loading`?i.replaceChildren(vY(`div`,`skeleton wui-chart-skeleton`),vY(`span`,`visually-hidden`,t)):i.replaceChildren(vY(`p`,`wui-chart-state-text`,t))):i.replaceChildren()}_colour(e,t){return e.type===`donut`?Sq(e,t,this._theme):this._theme.palette[t]}_renderLegend(e,t){let n=this._parts.legend,r=e?rq(e):[],i=!!e&&t&&r.length>=2;if(n.hidden=!i,!i)return;let a=iq(e),o=r.map((t,n)=>this._colour(e,n)),s=JSON.stringify([e.type,r,a,o]);s!==this._legendSignature&&(this._legendSignature=s,n.replaceChildren(...r.map((t,n)=>{let r=vY(`button`,`wui-chart-legend-item`);r.type=`button`,r.dataset.key=t;let i=vY(`span`,e.type===`line`?`wui-chart-legend-swatch wui-chart-legend-swatch-line`:`wui-chart-legend-swatch`);return i.style.background=o[n],r.append(i,vY(`span`,`wui-chart-legend-label`,a[n])),r})));for(let e of n.children)e.setAttribute(`aria-pressed`,String(!this._hidden.has(e.dataset.key)))}_renderTable(e){if(this._tableSpec===e)return;this._tableSpec=e;let t=kq(e),n=vY(`table`,`wui-chart-table`);n.append(vY(`caption`,`visually-hidden`,t.caption));let r=vY(`tr`);t.head.forEach((e,t)=>{let n=vY(`th`,t?`wui-chart-num`:null,e);n.scope=`col`,r.append(n)});let i=vY(`thead`);i.append(r),n.append(i);let a=vY(`tbody`);for(let e of t.rows){let t=vY(`tr`),n=vY(`th`,null,e.head);n.scope=`row`,t.append(n,...e.cells.map(e=>vY(`td`,`wui-chart-num`,e))),a.append(t)}n.append(a);let o=[n];t.truncated&&o.push(vY(`p`,`wui-chart-table-note`,`Showing the first ${t.rows.length} of ${t.total} rows. Download the CSV for all of them.`)),this._parts.tableWrap.replaceChildren(...o)}_draw(){let{spec:e}=this._normalized(),t=nq(e),n=e.type!==this._drawnType;this._engine&&this._engine.renderer!==t&&(this._engine.dispose(),this._engine=null);let r=`${e.height}px`,i=this._parts.canvas.style.height!==r;this._parts.canvas.style.height=r,i&&this._engine?.resize(),this._engine||(this._engine=nY(this._parts.canvas,{renderer:t}),this._engine.onSelect(({seriesIndex:e,dataIndex:t})=>this._select(e,t)),this._engine.onFinished(()=>{this.setAttribute(`data-ready`,``),this._announcedReady||(this._announcedReady=!0,this.dispatchEvent(new CustomEvent(oY,{bubbles:!0,detail:{renderer:t}})))}),n=!0),this._engine.render(e,this._theme,this._size(e),{hidden:this._hidden,renderer:t},{replace:n}),this._drawnType=e.type,this._drawn=!0}_themeChanged(){if(!this._parts)return;let e=fY(this);JSON.stringify(e)!==JSON.stringify(this._theme)&&(this._theme=e,this._update())}_resized(){let e=this.clientWidth;e!==this._width&&(this._width=e,this._engine&&this._drawn&&(this._parts.surface.hidden||this._engine.resize(),this._update()))}_toggle(e){let{spec:t}=this._normalized();if(!t||e==null)return;this._hidden.has(e)?this._hidden.delete(e):this._hidden.add(e),this._clearFocus(),this._update();let n=Object.fromEntries(rq(t).map(e=>[e,!this._hidden.has(e)]));this.dispatchEvent(new CustomEvent(aY,{bubbles:!0,detail:{visible:n}}))}_onKey(e){let{spec:t}=this._normalized();if(!t||!this._engine||this.view===`table`||e.altKey||e.ctrlKey||e.metaKey)return;if(e.key===`Enter`){if(!this._focus)return;e.preventDefault(),this._select(this._focus.series,this._focus.index);return}if(!sY.includes(e.key)||e.key===`Escape`&&!this._focus)return;e.preventDefault();let n=Uq(t,this._focus,e.key,this._hidden);n?(this._focus=n,this._engine.focusPoint(n.series,n.index),this._announce(Dq(Cq(t,n.index,this._hidden,this._theme)))):this._clearFocus()}_announce(e){let t=this._parts.live;t.textContent=e===t.textContent?`${e}\u00a0`:e}_clearFocus(){this._focus&&(this._focus=null,this._engine?.clearFocus(),this._parts&&(this._parts.live.textContent=``))}_select(e,t){let{spec:n}=this._normalized(),r=n?.series[_K(n.type)?0:e];if(!r)return;let i=n.data[t]??null;this.dispatchEvent(new CustomEvent(iY,{bubbles:!0,detail:{series:r.key,label:r.label,x:i?.[n.x.key]??null,value:Q(n,r.key,t),row:i,index:t}}))}};typeof customElements<`u`&&!customElements.get(`wui-chart`)&&customElements.define(`wui-chart`,bY);export{aK as CHART_STATES,tK as CHART_TYPES,oK as CHART_VIEWS,sK as MAX_SERIES,cK as MAX_SLICES,iK as RENDERERS,nK as STACK_MODES,bY as WuiChart,rK as X_KINDS,Z as formatValue,GK as normalizeSpec};
16
+ `:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Xc(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=uB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new hv;h.marker=g.makeTooltipMarker(`item`,Zg(h.color),d);var _=O_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ov(y?k({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Xc(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(H(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=D(a),a.content=Vh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=uB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new hv;this._showOrMove(d,function(){var n=D(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(H(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=wg(m.axisValue,d,p)),d=Jg(d,n,!0)}else if(V(u)){var g=z(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),V(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=J(t[0],s),r=J(t[1],c);else if(U(t)){var p=t;p.width=l[0],p.height=l[1];var m=s_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(H(t)&&o){var h=mB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=fB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=hB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=hB(d)?l[1]/2:d===`bottom`?l[1]:0),Vz(e)){var h=pB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&F(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&F(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&F(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&F(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Ne.node&&t.getDom()&&(Cw(this,`_updatePosition`),this._tooltipContent.dispose(),jR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(_O);function uB(e,t,n){var r=t.ecModel,i;n?(i=new yp(n,r,r),i=new yp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof yp&&(o=o.get(`tooltip`,!0)),H(o)&&(o={formatter:o}),o&&(i=new yp(o,i,r)))}return i}function dB(e,t){return e.dispatchAction||z(t.dispatchAction,t)}function fB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function pB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function mB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function hB(e){return e===`center`||e===`middle`}function gB(e,t,n){var r=Sc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Tc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Xc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function _B(e){Rj(KR),e.registerComponentModel(Bz),e.registerComponentView(lB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ae),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ae)}var vB=F;function yB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function bB(e,t,n){var r={};return vB(t,function(t){var a=r[t]=i();vB(e[t],function(e,r){if(EF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new EF(i),r===`opacity`&&(i=D(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new EF(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function xB(e,t,n){var r;F(n,function(e){t.hasOwnProperty(e)&&yB(t[e])&&(r=!0)}),r&&F(n,function(n){t.hasOwnProperty(n)&&yB(t[n])?e[n]=D(t[n]):delete e[n]})}function SB(e,t,n,r){var i={};return F(e,function(e){i[e]=EF.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return $O(a,l,e)}function c(e,t){tk(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var CB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Y.size.m,backgroundColor:Y.color.transparent,borderColor:Y.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Y.color.primary},subtextStyle:{fontSize:12,color:Y.color.quaternary}},t}(__),wB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=W(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Uo({style:Xf(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Uo({style:Xf(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){Qg(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Qg(p,`_`+e.get(`subtarget`))}),Xc(c).eventData=Xc(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=s_(g,l_(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Ro({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(_O);function TB(e){e.registerComponentModel(CB),e.registerComponentView(wB)}function EB(e,t){if(!e)return!1;for(var n=B(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function DB(e){ec(e,`label`,[`show`])}var OB=yc(),kB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Ne.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=OB(e)[i];!n||!n.data?OB(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&DB(n),F(n.data,function(e){e instanceof Array?(DB(e[0]),DB(e[1])):DB(e)}),a=this.createMarkerModelFromSeries(n,this,t),k(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),OB(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return ev(`section`,{header:this.name,blocks:[ev(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=D_.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return OB(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(__);N(kB,D_.prototype);function AB(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function jB(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function MB(e,t,n,r,i,a,o){var s=[],c=gh(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=zB(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=ws(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var NB={min:ie(MB,`min`),max:ie(MB,`max`),average:ie(MB,`average`),median:ie(MB,`median`)};function PB(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!jB(t)&&!B(t.coord)&&B(i)){var a=FB(t,n,r,e);if(t=D(t),t.type&&NB[t.type]&&a.baseAxis&&a.valueAxis){var o=M(i,a.baseAxis.dim),s=M(i,a.valueAxis.dim),c=NB[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!B(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&NB[t.type]){var u=r.getOtherAxis(l);u&&(t.value=zB(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)NB[d[f]]&&(d[f]=zB(n,n.mapDimension(i[f]),d[f]));return t}}function FB(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(IB(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function IB(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function LB(e,t){return e&&e.containData&&t.coord&&!AB(t)?e.containData(t.coord):!0}function RB(e,t){return e?function(e,n,r,i){return mm(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return mm(e.value,t[i])}}function zB(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var BB=yc(),VB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=G()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){BB(e).keep=!1}),t.eachSeries(function(e){var i=kB.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!BB(e).keep&&r.group.remove(e.group)}),HB(t,i,this.type)},t.prototype.markKeep=function(e){BB(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;F(e,function(e){var r=kB.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Wl(e):Gl(e))})})},t.type=`marker`,t}(_O);function HB(e,t,n){e.eachSeries(function(e){var r=kB.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Lf(r),o=a.z,s=a.zlevel;zf(i.group,o,s)}})}var UB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(kB),WB=yc(),GB=function(e,t,n,r){var i=e.getData(),a;if(B(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=pe(r.yAxis,r.xAxis);else{var l=FB(r,i,t,e);s=l.valueAxis,c=zB(i,_h(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=D(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&oe(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[PB(e,a[0]),PB(e,a[1]),k({},a[2])];return h[2].type=h[2].type||null,O(h[2],h[0]),O(h[2],h[1]),h};function KB(e){return!isNaN(e)&&!isFinite(e)}function qB(e,t,n,r){var i=1-e,a=r.dimensions[e];return KB(t[i])&&KB(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function JB(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(qB(1,n,r,e)||qB(0,n,r,e)))return!0}return LB(e,t[0])&&LB(e,t[1])}function YB(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(`x`),i.getWidth()),l=J(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(wy(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;KB(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):KB(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var XB=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=kB.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=WB(t).from,a=WB(t).to;i.each(function(t){YB(i,t,!0,e,n),YB(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new gI);this.group.add(c.group);var l=ZB(i,e,t),u=l.from,d=l.to,f=l.line;WB(t).from=u,WB(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);B(p)||(p=[p,p]),B(m)||(m=[m,m]),B(h)||(h=[h,h]),B(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:W(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Xc(e).dataModel=t,e.traverse(function(e){Xc(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);YB(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=ek(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:W(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:W(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:W(a.get(`symbolSize`),m[+!i]),symbol:W(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(VB);function ZB(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return k(k({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Xm(r,n),a=new Xm(r,n),o=new Xm([],n),s=I(n.get(`data`),ie(GB,t,e,n));e&&(s=L(s,ie(JB,e)));var c=RB(!!e,r);return i.initData(I(s,function(e){return e[0]}),null,c),a.initData(I(s,function(e){return e[1]}),null,c),o.initData(I(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function QB(e){e.registerComponentModel(UB),e.registerComponentView(XB),e.registerPreprocessor(function(e){EB(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var $B=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},eV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&F(t,function(e,r){H(e)&&(e={type:e}),t[r]=O(e,$B(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&mc(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=G(),a=I(r,function(e){return(H(e)||oe(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new yp(e,this,this.ecModel))},this);this._data=L(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;F(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;F(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;F(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&M(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Y.size.m,align:`auto`,backgroundColor:Y.color.transparent,borderColor:Y.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Y.color.disabled,inactiveBorderColor:Y.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Y.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Y.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Y.color.tertiary,borderWidth:1,borderColor:Y.color.border},emphasis:{selectorLabel:{show:!0,color:Y.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(__),tV=ie,nV=F,rV=Bu,iV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new rV),this.group.add(this._selectorGroup=new rV),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);i&&i!==`auto`||(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=l_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=s_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=s_(j({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=zz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=G(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),nV(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
17
+ `)){var p=new rV;p.newline=!0,s.add(p)}else{var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,tV(sV,f,null,r,d)).on(`mouseover`,tV(cV,m.name,null,r,d)).on(`mouseout`,tV(lV,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Xc(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=zr(h.fill);_&&_[3]===0&&(_[3]=.2,h=k(k({},h),{fill:qr(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,tV(sV,null,f,r,d)).on(`mouseover`,tV(cV,null,f,r,d)).on(`mouseout`,tV(lV,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Xc(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Xc(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();nV(e,function(e){var r=e.type,i=new Uo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Jf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),au(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=aV(c,r,o,s,d,m,u),y=new rV,b=r.getModel(`textStyle`);if(V(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(oV({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;H(w)&&w?T=w.replace(`{name}`,t??``):V(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Uo({style:Xf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Ro({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Af({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),au(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();r_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){r_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(_O);function aV(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),nV(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Qk(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function oV(e){var t=e.icon||`roundRect`,n=Fv(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Y.color.neutral00,n.style.lineWidth=2),n}function sV(e,t,n,r){lV(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),cV(e,t,n,r)}function cV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function lV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function uV(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),dV(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){F(i,function(t,n){e[t?`select`:`unSelect`](n)}),dV(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function dV(e,t){var n=t||{};return F(e.getData(),function(t){var r=t.get(`name`);if(r!==`
18
+ `&&r!==``){var i=e.isSelected(r);n[r]=ke(n,r)?n[r]&&i:i}}),n}function fV(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,ie(uV,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,ie(uV,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,ie(uV,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,ie(uV,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,ie(uV,`unSelect`))}var pV=Yc(mV);function mV(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function hV(e){e.registerComponentModel(eV),e.registerComponentView(iV),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,pV),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),fV(e)}var gV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=m_(t);e.prototype.init.call(this,t,n,r),_V(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),_V(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Dh(eV.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Y.color.accent50,pageIconInactiveColor:Y.color.accent10,pageIconSize:15,pageTextStyle:{color:Y.color.tertiary},animationDurationUpdate:800}),t}(eV);function _V(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,p_(t,n,{type:`box`,ignoreSize:!!i})}var vV=Bu,yV=[`width`,`height`],bV=[`x`,`y`],xV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new vV),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new vV)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=B(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Uo({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=Sf(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:z(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=yV[s],l=bV[s],u=yV[1-s],d=bV[1-s];i&&r_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=D(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;r_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),r_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=W(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Ro({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Ud(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;F([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,H(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=yV[i],o=bV[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(iV);function SV(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function CV(e){Rj(hV),e.registerComponentModel(gV),e.registerComponentView(xV),SV(e)}function wV(e){Rj(hV),Rj(CV)}var TV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=Dh(jz.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(jz),EV=yc();function DV(e,t,n){EV(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function OV(e,t){for(var n=EV(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||kV(n,o))}}}function kV(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function AV(e,t){var n={model:t,containsPoint:ie(MV,t),dispatchAction:ie(jV,e),dataZoomInfoMap:null,controller:null},r=n.controller=new rN(e.getZr());return F([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function jV(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function MV(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function NV(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:!t.get(`zoomLock`,!0)||`move`;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=W(t.get(`cursorGrab`,!0),s),c=W(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function PV(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=EV(t),r=n.coordSysRecordMap||=G();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){F(Tz(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,AV(t,n.model));(a.dataZoomInfoMap||=G()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i)kV(r,e);else{var s=NV(a,e,t);n.enable(s.controlType,s.opt),Sw(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var FV=function(e){i(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),DV(r,t,{pan:z(IV.pan,this),zoom:z(IV.zoom,this),scrollMove:z(IV.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){OV(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(Nz),IV={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=RV[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(zI(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:LV(function(e,t,n,r,i,a){var o=RV[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:LV(function(e,t,n,r,i,a){return RV[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function LV(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(zI(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var RV={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function zV(e){Rz(e),e.registerComponentModel(TV),e.registerComponentView(FV),PV(e)}var BV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=Dh(jz.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Y.color.accent10,borderRadius:0,backgroundColor:Y.color.transparent,dataBackground:{lineStyle:{color:Y.color.accent30,width:.5},areaStyle:{color:Y.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Y.color.accent40,width:.5},areaStyle:{color:Y.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Y.color.neutral00,borderColor:Y.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Y.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Y.color.tertiary},brushSelect:!0,brushStyle:{color:Y.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Y.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(jz),VV=Ro,HV=1,UV=30,WV=7,GV=`horizontal`,KV=`vertical`,qV=5,JV=[`line`,`bar`,`candlestick`,`scatter`],YV={easing:`cubicOut`,duration:100,delay:0},XV=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=z(this._onBrush,this),this._onBrushEnd=z(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),Sw(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&i.type===`dataZoom`&&i.from===this.uid||this._buildView(),this._updateView())},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Cw(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Bu;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?WV:0,r=l_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===GV?{right:r.width-i.x-i.width,top:r.height-UV-a-n,width:i.width,height:UV}:{right:a,top:i.y,width:UV,height:i.height},s=m_(e.option);F([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=s_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===KV&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===GV&&!i?{scaleY:o?1:-1,scaleX:1}:n===GV&&i?{scaleY:o?1:-1,scaleX:-1}:n===KV&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new VV({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new VV({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:z(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)v||(y+=g);else{y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:_s(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new Bu,r=new pd({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new hd({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){F(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&M(JV,e.get(`type`))<0)){var o=r.getComponent(Cz(i),a).axis,s=QV(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new VV({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new VV({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:HV,fill:Y.color.transparent}})),F([0,1],function(t){var a=o.get(`handleIcon`);!Mv[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=Fv(a,-1,0,2,2,null,!0);s.attr({cursor:$V(this._orient),draggable:!0,drift:z(this._onDragMove,this,t),ondragend:z(this._onDragEnd,this),onmouseover:z(this._onOverDataInfoTriggerArea,this,!0),onmouseout:z(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=J(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),au(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Uo({silent:!0,invisible:!f,style:Xf(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=J(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Ro({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=Fv(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Y.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Ro({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:z(this._onActualMoveZoneDrift,this),ondragstart:z(this._onActualMoveZoneDragStart,this),ondragend:z(this._onActualMoveZoneDragEnd,this),onmouseover:z(this._onOverDataInfoTriggerArea,this,!0),onmouseout:z(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[_s(e[0],[0,100],t,!0),_s(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];zI(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:_s(a.minSpan,o,i,!0),a.maxSpan==null?null:_s(a.maxSpan,o,i,!0));var s=this._range,c=this._range=Cs([_s(r[0],i,o,!0),_s(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Cs(n.slice()),i=this._size;F([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new Ro,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=kz(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[ZV(t,0,l,s),ZV(t,1,l,s)]}}var p=Cs(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=mf(n.handles[e].parent,this.group),o=gf(e===0?`right`:`left`,t),s=this._handleWidth/2+qV,c=hf([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===GV?`middle`:o,align:i===GV?o:`center`,text:a[e]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,dE(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=hf([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new K(t,n),this._brushing=!0,this._brushStartTime=+/* @__PURE__ */ new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+/* @__PURE__ */ new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();zI(0,a,r,0,o.minSpan==null?null:_s(o.minSpan,i,r,!0),o.maxSpan==null?null:_s(o.maxSpan,i,r,!0)),this._range=Cs([_s(a[0],r,i,!0),_s(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(dE(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new VV({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?YV:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Tz(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(Nz);function ZV(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:Jy(r)||Ky(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Ss(o,a,!0):o+``;return V(i)?i(o,s):H(i)?i.replace(`{value}`,s):s}function QV(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function $V(e){return e===`vertical`?`ns-resize`:`ew-resize`}function eH(e){e.registerComponentModel(BV),e.registerComponentView(XV),Rz(e)}function tH(e){Rj(zV),Rj(eH)}var nH={get:function(e,t,n){var r=D((rH[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},rH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Y.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},iH=EF.mapVisual,aH=EF.eachVisual,oH=B,sH=F,cH=Cs,lH=_s,uH=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&xB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=z(e,this),this.controllerVisuals=bB(this.option.controller,t,e),this.targetVisuals=bB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return sH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Tc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return I(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){F(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return H(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):V(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=cH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=ne(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};O(r,n),O(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){oH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},sH(r,function(e,t){if(EF.isValidType(t)){var n=nH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;sH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&D(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&D(n)||(a?s[0]:[s[0],s[0]])),c.symbol=iH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;aH(l,function(e){e>u&&(u=e)}),c.symbolSize=iH(l,function(e){return lH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Y.color.transparent,borderColor:Y.color.borderTint,contentColor:Y.color.theme[0],inactiveColor:Y.color.disabled,borderWidth:0,padding:Y.size.m,textGap:10,precision:0,textStyle:{color:Y.color.secondary}},t}(__),dH=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Wg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Ro({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return F(EF.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),EF.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=l_(t,n).refContainer;u_(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(_O),fH=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function pH(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=fH[o],c=[0,null,10],l={},u=0;u<3;u++)l[fH[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=s_(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function mH(e,t){return F(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var hH={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},gH=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},_H=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(SB(t.stateList,t.targetVisuals,z(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(z(vH,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function vH(e,t,n,r){for(var i=t.targetVisuals[r],a=EF.prepareVisualTypes(i),o={color:ek(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var yH=F;function bH(e){var t=e&&e.visualMap;B(t)||(t=t?[t]:[]),yH(t,function(e){if(e){xH(e,`splitList`)&&!xH(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&B(t)&&yH(t,function(e){U(e)&&(xH(e,`start`)&&!xH(e,`min`)&&(e.min=e.start),xH(e,`end`)&&!xH(e,`max`)&&(e.max=e.end))})}})}function xH(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var SH=!1;function CH(e){SH||(SH=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(hH,gH),F(_H,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(bH))}var wH=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],TH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=D(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=I(this._pieceList,function(e){return e=D(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=EF.listVisualTypes(),i=this.isCategory();F(t.pieces,function(e){F(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),F(n,function(e,n){var r=!1;F(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&F(this.stateList,function(e){(t[e]||(t[e]={}))[n]=nH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,F(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;F(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=D(e)},t.prototype.getValueState=function(e){var t=EF.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){EF.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return F(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Dh(uH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(uH),TH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Ls(e),F(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;F(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),EH(t,e)},pieces:function(e){var t=this.option;F(t.pieces,function(t,n){U(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=EF.retrieveVisuals(t),e.push(r)},this),EH(t,e),Ls(e),F(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function EH(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var DH=function(e){i(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=pe(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),F(o.viewPieceList,function(o){var s=o.piece,u=new Bu;u.onclick=z(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Uo({style:Xf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:W(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),r_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:mH(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return pH(e,this.api,e.itemSize);var n=t.align;return n&&n!==`auto`||(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Bu,o=this.visualMapModel.textStyleModel;a.add(new Uo({style:Xf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=I(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Fv(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=D(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,F(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(dH);function OH(e){e.registerComponentModel(wH),e.registerComponentView(DH),CH(e)}function kH(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function AH(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:kH(r&&r.shape.points)}}var jH=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],MH=new Kn,NH=yc(),PH=yc();function FH(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];t[i]!=null&&(e[i]=t[i])}}var IH=[`x`,`y`,`rotation`],LH=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,i){var a=r.style,o=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),c=r.getBoundingRect().plain();q.applyTransform(c,c,s),s?MH.setLocalTransform(s):(MH.x=MH.y=MH.rotation=MH.originX=MH.originY=0,MH.scaleX=MH.scaleY=1),MH.rotation=ro(MH.rotation);var l=r.__hostTarget,u;if(l){u=l.getBoundingRect().plain();var d=l.getComputedTransform();q.applyTransform(u,u,d)}var f=u&&l.getTextGuideLine();this._labelList.push({label:r,labelLine:f,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:f&&f.ignore,x:MH.x,y:MH.y,scaleX:MH.scaleX,scaleY:MH.scaleY,rotation:MH.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:o.position,attachedRot:o.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get(`labelLayout`);(V(r)||R(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),a=Xc(e);i&&!i.disableLabelLayout&&t._addLabel(a.dataIndex,a.dataType,n,i,r)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){ET(e,t)}}for(var i=0;i<this._labelList.length;i++){var a=this._labelList[i],o=a.label,s=o.__hostTarget,c=a.defaultAttr,l=void 0;l=V(a.layoutOptionOrCb)?a.layoutOptionOrCb(AH(a,s)):a.layoutOptionOrCb,l||={},a.layoutOption=l;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:l.x!=null||l.y!=null?null:c.attachedPos,rotation:l.rotate==null?c.attachedRot:l.rotate*u,offset:[l.dx||0,l.dy||0]});var d=!1;if(l.x==null?(o.x=c.x,o.setStyle(`x`,c.style.x)):(o.x=J(l.x,t),o.setStyle(`x`,0),d=!0),l.y==null?(o.y=c.y,o.setStyle(`y`,c.style.y)):(o.y=J(l.y,n),o.setStyle(`y`,0),d=!0),l.labelLinePoints){var f=s.getTextGuideLine();f&&(f.setShape({points:l.labelLinePoints}),d=!1)}var p=NH(o);p.needsUpdateLabelLine=d,o.rotation=l.rotate==null?c.rotation:l.rotate*u,o.scaleX=c.scaleX,o.scaleY=c.scaleY;for(var m=0;m<jH.length;m++){var h=jH[m];o.setStyle(h,l[h]==null?c.style[h]:l[h])}if(l.draggable){if(o.draggable=!0,o.cursor=`move`,s){var g=a.seriesModel;a.dataIndex!=null&&(g=a.seriesModel.getData(a.dataType).getItemModel(a.dataIndex)),o.on(`drag`,r(s,g.getModel(`labelLine`)))}}else o.off(`drag`),o.cursor=c.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),r=[];F(this._labelList,function(e){e.defaultAttr.ignore||r.push(DS({},e))});var i=L(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=L(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});kS(i,0,0,t),kS(a,1,0,n);var o=L(r,function(e){return e.layoutOption.hideOverlap});AS(o),jS(o)},e.prototype.processLabelsOverall=function(){var e=this;F(this._chartViewList,function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var a=!r,o=t.getTextContent();!a&&o&&(a=NH(o).needsUpdateLabelLine),a&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=Xc(e),i=r.dataIndex;if(n&&i!=null){var a=t.getData(r.dataType),o=a.getItemModel(i),s={},c=a.getItemVisual(i,`style`);c&&(s.stroke=c[a.getVisual(`drawType`)]);var l=o.getModel(`labelLine`);NT(e,PT(o),s),ET(e,l)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Gd(e))){var i=NH(n),a=i.oldLayout,o=Xc(e),s=o.dataIndex,c={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(o.dataType);if(a){n.attr(a);var u=e.prevStates;u&&(M(u,`select`)>=0&&n.attr(i.oldLayoutSelect),M(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Ud(n,c,t,s)}else if(n.attr(c),!ap(n).valueAnimation){var d=W(n.style.opacity,1);n.style.opacity=0,Wd(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};FH(f,c,IH),FH(f,n.states.select,IH)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};FH(p,c,IH),FH(p,n.states.emphasis,IH)}sp(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=PH(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Ud(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Wd(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),RH=yc();function zH(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=RH(t).labelManager;r||=RH(t).labelManager=new LH,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=RH(t).labelManager;F(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var BH=function(){function e(t,n){Fy(this,e.decoratedMethods),this._outOfBrk=Vy(null,n);var r=this._linear=Vy(null,n);Iy(this,r),this.breaks=t&&t.breaks||[]}return e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var r=this.breaks[n];if(r.vmin<e&&e<r.vmax)return t(e,r.vmax)}return 0},e.decoratedMethods={needTransform:function(){return!this.breaks.length},getExtent:function(){return this._outOfBrk.getExtent()},getExtentUnsafe:function(e,t){return t==null||t===2?this._outOfBrk.getExtentUnsafe(e,null):this._linear.getExtentUnsafe(e,null)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){Rc(t,n)&&(e===0&&WH(this,[t,n]),this._outOfBrk.setExtent2(e,t,n),this._linear.setExtent2(e,this.transformIn(t,null),this.transformIn(n,null)))},normalize:function(e){return this._linear.normalize(this.transformIn(e,null))},scale:function(e){return this.transformOut(this._linear.scale(e),null)},contain:function(e){return this._outOfBrk.contain(e)},transformIn:function(e,t){if(t&&t.depth===2)return e;for(var n=HH,r=UH,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(e<=o.vmax){e>o.vmin?n+=o.vmin-r+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:n+=e-r,r=o.vmax,i=!1;break}n+=o.vmin-r+o.gapReal,r=o.vmax}return i&&(n+=e-r),n},transformOut:function(e,t){if(t&&t.depth===2)return e;for(var n=HH,r=UH,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],c=n+s.vmin-r,l=c+s.gapReal;if(e<=l){a=e>c?s.vmin+(e-c)/(l-c)*(s.vmax-s.vmin):r+e-n,r=s.vmax,i=!1;break}n=l,r=s.vmax}return i&&(a=r+e-n),a}},e}();function VH(e,t){return new BH(e,t)}var HH=0,UH=0;function WH(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};F(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=qH(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c)){if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));F(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:ss(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function GH(e,t,n,r,i,a){e!==`no`&&F(n,function(n){var o=qH(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&l<o.vmax+u&&(e!==`preserve_extent_bound`||l!==a[0]&&l!==a[1])&&t.splice(s,1)}})}function KH(e,t,n,r){F(t,function(t){var i=qH(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort(function(e,t){return e.value-t.value})}function qH(e,t){var n=ss(e.vmin,t[0]),r=os(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function JH(e,t,n){var r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999}F(e,function(e){if(e&&e.start!=null&&e.end!=null&&!e.isExpanded){var a={breakOption:D(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(H(e.gap)){var s=ve(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t.parse(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&F([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return F(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:L(r,function(e){return!!e})}}function YH(e,t){return XH(t)===XH(e)}function XH(e){return e.start+`_\0_`+e.end}function ZH(e,t,n){var r=[];F(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),F(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=ne(r,function(n){return YH(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return F(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function QH(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=ne(n,function(e){return YH(e.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:D(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function $H(e,t,n,r,i){i.original=JH(e,t,n);var a=i.transformed=JH(e,t,n),o=i.lookup;a.breaks=I(a.breaks,function(e,n){var i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}var eU={vmin:`start`,vmax:`end`};function tU(e,t){return t&&(e||={},e.break={type:eU[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function nU(){tg({createBreakScaleMapper:VH,pruneTicksByBreak:GH,addBreaksToTicks:KH,parseAxisBreakOption:JH,identifyAxisBreak:YH,serializeAxisBreakIdentifier:XH,retrieveAxisBreakPairs:ZH,getTicksBreakOutwardTransform:QH,parseAxisBreakOptionInwardTransform:$H,makeAxisLabelFormatterParamBreak:tU})}var rU=yc();function iU(e,t){var n=ne(e,function(e){return ng().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function aU(e){F(e,function(e){return e.shouldRemove=!0})}function oU(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function sU(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!ng())return;var o=ng().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new Bu({ignoreModelZ:!0}),y=a.isHorizontal(),b=rU(t).visualList||(rU(t).visualList=[]);aU(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();var s=iU(b,t);s.shouldRemove=!1;var c=new Bu;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:IS,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[a.dim+`AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)},S=0;S<o.length;S++)x(S);e.add(v),oU(b);function C(e,t,n,i,a,o){var s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[Qd[v]]+r[$d[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[Qd[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return No(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);for(var x=[],S=[],C=!0,w=r[Qd[v]],T=0;;T++){var E=w===r[Qd[v]],D=w>=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(T<e.length?A=e[T]:(A=Math.random(),e.push(A)),w+=A*(u-l)+l,C=!C,D)break}var j=ng().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new hd({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new hd({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var M=S.slice();M.reverse();var ee=x.concat(M);t.add(new pd({anid:`break_c_`+j,shape:{points:ee},style:{fill:_,opacity:p.opacity},z:f}))}}}function cU(e,t,n,r){var i=e.axis,a=n.transform;_e(r.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=I(ng().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1),function(e){var t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:ng().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u<s.length;u++){var d=s[u],f=Math.max(d.coordPair[0],o[0]),p=Math.min(d.coordPair[1],o[1]);c<=f&&m(c,f,l,d),c=p,l=d}c<=o[1]&&m(c,o[1],l,null);function m(e,n,i,o){function s(e,t){a&&(kt(e,e,a),kt(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};No(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}var l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);var p=new vd(k({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_`+(i?i.brkId:`\0`)+`_\0_`+(o?o.brkId:`\0`)}}function lU(e,t,n){if(ne(n,function(e){return!e}))return;var r=new K;if(!MS(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=ot();dt(i,i,-t);var a=I(n,function(e){return e.transform?lt(ot(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new K(t[$d[e]]*a[0][0],t[$d[e]]*a[0][1]);return Math.abs(r.y)<1e-5}var s=.5;if(o(0)||o(1)){var c=I(n,function(e,t){var n=e.localRect.clone();return n.applyTransform(a[t]),n}),l=new K;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(i);var u=r.clone().transform(i),d=(c[0].x+c[1].x+(u.x>=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new K,h=new K;K.scale(m,r,-s),K.scale(h,r,1-s),ES(n[0],m),ES(n[1],h)}function uU(e,t){var n={breaks:[]};return F(t.breaks,function(r){if(r){var i=ne(e.get(`breaks`,!0),function(e){return ng().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function dU(){PS({adjustBreakLabelPair:lU,buildAxisBreakLine:cU,rectCoordBuildBreakAxis:sU,updateModelAxisBreak:uU})}function fU(e){WS(e),nU(),dU()}var pU=Math.sin,mU=Math.cos,hU=Math.PI,gU=Math.PI*2,_U=180/hU,vU=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=ei(u-gU)||(l?c>=gU:-c>=gU),f=c>0?c%gU:c%gU+gU,p=!1;p=d?!0:!ei(u)&&f>=hU==!!l;var m=e+n*mU(a),h=t+r*pU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*_U);if(d){var _=1/this._p,v=(l?1:-1)*(gU-_);this._add(`A`,n,r,g,1,+l,e+n*mU(a+v),t+r*pU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*mU(o),b=t+r*pU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),yU=`none`,bU=Math.round;function xU(e){var t=e.fill;return t!=null&&t!==yU}function SU(e){var t=e.stroke;return t!=null&&t!==yU}var CU=[`lineCap`,`miterLimit`,`lineJoin`],wU=I(CU,function(e){return`stroke-`+e.toLowerCase()});function TU(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof Ao)e(`opacity`,i);else{if(xU(t)){var a=Qr(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,yU);if(SU(t)){var s=Qr(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=bk(n),p=f[0],m=f[1];p&&(m=bU(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,yU);for(var h=0;h<CU.length;h++){var g=CU[h];if(r||t[g]!==xo[g]){var _=t[g]||xo[g];_&&e(wU[h],_)}}}else r&&e(`stroke`,yU)}}var EU=`http://www.w3.org/2000/svg`,DU=`http://www.w3.org/1999/xlink`,OU=`http://www.w3.org/2000/xmlns/`,kU=`http://www.w3.org/XML/1998/namespace`,AU=`ecmeta_`;function jU(e){return document.createElementNS(EU,e)}function MU(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function NU(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function PU(e){return`</`+e+`>`}function FU(e,t){t||={};var n=t.newline?`
19
+ `:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return NU(i,a)+(i===`style`?o||``:Vh(o))+(t?``+n+I(t,function(e){return r(e)}).join(n)+n:``)+PU(i)}return r(e)}function IU(e,t,n){n||={};var r=n.newline?`
20
+ `:``,i=` {`+r,a=r+`}`,o=I(R(e),function(t){return t+i+I(R(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=I(R(t),function(e){return`@keyframes `+e+i+I(R(t[e]),function(n){return n+i+I(R(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function LU(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function RU(e,t,n,r){return MU(`svg`,`root`,{width:e,height:t,xmlns:EU,"xmlns:xlink":DU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var zU=0;function BU(){return zU++}var VU={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},HU=`transform-origin`;function UU(e,t,n){var r=k({},e.shape);k(r,t),e.buildPath(n,r);var i=new vU;return i.reset(hi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function WU(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[HU]=n+`px `+r+`px`)}var GU={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function KU(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function qU(e,t,n){var r=e.shape.paths,i={},a,o;if(F(r,function(e){var t=LU(n.zrId);t.animation=!0,YU(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=R(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=KU(i,n);return a.replace(o,s)}}function JU(e){return H(e)?VU[e]?`cubic-bezier(`+VU[e]+`)`:wr(e)?e:``:``}function YU(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Td){var s=qU(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=JU(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=JU(d.easing),m=d.rawValue;(H(m)||oe(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};Xn(g,e),k(g,s[h]);var _=gi(g),v=s[h][u];l[h]=_?{transform:_}:{},WU(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new Qa);var S=y.len();y.reset(),l[h].d=UU(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return GU[e]})}for(var w=R(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][HU]!==l[O][HU]){T=!1;break}E=l[D][HU]}if(T&&E){for(var h in l)l[h][HU]&&delete l[h][HU];t[HU]=E}if(L(w,function(e){return R(l[e]).length>0}).length)return KU(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+BU();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function XU(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};ZU(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Xr(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),ZU(r,t,n,!0)}}}function ZU(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+BU(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var QU=Math.round;function $U(e){return e&&H(e.src)}function eW(e){return e&&V(e.toDataURL)}function tW(e,t,n,r){TU(function(i,a){var o=i===`fill`||i===`stroke`;o&&pi(a)?gW(t,e,i,r):o&&ui(a)?_W(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),hW(n,e,r)}function nW(e,t){var n=vD(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[AU+`silent`]=`true`))}function rW(e){return ei(e[0]-1)&&ei(e[1])&&ei(e[2])&&ei(e[3]-1)}function iW(e){return ei(e[4])&&ei(e[5])}function aW(e,t,n){if(t&&!(iW(t)&&rW(t))){var r=n?10:1e4;e.transform=rW(t)?`translate(`+QU(t[4]*r)/r+` `+QU(t[5]*r)/r+`)`:ri(t)}}function oW(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(QU(r[a][0]*n)/n),i.push(QU(r[a][1]*n)/n);t.points=i.join(` `)}function sW(e){return!e.smooth}function cW(e){var t=I(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=QU(o*r)/r)}}}var lW={circle:[cW([`cx`,`cy`,`r`])],polyline:[oW,sW],polygon:[oW,sW]};function uW(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function dW(e,t){var n=e.style,r=e.shape,i=lW[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&hi(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&uW(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;m.__svgPathVersion===p&&h&&c===m.__svgPathStrokePercent||(h||=m.__svgPathBuilder=new vU,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return aW(a,e.transform),tW(a,n,e,t),nW(a,e),t.animation&&YU(e,a,t),t.emphasis&&XU(e,a,t),MU(s,e.id+``,a)}function fW(e,t){var n=e.style,r=n.image;if(r&&!H(r)&&($U(r)?r=r.src:eW(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),aW(c,e.transform),tW(c,n,e,t),nW(c,e),t.animation&&YU(e,c,t),MU(`image`,e.id+``,c)}}function pW(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=ai(n.y||0,mn(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":ii[n.textAlign]||n.textAlign};if(Yo(n)){var c=``,l=n.fontStyle,u=qo(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),aW(s,e.transform),tW(s,n,e,t),nW(s,e),t.animation&&YU(e,s,t),MU(`text`,e.id+``,s,void 0,r)}}function mW(e,t){if(e instanceof wo)return dW(e,t);if(e instanceof Ao)return fW(e,t);if(e instanceof Eo)return pW(e,t)}function hW(e,t,n){var r=e.style;if(oi(r)){var i=si(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=Qr(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=MU(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[MU(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=mi(o)}}function gW(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(di(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(fi(i))a=`radialGradient`,o.cx=W(i.x,.5),o.cy=W(i.y,.5),o.r=W(i.r,.5);else return;for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=ni(s[l].offset)*100+`%`,f=s[l].color,p=Qr(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(MU(`stop`,l+``,g))}var _=FU(MU(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=MU(a,y,o,c)),t[n]=mi(y)}function _W(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(ci(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(H(h)?m=h:$U(h)?m=h.src:eW(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;_e(f,g),_e(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=MU(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=D(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=gi(i);x&&(o.patternTransform=x);var S=MU(`pattern`,``,o,[d]),C=FU(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=MU(`pattern`,T,o,[d])),t[n]=mi(T)}}function vW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=MU(`clipPath`,a,o,[dW(e,n)])}t[`clip-path`]=mi(a)}function yW(e){return document.createTextNode(e)}function bW(e,t,n){e.insertBefore(t,n)}function xW(e,t){e.removeChild(t)}function SW(e,t){e.appendChild(t)}function CW(e){return e.parentNode}function wW(e){return e.nextSibling}function TW(e,t){e.textContent=t}var EW=58,DW=120,OW=MU(``,``);function kW(e){return e===void 0}function AW(e){return e!==void 0}function jW(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function MW(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function NW(e){var t,n=e.children,r=e.tag;if(AW(r)){var i=e.elm=jU(r);if(IW(OW,e),B(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&SW(i,NW(a))}else AW(e.text)&&!U(e.text)&&SW(i,yW(e.text))}else e.elm=yW(e.text);return e.elm}function PW(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&bW(e,NW(a),t)}}function FW(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(AW(i.tag)?xW(CW(i.elm),i.elm):xW(e,i.elm))}}function IW(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===DW?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(OU,n,o):n.charCodeAt(3)===EW?r.setAttributeNS(kU,n,o):n.charCodeAt(5)===EW?r.setAttributeNS(DU,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function LW(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:MW(o,l)?(RW(o,l),o=t[++r],l=n[++i]):MW(s,u)?(RW(s,u),s=t[--a],u=n[--c]):MW(o,u)?(RW(o,u),bW(e,o.elm,wW(s.elm)),o=t[++r],u=n[--c]):MW(s,l)?(RW(s,l),bW(e,s.elm,o.elm),s=t[--a],l=n[++i]):(kW(d)&&(d=jW(t,r,a)),f=d[l.key],kW(f)?bW(e,NW(l),o.elm):(p=t[f],p.tag===l.tag?(RW(p,l),t[f]=void 0,bW(e,p.elm,o.elm)):bW(e,NW(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,PW(e,m,n,i,c)):FW(e,t,r,a))}function RW(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(IW(e,t),kW(t.text)?AW(r)&&AW(i)?r!==i&&LW(n,r,i):AW(i)?(AW(e.text)&&TW(n,``),PW(n,null,i,0,i.length-1)):AW(r)?FW(n,r,0,r.length-1):AW(e.text)&&TW(n,``):e.text!==t.text&&(AW(r)&&FW(n,r,0,r.length-1),TW(n,t.text)))}function zW(e,t){if(MW(e,t))RW(e,t);else{var n=e.elm,r=CW(n);NW(t),r!==null&&(bW(r,t.elm,wW(n)),FW(r,[e],0,0))}return t}var BW=0,VW=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=HW(`configLayer`),this.storage=t,this._opts=n=k({},n),this.root=e,this._id=`zr`+BW++,this._oldVNode=RU(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=jU(`svg`);IW(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,zW(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return mW(e,LU(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=LU(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=UW(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=MU(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=I(R(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(MU(`defs`,`defs`,{},c)),e.animation){var l=IU(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=MU(`style`,`stl`,{},[],l);a.push(u)}}return RU(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},FU(this.renderToVNode({animation:W(e.cssAnimation,!0),emphasis:W(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:W(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};vW(d[g],_,t);var v=MU(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=mW(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=vk(r,0,n),t=vk(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(ui(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=_i(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function HW(e){return function(){}}function UW(e,t,n,r){var i;if(n&&n!==`none`){if(i=MU(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),pi(n))gW({fill:n},i.attrs,`fill`,r);else if(ui(n))_W({style:{fill:n},dirty:Ae,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=Qr(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function WW(e){e.registerPainter(`svg`,VW)}function GW(e,t,n){var r=d.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function KW(e){return!e.__cursors.get(0)}function qW(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var JW=function(e){i(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ui,typeof t==`string`?a=GW(t,n,r):U(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Oe(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=qW(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=GW(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new q(0,0,0,0);function c(e){if(e.isFinite()&&!e.isZero()){if(i.length===0){var t=new q(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new q(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new q(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=qW(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;)if(i[u].isZero())i.splice(u,1);else{for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;ue(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||hk(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):de(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=Dk(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&F(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Vi),YW=1e5,XW=314159,ZW=void 0,QW=1,$W=2;function eG(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function tG(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function nG(e,t,n,r){var i=new JW(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,rG(i),i}function rG(e){e.__cursorStack=[],e.__cursors=G()}function iG(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function aG(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,iG({key:r})))}function oG(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function sG(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function cG(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];n&&(n&lG&&!s.__builtin__||n&uG&&s.__builtin__||n&dG&&s===e.hoverlayer)||t(s,a,o,i)}}var lG=1,uG=2,dG=4,fG=lG|dG,pG=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=k({},n||{}),this.dpr=n.devicePixelRatio||Ui,this._singleCanvas=i,this.root=e,e.style&&(Oe(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=nG(a,this,XW,0);c.initContext(),this._insertLayer(c,XW,0,!0),this._domRoot=e}else{this._width=vk(e,0,n),this._height=vk(e,1,n);var l=this._domRoot=tG(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!U(e)?{paintAll:!!e}:e||{},n=W(t.refresh,!0),r=W(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=$W),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return cG(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},uG),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=ZW,n!==ZW&&(!t&&n===$W&&(t=this._i.hoverlayer=this._ensureLayer(YW)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),Kk(i,s,r),c&&(s.style=l)}}i&&(qk(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(YW)},e.prototype.paintOne=function(e,t){Gk(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)cG(this._i,function(e){e.afterBrush&&e.afterBrush()},fG),this._paintHoverList(e);else{var i=this;HE(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(XW).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),cG(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},lG)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return cG(this._i,function(i){var a=!1;if(oG(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!KW(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}oG(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},fG),Ne.wxa&&cG(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=KW(e),c=s&&d.getTime(),l=t.drawIdx,u=t.notClearIdx,f=u>=0?Math.min(u,l):l;f<t.endIdx;f++){var p=n[f];if(!(f<l&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=$W),r!=null){var m=p.getPaintRect();m&&m.intersect(r)&&(Kk(o,p,a),p.setPrevPaintRect(m))}else Kk(o,p,a);if(s&&d.getTime()-c>15){f++;break}}}qk(o,a),t.drawIdx=Math.max(f,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=XW,t=0);var i=sG(this._i,e)[t];return i||(i=nG(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&O(i,this._layerConfig[e],!0),(n||r&&e!==XW)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&eG(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=sG(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),sG(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return cG(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return cG(this._i,function(n,r){e.call(t,n,r)},lG)},e.prototype.eachOtherLayer=function(e,t){return cG(this._i,function(n,r){e.call(t,n,r)},uG)},e.prototype.getLayers=function(){var e={};return cG(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}cG(n._i,function(e){e.__dirty=!1,oG(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},fG);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__))E(`ZLevel `+d+` has been used by unknown layer `+o.id);else{if((!s||f!==s.key)&&(s=aG(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}}cG(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(KW(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(oG(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===ZW&&(n._hoverLayerDirty=QW))},fG)},e.prototype.clear=function(){return cG(this._i,function(e){e.clear(),rG(e)},lG),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,cG(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?O(n[e],t,!0):n[e]=t,cG(this._i,function(e,t){O(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=vk(i,0,r),t=vk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,cG(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(XW).resize(e,t)}return this},e.prototype.clearLayer=function(e){F(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[XW][0].dom;var t=new JW(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;cG(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];Kk(n,l,a)}qk(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function mG(e){e.registerPainter(`canvas`,pG)}var hG=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`}),gG=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),_G=(e=`INR`)=>hG[e]??`${e} `;function vG(e,...t){console.warn(e,...t)}function yG(e,...t){console.error(e,...t)}function bG(e,t){if(e==null)throw Error(t);return e}var xG=`Asia/Kolkata`,SG=198e5,CG=/* @__PURE__ */ new Map;function wG(e){let t=CG.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),CG.set(e,t)),t}function TG(e){if(typeof e!=`string`||e===``)return!1;try{return wG(e),!0}catch{return!1}}function EG(e,t=xG){if(t===`Asia/Kolkata`){let t=new Date(e+SG);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(wG(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:Number(n.year),month:Number(n.month)-1,day:Number(n.day),hour:Number(n.hour)%24,minute:Number(n.minute),second:Number(n.second)}}function DG(e,t=xG){if(t===`Asia/Kolkata`)return SG;let n=EG(e,t),r=/* @__PURE__ */ new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function OG(e,t=xG){let n=e-DG(e,t);return n=e-DG(n,t),n}var kG=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],AG=[`rupees`,`paise`],jG=[`ms`,`s`,`min`,`h`],MG=[`day`,`month`,`year`,`datetime`,`time`],NG=`−`,PG=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],FG=(e,t)=>bG(e[t],`no compact unit at index ${t}`),IG=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],LG=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],RG=e=>!e||e===`INR`?`en-IN`:`en-US`,zG=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,BG=/* @__PURE__ */ new Map,VG=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=BG.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),BG.set(n,r)),r},HG=/* @__PURE__ */ new Map,UG=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=HG.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),HG.set(n,r)),r},WG=e=>typeof e==`number`&&Number.isFinite(e),GG=e=>e<0&&!Object.is(Math.abs(e),0)?NG:``,KG=(e,t)=>t===`paise`?e/100:e;function qG(e,{decimals:t}={}){if(!WG(e))return`-`;let n=VG(zG(t,2)).format(Math.abs(e));return n===`0`?`0`:GG(e)+n}function JG(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!WG(e))return`-`;let i=KG(e,t),a=UG(zG(n,0),RG(r)).format(Math.abs(i));return(Number(a.replace(/,/g,``))===0?``:GG(i))+_G(r)+a}var YG=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function XG(e,{currency:t,unit:n=`rupees`}={}){if(!WG(e))return`-`;let r=t?KG(e,n):e,i=t?_G(t):``,a=t?RG(t):`en-IN`,o=a===`en-IN`?IG:LG,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=VG(YG(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:GG(r))+i+e;c=o.length-1}let[l,u]=FG(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f));return p>=100&&c>0&&(--c,[l,u]=FG(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${GG(r)}${i}${VG(f,a).format(p)} ${u}`}function ZG(e,{decimals:t}={}){return WG(e)?`${qG(e*100,{decimals:zG(t,1)})}%`:`-`}var QG={ms:1,s:1e3,min:6e4,h:36e5};function $G(e,{unit:t=`s`}={}){if(!WG(e))return`-`;let n=QG[t]??1e3,r=Math.abs(e*n),i=GG(e);if(Math.round(r)<1e3)return`${i}${VG(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${VG(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${VG(0).format(l)}h ${s(c%60)}m`}function eK(e,t=xG){if(e instanceof Date)return e.getTime();if(WG(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?OG(a.getTime(),t):NaN}return Date.parse(e)}function tK(e,t=xG){let{year:n,month:r,day:i,hour:a,minute:o}=EG(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function nK(e,{pattern:t=`day`,timeZone:n=xG}={}){let r=eK(e,n);if(!Number.isFinite(r))return`-`;let i=tK(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${PG[i.month]}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${PG[i.month]}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function rK(e,{timeZone:t=xG}={}){let n=eK(e,t);if(!Number.isFinite(n))return`-`;let r=tK(n,t);return`${String(r.day).padStart(2,`0`)}-${PG[r.month]}`}function Z(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return nK(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return JG(e,t);case`percent`:return ZG(e,t);case`compact`:return XG(e,t);case`duration`:return $G(e,t);default:return qG(e,t)}}function iK(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e?.currency??`INR`,unit:e?.unit}:!t||t===`number`?{style:`compact`}:e??{}}var aK=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],oK=[`none`,`stacked`,`percent`],sK=[`category`,`time`,`value`],cK=[`auto`,`svg`,`canvas`],lK=[`ready`,`loading`,`empty`,`error`],uK=[`chart`,`table`],dK=8,fK=6,pK=`Other`,mK=`No data to show for this chart.`,hK=`This chart couldn't load. Try again in a moment.`,gK=`Loading chart`,_K=`This chart has more series than it can show clearly.`,vK=`This chart has more groups than it can show clearly.`,yK={line:`Line chart`,area:`Area chart`,column:`Column chart`,bar:`Bar chart`,donut:`Donut chart`,heatmap:`Heatmap`,calendar:`Calendar heatmap`,funnel:`Funnel chart`,gauge:`Gauge`,waterfall:`Waterfall chart`,treemap:`Treemap`,sankey:`Sankey diagram`,scatter:`Scatter plot`,bubble:`Bubble chart`,multiples:`Small multiples`},bK=[`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`],xK=e=>bK.includes(e),SK=[`area`,`column`,`bar`],CK=[`line`,`area`,`column`,`bar`,`multiples`],wK={line:[`category`,`time`],area:[`category`,`time`],column:[`category`,`time`],bar:[`category`,`time`],multiples:[`category`,`time`],calendar:[`time`],scatter:[`value`],bubble:[`value`]},TK={group:[`heatmap`,`treemap`,`scatter`,`bubble`],to:[`sankey`],size:[`bubble`],trend:[`scatter`,`bubble`],zoom:[`line`,`area`],bands:[`gauge`],centerLabel:[`donut`],valueLabels:[`column`,`bar`]},EK={gauge:240,calendar:200,treemap:340,sankey:340},DK=100,OK=72,kK=32,AK=[`type`,`title`,`description`,`data`,`x`,`series`,`group`,`to`,`size`,`trend`,`zoom`,`bands`,`stack`,`y`,`target`,`centerLabel`,`valueLabels`,`height`,`state`,`emptyText`,`errorText`,`loadingText`,`renderer`,`timeZone`],jK=[`key`,`kind`,`format`,`label`,`labelFit`],MK=[`auto`,`all`,`rotate`,`ellipsis`],NK=[`key`,`label`,`format`],PK=[`key`,`label`],FK=[`key`,`label`,`format`],IK=[`upTo`,`label`],LK=[`label`,`format`,`min`,`max`,`wholeNumbers`],RK=[`value`,`label`],zK=[`style`,`currency`,`unit`,`decimals`,`pattern`],BK=[...AG,...jG],VK=/* @__PURE__ */ new Set;function HK(e){VK.has(e)||(VK.add(e),vG(`[@webority/ui-elements] <wui-chart> ${e}`))}var UK=e=>e.map(e=>`"${e}"`).join(` | `),WK=e=>typeof e==`number`&&Number.isFinite(e),GK=e=>typeof e==`object`&&!!e&&!Array.isArray(e),KK=(e,t)=>Reflect.get(e,t),qK=e=>e===null||typeof e==`string`||typeof e==`number`,JK=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,qK(t)?t:null]));function YK(e,t){if(e==null)throw Error(`${t} missing`);return e}var XK=(e,t)=>e.some(e=>e===t);function ZK(e,t,n){t==null||n.includes(t)||HK(`received ${e}="${String(t)}", which is not one of ${UK(n)}. The chart uses its default instead.`)}function QK(e,t,n){for(let r of Object.keys(t))n.includes(r)||(/^(y2|secondary)/i.test(r)?HK(`ignores ${e}.${r}: a chart has one value axis by design. Show the second measure as its own chart.`):HK(`ignores the unknown key ${e}.${r}. Known keys: ${n.join(`, `)}.`))}function $K(e,t){if(t==null)return;if(typeof t!=`object`){HK(`expects ${e} to be an object such as { style: "currency" }.`);return}QK(e,t,zK);let n=KK(t,`style`);ZK(`${e}.style`,n,kG);let r=KK(t,`currency`);r!=null&&!gG(r)&&HK(`received ${e}.currency="${String(r)}", which is not an ISO 4217 code such as "INR". The chart uses INR instead.`);let i=KK(t,`unit`);i!=null&&ZK(`${e}.unit`,i,n===`duration`?jG:AG);let a=KK(t,`pattern`);ZK(`${e}.pattern`,a,MG);let o=KK(t,`decimals`);o!=null&&!(typeof o==`number`&&Number.isInteger(o)&&o>=0&&o<=20)&&HK(`received ${e}.decimals=${String(o)}, which is not a whole number from 0 to 20. The chart uses its default instead.`);let s={style:XK(kG,n)?n:`number`};return typeof r==`string`&&gG(r)&&(s.currency=r),XK(BK,i)&&(s.unit=i),typeof o==`number`&&(s.decimals=o),XK(MG,a)&&(s.pattern=a),s}function eq(e){let t=(e,t=hK)=>(yG(`[@webority/ui-elements] <wui-chart> ${e}`),{spec:null,problem:t});if(!GK(e))return t('has no spec: set the `spec` property or add a <script type="application/json"> child.');let n=e;QK(`spec`,n,AK);let r=KK(n,`type`);if(ZK(`type`,r,aK),!XK(aK,r))return t(`cannot draw type "${String(r)}".`);let i=r,a=KK(n,`title`);typeof a==`string`&&a.trim()||HK("needs a `title`: it names the chart for screen readers and names exported files.");for(let[e,t]of Object.entries(TK))KK(n,e)!=null&&!t.includes(i)&&HK(`ignores spec.${e} on a ${i} chart: it applies to ${t.join(`, `)}.`);let o=KK(n,`x`),s=GK(o)?o:{};QK(`spec.x`,s,jK);let c=wK[i]??[`category`],l=KK(s,`kind`);ZK(`x.kind`,l,sK),XK(sK,l)&&!c.includes(l)&&HK(`ignores x.kind="${l}" on a ${i} chart: it takes ${UK(c)}.`);let u=KK(s,`labelFit`);ZK(`x.labelFit`,u,MK);let d=$K(`x.format`,KK(s,`format`)),f=KK(s,`key`);typeof f!=`string`&&i!==`gauge`&&HK("needs `x.key`, the column holding each row's x value or slice name.");let p=typeof f==`string`?f:``,m=KK(n,`y`),h=GK(m)?m:{};QK(`spec.y`,h,LK);let g=$K(`y.format`,KK(h,`format`)),_=KK(n,`series`),v=Array.isArray(_)?_.filter(GK):[],y=[];for(let[e,t]of v.entries()){QK(`spec.series[${e}]`,t,NK);let n=$K(`series[${e}].format`,KK(t,`format`)),r=KK(t,`key`);typeof r!=`string`&&HK(`needs series[${e}].key, the column holding that series' values.`);let i=KK(t,`label`);y.push({key:String(r),named:typeof r==`string`,label:typeof i==`string`&&i?i:String(r),format:n})}let b=y[0];if(!b)return t(`has no series to draw.`);let x=y.filter(e=>e.named).map(e=>e.key),S=x.find((e,t)=>x.indexOf(e)!==t);if(S!==void 0)return t(`has two series with the key "${S}": each series needs its own key.`);if(y.length>8)return t(`refuses ${y.length} series: 8 is the most that stay distinguishable. Fold the smallest into an Other series, or split the chart.`,_K);let C=xK(i);if(C&&y.length>1){let e=i===`donut`?`Compare parts across groups with a percent-stacked column instead.`:`Show the other measures as their own charts, or use small multiples.`;HK(`draws one series as a ${i}; it got ${y.length} and shows the first. ${e}`)}let w=(e,t,n,r)=>{if(t==null)return null;if(!GK(t))return HK(`expects ${e} to be an object such as { key: "column" }.`),null;QK(e,t,n);let i=KK(t,`key`);if(typeof i!=`string`)return HK(`needs ${e}.key, the column holding ${r}.`),null;let a=$K(`${e}.format`,KK(t,`format`)),o=KK(t,`label`);return{key:i,label:typeof o==`string`?o:``,format:a}},T=TK.group.includes(i)?w(`spec.group`,KK(n,`group`),PK,`each row's group`):null,E=i===`sankey`?w(`spec.to`,KK(n,`to`),PK,`where each flow ends`):null,D=i===`bubble`?w(`spec.size`,KK(n,`size`),FK,`each bubble's size`):null;if((i===`heatmap`||i===`treemap`)&&!T)return t(`needs \`group.key\` to draw a ${i}: the column holding each ${i===`heatmap`?`row`:`parent`}.`);if(i===`sankey`&&!E)return t("needs `to.key` to draw a sankey: the column holding where each flow ends.");if(i===`bubble`&&!D)return t("needs `size.key` to draw a bubble chart: the column holding each bubble's size.");let O=SK.includes(i)?oK:[`none`],k=KK(n,`stack`);ZK(`stack`,k,O);let A=KK(n,`state`);ZK(`state`,A,lK);let j=KK(n,`renderer`);ZK(`renderer`,j,cK);let M=KK(n,`timeZone`);M!=null&&!TG(M)&&HK(`received timeZone="${String(M)}", which is not a time zone this browser knows. The chart uses Asia/Kolkata instead.`);let ee=TG(M)?M:xG,N=KK(n,`target`),P=GK(N)?KK(N,`value`):void 0;N!=null&&(GK(N)&&QK(`spec.target`,N,RK),GK(N)&&WK(P)||HK("ignores a `target` without a numeric `value`."));let F=KK(n,`trend`);F!=null&&typeof F!=`boolean`&&HK("expects `trend` to be true or false.");let I=KK(n,`zoom`);I!=null&&typeof I!=`boolean`&&HK("expects `zoom` to be true or false.");let te=[],L=KK(n,`bands`);if(i===`gauge`&&L!=null){let e=Array.isArray(L)?L.filter(GK):[];for(let t of e)QK(`spec.bands[]`,t,IK);te=e.map(e=>({upTo:KK(e,`upTo`),label:KK(e,`label`)})).filter(e=>WK(e.upTo)&&typeof e.label==`string`&&e.label!==``).sort((e,t)=>e.upTo-t.upTo),Array.isArray(L)&&te.length===e.length||HK("ignores a gauge band without a numeric `upTo` and a `label`.")}let ne=g??b.format,R=(C?y.slice(0,1):y).map(e=>({key:e.key,label:e.label,format:e.format??ne})),re=XK(c,l)?l:c[0],z=KK(n,`data`),ie=Array.isArray(z)?z:[],B=ie.filter(GK).map(JK),V=-1,H=null,ae=b.key;i===`donut`&&B.length>6&&(H=B,{data:B,otherIndex:V}=rq(B,p,ae),HK(`draws at most 6 donut slices; the smallest ${ie.length-5} are shown as "${pK}". Send fewer rows, or use a bar chart for many parts.`));let oe=(e,t)=>{let n=B.filter(e);n.length!==B.length&&HK(`leaves out ${B.length-n.length} row(s) ${t}.`),B=n},U=e=>e!=null&&e!==``,se=e=>WK(e)&&e>0;if(re===`time`&&CK.includes(i)&&oe(e=>Number.isFinite(eK(e[p],ee)),`without a readable date`),i===`gauge`&&B.length>1)HK(`draws one value as a gauge; it got ${B.length} rows and shows the first.`),B=B.slice(0,1);else if(i===`scatter`||i===`bubble`){oe(e=>WK(e[p])&&WK(e[ae])&&(i!==`bubble`||D!=null&&se(e[D.key])),`without a number for x and y (and a positive size)`);let e=new Set(T?B.map(e=>String(e[T.key]??``)):[]);if(e.size>3)return t(`refuses ${e.size} colour groups on a ${i} chart: 3 is the most that stay tellable apart. Keep the three that matter and fold the rest into one, or split the chart.`,vK)}else if(i===`calendar`)oe(e=>Number.isFinite(eK(e[p],ee)),`without a readable date`);else if(i===`heatmap`&&T)oe(e=>U(e[p])&&U(e[T.key]),`without a column or a row`);else if(i===`treemap`&&T){oe(e=>U(e[p])&&U(e[T.key])&&se(e[ae]),`without a name, a parent and a positive size`);let e=new Set(B.map(e=>String(e[T.key])));if(e.size>8)return t(`refuses ${e.size} parents in a treemap: 8 is the most that keep their own colour. Fold the smallest into one, or split the chart.`,vK)}else if(i===`sankey`&&E){oe(e=>U(e[p])&&U(e[E.key])&&se(e[ae]),`without a start, an end and a positive size`);let e=tq(B,p,E.key);if(e)return t(e.reason,e.text)}else if(i===`waterfall`){let e=nq(B,ae);if(e?.refuse)return t(e.refuse);e?.warn&&HK(e.warn)}let ce=KK(n,`height`),le=WK(ce)&&ce>0?ce:null;if(i===`multiples`){let e=OK*R.length+kK;le!=null&&le<e&&(HK(`needs at least ${e}px of height for ${R.length} small charts; it got ${le}px and draws at ${e}px.`),le=e),le??=DK*R.length+40}le??=EK[i]??320;let ue=XK(O,k)?k:`none`,de=TK.valueLabels.includes(i)&&KK(n,`valueLabels`)===!0;de&&ue!==`none`&&HK(`ignores valueLabels on a stacked chart.`);let fe=de&&ue===`none`,pe=KK(n,`description`),W=KK(s,`label`),me=KK(h,`label`),he=KK(h,`min`),ge=KK(h,`max`),_e=KK(n,`centerLabel`),ve=(e,t)=>typeof e==`string`&&e?e:t;return{problem:null,spec:{type:i,title:typeof a==`string`?a.trim():``,description:typeof pe==`string`?pe:``,data:B,allData:H??B,x:{key:p,kind:re,format:d??(re===`time`?{style:`date`}:re===`value`?{style:`number`}:void 0),label:typeof W==`string`?W:``,labelFit:XK(MK,u)?u:`auto`},series:R,group:T,to:E,size:D,trend:TK.trend.includes(i)&&F===!0,zoom:TK.zoom.includes(i)?(I??B.length>5e3)===!0:!1,bands:te,stack:ue,y:{label:typeof me==`string`?me:``,format:ne,min:WK(he)?he:void 0,max:WK(ge)?ge:void 0,wholeNumbers:KK(h,`wholeNumbers`)===!0},target:GK(N)&&WK(P)?{value:P,label:String(KK(N,`label`)??``)}:null,centerLabel:i===`donut`&&typeof _e==`string`&&_e.trim()?_e.trim():``,valueLabels:fe,height:le,state:XK(lK,A)?A:`ready`,emptyText:ve(KK(n,`emptyText`),mK),errorText:ve(KK(n,`errorText`),hK),loadingText:ve(KK(n,`loadingText`),gK),renderer:XK(cK,j)?j:`auto`,timeZone:ee,otherIndex:V}}}function tq(e,t,n){let r=e.map(e=>[String(e[t]),String(e[n])]),i=/* @__PURE__ */ new Map;for(let[e,t]of r)i.has(e)||i.set(e,0),i.set(t,(i.get(t)??0)+1);let a=[...i].filter(([,e])=>e===0).map(([e])=>e);if(a.length>8)return{reason:`refuses ${a.length} flow starts in a sankey: 8 is the most that keep their own colour. Fold the smallest into one, or split the chart.`,text:vK};let o=0;for(;a.length;){let e=a.pop();o+=1;for(let[t,n]of r){if(t!==e)continue;let r=(i.get(n)??0)-1;i.set(n,r),r===0&&a.push(n)}}return o<i.size?{reason:`cannot draw a sankey whose flows loop back on themselves.`,text:hK}:null}function nq(e,t){let n=e.map(e=>WK(e[t])?e[t]:0),r=n[n.length-1]??0,i=n[0]??0,a=i;for(let e of n.slice(1,-1))i+=e,a=Math.min(a,i);return a<0||n.length>1&&r<0?{refuse:`cannot draw a waterfall whose running total goes below zero.`}:n.length>2&&Math.abs(r-i)>.5?{warn:`draws the waterfall's closing total (${r}) as given, though the opening total plus the steps is ${i}.`}:null}function rq(e,t,n){let r=new Set(e.map((e,t)=>({i:t,v:WK(e[n])?e[n]:0})).sort((e,t)=>t.v-e.v).slice(0,5).map(e=>e.i)),i=e.reduce((e,t,i)=>r.has(i)||!WK(t[n])?e:e+t[n],0),a=e.filter((e,t)=>r.has(t)),o=new Set(a.map(e=>String(e[t]))),s=pK;for(let e=2;o.has(s);e+=1)s=`${pK} (${e})`;return a.push({[t]:s,[n]:i}),{data:a,otherIndex:a.length-1}}function iq(e){return YK(e.series[0],`series`)}function aq(e,t){return YK(e.data[t],`row ${t}`)}function Q(e,t,n){let r=e.data[n]?.[t];return WK(r)?r:null}function oq(e){return e.type===`gauge`||e.series.some(t=>e.data.some((n,r)=>Q(e,t.key,r)!=null))}function $(e,t){let n=e.data[t]?.[e.x.key];return n==null||n===``?`-`:e.x.format?Z(n,{...e.x.format,timeZone:e.timeZone}):String(n)}function sq(e,t){return eK(e.data[t]?.[e.x.key],e.timeZone)}function cq(e,t){let n=e.group?e.data[t]?.[e.group.key]:null;return n==null||n===``?`-`:String(n)}function lq(e,t){let n=e.to?e.data[t]?.[e.to.key]:null;return n==null||n===``?`-`:String(n)}var uq=e=>[...new Set(e)];function dq(e){return e.group?uq(e.data.map((t,n)=>cq(e,n))):[]}function fq(e){return xK(e.type)?e.data.length:e.data.length*e.series.length}function pq(e){return e.renderer===`auto`?fq(e)>5e3?`canvas`:`svg`:e.renderer}function mq(e){switch(e.type){case`donut`:return e.data.map((t,n)=>$(e,n));case`scatter`:case`bubble`:return dq(e);case`line`:case`area`:case`column`:case`bar`:return e.series.map(e=>e.key);default:return[]}}function hq(e){return[`line`,`area`,`column`,`bar`].includes(e.type)?e.series.map(e=>e.label):mq(e)}function gq(e,t,n){return e.type===`donut`?n.has($(e,t)):(e.type===`scatter`||e.type===`bubble`)&&e.group?n.has(cq(e,t)):!1}function _q(e,t){return e.data.map((n,r)=>{let i=e.series.filter(e=>!t.has(e.key)).reduce((t,n)=>t+Math.abs(Q(e,n.key,r)??0),0);return Object.fromEntries(e.series.map(t=>{let n=Q(e,t.key,r);return[t.key,i&&n!=null?n/i:null]}))})}var vq=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];function yq(e,t=xG){return`${vq[new Date(e+DG(e,t)).getUTCDay()]}, ${nK(e,{timeZone:t})}`}var bq=e=>e.reduce((e,t)=>t<e?t:e,1/0),xq=e=>e.reduce((e,t)=>t>e?t:e,-1/0),Sq=(e,t)=>e.data.map((n,r)=>Q(e,t,r)).filter(e=>e!=null),Cq=(e,t)=>t?Z((e??0)/t,{style:`percent`}):`-`;function wq(e,t){let n=e.filter(WK);if(!n.length)return[];let r=bq(n),i=xq(n),a=[t[1],t[2],t[3],t[5],t[6]];if(r===i)return[{from:r,to:i,colour:a[2]}];let o=(i-r)/a.length;return a.map((e,t)=>({from:r+o*t,to:t===a.length-1?i:r+o*(t+1),colour:e}))}function Tq(e,t){if(t==null||!e.length)return;let n=e.length-1,r=e.findIndex((e,r)=>t>=e.from&&(r===n?t<=e.to:t<e.to));return e[r<0?n:r]?.colour}function Eq(e,t){return Array.from({length:e},(n,r)=>t[e===1?6:Math.round(6-r*4/(e-1))])}function Dq(e,t){return e.bands.find(e=>t<=e.upTo)??e.bands[e.bands.length-1]??null}var Oq=(e,t)=>t==null?`-`:YK(Dq(e,t),`gauge band`).label;function kq(e){return{min:e.y.min??0,max:e.y.max??100}}function Aq(e){let t=iq(e).key,n=e.data.length-1,r=0;return e.data.map((i,a)=>{let o=Q(e,t,a)??0,s=a===0||a===n,c=s?0:r,l=s?o:r+o;return a===0?r=o:s||(r=l),{index:a,total:s,value:o,from:c,to:l,level:s?o:l}})}function jq(e,t){let n=iq(e).key,r=YK(e.to,`to column`).key,i=e.data.map((t,i)=>({from:String(t[e.x.key]),to:String(t[r]),value:Q(e,n,i)??0})),a=/* @__PURE__ */ new Map;for(let e of i)a.has(e.from)||a.set(e.from,[]),a.set(e.to,[...a.get(e.to)??[],e]);let o=/* @__PURE__ */ new Map,s=0;for(let[e,n]of a)n.length||o.set(e,t[s++%t.length]);let c=[...o.keys()],l=new Map([...a].filter(([,e])=>e.length).map(([e,t])=>[e,t.length]));for(;c.length;){let e=c.shift();for(let t of i.filter(t=>t.from===e)){let e=(l.get(t.to)??0)-1;if(l.set(t.to,e),e>0)continue;let n=YK((a.get(t.to)??[]).reduce((e,t)=>e===null||t.value>e.value?t:e,null),`sankey inflow`);o.set(t.to,o.get(n.from)),c.push(t.to)}}return o}function Mq(e){let t=iq(e).key,n=new Map(dq(e).map(e=>[e,0]));return e.data.forEach((r,i)=>{n.set(cq(e,i),(n.get(cq(e,i))??0)+(Q(e,t,i)??0))}),n}function Nq(e,t,n){let{palette:r,neutral:i,seq:a}=n,o=iq(e).key;switch(e.type){case`donut`:return Iq(e,t,n);case`funnel`:return Eq(e.data.length,YK(a,`sequential colours`))[t];case`heatmap`:case`calendar`:return Tq(wq(Sq(e,o),YK(a,`sequential colours`)),Q(e,o,t));case`gauge`:return r[0];case`waterfall`:{let n=YK(Aq(e)[t],`waterfall bar ${t}`);return n.total?r[0]:n.value>=0?r[2]:r[7]}case`treemap`:return r[[...Mq(e).keys()].indexOf(cq(e,t))%r.length];case`sankey`:return jq(e,r).get(String(aq(e,t)[e.x.key]));case`scatter`:case`bubble`:return r[Math.max(0,dq(e).indexOf(cq(e,t)))];default:return r[0]??i}}function Pq(e,t,n,r){let i=iq(e),a=Q(e,i.key,t),o=()=>Nq(e,t,r);switch(e.type){case`donut`:{let r=e.data.reduce((t,r,a)=>t+(n.has($(e,a))?0:Q(e,i.key,a)??0),0);return{title:$(e,t),rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:`Share`,value:r&&a!=null?Z(a/r,{style:`percent`}):`-`}],foot:``}}case`heatmap`:return{title:`${cq(e,t)}, ${$(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)}],foot:``};case`calendar`:return{title:yq(sq(e,t),e.timeZone),rows:[{color:o(),label:i.label,value:Z(a,i.format)}],foot:``};case`funnel`:{let n=Q(e,i.key,0),r=t?Q(e,i.key,t-1):null,s=[{color:o(),label:i.label,value:Z(a,i.format)}];return t&&s.push({label:`Of previous step`,value:Cq(a,r)}),s.push({label:`Of ${$(e,0)}`,value:Cq(a,n)}),{title:$(e,t),rows:s,foot:``}}case`gauge`:{let{min:n,max:r}=kq(e),s=a==null?null:Dq(e,a),c=[{color:o(),label:i.label,value:Z(a,i.format)}];return c.push({label:`Scale`,value:`${Z(n,i.format)} to ${Z(r,i.format)}`}),s&&c.push({label:`Band`,value:s.label}),{title:e.data[t]?.[e.x.key]==null?i.label:$(e,t),rows:c,foot:``}}case`waterfall`:{let n=Aq(e),r=YK(n[t],`waterfall bar ${t}`),a=YK(n[0],`waterfall opening bar`).value,s=r.total?[{color:o(),label:i.label,value:Z(r.value,i.format)}]:[{color:o(),label:`Change`,value:Fq(r.value,i.format)},{label:`Running total`,value:Z(r.level,i.format)}],c=!r.total&&a?`${Fq(r.value/a*100,{style:`number`,decimals:2},`%`)} of opening`:``;return{title:$(e,t),rows:s,foot:c}}case`treemap`:{let n=cq(e,t),r=Mq(e).get(n);return{title:`${n} / ${$(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:`Share of ${n}`,value:Cq(a,r)}],foot:``}}case`sankey`:{let n=String(aq(e,t)[e.x.key]),r=e.data.reduce((t,r,a)=>String(r[e.x.key])===n?t+(Q(e,i.key,a)??0):t,0);return{title:`${n} to ${lq(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:`Share of ${n}`,value:Cq(a,r)}],foot:``}}case`scatter`:case`bubble`:{let n=[{color:o(),label:e.x.label||String(e.x.key),value:$(e,t)},{label:i.label,value:Z(a,i.format)}];return e.size&&n.push({label:e.size.label||String(e.size.key),value:Z(aq(e,t)[e.size.key],e.size.format)}),{title:e.group?cq(e,t):i.label,rows:n,foot:``}}}let s=e.stack===`percent`?_q(e,n)[t]:null,c=e.series.map((e,t)=>({s:e,i:t})).filter(({s:e})=>!n.has(e.key)),l=c.map(({s:n,i})=>{let a=Q(e,n.key,t),o=Z(a,n.format);return{color:e.type===`multiples`?r.palette[0]:r.palette[i],line:e.type===`line`||e.type===`multiples`,label:n.label,value:s&&a!=null?`${o} (${Z(s[n.key],{style:`percent`})})`:o}}),u=``,d=c[0];if(e.stack!==`none`&&d&&c.length>1&&(u=`Total ${Z(c.reduce((n,{s:r})=>n+(Q(e,r.key,t)??0),0),d.s.format)}`),e.target&&d&&c.length===1){let n=Q(e,d.s.key,t);if(n!=null){let t=n-e.target.value,r=e.target.label||`target`;u=`${t>=0?`Above`:`Below`} ${r} by ${Z(Math.abs(t),d.s.format)}`}}return{title:$(e,t),rows:l,foot:u}}function Fq(e,t,n=``){let r=`${Z(Math.abs(e),t)}${n}`;return e>0?`+${r}`:e<0?`−${r}`:r}function Iq(e,t,n){return t===e.otherIndex?n.neutral:n.palette[t%n.palette.length]}function Lq(e){let t=(e,t)=>{let n=document.createElement(`div`);return n.className=e,t!=null&&(n.textContent=t),n},n=t(`wui-chart-tooltip-body`);e.title&&n.append(t(`wui-chart-tooltip-title`,e.title));for(let r of e.rows){let e=t(`wui-chart-tooltip-row`);if(r.color){let t=document.createElement(`span`);t.className=r.line?`wui-chart-tooltip-swatch wui-chart-tooltip-swatch-line`:`wui-chart-tooltip-swatch`,t.style.background=r.color,e.append(t)}let i=document.createElement(`span`);i.className=`wui-chart-tooltip-label`,i.textContent=r.label;let a=document.createElement(`span`);a.className=`wui-chart-tooltip-value`,a.textContent=r.value,e.append(i,a),n.append(e)}return e.foot&&n.append(t(`wui-chart-tooltip-foot`,e.foot)),n}function Rq(e){let t=[e.title,...e.rows.map(e=>`${e.label} ${e.value}`)];return e.foot&&t.push(e.foot),t.filter(Boolean).join(`. `)}function zq(e){return e.x.label?e.x.label:{gauge:`Measure`,funnel:`Stage`,waterfall:`Step`,sankey:`From`,scatter:`X`,bubble:`X`}[e.type]??(e.x.kind===`time`?`Date`:`Category`)}function Bq(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=iq(t),r=(e,r=n)=>Z(Q(t,r.key,e),r.format),i=(e,n,r=n.length)=>({caption:t.title,head:e,rows:n.slice(0,500),total:r,truncated:r>500}),a=t.data.map((e,t)=>t);switch(t.type){case`heatmap`:{let e=uq(a.map(e=>$(t,e))),n=dq(t),o=new Map(a.map(e=>[`${cq(t,e)}\u0000${$(t,e)}`,r(e)]));return i([YK(t.group,`group column`).label||`Row`,...e],n.map(t=>({head:t,cells:e.map(e=>o.get(`${t}\u0000${e}`)??`-`)})))}case`funnel`:{let e=Q(t,n.key,0);return i([zq(t),n.label,`Of previous step`,`Of ${$(t,0)}`],a.map(i=>({head:$(t,i),cells:[r(i),i?Cq(Q(t,n.key,i),Q(t,n.key,i-1)):`-`,Cq(Q(t,n.key,i),e)]})))}case`gauge`:return i([zq(t),n.label,...t.bands.length?[`Band`]:[]],a.map(e=>({head:aq(t,e)[t.x.key]==null?n.label:$(t,e),cells:[r(e),...t.bands.length?[Oq(t,Q(t,n.key,e))]:[]]})));case`waterfall`:return i([zq(t),`Change`,`Running total`],Aq(t).map(e=>({head:$(t,e.index),cells:[e.total?`-`:Fq(e.value,n.format),Z(e.level,n.format)]})));case`treemap`:{let e=Mq(t);return i([YK(t.group,`group column`).label||`Group`,t.x.label||`Item`,n.label,`Share of group`],a.map(i=>({head:cq(t,i),cells:[$(t,i),r(i),Cq(Q(t,n.key,i),e.get(cq(t,i)))]})))}case`sankey`:return i([zq(t),YK(t.to,`to column`).label||`To`,n.label],a.map(e=>({head:$(t,e),cells:[lq(t,e),r(e)]})));case`scatter`:case`bubble`:return i([zq(t),n.label,...t.size?[t.size.label||t.size.key]:[],...t.group?[t.group.label||`Group`]:[]],a.map(e=>({head:$(t,e),cells:[r(e),...t.size?[Z(aq(t,e)[t.size.key],t.size.format)]:[],...t.group?[cq(t,e)]:[]]})))}let o=t.type===`donut`,s=o?t.data.reduce((e,r,i)=>e+(Q(t,n.key,i)??0),0):0,c=[zq(t),...t.series.map(e=>e.label)];return o&&c.push(`Share`),i(c,a.slice(0,500).map(e=>{let i=t.series.map(t=>r(e,t));if(o){let r=Q(t,n.key,e);i.push(s&&r!=null?Z(r/s,{style:`percent`}):`-`)}return{head:$(t,e),cells:i}}),t.data.length)}function Vq(e){switch(e?.style){case`currency`:case`compact`:return e.currency||e.style===`currency`?` (${e.currency??`INR`})`:``;case`percent`:return` (%)`;case`duration`:return` (${e.unit??`s`})`;default:return``}}function Hq(e,t){return e==null?e:t?.unit===`paise`?e/100:t?.style===`percent`?Number((e*100).toPrecision(12)):e}function Uq(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=e=>{if(e==null)return``;let t=String(e);return typeof e==`string`&&/^[=+\-@\t\r]/.test(t)&&(t=`'${t}`),/[",\r\n]/.test(t)?`"${t.replace(/"/g,`""`)}"`:t},r={head:t.x.label||t.x.key,value:e=>{let n=e[t.x.key];return t.x.kind===`time`?nK(n,{pattern:t.x.format?.pattern??`day`,timeZone:t.timeZone}):n}},i=t.series.map(e=>({head:`${e.label}${Vq(e.format)}`,value:t=>{let n=t[e.key];return Hq(WK(n)?n:null,e.format)}})),a=t.group,o=a?{head:a.label||a.key,value:e=>e[a.key]}:null,s;switch(t.type){case`heatmap`:s=[r,YK(o,`group column`),...i];break;case`treemap`:s=[YK(o,`group column`),r,...i];break;case`sankey`:{let e=YK(t.to,`to column`);s=[r,{head:e.label||e.key,value:t=>t[e.key]},...i];break}case`bubble`:{let e=YK(t.size,`size column`);s=[r,...i,{head:`${e.label||e.key}${Vq(e.format)}`,value:t=>{let n=t[e.key];return Hq(WK(n)?n:null,e.format)}},...o?[o]:[]];break}case`scatter`:s=[r,...i,...o?[o]:[]];break;case`gauge`:s=t.x.key===``?i:[r,...i];break;default:s=[r,...i]}let c=[s.map(e=>n(e.head)).join(`,`)];for(let e of t.data)c.push(s.map(t=>n(t.value(e))).join(`,`));return`${c.join(`\r
21
+ `)}`}function Wq(e){return(e?.title??``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)||`chart`}var Gq=(e,t,n)=>{if(!t.length)return null;let r=bq(t),i=xq(t);return r===i?`${e} is ${Z(r,n)}.`:`${e} runs from ${Z(r,n)} to ${Z(i,n)}.`};function Kq(e,t=/* @__PURE__ */ new Set){let n=[];e.description&&n.push(e.description.replace(/\.?\s*$/,`.`));let r=mq(e);if(r.length&&r.every(e=>t.has(e)))return n.push(`Every series is hidden.`),n.join(` `);let i=e.data.length,a=e.data.map((e,t)=>t).filter(n=>!gq(e,n,t)),o=iq(e),s=Sq(e,o.key),c=s.reduce((e,t)=>e+t,0),l=()=>e.data.reduce((t,n,r)=>(Q(e,o.key,r)??-1/0)>(Q(e,o.key,t)??-1/0)?r:t,0),u=()=>e.data.reduce((t,n,r)=>(Q(e,o.key,r)??1/0)<(Q(e,o.key,t)??1/0)?r:t,0);switch(e.type){case`donut`:{let t=a.reduce((t,n)=>t+(Q(e,o.key,n)??0),0);if(n.push(`${yK.donut} of ${o.label} in ${a.length} ${a.length===1?`part`:`parts`}, ${Z(t,o.format)} in all.`),a.length&&t){let r=a.reduce((t,n)=>(Q(e,o.key,n)??-1/0)>(Q(e,o.key,t)??-1/0)?n:t,YK(a[0],`first slice`));n.push(`${$(e,r)} is the largest, at ${Z((Q(e,o.key,r)??0)/t,{style:`percent`})}.`)}return n.join(` `)}case`heatmap`:if(n.push(`${yK.heatmap} of ${o.label} by ${YK(e.group,`group column`).label||`row`} and ${e.x.label||`column`}, ${i} cells.`),s.length){let t=l(),r=u();n.push(`Highest is ${qq(e,t)} at ${cq(e,t)}, ${$(e,t)}; lowest is ${qq(e,r)} at ${cq(e,r)}, ${$(e,r)}.`)}return n.join(` `);case`calendar`:return n.push(`${yK.calendar} of ${o.label}, ${i} ${i===1?`day`:`days`}${i>1?`, from ${$(e,0)} to ${$(e,i-1)}`:``}.`),s.length&&n.push(`Highest is ${qq(e,l())} on ${$(e,l())}; lowest is ${qq(e,u())} on ${$(e,u())}.`),n.join(` `);case`funnel`:return n.push(`${yK.funnel} of ${o.label} in ${i} stages.`),i>1&&n.push(`${$(e,0)} is ${qq(e,0)} and ${$(e,i-1)} is ${qq(e,i-1)}, ${Cq(Q(e,o.key,i-1),Q(e,o.key,0))} of the start.`),n.join(` `);case`gauge`:{let t=Q(e,o.key,0),{min:r,max:i}=kq(e),a=t==null?null:Dq(e,t);return n.push(`${yK.gauge}: ${o.label} is ${Z(t,o.format)} on a scale from ${Z(r,o.format)} to ${Z(i,o.format)}${a?`, in the ${a.label} band`:``}.`),n.join(` `)}case`waterfall`:{let t=Aq(e);if(n.push(`${yK.waterfall} of ${o.label}.`),i>1){let r=t.filter(e=>!e.total);n.push(`It opens at ${Z(YK(t[0],`waterfall opening bar`).value,o.format)} and closes at ${Z(YK(t[i-1],`waterfall closing bar`).value,o.format)}.`);let a=r.reduce((e,t)=>t.value>(e?.value??0)?t:e,null),s=r.reduce((e,t)=>t.value<(e?.value??0)?t:e,null);a&&n.push(`The largest rise is ${$(e,a.index)}, ${Fq(a.value,o.format)}.`),s&&n.push(`The largest fall is ${$(e,s.index)}, ${Fq(s.value,o.format)}.`)}return n.join(` `)}case`treemap`:{let t=Mq(e);if(!t.size)return`${yK.treemap} of ${o.label}: no items.`;let[r,a]=[...t].reduce((e,t)=>t[1]>e[1]?t:e);return n.push(`${yK.treemap} of ${o.label}: ${i} items in ${t.size} groups, ${Z(c,o.format)} in all.`),n.push(`${r} is the largest group, at ${Cq(a,c)}.`),n.join(` `)}case`sankey`:{let t=YK(e.to,`to column`).key,r=uq(e.data.flatMap(n=>[String(n[e.x.key]),String(n[t])])),a=l();return n.push(`${yK.sankey} of ${o.label}: ${i} flows between ${r.length} places.`),n.push(`The largest flow is ${$(e,a)} to ${lq(e,a)}, ${qq(e,a)}.`),n.join(` `)}case`scatter`:case`bubble`:{let r=dq(e).filter(e=>!t.has(e));n.push(`${yK[e.type]} of ${o.label} against ${e.x.label||e.x.key}, ${a.length} points${r.length?` in ${r.length} groups: ${r.join(`, `)}`:``}.`);let i=a.map(t=>aq(e,t)[e.x.key]).filter(WK),s=a.map(t=>Q(e,o.key,t)).filter(e=>e!=null);for(let t of[Gq(e.x.label||String(e.x.key),i,e.x.format),Gq(o.label,s,o.format)])t&&n.push(t);return n.join(` `)}}let d=e.stack===`percent`?`, stacked to 100%`:e.stack===`stacked`?`, stacked`:``,f=e.series.filter(e=>!t.has(e.key));n.push(`${yK[e.type]} of ${f.map(e=>e.label).join(`, `)}${d}${e.type===`multiples`?`, sharing one x axis`:``}.`),i&&n.push(`${i} ${i===1?`point`:`points`}, ${i>1?`from ${$(e,0)} to ${$(e,i-1)}`:$(e,0)}.`);for(let t of f){let r=Gq(t.label,Sq(e,t.key),t.format);r&&n.push(r)}return n.join(` `)}var qq=(e,t)=>{let n=iq(e);return Z(Q(e,n.key,t),n.format)};function Jq(e){return e.stack===`percent`?{style:`percent`,decimals:0}:iK(e.y.format)}var Yq=864e5,Xq={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},Zq=e=>Xq[e]??0,Qq=[`donut`,`funnel`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`];function $q(e,t){let n=e.data.map((e,t)=>t).filter(n=>!gq(e,n,t));if(e.type!==`scatter`&&e.type!==`bubble`)return n;let r=t=>Q(e,e.x.key,t)??0;return n.sort((e,t)=>r(e)-r(t)||e-t)}function eJ(e){let t=uq(e.data.map((t,n)=>$(e,n))),n=dq(e),r=new Map(e.data.map((r,i)=>[`${t.indexOf($(e,i))},${n.indexOf(cq(e,i))}`,i]));return{columns:t.length,rows:n.length,at:r,position:r=>[t.indexOf($(e,r)),n.indexOf(cq(e,r))]}}function tJ(e,t,n,r){if(n===`Escape`)return null;let i=e.data.length;if(!i)return t;if(e.type===`gauge`)return n in Xq||n===`Home`||n===`End`?{index:0,series:0}:t;if(e.type===`heatmap`||e.type===`calendar`)return nJ(e,t,n);let a=Qq.includes(e.type),o=e.series.map((e,t)=>r.has(e.key)?-1:t).filter(e=>e>=0),s=a?$q(e,r):[];if(a?!s.length:!o.length)return t;let c=t??{index:a?YK(s[0],`first mark`):0,series:a?0:YK(o[0],`first visible series`)};if(t==null&&n in Xq)return c;if(a){let e=Math.max(0,s.indexOf(c.index));return n===`Home`?{index:YK(s[0],`first mark`),series:0}:n===`End`?{index:YK(s[s.length-1],`last mark`),series:0}:n in Xq?{index:YK(s[(e+Zq(n)+s.length)%s.length],`next mark`),series:0}:t}if(n===`Home`)return{...c,index:0};if(n===`End`)return{...c,index:i-1};if(!(n in Xq))return t;if(e.type===`bar`?n===`ArrowUp`||n===`ArrowDown`:n===`ArrowLeft`||n===`ArrowRight`)return{...c,index:Math.min(i-1,Math.max(0,c.index+Zq(n)))};let l=Math.max(0,o.indexOf(c.series)),u=e.type===`bar`?Zq(n):-Zq(n);return{...c,series:YK(o[Math.min(o.length-1,Math.max(0,l+u))],`series`)}}function nJ(e,t,n){let r=e.data.length,i=e.type===`calendar`,a=i?e.data.map((e,t)=>t).sort((t,n)=>sq(e,t)-sq(e,n)):[],o=i?null:eJ(e),s=t??{index:i?YK(a[0],`first day`):0,series:0};if(t==null&&n in Xq)return s;if(n===`Home`)return{index:i?YK(a[0],`first day`):0,series:0};if(n===`End`)return{index:i?YK(a[r-1],`last day`):r-1,series:0};if(!(n in Xq))return t;if(i){let t=n===`ArrowDown`||n===`ArrowUp`?Zq(n):Zq(n)*7,r=t=>{let n=sq(e,t);return Math.floor((n+DG(n,e.timeZone))/Yq)},i=r(s.index),o=a.filter(e=>t>0?r(e)>i:r(e)<i);if(!o.length)return{index:s.index,series:0};let c=i+t;return{index:o.reduce((e,t)=>Math.abs(r(t)-c)<Math.abs(r(e)-c)?t:e),series:0}}if(!o)throw Error(`heat grid missing`);let[c,l]=o.position(s.index),[u,d]=n===`ArrowLeft`||n===`ArrowRight`?[Zq(n),0]:[0,Zq(n)];return{index:o.at.get(`${c+u},${l+d}`)??s.index,series:0}}Rj([fx,nT,QT,DL,RI,DI,ZF,bL,QM,qR,_B,wV,QB,vz,ez,OH,tH,TB,fU,zH,WW,mG]);function rJ(e){let t=e.series[0];if(!t)throw Error(`chart spec has no series`);return t}var iJ=e=>typeof e==`number`;function aJ(e,t){let n=e.data[t];if(!n)throw Error(`chart row ${t} missing`);return n}function oJ(e){if(!e.to)throw Error("chart spec has no `to` column");return e.to.key}function sJ(e){if(!e.size)throw Error("chart spec has no `size` column");return e.size.key}function cJ(e,t,n){let r=e[t];if(!r)throw Error(`percent shares for row ${t} missing`);return r[n]??null}function lJ(e,t,n){let r=e?.[t];if(!r)throw Error(`bar radii for row ${t} missing`);return r[n]}var uJ=e=>iJ(e)?e:null;function dJ(e){return typeof e==`object`&&e&&`row`in e?uJ(e.row):null}function fJ(e){if(typeof e!=`object`||!e||!(`dataZoom`in e)||!Array.isArray(e.dataZoom))return null;let t=e.dataZoom[0];if(typeof t!=`object`||!t||!(`start`in t)||!(`end`in t))return null;let{start:n,end:r}=t;return iJ(n)&&Number.isFinite(n)&&iJ(r)&&Number.isFinite(r)?{start:n,end:r}:null}function pJ(e){if(!e)throw Error(`chart has not been drawn`);return e}var mJ=[`series`,`graphic`,`grid`,`xAxis`,`yAxis`,`title`,`visualMap`,`calendar`,`dataZoom`],hJ=e=>String(e).replace(/[{}]/g,e=>e===`{`?`{`:`}`);function gJ(e,t,n,r,i=!1){let a=iK(e);if(i)return a.currency?{style:`currency`,currency:a.currency,unit:a.unit,decimals:0}:{style:`number`,decimals:0};if(a.style!==`compact`||!Number.isFinite(t)||!Number.isFinite(n))return a;let o=(n-t)/r;if(!(o>0)||o>=Math.max(Math.abs(t),Math.abs(n))*.02)return a;let s=Math.min(6,Math.max(0,Math.ceil(-Math.log10(o))));return a.currency?{style:`currency`,currency:a.currency,unit:a.unit,decimals:s}:{style:`number`,decimals:s}}var _J=(e,t)=>{let n=e.filter(e=>typeof e==`number`&&Number.isFinite(e));return[Math.min(...t?[0,...n]:n),Math.max(...t?[0,...n]:n)]},vJ=24,yJ=4,bJ=.6,xJ=(e,t)=>String(e).length*t*bJ,SJ=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`chart palette has no colour at slot ${t}`);return n};function CJ(e){let t=String(e??``).trim(),n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);if(n){let e=n[1]??``,t=e.length===3?[...e].map(e=>e+e).join(``):e;return[0,2,4].map(e=>Number.parseInt(t.slice(e,e+2),16))}let r=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(t);return r?r.slice(1,4).map(Number):null}function wJ(e,t){let n=CJ(e);return n?`rgba(${n.join(`,`)},${t})`:String(e??``).trim()}function TJ(e,t,n){let r=CJ(e),i=CJ(t);return r&&i?`rgb(${r.map((e,t)=>Math.round(e+((i[t]??0)-e)*n)).join(`,`)})`:e}var EJ=[.2126,.7152,.0722],DJ=e=>e.map(e=>e/255).map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4).reduce((e,t,n)=>e+t*(EJ[n]??0),0),OJ=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05);function kJ(e,t){let n=CJ(e),r=CJ(t.text),i=CJ(t.surface);return!n||!r||!i||OJ(DJ(n),DJ(r))>=OJ(DJ(n),DJ(i))?t.text:t.surface}var AJ=(e,t)=>({type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:wJ(e,t)},{offset:1,color:wJ(e,0)}]}),jJ=(e,t)=>e+DG(e,t);function MJ(e){let t=e.x.format?.pattern;return n=>{let r=OG(n,e.timeZone);if(t===`month`||t===`year`)return nK(r,{pattern:t,timeZone:e.timeZone});let i=EG(r,e.timeZone);return i.hour||i.minute?nK(r,{pattern:`time`,timeZone:e.timeZone}):rK(r,{timeZone:e.timeZone})}}function NJ(e,t,n){let r=yJ,i=e=>n?e?[r,0,0,r]:[0,r,r,0]:e?[0,0,r,r]:[r,r,0,0];return e.data.map((n,r)=>{let a={};if(e.stack===`none`){for(let t of e.series)a[t.key]=i((Q(e,t.key,r)??0)<0);return a}let o=null,s=null;for(let n of e.series){let i=Q(e,n.key,r);t.has(n.key)||i==null||i===0||(i>0?o=n.key:s=n.key)}for(let t of e.series)a[t.key]=t.key===o?i(!1):t.key===s?i(!0):0;return a})}function PJ(e,t,n,r){let i=n.width<576,a=r.animation!==!1&&!t.reducedMotion&&fq(e)<=5e3,o=mq(e),s=Object.fromEntries(o.map(e=>[e,!r.hidden.has(e)])),c={palette:t.palette,neutral:t.neutral,seq:t.seq},l={backgroundColor:t.surface,borderColor:t.grid,borderWidth:1,padding:[10,12],confine:!0,className:`wui-chart-tooltip`,extraCssText:`box-shadow:${t.shadow};border-radius:10px;`,textStyle:{fontFamily:t.font,color:t.textBody,fontSize:12},transitionDuration:a?.25:0},u={backgroundColor:`transparent`,animation:a,animationDuration:1e3,animationEasing:`cubicOut`,animationDurationUpdate:650,animationEasingUpdate:`cubicInOut`,textStyle:{fontFamily:t.font,color:t.label},color:t.palette,legend:{show:!1,data:o,selected:s}},d={base:u,tooltipBase:l,colours:c,compact:i,animate:a},f=TY[e.type];if(f)return f(e,t,n,r,d);let p=e.type===`bar`,m=e.x.kind===`time`,h=e.stack===`percent`?_q(e,r.hidden):null,g=p||e.type===`column`?NJ(e,r.hidden,p):null,_=e.series.length===1,v=r.renderer===`canvas`,[y,b]=_J(e.series.flatMap(t=>e.data.map((n,r)=>Q(e,t.key,r))),!0),x=e.stack===`percent`?Jq(e):gJ(e.y.format,e.y.min??y,e.y.max??b,i?3:4,e.y.wholeNumbers),S=h?.some(e=>Object.values(e).some(e=>e!=null&&e<0))?-1:0,C=e.series.findIndex(e=>!r.hidden.has(e.key)),w=e.series.filter(e=>!r.hidden.has(e.key)),T=m&&!e.valueLabels?[]:e.data.map((t,n)=>$(e,n)),E=()=>{let t=e.stack===`percent`?[1,S]:[e.y.max??b,e.y.min??y];return n.width-Math.max(...t.map(e=>xJ(Z(e,x),12)))-20},D=!1;if(e.valueLabels){let t=p?n.width-JJ(T.map(e=>xJ(e,12)))-20:iY(T.length,E())/Math.max(1,w.length);D=w.flatMap(t=>e.data.map((n,r)=>Q(e,t.key,r))).filter(e=>e!=null).every(e=>xJ(Z(e,x),12)<=t)}let O={type:m?`time`:`category`,boundaryGap:!m&&(e.type===`column`||p),inverse:p,axisLine:{show:!0,lineStyle:{color:t.axis}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{color:t.label,fontSize:12,margin:12,...m||e.type!==`column`||e.x.labelFit===`auto`?{hideOverlap:!0}:oY(e.x.labelFit,T,E()),...m?{formatter:MJ(e)}:{}},...m?{}:{data:T}},k={type:`value`,splitNumber:i?3:4,min:e.stack===`percent`?S:e.y.min,max:e.stack===`percent`?1:e.y.max,minInterval:e.y.wholeNumbers?1:void 0,interval:e.stack===`percent`?.25:void 0,axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:t.grid,type:`solid`,width:1}},axisLabel:{color:t.label,fontSize:12,formatter:e=>Z(e,x)},...e.y.label?{name:e.y.label,nameLocation:`end`,nameGap:12,nameTextStyle:{color:t.label,fontSize:12,align:p?`right`:`left`}}:{}},A=e.zoom,j=_&&e.type!==`column`&&!p&&!i,M=e.series.map((n,r)=>{let o=SJ(t.palette,r%t.palette.length),s=e.data.some((t,r)=>Q(e,n.key,r)!=null&&Q(e,n.key,r-1)==null&&Q(e,n.key,r+1)==null),c=t=>{let r=Q(e,n.key,t),i=h?cJ(h,t,n.key):r;return m?[jJ(sq(e,t),e.timeZone),i]:i},l={id:n.key,name:n.key,stack:e.stack===`none`?void 0:`total`,emphasis:{focus:_?`none`:`series`,blurScope:`coordinateSystem`},blur:{itemStyle:{opacity:.22},lineStyle:{opacity:.22},areaStyle:{opacity:.08}}};if(e.type===`line`||e.type===`area`){let n=e.type===`area`?_||e.stack!==`none`?t.dark?.34:.22:.1:0;return{...l,type:`line`,data:e.data.map((e,t)=>c(t)),smooth:.35,smoothMonotone:`x`,connectNulls:!1,symbol:`circle`,showSymbol:s,symbolSize:8,sampling:v?`lttb`:void 0,lineStyle:{width:2,color:o,..._&&!v?{shadowColor:wJ(o,.35),shadowBlur:10,shadowOffsetY:6}:{}},itemStyle:{color:o,borderColor:t.surface,borderWidth:2},areaStyle:n?{color:AJ(o,n)}:void 0,endLabel:j?{show:!0,formatter:e=>Z(Array.isArray(e.value)?e.value[1]:e.value,x),color:o,fontWeight:600,fontSize:12,distance:8,fontFamily:t.font,valueAnimation:a}:void 0,markLine:r===C?FJ(e,t,!1,a):void 0}}return{...l,type:`bar`,barMaxWidth:vJ,barCategoryGap:i?`28%`:`38%`,itemStyle:{color:o,borderColor:t.surface,borderWidth:e.stack===`none`?0:1},animationDelay:a?e=>e*45+r*110:0,data:e.data.map((e,t)=>({value:c(t),itemStyle:{borderRadius:lJ(g,t,n.key)}})),label:e.valueLabels?{show:D,position:p?`right`:`top`,distance:6,fontFamily:t.font,fontSize:12,fontWeight:600,color:t.text,formatter:e=>e.value==null?``:Z(e.value,x)}:void 0,markLine:r===C?FJ(e,t,p,a):void 0}});return{...u,useUTC:m,grid:{left:4,right:j?64:i?8:16,top:e.y.label?28:D&&e.type===`column`?24:12,bottom:A?44:4,outerBoundsMode:`same`},dataZoom:A?SY(e,t,SJ(t.palette,0),r.zoom):void 0,tooltip:{...l,trigger:`axis`,axisPointer:e.type===`line`||e.type===`area`?{type:`line`,lineStyle:{color:t.axis}}:{type:`shadow`,shadowStyle:{color:wJ(t.neutral,t.dark?.12:.1)}},formatter:t=>Lq(Pq(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,c))},xAxis:p?k:O,yAxis:p?O:k,series:M}}function FJ(e,t,n,r){if(!e.target)return;let i=rJ(e).format;return{silent:!0,symbol:`none`,animation:r,lineStyle:{color:t.label,type:[5,4],width:1},label:{position:`insideEndTop`,formatter:()=>[e.target?.label,Z(e.target?.value,i)].filter(Boolean).join(` `),color:t.textMuted,fontSize:12,fontFamily:t.font,backgroundColor:t.surface,padding:[2,6],borderRadius:4},data:[n?{xAxis:e.target.value}:{yAxis:e.target.value}]}}function IJ(e,t,n,r,i){let{base:a,tooltipBase:o,colours:s,compact:c}=i,l=rJ(e),u=e.data.map((t,n)=>$(e,n)),d=e.data.reduce((t,n,i)=>t+(r.hidden.has($(e,i))?0:Q(e,l.key,i)??0),0);return{...a,tooltip:{...o,trigger:`item`,formatter:t=>Lq(Pq(e,t.dataIndex,r.hidden,s))},graphic:[{type:`group`,left:`center`,top:`middle`,silent:!0,children:[{type:`text`,style:{text:Z(d,iK(l.format)),x:0,y:-10,align:`center`,verticalAlign:`middle`,fill:t.text,fontSize:c?18:22,fontWeight:650,fontFamily:t.font}},{type:`text`,style:{text:e.centerLabel||`Total`,x:0,y:14,align:`center`,verticalAlign:`middle`,fill:t.label,fontSize:12,fontFamily:t.font}}]}],series:[{id:l.key,name:l.key,type:`pie`,radius:c?[`50%`,`70%`]:[`54%`,`72%`],center:[`50%`,`50%`],padAngle:1.6,minAngle:3,startAngle:90,avoidLabelOverlap:!0,itemStyle:{borderRadius:6,borderColor:t.surface,borderWidth:2},animationType:`expansion`,animationDuration:1100,label:c?{show:!1}:{show:!0,position:`outside`,color:t.label,fontFamily:t.font,fontSize:12,lineHeight:16,formatter:e=>`${e.name}\n${Z(e.percent/100,{style:`percent`,decimals:0})}`},labelLine:{length:10,length2:8,smooth:.2,lineStyle:{color:t.axis}},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:6,itemStyle:{shadowBlur:16,shadowColor:`rgba(0,0,0,0.18)`}},data:e.data.map((t,n)=>({name:u[n],value:Q(e,l.key,n)??0,itemStyle:{color:Iq(e,n,s)}}))}]}}var LJ=e=>[...new Set(e)],RJ=(e,t)=>e.data.map((n,r)=>Q(e,t,r));function zJ(e,t){return{...e,trigger:`item`,formatter:e=>t(e)}}var BJ=(e,t,n={})=>({type:`category`,data:t,axisLine:{lineStyle:{color:e.axis}},axisTick:{show:!1},axisLabel:{color:e.label,fontSize:12,margin:12,hideOverlap:!0},...n}),VJ=(e,t,n={})=>({type:`value`,splitNumber:4,axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:e.grid,type:`solid`,width:1}},axisLabel:{color:e.label,fontSize:12,formatter:t},...n});function HJ(e,t,n={}){return{type:`piecewise`,orient:`horizontal`,right:4,bottom:0,pieces:t.map((e,n)=>({gte:e.from,[n===t.length-1?`lte`:`lt`]:e.to,color:e.colour})),itemWidth:11,itemHeight:11,itemGap:3,itemSymbol:`roundRect`,showLabel:!1,text:[`More`,`Less`],textGap:8,selectedMode:!1,textStyle:{color:e.label,fontSize:12,fontFamily:e.font},...n}}function UJ(e,t,n,r,i){let a=rJ(e),o=LJ(e.data.map((t,n)=>$(e,n))),s=dq(e),c=wq(RJ(e,a.key),t.seq);return{...i.base,grid:{left:4,right:4,top:8,bottom:40,outerBoundsMode:`same`},tooltip:zJ(i.tooltipBase,t=>Lq(Pq(e,t.dataIndex,r.hidden,i.colours))),xAxis:BJ(t,o,{axisLine:{show:!1},splitArea:{show:!1}}),yAxis:BJ(t,s,{inverse:!0,axisLine:{show:!1}}),visualMap:HJ(t,c),series:[{type:`heatmap`,data:e.data.map((t,n)=>[o.indexOf($(e,n)),s.indexOf(cq(e,n)),Q(e,a.key,n)??`-`]),itemStyle:{borderColor:t.surface,borderWidth:2,borderRadius:4},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}},progressive:0,animationDuration:800}]}}var WJ=6048e5,GJ=(e,t)=>{let n=EG(e,t);return`${n.year}-${String(n.month+1).padStart(2,`0`)}-${String(n.day).padStart(2,`0`)}`};function KJ(e,t){let n=e.data.map((t,n)=>sq(e,n)).filter(Number.isFinite),r=qJ(n),i=JJ(n),a=Math.ceil((i-r)/WJ)+1,o=Math.floor((t.height-62)/7),s=Math.max(YJ,Math.min(XJ,o,Math.floor((t.width-44)/a))),c=Math.max(1,Math.floor((t.width-44)/s));return{cell:s,from:a>c?i-(c-1)*WJ:r,to:i}}var qJ=e=>e.reduce((e,t)=>t<e?t:e,1/0),JJ=e=>e.reduce((e,t)=>t>e?t:e,-1/0),YJ=9,XJ=24;function ZJ(e,t,n,r,i){let a=rJ(e),{cell:o,from:s,to:c}=KJ(e,n),l=wq(RJ(e,a.key),t.seq);return{...i.base,tooltip:zJ(i.tooltipBase,t=>Lq(Pq(e,t.dataIndex,r.hidden,i.colours))),visualMap:HJ(t,l,{right:4}),calendar:{range:[GJ(s,e.timeZone),GJ(c,e.timeZone)],top:24,left:34,cellSize:[o,o],splitLine:{show:!1},itemStyle:{color:t.seq[0],borderColor:t.surface,borderWidth:o<16?2:3},dayLabel:{firstDay:1,nameMap:[``,`Mon`,``,`Wed`,``,`Fri`,``],color:t.label,fontSize:12,fontFamily:t.font,margin:8},monthLabel:{color:t.label,fontSize:12,fontFamily:t.font,margin:8},yearLabel:{show:!1}},series:[{type:`heatmap`,coordinateSystem:`calendar`,data:e.data.map((t,n)=>[GJ(sq(e,n),e.timeZone),Q(e,a.key,n)??`-`]),itemStyle:{borderRadius:3,borderColor:t.surface,borderWidth:2},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}}}]}}function QJ(e,t,n,r,i){let a=rJ(e),o=Eq(e.data.length,t.seq),s=Q(e,a.key,0);return{...i.base,tooltip:zJ(i.tooltipBase,t=>Lq(Pq(e,t.dataIndex,r.hidden,i.colours))),series:[{type:`funnel`,sort:`none`,gap:3,left:0,right:0,top:4,bottom:4,minSize:`38%`,maxSize:`100%`,funnelAlign:`center`,animationDuration:900,itemStyle:{borderColor:t.surface,borderWidth:0,borderRadius:6},emphasis:{itemStyle:{shadowBlur:14,shadowColor:`rgba(0,0,0,0.18)`}},label:{show:!0,position:`inside`,fontFamily:t.font,lineHeight:17},data:e.data.map((n,r)=>{let i=kJ(o[r],t),c=Q(e,a.key,r),l=r?`${Cq(c,Q(e,a.key,r-1))} of previous step`:`${Cq(c,s)} of ${hJ($(e,0))}`;return{name:$(e,r),value:c??0,itemStyle:{color:o[r]},label:{formatter:`{n|${hJ($(e,r))}} {v|${hJ(Z(c,a.format))}}\n{p|${r?l:`first stage`}}`,rich:{n:{color:i,fontSize:12.5,fontWeight:500,fontFamily:t.font},v:{color:i,fontSize:13,fontWeight:700,fontFamily:t.font},p:{color:wJ(i,.78),fontSize:12,fontFamily:t.font}}}}})}]}}function $J(e,t,n,r,i){let a=rJ(e),{min:o,max:s}=kq(e),c=Q(e,a.key,0),l=c??o,u=c==null?null:Dq(e,c),d=SJ(t.palette,0),f=s-o||1,p=e.bands.length?e.bands.map((e,n)=>[Math.min(1,Math.max(0,(e.upTo-o)/f)),t.seq[1+Math.min(n,3)]]):[[1,t.grid]];return e.bands.length&&(p[p.length-1]?.[0]??1)<1&&p.push([1,t.grid]),{...i.base,tooltip:zJ(i.tooltipBase,()=>Lq(Pq(e,0,r.hidden,i.colours))),series:[{type:`gauge`,startAngle:215,endAngle:-35,min:o,max:s,radius:`96%`,center:[`50%`,`58%`],splitNumber:10,pointer:{show:!1},anchor:{show:!1},progress:{show:c!=null,width:14,roundCap:!0,itemStyle:{color:d,shadowBlur:i.animate?12:0,shadowColor:wJ(d,.35)}},axisLine:{roundCap:!0,lineStyle:{width:14,color:p}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{offsetCenter:[0,`30%`],color:t.label,fontSize:12.5,fontFamily:t.font},detail:{valueAnimation:i.animate,offsetCenter:[0,`-4%`],fontFamily:t.font,formatter:e=>`{v|${hJ(c==null?Z(null):Z(e,a.format))}}{u|/${hJ(Z(s,a.format))}}${u?`\n{s|${hJ(u.label)}}`:``}`,rich:{v:{fontSize:36,fontWeight:650,color:t.text,fontFamily:t.font,padding:[0,2,0,0]},u:{fontSize:14,color:t.label,fontFamily:t.font,padding:[12,0,0,0]},s:{fontSize:12,color:t.label,fontFamily:t.font,padding:[8,0,0,0]}}},data:[{value:l,name:e.data[0]?.[e.x.key]==null?a.label:$(e,0)}]}]}}function eY(e){let t=JJ(e.map(e=>e.level).concat(e.map(e=>e.from),e.map(e=>e.to))),n=qJ(e.filter(e=>!e.total).map(e=>Math.min(e.from,e.to)).concat(e.filter(e=>e.total).map(e=>e.value))),r=JJ(e.filter(e=>!e.total).map(e=>Math.abs(e.value)));if(!(t>0)||!(n>t*.4)||!(r<t*.15))return null;let i=10**Math.floor(Math.log10(t))/10,a=Math.round(t*.08/i)*i,o=Math.floor(n*.965/i)*i;return o>a?{start:a,end:o}:null}var tY=4,nY=72,rY=12,iY=(e,t)=>Math.floor(t/Math.max(1,e)-tY);function aY(e,t){return JJ(e.flatMap(e=>String(e).split(/\s+/)).map(e=>xJ(e,rY)))<=t?{interval:0,width:t,overflow:`break`}:{interval:0,rotate:45,width:nY,overflow:`truncate`}}function oY(e,t,n){let r=iY(t.length,n);return e===`all`?{...aY(t,r),hideOverlap:!1}:e===`rotate`?{interval:0,rotate:45,width:nY,overflow:`truncate`,hideOverlap:!1}:e===`ellipsis`?{interval:0,rotate:0,width:Math.max(1,r),overflow:`truncate`,hideOverlap:!1}:{hideOverlap:!0}}function sY(e,t,n){let r=iY(e.length,n),i=aY(e,r);return{nameSize:rY,valueSize:12,category:`rotate`in i?{...i,hideOverlap:!0}:i,showValues:t.every(e=>xJ(e,12)<=r)}}function cY(e,t,n,r,i){let a=rJ(e),o=Aq(e),s=Jq(e),c=eY(o),l=t=>Nq(e,t.index,i.colours),u=o.map(t=>$(e,t.index)),d=o.map(e=>e.total?Z(e.value,s):Fq(e.value,s)),f=o.flatMap(e=>[e.from,e.to]),p=Math.max(xJ(Z(JJ(f),s),11),xJ(Z(qJ(f),s),11))+8,m=sY(u,d,n.width-p-12);return{...i.base,grid:{left:4,right:8,top:28,bottom:4,outerBoundsMode:`same`},tooltip:{...i.tooltipBase,trigger:`axis`,axisPointer:{type:`shadow`,shadowStyle:{color:wJ(t.neutral,.1)}},formatter:t=>Lq(Pq(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:BJ(t,u,{axisLabel:{color:t.label,fontSize:m.nameSize,margin:12,...m.category}}),yAxis:VJ(t,e=>Z(e,s),{min:0,splitNumber:5,...c?{breaks:[{start:c.start,end:c.end,gap:`6%`}],breakArea:{show:!0,itemStyle:{color:t.surface,borderColor:t.axis,borderWidth:1,borderType:`solid`,opacity:1},zigzagAmplitude:3,zigzagZ:200}}:{}}),series:[{type:`line`,step:`end`,data:o.map(e=>e.level),symbol:`none`,silent:!0,z:1,lineStyle:{color:t.axis,width:1},tooltip:{show:!1},animation:!1,emphasis:{disabled:!0}},{type:`bar`,stack:`w`,data:o.map(e=>Math.min(e.from,e.to)),silent:!0,itemStyle:{color:`transparent`},emphasis:{disabled:!0},tooltip:{show:!1},barMaxWidth:48},{name:a.key,type:`bar`,stack:`w`,z:3,barMaxWidth:48,barCategoryGap:`34%`,itemStyle:{borderRadius:5},emphasis:{itemStyle:{shadowBlur:10,shadowColor:`rgba(0,0,0,0.15)`}},animationDelay:i.animate?e=>e*140:0,label:{show:m.showValues,position:`top`,distance:6,fontFamily:t.font,fontSize:m.valueSize,fontWeight:600,color:t.text,formatter:e=>d[e.dataIndex]},data:o.map(e=>({value:Math.abs(e.to-e.from),itemStyle:{color:l(e)}}))}]}}function lY(e){let t=rJ(e).key;return dq(e).map(n=>({name:n,rows:e.data.map((e,t)=>t).filter(t=>cq(e,t)===n).sort((n,r)=>(Q(e,t,r)??0)-(Q(e,t,n)??0)||n-r)}))}function uY(e,t,n,r,i){let a=rJ(e),o=Mq(e),s=[...o.values()].reduce((e,t)=>e+t,0),c=(e,t)=>{let r=(e??0)/s*n.width*n.height*.82;return r>5200&&Math.max(xJ(t[0],12),xJ(t[1],11.5))+20<=Math.sqrt(r)},l=lY(e).map(({name:n,rows:r},i)=>{let s=o.get(n),l=SJ(t.palette,i%t.palette.length),u=kJ(l,t);return{name:n,value:s,itemStyle:{color:l,borderColor:l},upperLabel:{color:u,formatter:`{n|${hJ(n)}} {v|${hJ(Z(s,a.format))}}`,rich:{n:{fontWeight:600,fontSize:12,color:u,fontFamily:t.font},v:{fontSize:12,color:wJ(u,.8),fontFamily:t.font}}},children:r.map((n,r)=>{let i=TJ(l,t.surface,Math.min(.55,r*.14)),o=kJ(i,t),s=Q(e,a.key,n);return{name:$(e,n),value:s,row:n,itemStyle:{color:i},label:{show:c(s,[$(e,n),Z(s,a.format)]),formatter:`{n|${hJ($(e,n))}}\n{v|${hJ(Z(s,a.format))}}`,rich:{n:{color:o,fontSize:12,fontWeight:500,fontFamily:t.font,lineHeight:16},v:{color:wJ(o,.82),fontSize:12,fontFamily:t.font}}}}})}});return{...i.base,tooltip:zJ(i.tooltipBase,t=>t.data?.row==null?Lq({title:t.name,rows:[{color:t.color,label:a.label,value:Z(t.value,a.format)},{label:`Share of all`,value:Cq(uJ(t.value),s)}],foot:``}):Lq(Pq(e,t.data.row,r.hidden,i.colours))),series:[{type:`treemap`,roam:!1,nodeClick:!1,breadcrumb:{show:!1},left:0,right:0,top:0,bottom:0,animationDurationUpdate:700,label:{show:!0,position:`insideTopLeft`,padding:[8,10],overflow:`truncate`,fontFamily:t.font},upperLabel:{show:!0,height:28,padding:[0,10],fontFamily:t.font},levels:[{itemStyle:{borderWidth:0,gapWidth:4,borderColor:t.surface}},{itemStyle:{borderWidth:3,gapWidth:2,borderRadius:8}},{itemStyle:{borderWidth:0,gapWidth:0,borderRadius:5},emphasis:{itemStyle:{borderColor:t.text,borderWidth:0}}}],data:l}]}}function dY(e){let t=oJ(e),n=e.data.map(n=>[String(n[e.x.key]),String(n[t])]),r=new Map(n.flatMap(([e,t])=>[[e,0],[t,0]]));for(let e=0;e<r.size;e+=1)for(let[e,t]of n)r.set(t,Math.max(r.get(t)??0,(r.get(e)??0)+1));return r}function fY(e,t,n,r,i){let a=rJ(e),o=oJ(e),s=jq(e,t.palette),c=dY(e),l=JJ([...c.values()]),u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map;e.data.forEach((t,n)=>{let r=Q(e,a.key,n)??0;u.set(String(t[e.x.key]),(u.get(String(t[e.x.key]))??0)+r),d.set(String(t[o]),(d.get(String(t[o]))??0)+r)});let f=e=>d.get(e)??u.get(e)??0,p=e=>({position:e,color:t.text,fontFamily:t.font,fontSize:12,formatter:e=>`{n|${hJ(e.name)}}\n{v|${Z(f(e.name),{style:`compact`})}}`,rich:{n:{color:t.textBody,fontSize:12,fontFamily:t.font,lineHeight:15},v:{color:t.label,fontSize:12,fontFamily:t.font}}});return{...i.base,tooltip:zJ(i.tooltipBase,t=>Lq(t.dataType===`edge`?Pq(e,t.dataIndex,r.hidden,i.colours):{title:t.name,rows:[{color:t.color,label:a.label,value:Z(f(t.name),a.format)}],foot:``})),series:[{type:`sankey`,left:0,right:0,top:6,bottom:6,nodeWidth:10,nodeGap:i.compact?10:14,nodeAlign:`justify`,draggable:!1,layoutIterations:64,animationDuration:1200,emphasis:{focus:`adjacency`,lineStyle:{opacity:.55}},itemStyle:{borderWidth:0,borderRadius:3},lineStyle:{curveness:.5},levels:Array.from({length:l+1},(e,t)=>({depth:t,label:p(t===l&&l>0?`left`:`right`)})),data:[...c.keys()].map(e=>({name:e,itemStyle:{color:s.get(e)}})),links:e.data.map(n=>({source:String(n[e.x.key]),target:String(n[o]),value:n[a.key],lineStyle:{color:s.get(String(n[e.x.key])),opacity:t.dark?.32:.26}}))}]}}function pY(e){let t=e.length,n=e.reduce((e,t)=>e+t[0],0)/t,r=e.reduce((e,t)=>e+t[1],0)/t,i=e.reduce((e,t)=>e+(t[0]-n)**2,0);if(!t||!i)return null;let a=e.reduce((e,t)=>e+(t[0]-n)*(t[1]-r),0)/i,o=qJ(e.map(e=>e[1])),s=JJ(e.map(e=>e[1])),c=e=>{let t=r+a*(e-n);return t<o?[e+(o-t)/a,o]:t>s?[e+(s-t)/a,s]:[e,t]};return[c(qJ(e.map(e=>e[0]))),c(JJ(e.map(e=>e[0])))]}var mY=44,hY=28,gY=8;function _Y(e,t,n,r,i){let a=rJ(e),o=dq(e),s=e.type===`bubble`,c=JJ(s?e.data.map(t=>t[sJ(e)]).filter(iJ):[]),l=e=>Math.max(gY,(i.compact?hY:mY)*Math.sqrt(e/c)),u=t=>e.data.map((e,t)=>t).filter(n=>!e.group||cq(e,n)===t),d=(e.group?o:[null]).filter(e=>e==null||!r.hidden.has(e)).flatMap(e=>u(e)),f=e.trend?pY(d.flatMap(t=>{let n=aJ(e,t)[e.x.key],r=Q(e,a.key,t);return iJ(n)&&r!=null?[[n,r]]:[]})):null,p=e.data.map(t=>t[e.x.key]),m=e.data.map((t,n)=>Q(e,a.key,n)),[h,g]=_J(p,!1),[_,v]=_J(m,!1),y=gJ(e.y.format,e.y.min??_,e.y.max??v,4),b=gJ(e.x.format,h,g,4),x=(e.group?o:[null]).map((n,r)=>({name:n??a.key,type:`scatter`,symbolSize:s?e=>l(e[2]??NaN):i.compact?8:10,itemStyle:{color:wJ(t.palette[r],.85),borderColor:t.surface,borderWidth:1.5},emphasis:{focus:`series`,scale:1.5,itemStyle:{color:t.palette[r]}},blur:{itemStyle:{opacity:.15}},animationDelay:i.animate?e=>e*6+r*120:0,data:u(n).map(t=>({value:[aJ(e,t)[e.x.key],Q(e,a.key,t),...s?[aJ(e,t)[sJ(e)]]:[]],row:t}))}));return f&&x.push({name:`Trend`,type:`line`,data:f,symbol:`none`,silent:!0,z:1,tooltip:{show:!1},lineStyle:{color:t.label,width:1.5,type:[6,4]},emphasis:{disabled:!0},endLabel:{show:!0,formatter:`Trend`,color:t.label,fontSize:12,fontFamily:t.font,offset:[-30,-12]}}),{...i.base,grid:{left:4,right:16,top:e.y.label?28:12,bottom:e.x.label?24:4,outerBoundsMode:`same`},tooltip:zJ(i.tooltipBase,t=>t.data?.row==null?``:Lq(Pq(e,t.data.row,r.hidden,i.colours))),xAxis:VJ(t,e=>Z(e,b),{scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t.axis}},...e.x.label?{name:e.x.label,nameLocation:`middle`,nameGap:28,nameTextStyle:{color:t.label,fontSize:12,fontFamily:t.font}}:{}}),yAxis:VJ(t,e=>Z(e,y),{min:e.y.min,max:e.y.max,...e.y.label?{name:e.y.label,nameLocation:`end`,nameGap:12,nameTextStyle:{color:t.label,fontSize:12,fontFamily:t.font,align:`left`}}:{}}),series:x}}var vY=32,yY=8,bY=26;function xY(e,t,n,r,i){let a=e.x.kind===`time`,o=e.series.length,s=(n.height-6-bY)/o,c=s-vY-yY,l=SJ(t.palette,0),u=e.data.map((t,n)=>$(e,n)),d=e.series.flatMap((n,r)=>{let i=RJ(e,n.key).filter(e=>e!=null).pop();return[{text:n.label,left:0,top:6+r*s,textStyle:{fontSize:12.5,fontWeight:600,color:t.text,fontFamily:t.font}},{text:`Latest ${Z(i,n.format)}`,right:8,top:7+r*s,textStyle:{fontSize:12,fontWeight:500,color:t.label,fontFamily:t.font}}]}),f=(t,n)=>{let r=Q(e,t.key,n);return a?[jJ(sq(e,n),e.timeZone),r]:r};return{...i.base,useUTC:a,title:d,grid:e.series.map((e,t)=>({left:52,right:8,top:6+t*s+vY,height:c})),axisPointer:{link:[{xAxisIndex:`all`}],lineStyle:{color:t.axis},label:{show:!1}},tooltip:{...i.tooltipBase,trigger:`axis`,axisPointer:{type:`line`,lineStyle:{color:t.axis}},formatter:t=>Lq(Pq(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:e.series.map((n,r)=>({...a?{type:`time`}:BJ(t,u,{boundaryGap:!1}),gridIndex:r,axisLine:{lineStyle:{color:r===o-1?t.axis:t.grid}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:r===o-1,color:t.label,fontSize:12,hideOverlap:!0,margin:10,...a?{formatter:MJ(e)}:{}}})),yAxis:e.series.map((n,r)=>{let[i,a]=_J(RJ(e,n.key),!1),o=gJ(n.format,e.y.min??i,e.y.max??a,2);return VJ(t,e=>Z(e,o),{gridIndex:r,splitNumber:2,scale:e.y.min==null,min:e.y.min,max:e.y.max,axisLabel:{color:t.label,fontSize:12,formatter:e=>Z(e,o)}})}),series:e.series.map((n,r)=>({id:n.key,name:n.key,type:`line`,xAxisIndex:r,yAxisIndex:r,data:e.data.map((e,t)=>f(n,t)),smooth:.3,symbol:`circle`,showSymbol:!1,symbolSize:7,lineStyle:{width:1.75,color:l},itemStyle:{color:l,borderColor:t.surface,borderWidth:2},areaStyle:{color:AJ(l,t.dark?.26:.16)},animationDelay:i.animate?r*160:0,emphasis:{disabled:!0}}))}}function SY(e,t,n,r){let i=r?.start??(e.data.length>5e3?70:0),a=r?.end??100;return[{type:`inside`,start:i,end:a},{type:`slider`,start:i,end:a,height:26,bottom:8,left:52,right:12,borderColor:`transparent`,backgroundColor:t.grid,borderRadius:6,fillerColor:wJ(n,t.dark?.22:.12),handleStyle:{color:t.surface,borderColor:t.axis},moveHandleSize:0,brushSelect:!1,dataBackground:{lineStyle:{color:t.axis,width:.75},areaStyle:{color:wJ(t.neutral,.15)}},selectedDataBackground:{lineStyle:{color:n,width:.75},areaStyle:{color:wJ(n,.18)}},textStyle:{color:t.label,fontSize:12,fontFamily:t.font}}]}function CY(e,t,n){switch(e.type){case`scatter`:case`bubble`:{if(!e.group)return{seriesIndex:0,dataIndex:n};let t=cq(e,n),r=e.data.map((e,t)=>t).filter(n=>cq(e,n)===t);return{seriesIndex:dq(e).indexOf(t),dataIndex:r.indexOf(n)}}case`waterfall`:return{seriesIndex:2,dataIndex:n};case`sankey`:return{seriesIndex:0,dataIndex:n,dataType:`edge`,tip:!1};case`treemap`:{let t=1;for(let r of lY(e)){let e=r.rows.indexOf(n);if(e>=0)return{seriesIndex:0,dataIndex:t+1+e};t+=1+r.rows.length}return{seriesIndex:0,dataIndex:n}}case`gauge`:case`donut`:case`heatmap`:case`calendar`:case`funnel`:return{seriesIndex:0,dataIndex:n};default:return{seriesIndex:t,dataIndex:n}}}function wY(e,t){switch(e.type){case`scatter`:case`bubble`:case`treemap`:{let e=dJ(t.data);return e==null?null:{series:0,row:e}}case`sankey`:return t.dataType===`edge`?{series:0,row:t.dataIndex}:null;case`waterfall`:return t.seriesIndex===2?{series:0,row:t.dataIndex}:null;case`line`:case`area`:case`column`:case`bar`:case`multiples`:return t.seriesIndex==null?null:{series:t.seriesIndex,row:t.dataIndex};default:return{series:0,row:t.dataIndex}}}var TY={donut:IJ,heatmap:UJ,calendar:ZJ,funnel:QJ,gauge:$J,waterfall:cY,treemap:uY,sankey:fY,scatter:_Y,bubble:_Y,multiples:xY};function EY(e,t,n,r,{pixelRatio:i=2}={}){let a=document.createElement(`div`);a.style.cssText=`position:fixed;left:-10000px;top:0;width:${n.width}px;height:${n.height}px;`,document.body.append(a);let o=vj(a,null,{renderer:`canvas`,devicePixelRatio:i,width:n.width,height:n.height});try{return o.setOption(PJ(e,t,n,{...r,renderer:`canvas`,animation:!1})),o.getDataURL({type:`png`,pixelRatio:i,backgroundColor:t.surface})}finally{o.dispose(),a.remove()}}function DY(e,{renderer:t}){let n=vj(e,null,{renderer:t}),r=!1,i=null;return{renderer:t,render(e,t,a,o,{replace:s=!1}={}){let c=r&&!s?fJ(n.getOption()):null,l=PJ(e,t,a,{...o,zoom:c});i=e,n.setOption(l,s||!r?{notMerge:!0}:{replaceMerge:mJ}),r=!0},focusPoint(e,t){let{tip:r=!0,...a}=CY(pJ(i),e,t);n.dispatchAction({type:`downplay`}),n.dispatchAction({type:`highlight`,...a}),r&&n.dispatchAction({type:`showTip`,...a})},clearFocus(){n.dispatchAction({type:`hideTip`}),n.dispatchAction({type:`downplay`})},resize(){n.resize()},onSelect(e){n.on(`click`,t=>{if(t.componentType!==`series`)return;let n=wY(pJ(i),t);n&&e({seriesIndex:n.series,dataIndex:n.row})})},onFinished(e){n.on(`finished`,e)},dispose(){n.dispose()}}}var OY=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(OY);var kY=HTMLElement,AY=`wui-chart:select`,jY=`wui-chart:legend-change`,MY=`wui-chart:ready`,NY=[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`],PY=`(prefers-color-scheme: dark)`,FY=`(prefers-reduced-motion: reduce)`,IY=e=>typeof window.matchMedia==`function`?window.matchMedia(e):null,LY=!1;function RY(e){let t=getComputedStyle(e),n=e=>t.getPropertyValue(e).trim(),r=e.closest(`[data-bs-theme], [data-theme]`)??document.documentElement,i=r.getAttribute(`data-bs-theme`)||r.getAttribute(`data-theme`),a={palette:[1,2,3,4,5,6,7,8].map(e=>n(`--color-chart-${e}`)),seq:[0,1,2,3,4,5,6].map(e=>n(`--color-chart-seq-${e}`)),neutral:n(`--color-chart-neutral`),grid:n(`--color-chart-grid`),axis:n(`--color-chart-axis`),label:n(`--color-chart-label`),surface:n(`--color-surface`),text:n(`--color-text`),textBody:n(`--color-text-body`),textMuted:n(`--color-text-muted`),shadow:n(`--wui-shadow-popover`),font:t.fontFamily,dark:i===`dark`||i===`auto`&&!!IY(PY)?.matches,reducedMotion:!!IY(FY)?.matches};return!a.palette[0]&&!LY&&(LY=!0,vG(`[@webority/ui-elements] <wui-chart> found no --color-chart-* colours: load @webority/theme on the page.`)),a}var zY=/* @__PURE__ */ new Set,BY=null;function VY(e){if(zY.add(e),BY)return;let t=()=>{for(let e of zY)e._themeChanged()},n=new MutationObserver(t);n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`data-bs-theme`,`class`]});let r=new MutationObserver(t);r.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[`data-theme`,`data-bs-theme`]});let i=[IY(PY),IY(FY)].filter(e=>e!==null);for(let e of i)e.addEventListener?.(`change`,t);BY=()=>{n.disconnect(),r.disconnect();for(let e of i)e.removeEventListener?.(`change`,t);BY=null}}function HY(e){zY.delete(e),zY.size||BY?.()}function UY(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.append(n),n.click(),n.remove()}var WY=(e,t,n)=>{let r=document.createElement(e);return t&&(r.className=t),n!=null&&(r.textContent=n),r},GY=0,KY=class extends kY{uid;_spec;_normal;_hidden;_focus;_awaitingSpec=!1;_parts=null;_theme=null;_width=null;_visible=!1;_resizeObserver=null;_intersection=null;_engine=null;_drawn=!1;_drawnType=null;_announcedReady=!1;_legendSignature=null;_tableSpec=null;static get observedAttributes(){return[`view`]}constructor(){super(),GY+=1,this.uid=`wui-chart-${GY}`,this._spec=null,this._normal=null,this._hidden=/* @__PURE__ */ new Set,this._focus=null}get spec(){return this._spec}set spec(e){this._spec=e??null,this._normal=null,this._clearFocus(),this._parts&&this._update()}get view(){return this.getAttribute(`view`)===`table`?`table`:`chart`}set view(e){this.setAttribute(`view`,String(e??`chart`))}connectedCallback(){if(Object.hasOwn(this,`spec`)){let e=this.spec;delete this.spec,this._spec=e??null}if(this._spec??=this._readScript(),this._spec==null&&!this.querySelector(`:scope > script[type='application/json']`)&&(this._awaitingSpec=!0,queueMicrotask(()=>{this._awaitingSpec=!1,this._parts&&this._update()})),this._build(),VY(this),this._theme=RY(this),this._width=this.clientWidth,this._resizeObserver=new ResizeObserver(()=>this._resized()),this._resizeObserver.observe(this),typeof IntersectionObserver==`function`){this._visible=!1;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(e.disconnect(),this._visible=!0,this._update())},{threshold:.05});this._intersection=e,e.observe(this)}else this._visible=!0;this._update()}disconnectedCallback(){HY(this),this._resizeObserver?.disconnect(),this._intersection?.disconnect(),this._engine?.dispose(),this._engine=null,this._drawn=!1,this._parts=null,this.removeAttribute(`data-ready`)}attributeChangedCallback(e,t,n){t!==n&&this._parts&&(ZK(`view`,n,uK),this._update())}toCsv(){let{spec:e}=this._normalized();return e?Uq(e):``}toPng(){let{spec:e}=this._normalized();return e?EY(e,this._theme??RY(this),this._size(e),{hidden:this._hidden,renderer:pq(e)}):``}exportCsv(e){let t=URL.createObjectURL(new Blob([this.toCsv()],{type:`text/csv;charset=utf-8`}));UY(t,e??`${Wq(this._normalized().spec)}.csv`),setTimeout(()=>URL.revokeObjectURL(t),2e3)}exportPng(e){let t=this.toPng();t&&UY(t,e??`${Wq(this._normalized().spec)}.png`)}_readScript(){let e=this.querySelector(`:scope > script[type="application/json"]`);if(!(e instanceof HTMLScriptElement))return null;try{return JSON.parse(String(e.textContent))}catch(e){return yG(`[@webority/ui-elements] <wui-chart> could not read its JSON spec:`,e instanceof Error?e.message:void 0),null}}_normalized(){return this._normal??=eq(this._spec),this._normal}_build(){let e=WY(`div`,`wui-chart-legend`);e.setAttribute(`role`,`group`),e.setAttribute(`aria-label`,`Legend`),e.hidden=!0,e.addEventListener(`click`,e=>{let t=e.target instanceof Element?e.target.closest(`.wui-chart-legend-item`):null;t instanceof HTMLElement&&this._toggle(t.dataset.key)});let t=WY(`div`,`wui-chart-surface`);t.tabIndex=0,t.setAttribute(`role`,`group`),t.setAttribute(`aria-roledescription`,`chart`),t.addEventListener(`keydown`,e=>this._onKey(e)),t.addEventListener(`blur`,()=>this._clearFocus());let n=WY(`div`,`wui-chart-canvas`);n.setAttribute(`aria-hidden`,`true`),t.append(n);let r=WY(`div`,`wui-chart-state`);r.setAttribute(`role`,`status`),r.hidden=!0;let i=WY(`div`,`wui-chart-table-wrap visually-hidden`),a=WY(`p`,`visually-hidden`);a.id=`${this.uid}-summary`;let o=WY(`div`,`visually-hidden`);o.setAttribute(`aria-live`,`polite`),this.replaceChildren(e,t,r,i,a,o),this.setAttribute(`role`,`figure`),this.setAttribute(`aria-describedby`,a.id),this._parts={legend:e,surface:t,canvas:n,state:r,tableWrap:i,summary:a,live:o},this._legendSignature=null,this._tableSpec=null}_size(e){return{width:this._parts?.surface.clientWidth||this.clientWidth||800,height:e.height}}_update(){if(!this._parts||this._awaitingSpec&&this._spec==null)return;let{spec:e,problem:t}=this._normalized(),n=this._parts,r=e===null?`error`:e.state===`ready`&&(!e.data.length||!oq(e))?`empty`:e.state,i=`${e?.height??320}px`,a=this.view===`table`,o=e!==null&&(r===`ready`||r===`loading`&&this._drawn),s=r===`loading`&&o;if(this.setAttribute(`aria-label`,e?.title||`Chart`),r===`loading`?this.setAttribute(`aria-busy`,`true`):this.removeAttribute(`aria-busy`),this.setAttribute(`data-state`,r),n.surface.setAttribute(`aria-label`,`${e?.title||`Chart`}: use the arrow keys to read the values`),n.summary.textContent=e?Kq(e,this._hidden):``,e){if(!s){let t=new Set(mq(e));for(let e of this._hidden)t.has(e)||this._hidden.delete(e)}this._renderTable(e)}else n.tableWrap.replaceChildren();s||this._renderLegend(e,o&&!a),this._renderState(r,e===null?t:r===`error`?e.errorText:r===`loading`?e.loadingText??`Loading chart`:e.emptyText,i,o);let c=r===`ready`&&!a;s||this.toggleAttribute(`data-ready`,!c);let l=n.surface.hidden&&o&&!a;n.surface.hidden=!o||a,n.surface.style.height=i,n.tableWrap.className=a&&e?`wui-chart-table-wrap`:`wui-chart-table-wrap visually-hidden`,n.tableWrap.style.height=a&&e?i:``,a&&e?(n.tableWrap.tabIndex=0,n.tableWrap.setAttribute(`role`,`region`),n.tableWrap.setAttribute(`aria-label`,`${e.title||`Chart`} data`)):(n.tableWrap.removeAttribute(`tabindex`),n.tableWrap.removeAttribute(`role`),n.tableWrap.removeAttribute(`aria-label`)),l&&this._engine?.resize(),r===`ready`&&!a&&this._visible&&this._draw()}_renderState(e,t,n,r){let i=this._parts?.state;if(!i)return;let a=!r&&e!==`ready`;i.hidden=!a,a?(i.style.height=n,e===`loading`?i.replaceChildren(WY(`div`,`skeleton wui-chart-skeleton`),WY(`span`,`visually-hidden`,t)):i.replaceChildren(WY(`p`,`wui-chart-state-text`,t))):i.replaceChildren()}_colour(e,t){let n=this._theme;if(n)return e.type===`donut`?Nq(e,t,n):n.palette[t]}_renderLegend(e,t){let n=this._parts?.legend;if(!n)return;let r=e?mq(e):[],i=!!e&&t&&r.length>=2;if(n.hidden=!i,!e||!i)return;let a=hq(e),o=r.map((t,n)=>this._colour(e,n)),s=JSON.stringify([e.type,r,a,o]);s!==this._legendSignature&&(this._legendSignature=s,n.replaceChildren(...r.map((t,n)=>{let r=WY(`button`,`wui-chart-legend-item`);r.type=`button`,r.dataset.key=t;let i=WY(`span`,e.type===`line`?`wui-chart-legend-swatch wui-chart-legend-swatch-line`:`wui-chart-legend-swatch`),s=o[n];return s!==void 0&&(i.style.background=s),r.append(i,WY(`span`,`wui-chart-legend-label`,a[n])),r})));for(let e of n.children){if(!(e instanceof HTMLElement))throw Error(`Expected a legend item to be an HTMLElement.`);let t=e.dataset.key;e.setAttribute(`aria-pressed`,String(t===void 0||!this._hidden.has(t)))}}_renderTable(e){if(this._tableSpec===e||!this._parts)return;this._tableSpec=e;let t=Bq(e),n=WY(`table`,`wui-chart-table`);n.append(WY(`caption`,`visually-hidden`,t.caption));let r=WY(`tr`);t.head.forEach((e,t)=>{let n=WY(`th`,t?`wui-chart-num`:null,e);n.scope=`col`,r.append(n)});let i=WY(`thead`);i.append(r),n.append(i);let a=WY(`tbody`);for(let e of t.rows){let t=WY(`tr`),n=WY(`th`,null,e.head);n.scope=`row`,t.append(n,...e.cells.map(e=>WY(`td`,`wui-chart-num`,e))),a.append(t)}n.append(a);let o=[n];t.truncated&&o.push(WY(`p`,`wui-chart-table-note`,`Showing the first ${t.rows.length} of ${t.total} rows. Download the CSV for all of them.`)),this._parts.tableWrap.replaceChildren(...o)}_draw(){let{spec:e}=this._normalized();if(!e||!this._parts||!this._theme)return;let t=pq(e),n=e.type!==this._drawnType;this._engine&&this._engine.renderer!==t&&(this._engine.dispose(),this._engine=null);let r=`${e.height}px`,i=this._parts.canvas.style.height!==r;this._parts.canvas.style.height=r,i&&this._engine?.resize(),this._engine||(this._engine=DY(this._parts.canvas,{renderer:t}),this._engine.onSelect(({seriesIndex:e,dataIndex:t})=>this._select(e,t)),this._engine.onFinished(()=>{this.setAttribute(`data-ready`,``),this._announcedReady||(this._announcedReady=!0,this.dispatchEvent(new CustomEvent(MY,{bubbles:!0,detail:{renderer:t}})))}),n=!0),this._engine.render(e,this._theme,this._size(e),{hidden:this._hidden,renderer:t},{replace:n}),this._drawnType=e.type,this._drawn=!0}_themeChanged(){if(!this._parts)return;let e=RY(this);JSON.stringify(e)!==JSON.stringify(this._theme)&&(this._theme=e,this._update())}_resized(){let e=this.clientWidth;e!==this._width&&(this._width=e,this._engine&&this._drawn&&this._parts&&(this._parts.surface.hidden||this._engine.resize(),this._update()))}_toggle(e){let{spec:t}=this._normalized();if(!t||e==null)return;this._hidden.has(e)?this._hidden.delete(e):this._hidden.add(e),this._clearFocus(),this._update();let n=Object.fromEntries(mq(t).map(e=>[e,!this._hidden.has(e)]));this.dispatchEvent(new CustomEvent(jY,{bubbles:!0,detail:{visible:n}}))}_onKey(e){let{spec:t}=this._normalized();if(!t||!this._engine||!this._theme||this.view===`table`||e.altKey||e.ctrlKey||e.metaKey)return;if(e.key===`Enter`){if(!this._focus)return;e.preventDefault(),this._select(this._focus.series,this._focus.index);return}if(!NY.includes(e.key)||e.key===`Escape`&&!this._focus)return;e.preventDefault();let n=tJ(t,this._focus,e.key,this._hidden);n?(this._focus=n,this._engine.focusPoint(n.series,n.index),this._announce(Rq(Pq(t,n.index,this._hidden,this._theme)))):this._clearFocus()}_announce(e){let t=this._parts?.live;t&&(t.textContent=e===t.textContent?`${e} `:e)}_clearFocus(){this._focus&&(this._focus=null,this._engine?.clearFocus(),this._parts&&(this._parts.live.textContent=``))}_select(e,t){let{spec:n}=this._normalized();if(!n)return;let r=n.series[xK(n.type)?0:e];if(!r)return;let i=n.data[t]??null;this.dispatchEvent(new CustomEvent(AY,{bubbles:!0,detail:{series:r.key,label:r.label,x:i?.[n.x.key]??null,value:Q(n,r.key,t),row:i,index:t}}))}};n(`wui-chart`,KY);export{lK as CHART_STATES,aK as CHART_TYPES,uK as CHART_VIEWS,dK as MAX_SERIES,fK as MAX_SLICES,cK as RENDERERS,oK as STACK_MODES,KY as WuiChart,sK as X_KINDS,Z as formatValue,eq as normalizeSpec};