@webority/ui-elements 0.179.0 → 0.181.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.
- package/README.md +10 -0
- package/THIRD-PARTY-NOTICES.txt +3 -3
- package/dist/WuiCalendarViews-Dg9yRY1I.js +1 -0
- package/dist/{WuiCommandPalette-u1XD5WMv.js → WuiCommandPalette-CpmlKjzH.js} +2 -2
- package/dist/{WuiCommentThread-e5t7HceL.js → WuiCommentThread-Cp7AVHvt.js} +1 -1
- package/dist/WuiDashboardGrid-DFpX8Vx0.js +1 -0
- package/dist/WuiDataTable-CSgcwxU5.js +1 -0
- package/dist/WuiDatePicker-CRqjwyf2.js +1 -0
- package/dist/WuiDateRange-BBm_Q69p.js +1 -0
- package/dist/WuiEntryGrid-Z69-1YBh.js +3 -0
- package/dist/WuiGantt-DvmVKJX2.js +1 -0
- package/dist/WuiInlineEdit-JT83k3Nk.js +1 -0
- package/dist/WuiMentionInput-DPCCSQRZ.js +1 -0
- package/dist/WuiMiniCalendar-BhUTIGwe.js +1 -0
- package/dist/WuiNotificationCenter-D5bBM8Lp.js +1 -0
- package/dist/WuiOfflineBanner-DGTFCtyM.js +1 -0
- package/dist/{WuiPhone--w-taM5Q.js → WuiPhone-B5ZLabTY.js} +1 -1
- package/dist/{WuiSavedViews-BR6ZHd9Y.js → WuiSavedViews-CH7IvwgZ.js} +1 -1
- package/dist/WuiSelect-DIW_WXH7.js +1 -0
- package/dist/WuiTimePicker-BKFPf8Fn.js +1 -0
- package/dist/{WuiTree-BjtuCasB.js → WuiTree-Db83Uztv.js} +1 -1
- package/dist/WuiWizardStep-BBkw94dD.js +1 -0
- package/dist/{chips-BdpsN50B.js → chips-paLEDoxn.js} +1 -1
- package/dist/commandPalette.g-DP-Zl8SU.js +1 -0
- package/dist/dashboardGrid.g-vkCZGw6G.js +1 -0
- package/dist/{dataTable-VB3nBucm.js → dataTable-C0q14bkP.js} +1 -1
- package/dist/{dataTable.g-DazoWWps.js → dataTable.g-1PsmN1Nj.js} +1 -1
- package/dist/drawerDiscard-D_LMpaFv.js +1 -0
- package/dist/elements/calendar-views.js +1 -0
- package/dist/elements/command-palette.js +1 -1
- package/dist/elements/comment-thread.js +1 -1
- package/dist/elements/dashboard-grid.js +1 -0
- package/dist/elements/data-table.js +1 -1
- package/dist/elements/date-range.js +1 -1
- package/dist/elements/datepicker.js +1 -1
- package/dist/elements/entry-grid.js +1 -1
- package/dist/elements/gantt.js +1 -1
- package/dist/elements/inline-edit.js +1 -1
- package/dist/elements/kanban.js +1 -1
- package/dist/elements/mention-input.js +1 -1
- package/dist/elements/mini-calendar.js +1 -0
- package/dist/elements/notification-center.js +1 -1
- package/dist/elements/offline-banner.js +1 -0
- package/dist/elements/phone.js +1 -1
- package/dist/elements/saved-views.js +1 -1
- package/dist/elements/select.js +1 -1
- package/dist/elements/timepicker.js +1 -1
- package/dist/elements/tree.js +1 -1
- package/dist/elements/wizard.js +1 -1
- package/dist/gantt.g-CWvMXwBR.js +1 -0
- package/dist/helpers.js +1 -1
- package/dist/initials-DKg3IeUa.js +1 -0
- package/dist/inlineEdit.g-DKIhYoPF.js +1 -0
- package/dist/{kanban-jQCTLG3Q.js → kanban-Dayig7ic.js} +1 -1
- package/dist/loader-DUCcKxjq.js +1 -0
- package/dist/{notificationCentre.g-UsAurkUz.js → notificationCentre.g-Cees-vKg.js} +1 -1
- package/dist/{notificationDays-wMr8rZko.js → notificationDays-B1R0RFAY.js} +1 -1
- package/dist/refreshAfter-DhYgWXmQ.js +1 -0
- package/dist/{search-Dl07KqWw.js → search-C46tnoPd.js} +1 -1
- package/dist/server.js +1 -1
- package/dist/shell.g-BhC11Oe3.js +1 -0
- package/dist/tableSelect-juA3KcQh.js +1 -0
- package/dist/tableSelect.g-DwI5_9Nw.js +1 -0
- package/dist/testing.js +1 -0
- package/dist/text/en.json +119 -10
- package/dist/text.js +1 -1
- package/dist/themeTransition-C5nAlClG.js +1 -0
- package/dist/toast.g-CJ8c0BNZ.js +1 -0
- package/dist/ui-calendar.global.js +1 -1
- package/dist/ui-calendar.js +1 -1
- package/dist/ui-chart.global.js +15 -15
- package/dist/ui-chart.js +2 -2
- package/dist/ui-elements/calendar-views.global.js +1 -0
- package/dist/ui-elements/carousel.global.js +1 -1
- package/dist/ui-elements/code-block.global.js +1 -1
- package/dist/ui-elements/command-palette.global.js +2 -2
- package/dist/ui-elements/comment-thread.global.js +1 -1
- package/dist/ui-elements/consent-banner.global.js +1 -1
- package/dist/ui-elements/context-menu.global.js +1 -1
- package/dist/ui-elements/dashboard-grid.global.js +1 -0
- package/dist/ui-elements/data-table.global.js +1 -1
- package/dist/ui-elements/date-range.global.js +1 -1
- package/dist/ui-elements/date-time.global.js +1 -1
- package/dist/ui-elements/datepicker.global.js +1 -1
- package/dist/ui-elements/dock.global.js +1 -1
- package/dist/ui-elements/drawer.global.js +1 -1
- package/dist/ui-elements/dropdown.global.js +1 -1
- package/dist/ui-elements/entry-grid.global.js +2 -2
- package/dist/ui-elements/gantt.global.js +1 -1
- package/dist/ui-elements/glyphs.global.js +1 -1
- package/dist/ui-elements/hover-card.global.js +1 -1
- package/dist/ui-elements/image-crop.global.js +1 -1
- package/dist/ui-elements/inline-edit.global.js +1 -1
- package/dist/ui-elements/kanban.global.js +1 -1
- package/dist/ui-elements/lead-popup.global.js +1 -1
- package/dist/ui-elements/lightbox.global.js +1 -1
- package/dist/ui-elements/markdown.global.js +1 -1
- package/dist/ui-elements/mini-calendar.global.js +1 -0
- package/dist/ui-elements/navigation-menu.global.js +1 -1
- package/dist/ui-elements/notification-center.global.js +1 -1
- package/dist/ui-elements/offline-banner.global.js +1 -0
- package/dist/ui-elements/onboarding-checklist.global.js +1 -1
- package/dist/ui-elements/org-tree.global.js +1 -1
- package/dist/ui-elements/otp.global.js +1 -1
- package/dist/ui-elements/overflow.global.js +1 -1
- package/dist/ui-elements/phone.global.js +1 -1
- package/dist/ui-elements/popover.global.js +1 -1
- package/dist/ui-elements/rating.global.js +1 -1
- package/dist/ui-elements/record-pager.global.js +1 -1
- package/dist/ui-elements/relative-time.global.js +1 -1
- package/dist/ui-elements/saved-views.global.js +1 -1
- package/dist/ui-elements/select-chips.global.js +1 -1
- package/dist/ui-elements/select-recents.global.js +1 -1
- package/dist/ui-elements/select-search.global.js +1 -1
- package/dist/ui-elements/select-window.global.js +1 -1
- package/dist/ui-elements/server.global.js +1 -0
- package/dist/ui-elements/shell.global.js +1 -0
- package/dist/ui-elements/shortcuts.global.js +1 -1
- package/dist/ui-elements/show-more.global.js +1 -1
- package/dist/ui-elements/slider.global.js +1 -1
- package/dist/ui-elements/sortable.global.js +1 -1
- package/dist/ui-elements/status-icon.global.js +1 -1
- package/dist/ui-elements/table-export.global.js +1 -1
- package/dist/ui-elements/timepicker.global.js +1 -1
- package/dist/ui-elements/tour.global.js +1 -1
- package/dist/ui-elements/tree-picker.global.js +1 -1
- package/dist/ui-elements/tree.global.js +1 -1
- package/dist/ui-elements/truncate.global.js +1 -1
- package/dist/ui-elements/whats-new.global.js +1 -1
- package/dist/ui-elements/wizard.global.js +1 -1
- package/dist/ui-elements.global.js +1 -1
- package/dist/ui-elements.js +1 -1
- package/dist/ui-file-viewer.global.js +1 -1
- package/dist/ui-file-viewer.js +1 -1
- package/dist/wizard.g-UKG1dMs_.js +1 -0
- package/dist/wuiHttp-8CYWEbRz.js +1 -0
- package/package.json +25 -5
- package/types/WuiCalendar.d.ts +9 -1
- package/types/WuiCalendarViews.d.ts +34 -0
- package/types/WuiDashboardGrid.d.ts +35 -0
- package/types/WuiDataTable.d.ts +1 -0
- package/types/WuiEntryGrid.d.ts +4 -0
- package/types/WuiFileViewer.d.ts +7 -0
- package/types/WuiGantt.d.ts +6 -1
- package/types/WuiInlineEdit.d.ts +2 -1
- package/types/WuiMiniCalendar.d.ts +27 -0
- package/types/WuiNotificationCenter.d.ts +1 -0
- package/types/WuiOfflineBanner.d.ts +35 -0
- package/types/WuiSelect.d.ts +1 -0
- package/types/WuiTimePicker.d.ts +1 -0
- package/types/WuiWizard.d.ts +13 -0
- package/types/calendarAdapter.d.ts +9 -0
- package/types/calendarModel.d.ts +11 -0
- package/types/chartSpec.d.ts +3 -0
- package/types/dataTable.d.ts +10 -1
- package/types/elements/calendar-views.d.ts +2 -0
- package/types/elements/dashboard-grid.d.ts +1 -0
- package/types/elements/mini-calendar.d.ts +2 -0
- package/types/elements/offline-banner.d.ts +2 -0
- package/types/ganttLayout.d.ts +41 -7
- package/types/ganttTypes.d.ts +15 -0
- package/types/global/chunkChecks.d.ts +1 -0
- package/types/global/chunks.d.ts +4 -0
- package/types/global/core.d.ts +3 -2
- package/types/global/glyphs.d.ts +2 -0
- package/types/global/loader.d.ts +9 -2
- package/types/global/parts/server.d.ts +1 -0
- package/types/global/parts/shell.d.ts +1 -0
- package/types/global/server.d.ts +18 -0
- package/types/global/serverGuard.d.ts +2 -0
- package/types/global/shared.d.ts +22 -0
- package/types/global/tableExport.d.ts +2 -0
- package/types/globals.d.ts +8 -0
- package/types/helpers.d.ts +2 -1
- package/types/index.d.ts +5 -1
- package/types/razor-js/modules/api.d.ts +10 -5
- package/types/razor-js/modules/serverBridge.d.ts +1 -0
- package/types/razor-js/modules/stickyStack.d.ts +1 -0
- package/types/razor-js/webority-ui.d.ts +4 -1
- package/types/select/list.d.ts +2 -0
- package/types/server/behaviours.d.ts +6 -0
- package/types/server/core.d.ts +10 -0
- package/types/server/flash.d.ts +16 -0
- package/types/server/flashToasts.d.ts +2 -0
- package/types/server/index.d.ts +2 -10
- package/types/server/postError.d.ts +17 -0
- package/types/server/refreshAfter.d.ts +45 -0
- package/types/server/regions.d.ts +5 -0
- package/types/server/serverActions.d.ts +18 -10
- package/types/server/serverMessage.d.ts +5 -0
- package/types/server/serverTable.d.ts +0 -2
- package/types/server/serverTableRegistry.d.ts +7 -0
- package/types/server/shellParts.d.ts +1 -3
- package/types/server/shellRegistry.d.ts +7 -0
- package/types/server/toastAction.d.ts +7 -3
- package/types/server/wuiHost.d.ts +1 -0
- package/types/server/wuiHttp.d.ts +9 -2
- package/types/stickyStack.d.ts +6 -0
- package/types/tableSelect.d.ts +10 -0
- package/types/testing.d.ts +4 -0
- package/types/text/web/agenda.g.d.ts +7 -0
- package/types/text/web/asyncBlock.g.d.ts +3 -0
- package/types/text/web/calendar.g.d.ts +2 -0
- package/types/text/web/catalogue.g.d.ts +20 -0
- package/types/text/web/changeList.g.d.ts +5 -0
- package/types/text/web/chart.g.d.ts +1 -0
- package/types/text/web/commandPalette.g.d.ts +1 -0
- package/types/text/web/dashboardGrid.g.d.ts +18 -0
- package/types/text/web/dashboardHeader.g.d.ts +6 -0
- package/types/text/web/dataTable.g.d.ts +4 -0
- package/types/text/web/entryGrid.g.d.ts +2 -0
- package/types/text/web/formActions.g.d.ts +9 -0
- package/types/text/web/gantt.g.d.ts +2 -0
- package/types/text/web/index.g.d.ts +10 -0
- package/types/text/web/kpiTile.g.d.ts +1 -0
- package/types/text/web/miniCalendar.g.d.ts +4 -0
- package/types/text/web/notificationCentre.g.d.ts +4 -0
- package/types/text/web/offlineBanner.g.d.ts +8 -0
- package/types/text/web/queueBundle.g.d.ts +11 -0
- package/types/text/web/resultBlock.g.d.ts +6 -0
- package/types/text/web/routeError.g.d.ts +14 -0
- package/types/text/web/settingRow.g.d.ts +10 -0
- package/types/text/web/shell.g.d.ts +0 -7
- package/types/text/web/tableSelect.g.d.ts +1 -0
- package/types/text/web/unsavedChanges.g.d.ts +1 -0
- package/types/text/web/wizard.g.d.ts +6 -0
- package/types/toastTypes.d.ts +1 -1
- package/dist/WuiDataTable-Ble3hl5L.js +0 -1
- package/dist/WuiDatePicker-3D33rzH4.js +0 -1
- package/dist/WuiDateRange-BnEJ2WpL.js +0 -1
- package/dist/WuiEntryGrid-DkW0tIDy.js +0 -3
- package/dist/WuiGantt-BqNhYIr6.js +0 -1
- package/dist/WuiInlineEdit-D7AuEv1R.js +0 -1
- package/dist/WuiMentionInput-DPpEVL2s.js +0 -1
- package/dist/WuiNotificationCenter-DuvGrqwr.js +0 -1
- package/dist/WuiSelect-CNff3FNi.js +0 -1
- package/dist/WuiTimePicker-DYLFaWDc.js +0 -1
- package/dist/WuiWizardStep-gFtuUzsL.js +0 -1
- package/dist/commandPalette.g-DFWnCufa.js +0 -1
- package/dist/drawerDiscard-APy8TZxi.js +0 -1
- package/dist/gantt.g-TdTxeruW.js +0 -1
- package/dist/initials-Qb6ITcri.js +0 -1
- package/dist/inlineEdit.g-DLDVospu.js +0 -1
- package/dist/loader-A38-PdcB.js +0 -1
- package/dist/shell.g-C2Ht5xl2.js +0 -1
- package/dist/tableSelect.g-Bmd-ExRE.js +0 -1
- package/dist/themeTransition-TF0BqM20.js +0 -1
- package/dist/wizard.g-DOZSBUc5.js +0 -1
- package/dist/wuiHttp-Cw7V8u2w.js +0 -1
package/dist/ui-chart.global.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var WeborityChart=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function r(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 i=function(e,t){return i=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])},i(e,t)};function a(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var o=`12px sans-serif`,s=20,c=100,l=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function u(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)-s)/c}return t}var d=u(l),f={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=f.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=d[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():+new Date}},p=ne([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),m=ne([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),h=Object.prototype.toString,g=Array.prototype,_=g.forEach,v=g.filter,y=g.slice,b=g.map,x=function(){}.constructor,S=x?x.prototype:null,C=`__proto__`,w=2311,T=2**53-1;function E(){return w>=T&&(w=0),w++}function D(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function O(e){if(typeof e!=`object`||!e)return e;var t=e,n=h.call(e);if(n===`[object Array]`){if(!Se(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=O(e[r])}}else if(m[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(!p[n]&&!Se(e)&&!ue(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==C&&(t[o]=O(e[o]));return t}function k(e,t,n){if(!U(t)||!U(e))return n?O(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==C){var i=e[r],a=t[r];U(a)&&U(i)&&!B(a)&&!B(i)&&!ue(a)&&!ue(i)&&!ce(a)&&!ce(i)&&!Se(a)&&!Se(i)?k(i,a,n):(n||!(r in e))&&(e[r]=O(t[r]))}return e}function A(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==C&&(e[n]=t[n]);return e}function j(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function M(e,t,n){for(var r=L(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}f.createCanvas;function N(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 P(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 M(e,t,n)}function te(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function F(e,t,n){if(e&&t){if(e.forEach&&e.forEach===_)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 ge(e);if(e.map&&e.map===b)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 re(e,t,n){if(!e)return[];if(!t)return ge(e);if(e.filter&&e.filter===v)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 ie(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 L(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 ae(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(y.call(arguments)))}}var R=S&&V(S.bind)?S.call.bind(S.bind):ae;function z(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(y.call(arguments)))}}function B(e){return Array.isArray?Array.isArray(e):h.call(e)===`[object Array]`}function V(e){return typeof e==`function`}function H(e){return typeof e==`string`}function oe(e){return h.call(e)===`[object String]`}function se(e){return typeof e==`number`}function U(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function ce(e){return!!p[h.call(e)]}function le(e){return!!m[h.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=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function W(e,t){return e??t}function he(e,t,n){return e??t??n}function ge(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return y.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 L(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?new Map:new Ce}var Ee=function(){function e(t){var n=B(t);this.data=Te();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 we?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function G(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&&A(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 Ae(e,t){return e.hasOwnProperty(t)}function je(){}var Me=180/Math.PI,Ne=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Pe=new(function(){function e(){this.browser=new Ne,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`?(Pe.wxa=!0,Pe.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Pe.worker=!0:!Pe.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Pe.node=!0,Pe.svgSupported=!0):Fe(navigator.userAgent,Pe);function Fe(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 Ie=`.`,Le=`___EC__COMPONENT__CONTAINER___`,Re=`___EC__EXTENDED_CLASS___`;function ze(e){var t={main:``,sub:``};if(e){var n=e.split(Ie);t.main=n[0]||``,t.sub=n[1]||``}return t}function Be(e){ve(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Ve(e){return!!(e&&e[Re])}function He(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Ue(t)?n=function(e){a(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},ee(n,this)),A(n.prototype,e),n[Re]=!0,n.extend=this.extend,n.superCall=qe,n.superApply=Je,n.superClass=t,n}}function Ue(e){return V(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function We(e,t){e.extend=t.extend}var Ge=Math.round(Math.random()*10);function Ke(e){var t=[`__\0is_clz`,Ge++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function qe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Je(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Ye(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Be(r),e.prototype.type=r;var i=ze(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Le){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Le]&&(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=ze(e),r=[],i=t[n.main];return i&&i[Le]?F(i,function(e,t){t!==Le&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[ze(e).main]},e.getAllClassMainTypes=function(){var e=[];return F(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[ze(e).main];return n&&n[Le]};function n(e){var n=t[e.main];return n&&n[Le]||(n=t[e.main]={},n[Le]=!0),n}}function Xe(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&&N(r,s)>=0||i&&N(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Ze=Xe([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Qe=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Ze(this,e,t)},e}(),$e=function(){function e(e){this.value=e}return e}(),et=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new $e(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}(),tt=function(){function e(e){this._list=new et,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 $e(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}(),nt=new tt(50);function rt(e){if(typeof e==`string`){var t=nt.get(e);return t&&t.image}return e}function it(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=nt.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!ot(t)&&a.pending.push(o)):(t=f.loadImage(e,at,at),t.__zrImageSrc=e,nt.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function at(){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 ot(e){return e&&e.width&&e.height}function st(){return[1,0,0,1,0,0]}function ct(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function lt(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 ut(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 dt(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 ft(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 pt(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 mt(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 ht(e,t){return e??=0,t??=0,[e,t]}function gt(e,t){return e[0]=t[0],e[1]=t[1],e}function _t(e){return[e[0],e[1]]}function vt(e,t,n){return e[0]=t,e[1]=n,e}function yt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function bt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function xt(e){return Math.sqrt(St(e))}function St(e){return e[0]*e[0]+e[1]*e[1]}function Ct(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function wt(e,t){var n=xt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Tt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Et=Tt;function Dt(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Ot=Dt;function kt(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 At(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 jt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Mt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Nt=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}(),Pt=Math.min,Ft=Math.max,It=Math.abs,Lt=[`x`,`y`],Rt=[`width`,`height`],zt=new Nt,Bt=new Nt,Vt=new Nt,Ht=new Nt,Ut=rn(),Wt=Ut.minTv,Gt=Ut.maxTv,Kt=[0,0],K=function(){function e(e,t,n,r){Jt(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=Pt(e.x,this.x),n=Pt(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Ft(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?Ft(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 Xt(st(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&Nt.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=Jt($t,t.x,t.y,t.width,t.height)),n instanceof e||(n=Jt(en,n.x,n.y,n.width,n.height));var s=!!r;Ut.reset(i,s);var c=Ut.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)&&(Kt[0]=1/0,Kt[1]=0,nn(l,u,p,m,0,s,a,o),nn(d,f,h,g,1,s,a,o),s&&Nt.copy(r,_?Ut.useDir?Ut.dirMinTv:Wt:Gt)),_},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){Yt(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&&Yt(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{zt.x=Vt.x=t.x,zt.y=Ht.y=t.y,Bt.x=Ht.x=t.x+t.width,Bt.y=Vt.y=t.y+t.height,zt.transform(n),Ht.transform(n),Bt.transform(n),Vt.transform(n),e.x=Pt(zt.x,Bt.x,Vt.x,Ht.x),e.y=Pt(zt.y,Bt.y,Vt.y,Ht.y);var s=Ft(zt.x,Bt.x,Vt.x,Ht.x),c=Ft(zt.y,Bt.y,Vt.y,Ht.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=ct(e||[]),dt(e,e,vt(tn,-t.x,-t.y)),pt(e,e,vt(tn,r,i)),dt(e,e,vt(tn,n.x,n.y)),e},e}(),qt=K.create,Jt=K.set,Yt=K.copy,Xt=K.calculateTransform,Zt=K.applyTransform,Qt=K.contain,$t=new K(0,0,0,0),en=new K(0,0,0,0),tn=[];function nn(e,t,n,r,i,a,o,s){var c=It(t-n),l=It(r-e),u=Pt(c,l),d=Lt[i],f=Lt[1-i],p=Rt[i];t<n||r<e?c<l?(a&&(Gt[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Gt[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Ft(e,n),o[p]=Pt(t,r)-o[d]),a&&(u<Kt[0]||Ut.useDir)&&(Kt[0]=Pt(u,Kt[0]),(c<l||!Ut.bidirectional)&&(Wt[d]=c,Wt[f]=0,Ut.useDir&&Ut.calcDirMTV()),(c>=l||!Ut.bidirectional)&&(Wt[d]=-l,Wt[f]=0,Ut.useDir&&Ut.calcDirMTV())))}function rn(){var e=0,t=new Nt,n=new Nt,r={minTv:new Nt,maxTv:new Nt,useDir:!1,dirMinTv:new Nt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Ft(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 It(e)<1e-10}return r}function an(e){on||=new tt(100),e||=`12px sans-serif`;var t=on.get(e);return t||(t={font:e,strWidthCache:new tt(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:f.measureText(`国`,e).width,asciiCharWidth:f.measureText(`a`,e).width},on.put(e,t)),t}var on;function sn(e){if(!(cn>=ln)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=f.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?cn=ln:i>2&&cn++,t}}var cn=0,ln=5;function un(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=sn(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function dn(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=f.measureText(t,e.font).width,n.put(t,r)),r}function fn(e,t,n,r){var i=dn(an(t),e),a=gn(t);return new K(mn(0,i,n),hn(0,a,r),i,a)}function pn(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
-
`);if(i.length===1)return
|
|
3
|
-
`);a=
|
|
4
|
-
`),e.isTruncated=s}}function
|
|
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=
|
|
6
|
-
`),l=!0),r.accumWidth=m}else{var h=
|
|
7
|
-
`);for(var g=
|
|
8
|
-
`)c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;else{var m=un(d,p.charCodeAt(0)),h=!r&&!Mn(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 Pn(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(Fn,mn(n,o,i),hn(r,s,a),o,s),K.intersect(t,Fn,null,In);var c=In.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=mn(c.x,c.width,i,!0),e.baseY=hn(c.y,c.height,a,!0)}}var Fn=new K(0,0,0,0),In={outIntersectRect:{},clamp:!0};function Ln(e){return e==null?e=``:e+=``}function Rn(e){var t=Ln(e.text),n=e.font;return zn(e,dn(an(n),t),gn(n),null)}function zn(e,t,n,r){var i=new K(mn(e.x||0,t,e.textAlign),hn(e.y||0,n,e.textBaseline),t,n),a=r??(Bn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Bn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Vn=ct,Hn=5e-5;function Un(e){return e>Hn||e<-Hn}var Wn=[],Gn=[],Kn=st(),qn=Math.abs,Jn=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Yn(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 Un(this.rotation)||Un(this.x)||Un(this.y)||Un(this.scaleX-1)||Un(this.scaleY-1)||Un(this.skewX)||Un(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=st(),t?this.getLocalTransform(n):Vn(n),e&&(t?ut(n,e,n):lt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||st(),mt(this.invTransform,n)):n&&(Vn(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Wn);var n=Wn[0]<0?-1:1,r=Wn[1]<0?-1:1,i=((Wn[0]-n)*t+n)/Wn[0]||0,a=((Wn[1]-r)*t+r)/Wn[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||st(),ut(Gn,e.invTransform,t),t=Gn);var n=this.originX,r=this.originY;(n||r)&&(Kn[4]=n,Kn[5]=r,ut(Gn,t,Kn),Gn[4]-=n,Gn[5]-=r,t=Gn),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&&At(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&At(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&qn(e[0]-1)>1e-10&&qn(e[3]-1)>1e-10?Math.sqrt(qn(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Qn(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&&ft(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}(),Yn=Jn.getLocalTransform;function Xn(){return new Jn}var Zn=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Qn(e,t){return j(e,t,Zn)}var $n={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-$n.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?$n.bounceIn(e*2)*.5:$n.bounceOut(e*2-1)*.5+.5}},er=Math.pow,tr=Math.sqrt,nr=1e-8,rr=1e-4,ir=tr(3),ar=1/3,or=ht(),sr=ht(),cr=ht();function lr(e){return e>-nr&&e<nr}function ur(e){return e>nr||e<-nr}function dr(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 fr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function pr(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(lr(u)&&lr(d)){if(lr(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(lr(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=tr(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-er(-y,ar):er(y,ar),b=b<0?-er(-b,ar):er(b,ar);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*tr(u*u*u)),S=Math.acos(x)/3,C=tr(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+ir*Math.sin(S)))/(3*o),T=(-s+C*(w-ir*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 mr(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(lr(o)){if(ur(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(lr(u))i[0]=-a/(2*o);else if(u>0){var d=tr(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 hr(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 gr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;or[0]=c,or[1]=l;for(var v=0;v<1;v+=.05)sr[0]=dr(e,n,i,o,v),sr[1]=dr(t,r,a,s,v),g=Ot(or,sr),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<rr);y++)m=d-f,h=d+f,sr[0]=dr(e,n,i,o,m),sr[1]=dr(t,r,a,s,m),g=Ot(sr,or),m>=0&&g<p?(d=m,p=g):(cr[0]=dr(e,n,i,o,h),cr[1]=dr(t,r,a,s,h),_=Ot(cr,or),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=dr(e,n,i,o,d),u[1]=dr(t,r,a,s,d)),tr(p)}function _r(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=dr(e,n,i,o,m),g=dr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function vr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function yr(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function br(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(lr(a)){if(ur(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(lr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=tr(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 xr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Sr(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 Cr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;or[0]=o,or[1]=s;for(var f=0;f<1;f+=.05){sr[0]=vr(e,n,i,f),sr[1]=vr(t,r,a,f);var p=Ot(or,sr);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<rr);m++){var h=l-u,g=l+u;sr[0]=vr(e,n,i,h),sr[1]=vr(t,r,a,h);var p=Ot(sr,or);if(h>=0&&p<d)l=h,d=p;else{cr[0]=vr(e,n,i,g),cr[1]=vr(t,r,a,g);var _=Ot(cr,or);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=vr(e,n,i,l),c[1]=vr(t,r,a,l)),tr(d)}function wr(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=vr(e,n,i,f),m=vr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Tr=/cubic-bezier\(([0-9,\.e ]+)\)/;function Er(e){var t=e&&Tr.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:pr(0,r,a,1,e,s)&&dr(0,i,o,1,s[0])}}}var Dr=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||je,this.ondestroy=e.ondestroy||je,this.onrestart=e.onrestart||je,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:$n[e]||Er(e)},e}(),Or={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 kr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Ar(e){return e=Math.round(e),e<0?0:e>360?360:e}function jr(e){return e<0?0:e>1?1:e}function Mr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?kr(parseFloat(t)/100*255):kr(parseInt(t,10))}function Nr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?jr(parseFloat(t)/100):jr(parseFloat(t))}function Pr(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 Fr(e,t,n){return e+(t-e)*n}function Ir(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Lr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Rr=new tt(20),zr=null;function Br(e,t){zr&&Lr(zr,t),zr=Rr.put(e,zr||t.slice())}function Vr(e,t){if(e){t||=[];var n=Rr.get(e);if(n)return Lr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Or)return Lr(t,Or[r]),Br(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)){Ir(t,0,0,0,1);return}return Ir(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),Br(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ir(t,0,0,0,1);return}return Ir(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Br(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?Ir(t,+l[0],+l[1],+l[2],1):Ir(t,0,0,0,1);u=Nr(l.pop());case`rgb`:if(l.length>=3)return Ir(t,Mr(l[0]),Mr(l[1]),Mr(l[2]),l.length===3?u:Nr(l[3])),Br(e,t),t;Ir(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Ir(t,0,0,0,1);return}return l[3]=Nr(l[3]),Hr(l,t),Br(e,t),t;case`hsl`:if(l.length!==3){Ir(t,0,0,0,1);return}return Hr(l,t),Br(e,t),t;default:return}}Ir(t,0,0,0,1)}}}function Hr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Nr(e[1]),i=Nr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Ir(t,kr(Pr(o,a,n+1/3)*255),kr(Pr(o,a,n)*255),kr(Pr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Ur(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 Wr(e,t){var n=Vr(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 Yr(n,n.length===4?`rgba`:`rgb`)}}function Gr(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]=kr(Fr(o[0],s[0],c)),n[1]=kr(Fr(o[1],s[1],c)),n[2]=kr(Fr(o[2],s[2],c)),n[3]=jr(Fr(o[3],s[3],c)),n}}function Kr(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=Vr(t[i]),s=Vr(t[a]),c=r-i,l=Yr([kr(Fr(o[0],s[0],c)),kr(Fr(o[1],s[1],c)),kr(Fr(o[2],s[2],c)),jr(Fr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function qr(e,t,n,r){var i=Vr(e);if(e)return i=Ur(i),t!=null&&(i[0]=Ar(V(t)?t(i[0]):t)),n!=null&&(i[1]=Nr(V(n)?n(i[1]):n)),r!=null&&(i[2]=Nr(V(r)?r(i[2]):r)),Yr(Hr(i),`rgba`)}function Jr(e,t){var n=Vr(e);if(n&&t!=null)return n[3]=jr(t),Yr(n,`rgba`)}function Yr(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 Xr(e,t){var n=Vr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Zr=new tt(100);function Qr(e){if(H(e)){var t=Zr.get(e);return t||(t=Wr(e,-.1),Zr.put(e,t)),t}if(de(e)){var n=A({},e);return n.colorStops=I(e.colorStops,function(e){return{offset:e.offset,color:Wr(e.color,-.1)}}),n}return e}var $r=Math.round;function ei(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Vr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var ti=1e-4;function ni(e){return e<ti&&e>-ti}function ri(e){return $r(e*1e3)/1e3}function ii(e){return $r(e*1e4)/1e4}function ai(e){return`matrix(`+ri(e[0])+`,`+ri(e[1])+`,`+ri(e[2])+`,`+ri(e[3])+`,`+ii(e[4])+`,`+ii(e[5])+`)`}var oi={left:`start`,right:`end`,center:`middle`,middle:`middle`};function si(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function ci(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function li(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 ui(e){return e&&!!e.image}function di(e){return e&&!!e.svgElement}function fi(e){return ui(e)||di(e)}function pi(e){return e.type===`linear`}function mi(e){return e.type===`radial`}function hi(e){return e&&(e.type===`linear`||e.type===`radial`)}function gi(e){return`url(#`+e+`)`}function _i(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 vi(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Me,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(`+$r(o*Me)+`deg, `+$r(s*Me)+`deg)`),c.join(` `)}var yi=(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}})(),bi=Array.prototype.slice;function xi(e,t,n){return(t-e)*n+e}function Si(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=xi(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]=xi(t[o][s],n[o][s],r)}return e}function wi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Ti(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 Ei(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 Di(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]:bi.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 Oi(e){if(te(e)){var t=e.length;if(te(e[0])){for(var n=[],r=0;r<t;r++)n.push(bi.call(e[r]));return n}return bi.call(e)}return e}function ki(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 Ai(e){return te(e&&e[0])?2:1}var ji=0,Mi=1,Ni=2,Pi=3,Fi=4,Ii=5,Li=6;function Ri(e){return e===Fi||e===Ii}function zi(e){return e===Mi||e===Ni}var Bi=[0,0,0,0],Vi=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=Li,s=t;if(te(t)){var c=Ai(t);o=c,(c===1&&!se(t[0])||c===2&&!se(t[0][0]))&&(a=!0)}else if(se(t)&&!pe(t))o=ji;else if(H(t)){if(!isNaN(+t))o=ji;else{var l=Vr(t);l&&(s=l,o=Pi)}}else if(de(t)){var u=A({},s);u.colorStops=I(t.colorStops,function(e){return{offset:e.offset,color:Vr(e.color)}}),pi(t)?o=Fi:mi(t)&&(o=Ii),s=u}i===0?this.valType=o:(o!==this.valType||o===Li)&&(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:$n[n]||Er(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=zi(r),c=Ri(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?Di(d,f,r):c&&Ei(d.colorStops,f.colorStops))}if(!o&&r!==Ii&&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===ji?n[l].additiveValue=n[l].value-p:r===Pi?n[l].additiveValue=wi([],n[l].value,p,-1):zi(r)&&(n[l].additiveValue=r===Mi?wi([],n[l].value,p,-1):Ti([],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===Pi,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?Bi:e[s];if((zi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(zi(i))i===Mi?Si(g,f[r],p[r],h):Ci(g,f[r],p[r],h);else if(Ri(i)){var _=f[r],v=p[r],y=i===Fi;e[s]={type:y?`linear`:`radial`,x:xi(_.x,v.x,h),y:xi(_.y,v.y,h),colorStops:I(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:xi(e.offset,n.offset,h),color:ki(Si([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=xi(_.x2,v.x2,h),e[s].y2=xi(_.y2,v.y2,h)):e[s].r=xi(_.r,v.r,h)}else if(c)Si(g,f[r],p[r],h),n||(e[s]=ki(g));else{var b=xi(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===ji?e[n]=e[n]+r:t===Pi?(Vr(e[n],Bi),wi(Bi,Bi,r,1),e[n]=ki(Bi)):t===Mi?wi(e[n],e[n],r,1):t===Ni&&Ti(e[n],e[n],r,1)},e}(),Hi=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?D(`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,L(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 Vi(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===Pi&&c&&(c=ki(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Oi(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Oi(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 Dr({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]=Oi(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=L(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}(),Ui=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){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),Wi=1;Pe.hasGlobalWindow&&(Wi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Gi=Wi,Ki=.4,qi=`#333`,Ji=`#ccc`,Yi=`#eee`,Xi=`__zr_normal__`,Zi=Zn.concat([`ignore`]),Qi=ne(Zn,function(e,t){return e[t]=!0,e},{ignore:!1}),$i={},ea=new K(0,0,0,0),ta=[],na=function(){function e(e){this.id=E(),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=ea,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition($i,n,d):vn($i,n,d),i.x=$i.x,i.y=$i.y,a=$i.align,o=$i.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=_n(f[0],d.width),m=_n(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(ta),mt(ta,ta),K.copy(_,d),_.applyTransform(ta)}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()?Ji:qi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Vr(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,Yr(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||{},A(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=L(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,Zi)},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(Xi,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Xi;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(N(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)D(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ua(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,fa(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=ua(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,fa(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=N(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=N(r,e),a=N(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];A(t,i),i.textConfig&&(n||={},A(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=A({},r?this.textConfig:n.textConfig),A(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Zi.length;l++){var u=Zi[l],d=i&&Qi[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 Jn,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},A(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 Hi(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=N(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){ra(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ra(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ra(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}();P(na,Ui),P(na,Jn);function ra(e,t,n,r,i){n||={};var a=[];la(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 ia(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function aa(e){return te(e[0])}function oa(e,t,n){if(te(t[n])){if(te(e[n])||(e[n]=[]),le(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),ia(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(aa(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?ia(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else ia(a,i,o);a.length=i.length}}else e[n]=t[n]}function sa(e,t){return e===t||te(e)&&te(t)&&ca(e,t)}function ca(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 la(e,t,n,r,i,a,o,s){for(var c=L(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)&&!te(v)&&!de(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}la(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=N(m,x);m.splice(S,1)}}if(i.force||(h=re(h,function(e){return!sa(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[_]=Oi(n[_]),oa(n,r,_)}}var x=new Hi(n,!1,!1,d?re(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 ua(e,t,n,r){return!(n&&n.hoverLayer||r)||da(e)||t&&da(t)?0:1}function da(e){return e.type===`text`||e.type===`tspan`}function fa(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var pa=`__zr_style_`+Math.round(Math.random()*10),ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ha={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ma[pa]=!0;var ga=[`z`,`z2`,`invisible`],_a=[`invisible`],va=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=L(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&&xa(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:A(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(ma,e)},t.prototype.useStyle=function(e){e[pa]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[pa]},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,ga)},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=L(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=L(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?_a:ga,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 A(e,t),e},t.prototype.getAnimationStyleProps=function(){return ha},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}(na),ya=new K(0,0,0,0),ba=new K(0,0,0,0);function xa(e,t,n){return ya.copy(e.getBoundingRect()),e.transform&&ya.applyTransform(e.transform),ba.width=t,ba.height=n,!ya.intersect(ba)}var Sa=Math.min,Ca=Math.max,wa=Math.sin,Ta=Math.cos,Ea=Math.PI*2,Da=ht(),Oa=ht(),ka=ht();function Aa(e,t,n,r,i,a){i[0]=Sa(e,n),i[1]=Sa(t,r),a[0]=Ca(e,n),a[1]=Ca(t,r)}var ja=[],Ma=[];function Na(e,t,n,r,i,a,o,s,c,l){var u=mr,d=dr,f=u(e,n,i,o,ja);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,ja[p]);c[0]=Sa(m,c[0]),l[0]=Ca(m,l[0])}f=u(t,r,a,s,Ma);for(var p=0;p<f;p++){var h=d(t,r,a,s,Ma[p]);c[1]=Sa(h,c[1]),l[1]=Ca(h,l[1])}c[0]=Sa(e,c[0]),l[0]=Ca(e,l[0]),c[0]=Sa(o,c[0]),l[0]=Ca(o,l[0]),c[1]=Sa(t,c[1]),l[1]=Ca(t,l[1]),c[1]=Sa(s,c[1]),l[1]=Ca(s,l[1])}function Pa(e,t,n,r,i,a,o,s){var c=xr,l=vr,u=Ca(Sa(c(e,n,i),1),0),d=Ca(Sa(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Sa(e,i,f),o[1]=Sa(t,a,p),s[0]=Ca(e,i,f),s[1]=Ca(t,a,p)}function Fa(e,t,n,r,i,a,o,s,c){var l=jt,u=Mt,d=Math.abs(i-a);if(d%Ea<1e-4&&d>1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(Da[0]=Ta(i)*n+e,Da[1]=wa(i)*r+t,Oa[0]=Ta(a)*n+e,Oa[1]=wa(a)*r+t,l(s,Da,Oa),u(c,Da,Oa),i%=Ea,i<0&&(i+=Ea),a%=Ea,a<0&&(a+=Ea),i>a&&!o?a+=Ea:i<a&&o&&(i+=Ea),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(ka[0]=Ta(p)*n+e,ka[1]=wa(p)*r+t,l(s,ka,s),u(c,ka,c))}}var Ia={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},La=[],Ra=[],za=[],Ba=[],Va=[],Ha=[],Ua=Math.min,Wa=Math.max,Ga=Math.cos,Ka=Math.sin,qa=Math.abs,Ja=Math.PI,Ya=Ja*2,Xa=typeof Float32Array<`u`,Za=[];function Qa(e){return Math.round(e/Ja*1e8)/1e8%2*Ja}function $a(e,t){var n=Qa(e[0]);n<0&&(n+=Ya);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ya?i=n+Ya:t&&n-i>=Ya?i=n-Ya:!t&&n>i?i=n+(Ya-Qa(n-i)):t&&n<i&&(i=n-(Ya-Qa(i-n))),e[0]=n,e[1]=i}var eo=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=qa(n/Gi/e)||0,this._uy=qa(n/Gi/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(Ia.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=qa(e-this._xi),r=qa(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Ia.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(Ia.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(Ia.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(),Za[0]=r,Za[1]=i,$a(Za,a),r=Za[0],i=Za[1];var o=i-r;return this.addData(Ia.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ga(i)*n+e,this._yi=Ka(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(Ia.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ia.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)&&Xa&&(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(Xa&&(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,Xa&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){za[0]=za[1]=Va[0]=Va[1]=Number.MAX_VALUE,Ba[0]=Ba[1]=Ha[0]=Ha[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 Ia.M:t=r=e[a++],n=i=e[a++],Va[0]=r,Va[1]=i,Ha[0]=r,Ha[1]=i;break;case Ia.L:Aa(t,n,e[a],e[a+1],Va,Ha),t=e[a++],n=e[a++];break;case Ia.C:Na(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Va,Ha),t=e[a++],n=e[a++];break;case Ia.Q:Pa(t,n,e[a++],e[a++],e[a],e[a+1],Va,Ha),t=e[a++],n=e[a++];break;case Ia.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=Ga(f)*u+c,i=Ka(f)*d+l),Fa(c,l,u,d,f,p,m,Va,Ha),t=Ga(p)*u+c,n=Ka(p)*d+l;break;case Ia.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Aa(r,i,r+h,i+g,Va,Ha);break;case Ia.Z:t=r,n=i}jt(za,za,Va),Mt(Ba,Ba,Ha)}return a===0&&(za[0]=za[1]=Ba[0]=Ba[1]=0),new K(za[0],za[1],Ba[0]-za[0],Ba[1]-za[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 Ia.M:i=o=e[d++],a=s=e[d++];break;case Ia.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(qa(_)>n||qa(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Ia.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=_r(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Ia.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=wr(i,a,y,b,h,g,10),i=h,a=g;break;case Ia.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=Ga(D)*T+C,s=Ka(D)*E+w),m=Wa(T,E)*Ua(Ya,Math.abs(O)),i=Ga(k)*T+C,a=Ka(k)*E+w;break;case Ia.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Ia.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!==Ia.L&&v>0&&(e.lineTo(y,b),v=0),S){case Ia.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Ia.L:u=n[x++],d=n[x++];var w=qa(u-c),T=qa(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 Ia.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;hr(c,k,j,N,D,La),hr(l,A,M,ee,D,Ra),e.bezierCurveTo(La[1],Ra[1],La[2],Ra[2],La[3],Ra[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,ee),c=N,l=ee;break;case Ia.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;Sr(c,k,j,D,La),Sr(l,A,M,D,Ra),e.quadraticCurveTo(La[1],Ra[1],La[2],Ra[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Ia.A:var P=n[x++],te=n[x++],F=n[x++],I=n[x++],ne=n[x++],re=n[x++],ie=n[x++],L=!n[x++],ae=F>I?F:I,R=qa(F-I)>.001,z=ne+re,B=!1;if(f){var E=p[g++];h+E>_&&(z=ne+re*(_-h)/E,B=!0),h+=E}if(R&&e.ellipse?e.ellipse(P,te,F,I,ie,ne,z,L):e.arc(P,te,ae,ne,z,L),B)break lo;C&&(o=Ga(ne)*F+P,s=Ka(ne)*I+te),c=Ga(z)*F+P,l=Ka(z)*I+te;break;case Ia.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var V=n[x++],H=n[x++];if(f){var E=p[g++];if(h+E>_){var oe=_-h;e.moveTo(u,d),e.lineTo(u+Ua(oe,V),d),oe-=V,oe>0&&e.lineTo(u+V,d+Ua(oe,H)),oe-=H,oe>0&&e.lineTo(u+Wa(V-oe,0),d+H),oe-=V,oe>0&&e.lineTo(u,d+Wa(H-oe,0));break lo}h+=E}e.rect(u,d,V,H);break;case Ia.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=Ia,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function to(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 no(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:gr(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function ro(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:Cr(e,t,n,r,i,a,s,c,null)<=l/2}var io=Math.PI*2;function ao(e){return e%=io,e<0&&(e+=io),e}var oo=Math.PI*2;function so(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)%oo<1e-4)return!0;if(a){var d=r;r=ao(i),i=ao(d)}else r=ao(r),i=ao(i);r>i&&(i+=oo);var f=Math.atan2(c,s);return f<0&&(f+=oo),f>=r&&f<=i||f+oo>=r&&f+oo<=i}function co(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 lo=eo.CMD,uo=Math.PI*2,fo=1e-4;function po(e,t){return Math.abs(e-t)<fo}var mo=[-1,-1,-1],ho=[-1,-1];function go(){var e=ho[0];ho[0]=ho[1],ho[1]=e}function _o(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=pr(t,r,a,s,l,mo);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=mo[h],_=g===0||g===1?.5:1;dr(e,n,i,o,g)<c||(f<0&&(f=mr(t,r,a,s,ho),ho[1]<ho[0]&&f>1&&go(),p=dr(t,r,a,s,ho[0]),f>1&&(m=dr(t,r,a,s,ho[1]))),f===2?g<ho[0]?d+=p<t?_:-_:g<ho[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<ho[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function vo(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=br(t,r,a,s,mo);if(c===0)return 0;var l=xr(t,r,a);if(l>=0&&l<=1){for(var u=0,d=vr(t,r,a,l),f=0;f<c;f++){var p=mo[f]===0||mo[f]===1?.5:1,m=vr(e,n,i,mo[f]);m<o||(mo[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=mo[0]===0||mo[0]===1?.5:1,m=vr(e,n,i,mo[0]);return m<o?0:a<t?p:-p}function yo(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);mo[0]=-c,mo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=uo-1e-4){r=0,i=uo;var u=a?1:-1;return o>=mo[0]+e&&o<=mo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=uo,i+=uo);for(var f=0,p=0;p<2;p++){var m=mo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=uo+h),(h>=r&&h<=i||h+uo>=r&&h+uo<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function bo(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===lo.M&&m>1&&(n||(s+=co(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case lo.M:u=a[m++],d=a[m++],c=u,l=d;break;case lo.L:if(n){if(to(c,l,a[m],a[m+1],t,r,i))return!0}else s+=co(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lo.C:if(n){if(no(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=_o(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 lo.Q:if(n){if(ro(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=vo(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lo.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+=co(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(so(_,v,b,x,x+S,C,t,w,i))return!0}else s+=yo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case lo.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(to(u,d,f,d,t,r,i)||to(f,d,f,p,t,r,i)||to(f,p,u,p,t,r,i)||to(u,p,u,d,t,r,i))return!0}else s+=co(f,d,f,p,r,i),s+=co(u,p,u,d,r,i);break;case lo.Z:if(n){if(to(c,l,u,d,t,r,i))return!0}else s+=co(c,l,u,d,r,i);c=u,l=d}}return!n&&!po(l,d)&&(s+=co(c,l,u,d,r,i)||0),s!==0}function xo(e,t,n){return bo(e,0,!1,t,n)}function So(e,t,n,r){return bo(e,t,!0,n,r)}var Co=M({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ma),wo={style:M({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ha.style)},To=Zn.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Eo=function(e){a(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<To.length;++s)i[To[s]]=this[To[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=L(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?A(this.style,o):this.useStyle(o):a===`shape`?A(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=Xr(e,0);return t>.5?qi:t>.2?Yi:Ji}if(e)return Ji}return qi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(H(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Xr(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 eo(!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)),So(a,o/s,e,t)))return!0}if(this.hasFill())return xo(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:A(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Oe(Co,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=A({},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=A({},r.shape),A(c,n.shape)):(c=A({},i?this.shape:r.shape),A(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=A({},this.shape);for(var l={},u=L(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 wo},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){a(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 O(e.style)},n.prototype.getDefaultShape=function(){return O(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}(va),Do=M({strokeFirst:!0,font:o,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Co),Oo=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return Bn(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Oe(Do,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=Rn(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(va);Oo.prototype.type=`tspan`;var ko=M({x:0,y:0},ma),Ao={style:M({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ha.style)};function jo(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Mo=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Oe(ko,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=jo(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 Ao},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}(va);Mo.prototype.type=`image`;function No(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 Po=Math.round;function Fo(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&&(Po(r*2)===Po(i*2)&&(e.x1=e.x2=Lo(r,s,!0)),Po(a*2)===Po(o*2)&&(e.y1=e.y2=Lo(a,s,!0))),e}}function Io(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=Lo(r,s,!0),e.y=Lo(i,s,!0),e.width=Math.max(Lo(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Lo(i+o,s,!1)-e.y,o===0?0:1)),e}}function Lo(e,t,n){if(!t)return e;var r=Po(e*2);return(r+Po(t))%2==0?r/2:(r+(n?1:-1))/2}var Ro=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),zo={},Bo=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Ro},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Io(zo,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?No(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Eo);Bo.prototype.type=`rect`;var Vo={fill:`#000`},Ho=2,Uo={},Wo={style:M({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},ha.style)},Go=function(e){a(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Vo,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,Qo(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||Vo},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return A(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=L(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},A(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Wo},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`;Pn(Uo,r.overflowRect,i,a,o,s),i=Uo.baseX,a=Uo.baseY;var c=wn(rs(e),e,Uo.outerWidth,Uo.outerHeight),l=is(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=hn(a,c.contentHeight,s);if(l||n){var _=mn(i,f,o),v=hn(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=ns(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=ts(`fill`in e?e.fill:(x=!0,r.fill)),C=es(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Ho,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Oo),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,Xo(D,e),g+=m,E.setBoundingRect(zn(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;Pn(Uo,t.overflowRect,i,a,n,r),i=Uo.baseX,a=Uo.baseY;var o=On(rs(e),e,Uo.outerWidth,Uo.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=mn(i,c,n),f=hn(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;is(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&&is(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=ns(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Oo),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ts(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=es(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Ho,_=!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),Xo(p,s),y&&(p.lineWidth=he(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(zn(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(Bo),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(Mo),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=he(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Zo(e)&&(t=[e.fontStyle,e.fontWeight,Yo(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ye(t)||e.textFont||e.font},t}(va),Ko={left:!0,right:1,center:1},qo={top:1,bottom:1,middle:1},Jo=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Yo(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Xo(e,t){for(var n=0;n<Jo.length;n++){var r=Jo[n],i=t[r];i!=null&&(e[r]=i)}}function Zo(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Qo(e){return $o(e),F(e.rich,$o),e}function $o(e){if(e){e.font=Go.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Ko[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||qo[n]?n:`top`,e.padding&&=_e(e.padding)}}function es(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function ts(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ns(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function rs(e){var t=e.text;return t!=null&&(t+=``),t}function is(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var as=1e-4,os=20;function ss(e){return e.replace(/^\s+|\s+$/g,``)}var cs=Math.min,ls=Math.max,us=Math.abs,ds=Math.round,fs=Math.floor,ps=Math.ceil,ms=Math.pow,hs=Math.log,gs=Math.LN10,_s=Math.PI,vs=Math.random;function ys(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=bs;function bs(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 xs(e,t,n)}function xs(e,t,n){return H(e)?Cs(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Ss(e){return H(e)&&Cs(e)}function Cs(e){return!!ss(e).match(/%$/)}function ws(e,t,n){return isNaN(t)?n?``+e:+e:(t=cs(ls(0,t),os),e=(+e).toFixed(t),n?e:+e)}function Ts(e){return e.sort(function(e,t){return e-t}),e}function Es(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(ds(e*t)/t===e)return n}return Ds(e)}function Ds(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 ls(0,(a<0?0:i-1-a)-r)}function Os(e,t,n){var r=us(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=hs(2*us(n||1)*us(r))/gs,a=hs(us(t))/gs,o=ls(0,ps(-i+a));return isFinite(o)||(o=NaN),o}function ks(e,t){var n=ne(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=ms(10,t),i=I(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=I(i,function(e){return fs(e)}),s=ne(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 As(e,t){var n=ls(Es(e),Es(t)),r=e+t;return n>os?r:ws(r,n)}var js=ms(2,53)-1;function Ms(e){var t=_s*2;return(e%t+t)%t}function Ns(e){return e>-as&&e<as}var Ps=/^(?:(\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 Fs(e){if(e instanceof Date)return e;if(H(e)){var t=Ps.exec(e);if(!t)return 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?new Date(NaN):new Date(ds(e))}function Is(e){return ms(10,Ls(e))}function Ls(e){if(e===0)return 0;var t=fs(hs(e)/gs);return e/ms(10,t)>=10&&t++,t}function Rs(e,t){var n=Ls(e),r=ms(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,ws(e,-n)}function zs(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 Bs(e){var t=parseFloat(e);return t==e&&(t!==0||!H(e)||e.indexOf(`x`)<=0)?t:NaN}function Vs(e){return!isNaN(Bs(e))}function Hs(){return ds(vs()*9)}function Us(e,t){return t===0?e:Us(t,e%t)}function Ws(e,t){return e==null?t:t==null?e:e*t/Us(e,t)}function Gs(e){return e!=null&&isFinite(e)}var Ks=`[ECharts] `,qs={},Js=typeof console<`u`&&console.warn&&console.log;function Ys(e,t,n){if(Js){if(n){if(qs[t])return;qs[t]=!0}console[e](Ks+t)}}function Xs(e,t){Ys(`error`,e,t)}function Zs(e){throw Error(e)}function Qs(e,t,n){return(t-e)*n+e}var $s=`series\0`,ec=`\0_ec_\0`;function tc(e){return e instanceof Array?e:e==null?[]:[e]}function nc(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 rc=`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 ic(e){return U(e)&&!B(e)&&!(e instanceof Date)?e.value:e}function ac(e){return U(e)&&!(e instanceof Array)}function oc(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=sc(e,o,n);return(r||i)&&cc(s,e,o,t),r&&lc(s,t),r||i?uc(s,t,i):a&&dc(s,t),fc(s),s}function sc(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`||_c(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function cc(e,t,n,r){F(r,function(i,a){if(i&&i.id!=null){var o=mc(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 lc(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)&&!_c(n)&&!_c(a)&&pc(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function uc(e,t,n){F(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||_c(r.existing)||r.existing&&t.id!=null&&!pc(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function dc(e,t){F(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function fc(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;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={})}),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:$s+n:mc(i.name),r)a.id=mc(r.id);else if(i.id!=null)a.id=mc(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 pc(e,t,n){var r=hc(t[e],null),i=hc(n[e],null);return r!=null&&i!=null&&r===i}function mc(e){return hc(e,``)}function hc(e,t){return e==null?t:H(e)?e:se(e)||oe(e)?e+``:t}function gc(e){var t=e.name;return!!(t&&t.indexOf($s))}function _c(e){return e&&e.id!=null&&mc(e.id).indexOf(ec)===0}function vc(e,t,n){F(e,function(e){var r=e.newOption;U(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=yc(t,r,e.existing,n))})}function yc(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function bc(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 xc(){var e=`__ec_inner_`+Sc++;return function(t){return t[e]||(t[e]={})}}var Sc=Hs();function Cc(e,t,n){var r=wc(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=Dc(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 wc(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&&N(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Tc={useDefault:!0,enableAll:!1,enableNone:!1},Ec={useDefault:!1,enableAll:!0,enableNone:!0};function Dc(e,t,n,r){r||=Tc;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 Oc(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 kc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ac(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function jc(e){return e===`auto`?Pe.domSupported?`html`:`richText`:e||`html`}function Mc(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 Nc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(se(r)){var o=Qs(n||0,r,i);return ws(o,a?Math.max(Es(n||0),Es(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=Qs(p,m,i);s[d]=ws(o,a?Math.max(Es(p),Es(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 Pc(){return[1/0,-1/0]}function Fc(e,t){zc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Ic(e,t){zc(t)&&t<e[0]&&(e[0]=t)}function Lc(e,t){zc(t)&&t>e[1]&&(e[1]=t)}function Rc(e,t){Bc(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function zc(e){return e!=null&&isFinite(e)}function Bc(e,t){return zc(e)&&zc(t)&&e<=t}function Vc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Hc(e){Bc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Uc(){var e=`__ec_once_`+Wc++;return function(t,n){Ae(t,e)||(t[e]=1,n())}}var Wc=Hs();function Gc(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 Kc(e){return e.value+``}function qc(e){return e+``}function Jc(e,t){return W(t,!0)?e.seriesIndex+2:0}function Yc(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 Xc(e,t){return{seriesType:e,overallReset:t}}function Zc(e){return{overallReset:e}}var Qc=xc(),$c=function(e,t,n,r){if(r){var i=Qc(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Qc(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},el=`series`,tl=G([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),nl=`original`,rl=`arrayRows`,il=`objectRows`,al=`keyedColumns`,ol=`typedArray`,sl=`unknown`,cl=`column`,ll=`Roam`,ul=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],dl=function(){function e(e){F(ul,function(t){this[t]=R(e[t],e)},this)}return e}();function fl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var pl=1,ml={},hl=xc(),gl=xc(),_l=[`emphasis`,`blur`,`select`],vl=[`normal`,`emphasis`,`blur`,`select`],yl=`highlight`,bl=`downplay`,xl=`select`,Sl=`unselect`,Cl=`toggleSelect`,wl=`selectchanged`;function Tl(e){return e!=null&&e!==`none`}function El(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Dl(e){El(e,`emphasis`,2)}function Ol(e){e.hoverState===2&&El(e,`normal`,0)}function kl(e){El(e,`blur`,1)}function Al(e){e.hoverState===1&&El(e,`normal`,0)}function jl(e){e.selected=!0}function Ml(e){e.selected=!1}function Nl(e,t,n){t(e,n)}function Pl(e,t,n){Nl(e,t,n),e.isGroup&&e.traverse(function(e){Nl(e,t,n)})}function Fl(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 Il(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 Ll(e,t,n,r){var i=n&&N(n,`select`)>=0,a=!1;if(e instanceof Eo){var o=hl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Tl(s)||Tl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=A({},r),l=A({},l),l.fill=s):!Tl(l.fill)&&Tl(s)?(a=!0,r=A({},r),l=A({},l),l.fill=Qr(s)):!Tl(l.stroke)&&Tl(c)&&(a||(r=A({},r),l=A({},l)),l.stroke=Qr(c)),r.style=l}}if(r&&r.z2==null){a||(r=A({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Rl(e,t,n){if(n&&n.z2==null){n=A({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function zl(e,t,n){var r=N(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Il(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=A({},n),o=A({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Bl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Ll(this,e,t,n);if(e===`blur`)return zl(this,e,n);if(e===`select`)return Rl(this,e,n)}return n}function Vl(e){e.stateProxy=Bl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Bl),n&&(n.stateProxy=Bl)}function Hl(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Dl)}function Ul(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Ol)}function Wl(e,t){e.__highByOuter|=1<<(t||0),Pl(e,Dl)}function Gl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Pl(e,Ol)}function Kl(e){Pl(e,kl)}function ql(e){Pl(e,Al)}function Jl(e){Pl(e,jl)}function Yl(e){Pl(e,Ml)}function Xl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=gl(i),o=fl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Al(e)}),s&&n.push(i)),a.isBlured=!1}),F(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Ql(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&&ql(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`||kl(e)}),te(t))a(e.getData(),t);else if(U(t))for(var u=L(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),gl(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 $l(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){gl(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){kl(e)})}}}function eu(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=bc(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=Qc(o);Ql(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Ql(r,u,d,n)}}}function tu(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(Qc(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function nu(e,t,n){var r=Qc(e),i=tu(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&$l(r.componentMainType,r.componentIndex,n),F(a,function(e){return Hl(e,t)})):(Ql(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&$l(r.componentMainType,r.componentIndex,n),Hl(e,t))}function ru(e,t,n){Zl(n);var r=Qc(e),i=tu(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?F(i,function(e){return Ul(e,t)}):Ul(e,t)}function iu(e,t,n){if(_u(t)){var r=t.dataType,i=bc(e.getData(r),t);B(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function au(e){F(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Jl(t):Yl(t)})})}function ou(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 su(e,t,n){mu(e,!0),Pl(e,Vl),uu(e,t,n)}function cu(e){mu(e,!1)}function lu(e,t,n,r){r?cu(e):su(e,t,n)}function uu(e,t,n){var r=Qc(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var du=[`emphasis`,`blur`,`select`],fu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function pu(e,t,n,r){n||=`itemStyle`;for(var i=0;i<du.length;i++){var a=du[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[fu[n]]()}}function mu(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 hu(e){return!!(e&&e.__highDownDispatcher)}function gu(e){var t=ml[e];return t==null&&pl<=32&&(t=ml[e]=pl++),t}function _u(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function vu(e){var t=e.type;return t===`highlight`||t===`downplay`}function yu(e){var t=hl(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 bu=eo.CMD,xu=[[],[],[]],Su=Math.sqrt,Cu=Math.atan2;function wu(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=bu.M,d=bu.C,f=bu.L,p=bu.R,m=bu.A,h=bu.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=Su(t[0]*t[0]+t[1]*t[1]),y=Su(t[2]*t[2]+t[3]*t[3]),b=Cu(-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++],At(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],At(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=xu[c];x[0]=n[o++],x[1]=n[o++],At(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Tu=Math.sqrt,Eu=Math.sin,Du=Math.cos,Ou=Math.PI;function ku(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Au(e,t){return(e[0]*t[0]+e[1]*t[1])/(ku(e)*ku(t))}function ju(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Au(e,t))}function Mu(e,t,n,r,i,a,o,s,c,l,u){var d=Ou/180*c,f=Du(d)*(e-n)/2+Eu(d)*(t-r)/2,p=-1*Eu(d)*(e-n)/2+Du(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Tu(m),s*=Tu(m));var h=(i===a?-1:1)*Tu((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+Du(d)*g-Eu(d)*_,y=(t+r)/2+Eu(d)*g+Du(d)*_,b=ju([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ju(x,S);if(Au(x,S)<=-1&&(C=Ou),Au(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Ou*1e6)/1e6;C=Ou*2+w%2*Ou}u.addData(l,v,y,o,s,b,C,d,a)}var Nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Pu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fu(e){var t=new eo;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=eo.CMD,c=e.match(Nu);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(Pu)||[],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,Mu(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,Mu(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 Iu=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(Eo);function Lu(e){return e.setData!=null}function Ru(e,t){var n=Fu(e),r=A({},t);return r.buildPath=function(e){var t=Lu(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){wu(n,e),this.dirtyShape()},r}function zu(e,t){return new Iu(Ru(e,t))}function Bu(e,t){var n=Ru(e,t);return function(e){a(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Iu)}function Vu(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 Eo(t);return o.createPathProxy(),o.buildPath=function(e){if(Lu(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Hu=function(e){a(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=N(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=N(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}(na);Hu.prototype.type=`group`;var Uu=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Wu=function(e){a(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){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(Eo);Wu.prototype.type=`circle`;var Gu=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Ku=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Gu},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}(Eo);Ku.prototype.type=`ellipse`;var qu=Math.PI,Ju=qu*2,Yu=Math.sin,Xu=Math.cos,Zu=Math.acos,Qu=Math.atan2,$u=Math.abs,ed=Math.sqrt,td=Math.max,nd=Math.min,rd=1e-4;function id(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<rd))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function ad(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/ed(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)*ed(td(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 od(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 sd(e,t){var n,r=td(t.r,0),i=td(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=$u(c-s),p=f>Ju&&f%Ju;if(p>rd&&(f=p),!(r>rd))e.moveTo(l,u);else if(f>Ju-rd)e.moveTo(l+r*Xu(s),u+r*Yu(s)),e.arc(l,u,r,s,c,!d),i>rd&&(e.moveTo(l+i*Xu(c),u+i*Yu(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*Xu(s),j=r*Yu(s),M=i*Xu(c),N=i*Yu(c),ee=f>rd;if(ee){var P=t.cornerRadius;P&&(n=od(P),m=n[0],h=n[1],g=n[2],_=n[3]);var te=$u(r-i)/2;if(v=nd(te,g),y=nd(te,_),b=nd(te,m),x=nd(te,h),w=S=td(v,y),T=C=td(b,x),(S>rd||C>rd)&&(E=r*Xu(c),D=r*Yu(c),O=i*Xu(s),k=i*Yu(s),f<qu)){var F=id(A,j,O,k,E,D,M,N);if(F){var I=A-F[0],ne=j-F[1],re=E-F[0],ie=D-F[1],L=1/Yu(Zu((I*re+ne*ie)/(ed(I*I+ne*ne)*ed(re*re+ie*ie)))/2),ae=ed(F[0]*F[0]+F[1]*F[1]);w=nd(S,(r-ae)/(L+1)),T=nd(C,(i-ae)/(L-1))}}}if(!ee)e.moveTo(l+A,u+j);else if(w>rd){var R=nd(g,w),z=nd(_,w),B=ad(O,k,A,j,r,R,d),V=ad(E,D,M,N,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,Qu(B.y0,B.x0),Qu(V.y0,V.x0),!d):(R>0&&e.arc(l+B.cx,u+B.cy,R,Qu(B.y0,B.x0),Qu(B.y1,B.x1),!d),e.arc(l,u,r,Qu(B.cy+B.y1,B.cx+B.x1),Qu(V.cy+V.y1,V.cx+V.x1),!d),z>0&&e.arc(l+V.cx,u+V.cy,z,Qu(V.y1,V.x1),Qu(V.y0,V.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>rd)||!ee)e.lineTo(l+M,u+N);else if(T>rd){var R=nd(m,T),z=nd(h,T),B=ad(M,N,E,D,i,-z,d),V=ad(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,Qu(B.y0,B.x0),Qu(V.y0,V.x0),!d):(z>0&&e.arc(l+B.cx,u+B.cy,z,Qu(B.y0,B.x0),Qu(B.y1,B.x1),!d),e.arc(l,u,i,Qu(B.cy+B.y1,B.cx+B.x1),Qu(V.cy+V.y1,V.cx+V.x1),d),R>0&&e.arc(l+V.cx,u+V.cy,R,Qu(V.y1,V.x1),Qu(V.y0,V.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cd=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}(),ld=function(e){a(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){sd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Eo);ld.prototype.type=`sector`;var ud=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),dd=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ud},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}(Eo);dd.prototype.type=`ring`;function fd(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++)jt(u,u,e[f]),Mt(d,d,e[f]);jt(u,u,r[0]),Mt(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(_t(e[f]));continue}else c=e[f-1],l=e[f+1];bt(a,l,c),Ct(a,a,t);var h=Tt(m,c),g=Tt(m,l),_=h+g;_!==0&&(h/=_,g/=_),Ct(o,a,-h),Ct(s,a,g);var v=yt([],m,o),y=yt([],m,s);r&&(Mt(v,v,u),jt(v,v,d),Mt(y,y,u),jt(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function pd(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=fd(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 md=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),hd=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new md},t.prototype.buildPath=function(e,t){pd(e,t,!0)},t}(Eo);hd.prototype.type=`polygon`;var gd=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),_d=function(e){a(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){pd(e,t,!1)},t}(Eo);_d.prototype.type=`polyline`;var vd={},yd=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),bd=function(e){a(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,r,i,a;if(this.subPixelOptimize){var o=Fo(vd,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}(Eo);bd.prototype.type=`line`;var xd=[],Sd=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 Cd(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?fr:dr)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?fr:dr)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?yr:vr)(e.x1,e.cpx1,e.x2,t),(n?yr:vr)(e.y1,e.cpy1,e.y2,t)]}var wd=function(e){a(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.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&&(Sr(n,o,i,u,xd),o=xd[1],i=xd[2],Sr(r,s,a,u,xd),s=xd[1],a=xd[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(hr(n,o,c,i,u,xd),o=xd[1],c=xd[2],i=xd[3],hr(r,s,l,a,u,xd),s=xd[1],l=xd[2],a=xd[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Cd(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Cd(this.shape,e,!0);return wt(t,t)},t}(Eo);wd.prototype.type=`bezier-curve`;var Td=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}(),Ed=function(e){a(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 Td},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}(Eo);Ed.prototype.type=`arc`;var Dd=function(e){a(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),Eo.prototype.getBoundingRect.call(this)},t}(Eo),Od=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),kd=function(e){a(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}(Od),Ad=function(e){a(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}(Od),jd=Math.min,Md=Math.max,Nd=Math.abs,Pd=[0,0],Fd=[0,0],Id=rn(),Ld=Id.minTv,Rd=Id.maxTv,zd=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Nt;for(var n=0;n<2;n++)this._axes[n]=new Nt;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);Nt.sub(r[0],n[1],n[0]),Nt.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&&Nt.set(t,0,0),Id.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Id.negativeSize&&Nt.copy(t,r?Id.useDir?Id.dirMinTv:Ld:Rd),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,Pd),e._getProjMinMaxOnAxis(a,t._corners,Fd),Id.negativeSize||Pd[1]<Fd[0]||Pd[0]>Fd[1]){if(i=!1,Id.negativeSize||n)return i;var s=Nd(Fd[0]-Pd[1]),c=Nd(Pd[0]-Fd[1]);jd(s,c)>Rd.len()&&(s<c?Nt.scale(Rd,o,-s*r):Nt.scale(Rd,o,c*r))}else if(!n){var s=Nd(Fd[0]-Pd[1]),c=Nd(Pd[0]-Fd[1]);(Id.useDir||jd(s,c)<Ld.len())&&((s<c||!Id.bidirectional)&&(Nt.scale(Ld,o,s*r),Id.useDir&&Id.calcDirMTV()),(s>=c||!Id.bidirectional)&&(Nt.scale(Ld,o,-c*r),Id.useDir&&Id.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=jd(l,o),s=Md(l,s)}n[0]=o+Id.touchThreshold,n[1]=s-Id.touchThreshold,Id.negativeSize=n[1]<n[0]},e}(),Bd=[],Vd=function(e){a(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(Bd)),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}(va),Hd=xc();function Ud(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 Wd(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=Ud(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 Gd(e,t,n,r,i,a){Wd(`update`,e,t,n,r,i,a)}function Kd(e,t,n,r,i,a){Wd(`enter`,e,t,n,r,i,a)}function qd(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 Jd(e,t,n,r,i,a){qd(e)||Wd(`leave`,e,t,n,r,i,a)}function Yd(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Jd(e,{style:{opacity:0}},t,n,r)}function Xd(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Yd(e,t,n,r)}):Yd(e,t,n,r)}function Zd(e){Hd(e).oldStyle=e.style}var Qd=n({Arc:()=>Ed,BezierCurve:()=>wd,BoundingRect:()=>K,Circle:()=>Wu,CompoundPath:()=>Dd,Ellipse:()=>Ku,Group:()=>Hu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Mo,IncrementalDisplayable:()=>Vd,Line:()=>bd,LinearGradient:()=>kd,OrientedBoundingRect:()=>zd,Path:()=>Eo,Point:()=>Nt,Polygon:()=>hd,Polyline:()=>_d,RadialGradient:()=>Ad,Rect:()=>Bo,Ring:()=>dd,Sector:()=>ld,Text:()=>Go,WH:()=>tf,XY:()=>ef,applyTransform:()=>_f,calcZ2Range:()=>Bf,clipPointsByRect:()=>Sf,clipRectByRect:()=>Cf,createIcon:()=>wf,decomposeTransform:()=>Wf,ensureCopyRect:()=>Lf,ensureCopyTransform:()=>Rf,expandOrShrinkRect:()=>kf,extendPath:()=>af,extendShape:()=>nf,getCurrentCanvasPainter:()=>Kf,getShapeClass:()=>sf,getTransform:()=>gf,groupTransition:()=>xf,initProps:()=>Kd,isBoundingRectAxisAligned:()=>Ff,isElementRemoved:()=>qd,lineLineIntersect:()=>Ef,linePolygonIntersect:()=>Tf,makeImage:()=>lf,makePath:()=>cf,mergePath:()=>df,payloadDisableAnimation:()=>Uf,registerShape:()=>of,removeElement:()=>Jd,removeElementWithFadeOut:()=>Xd,resizePath:()=>ff,retrieveZInfo:()=>zf,setTooltipConfig:()=>Mf,subPixelOptimize:()=>hf,subPixelOptimizeLine:()=>pf,subPixelOptimizeRect:()=>mf,transformDirection:()=>vf,traverseElements:()=>Pf,traverseUpdateZ:()=>Vf,updateProps:()=>Gd}),$d={},ef=[`x`,`y`],tf=[`width`,`height`];function nf(e){return Eo.extend(e)}var rf=Bu;function af(e,t){return rf(e,t)}function of(e,t){$d[e]=t}function sf(e){if($d.hasOwnProperty(e))return $d[e]}function cf(e,t,n,r){var i=zu(e,t);return n&&(r===`center`&&(n=uf(n,i.getBoundingRect())),ff(i,n)),i}function lf(e,t,n){var r=new Mo({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(uf(t,i))}}});return r}function uf(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 df=Vu;function ff(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pf(e,t){return Fo(e,e,{lineWidth:t}),e}function mf(e,t){return Io(e,e,t),e}var hf=Lo;function gf(e,t){for(var n=ct([]);e&&e!==t;)ut(n,e.getLocalTransform(),n),e=e.parent;return n}function _f(e,t,n){return t&&!te(t)&&(t=Jn.getLocalTransform(t)),n&&(t=mt([],t)),At([],e,t)}function vf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:us(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:us(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=_f(a,t,n),us(a[0])>us(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function yf(e){return!e.isGroup}function bf(e){return e.shape!=null}function xf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){yf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return bf(e)&&(t.shape=O(e.shape)),t}var a=r(e);t.traverse(function(e){if(yf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gd(e,r,n,Qc(e).dataIndex)}}})}function Sf(e,t){return I(e,function(e){var n=e[0];n=ls(n,t.x),n=cs(n,t.x+t.width);var r=e[1];return r=ls(r,t.y),r=cs(r,t.y+t.height),[n,r]})}function Cf(e,t){var n=ls(e.x,t.x),r=cs(e.x+e.width,t.x+t.width),i=ls(e.y,t.y),a=cs(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 wf(e,t,n){var r=A({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),M(i,n),new Mo(r)):cf(e.replace(`path://`,``),r,n,`center`)}function Tf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Ef(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Ef(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Df(u,d,c,l);if(Of(f))return!1;var p=e-i,m=t-a,h=Df(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Df(p,m,u,d)/f;return!(g<0||g>1)}function Df(e,t,n,r){return e*r-n*t}function Of(e){return e<=1e-6&&e>=-1e-6}function kf(e,t,n,r,i){return t==null||(se(t)?Af[0]=Af[1]=Af[2]=Af[3]=t:(Af[0]=t[0],Af[1]=t[1],Af[2]=t[2],Af[3]=t[3]),r&&(Af[0]=ls(0,Af[0]),Af[1]=ls(0,Af[1]),Af[2]=ls(0,Af[2]),Af[3]=ls(0,Af[3])),n&&(Af[0]=-Af[0],Af[1]=-Af[1],Af[2]=-Af[2],Af[3]=-Af[3]),jf(e,Af,`x`,`width`,3,1,i&&i[0]||0),jf(e,Af,`y`,`height`,0,2,i&&i[1]||0)),e}var Af=[0,0,0,0];function jf(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ls(0,cs(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:us(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Mf(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(L(c),function(e){Ae(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Qc(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:M({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Nf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pf(e,t){if(e){if(B(e))for(var n=0;n<e.length;n++)Nf(e[n],t);else Nf(e,t)}}function Ff(e){return!e||us(e[1])<If&&us(e[2])<If||us(e[0])<If&&us(e[3])<If}var If=1e-5;function Lf(e,t){return e?K.copy(e,t):t.clone()}function Rf(e,t){return t?lt(e||st(),t):void 0}function zf(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Bf(e){var t=-1/0,n=1/0;Nf(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 Vf(e,t,n){Hf(e,t,n,-1/0)}function Hf(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=ls(Hf(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=ls(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 Uf(e){return e.animation={duration:0},e}function Wf(e,t){return t?lt(Gf.transform,t):ct(Gf.transform),Gf.decomposeTransform(),Qn(e,Gf),e}var Gf=new Jn;Gf.transform=st();function Kf(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}of(`circle`,Wu),of(`ellipse`,Ku),of(`sector`,ld),of(`ring`,dd),of(`polygon`,hd),of(`polyline`,_d),of(`rect`,Bo),of(`line`,bd),of(`bezierCurve`,wd),of(`arc`,Ed);var qf={};function Jf(e,t){for(var n=0;n<_l.length;n++){var r=_l[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 Yf(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<_l.length;l++){var u=_l[l],d=t[u];c[u]=W(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Xf(e,t,n,r){n||=qf;for(var i=e instanceof Go,a=!1,o=0;o<vl.length;o++){var s=t[vl[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Go,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Yf(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Qf(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig($f(u,n,!1));for(var o=0;o<_l.length;o++){var p=_l[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=Qf(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=$f(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&&(sp(c).setLabelText=function(e){var r=Yf(n,t,e);Jf(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Zf(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<_l.length;r++){var i=_l[r];n[i]=e.getModel([i,t])}return n}function Qf(e,t,n,r,i){var a={};return ep(a,e,n,r,i),t&&A(a,t),a}function $f(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 ep(e,t,n,r,i){n||=qf;var a=t.ecModel,o=a&&a.option.textStyle,s=tp(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]);ap(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=up.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=_e(_),h.__marginType=up.textMargin)}ap(e,t,o,null,null,n,r,i,!0,!1)}function tp(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||qf).rich;if(n){t||={};for(var r=L(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var np=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],rp=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],ip=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function ap(e,t,n,r,i,a,o,s,c,l){n=!o&&n||qf;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;_<np.length;_++){var v=np[_],y=i!==!1&&r?he(t.getShallow(v),r.getShallow(v),n[v]):W(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<rp.length;_++){var v=rp[_],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;_<ip.length;_++){var v=ip[_],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 op(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 sp=xc();function cp(e,t,n,r){if(e){var i=sp(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 lp(e,t,n,r,i){var a=sp(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=Nc(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,Jf(e,Yf({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?Kd:Gd)(e,{percent:1},r,t,null,l)}var up={minMargin:1,textMargin:2},dp=[`textStyle`,`color`],fp=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],pp=new Go,mp=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(dp):null)},e.prototype.getFont=function(){return op({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<fp.length;n++)t[fp[n]]=this.getShallow(fp[n]);return pp.useStyle(t),pp.update(),pp.getBoundingRect()},e}(),hp=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],gp=Xe(hp),_p=function(){function e(){}return e.prototype.getLineStyle=function(e){return gp(this,e)},e}(),vp=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],yp=Xe(vp),bp=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return yp(this,e,t)},e}(),xp=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){k(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(O(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(!Pe.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}();He(xp),Ke(xp),P(xp,_p),P(xp,bp),P(xp,Qe),P(xp,mp);function Sp(e){return e==null?0:e.length||1}function Cp(e){return e}var wp=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Cp,this._newKeyGetter=r||Cp,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=Sp(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=Sp(c),d=Sp(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=Sp(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=Sp(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Tp={Must:1,Might:2,Not:3},Ep=xc();function Dp(e){Ep(e).datasetMap=G()}function Op(e,t,n){var r={},i=Ap(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Ep(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 kp(e,t,n){var r={};if(!Ap(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=Np(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Tp.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Tp.Not)&&(e.n=c),f(e)&&s[e.n]!==Tp.Not)return e;d||(u===Tp.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 Ap(e){if(!e.get(`data`,!0))return Dc(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Tc).models[0]}function jp(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Dc(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Tc).models}function Mp(e,t){return Np(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Np(e,t,n,r,i,a){var o,s=5;if(le(e))return Tp.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`?Tp.Must:Tp.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 Tp.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 Tp.Not;var f=_[c];if(!f||le(f))return Tp.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=ic(g);if(!B(y))return Tp.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?Tp.Might:Tp.Not;if(t&&e!==`-`)return Tp.Must}return Tp.Not}var Pp=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&&Mp(this,n)===Tp.Must&&(r.type=`ordinal`)}}return e}();function Fp(e){return e instanceof Pp}function Ip(e,t,n){n||=zp(e);var r=t.seriesLayoutBy,i=Bp(e,n,r,t.sourceHeader,t.dimensions);return new Pp({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:O(t)})}function Lp(e){return new Pp({data:e,sourceFormat:le(e)?ol:nl})}function Rp(e){return new Pp({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:O(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function zp(e){var t=sl;if(le(e))t=ol;else if(B(e)){e.length===0&&(t=rl);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(B(i)||le(i)){t=rl;break}if(U(i)){t=il;break}}}}else if(U(e)){for(var a in e)if(Ae(e,a)&&te(e[a])){t=al;break}}return t}function Bp(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Hp(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Up(function(e){e!=null&&e!==`-`&&(H(e)?o??=1:o=0)},n,s,10):o=se(r)?r:+!!r,!i&&o===1&&(i=[],Up(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||=Vp(e);else if(t===`keyedColumns`)i||(i=[],F(e,function(e,t){i.push(t)}));else if(t===`original`){var c=ic(e[0]);a=B(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Hp(i),dimensionsDetectedCount:a}}function Vp(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return L(n)}function Hp(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 Up(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 Wp(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Gp,Kp,qp,Jp,Yp,Xp,Zp=function(){function e(e,t){var n=Fp(e)?e:Lp(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),Xp(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;Xp=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=Yp[cm(o,s)];A(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=R(tm(o,s),null,i,c,l),e.count=R(im(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};Yp=(e={},e[rl+`_`+cl]={pure:!0,appendData:i},e[rl+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[il]={pure:!0,appendData:i},e[al]={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[nl]={appendData:i},e[ol]={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}(),Qp=function(e){B(e)||Xs(`series.data or dataset.source must be an array.`)};Gp={},Gp[rl+`_`+cl]=Qp,Gp[rl+`_row`]=Qp,Gp[il]=Qp,Gp[al]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Xs(`dimension name must not be null/undefined.`)},Gp[nl]=Qp;var $p=function(e,t,n,r){return e[r]},em=(Kp={},Kp[rl+`_`+cl]=function(e,t,n,r){return e[r+t]},Kp[rl+`_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},Kp[il]=$p,Kp[al]=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},Kp[nl]=$p,Kp);function tm(e,t){return em[cm(e,t)]}var nm=function(e,t,n){return e.length},rm=(qp={},qp[rl+`_`+cl]=function(e,t,n){return Math.max(0,e.length-t)},qp[rl+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},qp[il]=nm,qp[al]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},qp[nl]=nm,qp);function im(e,t){return rm[cm(e,t)]}var am=function(e,t,n){return e[t]},om=(Jp={},Jp[rl]=am,Jp[il]=function(e,t,n){return e[n]},Jp[al]=am,Jp[nl]=function(e,t,n){var r=ic(e);return r instanceof Array?r[t]:r},Jp[ol]=am,Jp);function sm(e){return om[e]}function cm(e,t){return e===`arrayRows`?e+`_`+t:e}function lm(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 sm(a)(r,o,s)}var c=r;return a===`original`&&(c=ic(r)),c}}}var um=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 dm(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;fm(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),mm(n.type)&&(a[0]=t),fm(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}tl.each(function(e,t){var i=fm(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 um(s,t),n}function fm(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function pm(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function mm(e){return e!==`ordinal`&&e!==`time`}var hm=function(){function e(e){this.otherDims={},e!=null&&A(this,e)}return e}();function gm(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!se(e)&&e!=null&&e!==`-`&&(e=+Fs(e)),e==null||e===``?NaN:Number(e))}G({number:function(e){return parseFloat(e)},time:function(e){return+Fs(e)},trim:function(e){return H(e)?ye(e):e}});var _m={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)||Zs(``),this._opFn=_m[e],this._rvalFloat=Bs(t)}return e.prototype.evaluate=function(e){return se(e)?this._opFn(e,this._rvalFloat):this._opFn(Bs(e),this._rvalFloat)},e})();var vm=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:Bs(e),r=se(t)?t:Bs(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=Bs(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=Bs(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function ym(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 bm(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var xm=typeof Uint32Array>`u`?Array:Uint32Array,Sm=typeof Uint16Array>`u`?Array:Uint16Array,Cm=typeof Int32Array>`u`?Array:Int32Array,wm=typeof Float64Array>`u`?Array:Float64Array,Tm={float:wm,int:Cm,ordinal:Array,number:Array,time:wm},Em;function Dm(e){return e>65535?xm:Sm}function Om(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function km(e,t,n,r,i){var a=Tm[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 Am=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=Em[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Wp(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 Tm[t||`float`](this._rawCount),this._rawExtent[i]=Pc(),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]=Pc());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];km(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=Em.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]=Pc()),km(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)}),Ts(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=Dm(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(Dm(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=L(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Dm(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]]=Pc();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(Dm(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(Dm(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]=Pc(),d=new(Dm(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=Pc();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=ym(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||bm(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]?Om(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=O(this._extent),e._rawExtent=O(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 gm(e[r],this._dimensions[r])}Em={arrayRows:e,objectRows:function(e,t,n,r){return gm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return gm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),jm=xc(),Mm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Nm=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||=Im(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=Wp(this.source),n=!Lm(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+=Mm[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 Pm(e){return e instanceof Nm}function Fm(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 Im(e){var t=jm(e);return t.dimNameMap||=Fm(e.dimensionsDefine)}function Lm(e){return e>30}var Rm=U,zm=I,Bm=typeof Int32Array>`u`?Array:Int32Array,Vm=`e\0\0`,Hm=-1,Um=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Wm=[`_approximateExtent`],Gm,Km,qm,Jm,Ym,Xm,Zm,Qm=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;Pm(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 hm({name:u}):u instanceof hm?u:new hm(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(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 Am&&(i=e),!i){var a=this.dimensions,o=Fp(e)||te(e)?new Zp(e,a.length):e;i=new Am;var s=zm(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=dm(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&&Zm(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&&ac(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=hc(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=hc(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Zm(this,o);Gm(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){Rm(e)?A(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=qm(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 Km(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(zm(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)?Hm:r},e.prototype.each=function(e,t,n){"use strict";V(e)&&(n=t,t=e,e=[]);var r=n||this,i=zm(Jm(e),this._getStoreDimIndex,this);this._store.each(i,r?R(t,r):t)},e.prototype.filterSelf=function(e,t,n){"use strict";V(e)&&(n=t,t=e,e=[]);var r=n||this,i=zm(Jm(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?R(t,r):t),this},e.prototype.selectRange=function(e){"use strict";var t=this,n={},r=L(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){"use strict";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){"use strict";var i=n||r||this,a=zm(Jm(e),this._getStoreDimIndex,this),o=Xm(this);return o._store=this._store.map(a,i?R(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=zm(Jm(e),this._getStoreDimIndex,this);this._store.modify(a,i?R(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Xm(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Xm(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Xm(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 xp(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new wp(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Km(e,t)},function(e){return Km(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||{},Rm(e)?A(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():Rm(i)&&(i=A({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Rm(t)?A(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Rm(e)?A(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?A(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){$c(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:zm(this.dimensions,this._getDimInfo,this),this.hostModel),Ym(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(ge(arguments)))})},e.internalField=function(){Gm=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 Bm(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Hm;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},qm=function(e,t,n){return hc(e._getCategory(t,n),null)},Km=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=qm(e,e._idDimIdx,t)),n??=Vm+t,n},Jm=function(e){return B(e)||(e=e==null?[]:[e]),e},Xm=function(t){var n=new e(t._schema?t._schema:zm(t.dimensions,t._getDimInfo,t),t.hostModel);return Ym(n,t),n},Ym=function(e,t){F(Um.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,F(Wm,function(n){e[n]=O(t[n])}),e._calculationInfo=A({},t._calculationInfo)},Zm=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=qm(e,i,t)),s==null&&a!=null&&(r[t]=s=qm(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 $m(e,t){Fp(e)||(e=Lp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=G(),a=[],o=eh(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Lm(o),c=r===e.dimensionsDefine,l=c?Im(e):Fm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=G(u),f=new Cm(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 hm,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=tc(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=A({},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=tc(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(M(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&&M(o.otherDims,r)})}});function g(e,t,n){tl.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=th(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Mp(e,S)===Tp.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Gc(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Nm({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function eh(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 th(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 nh={},rh={},ih=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(nh,!0),this._normalMasterList=n(rh,!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`?nh[e]=t:rh[e]=t},e.get=function(e){return rh[e]||nh[e]},e}();function ah(e){return!!nh[e]}function oh(e){sh.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var sh=G();function ch(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=sh.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function lh(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&&!ah(n)&&(i=0))}return{coordSysType:n,kind:i}}function uh(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=lh(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 dh=function(e,t){var n=t.getReferringComponents(e,Tc).models[0];return n&&n.coordinateSystem},fh=function(){function e(e){this.coordSysDims=[],this.axisMap=G(),this.categoryAxisMap=G(),this.coordSysName=e}return e}();function ph(e){var t=e.get(`coordinateSystem`),n=new fh(t),r=mh[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var mh={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tc).models[0],a=e.getReferringComponents(`yAxis`,Tc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),hh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),hh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),hh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),hh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),hh(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),hh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tc).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 hh(e){return e.get(`type`)===`category`}function gh(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;_h(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 _h(e){return!Pm(e.schema)}function vh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function yh(e,t){return vh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function bh(e,t){var n=e.get(`coordinateSystem`),r=ih.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=pm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function xh(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 Sh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Lp(e)):(i=r.getSource(),a=i.sourceFormat===nl);var o=ph(t),s=bh(t,o),c=n.useEncodeDefaulter,l=V(c)?c:c?z(Op,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=$m(i,u),f=xh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=gh(t,{schema:d,store:p}),h=new Qm(d,t);h.setCalculationInfo(m);var g=f!=null&&Ch(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 Ch(e){if(e.sourceFormat===`original`)return!B(ic(wh(e.data||[])))}function wh(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Th=Math.round(Math.random()*10);function Eh(e){return[e||``,Th++].join(`_`)}function Dh(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=ze(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=ze(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Oh(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){N(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);N(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){N(t,e)>=0&&n.push(e)}),n}}function kh(e,t){return k(k({},e,!0),t,!0)}var Ah=Math.log(2);function jh(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)/Ah);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]*jh(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Mh(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=jh(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)*jh(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 Nh=`___zrEVENTSAVED`,Ph=[];function Fh(e,t,n,r,i){return Lh(Ph,t,r,i,!0)&&Lh(e,n,Ph[0],Ph[1])}function Ih(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Nh];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Nh])}}function Lh(e,t,n,r,i){if(t.getBoundingClientRect&&Pe.domSupported&&!Bh(t)){var a=t[Nh]||(t[Nh]={}),o=zh(Rh(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Rh(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 zh(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?Mh(s,o):Mh(o,s))}function Bh(e){return e.nodeName.toUpperCase()===`CANVAS`}var Vh=/([&<>"'])/g,Hh={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Uh(e){return e==null?``:(e+``).replace(Vh,function(e,t){return Hh[t]})}var Wh={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:`. `}}}},Gh={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:``}}}},Kh=`ZH`,qh=`EN`,Jh=qh,Yh={},Xh={},Zh=Pe.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Jh).toUpperCase().indexOf(Kh)>-1?Kh:Jh}():Jh;function Qh(e,t){e=e.toUpperCase(),Xh[e]=new xp(t),Yh[e]=t}function $h(e){if(H(e)){var t=Yh[e.toUpperCase()]||{};return e===Kh||e===qh?O(t):k(O(t),O(Yh[Jh]),!1)}return k(O(e),O(Yh[Jh]),!1)}function eg(e){return Xh[e]}function tg(){return Xh[Jh]}Qh(qh,Wh),Qh(Kh,Gh);var ng=null;function rg(e){ng||=e}function ig(){return ng}function ag(e,t){var n=ig(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function og(e){var t=e.brk;return t?t.breaks:[]}function sg(e){var t=e.brk;return t?t.hasBreaks():!1}var cg=1e3,lg=cg*60,ug=lg*60,dg=ug*24,fg=dg*365,pg={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})/},mg={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},hg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,gg=`{yyyy}-{MM}-{dd}`,_g={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:gg,hour:gg+` `+mg.hour,minute:gg+` `+mg.minute,second:gg+` `+mg.second,millisecond:hg},vg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],yg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function bg(e){return!H(e)&&!V(e)?xg(e):e}function xg(e){e||={};var t={},n=!0;return F(vg,function(t){n&&=e[t]==null}),F(vg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=vg[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=mg[r]:pg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Sg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Cg(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 wg(e){return e===Cg(e)}function Tg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Eg(e,t,n,r){var i=Fs(e),a=i[Ag(n)](),o=i[jg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[Mg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Ng(n)](),d=(u-1)%12+1,f=i[Pg(n)](),p=i[Fg(n)](),m=i[Ig(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof xp?r:eg(r||Zh)||tg()).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,Sg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Sg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Sg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Sg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Sg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Sg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Sg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Sg(m,3)).replace(/{S}/g,m+``)}function Dg(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=ig();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=Og(e.value,i);a=n[u][u][0]}}return Eg(new Date(e.value),a,i,r)}function Og(e,t){var n=Fs(e),r=n[jg(t)]()+1,i=n[Mg(t)](),a=n[Ng(t)](),o=n[Pg(t)](),s=n[Fg(t)](),c=n[Ig(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 kg(e,t,n){switch(t){case`year`:e[Rg(n)](0);case`month`:e[zg(n)](1);case`day`:e[Bg(n)](0);case`hour`:e[Vg(n)](0);case`minute`:e[Hg(n)](0);case`second`:e[Ug(n)](0)}return e}function Ag(e){return e?`getUTCFullYear`:`getFullYear`}function jg(e){return e?`getUTCMonth`:`getMonth`}function Mg(e){return e?`getUTCDate`:`getDate`}function Ng(e){return e?`getUTCHours`:`getHours`}function Pg(e){return e?`getUTCMinutes`:`getMinutes`}function Fg(e){return e?`getUTCSeconds`:`getSeconds`}function Ig(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Lg(e){return e?`setUTCFullYear`:`setFullYear`}function Rg(e){return e?`setUTCMonth`:`setMonth`}function zg(e){return e?`setUTCDate`:`setDate`}function Bg(e){return e?`setUTCHours`:`setHours`}function Vg(e){return e?`setUTCMinutes`:`setMinutes`}function Hg(e){return e?`setUTCSeconds`:`setSeconds`}function Ug(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Wg(e){if(!Vs(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 Gg(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 Kg=_e;function qg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ye(e)?e:`-`}function a(e){return Gs(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Fs(e):e;if(!isNaN(+c))return Eg(c,r,n);if(s)return`-`}if(t===`ordinal`)return oe(e)?i(e):se(e)&&a(e)?e+``:`-`;var l=Bs(e);return a(l)?Wg(l):oe(e)?i(e):typeof e==`boolean`?e+``:`-`}var Jg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Yg=function(e,t){return`{`+e+(t??``)+`}`};function Xg(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=Jg[a];e=e.replace(Yg(o),Yg(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(Yg(Jg[c],s),n?Uh(l):l)}return e}function Zg(e,t,n){return F(t,function(t,r){e=e.replace(`{`+r+`}`,n?Uh(t):t)}),e}function Qg(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:`+Uh(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Uh(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 $g(e,t){return t||=`transparent`,H(e)?e:U(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function e_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var t_=F,n_=[`left`,`right`,`top`,`bottom`,`width`,`height`],r_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function i_(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 a_=i_;z(i_,`vertical`),z(i_,`horizontal`);function o_(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 s_(e,t){var n=d_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===u_.point)a=n.refPoint,i=l_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=B(o)?o:[o,o];i=l_(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 c_(e,t){var n=s_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);B(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 l_(e,t,n){n=Kg(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 u_={rect:1,point:2};function d_(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=ch(e),l=c.coord,u=c.from;if(o.dataToLayout){a=u_.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=u_.point,s=u,i=o.dataToPoint(l))}return a??=u_.rect,a===u_.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 f_(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=l_(M({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 p_(e,t){return e[r_[t][0]]!=null||e[r_[t][1]]!=null&&e[r_[t][2]]!=null}function m_(e){var t=e.layoutMode||e.constructor.layoutMode;return U(t)?t:t?{type:t}:null}function h_(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(r_[0],0),a=o(r_[1],1);c(r_[0],e,i),c(r_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(t_(n,function(t){c[t]=e[t]}),t_(n,function(e){Ae(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(!Ae(a,f)&&Ae(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){t_(e,function(e){t[e]=n[e]})}}function g_(e){return __({},e)}function __(e,t){return t&&e&&t_(n_,function(n){Ae(t,n)&&(e[n]=t[n])}),e}var v_=xc(),y_=function(e){a(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Eh(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=m_(this),r=n?g_(e):{};k(e,t.getTheme().get(this.mainType)),k(e,this.getDefaultOption()),n&&h_(e,r,n)},t.prototype.mergeOption=function(e,t){k(this.option,e,!0);var n=m_(this);n&&h_(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Ve(e))return e.defaultOption;var t=v_(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=k(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Dc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return o_(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}(xp);We(y_,xp),Ye(y_),Dh(y_),Oh(y_,b_);function b_(e){var t=[];return F(y_.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=I(t,function(e){return ze(e).main}),e!==`dataset`&&N(t,`dataset`)<=0&&t.unshift(`dataset`),t}var x_=xc(),S_=xc(),C_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=tc(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return E_(this,x_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){D_(this,x_)},e}();function w_(e,t,n,r){return E_(e,S_,tc(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function T_(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 E_(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:T_(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 D_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var O_=/\{@(.+?)\}/g,k_=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 Xg(i,s).replace(O_,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=lm(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 lm(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function A_(e){var t,n;return U(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function j_(e){return new M_(e)}var M_=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){N_.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:N_.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}(),N_=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}}(),P_=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 gm(e,t)},e}();function F_(e,t){var n=new P_,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&Zs(``);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&&(Ae(s,n)&&Zs(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=tm(i,cl);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=R(I_,null,e)),n.cloneRawData=R(L_,null,e),n.count=R(im(i,cl),null,r,a,o);var d=sm(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=R(R_,null,o,s),n.cloneAllDimensionInfo=R(z_,null,o),n}function I_(e){var t=e.sourceFormat;return W_(t)||Zs(``),e.data}function L_(e){var t=e.sourceFormat,n=e.data;if(W_(t)||Zs(``),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(A({},n[i]));return r}}function R_(e,t,n){if(n!=null){if(se(n)||!isNaN(n)&&!Ae(t,n))return e[n];if(Ae(t,n))return t[n]}}function z_(e){return O(e)}var B_=G();function V_(e){e=O(e);var t=e.type,n=``;t||Zs(n);var r=t.split(`:`);r.length!==2&&Zs(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,B_.set(t,e)}function H_(e,t,n){var r=tc(e),i=r.length;i||Zs(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=U_(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function U_(e,t,n,r){var i=``;t.length||Zs(i),U(e)||Zs(i);var a=e.type,o=B_.get(a);o||Zs(i);var s=I(t,function(e){return F_(e,o)});return I(tc(o.transform({upstream:s[0],upstreamList:s,config:O(e.config)})),function(e,n){var r=``;U(e)||Zs(r),e.data||Zs(r),W_(zp(e.data))||Zs(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:cl,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:cl,sourceHeader:0,dimensions:e.dimensions};return Ip(e.data,i,null)})}function W_(e){return e===`arrayRows`||e===`objectRows`}var G_=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(K_(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)?ol:nl,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?[Ip(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=[Ip(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&&q_(``);var i,a=[],o=[];return F(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&q_(``),a.push(t),o.push(e._getVersionSign())}),n?i=H_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Rp(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];K_(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Am,o.initData(new Zp(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(K_(e)){var t=Ap(e);return t?[t.getSourceManager()]:[]}return I(jp(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(K_(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 K_(e){return e.mainType===`series`}function q_(e){throw Error(e)}var J={color:{},darkColor:{},size:{}},J_=J.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 Y_ in A(J_,{primary:J_.neutral80,secondary:J_.neutral70,tertiary:J_.neutral60,quaternary:J_.neutral50,disabled:J_.neutral20,border:J_.neutral30,borderTint:J_.neutral20,borderShade:J_.neutral40,background:J_.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:J_.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:J_.neutral70,axisLineTint:J_.neutral40,axisTick:J_.neutral70,axisTickMinor:J_.neutral60,axisLabel:J_.neutral70,axisSplitLine:J_.neutral15,axisMinorSplitLine:J_.neutral05}),J_)if(J_.hasOwnProperty(Y_)){var X_=J_[Y_];Y_===`theme`?J.darkColor.theme=J_.theme.slice():Y_===`highlight`?J.darkColor.highlight=`rgba(255,231,130,0.4)`:Y_.indexOf(`accent`)===0?J.darkColor[Y_]=qr(X_,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):J.darkColor[Y_]=qr(X_,null,function(e){return e*.9},function(e){return 1-e**1.5})}J.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Z_=`line-height:1`;function Q_(e){var t=e.lineHeight;return t==null?Z_:`line-height:`+Uh(t+``)+`px`}function $_(e,t){var n=e.color||J.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||J.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Uh(r+``)+`px;color:`+Uh(n)+`;font-weight:`+Uh(i+``),valueStyle:`font-size:`+Uh(o+``)+`px;color:`+Uh(a)+`;font-weight:`+Uh(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var ev=[0,10,20,30],tv=[``,`
|
|
1
|
+
var WeborityChart=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function r(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 i=function(e,t){return i=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])},i(e,t)};function a(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var o=`12px sans-serif`,s=20,c=100,l=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function u(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)-s)/c}return t}var d=u(l),f={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=f.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=d[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():+new Date}},p=ne([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),m=ne([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),h=Object.prototype.toString,g=Array.prototype,_=g.forEach,v=g.filter,y=g.slice,b=g.map,x=function(){}.constructor,S=x?x.prototype:null,C=`__proto__`,w=2311,T=2**53-1;function E(){return w>=T&&(w=0),w++}function D(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function O(e){if(typeof e!=`object`||!e)return e;var t=e,n=h.call(e);if(n===`[object Array]`){if(!xe(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=O(e[r])}}else if(m[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(!p[n]&&!xe(e)&&!le(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==C&&(t[o]=O(e[o]));return t}function k(e,t,n){if(!W(t)||!W(e))return n?O(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==C){var i=e[r],a=t[r];W(a)&&W(i)&&!V(a)&&!V(i)&&!le(a)&&!le(i)&&!se(a)&&!se(i)&&!xe(a)&&!xe(i)?k(i,a,n):(n||!(r in e))&&(e[r]=O(t[r]))}return e}function A(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==C&&(e[n]=t[n]);return e}function j(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function M(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}f.createCanvas;function N(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 P(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 M(e,t,n)}function te(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function F(e,t,n){if(e&&t){if(e.forEach&&e.forEach===_)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===b)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 L(e,t,n){if(!e)return[];if(!t)return he(e);if(e.filter&&e.filter===v)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 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 ie(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(y.call(arguments)))}}var z=S&&H(S.bind)?S.call.bind(S.bind):ie;function B(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(y.call(arguments)))}}function V(e){return Array.isArray?Array.isArray(e):h.call(e)===`[object Array]`}function H(e){return typeof e==`function`}function U(e){return typeof e==`string`}function ae(e){return h.call(e)===`[object String]`}function oe(e){return typeof e==`number`}function W(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function se(e){return!!p[h.call(e)]}function ce(e){return!!m[h.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=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function G(e,t){return e??t}function me(e,t,n){return e??t??n}function he(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return y.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?new Map:new Se}var Te=function(){function e(t){var n=V(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 K(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&&A(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){a(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},ee(n,this)),A(n.prototype,e),n[Le]=!0,n.extend=this.extend,n.superCall=Ke,n.superApply=qe,n.superClass=t,n}}function He(e){return H(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){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];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&&N(r,s)>=0||i&&N(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=f.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 Mt=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}(),Nt=Math.min,Pt=Math.max,Ft=Math.abs,It=[`x`,`y`],Lt=[`width`,`height`],Rt=new Mt,zt=new Mt,Bt=new Mt,Vt=new Mt,Ht=nn(),Ut=Ht.minTv,Wt=Ht.maxTv,Gt=[0,0],q=function(){function e(e,t,n,r){qt(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=Nt(e.x,this.x),n=Nt(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Pt(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?Pt(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 Yt(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&&Mt.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=qt(Qt,t.x,t.y,t.width,t.height)),n instanceof e||(n=qt($t,n.x,n.y,n.width,n.height));var s=!!r;Ht.reset(i,s);var c=Ht.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)&&(Gt[0]=1/0,Gt[1]=0,tn(l,u,p,m,0,s,a,o),tn(d,f,h,g,1,s,a,o),s&&Mt.copy(r,_?Ht.useDir?Ht.dirMinTv:Ut:Wt)),_},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){Jt(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&&Jt(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{Rt.x=Bt.x=t.x,Rt.y=Vt.y=t.y,zt.x=Vt.x=t.x+t.width,zt.y=Bt.y=t.y+t.height,Rt.transform(n),Vt.transform(n),zt.transform(n),Bt.transform(n),e.x=Nt(Rt.x,zt.x,Bt.x,Vt.x),e.y=Nt(Rt.y,zt.y,Bt.y,Vt.y);var s=Pt(Rt.x,zt.x,Bt.x,Vt.x),c=Pt(Rt.y,zt.y,Bt.y,Vt.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(en,-t.x,-t.y)),ft(e,e,_t(en,r,i)),ut(e,e,_t(en,n.x,n.y)),e},e}(),Kt=q.create,qt=q.set,Jt=q.copy,Yt=q.calculateTransform,Xt=q.applyTransform,Zt=q.contain,Qt=new q(0,0,0,0),$t=new q(0,0,0,0),en=[];function tn(e,t,n,r,i,a,o,s){var c=Ft(t-n),l=Ft(r-e),u=Nt(c,l),d=It[i],f=It[1-i],p=Lt[i];t<n||r<e?c<l?(a&&(Wt[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Wt[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Pt(e,n),o[p]=Nt(t,r)-o[d]),a&&(u<Gt[0]||Ht.useDir)&&(Gt[0]=Nt(u,Gt[0]),(c<l||!Ht.bidirectional)&&(Ut[d]=c,Ut[f]=0,Ht.useDir&&Ht.calcDirMTV()),(c>=l||!Ht.bidirectional)&&(Ut[d]=-l,Ut[f]=0,Ht.useDir&&Ht.calcDirMTV())))}function nn(){var e=0,t=new Mt,n=new Mt,r={minTv:new Mt,maxTv:new Mt,useDir:!1,dirMinTv:new Mt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Pt(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 Ft(e)<1e-10}return r}function rn(e){an||=new et(100),e||=`12px sans-serif`;var t=an.get(e);return t||(t={font:e,strWidthCache:new et(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:f.measureText(`国`,e).width,asciiCharWidth:f.measureText(`a`,e).width},an.put(e,t)),t}var an;function on(e){if(!(sn>=cn)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=f.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?sn=cn:i>2&&sn++,t}}var sn=0,cn=5;function ln(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=on(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function un(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=f.measureText(t,e.font).width,n.put(t,r)),r}function dn(e,t,n,r){var i=un(rn(t),e),a=hn(t);return new q(pn(0,i,n),mn(0,a,r),i,a)}function fn(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
+
`);if(i.length===1)return dn(i[0],t,n,r);for(var a=new q(0,0,0,0),o=0;o<i.length;o++){var s=dn(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function pn(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function mn(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function hn(e){return rn(e).stWideCharWidth}function gn(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function _n(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+=gn(r[0],n.width),l+=gn(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 vn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function yn(e,t,n,r,i,a){if(!n)e.text=``,e.isTruncated=!1;else{var o=(t+``).split(`
|
|
3
|
+
`);a=bn(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)xn(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
|
+
`),e.isTruncated=s}}function bn(e,t,n,r){r||={};var i=A({},r);n=G(n,`...`),i.maxIterations=G(r.maxIterations,2);var a=i.minChar=G(r.minChar,0),o=i.fontMeasureInfo=rn(t),s=o.asciiCharWidth;i.placeholder=G(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=un(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 xn(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=un(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?Sn(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=un(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function Sn(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=ln(n,e.charCodeAt(i));return i}function Cn(e,t,n,r){var i=In(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=hn(l),f=G(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?Mn(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=bn(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)xn(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=rn(l),S=0;S<_.length;S++)w=Math.max(un(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 wn=function(){function e(){}return e}(),Tn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),En=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 Dn(e,t,n,r,i){var a=new En,o=In(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=vn.lastIndex=0,h;(h=vn.exec(o))!=null;){var g=h.index;g>m&&On(a,o.substring(m,g),t,p),On(a,h[2],t,p,h[1]),m=vn.lastIndex}m<o.length&&On(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,N=k.font=A.font||t.font;k.contentHeight=hn(N);var ee=G(A.height,k.contentHeight);if(k.innerHeight=ee,j&&(ee+=j[0]+j[2]),k.height=ee,k.lineHeight=me(A.lineHeight,t.lineHeight,ee),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 te=A.width,F=te==null||te===`auto`;if(typeof te==`string`&&te.charAt(te.length-1)===`%`)k.percentWidth=te,_.push(k),k.contentWidth=un(rn(N),k.text);else{if(F){var I=A.backgroundColor,ne=I&&I.image;ne&&(ne=nt(ne),at(ne)&&(k.width=Math.max(k.width,ne.width*ee/ne.height)))}var L=b&&u!=null?u-D:null;L!=null&&L<k.width?!F||L<M?(k.text=``,k.width=k.contentWidth=0):(yn(S,k.text,L-M,N,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=un(rn(N),k.text)):k.contentWidth=un(rn(N),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=G(u,y),a.outerHeight=a.height=G(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],re=k.percentWidth;k.width=parseInt(re,10)/100*a.width}return a}function On(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=gn(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
6
|
+
`),l=!0),r.accumWidth=m}else{var h=Mn(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=rn(c),_=0;_<u.length;_++){var v=u[_],y=new wn;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:un(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new Tn)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new Tn([y]))}}function kn(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var An=ne(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function jn(e){return!kn(e)||!!An[e]}function Mn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=rn(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=ln(d,p.charCodeAt(0)),h=!r&&!jn(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 Nn(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(Pn,pn(n,o,i),mn(r,s,a),o,s),q.intersect(t,Pn,null,Fn);var c=Fn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=pn(c.x,c.width,i,!0),e.baseY=mn(c.y,c.height,a,!0)}}var Pn=new q(0,0,0,0),Fn={outIntersectRect:{},clamp:!0};function In(e){return e==null?e=``:e+=``}function Ln(e){var t=In(e.text),n=e.font;return Rn(e,un(rn(n),t),hn(n),null)}function Rn(e,t,n,r){var i=new q(pn(e.x||0,t,e.textAlign),mn(e.y||0,n,e.textBaseline),t,n),a=r??(zn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function zn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Bn=st,Vn=5e-5;function Hn(e){return e>Vn||e<-Vn}var Un=[],Wn=[],Gn=ot(),Kn=Math.abs,qn=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Jn(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 Hn(this.rotation)||Hn(this.x)||Hn(this.y)||Hn(this.scaleX-1)||Hn(this.scaleY-1)||Hn(this.skewX)||Hn(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):Bn(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&&(Bn(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Un);var n=Un[0]<0?-1:1,r=Un[1]<0?-1:1,i=((Un[0]-n)*t+n)/Un[0]||0,a=((Un[1]-r)*t+r)/Un[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(Wn,e.invTransform,t),t=Wn);var n=this.originX,r=this.originY;(n||r)&&(Gn[4]=n,Gn[5]=r,lt(Wn,t,Gn),Wn[4]-=n,Wn[5]-=r,t=Wn),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&&Kn(e[0]-1)>1e-10&&Kn(e[3]-1)>1e-10?Math.sqrt(Kn(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Zn(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}(),Jn=qn.getLocalTransform;function Yn(){return new qn}var Xn=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Zn(e,t){return j(e,t,Xn)}var Qn={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-Qn.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?Qn.bounceIn(e*2)*.5:Qn.bounceOut(e*2-1)*.5+.5}},$n=Math.pow,er=Math.sqrt,tr=1e-8,nr=1e-4,rr=er(3),ir=1/3,ar=mt(),or=mt(),sr=mt();function cr(e){return e>-tr&&e<tr}function lr(e){return e>tr||e<-tr}function ur(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 dr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function fr(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(cr(u)&&cr(d)){if(cr(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(cr(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=er(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-$n(-y,ir):$n(y,ir),b=b<0?-$n(-b,ir):$n(b,ir);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*er(u*u*u)),S=Math.acos(x)/3,C=er(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+rr*Math.sin(S)))/(3*o),T=(-s+C*(w-rr*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 pr(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(cr(o)){if(lr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(cr(u))i[0]=-a/(2*o);else if(u>0){var d=er(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 mr(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 hr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ar[0]=c,ar[1]=l;for(var v=0;v<1;v+=.05)or[0]=ur(e,n,i,o,v),or[1]=ur(t,r,a,s,v),g=Dt(ar,or),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<nr);y++)m=d-f,h=d+f,or[0]=ur(e,n,i,o,m),or[1]=ur(t,r,a,s,m),g=Dt(or,ar),m>=0&&g<p?(d=m,p=g):(sr[0]=ur(e,n,i,o,h),sr[1]=ur(t,r,a,s,h),_=Dt(sr,ar),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=ur(e,n,i,o,d),u[1]=ur(t,r,a,s,d)),er(p)}function gr(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=ur(e,n,i,o,m),g=ur(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function _r(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function vr(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function yr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(cr(a)){if(lr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(cr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=er(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 br(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function xr(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 Sr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ar[0]=o,ar[1]=s;for(var f=0;f<1;f+=.05){or[0]=_r(e,n,i,f),or[1]=_r(t,r,a,f);var p=Dt(ar,or);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<nr);m++){var h=l-u,g=l+u;or[0]=_r(e,n,i,h),or[1]=_r(t,r,a,h);var p=Dt(or,ar);if(h>=0&&p<d)l=h,d=p;else{sr[0]=_r(e,n,i,g),sr[1]=_r(t,r,a,g);var _=Dt(sr,ar);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=_r(e,n,i,l),c[1]=_r(t,r,a,l)),er(d)}function Cr(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=_r(e,n,i,f),m=_r(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var wr=/cubic-bezier\(([0-9,\.e ]+)\)/;function Tr(e){var t=e&&wr.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:fr(0,r,a,1,e,s)&&ur(0,i,o,1,s[0])}}}var Er=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=H(e)?e:Qn[e]||Tr(e)},e}(),Dr={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 Or(e){return e=Math.round(e),e<0?0:e>255?255:e}function kr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ar(e){return e<0?0:e>1?1:e}function jr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Or(parseFloat(t)/100*255):Or(parseInt(t,10))}function Mr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ar(parseFloat(t)/100):Ar(parseFloat(t))}function Nr(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 Pr(e,t,n){return e+(t-e)*n}function Fr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ir(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Lr=new et(20),Rr=null;function zr(e,t){Rr&&Ir(Rr,t),Rr=Lr.put(e,Rr||t.slice())}function Br(e,t){if(e){t||=[];var n=Lr.get(e);if(n)return Ir(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Dr)return Ir(t,Dr[r]),zr(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)){Fr(t,0,0,0,1);return}return Fr(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),zr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Fr(t,0,0,0,1);return}return Fr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),zr(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?Fr(t,+l[0],+l[1],+l[2],1):Fr(t,0,0,0,1);u=Mr(l.pop());case`rgb`:if(l.length>=3)return Fr(t,jr(l[0]),jr(l[1]),jr(l[2]),l.length===3?u:Mr(l[3])),zr(e,t),t;Fr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Fr(t,0,0,0,1);return}return l[3]=Mr(l[3]),Vr(l,t),zr(e,t),t;case`hsl`:if(l.length!==3){Fr(t,0,0,0,1);return}return Vr(l,t),zr(e,t),t;default:return}}Fr(t,0,0,0,1)}}}function Vr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Mr(e[1]),i=Mr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Fr(t,Or(Nr(o,a,n+1/3)*255),Or(Nr(o,a,n)*255),Or(Nr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Hr(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 Ur(e,t){var n=Br(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 Jr(n,n.length===4?`rgba`:`rgb`)}}function Wr(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]=Or(Pr(o[0],s[0],c)),n[1]=Or(Pr(o[1],s[1],c)),n[2]=Or(Pr(o[2],s[2],c)),n[3]=Ar(Pr(o[3],s[3],c)),n}}function Gr(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=Br(t[i]),s=Br(t[a]),c=r-i,l=Jr([Or(Pr(o[0],s[0],c)),Or(Pr(o[1],s[1],c)),Or(Pr(o[2],s[2],c)),Ar(Pr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Kr(e,t,n,r){var i=Br(e);if(e)return i=Hr(i),t!=null&&(i[0]=kr(H(t)?t(i[0]):t)),n!=null&&(i[1]=Mr(H(n)?n(i[1]):n)),r!=null&&(i[2]=Mr(H(r)?r(i[2]):r)),Jr(Vr(i),`rgba`)}function qr(e,t){var n=Br(e);if(n&&t!=null)return n[3]=Ar(t),Jr(n,`rgba`)}function Jr(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 Yr(e,t){var n=Br(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Xr=new et(100);function Zr(e){if(U(e)){var t=Xr.get(e);return t||(t=Ur(e,-.1),Xr.put(e,t)),t}if(ue(e)){var n=A({},e);return n.colorStops=I(e.colorStops,function(e){return{offset:e.offset,color:Ur(e.color,-.1)}}),n}return e}var Qr=Math.round;function $r(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Br(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var ei=1e-4;function ti(e){return e<ei&&e>-ei}function ni(e){return Qr(e*1e3)/1e3}function ri(e){return Qr(e*1e4)/1e4}function ii(e){return`matrix(`+ni(e[0])+`,`+ni(e[1])+`,`+ni(e[2])+`,`+ni(e[3])+`,`+ri(e[4])+`,`+ri(e[5])+`)`}var ai={left:`start`,right:`end`,center:`middle`,middle:`middle`};function oi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function si(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function ci(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 li(e){return e&&!!e.image}function ui(e){return e&&!!e.svgElement}function di(e){return li(e)||ui(e)}function fi(e){return e.type===`linear`}function pi(e){return e.type===`radial`}function mi(e){return e&&(e.type===`linear`||e.type===`radial`)}function hi(e){return`url(#`+e+`)`}function gi(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 _i(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*je,i=G(e.scaleX,1),a=G(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(`+Qr(o*je)+`deg, `+Qr(s*je)+`deg)`),c.join(` `)}var vi=(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}})(),yi=Array.prototype.slice;function bi(e,t,n){return(t-e)*n+e}function xi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=bi(t[a],n[a],r);return e}function Si(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]=bi(t[o][s],n[o][s],r)}return e}function Ci(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function wi(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 Ti(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 Ei(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]:yi.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 Di(e){if(te(e)){var t=e.length;if(te(e[0])){for(var n=[],r=0;r<t;r++)n.push(yi.call(e[r]));return n}return yi.call(e)}return e}function Oi(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 ki(e){return te(e&&e[0])?2:1}var Ai=0,ji=1,Mi=2,Ni=3,Pi=4,Fi=5,Ii=6;function Li(e){return e===Pi||e===Fi}function Ri(e){return e===ji||e===Mi}var zi=[0,0,0,0],Bi=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=Ii,s=t;if(te(t)){var c=ki(t);o=c,(c===1&&!oe(t[0])||c===2&&!oe(t[0][0]))&&(a=!0)}else if(oe(t)&&!fe(t))o=Ai;else if(U(t)){if(!isNaN(+t))o=Ai;else{var l=Br(t);l&&(s=l,o=Ni)}}else if(ue(t)){var u=A({},s);u.colorStops=I(t.colorStops,function(e){return{offset:e.offset,color:Br(e.color)}}),fi(t)?o=Pi:pi(t)&&(o=Fi),s=u}i===0?this.valType=o:(o!==this.valType||o===Ii)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=H(n)?n:Qn[n]||Tr(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=Ri(r),c=Li(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?Ei(d,f,r):c&&Ti(d.colorStops,f.colorStops))}if(!o&&r!==Fi&&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===Ai?n[l].additiveValue=n[l].value-p:r===Ni?n[l].additiveValue=Ci([],n[l].value,p,-1):Ri(r)&&(n[l].additiveValue=r===ji?Ci([],n[l].value,p,-1):wi([],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===Ni,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?zi:e[s];if((Ri(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ri(i))i===ji?xi(g,f[r],p[r],h):Si(g,f[r],p[r],h);else if(Li(i)){var _=f[r],v=p[r],y=i===Pi;e[s]={type:y?`linear`:`radial`,x:bi(_.x,v.x,h),y:bi(_.y,v.y,h),colorStops:I(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:bi(e.offset,n.offset,h),color:Oi(xi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=bi(_.x2,v.x2,h),e[s].y2=bi(_.y2,v.y2,h)):e[s].r=bi(_.r,v.r,h)}else if(c)xi(g,f[r],p[r],h),n||(e[s]=Oi(g));else{var b=bi(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===Ai?e[n]=e[n]+r:t===Ni?(Br(e[n],zi),Ci(zi,zi,r,1),e[n]=Oi(zi)):t===ji?Ci(e[n],e[n],r,1):t===Mi&&wi(e[n],e[n],r,1)},e}(),Vi=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?D(`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 Bi(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===Ni&&c&&(c=Oi(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Di(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Di(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 Er({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]=Di(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}(),Hi=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){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),Ui=1;Ne.hasGlobalWindow&&(Ui=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Wi=Ui,Gi=.4,Ki=`#333`,qi=`#ccc`,Ji=`#eee`,Yi=`__zr_normal__`,Xi=Xn.concat([`ignore`]),Zi=ne(Xn,function(e,t){return e[t]=!0,e},{ignore:!1}),Qi={},$i=new q(0,0,0,0),ea=[],ta=function(){function e(e){this.id=E(),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=$i,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Qi,n,d):_n(Qi,n,d),i.x=Qi.x,i.y=Qi.y,a=Qi.align,o=Qi.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=gn(f[0],d.width),m=gn(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(ea),pt(ea,ea),q.copy(_,d),_.applyTransform(ea)}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()?qi:Ki},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Br(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,Jr(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||{},A(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(W(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,Xi)},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(Yi,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Yi;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(N(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)D(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=la(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,da(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=la(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,da(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=N(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=N(r,e),a=N(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];A(t,i),i.textConfig&&(n||={},A(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=A({},r?this.textConfig:n.textConfig),A(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Xi.length;l++){var u=Xi[l],d=i&&Zi[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 qn,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},A(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 Vi(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=N(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){na(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){na(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=na(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}();P(ta,Hi),P(ta,qn);function na(e,t,n,r,i){n||={};var a=[];ca(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 ra(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function ia(e){return te(e[0])}function aa(e,t,n){if(te(t[n])){if(te(e[n])||(e[n]=[]),ce(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),ra(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(ia(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?ra(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else ra(a,i,o);a.length=i.length}}else e[n]=t[n]}function oa(e,t){return e===t||te(e)&&te(t)&&sa(e,t)}function sa(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 ca(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=!W(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(W(v)&&!te(v)&&!ue(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}ca(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=N(m,x);m.splice(S,1)}}if(i.force||(h=L(h,function(e){return!oa(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[_]=Di(n[_]),aa(n,r,_)}}var x=new Vi(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 la(e,t,n,r){return!(n&&n.hoverLayer||r)||ua(e)||t&&ua(t)?0:1}function ua(e){return e.type===`text`||e.type===`tspan`}function da(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var fa=`__zr_style_`+Math.round(Math.random()*10),pa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ma={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};pa[fa]=!0;var ha=[`z`,`z2`,`invisible`],ga=[`invisible`],_a=function(e){a(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&&ba(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:A(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(pa,e)},t.prototype.useStyle=function(e){e[fa]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[fa]},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,ha)},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?ga:ha,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 A(e,t),e},t.prototype.getAnimationStyleProps=function(){return ma},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}(ta),va=new q(0,0,0,0),ya=new q(0,0,0,0);function ba(e,t,n){return va.copy(e.getBoundingRect()),e.transform&&va.applyTransform(e.transform),ya.width=t,ya.height=n,!va.intersect(ya)}var xa=Math.min,Sa=Math.max,Ca=Math.sin,wa=Math.cos,Ta=Math.PI*2,Ea=mt(),Da=mt(),Oa=mt();function ka(e,t,n,r,i,a){i[0]=xa(e,n),i[1]=xa(t,r),a[0]=Sa(e,n),a[1]=Sa(t,r)}var Aa=[],ja=[];function Ma(e,t,n,r,i,a,o,s,c,l){var u=pr,d=ur,f=u(e,n,i,o,Aa);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,Aa[p]);c[0]=xa(m,c[0]),l[0]=Sa(m,l[0])}f=u(t,r,a,s,ja);for(var p=0;p<f;p++){var h=d(t,r,a,s,ja[p]);c[1]=xa(h,c[1]),l[1]=Sa(h,l[1])}c[0]=xa(e,c[0]),l[0]=Sa(e,l[0]),c[0]=xa(o,c[0]),l[0]=Sa(o,l[0]),c[1]=xa(t,c[1]),l[1]=Sa(t,l[1]),c[1]=xa(s,c[1]),l[1]=Sa(s,l[1])}function Na(e,t,n,r,i,a,o,s){var c=br,l=_r,u=Sa(xa(c(e,n,i),1),0),d=Sa(xa(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=xa(e,i,f),o[1]=xa(t,a,p),s[0]=Sa(e,i,f),s[1]=Sa(t,a,p)}function Pa(e,t,n,r,i,a,o,s,c){var l=At,u=jt,d=Math.abs(i-a);if(d%Ta<1e-4&&d>1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(Ea[0]=wa(i)*n+e,Ea[1]=Ca(i)*r+t,Da[0]=wa(a)*n+e,Da[1]=Ca(a)*r+t,l(s,Ea,Da),u(c,Ea,Da),i%=Ta,i<0&&(i+=Ta),a%=Ta,a<0&&(a+=Ta),i>a&&!o?a+=Ta:i<a&&o&&(i+=Ta),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Oa[0]=wa(p)*n+e,Oa[1]=Ca(p)*r+t,l(s,Oa,s),u(c,Oa,c))}}var Fa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ia=[],La=[],Ra=[],za=[],Ba=[],Va=[],Ha=Math.min,Ua=Math.max,Wa=Math.cos,Ga=Math.sin,Ka=Math.abs,qa=Math.PI,Ja=qa*2,Ya=typeof Float32Array<`u`,Xa=[];function Za(e){return Math.round(e/qa*1e8)/1e8%2*qa}function Qa(e,t){var n=Za(e[0]);n<0&&(n+=Ja);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ja?i=n+Ja:t&&n-i>=Ja?i=n-Ja:!t&&n>i?i=n+(Ja-Za(n-i)):t&&n<i&&(i=n-(Ja-Za(i-n))),e[0]=n,e[1]=i}var $a=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=Ka(n/Wi/e)||0,this._uy=Ka(n/Wi/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(Fa.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=Ka(e-this._xi),r=Ka(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Fa.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(Fa.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(Fa.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(),Xa[0]=r,Xa[1]=i,Qa(Xa,a),r=Xa[0],i=Xa[1];var o=i-r;return this.addData(Fa.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Wa(i)*n+e,this._yi=Ga(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(Fa.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Fa.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)&&Ya&&(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(Ya&&(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,Ya&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Ra[0]=Ra[1]=Ba[0]=Ba[1]=Number.MAX_VALUE,za[0]=za[1]=Va[0]=Va[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 Fa.M:t=r=e[a++],n=i=e[a++],Ba[0]=r,Ba[1]=i,Va[0]=r,Va[1]=i;break;case Fa.L:ka(t,n,e[a],e[a+1],Ba,Va),t=e[a++],n=e[a++];break;case Fa.C:Ma(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Ba,Va),t=e[a++],n=e[a++];break;case Fa.Q:Na(t,n,e[a++],e[a++],e[a],e[a+1],Ba,Va),t=e[a++],n=e[a++];break;case Fa.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=Wa(f)*u+c,i=Ga(f)*d+l),Pa(c,l,u,d,f,p,m,Ba,Va),t=Wa(p)*u+c,n=Ga(p)*d+l;break;case Fa.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];ka(r,i,r+h,i+g,Ba,Va);break;case Fa.Z:t=r,n=i}At(Ra,Ra,Ba),jt(za,za,Va)}return a===0&&(Ra[0]=Ra[1]=za[0]=za[1]=0),new q(Ra[0],Ra[1],za[0]-Ra[0],za[1]-Ra[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 Fa.M:i=o=e[d++],a=s=e[d++];break;case Fa.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Ka(_)>n||Ka(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Fa.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=gr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Fa.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Cr(i,a,y,b,h,g,10),i=h,a=g;break;case Fa.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=Wa(D)*T+C,s=Ga(D)*E+w),m=Ua(T,E)*Ha(Ja,Math.abs(O)),i=Wa(k)*T+C,a=Ga(k)*E+w;break;case Fa.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Fa.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!==Fa.L&&v>0&&(e.lineTo(y,b),v=0),S){case Fa.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Fa.L:u=n[x++],d=n[x++];var w=Ka(u-c),T=Ka(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 Fa.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;mr(c,k,j,N,D,Ia),mr(l,A,M,ee,D,La),e.bezierCurveTo(Ia[1],La[1],Ia[2],La[2],Ia[3],La[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,ee),c=N,l=ee;break;case Fa.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;xr(c,k,j,D,Ia),xr(l,A,M,D,La),e.quadraticCurveTo(Ia[1],La[1],Ia[2],La[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Fa.A:var P=n[x++],te=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],R=!n[x++],ie=F>I?F:I,z=Ka(F-I)>.001,B=ne+L,V=!1;if(f){var E=p[g++];h+E>_&&(B=ne+L*(_-h)/E,V=!0),h+=E}if(z&&e.ellipse?e.ellipse(P,te,F,I,re,ne,B,R):e.arc(P,te,ie,ne,B,R),V)break lo;C&&(o=Wa(ne)*F+P,s=Ga(ne)*I+te),c=Wa(B)*F+P,l=Ga(B)*I+te;break;case Fa.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var H=n[x++],U=n[x++];if(f){var E=p[g++];if(h+E>_){var ae=_-h;e.moveTo(u,d),e.lineTo(u+Ha(ae,H),d),ae-=H,ae>0&&e.lineTo(u+H,d+Ha(ae,U)),ae-=U,ae>0&&e.lineTo(u+Ua(H-ae,0),d+U),ae-=H,ae>0&&e.lineTo(u,d+Ua(U-ae,0));break lo}h+=E}e.rect(u,d,H,U);break;case Fa.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=Fa,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function eo(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 to(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:hr(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function no(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:Sr(e,t,n,r,i,a,s,c,null)<=l/2}var ro=Math.PI*2;function io(e){return e%=ro,e<0&&(e+=ro),e}var ao=Math.PI*2;function oo(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)%ao<1e-4)return!0;if(a){var d=r;r=io(i),i=io(d)}else r=io(r),i=io(i);r>i&&(i+=ao);var f=Math.atan2(c,s);return f<0&&(f+=ao),f>=r&&f<=i||f+ao>=r&&f+ao<=i}function so(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 co=$a.CMD,lo=Math.PI*2,uo=1e-4;function fo(e,t){return Math.abs(e-t)<uo}var po=[-1,-1,-1],mo=[-1,-1];function ho(){var e=mo[0];mo[0]=mo[1],mo[1]=e}function go(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=fr(t,r,a,s,l,po);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=po[h],_=g===0||g===1?.5:1;ur(e,n,i,o,g)<c||(f<0&&(f=pr(t,r,a,s,mo),mo[1]<mo[0]&&f>1&&ho(),p=ur(t,r,a,s,mo[0]),f>1&&(m=ur(t,r,a,s,mo[1]))),f===2?g<mo[0]?d+=p<t?_:-_:g<mo[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<mo[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function _o(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=yr(t,r,a,s,po);if(c===0)return 0;var l=br(t,r,a);if(l>=0&&l<=1){for(var u=0,d=_r(t,r,a,l),f=0;f<c;f++){var p=po[f]===0||po[f]===1?.5:1,m=_r(e,n,i,po[f]);m<o||(po[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=po[0]===0||po[0]===1?.5:1,m=_r(e,n,i,po[0]);return m<o?0:a<t?p:-p}function vo(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);po[0]=-c,po[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=lo-1e-4){r=0,i=lo;var u=a?1:-1;return o>=po[0]+e&&o<=po[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=lo,i+=lo);for(var f=0,p=0;p<2;p++){var m=po[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=lo+h),(h>=r&&h<=i||h+lo>=r&&h+lo<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function yo(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===co.M&&m>1&&(n||(s+=so(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case co.M:u=a[m++],d=a[m++],c=u,l=d;break;case co.L:if(n){if(eo(c,l,a[m],a[m+1],t,r,i))return!0}else s+=so(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case co.C:if(n){if(to(c,l,a[m++],a[m++],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++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case co.Q:if(n){if(no(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=_o(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case co.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+=so(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(oo(_,v,b,x,x+S,C,t,w,i))return!0}else s+=vo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case co.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(eo(u,d,f,d,t,r,i)||eo(f,d,f,p,t,r,i)||eo(f,p,u,p,t,r,i)||eo(u,p,u,d,t,r,i))return!0}else s+=so(f,d,f,p,r,i),s+=so(u,p,u,d,r,i);break;case co.Z:if(n){if(eo(c,l,u,d,t,r,i))return!0}else s+=so(c,l,u,d,r,i);c=u,l=d}}return!n&&!fo(l,d)&&(s+=so(c,l,u,d,r,i)||0),s!==0}function bo(e,t,n){return yo(e,0,!1,t,n)}function xo(e,t,n,r){return yo(e,t,!0,n,r)}var So=M({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},pa),Co={style:M({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ma.style)},wo=Xn.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),To=function(e){a(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<wo.length;++s)i[wo[s]]=this[wo[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?A(this.style,o):this.useStyle(o):a===`shape`?A(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(U(e)){var t=Yr(e,0);return t>.5?Ki:t>.2?Ji:qi}if(e)return qi}return Ki},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(U(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Yr(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 $a(!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)),xo(a,o/s,e,t)))return!0}if(this.hasFill())return bo(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:A(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return De(So,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=A({},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=A({},r.shape),A(c,n.shape)):(c=A({},i?this.shape:r.shape),A(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=A({},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 Co},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){a(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 O(e.style)},n.prototype.getDefaultShape=function(){return O(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}(_a),Eo=M({strokeFirst:!0,font:o,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},So),Do=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return zn(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return De(Eo,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=Ln(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(_a);Do.prototype.type=`tspan`;var Oo=M({x:0,y:0},pa),ko={style:M({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ma.style)};function Ao(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var jo=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return De(Oo,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=Ao(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 ko},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}(_a);jo.prototype.type=`image`;function Mo(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 No=Math.round;function Po(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&&(No(r*2)===No(i*2)&&(e.x1=e.x2=Io(r,s,!0)),No(a*2)===No(o*2)&&(e.y1=e.y2=Io(a,s,!0))),e}}function Fo(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=Io(r,s,!0),e.y=Io(i,s,!0),e.width=Math.max(Io(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Io(i+o,s,!1)-e.y,o===0?0:1)),e}}function Io(e,t,n){if(!t)return e;var r=No(e*2);return(r+No(t))%2==0?r/2:(r+(n?1:-1))/2}var Lo=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Ro={},zo=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Lo},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Fo(Ro,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?Mo(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(To);zo.prototype.type=`rect`;var Bo={fill:`#000`},Vo=2,Ho={},Uo={style:M({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},ma.style)},Wo=function(e){a(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Bo,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,Zo(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||Bo},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return A(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]||{},A(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Uo},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`;Nn(Ho,r.overflowRect,i,a,o,s),i=Ho.baseX,a=Ho.baseY;var c=Cn(ns(e),e,Ho.outerWidth,Ho.outerHeight),l=rs(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=mn(a,c.contentHeight,s);if(l||n){var _=pn(i,f,o),v=mn(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=ts(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=es(`fill`in e?e.fill:(x=!0,r.fill)),C=$o(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Vo,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Do),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,Yo(D,e),g+=m,E.setBoundingRect(Rn(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;Nn(Ho,t.overflowRect,i,a,n,r),i=Ho.baseX,a=Ho.baseY;var o=Dn(ns(e),e,Ho.outerWidth,Ho.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=pn(i,c,n),f=mn(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;rs(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&&rs(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=ts(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Do),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=es(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=$o(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Vo,_=!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),Yo(p,s),y&&(p.lineWidth=me(s.lineWidth,t.lineWidth,g),p.lineDash=G(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Rn(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(zo),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=G(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(jo),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=G(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 Xo(e)&&(t=[e.fontStyle,e.fontWeight,Jo(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ve(t)||e.textFont||e.font},t}(_a),Go={left:!0,right:1,center:1},Ko={top:1,bottom:1,middle:1},qo=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Jo(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Yo(e,t){for(var n=0;n<qo.length;n++){var r=qo[n],i=t[r];i!=null&&(e[r]=i)}}function Xo(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Zo(e){return Qo(e),F(e.rich,Qo),e}function Qo(e){if(e){e.font=Wo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Go[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Ko[n]?n:`top`,e.padding&&=ge(e.padding)}}function $o(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function es(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ts(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function ns(e){var t=e.text;return t!=null&&(t+=``),t}function rs(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var is=1e-4,as=20;function os(e){return e.replace(/^\s+|\s+$/g,``)}var ss=Math.min,cs=Math.max,ls=Math.abs,us=Math.round,ds=Math.floor,fs=Math.ceil,ps=Math.pow,ms=Math.log,hs=Math.LN10,gs=Math.PI,_s=Math.random;function vs(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=ys;function ys(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 bs(e,t,n)}function bs(e,t,n){return U(e)?Ss(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function xs(e){return U(e)&&Ss(e)}function Ss(e){return!!os(e).match(/%$/)}function Cs(e,t,n){return isNaN(t)?n?``+e:+e:(t=ss(cs(0,t),as),e=(+e).toFixed(t),n?e:+e)}function ws(e){return e.sort(function(e,t){return e-t}),e}function Ts(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(us(e*t)/t===e)return n}return Es(e)}function Es(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 cs(0,(a<0?0:i-1-a)-r)}function Ds(e,t,n){var r=ls(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ms(2*ls(n||1)*ls(r))/hs,a=ms(ls(t))/hs,o=cs(0,fs(-i+a));return isFinite(o)||(o=NaN),o}function Os(e,t){var n=ne(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=ps(10,t),i=I(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=I(i,function(e){return ds(e)}),s=ne(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 ks(e,t){var n=cs(Ts(e),Ts(t)),r=e+t;return n>as?r:Cs(r,n)}var As=ps(2,53)-1;function js(e){var t=gs*2;return(e%t+t)%t}function Ms(e){return e>-is&&e<is}var Ns=/^(?:(\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 Ps(e){if(e instanceof Date)return e;if(U(e)){var t=Ns.exec(e);if(!t)return 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?new Date(NaN):new Date(us(e))}function Fs(e){return ps(10,Is(e))}function Is(e){if(e===0)return 0;var t=ds(ms(e)/hs);return e/ps(10,t)>=10&&t++,t}function Ls(e,t){var n=Is(e),r=ps(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,Cs(e,-n)}function Rs(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 zs(e){var t=parseFloat(e);return t==e&&(t!==0||!U(e)||e.indexOf(`x`)<=0)?t:NaN}function Bs(e){return!isNaN(zs(e))}function Vs(){return us(_s()*9)}function Hs(e,t){return t===0?e:Hs(t,e%t)}function Us(e,t){return e==null?t:t==null?e:e*t/Hs(e,t)}function Ws(e){return e!=null&&isFinite(e)}var Gs=`[ECharts] `,Ks={},qs=typeof console<`u`&&console.warn&&console.log;function Js(e,t,n){if(qs){if(n){if(Ks[t])return;Ks[t]=!0}console[e](Gs+t)}}function Ys(e,t){Js(`error`,e,t)}function Xs(e){throw Error(e)}function Zs(e,t,n){return(t-e)*n+e}var Qs=`series\0`,$s=`\0_ec_\0`;function ec(e){return e instanceof Array?e:e==null?[]:[e]}function tc(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 nc=`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 rc(e){return W(e)&&!V(e)&&!(e instanceof Date)?e.value:e}function ic(e){return W(e)&&!(e instanceof Array)}function ac(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=K();F(t,function(e,n){W(e)||(t[n]=null)});var s=oc(e,o,n);return(r||i)&&sc(s,e,o,t),r&&cc(s,t),r||i?lc(s,t,i):a&&uc(s,t),dc(s),s}function oc(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`||gc(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function sc(e,t,n,r){F(r,function(i,a){if(i&&i.id!=null){var o=pc(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 cc(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)&&!gc(n)&&!gc(a)&&fc(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function lc(e,t,n){F(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||gc(r.existing)||r.existing&&t.id!=null&&!fc(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function uc(e,t){F(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function dc(e){var t=K();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(W(i)){if(a.name=i.name==null?r?r.name:Qs+n:pc(i.name),r)a.id=pc(r.id);else if(i.id!=null)a.id=pc(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 fc(e,t,n){var r=mc(t[e],null),i=mc(n[e],null);return r!=null&&i!=null&&r===i}function pc(e){return mc(e,``)}function mc(e,t){return e==null?t:U(e)?e:oe(e)||ae(e)?e+``:t}function hc(e){var t=e.name;return!!(t&&t.indexOf(Qs))}function gc(e){return e&&e.id!=null&&pc(e.id).indexOf($s)===0}function _c(e,t,n){F(e,function(e){var r=e.newOption;W(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=vc(t,r,e.existing,n))})}function vc(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function yc(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return V(t.dataIndex)?I(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return V(t.name)?I(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function bc(){var e=`__ec_inner_`+xc++;return function(t){return t[e]||(t[e]={})}}var xc=Vs();function Sc(e,t,n){var r=Cc(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=Ec(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 Cc(e,t){var n;if(U(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=K(),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&&N(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var wc={useDefault:!0,enableAll:!1,enableNone:!1},Tc={useDefault:!1,enableAll:!0,enableNone:!0};function Ec(e,t,n,r){r||=wc;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 Dc(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 Oc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function kc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Ac(e){return e===`auto`?Ne.domSupported?`html`:`richText`:e||`html`}function jc(e,t){var n=K(),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 Mc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(oe(r)){var o=Zs(n||0,r,i);return Cs(o,a?Math.max(Ts(n||0),Ts(r)):t)}if(U(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=Zs(p,m,i);s[d]=Cs(o,a?Math.max(Ts(p),Ts(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 Nc(){return[1/0,-1/0]}function Pc(e,t){Rc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Fc(e,t){Rc(t)&&t<e[0]&&(e[0]=t)}function Ic(e,t){Rc(t)&&t>e[1]&&(e[1]=t)}function Lc(e,t){zc(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Rc(e){return e!=null&&isFinite(e)}function zc(e,t){return Rc(e)&&Rc(t)&&e<=t}function Bc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Vc(e){zc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Hc(){var e=`__ec_once_`+Uc++;return function(t,n){ke(t,e)||(t[e]=1,n())}}var Uc=Vs();function Wc(e,t,n){var r=K(),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 Gc(e){return e.value+``}function Kc(e){return e+``}function qc(e,t){return G(t,!0)?e.seriesIndex+2:0}function Jc(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 Yc(e,t){return{seriesType:e,overallReset:t}}function Xc(e){return{overallReset:e}}var Zc=bc(),Qc=function(e,t,n,r){if(r){var i=Zc(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Zc(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},$c=`series`,el=K([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),tl=`original`,nl=`arrayRows`,rl=`objectRows`,il=`keyedColumns`,al=`typedArray`,ol=`unknown`,sl=`column`,cl=`Roam`,ll=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],ul=function(){function e(e){F(ll,function(t){this[t]=z(e[t],e)},this)}return e}();function dl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var fl=1,pl={},ml=bc(),hl=bc(),gl=[`emphasis`,`blur`,`select`],_l=[`normal`,`emphasis`,`blur`,`select`],vl=`highlight`,yl=`downplay`,bl=`select`,xl=`unselect`,Sl=`toggleSelect`,Cl=`selectchanged`;function wl(e){return e!=null&&e!==`none`}function Tl(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function El(e){Tl(e,`emphasis`,2)}function Dl(e){e.hoverState===2&&Tl(e,`normal`,0)}function Ol(e){Tl(e,`blur`,1)}function kl(e){e.hoverState===1&&Tl(e,`normal`,0)}function Al(e){e.selected=!0}function jl(e){e.selected=!1}function Ml(e,t,n){t(e,n)}function Nl(e,t,n){Ml(e,t,n),e.isGroup&&e.traverse(function(e){Ml(e,t,n)})}function Pl(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 Fl(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 Il(e,t,n,r){var i=n&&N(n,`select`)>=0,a=!1;if(e instanceof To){var o=ml(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(wl(s)||wl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=A({},r),l=A({},l),l.fill=s):!wl(l.fill)&&wl(s)?(a=!0,r=A({},r),l=A({},l),l.fill=Zr(s)):!wl(l.stroke)&&wl(c)&&(a||(r=A({},r),l=A({},l)),l.stroke=Zr(c)),r.style=l}}if(r&&r.z2==null){a||(r=A({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Ll(e,t,n){if(n&&n.z2==null){n=A({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Rl(e,t,n){var r=N(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Fl(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=A({},n),o=A({opacity:r?i:a.opacity*.1},o),n.style=o),n}function zl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Il(this,e,t,n);if(e===`blur`)return Rl(this,e,n);if(e===`select`)return Ll(this,e,n)}return n}function Bl(e){e.stateProxy=zl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=zl),n&&(n.stateProxy=zl)}function Vl(e,t){!Yl(e,t)&&!e.__highByOuter&&Nl(e,El)}function Hl(e,t){!Yl(e,t)&&!e.__highByOuter&&Nl(e,Dl)}function Ul(e,t){e.__highByOuter|=1<<(t||0),Nl(e,El)}function Wl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Nl(e,Dl)}function Gl(e){Nl(e,Ol)}function Kl(e){Nl(e,kl)}function ql(e){Nl(e,Al)}function Jl(e){Nl(e,jl)}function Yl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Xl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=hl(i),o=dl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){kl(e)}),s&&n.push(i)),a.isBlured=!1}),F(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Zl(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&&Kl(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`||Ol(e)}),te(t))a(e.getData(),t);else if(W(t))for(var u=R(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),hl(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 Ql(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){hl(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){Ol(e)})}}}function $l(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=yc(i,t);a=(V(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=Zc(o);Zl(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Zl(r,u,d,n)}}}function eu(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(Zc(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function tu(e,t,n){var r=Zc(e),i=eu(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Ql(r.componentMainType,r.componentIndex,n),F(a,function(e){return Vl(e,t)})):(Zl(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Ql(r.componentMainType,r.componentIndex,n),Vl(e,t))}function nu(e,t,n){Xl(n);var r=Zc(e),i=eu(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?F(i,function(e){return Hl(e,t)}):Hl(e,t)}function ru(e,t,n){if(gu(t)){var r=t.dataType,i=yc(e.getData(r),t);V(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function iu(e){F(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?ql(t):Jl(t)})})}function au(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 ou(e,t,n){pu(e,!0),Nl(e,Bl),lu(e,t,n)}function su(e){pu(e,!1)}function cu(e,t,n,r){r?su(e):ou(e,t,n)}function lu(e,t,n){var r=Zc(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var uu=[`emphasis`,`blur`,`select`],du={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function fu(e,t,n,r){n||=`itemStyle`;for(var i=0;i<uu.length;i++){var a=uu[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[du[n]]()}}function pu(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 mu(e){return!!(e&&e.__highDownDispatcher)}function hu(e){var t=pl[e];return t==null&&fl<=32&&(t=pl[e]=fl++),t}function gu(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function _u(e){var t=e.type;return t===`highlight`||t===`downplay`}function vu(e){var t=ml(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 yu=$a.CMD,bu=[[],[],[]],xu=Math.sqrt,Su=Math.atan2;function Cu(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=yu.M,d=yu.C,f=yu.L,p=yu.R,m=yu.A,h=yu.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=xu(t[0]*t[0]+t[1]*t[1]),y=xu(t[2]*t[2]+t[3]*t[3]),b=Su(-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=bu[c];x[0]=n[o++],x[1]=n[o++],kt(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var wu=Math.sqrt,Tu=Math.sin,Eu=Math.cos,Du=Math.PI;function Ou(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ku(e,t){return(e[0]*t[0]+e[1]*t[1])/(Ou(e)*Ou(t))}function Au(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(ku(e,t))}function ju(e,t,n,r,i,a,o,s,c,l,u){var d=Du/180*c,f=Eu(d)*(e-n)/2+Tu(d)*(t-r)/2,p=-1*Tu(d)*(e-n)/2+Eu(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=wu(m),s*=wu(m));var h=(i===a?-1:1)*wu((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+Eu(d)*g-Tu(d)*_,y=(t+r)/2+Tu(d)*g+Eu(d)*_,b=Au([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Au(x,S);if(ku(x,S)<=-1&&(C=Du),ku(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Du*1e6)/1e6;C=Du*2+w%2*Du}u.addData(l,v,y,o,s,b,C,d,a)}var Mu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Nu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Pu(e){var t=new $a;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=$a.CMD,c=e.match(Mu);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(Nu)||[],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,ju(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,ju(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 Fu=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(To);function Iu(e){return e.setData!=null}function Lu(e,t){var n=Pu(e),r=A({},t);return r.buildPath=function(e){var t=Iu(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){Cu(n,e),this.dirtyShape()},r}function Ru(e,t){return new Fu(Lu(e,t))}function zu(e,t){var n=Lu(e,t);return function(e){a(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Fu)}function Bu(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 To(t);return o.createPathProxy(),o.buildPath=function(e){if(Iu(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Vu=function(e){a(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=N(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=N(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}(ta);Vu.prototype.type=`group`;var Hu=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Uu=function(e){a(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){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(To);Uu.prototype.type=`circle`;var Wu=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Gu=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Wu},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}(To);Gu.prototype.type=`ellipse`;var Ku=Math.PI,qu=Ku*2,Ju=Math.sin,Yu=Math.cos,Xu=Math.acos,Zu=Math.atan2,Qu=Math.abs,$u=Math.sqrt,ed=Math.max,td=Math.min,nd=1e-4;function rd(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<nd))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function id(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/$u(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)*$u(ed(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 ad(e){var t;if(V(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 od(e,t){var n,r=ed(t.r,0),i=ed(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=Qu(c-s),p=f>qu&&f%qu;if(p>nd&&(f=p),!(r>nd))e.moveTo(l,u);else if(f>qu-nd)e.moveTo(l+r*Yu(s),u+r*Ju(s)),e.arc(l,u,r,s,c,!d),i>nd&&(e.moveTo(l+i*Yu(c),u+i*Ju(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*Yu(s),j=r*Ju(s),M=i*Yu(c),N=i*Ju(c),ee=f>nd;if(ee){var P=t.cornerRadius;P&&(n=ad(P),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Qu(r-i)/2;if(v=td(te,g),y=td(te,_),b=td(te,m),x=td(te,h),w=S=ed(v,y),T=C=ed(b,x),(S>nd||C>nd)&&(E=r*Yu(c),D=r*Ju(c),O=i*Yu(s),k=i*Ju(s),f<Ku)){var F=rd(A,j,O,k,E,D,M,N);if(F){var I=A-F[0],ne=j-F[1],L=E-F[0],re=D-F[1],R=1/Ju(Xu((I*L+ne*re)/($u(I*I+ne*ne)*$u(L*L+re*re)))/2),ie=$u(F[0]*F[0]+F[1]*F[1]);w=td(S,(r-ie)/(R+1)),T=td(C,(i-ie)/(R-1))}}}if(!ee)e.moveTo(l+A,u+j);else if(w>nd){var z=td(g,w),B=td(_,w),V=id(O,k,A,j,r,z,d),H=id(E,D,M,N,r,B,d);e.moveTo(l+V.cx+V.x0,u+V.cy+V.y0),w<S&&z===B?e.arc(l+V.cx,u+V.cy,w,Zu(V.y0,V.x0),Zu(H.y0,H.x0),!d):(z>0&&e.arc(l+V.cx,u+V.cy,z,Zu(V.y0,V.x0),Zu(V.y1,V.x1),!d),e.arc(l,u,r,Zu(V.cy+V.y1,V.cx+V.x1),Zu(H.cy+H.y1,H.cx+H.x1),!d),B>0&&e.arc(l+H.cx,u+H.cy,B,Zu(H.y1,H.x1),Zu(H.y0,H.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>nd)||!ee)e.lineTo(l+M,u+N);else if(T>nd){var z=td(m,T),B=td(h,T),V=id(M,N,E,D,i,-B,d),H=id(A,j,O,k,i,-z,d);e.lineTo(l+V.cx+V.x0,u+V.cy+V.y0),T<C&&z===B?e.arc(l+V.cx,u+V.cy,T,Zu(V.y0,V.x0),Zu(H.y0,H.x0),!d):(B>0&&e.arc(l+V.cx,u+V.cy,B,Zu(V.y0,V.x0),Zu(V.y1,V.x1),!d),e.arc(l,u,i,Zu(V.cy+V.y1,V.cx+V.x1),Zu(H.cy+H.y1,H.cx+H.x1),d),z>0&&e.arc(l+H.cx,u+H.cy,z,Zu(H.y1,H.x1),Zu(H.y0,H.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var sd=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}(),cd=function(e){a(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){od(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(To);cd.prototype.type=`sector`;var ld=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),ud=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ld},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}(To);ud.prototype.type=`ring`;function dd(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 fd(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=dd(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 pd=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),md=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new pd},t.prototype.buildPath=function(e,t){fd(e,t,!0)},t}(To);md.prototype.type=`polygon`;var hd=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),gd=function(e){a(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 hd},t.prototype.buildPath=function(e,t){fd(e,t,!1)},t}(To);gd.prototype.type=`polyline`;var _d={},vd=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),yd=function(e){a(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 vd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Po(_d,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}(To);yd.prototype.type=`line`;var bd=[],xd=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 Sd(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?dr:ur)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?dr:ur)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?vr:_r)(e.x1,e.cpx1,e.x2,t),(n?vr:_r)(e.y1,e.cpy1,e.y2,t)]}var Cd=function(e){a(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 xd},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&&(xr(n,o,i,u,bd),o=bd[1],i=bd[2],xr(r,s,a,u,bd),s=bd[1],a=bd[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(mr(n,o,c,i,u,bd),o=bd[1],c=bd[2],i=bd[3],mr(r,s,l,a,u,bd),s=bd[1],l=bd[2],a=bd[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Sd(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Sd(this.shape,e,!0);return Ct(t,t)},t}(To);Cd.prototype.type=`bezier-curve`;var wd=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}(),Td=function(e){a(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 wd},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}(To);Td.prototype.type=`arc`;var Ed=function(e){a(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),To.prototype.getBoundingRect.call(this)},t}(To),Dd=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Od=function(e){a(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}(Dd),kd=function(e){a(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}(Dd),Ad=Math.min,jd=Math.max,Md=Math.abs,Nd=[0,0],Pd=[0,0],Fd=nn(),Id=Fd.minTv,Ld=Fd.maxTv,Rd=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Mt;for(var n=0;n<2;n++)this._axes[n]=new Mt;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);Mt.sub(r[0],n[1],n[0]),Mt.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&&Mt.set(t,0,0),Fd.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Fd.negativeSize&&Mt.copy(t,r?Fd.useDir?Fd.dirMinTv:Id:Ld),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,Nd),e._getProjMinMaxOnAxis(a,t._corners,Pd),Fd.negativeSize||Nd[1]<Pd[0]||Nd[0]>Pd[1]){if(i=!1,Fd.negativeSize||n)return i;var s=Md(Pd[0]-Nd[1]),c=Md(Nd[0]-Pd[1]);Ad(s,c)>Ld.len()&&(s<c?Mt.scale(Ld,o,-s*r):Mt.scale(Ld,o,c*r))}else if(!n){var s=Md(Pd[0]-Nd[1]),c=Md(Nd[0]-Pd[1]);(Fd.useDir||Ad(s,c)<Id.len())&&((s<c||!Fd.bidirectional)&&(Mt.scale(Id,o,s*r),Fd.useDir&&Fd.calcDirMTV()),(s>=c||!Fd.bidirectional)&&(Mt.scale(Id,o,-c*r),Fd.useDir&&Fd.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=Ad(l,o),s=jd(l,s)}n[0]=o+Fd.touchThreshold,n[1]=s-Fd.touchThreshold,Fd.negativeSize=n[1]<n[0]},e}(),zd=[],Bd=function(e){a(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(zd)),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}(_a),Vd=bc();function Hd(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=G(r.duration,200),u=G(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)),H(d)&&(d=d(n,i)),H(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Ud(e,t,n,r,i,a,o){var s=!1,c;H(i)?(o=a,a=i,i=null):W(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=Hd(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 Wd(e,t,n,r,i,a){Ud(`update`,e,t,n,r,i,a)}function Gd(e,t,n,r,i,a){Ud(`enter`,e,t,n,r,i,a)}function Kd(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 qd(e,t,n,r,i,a){Kd(e)||Ud(`leave`,e,t,n,r,i,a)}function Jd(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),qd(e,{style:{opacity:0}},t,n,r)}function Yd(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Jd(e,t,n,r)}):Jd(e,t,n,r)}function Xd(e){Vd(e).oldStyle=e.style}var Zd=n({Arc:()=>Td,BezierCurve:()=>Cd,BoundingRect:()=>q,Circle:()=>Uu,CompoundPath:()=>Ed,Ellipse:()=>Gu,Group:()=>Vu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>jo,IncrementalDisplayable:()=>Bd,Line:()=>yd,LinearGradient:()=>Od,OrientedBoundingRect:()=>Rd,Path:()=>To,Point:()=>Mt,Polygon:()=>md,Polyline:()=>gd,RadialGradient:()=>kd,Rect:()=>zo,Ring:()=>ud,Sector:()=>cd,Text:()=>Wo,WH:()=>ef,XY:()=>$d,applyTransform:()=>gf,calcZ2Range:()=>zf,clipPointsByRect:()=>xf,clipRectByRect:()=>Sf,createIcon:()=>Cf,decomposeTransform:()=>Uf,ensureCopyRect:()=>If,ensureCopyTransform:()=>Lf,expandOrShrinkRect:()=>Of,extendPath:()=>rf,extendShape:()=>tf,getCurrentCanvasPainter:()=>Gf,getShapeClass:()=>of,getTransform:()=>hf,groupTransition:()=>bf,initProps:()=>Gd,isBoundingRectAxisAligned:()=>Pf,isElementRemoved:()=>Kd,lineLineIntersect:()=>Tf,linePolygonIntersect:()=>wf,makeImage:()=>cf,makePath:()=>sf,mergePath:()=>uf,payloadDisableAnimation:()=>Hf,registerShape:()=>af,removeElement:()=>qd,removeElementWithFadeOut:()=>Yd,resizePath:()=>df,retrieveZInfo:()=>Rf,setTooltipConfig:()=>jf,subPixelOptimize:()=>mf,subPixelOptimizeLine:()=>ff,subPixelOptimizeRect:()=>pf,transformDirection:()=>_f,traverseElements:()=>Nf,traverseUpdateZ:()=>Bf,updateProps:()=>Wd}),Qd={},$d=[`x`,`y`],ef=[`width`,`height`];function tf(e){return To.extend(e)}var nf=zu;function rf(e,t){return nf(e,t)}function af(e,t){Qd[e]=t}function of(e){if(Qd.hasOwnProperty(e))return Qd[e]}function sf(e,t,n,r){var i=Ru(e,t);return n&&(r===`center`&&(n=lf(n,i.getBoundingRect())),df(i,n)),i}function cf(e,t,n){var r=new jo({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(lf(t,i))}}});return r}function lf(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 uf=Bu;function df(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function ff(e,t){return Po(e,e,{lineWidth:t}),e}function pf(e,t){return Fo(e,e,t),e}var mf=Io;function hf(e,t){for(var n=st([]);e&&e!==t;)lt(n,e.getLocalTransform(),n),e=e.parent;return n}function gf(e,t,n){return t&&!te(t)&&(t=qn.getLocalTransform(t)),n&&(t=pt([],t)),kt([],e,t)}function _f(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:ls(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:ls(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=gf(a,t,n),ls(a[0])>ls(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function vf(e){return!e.isGroup}function yf(e){return e.shape!=null}function bf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){vf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return yf(e)&&(t.shape=O(e.shape)),t}var a=r(e);t.traverse(function(e){if(vf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Wd(e,r,n,Zc(e).dataIndex)}}})}function xf(e,t){return I(e,function(e){var n=e[0];n=cs(n,t.x),n=ss(n,t.x+t.width);var r=e[1];return r=cs(r,t.y),r=ss(r,t.y+t.height),[n,r]})}function Sf(e,t){var n=cs(e.x,t.x),r=ss(e.x+e.width,t.x+t.width),i=cs(e.y,t.y),a=ss(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 Cf(e,t,n){var r=A({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),M(i,n),new jo(r)):sf(e.replace(`path://`,``),r,n,`center`)}function wf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Tf(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Tf(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Ef(u,d,c,l);if(Df(f))return!1;var p=e-i,m=t-a,h=Ef(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Ef(p,m,u,d)/f;return!(g<0||g>1)}function Ef(e,t,n,r){return e*r-n*t}function Df(e){return e<=1e-6&&e>=-1e-6}function Of(e,t,n,r,i){return t==null||(oe(t)?kf[0]=kf[1]=kf[2]=kf[3]=t:(kf[0]=t[0],kf[1]=t[1],kf[2]=t[2],kf[3]=t[3]),r&&(kf[0]=cs(0,kf[0]),kf[1]=cs(0,kf[1]),kf[2]=cs(0,kf[2]),kf[3]=cs(0,kf[3])),n&&(kf[0]=-kf[0],kf[1]=-kf[1],kf[2]=-kf[2],kf[3]=-kf[3]),Af(e,kf,`x`,`width`,3,1,i&&i[0]||0),Af(e,kf,`y`,`height`,0,2,i&&i[1]||0)),e}var kf=[0,0,0,0];function Af(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=cs(0,ss(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:ls(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function jf(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=U(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=Zc(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:M({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Mf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Nf(e,t){if(e){if(V(e))for(var n=0;n<e.length;n++)Mf(e[n],t);else Mf(e,t)}}function Pf(e){return!e||ls(e[1])<Ff&&ls(e[2])<Ff||ls(e[0])<Ff&&ls(e[3])<Ff}var Ff=1e-5;function If(e,t){return e?q.copy(e,t):t.clone()}function Lf(e,t){return t?ct(e||ot(),t):void 0}function Rf(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function zf(e){var t=-1/0,n=1/0;Mf(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 Bf(e,t,n){Vf(e,t,n,-1/0)}function Vf(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=cs(Vf(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=cs(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 Hf(e){return e.animation={duration:0},e}function Uf(e,t){return t?ct(Wf.transform,t):st(Wf.transform),Wf.decomposeTransform(),Zn(e,Wf),e}var Wf=new qn;Wf.transform=ot();function Gf(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}af(`circle`,Uu),af(`ellipse`,Gu),af(`sector`,cd),af(`ring`,ud),af(`polygon`,md),af(`polyline`,gd),af(`rect`,zo),af(`line`,yd),af(`bezierCurve`,Cd),af(`arc`,Td);var Kf={};function qf(e,t){for(var n=0;n<gl.length;n++){var r=gl[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 Jf(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??=H(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<gl.length;l++){var u=gl[l],d=t[u];c[u]=G(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Yf(e,t,n,r){n||=Kf;for(var i=e instanceof Wo,a=!1,o=0;o<_l.length;o++){var s=t[_l[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Wo,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Jf(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Zf(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Qf(u,n,!1));for(var o=0;o<gl.length;o++){var p=gl[o],s=t[p];if(s){var m=c.ensureState(p),h=!!G(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Zf(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Qf(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&&(op(c).setLabelText=function(e){var r=Jf(n,t,e);qf(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Xf(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<gl.length;r++){var i=gl[r];n[i]=e.getModel([i,t])}return n}function Zf(e,t,n,r,i){var a={};return $f(a,e,n,r,i),t&&A(a,t),a}function Qf(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=G(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 $f(e,t,n,r,i){n||=Kf;var a=t.ecModel,o=a&&a.option.textStyle,s=ep(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=G(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);ip(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=lp.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=ge(_),h.__marginType=lp.textMargin)}ip(e,t,o,null,null,n,r,i,!0,!1)}function ep(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Kf).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 tp=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],np=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],rp=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function ip(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Kf;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=G(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=G(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=G(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=G(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;_<tp.length;_++){var v=tp[_],y=i!==!1&&r?me(t.getShallow(v),r.getShallow(v),n[v]):G(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<np.length;_++){var v=np[_],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;_<rp.length;_++){var v=rp[_],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 ap(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 op=bc();function sp(e,t,n,r){if(e){var i=op(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 cp(e,t,n,r,i){var a=op(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=G(a.interpolatedValue,a.prevValue),c=a.value;function l(r){var l=Mc(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,qf(e,Jf({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?Gd:Wd)(e,{percent:1},r,t,null,l)}var lp={minMargin:1,textMargin:2},up=[`textStyle`,`color`],dp=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],fp=new Wo,pp=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(up):null)},e.prototype.getFont=function(){return ap({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<dp.length;n++)t[dp[n]]=this.getShallow(dp[n]);return fp.useStyle(t),fp.update(),fp.getBoundingRect()},e}(),mp=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],hp=Ye(mp),gp=function(){function e(){}return e.prototype.getLineStyle=function(e){return hp(this,e)},e}(),_p=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],vp=Ye(_p),yp=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return vp(this,e,t)},e}(),bp=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){k(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(O(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(bp),Ge(bp),P(bp,gp),P(bp,yp),P(bp,Ze),P(bp,pp);function xp(e){return e==null?0:e.length||1}function Sp(e){return e}var Cp=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Sp,this._newKeyGetter=r||Sp,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=xp(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=xp(c),d=xp(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=xp(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=xp(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),wp={Must:1,Might:2,Not:3},Tp=bc();function Ep(e){Tp(e).datasetMap=K()}function Dp(e,t,n){var r={},i=kp(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Tp(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),F(e,function(t,n){var i=W(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 Op(e,t,n){var r={};if(!kp(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&F(a,function(e,t){(W(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=Mp(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===wp.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===wp.Not)&&(e.n=c),f(e)&&s[e.n]!==wp.Not)return e;d||(u===wp.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 kp(e){if(!e.get(`data`,!0))return Ec(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},wc).models[0]}function Ap(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Ec(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},wc).models}function jp(e,t){return Mp(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Mp(e,t,n,r,i,a){var o,s=5;if(ce(e))return wp.Not;var c,l;if(r){var u=r[a];W(u)?(c=u.name,l=u.type):U(u)&&(c=u)}if(l!=null)return l===`ordinal`?wp.Must:wp.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 wp.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 wp.Not;var f=_[c];if(!f||ce(f))return wp.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=rc(g);if(!V(y))return wp.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=U(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?wp.Might:wp.Not;if(t&&e!==`-`)return wp.Must}return wp.Not}var Np=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&&jp(this,n)===wp.Must&&(r.type=`ordinal`)}}return e}();function Pp(e){return e instanceof Np}function Fp(e,t,n){n||=Rp(e);var r=t.seriesLayoutBy,i=zp(e,n,r,t.sourceHeader,t.dimensions);return new Np({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:O(t)})}function Ip(e){return new Np({data:e,sourceFormat:ce(e)?al:tl})}function Lp(e){return new Np({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:O(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Rp(e){var t=ol;if(ce(e))t=al;else if(V(e)){e.length===0&&(t=nl);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(V(i)||ce(i)){t=nl;break}if(W(i)){t=rl;break}}}}else if(W(e)){for(var a in e)if(ke(e,a)&&te(e[a])){t=il;break}}return t}function zp(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Vp(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Hp(function(e){e!=null&&e!==`-`&&(U(e)?o??=1:o=0)},n,s,10):o=oe(r)?r:+!!r,!i&&o===1&&(i=[],Hp(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||=Bp(e);else if(t===`keyedColumns`)i||(i=[],F(e,function(e,t){i.push(t)}));else if(t===`original`){var c=rc(e[0]);a=V(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Vp(i),dimensionsDetectedCount:a}}function Bp(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return R(n)}function Vp(e){if(e){var t=K();return I(e,function(e,n){e=W(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 Hp(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 Up(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Wp,Gp,Kp,qp,Jp,Yp,Xp=function(){function e(e,t){var n=Pp(e)?e:Ip(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),Yp(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;Yp=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=Jp[sm(o,s)];A(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=z(em(o,s),null,i,c,l),e.count=z(rm(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};Jp=(e={},e[nl+`_`+sl]={pure:!0,appendData:i},e[nl+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[rl]={pure:!0,appendData:i},e[il]={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[tl]={appendData:i},e[al]={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}(),Zp=function(e){V(e)||Ys(`series.data or dataset.source must be an array.`)};Wp={},Wp[nl+`_`+sl]=Zp,Wp[nl+`_row`]=Zp,Wp[rl]=Zp,Wp[il]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Ys(`dimension name must not be null/undefined.`)},Wp[tl]=Zp;var Qp=function(e,t,n,r){return e[r]},$p=(Gp={},Gp[nl+`_`+sl]=function(e,t,n,r){return e[r+t]},Gp[nl+`_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},Gp[rl]=Qp,Gp[il]=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},Gp[tl]=Qp,Gp);function em(e,t){return $p[sm(e,t)]}var tm=function(e,t,n){return e.length},nm=(Kp={},Kp[nl+`_`+sl]=function(e,t,n){return Math.max(0,e.length-t)},Kp[nl+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Kp[rl]=tm,Kp[il]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Kp[tl]=tm,Kp);function rm(e,t){return nm[sm(e,t)]}var im=function(e,t,n){return e[t]},am=(qp={},qp[nl]=im,qp[rl]=function(e,t,n){return e[n]},qp[il]=im,qp[tl]=function(e,t,n){var r=rc(e);return r instanceof Array?r[t]:r},qp[al]=im,qp);function om(e){return am[e]}function sm(e,t){return e===`arrayRows`?e+`_`+t:e}function cm(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 om(a)(r,o,s)}var c=r;return a===`original`&&(c=rc(r)),c}}}var lm=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 um(e,t){var n={},r=n.encode={},i=K(),a=[],o=[],s={};F(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;dm(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),pm(n.type)&&(a[0]=t),dm(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}el.each(function(e,t){var i=dm(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 lm(s,t),n}function dm(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function fm(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function pm(e){return e!==`ordinal`&&e!==`time`}var mm=function(){function e(e){this.otherDims={},e!=null&&A(this,e)}return e}();function hm(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!oe(e)&&e!=null&&e!==`-`&&(e=+Ps(e)),e==null||e===``?NaN:Number(e))}K({number:function(e){return parseFloat(e)},time:function(e){return+Ps(e)},trim:function(e){return U(e)?ve(e):e}});var gm={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)||Xs(``),this._opFn=gm[e],this._rvalFloat=zs(t)}return e.prototype.evaluate=function(e){return oe(e)?this._opFn(e,this._rvalFloat):this._opFn(zs(e),this._rvalFloat)},e})();var _m=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:zs(e),r=oe(t)?t:zs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=U(e),s=U(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=zs(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=zs(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function vm(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 ym(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var bm=typeof Uint32Array>`u`?Array:Uint32Array,xm=typeof Uint16Array>`u`?Array:Uint16Array,Sm=typeof Int32Array>`u`?Array:Int32Array,Cm=typeof Float64Array>`u`?Array:Float64Array,wm={float:Cm,int:Sm,ordinal:Array,number:Array,time:Cm},Tm;function Em(e){return e>65535?bm:xm}function Dm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Om(e,t,n,r,i){var a=wm[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 km=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=K()}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=Tm[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Up(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 wm[t||`float`](this._rawCount),this._rawExtent[i]=Nc(),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]=Nc());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];Om(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=Tm.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]=Nc()),Om(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)}),ws(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=Em(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(Em(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(Em(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]]=Nc();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(Em(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(Em(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]=Nc(),d=new(Em(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=Nc();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=vm(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||ym(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]?Dm(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=O(this._extent),e._rawExtent=O(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 hm(e[r],this._dimensions[r])}Tm={arrayRows:e,objectRows:function(e,t,n,r){return hm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return hm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Am=bc(),jm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Mm=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||=Fm(this.source))},e.prototype.getSourceDimensionIndex=function(e){return G(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=Up(this.source),n=!Im(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+=jm[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 Nm(e){return e instanceof Mm}function Pm(e){for(var t=K(),n=0;n<(e||[]).length;n++){var r=e[n],i=W(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Fm(e){var t=Am(e);return t.dimNameMap||=Pm(e.dimensionsDefine)}function Im(e){return e>30}var Lm=W,Rm=I,zm=typeof Int32Array>`u`?Array:Int32Array,Bm=`e\0\0`,Vm=-1,Hm=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Um=[`_approximateExtent`],Wm,Gm,Km,qm,Jm,Ym,Xm,Zm=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;Nm(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=U(u)?new mm({name:u}):u instanceof mm?u:new mm(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=K();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 km&&(i=e),!i){var a=this.dimensions,o=Pp(e)||te(e)?new Xp(e,a.length):e;i=new km;var s=Rm(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=um(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&&Xm(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&&ic(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=mc(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=mc(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Xm(this,o);Wm(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){Lm(e)?A(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=Km(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 Gm(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 V(e)?r.getValues(Rm(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)?Vm:r},e.prototype.each=function(e,t,n){"use strict";H(e)&&(n=t,t=e,e=[]);var r=n||this,i=Rm(qm(e),this._getStoreDimIndex,this);this._store.each(i,r?z(t,r):t)},e.prototype.filterSelf=function(e,t,n){"use strict";H(e)&&(n=t,t=e,e=[]);var r=n||this,i=Rm(qm(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?z(t,r):t),this},e.prototype.selectRange=function(e){"use strict";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){"use strict";H(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){"use strict";var i=n||r||this,a=Rm(qm(e),this._getStoreDimIndex,this),o=Ym(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=Rm(qm(e),this._getStoreDimIndex,this);this._store.modify(a,i?z(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Ym(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Ym(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Ym(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 bp(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Cp(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Gm(e,t)},function(e){return Gm(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||{},Lm(e)?A(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),V(i)?i=i.slice():Lm(i)&&(i=A({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Lm(t)?A(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Lm(e)?A(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?A(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Qc(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:Rm(this.dimensions,this._getDimInfo,this),this.hostModel),Jm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];H(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(){Wm=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 zm(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Vm;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Km=function(e,t,n){return mc(e._getCategory(t,n),null)},Gm=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Km(e,e._idDimIdx,t)),n??=Bm+t,n},qm=function(e){return V(e)||(e=e==null?[]:[e]),e},Ym=function(t){var n=new e(t._schema?t._schema:Rm(t.dimensions,t._getDimInfo,t),t.hostModel);return Jm(n,t),n},Jm=function(e,t){F(Hm.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,F(Um,function(n){e[n]=O(t[n])}),e._calculationInfo=A({},t._calculationInfo)},Xm=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=Km(e,i,t)),s==null&&a!=null&&(r[t]=s=Km(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 Qm(e,t){Pp(e)||(e=Ip(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=K(),a=[],o=$m(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Im(o),c=r===e.dimensionsDefine,l=c?Fm(e):Pm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=K(u),f=new Sm(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=W(n)?n:{name:n},o=new mm,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=ec(e).slice();if(n.length===1&&!U(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);F(n,function(e,n){var i=U(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(U(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=A({},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=ec(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(M(o,i),t,a),o.name==null&&n){var s=n[a];!W(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&M(o.otherDims,r)})}});function g(e,t,n){el.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=eh(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(jp(e,S)===wp.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Wc(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Mm({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function $m(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return F(t,function(e){var t;W(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function eh(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 th={},nh={},rh=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(th,!0),this._normalMasterList=n(nh,!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`?th[e]=t:nh[e]=t},e.get=function(e){return nh[e]||th[e]},e}();function ih(e){return!!th[e]}function ah(e){oh.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var oh=K();function sh(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=oh.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function ch(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&&!ih(n)&&(i=0))}return{coordSysType:n,kind:i}}function lh(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=ch(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 uh=function(e,t){var n=t.getReferringComponents(e,wc).models[0];return n&&n.coordinateSystem},dh=function(){function e(e){this.coordSysDims=[],this.axisMap=K(),this.categoryAxisMap=K(),this.coordSysName=e}return e}();function fh(e){var t=e.get(`coordinateSystem`),n=new dh(t),r=ph[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ph={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,wc).models[0],a=e.getReferringComponents(`yAxis`,wc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),mh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),mh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,wc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),mh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,wc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),mh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),mh(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),mh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,wc).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 mh(e){return e.get(`type`)===`category`}function hh(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;gh(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){U(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 gh(e){return!Nm(e.schema)}function _h(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function vh(e,t){return _h(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function yh(e,t){var n=e.get(`coordinateSystem`),r=rh.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=fm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function bh(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 xh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Ip(e)):(i=r.getSource(),a=i.sourceFormat===tl);var o=fh(t),s=yh(t,o),c=n.useEncodeDefaulter,l=H(c)?c:c?B(Dp,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Qm(i,u),f=bh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=hh(t,{schema:d,store:p}),h=new Zm(d,t);h.setCalculationInfo(m);var g=f!=null&&Sh(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 Sh(e){if(e.sourceFormat===`original`)return!V(rc(Ch(e.data||[])))}function Ch(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var wh=Math.round(Math.random()*10);function Th(e){return[e||``,wh++].join(`_`)}function Eh(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 Dh(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){N(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);N(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){N(t,e)>=0&&n.push(e)}),n}}function Oh(e,t){return k(k({},e,!0),t,!0)}var kh=Math.log(2);function Ah(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)/kh);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]*Ah(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function jh(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=Ah(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)*Ah(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 Mh=`___zrEVENTSAVED`,Nh=[];function Ph(e,t,n,r,i){return Ih(Nh,t,r,i,!0)&&Ih(e,n,Nh[0],Nh[1])}function Fh(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Mh];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Mh])}}function Ih(e,t,n,r,i){if(t.getBoundingClientRect&&Ne.domSupported&&!zh(t)){var a=t[Mh]||(t[Mh]={}),o=Rh(Lh(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Lh(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 Rh(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?jh(s,o):jh(o,s))}function zh(e){return e.nodeName.toUpperCase()===`CANVAS`}var Bh=/([&<>"'])/g,Vh={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Hh(e){return e==null?``:(e+``).replace(Bh,function(e,t){return Vh[t]})}var Uh={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:`. `}}}},Wh={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:``}}}},Gh=`ZH`,Kh=`EN`,qh=Kh,Jh={},Yh={},Xh=Ne.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||qh).toUpperCase().indexOf(Gh)>-1?Gh:qh}():qh;function Zh(e,t){e=e.toUpperCase(),Yh[e]=new bp(t),Jh[e]=t}function Qh(e){if(U(e)){var t=Jh[e.toUpperCase()]||{};return e===Gh||e===Kh?O(t):k(O(t),O(Jh[qh]),!1)}return k(O(e),O(Jh[qh]),!1)}function $h(e){return Yh[e]}function eg(){return Yh[qh]}Zh(Kh,Uh),Zh(Gh,Wh);var tg=null;function ng(e){tg||=e}function rg(){return tg}function ig(e,t){var n=rg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function ag(e){var t=e.brk;return t?t.breaks:[]}function og(e){var t=e.brk;return t?t.hasBreaks():!1}var sg=1e3,cg=sg*60,lg=cg*60,ug=lg*24,dg=ug*365,fg={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})/},pg={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},mg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,hg=`{yyyy}-{MM}-{dd}`,gg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:hg,hour:hg+` `+pg.hour,minute:hg+` `+pg.minute,second:hg+` `+pg.second,millisecond:mg},_g=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],vg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function yg(e){return!U(e)&&!H(e)?bg(e):e}function bg(e){e||={};var t={},n=!0;return F(_g,function(t){n&&=e[t]==null}),F(_g,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=_g[s],l=W(a)&&!V(a)?a[c]:a,u=void 0;V(l)?(u=l.slice(),o=u[0]||``):U(l)?(o=l,u=[o]):(o==null?o=pg[r]:fg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function xg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Sg(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 Cg(e){return e===Sg(e)}function wg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Tg(e,t,n,r){var i=Ps(e),a=i[kg(n)](),o=i[Ag(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[jg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Mg(n)](),d=(u-1)%12+1,f=i[Ng(n)](),p=i[Pg(n)](),m=i[Fg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof bp?r:$h(r||Xh)||eg()).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,xg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,xg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,xg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,xg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,xg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,xg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,xg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,xg(m,3)).replace(/{S}/g,m+``)}function Eg(e,t,n,r,i){var a=null;if(U(n))a=n;else if(H(n)){var o={time:e.time,level:e.time?e.time.level:0},s=rg();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=Dg(e.value,i);a=n[u][u][0]}}return Tg(new Date(e.value),a,i,r)}function Dg(e,t){var n=Ps(e),r=n[Ag(t)]()+1,i=n[jg(t)](),a=n[Mg(t)](),o=n[Ng(t)](),s=n[Pg(t)](),c=n[Fg(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 Og(e,t,n){switch(t){case`year`:e[Lg(n)](0);case`month`:e[Rg(n)](1);case`day`:e[zg(n)](0);case`hour`:e[Bg(n)](0);case`minute`:e[Vg(n)](0);case`second`:e[Hg(n)](0)}return e}function kg(e){return e?`getUTCFullYear`:`getFullYear`}function Ag(e){return e?`getUTCMonth`:`getMonth`}function jg(e){return e?`getUTCDate`:`getDate`}function Mg(e){return e?`getUTCHours`:`getHours`}function Ng(e){return e?`getUTCMinutes`:`getMinutes`}function Pg(e){return e?`getUTCSeconds`:`getSeconds`}function Fg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Ig(e){return e?`setUTCFullYear`:`setFullYear`}function Lg(e){return e?`setUTCMonth`:`setMonth`}function Rg(e){return e?`setUTCDate`:`setDate`}function zg(e){return e?`setUTCHours`:`setHours`}function Bg(e){return e?`setUTCMinutes`:`setMinutes`}function Vg(e){return e?`setUTCSeconds`:`setSeconds`}function Hg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Ug(e){if(!Bs(e))return U(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Wg(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 Gg=ge;function Kg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ve(e)?e:`-`}function a(e){return Ws(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Ps(e):e;if(!isNaN(+c))return Tg(c,r,n);if(s)return`-`}if(t===`ordinal`)return ae(e)?i(e):oe(e)&&a(e)?e+``:`-`;var l=zs(e);return a(l)?Ug(l):ae(e)?i(e):typeof e==`boolean`?e+``:`-`}var qg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Jg=function(e,t){return`{`+e+(t??``)+`}`};function Yg(e,t,n){V(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=qg[a];e=e.replace(Jg(o),Jg(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(Jg(qg[c],s),n?Hh(l):l)}return e}function Xg(e,t,n){return F(t,function(t,r){e=e.replace(`{`+r+`}`,n?Hh(t):t)}),e}function Zg(e,t){var n=U(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:`+Hh(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Hh(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 Qg(e,t){return t||=`transparent`,U(e)?e:W(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function $g(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var e_=F,t_=[`left`,`right`,`top`,`bottom`,`width`,`height`],n_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function r_(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 i_=r_;B(r_,`vertical`),B(r_,`horizontal`);function a_(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 o_(e,t){var n=u_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===l_.point)a=n.refPoint,i=c_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=V(o)?o:[o,o];i=c_(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 s_(e,t){var n=o_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);V(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 c_(e,t,n){n=Gg(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 l_={rect:1,point:2};function u_(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=sh(e),l=c.coord,u=c.from;if(o.dataToLayout){a=l_.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=l_.point,s=u,i=o.dataToPoint(l))}return a??=l_.rect,a===l_.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 d_(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=c_(M({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 f_(e,t){return e[n_[t][0]]!=null||e[n_[t][1]]!=null&&e[n_[t][2]]!=null}function p_(e){var t=e.layoutMode||e.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function m_(e,t,n){var r=n&&n.ignoreSize;!V(r)&&(r=[r,r]);var i=o(n_[0],0),a=o(n_[1],1);c(n_[0],e,i),c(n_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(e_(n,function(t){c[t]=e[t]}),e_(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){e_(e,function(e){t[e]=n[e]})}}function h_(e){return g_({},e)}function g_(e,t){return t&&e&&e_(t_,function(n){ke(t,n)&&(e[n]=t[n])}),e}var __=bc(),v_=function(e){a(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Th(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=p_(this),r=n?h_(e):{};k(e,t.getTheme().get(this.mainType)),k(e,this.getDefaultOption()),n&&m_(e,r,n)},t.prototype.mergeOption=function(e,t){k(this.option,e,!0);var n=p_(this);n&&m_(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=__(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=k(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Ec(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return a_(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}(bp);Ue(v_,bp),Je(v_),Eh(v_),Dh(v_,y_);function y_(e){var t=[];return F(v_.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=I(t,function(e){return Re(e).main}),e!==`dataset`&&N(t,`dataset`)<=0&&t.unshift(`dataset`),t}var b_=bc(),x_=bc(),S_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=ec(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return T_(this,b_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){E_(this,b_)},e}();function C_(e,t,n,r){return T_(e,x_,ec(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function w_(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 T_(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:w_(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 E_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var D_=/\{@(.+?)\}/g,O_=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&&V(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),H(i))return s.status=t,s.dimensionIndex=r,i(s);if(U(i))return Yg(i,s).replace(D_,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=cm(o,e,i);if(a&&V(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return cm(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function k_(e){var t,n;return W(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function A_(e){return new j_(e)}var j_=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(V(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){M_.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:M_.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),V(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}(),M_=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}}(),N_=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 hm(e,t)},e}();function P_(e,t){var n=new N_,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&Xs(``);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)&&Xs(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=em(i,sl);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=z(F_,null,e)),n.cloneRawData=z(I_,null,e),n.count=z(rm(i,sl),null,r,a,o);var d=om(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(L_,null,o,s),n.cloneAllDimensionInfo=z(R_,null,o),n}function F_(e){var t=e.sourceFormat;return U_(t)||Xs(``),e.data}function I_(e){var t=e.sourceFormat,n=e.data;if(U_(t)||Xs(``),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(A({},n[i]));return r}}function L_(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 R_(e){return O(e)}var z_=K();function B_(e){e=O(e);var t=e.type,n=``;t||Xs(n);var r=t.split(`:`);r.length!==2&&Xs(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,z_.set(t,e)}function V_(e,t,n){var r=ec(e),i=r.length;i||Xs(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=H_(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function H_(e,t,n,r){var i=``;t.length||Xs(i),W(e)||Xs(i);var a=e.type,o=z_.get(a);o||Xs(i);var s=I(t,function(e){return P_(e,o)});return I(ec(o.transform({upstream:s[0],upstreamList:s,config:O(e.config)})),function(e,n){var r=``;W(e)||Xs(r),e.data||Xs(r),U_(Rp(e.data))||Xs(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:sl,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:sl,sourceHeader:0,dimensions:e.dimensions};return Fp(e.data,i,null)})}function U_(e){return e===`arrayRows`||e===`objectRows`}var W_=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(G_(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)?al:tl,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=G(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=G(u.sourceHeader,d.sourceHeader),m=G(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Fp(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=[Fp(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&&K_(``);var i,a=[],o=[];return F(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&K_(``),a.push(t),o.push(e._getVersionSign())}),n?i=V_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Lp(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];G_(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new km,o.initData(new Xp(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(G_(e)){var t=kp(e);return t?[t.getSourceManager()]:[]}return I(Ap(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(G_(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 G_(e){return e.mainType===`series`}function K_(e){throw Error(e)}var Y={color:{},darkColor:{},size:{}},q_=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 J_ in A(q_,{primary:q_.neutral80,secondary:q_.neutral70,tertiary:q_.neutral60,quaternary:q_.neutral50,disabled:q_.neutral20,border:q_.neutral30,borderTint:q_.neutral20,borderShade:q_.neutral40,background:q_.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:q_.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:q_.neutral70,axisLineTint:q_.neutral40,axisTick:q_.neutral70,axisTickMinor:q_.neutral60,axisLabel:q_.neutral70,axisSplitLine:q_.neutral15,axisMinorSplitLine:q_.neutral05}),q_)if(q_.hasOwnProperty(J_)){var Y_=q_[J_];J_===`theme`?Y.darkColor.theme=q_.theme.slice():J_===`highlight`?Y.darkColor.highlight=`rgba(255,231,130,0.4)`:J_.indexOf(`accent`)===0?Y.darkColor[J_]=Kr(Y_,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Y.darkColor[J_]=Kr(Y_,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 X_=`line-height:1`;function Z_(e){var t=e.lineHeight;return t==null?X_:`line-height:`+Hh(t+``)+`px`}function Q_(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:`+Hh(r+``)+`px;color:`+Hh(n)+`;font-weight:`+Hh(i+``),valueStyle:`font-size:`+Hh(o+``)+`px;color:`+Hh(a)+`;font-weight:`+Hh(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var $_=[0,10,20,30],ev=[``,`
|
|
9
9
|
`,`
|
|
10
10
|
|
|
11
11
|
`,`
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
`];function nv(e,t){return t.type=e,t}function rv(e){return e.type===`section`}function iv(e){return rv(e)?ov:sv}function av(e){if(rv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return F(e.blocks,function(e){var n=av(e);n>=t&&(t=n+ +(r&&(!n||rv(e)&&!e.noHeader)))}),t}return 0}function ov(e,t,n,r){var i=t.noHeader,a=lv(av(t)),o=[],s=t.blocks||[];ve(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Ae(l,c)){var u=new vm(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=iv(n)(s?A(A({},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):uv(r,o.join(``),i?n:a.html);if(i)return d;var f=qg(t.header,`ordinal`,e.useUTC),p=$_(r,e.renderMode).nameStyle,m=Q_(r);return e.renderMode===`richText`?pv(e,f,p)+a.richText+d:uv(r,`<div style="`+p+`;`+m+`;">`+Uh(f)+`</div>`+d,n)}function sv(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 qg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||J.color.secondary,i),f=a?``:qg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=$_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:pv(e,f,v))+(o?``:mv(e,m,h,g,y)):uv(r,(s?``:d)+(a?``:dv(f,!s,v))+(o?``:fv(m,h,g,y)),n)}}function cv(e,t,n,r,i,a){if(e)return iv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function lv(e){return{html:ev[e],richText:tv[e]}}function uv(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Q_(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function dv(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Uh(e)+`</span>`}function fv(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 Uh(e)}).join(` `)+`</span>`}function pv(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function mv(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 hv(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return $g(n)}function gv(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var _v=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Hs()}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=Qg({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 A(n,e)}):A(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function vv(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=hv(t,n),u,d,f,p;if(o>1||c&&!o){var m=yv(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=lm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=gc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return nv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[nv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ye(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function yv(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?F(r,function(e){u(lm(a,n,e),e)}):F(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(nv(`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 bv=xc();function xv(e,t){return e.getName(t)||e.getId(t)}var Sv=function(e){a(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=j_({count:Tv,reset:Ev}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(bv(this).sourceManager=new G_(this)).prepareSource();var r=this.getInitialData(e,n);Ov(r,this),this.dataTask.context.data=r,bv(this).dataBeforeProcessed=r,Cv(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=m_(this),r=n?g_(e):{},i=this.subType;y_.hasClass(i)&&(i+=`Series`),k(e,t.getTheme().get(this.subType)),k(e,this.getDefaultOption()),nc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&h_(e,r,n)},t.prototype.mergeOption=function(e,t){e=k(this.option,e,!0),this.fillDataTextStyle(e.data);var n=m_(this);n&&h_(this.option,e,n);var r=bv(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Ov(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,bv(this).dataBeforeProcessed=i,Cv(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&&nc(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=Av(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return bv(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=Av(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}bv(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return G(e)},t.prototype.getSourceManager=function(){return bv(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return bv(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 vv({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Pe.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=C_.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=xv(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=L(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[xv(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=xv(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=xv(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 y_.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}(y_);P(Sv,k_),P(Sv,C_),We(Sv,y_);function Cv(e){var t=e.name;gc(e)||(e.name=wv(e)||t)}function wv(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 Tv(e){return e.model.getRawData().count()}function Ev(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Dv}function Dv(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Ov(e,t){F(De(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,z(kv,t))})}function kv(e,t){var n=Av(e);return n&&n.setOutputEnd((t||this).count()),t}function Av(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 jv=Eo.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()}}),Mv={line:bd,rect:Bo,roundRect:Bo,square:Bo,circle:Wu,diamond:Eo.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:Eo.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:Eo.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:jv},Nv={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}},Pv={};F(Mv,function(e,t){Pv[t]=new e});var Fv=Eo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=vn(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=Pv[r];i||=(r=`rect`,Pv[r]),Nv[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Iv(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||J.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Lv(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?lf(e.slice(8),new K(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?cf(e.slice(7),{},new K(t,n,r,i),o?`center`:`cover`):new Fv({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Iv,a&&c.setColor(a),c}function Rv(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function zv(e,t){if(e!=null)return B(e)||(e=[e,e]),[q(e[0],t[0])||0,q(W(e[1],e[0]),t[1])||0]}var Bv=function(e){a(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 Sh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Hu,n=Lv(`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=Lv(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=J.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}(Sv);function Vv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=lm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(lm(e,t,n[o]));return a.join(` `)}}function Hv(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 Uv=function(e){a(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=Lv(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=Wv,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(){Wl(this.childAt(0))},t.prototype.downplay=function(){Gl(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):Gd(f,p,o,n),Zd(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,Kd(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=Zf(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=zv(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 Mo){var S=a.style;a.useStyle(A({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(A({},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;Xf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Vv(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),lu(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=Qc(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Rv(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Hu);function Wv(e,t){this.parent.drift(e,t)}function Gv(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 Kv(e){return e!=null&&!U(e)&&(e={isIgnore:e}),e||{}}function qv(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:Zf(t),cursorStyle:t.get(`cursor`)}}function Jv(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 Yv=function(){function e(e){this.group=new Hu,this._SymbolCtor=e||Uv}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Kv(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=qv(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);Gv(e,i,r,t)&&Jv(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Gv(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):Gd(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);Gv(t,s,i,e)?(o||=Jv(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=qv(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=Kv(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(Gv(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){Pf(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 Xv(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Zv(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 vh(t,d[0])&&(f=!0,d[0]=p),vh(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 Zv(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 Qv(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 $v(e,t){return!isFinite(e)||!isFinite(t)}var ey=typeof Float32Array<`u`?Float32Array:void 0,ty=typeof Float64Array<`u`?Float64Array:void 0;function ny(e){return ry({ctor:ey},e).arr}function ry(e,t){var n=e.arr,r=e.ctor;if(t>js&&(t=js),!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 iy(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 ay(e,t,n,r,i,a,o,s){for(var c=iy(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Xv(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=Qv(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,N=ny(M),ee=ny(M),P=ny(M),te=ny(M),F=[],y=0;y<m.length;y++){var I=m[y],ne=y*2,re=I*2;N[ne]=l[re],N[ne+1]=l[re+1],ee[ne]=u[re],ee[ne+1]=u[re+1],P[ne]=d[re],P[ne+1]=d[re+1],te[ne]=f[re],te[ne+1]=f[re+1],F[y]=p[I]}return{current:N,next:ee,stackedOnCurrent:P,stackedOnNext:te,status:F}}var oy=Math.min,sy=Math.max;function cy(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($v(_,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(;$v(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||$v(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,ee=void 0,P=void 0;if(s===`x`){ee=Math.abs(A),P=Math.abs(j);var te=E>0?1:-1;p=_-te*ee*o,m=v,O=_+te*P*o,k=v}else if(s===`y`){ee=Math.abs(M),P=Math.abs(N);var F=D>0?1:-1;p=_,m=v-F*ee*o,O=_,k=v+F*P*o}else ee=Math.sqrt(A*A+M*M),P=Math.sqrt(j*j+N*N),T=P/(P+ee),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=oy(O,sy(S,_)),k=oy(k,sy(C,v)),O=sy(O,oy(S,_)),k=sy(k,oy(C,v)),E=O-_,D=k-v,p=_-E*ee/P,m=v-D*ee/P,p=oy(p,sy(l,_)),m=oy(m,sy(u,v)),p=sy(p,oy(l,_)),m=sy(m,oy(u,v)),E=_-p,D=v-m,O=_+E*P/ee,k=v+D*P/ee}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var ly=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),uy=function(e){a(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:J.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new ly},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&$v(n[i*2-2],n[i*2-1]);i--);for(;r<i&&$v(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=cy(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=eo.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?pr(i,u,f,m,e,s):pr(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?dr(a,d,p,h,b):dr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Eo),dy=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ly),fy=function(e){a(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 dy},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&&$v(n[a*2-2],n[a*2-1]);a--);for(;i<a&&$v(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=cy(e,n,i,a,a,1,t.smooth,o,t.connectNulls);cy(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(Eo);function py(){var e=xc();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 my=xc(),hy=py(),gy=function(){function e(){this.group=new Hu,this.uid=Eh(`viewChart`),this.renderTask=j_({plan:yy,reset:by}),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&&vy(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&vy(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){Pf(this.group,e)},e.markUpdateMethod=function(e,t){my(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function _y(e,t,n){e&&hu(e)&&(t===`emphasis`?Wl:Gl)(e,n)}function vy(e,t,n){var r=bc(e,t),i=t&&t.highlightKey!=null?gu(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){_y(e,n,i)}):F(tc(r),function(t){_y(e.getItemGraphicEl(t),n,i)})}He(gy,[`dispose`]),Ye(gy);function yy(e){return hy(e.model)}function by(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&my(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),xy[c]}var xy={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 Sy(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 Bo({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;Kd(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function Cy(e,t,n){var r=e.getArea(),i=ws(r.r0,1),a=ws(r.r,1),o=new ld({shape:{cx:ws(e.cx,1),cy:ws(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,Kd(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function wy(e,t,n,r,i){return e?e.type===`polar`?Cy(e,t,n):e.type===`cartesian2d`?Sy(e,t,n,r,i):null:null}function Ty(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function Ey(e,t){return e.type===t}function Dy(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}function Oy(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Ae(e,`text`)))}function ky(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},Ae(r,`text`)&&(o.text=r.text),Ae(r,`rich`)&&(o.rich=r.rich),Ae(r,`textFill`)&&(o.fill=r.textFill),Ae(r,`textStroke`)&&(o.stroke=r.textStroke),Ae(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),Ae(r,`fontSize`)&&(o.fontSize=r.fontSize),Ae(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),Ae(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=Ae(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),Ae(r,`textPosition`)&&(i.position=r.textPosition),Ae(r,`textOffset`)&&(i.offset=r.textOffset),Ae(r,`textRotation`)&&(i.rotation=r.textRotation),Ae(r,`textDistance`)&&(i.distance=r.textDistance)}return Ay(o,e),F(o.rich,function(e){Ay(e,e)}),{textConfig:i,textContent:a}}function Ay(e,t){t&&(t.font=t.textFont||t.font,Ae(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),Ae(t,`textAlign`)&&(e.align=t.textAlign),Ae(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),Ae(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),Ae(t,`textWidth`)&&(e.width=t.textWidth),Ae(t,`textHeight`)&&(e.height=t.textHeight),Ae(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),Ae(t,`textPadding`)&&(e.padding=t.textPadding),Ae(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),Ae(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),Ae(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),Ae(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),Ae(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),Ae(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Ae(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}var jy=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Ye(jy);var My=0,Ny=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++My,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&I(r,Py);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 Py(e){return U(e)&&e.value!=null?e.value:e+``}var Fy=L({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 Iy(e,t,n){var r;e||={};var i=ig();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(F(Fy,function(t){a[t]&&(e[t]=R(a[t],a))}),r=a)}return r??Uy(e,n),{brk:r,mapper:e}}function Ly(e,t){F(Fy,function(n){e[n]=t[n]})}function Ry(e,t){e.freeze=je}function zy(e){return e.getExtentUnsafe(0,2)}function By(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Vy(e){var t=By(e,3);return t[1]-t[0]}function Hy(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Uy(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Pc(),A(n,Wy),n}var Wy={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=By(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){Gy(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Gy(r,e,t,n)},freeze:function(){}};function Gy(e,t,n,r){Bc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Ky(e){return qy(e)||Yy(e)}function qy(e){return e.type===`interval`}function Jy(e){return e.type===`time`}function Yy(e){return e.type===`log`}function Xy(e){return e.type===`ordinal`}function Zy(e){var t=Ls(e),n=ms(10,t),r=ds(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,ws(r*n,-t)}function Qy(e){return Es(e)+2}function $y(e,t){return hs(e)/hs(t)}function eb(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 ms(t,e)}function tb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=us(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return zc(r[0])&&zc(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function nb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function rb(e,t){return e||=t,ds(ls(e,1))}function ib(e,t,n){var r=zy(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 ab=function(e){a(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Ly(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Ny({}),B(i)&&(i=new Ny({categories:I(i,function(e){return U(e)?e.value:e})})),r._ordinalMeta=i;var a=Iy(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Ry(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:H(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=ds(e),e},t.prototype.getTicks=function(){var e=[];return ib(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=cs(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=zy(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(ds(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}(jy);jy.registerClass(ab);function ob(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=Qy(f);u<t-1;){var m=ws(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=ig();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var sb=function(e){a(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Iy(r,ag(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 O(this._cfg)},t.prototype.setConfig=function(e){var t=zy(this);this._cfg=e=O(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Qy(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=zy(this),i=t.niceExtent,a=t.intervalPrecision,o=ig(),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?ws(i[0]-n,a):r[0]});for(var d=function(e,t){return ds((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=cs(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=ws(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=ws(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?ws(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 ob(this,e,og(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Es(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Wg(ws(e.value,n,!0))},t.type=`interval`,t}(jy);jy.registerClass(sb);var cb=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},lb=function(e){a(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=Iy(r,ag(r,n),null).brk,r}return t.prototype.getLabel=function(e){return Eg(e.value,_g[Tg(Cg(this._minLevelUnit))]||_g.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return Dg(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=zy(this),r=ig(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return ig().addBreaksToTicks(o,i.breaks,n),o;o=yb(this._minLevelUnit,this._approxInterval,s,n,Hy(this),i);var c=vg.length-1,l=0;return F(o,function(e){e.time&&(c=Math.min(c,N(vg,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&ig().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&ig().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(N(vg,Og(e.vmin,s)),N(vg,Og(e.vmax,s))),n=0,r=0;r<vg.length;r++)if(!db(vg[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:vg[Math.max(i,t)],upperTimeUnit:vg[i]}}),o},t.prototype.getMinorTicks=function(e){return ob(this,e,og(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):+Fs(e)},t.type=`time`,t}(jy),ub=[[`second`,cg],[`minute`,lg],[`hour`,ug],[`quarter-day`,ug*6],[`half-day`,ug*12],[`day`,dg*1.2],[`half-week`,dg*3.5],[`week`,dg*7],[`month`,dg*31],[`quarter`,dg*95],[`half-year`,fg/2],[`year`,fg]];function db(e,t,n,r){return kg(new Date(t),e,r).getTime()===kg(new Date(n),e,r).getTime()}function fb(e,t){return e/=dg,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function pb(e){var t=30*dg;return e/=t,e>6?6:e>3?3:e>2?2:1}function mb(e){return e/=ug,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function hb(e,t){return e/=t?lg:cg,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function gb(e){return ls(Rs(e,!0),1)}function _b(e,t,n){var r=Math.max(0,N(vg,t)-1);return kg(new Date(e),vg[r],n).getTime()}function vb(e,t){var n=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 yb(e,t,n,r,i,a){var o=yg,s=0;function c(e,t,n,i,o,c,l){for(var u=vb(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(!db(Cg(e),r[0],r[1],n)){s&&(i=[{value:_b(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/dg/365)),p=Ag(n),m=Lg(n);break;case`half-year`:case`quarter`:case`month`:f=pb(t),p=jg(n),m=Rg(n);break;case`week`:case`half-week`:case`day`:f=fb(t,31),p=Mg(n),m=zg(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=mb(t),p=Ng(n),m=Bg(n);break;case`minute`:f=hb(t,!0),p=Pg(n),m=Vg(n);break;case`second`:f=hb(t,!1),p=Fg(n),m=Hg(n);break;case`millisecond`:f=gb(t),p=Ig(n),m=Ug(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=Cg(o[m]);if(wg(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?Cg(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=re(I(u,function(e){return re(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=Og(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Gc(S,Kc,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=Og(r[0],n),k=Og(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 bb=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=dg,n[1]+=dg),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-dg}e.setExtent(n[0],n[1]);var i=rb(t.splitNumber,10),a=Hy(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=ub.length,l=Math.min(cb(ub,a,0,c),c-1),u=ub[l][1],d=ub[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};jy.registerClass(lb);var xb=0,Sb=1,Cb=2,wb=function(e){a(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=sb.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[xb]=i[Sb]=a[xb]=a[Sb]=NaN,Ly(r,t.mapperMethods);var s=ig(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Cb,l),r.powStub=new sb({breakParsed:l.original}),r.intervalStub=new sb({breakParsed:l.transformed}),Ry(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=ig(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return I(i.getTicks(e||{}),function(e){var i=e.value,o=eb(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,og(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return ob(this,e,og(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($y(e,this.base))},scale:function(e){return eb(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=$y(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Tb.depth=n,Eb.lookup=this._lookup,eb(n===2?e:this.intervalStub.transformOut(e,Tb),this.base,Eb)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Bc(t,n)||t<=0||n<=0)){var r=Db,i=Db;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[xb]=t,r[Sb]=n);var o=this.base;this.intervalStub.setExtent2(e,i[xb]=$y(t,o),i[Sb]=$y(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Bc(t[0],t[1])&&Gs(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}(jy);jy.registerClass(wb);var Tb={},Eb={},Db=[],Ob={value:1,category:1,time:1,log:1},kb=xc();function Ab(e){var t=e.get(`type`);return(t==null||!Ae(Ob,t)&&!jy.getClass(t))&&(t=`value`),t}function jb(e,t,n){var r=ig(),i;switch(r&&(i=Hb(e,t,n)),t){case`category`:return new ab({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Pc()});case`time`:return new lb({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new wb({logBase:e.get(`logBase`),breakOption:i});case`value`:return new sb({breakOption:i});default:return new((jy.getClass(t))||sb)({})}}function Mb(e,t,n){var r=n?By(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Bc(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Nb(e){kb(e).noOnMyZero=!0}function Pb(e){return kb(e).noOnMyZero}function Fb(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=bg(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(Ib(e,n),n.value-e.scale.getExtent()[0],null)};var r=ig();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Ib(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Ib(e,t){var n=e.scale;return Xy(n)?n.getLabel(t):t.value}function Lb(e){return e.get(`interval`)??`auto`}function Rb(e){return e.type===`category`&&Lb(e.getLabelModel())===0}function zb(e,t){var n={};return F(e.mapDimensionsAll(t),function(t){n[yh(e,t)]=!0}),L(n)}function Bb(e){return e===`middle`||e===`center`}function Vb(e){return e.getShallow(`show`)}function Hb(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!ig()||!n||!Ub(t)?void 0:r}function Ub(e){return e!==`category`}function Wb(e,t,n,r,i,a){var o=Yy(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=nb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Gb(e,t){return Xy(e)?e.getRawOrdinalNumber(t.value):t.value}function Kb(e,t){return Xy(e)&&!!t.get(`boundaryGap`)}function qb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Jb(e){for(var t=Pc(),n=Pc(),r=0;r<e.length;){var i=e[r++],a=e[r++];$v(i,a)||(Fc(t,i),Fc(n,a))}return[t,n]}function Yb(e,t){var n=Jb(e),r=n[0],i=n[1],a=Jb(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 Xb(e){return se(e)?e:e?.5:0}function Zb(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=ny(r*2),a=0;a<r;a++){var o=Qv(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Qb(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;$v(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 $b(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Kr((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 ex(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=$b(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 kd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function tx(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&nx(a,t))){var o=t.mapDimension(a.dim),s={};return F(a.getViewLabels(),function(e){e.tick.offInterval||(s[Gb(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function nx(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(Uv.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function rx(e){for(var t=e.length/2;t>0&&$v(e[t*2-2],e[t*2-1]);t--);return t-1}function ix(e,t){return[e[t*2],e[t*2+1]]}function ax(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],!$v(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 ox(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<_l.length;t++)if(e.get([_l[t],`endLabel`,`show`]))return!0;return!1}function sx(e,t,n,r){if(Ey(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=ox(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=Sy(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 Cy(t,n,r)}function cx(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 lx=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Hu,t=new Yv;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=R(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=Xv(r,a,_),y=g&&Zb(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&tx(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=ex(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&&=Qb(y,c,r,w,x),c=Qb(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,$g(E)),m.setClipPath(sx(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,$g(E));var D=m.getClipPath();D?Kd(D,{shape:sx(this,r,!1,e).shape},e):m.setClipPath(sx(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]]}}),qb(this._stackedOnPoints,y)&&qb(this._points,c)||(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Qb(y,c,r,w,x),c=Qb(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`),j=O.get(`disabled`);if(f.useStyle(M(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),pu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var N=f.getState(`emphasis`).style;N.lineWidth=+f.style.lineWidth+1}Qc(f).seriesIndex=e.seriesIndex,lu(f,k,A,j);var ee=Xb(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:ee,smoothMonotone:P,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),F=0;p.useStyle(M(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(F=Xb(te.get(`smooth`))),p.setShape({smooth:ee,stackedOnSmooth:F,smoothMonotone:P,connectNulls:x}),pu(p,e,`areaStyle`),Qc(p).seriesIndex=e.seriesIndex,lu(p,k,A,j)}var I=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=I)}),this._polyline.onHoverStateChange=I,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ne=e.get(`triggerEvent`),re=e.get(`triggerLineEvent`),ie=re===!0||ne===!0||ne===`line`,L=re===!0||ne===!0||ne===`area`;this.packEventData(e,f,ie),p&&this.packEventData(e,p,L)},t.prototype.packEventData=function(e,t,n){Qc(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=bc(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($v(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Uv(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 gy.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bc(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 gy.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Fl(this._polyline,e),t&&Fl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new uy({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 fy({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(ox(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 Go({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=rx(o);c>=0&&(Xf(a,Zf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Vv(i,e):Hv(i,n)},enableTextSetter:!0},cx(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=ax(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=ix(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=Nc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=ix(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=sp(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=ay(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=Qb(u.stackedOnCurrent,u.current,n,i,o),d=Qb(u.current,null,n,i,o),m=Qb(u.stackedOnNext,u.next,n,i,o),p=Qb(u.next,null,n,i,o)),Yb(d,p)>3e3||c&&Yb(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(),Gd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gd(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}(gy);function ux(e,t){return{seriesType:e,plan:py(),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`);vh(n,o[0])&&(o[0]=c),vh(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&&ny(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 dx={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]}},fx=function(e){return Math.round(e.length/2)};function px(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=dx[i]:V(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,fx))}}}}}function mx(e){e.registerChartView(lx),e.registerSeriesModel(Bv),e.registerLayout(ux(`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,px(`line`))}var hx=xc(),gx=xc(),_x={estimate:1,determine:2};function vx(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function yx(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:I(xx(n,r),function(t,n){return{formattedLabel:Fb(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?Sx(e,t):Ex(e)}function bx(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:xx(i,r)}:e.type===`category`?Tx(e,t):{ticks:r.getTicks(n)}}function xx(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)}),Gc(r,qc,null),Ts(r),I(r,function(e){return{value:e}})}function Sx(e,t){var n=e.getLabelModel(),r=Cx(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function Cx(e,t,n){var r=Ox(e),i=Lb(t),a=n.kind===_x.estimate;if(!a){var o=Ax(r,i);if(o)return o}var s,c;V(i)?s=Lx(e,i,!1):(c=i===`auto`?Mx(e,n):i,s=Lx(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return jx(r,i,l),!0}):jx(r,i,l),l}function Tx(e,t){var n=Dx(e),r=Lb(t),i=Ax(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),V(r))a=Lx(e,r,!0);else if(r===`auto`){var s=Cx(e,e.getLabelModel(),vx(_x.determine));o=s.labelCategoryInterval,a=I(s.labels,function(e){return e.tick})}else o=r,a=Lx(e,o,!0);return jx(n,r,{ticks:a,tickCategoryInterval:o})}function Ex(e){var t=e.scale.getTicks(),n=Fb(e);return{labels:I(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Dx=kx(`axisTick`),Ox=kx(`axisLabel`);function kx(e){return function(t){return gx(t)[e]||(gx(t)[e]={list:[]})}}function Ax(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function jx(e,t,n){return e.list.push({key:t,value:n}),n}function Mx(e,t){if(t.kind===_x.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return gx(e).autoInterval=n,!0}),n}return gx(e).autoInterval??(gx(e).autoInterval=e.calculateCategoryInterval(t))}function Nx(e,t){var n=t.kind,r=Ix(e),i=Fb(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=pn(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===_x.estimate?(t.out.noPxChangeTryDetermine.push(R(Px,null,e,S,c)),S):Fx(e,S,c)??S}function Px(e,t,n){return Fx(e,t,n)==null}function Fx(e,t,n){var r=hx(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 Ix(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 Lx(e,t,n){var r=Fb(e),i=e.scale,a=[],o=V(t);return ib(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 Rx=xc();function zx(e){Rx(e).prepare={}}function Bx(e){Rx(e).fullUpdate={}}function Vx(e){return Rx(e).prepare}function Hx(e){return Rx(e).fullUpdate}var Ux=Uc(),Wx=xc(),Gx=xc();function Kx(e,t){var n=e.model,r=Wx(Hx(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function qx(e,t){return Xx(Kx(e,t))}function Jx(e,t){var n=[];return Yx(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(Xx(e))}),n}function Yx(e,t){var n=Wx(Hx(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function Xx(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function Zx(e,t){var n=e.model.ecModel,r=Wx(Hx(n)).axSer;r&&$x(n,r.get(e.model.uid),t)}function Qx(e,t,n){var r=Kx(e,t);r&&$x(e.model.ecModel,r.sers,n)}function $x(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function eS(e,t,n){var r=Wx(Hx(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function tS(e,t){var n=e.model,r=Wx(Hx(n.ecModel)).keys;r&&F(r.get(n.uid),function(e){t(e)})}function nS(e){var t=Gx(Vx(e)),n=t.keyed||=G();Yx(e,function(t,r,i){var a=n.get(r)||n.set(r,G()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&iS.liPosMinGap(e,t,o)})}function rS(e,t){iS[e]=t}var iS={};function aS(e,t,n){if(e){var r=t.ecModel,i=Wx(Hx(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=cS.get(oS(s,c,n))||cS.get(oS(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 oS(e,t,n){return e+`|&`+W(t,!0)+`|&`+(n||``)}function sS(e,t){var n=oS(t.seriesType,t.baseAxis,t.coordSysType);cS.set(n,t),Ux(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:nS})})}var cS=G(),lS=.8;function uS(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Vy(r);Gs(o)||(o=NaN);var s=e.getExtent(),c=us(s[1]-s[0]);return Xy(r)?dS(n,e,o,c):i&&fS(n,e,o,c,i),a!=null&&(n.w=Gs(n.w)?ls(a,n.w):a),n}function dS(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 fS(e,t,n,r,i){var a=!1,o=-1/0;F(i.key?[qx(t,i.key)]:Jx(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Gs(n)&&n>0&&Gs(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*lS,e.w2=e.w*n/r)}var pS=[0,1],mS=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)),ys(e,pS,hS(this),t)},e.prototype.coordToData=function(e,t){var n=ys(e,hS(this),pS,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(bx(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Gb(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=gS(this,n,r);return I(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Xy(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||=vx(_x.determine),yx(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 uS(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=vx(_x.determine),Nx(this,e)},e}();function hS(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 gS(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=uS(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 _S=function(e){a(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}(mS),vS=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],yS=1,bS=2,xS=yS|bS;function SS(e,t,n){n||=xS,t?e.dirty|=n:e.dirty&=~n}function CS(e,t){return t||=xS,e.dirty==null||!!(e.dirty&t)}function wS(e){if(e)return CS(e)&&TS(e,e.label,e),e}function TS(e,t,n){var r=t.getComputedTransform();e.transform=Rf(e.transform,r);var i=e.localRect=Lf(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=up.textMargin);for(var d=0;d<4;d++)ES[d]=u===up.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===up.textMargin&&kf(i,ES,!1,!1);var f=e.rect=Lf(e.rect,i);return r&&f.applyTransform(r),u===up.minMargin&&kf(f,ES,!1,!1),e.axisAligned=Ff(r),(e.label=e.label||{}).ignore=t.ignore,SS(e,!1),SS(e,!0,bS),e}var ES=[0,0,0,0];function DS(e,t,n){return e.transform=Rf(e.transform,n),e.localRect=Lf(e.localRect,t),e.rect=Lf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Ff(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function OS(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 kS(e,t){for(var n=0;n<vS.length;n++){var r=vS[n];e[r]??(e[r]=t[r])}return wS(e)}function AS(e){var t=e.obb;return(!t||CS(e,bS))&&(e.obb=t||=new zd,t.fromBoundingRect(e.localRect,e.transform),SS(e,!1,bS)),t}function jS(e,t,n,r,i){var a=e.length,o=ef[t],s=tf[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 MS(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 NS(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=wS(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(PS(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function PS(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:AS(e).intersect(AS(t),n,r)}var FS=null;function IS(e){FS||=e}function LS(){return FS}var RS=`expandAxisBreak`,zS=`collapseAxisBreak`,BS=`toggleAxisBreak`,VS=`axisbreakchanged`,HS={type:RS,event:VS,update:`update`,refineEvent:GS},US={type:zS,event:VS,update:`update`,refineEvent:GS},WS={type:BS,event:VS,update:`update`,refineEvent:GS};function GS(e,t,n,r){var i=[];return F(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function KS(e){e.registerAction(HS,t),e.registerAction(US,t),e.registerAction(WS,t);function t(e,t){var n=[],r=Cc(t,e);function i(t,i){F(r[t],function(t){F(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(M((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var qS=Math.PI,JS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],YS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],XS=xc(),ZS=xc(),QS=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 $S(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=CC(e.axisName)&&Bb(e.nameLocation);F(r,function(e){var t=wS(e);if(t&&!t.label.ignore){o.push(t);var n=a.transGroup;c&&(n.transform?mt(eC,n.transform):ct(eC),t.transform&&ut(eC,eC,t.transform),K.copy(tC,t.localRect),tC.applyTransform(eC),s?s.union(tC):K.copy(s=new K(0,0,0,0),tC))}});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 eC=st(),tC=new K(0,0,0,0),nC=function(e,t,n,r,i,a){if(Bb(e.nameLocation)){var o=a.stOccupiedRect;o&&rC(DS({},o,a.transGroup.transform),r,i)}else iC(a.labelInfoList,a.dirVec,r,i)};function rC(e,t,n){var r=new Nt;PS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&OS(t,r)}function iC(e,t,n,r){for(var i=Nt.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||rC(s,n,r)}}var aC=function(){function e(e,t,n,r){this.group=new Hu,this._axisModel=e,this._api=t,this._local={},this._shared=r||new QS(nC),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:he(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:CC(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Hu({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 Nt(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(oC,function(r){e[r]&&sC[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=Ms(t-e),i,a;return Ns(r)?(a=n>0?`top`:`bottom`,i=`center`):Ns(r-qS)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<qS?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}(),oC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],sC={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&&(At(u,u,l),At(d,d,l));var p=A({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&sg(r.axis.scale))LS().buildAxisBreakLine(r,i,a,m);else{var h=new bd(A({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));pf(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(_)||se(_))&&(_=[_,_]);var v=zv(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=Lv(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){gC(t,i,s)&&cC(e,t,n,r,i,a,o,_x.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){gC(t,i,s)&&cC(e,t,n,r,i,a,o,_x.determine);var c=mC(e,i,a,r);dC(e,t.labelLayoutList,c),hC(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(CC(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 Nt(0,0),_=new Nt(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=st();_.transform(ft(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*qS/180);var b,x;Bb(u)?b=aC.innerTextLayout(e.rotation,y??e.rotation,d):(b=lC(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 Go({x:g.x,y:g.y,rotation:b.rotation,silent:aC.isLabelSilent(r),style:Qf(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(Mf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=aC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Qc(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=wS({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Bb(u)?JS[E]:YS[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 cC(e,t,n,r,i,a,o,s){vC(t)||_C(e,t,i,s,r,o);var c=t.labelLayoutList;bC(e,r,c,a),TC(r,e.rotation,c);var l=e.optionHideOverlap;uC(r,c,l),l&&NS(re(c,function(e){return e&&!e.label.ignore})),$S(e,n,r,c)}function lC(e,t,n,r){var i=Ms(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ns(i-qS/2)?(o=c?`bottom`:`top`,a=`center`):Ns(i-qS*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<qS*1.5&&i>qS/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function uC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Rb(r))return;function a(e,a,o){var s=wS(t[a]),c=wS(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=XS(s.label).labelInfo.tick;if(Jy(l)&&u.notNice||Xy(l)&&u.offInterval){fC(s.label);return}}if(e===!1||s.suggestIgnore)fC(s.label);else if(c.suggestIgnore)fC(c.label);else{var d=.1;if(!n){var f=[0,0,0,0];s=kS({marginForce:f},s),c=kS({marginForce:f},c)}PS(s,c,null,{touchThreshold:d})&&fC(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 dC(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=ZS(r),a=XS(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){fC(r);return}}})}function fC(e){e&&(e.ignore=!0)}function pC(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&&(At(o,o,t),At(s,s,t));var u=new bd({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});pf(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=ZS(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function mC(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=pC(i.getTicksCoords(),n.transform,c,M(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function hC(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=M(c.getLineStyle(),M(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=pC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function gC(e,t,n){if(vC(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),yC(e,null,null,null))}return!0}function _C(e,t,n,r,i,a){var o=i.axis,s=me(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Hu;n.add(c);var l=vx(r);if(!s||o.scale.isBlank())yC(t,[],c,l);else{var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(me(e.raw.labelRotate,u.get(`rotate`))||0)*qS/180,p=aC.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=Gb(o.scale,n);if(m&&m[f]){var y=m[f];U(y)&&y.textStyle&&(l=new xp(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 Go({x:0,y:0,rotation:0,silent:aC.isLabelSilent(i),z2:D,style:Qf(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=XS(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,Mf({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=aC.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),Qc(O).eventData=A,j&&wC(i,a,O,j)}h.push(O),c.add(O)}),yC(t,I(h,function(e){return{label:e,priority:XS(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}}function vC(e){return!!e.labelLayoutList}function yC(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function bC(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);F(n,function(n,a){var o=wS(n);if(o){var s=o.label,c=XS(s);o.suggestIgnore=s.ignore,s.ignore=!1,Qn(xC,SC);var l=t.axis;xC.x=l.dataToCoord(Gb(l.scale,c.labelInfo.tick)),xC.y=e.labelOffset+e.labelDirection*i,xC.rotation=c.layoutRotation,r.add(xC),xC.updateTransform(),r.remove(xC),xC.decomposeTransform(),Qn(s,xC),s.markRedraw(),SS(o,!0),wS(o)}})}var xC=new Bo,SC=new Bo;function CC(e){return!!e}function wC(e,t,n,r){n.on(`click`,function(n){var i={type:RS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function TC(e,t,n){var r=ig();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&XS(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&F(i,function(r){LS().adjustBreakLabelPair(e.axis.inverse,t,[wS(n[r[0]]),wS(n[r[1]])])})}}function EC(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 DC(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function OC(e){var t={xAxisModel:null,yAxisModel:null};return F(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Tc).models[0]}),t}function kC(e,t,n,r,i,a){for(var o=EC(e,n),s=!1,c=!1,l=0;l<t.length;l++)Ky(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 aC(n,r,o,i)}function AC(e,t,n){var r=EC(t,n);e.updateCfg(r)}var jC=xc(),MC=3,NC=function(){function e(e,t,n,r,i){var a=Xy(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(qy(e)||Yy(e)||Jy(e))&&(Ic(l,FC(e,t.get(`dataMin`,!0))),Lc(l,FC(e,t.get(`dataMax`,!0)))),Vc(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]=FC(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]=FC(e,V(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=IC(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,!zc(u[0])&&(u[0]=NaN),!zc(u[1])&&(u[1]=NaN);var g=s||pe(u[0])||pe(u[1])||a&&!o,_=qy(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=FC(e,t.get(`startValue`,!0)),x=b!=null;!Gs(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Gs(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)),PC(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),PC(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 PC(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),Hc(t))}function FC(e,t){return t==null?null:pe(t)?NaN:e.parse(t)}function IC(e,t){var n;if(Xy(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[LC(n[0]),LC(n[1])]}function LC(e){return _n(typeof e==`boolean`?0:e,1)||0}function RC(e){var t=jC(e.scale);return t.extent||=Pc(),t}function zC(e,t){RC(e).dimIdxInCoord=t.get(e.dim)}function BC(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||VC(n,e,i,r,t)}function VC(e,t,n,r,i){var a=RC(t),o=a.extent,s=!1;Zx(t,function(r){if(r.boxCoordinateSystem){var i=ch(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Fc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;F(zb(u,n),function(e){Rc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=qC(e,t,r);UC(e,new NC(e,r,o,s,c),i),a.extent=null}function HC(e,t){var n=e.scale;UC(n,new NC(n,e.model,t,!1,!1),MC)}function UC(e,t,n){e.rawExtentInfo=t,t.from=n}function WC(e,t){GC.set(e,t)}var GC=G();function KC(e,t,n,r,i){e.rawExtentInfo||HC({scale:e,model:t},i||Pc());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 qC(e,t,n){var r=Kb(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return tS(t,function(e){a=!!GC.get(e)||a}),a}function JC(e,t,n,r){if(n.ctnShp){var i;if(tS(e,function(t){var n=GC.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Ic(i,a[0]),Lc(i,a[1]),Nb(e))}}),i){var a=t.getExtent();if(Xy(t))e.onBand||t.setExtent2(1,cs(a[0],a[0]+i[0]),ls(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=cs(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ls(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 YC(){rS(`liPosMinGap`,XC)}function XC(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=ym(u);function f(n){$x(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{ry(ZC,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||bm(d,a))&&(l&&(a=c.transformIn(a,null)),ZC.arr[m++]=a)}});var h=ZC.typed?ZC.arr.subarray(0,m):(ZC.arr.length=m,ZC.arr);ZC.typed?h.sort():Ts(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Gs(g)?g:m>0?-2:-1,n.serUids=r}}var ZC=ry({ctor:ty},50);function QC(e){return function(t,n){var r=uS(t,{fromStat:{key:e}});if(Gs(r.w2))return[-r.w2/2,r.w2/2]}}function $C(e,t){return e+`|&`+t}function ew(e){return YC(),{liPosMinGap:!Xy(e.scale)}}function tw(e,t,n,r){sS(e,{key:t,seriesType:n,coordSysType:r,getMetrics:ew})}function nw(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var rw={left:0,right:0,top:0,bottom:0},iw=[`25%`,`25%`],aw=`cartesian2d`,ow=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=g_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&h_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&h_(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:rw,outerBoundsContain:`all`,outerBoundsClampWidth:iw[0],outerBoundsClampHeight:iw[1],backgroundColor:J.color.transparent,borderWidth:1,borderColor:J.color.neutral30},t}(y_),sw=Uc(),cw=`__ec_stack_`;function lw(e){return e.get(`stack`)||cw+e.seriesIndex}function uw(e,t){var n=dw(e,t);return n.columnMap=fw(n),n}function dw(e,t){var n=$C(t,aw),r=[],i=uS(e,{fromStat:{key:n},min:1});return Qx(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`)||(hw(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:lw(e)})}),{bandWidthResult:i,seriesInfo:r}}function fw(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;Ae(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=cs(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??=ls(35-o.length*4,15)+`%`;var c=q(i,t),l=q(a,1),u=(n-c)/(r+(r-1)*l);u=ls(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=cs(o,i)),a&&(o=ls(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=cs(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=ls(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 pw(e){return{seriesType:e,overallReset:function(t){var n=$C(e,aw);eS(t,n,function(t){var r=uw(t,e);Qx(t,n,function(e){var t=r.columnMap[lw(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function mw(e){return{seriesType:e,plan:py(),reset:function(e){if(DC(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=vh(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(nw(i))),p=hw(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&&ny(r*3),c=p&&s&&ny(r*3),l=p&&ny(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,us(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,us(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 hw(e){return e.pipelineContext&&e.pipelineContext.large}function gw(e){return QC($C(e,aw))}function _w(e){sw(e,function(){function t(t){var n=$C(t,aw);tw(e,n,t,aw),WC(n,gw(t))}t(`bar`),t(`pictorialBar`)})}var vw=function(e){a(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 Sh(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}(Sv);Sv.registerClass(vw);var yw=function(e){a(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 Sh(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=Yc(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=kh(vw.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:J.color.primary,borderWidth:2}},realtimeSort:!1}),t}(vw),bw=`\0__throttleOriginMethod`,xw=`\0__throttleRate`,Sw=`\0__throttleType`;function Cw(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];r=new Date().getTime(),c=this,l=e;var p=u||t,m=u||n;u=null,s=r-(m?i:a)-p,clearTimeout(o),m?o=setTimeout(d,p):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 ww(e,t,n,r){var i=e[t];if(i){var a=i[bw]||i,o=i[Sw];if(i[xw]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Cw(a,n,r===`debounce`),i[bw]=a,i[Sw]=r,i[xw]=n}return i}}function Tw(e,t){var n=e[t];n&&n[bw]&&(n.clear&&n.clear(),e[t]=n[bw])}var Ew=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}(),Dw=function(e){a(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Ew},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}(Eo);function Ow(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return vn(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)+Aw(m,s+_,!1),x=u+p*y(m)+jw(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+Aw(m,-s+_,!1),x=u+p*y(m)+jw(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)+Aw(h,s+_,!0),x=u+p*y(h)+jw(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+Aw(h,-s+_,!0),x=u+p*y(h)+jw(h,-s+_,!0),S=`right`,C=`middle`;break;default:return vn(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function kw(e,t,n,r){if(se(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 Aw(e,t,n){return t*Math.sin(e)*(n?-1:1)}function jw(e,t,n){return t*Math.cos(e)*(n?1:-1)}function Mw(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 _n(e,i)})}}var Nw=Math.max,Pw=Math.min,Fw=function(e){a(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){Pf(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=Rw(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=Ww[s.type](a,e);if(!t)return null;var n=tT(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=Ww[s.type](a,t,n);if(r&&(h&&S(t),a.hasValue(t)&&Uw[s.type](r))){var o=!1;f&&(o=Iw[s.type](p,r));var g=Lw[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),qw(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?zw(d,u,g,r,t,l,!1,!1):Kd(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=Ww[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=Ww[s.type](a,t),E=eT(l,T,s);Gd(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!Uw[s.type](C))i.remove(D);else{var O=!1;if(f&&(O=Iw[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Xd(D,e,n),D=null),D?Zd(D):D=Lw[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=sp(k);A.prevValue!=null&&(A.prevValue=A.value)}}else qw(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?zw(d,u,D,C,t,l,!0,x):Gd(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&&Xd(n,e,t)}).execute();var C=this._backgroundGroup||=new Hu;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(),Zw(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),Zw(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&wy(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){Xd(t,e,Qc(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}(gy),Iw={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=Nw(t.x,e.x),s=Pw(t.x+t.width,i),c=Nw(t.y,e.y),l=Pw(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=Pw(t.r,e.r),a=Nw(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}},Lw={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Bo({shape:A({},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?Dw:ld,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=Ow(Kw(i),{isRoundCap:l===Dw}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Gd:Kd)(u,{shape:p},a)}return u}};function Rw(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 zw(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?Gd:Kd)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Gd:Kd)(n,{shape:l},u,i)}function Bw(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var Vw=[`x`,`y`,`width`,`height`],Hw=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],Uw={cartesian2d:function(e){return!Bw(e,Vw)},polar:function(e){return!Bw(e,Hw)}},Ww={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?Jw(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 Gw(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Kw(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 qw(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;A(u,Mw(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?nT(i,a.coordinateSystem):rT(i,a.coordinateSystem),p=Zf(r);Xf(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Vv(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,kw(e,h===`outside`?f:h,Kw(o),r.get([`label`,`rotate`]))}cp(m,p,a.getRawValue(n),function(e){return Hv(t,e)});var g=r.getModel([`emphasis`]);lu(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),pu(e,r),Gw(i)&&(e.style.fill=`none`,e.style.stroke=`none`,F(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Jw(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 Yw=function(){function e(){}return e}(),Xw=function(e){a(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new Yw},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}(Eo);function Zw(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?Jc(e):0;if(l){var d=new Xw({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 Xw({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,Qc(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,Qw),f.on(`mousemove`,Qw)),n&&n.push(f)}var Qw=Cw(function(e){var t=this,n=$w(t,e.offsetX,e.offsetY);Qc(t).dataIndex=n>=0?n:null},30,!1);function $w(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 eT(e,t,n){if(Ey(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 tT(e,t,n){return new(e.type===`polar`?ld:Bo)({shape:eT(t,n,e),silent:!0,z2:0})}function nT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function rT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function iT(e){e.registerChartView(Fw),e.registerSeriesModel(yw),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,pw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mw(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,px(`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)})}),_w(e)}function aT(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=A({},t),i.dispatchAction(A(t,{type:e[1],seriesIndex:n(r,t)}))})})}function oT(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=bc(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:A({},r)})}})}function sT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(oT(`map`,`selectchanged`,t,r,e),oT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(oT(`map`,`selected`,t,r,e),oT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(oT(`map`,`unselected`,t,r,e),oT(`pie`,`unselected`,t,r,e))})}function cT(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 lT(e,t,n){t=B(t)&&{coordDimensions:t}||A({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=$m(r,t).dimensions,a=new Qm(i,e);return a.initData(r,n),a}var uT=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}(),dT=xc(),fT=function(e){a(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 uT(R(this.getData,this),R(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return lT(this,{coordDimensions:[`value`],encodeDefaulter:z(kp,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=dT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=ks(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){nc(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}(Sv);oh({fullType:fT.type,getCoord2:function(e){return e.getShallow(`center`)}});var pT=Math.PI*2,mT=eo.CMD,hT=[`top`,`right`,`bottom`,`left`];function gT(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 _T(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)%pT<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=ao(i),i=ao(f)}else r=ao(r),i=ao(i);r>i&&(i+=pT);var p=Math.atan2(s,o);if(p<0&&(p+=pT),p>=r&&p<=i||p+pT>=r&&p+pT<=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 vT(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 yT(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 bT=[];function xT(e,t,n){var r=yT(t.x,t.y,t.width,t.height,e.x,e.y,bT);return n.set(bT[0],bT[1]),r}function ST(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 mT.M:a=u[p++],o=u[p++],r=a,i=o;break;case mT.L:h=vT(r,i,u[p],u[p+1],d,f,bT,!0),r=u[p++],i=u[p++];break;case mT.C:h=gr(r,i,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,f,bT),r=u[p++],i=u[p++];break;case mT.Q:h=Cr(r,i,u[p++],u[p++],u[p],u[p+1],d,f,bT),r=u[p++],i=u[p++];break;case mT.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=_T(g,_,y,b,b+x,S,C,f,bT),r=Math.cos(b+x)*v+g,i=Math.sin(b+x)*y+_;break;case mT.R:a=r=u[p++],o=i=u[p++];var w=u[p++],T=u[p++];h=yT(a,o,w,T,d,f,bT);break;case mT.Z:h=vT(r,i,a,o,d,f,bT,!0),r=a,i=o}h<l&&(l=h,n.set(bT[0],bT[1]))}return l}var CT=new Nt,wT=new Nt,TT=new Nt,ET=new Nt,DT=new Nt;function OT(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||hT,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var c=1/0,l=i.anchor,u=e.getComputedTransform(),d=u&&mt([],u),f=t.get(`length2`)||0;l&&TT.copy(l);for(var p=0;p<o.length;p++){var m=o[p];gT(m,0,s,CT,ET),Nt.scaleAndAdd(wT,CT,ET,f),wT.transform(d);var h=e.getBoundingRect(),g=l?l.distance(wT):e instanceof Eo?ST(wT,e.path,TT):xT(wT,h,TT);g<c&&(c=g,wT.transform(u),TT.transform(u),TT.toArray(a[0]),wT.toArray(a[1]),CT.toArray(a[2]))}jT(a,t.get(`minTurnAngle`)),n.setShape({points:a})}}}var kT=[],AT=new Nt;function jT(e,t){if(t<=180&&t>0){t=t/180*Math.PI,CT.fromArray(e[0]),wT.fromArray(e[1]),TT.fromArray(e[2]),Nt.sub(ET,CT,wT),Nt.sub(DT,TT,wT);var n=ET.len(),r=DT.len();if(!(n<.001||r<.001)){ET.scale(1/n),DT.scale(1/r);var i=ET.dot(DT);if(Math.cos(t)<i){var a=vT(wT.x,wT.y,TT.x,TT.y,CT.x,CT.y,kT,!1);AT.fromArray(kT),AT.scaleAndAdd(DT,a/Math.tan(Math.PI-t));var o=TT.x===wT.x?(AT.y-wT.y)/(TT.y-wT.y):(AT.x-wT.x)/(TT.x-wT.x);if(isNaN(o))return;o<0?Nt.copy(AT,wT):o>1&&Nt.copy(AT,TT),AT.toArray(e[1])}}}}function MT(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,CT.fromArray(e[0]),wT.fromArray(e[1]),TT.fromArray(e[2]),Nt.sub(ET,wT,CT),Nt.sub(DT,TT,wT);var r=ET.len(),i=DT.len();if(!(r<.001||i<.001)&&(ET.scale(1/r),DT.scale(1/i),ET.dot(t)<Math.cos(n))){var a=vT(wT.x,wT.y,TT.x,TT.y,CT.x,CT.y,kT,!1);AT.fromArray(kT);var o=Math.PI/2,s=o+Math.acos(DT.dot(t))-n;if(s>=o)Nt.copy(AT,TT);else{AT.scaleAndAdd(DT,a/Math.tan(Math.PI/2-s));var c=TT.x===wT.x?(AT.y-wT.y)/(TT.y-wT.y):(AT.x-wT.x)/(TT.x-wT.x);if(isNaN(c))return;c<0?Nt.copy(AT,wT):c>1&&Nt.copy(AT,TT)}AT.toArray(e[1])}}}function NT(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 PT(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=Et(r[0],r[1]),a=Et(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=kt([],r[1],r[0],o/i),c=kt([],r[1],r[2],o/a),l=kt([],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 FT(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<vl.length;c++){var l=vl[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&&NT(r,!0,l,u);continue}r||(r=new _d,e.setTextGuideLine(r),d||!s&&o||NT(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),NT(r,!1,l,u)}}if(r){M(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=PT}}}function IT(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<_l.length;r++){var i=_l[r];n[i]=e.getModel([i,t])}return n}var LT=Math.PI/180;function RT(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;BT(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}jS(e,1,c,c+o)&&d(e)}function zT(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;WT(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(!WT(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,BT(m,g,!1)}}RT(l,t,n,r,1,i,a,o,s,d),RT(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!WT(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 BT(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)}VT(a,r)}}}function VT(e,t){UT.rect=e,TS(UT,t,HT)}var HT={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},UT={};function WT(e){return e.position===`center`}function GT(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*LT,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)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,N;r=d.cx,i=d.cy;var ee=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,N=`center`;else{var P=(ee?(d.r+d.r0)/2*O:d.r*O)+r,te=(ee?(d.r+d.r0)/2*k:d.r*k)+i;if(A=P+O*3,j=te+k*3,!ee){var I=P+O*(T+c-d.r),ne=te+k*(T+c-d.r),re=I+(O<0?-1:1)*E,ie=ne;A=x===`edge`?O<0?u+S:u+l-S:re+(O<0?-b:b),j=ie,M=[[P,te],[I,ne],[re,ie]]}N=ee?`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`}),ee){h.setStyle({align:N});var B=h.states.select;B&&(B.x+=h.x,B.y+=h.y)}else{var V=new K(0,0,0,0);VT(V,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new Nt(O,k),linePoints:M,textAlign:N,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:V,unconstrainedWidth:V.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ee})}}),!a&&e.get(`avoidLabelOverlap`)&&zT(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):(jT(x,g.minTurnAngle),MT(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new Nt(x[0][0],x[0][1])})}}}var KT=Math.PI*2,qT=Math.PI/180,JT=Xc(`pie`,YT);function YT(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=c_(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*qT,d=e.get(`endAngle`),f=e.get(`padAngle`)*qT;d=d===`auto`?u-KT:-d*qT;var p=e.get(`minAngle`)*qT+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;$a(S,!_),u=S[0],d=S[1];var w=XT(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?ys(e,b,[c,s]):s}),O=i}}),E<KT&&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 XT=xc(),ZT=function(e){a(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Go;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=A(Mw(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?(Kd(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,Kd(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Gd(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Kd(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Zd(i),Gd(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),pu(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=A({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},Mw(s.getModel(`itemStyle`),c)),A(i.ensureState(`select`),{x:p,y:m,shape:Mw(o.getModel([`select`,`itemStyle`]),c)}),A(i.ensureState(`blur`),{shape:Mw(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&A(g.ensureState(`select`),{x:p,y:m}),A(_.ensureState(`select`),{x:p,y:m}),lu(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;Xf(r,Zf(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 _d,this.setTextGuideLine(d)),FT(this,IT(i),{stroke:s,opacity:he(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(ld),QT=function(e){a(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 ld({shape:O(XT(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new ZT(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){Xd(a.getItemGraphicEl(t),e,t)}).execute(),GT(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}(gy);function $T(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 eE(e){e.registerChartView(QT),e.registerSeriesModel(fT),aT(`pie`,e.registerAction),e.registerLayout(JT),e.registerProcessor(cT(`pie`)),e.registerProcessor($T(`pie`))}var tE=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),nE=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 tE(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 tE(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 tE(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new tE(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new tE(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new tE(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),rE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,iE=[],aE=Pe.browser.firefox&&+Pe.browser.version.split(`.`)[0]<39;function oE(e,t,n,r){return n||={},r?sE(e,t,n):aE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?sE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function sE(e,t,n){if(Pe.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Bh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Lh(iE,e,r,i)){n.zrX=iE[0],n.zrY=iE[1];return}}n.zrX=n.zrY=0}function cE(e){return e||window.event}function lE(e,t,n){if(t=cE(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&&oE(e,i,t,n)}else{oE(e,t,t,n);var a=uE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&rE.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function uE(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 dE(e,t,n,r){e.addEventListener(t,n,r)}function fE(e,t,n,r){e.removeEventListener(t,n,r)}var pE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function mE(e){return e.which===2||e.which===3}var hE=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=oE(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 vE)if(vE.hasOwnProperty(t)){var n=vE[t](this._track,e);if(n)return n}},e}();function gE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function _E(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var vE={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=gE(r)/gE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=_E(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},yE=`silent`;function bE(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:xE}}function xE(){pE(this.event)}var SE=function(e){a(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}(Ui),CE=function(){function e(e,t){this.x=e,this.y=t}return e}(),wE=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],TE=new K(0,0,0,0),EE=function(e){a(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new CE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new SE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new nE(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(F(wE,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=kE(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 CE(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 CE(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=bE(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 CE(e,t);if(OE(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||(TE.copy(u.getBoundingRect()),u.transform&&TE.applyTransform(u.transform),TE.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(OE(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 hE;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 CE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Ui);F([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){EE.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=kE(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||Et(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function DE(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||yE}return!1}function OE(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=DE(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==yE)){t.target=o;break}}}function kE(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var AE=32,jE=7;function ME(e){for(var t=0;e>=AE;)t|=e&1,e>>=1;return e+t}function NE(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++;PE(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function PE(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function FE(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 IE(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 LE(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 RE(e,t){var n=jE,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=LE(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=IE(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=LE(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=IE(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>=jE||m>=jE);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-LE(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-IE(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>=jE||g>=jE);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 zE(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<AE)a=NE(e,n,r,t),FE(e,n,r,n+a,t);else{var o=RE(e,t),s=ME(i);do{if(a=NE(e,n,r,t),a<s){var c=i;c>s&&(c=s),FE(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 BE=!1;function VE(){BE||(BE=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function HE(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var UE=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=HE}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,zE(n,HE)},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)&&(VE(),p.z=0),isNaN(p.z2)&&(VE(),p.z2=0),isNaN(p.zlevel)&&(VE(),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=N(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}(),WE=Pe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function GE(){return new Date().getTime()}var KE=function(e){a(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=GE()-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&&(WE(t),!e._paused&&e.update())}WE(t)},t.prototype.start=function(){this._running||(this._time=GE(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=GE(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=GE()-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 Hi(e,t.loop);return this.addAnimator(n),n},t}(Ui),qE=300,JE=Pe.domSupported,YE=(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})}})(),XE={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ZE=!1;function QE(e){var t=e.pointerType;return t===`pen`||t===`touch`}function $E(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 eD(e){e&&(e.zrByTouch=!0)}function tD(e,t){return lE(e.dom,new rD(e,t),!0)}function nD(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 rD=function(){function e(e,t){this.stopPropagation=je,this.stopImmediatePropagation=je,this.preventDefault=je,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),iD={mousedown:function(e){e=lE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=lE(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=lE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=lE(this.dom,e);var t=e.toElement||e.relatedTarget;nD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ZE=!0,e=lE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ZE||(e=lE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=lE(this.dom,e),eD(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),iD.mousemove.call(this,e),iD.mousedown.call(this,e)},touchmove:function(e){e=lE(this.dom,e),eD(e),this.handler.processGesture(e,`change`),iD.mousemove.call(this,e)},touchend:function(e){e=lE(this.dom,e),eD(e),this.handler.processGesture(e,`end`),iD.mouseup.call(this,e),+new Date-this.__lastTouchMoment<qE&&iD.click.call(this,e)},pointerdown:function(e){iD.mousedown.call(this,e)},pointermove:function(e){QE(e)||iD.mousemove.call(this,e)},pointerup:function(e){iD.mouseup.call(this,e)},pointerout:function(e){QE(e)||iD.mouseout.call(this,e)}};F([`click`,`dblclick`,`contextmenu`],function(e){iD[e]=function(t){t=lE(this.dom,t),this.trigger(e,t)}});var aD={pointermove:function(e){QE(e)||aD.mousemove.call(this,e)},pointerup:function(e){aD.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 oD(e,t){var n=t.domHandlers;Pe.pointerEventsSupported?F(YE.pointer,function(r){cD(t,r,function(t){n[r].call(e,t)})}):(Pe.touchEventsSupported&&F(YE.touch,function(r){cD(t,r,function(i){n[r].call(e,i),$E(t)})}),F(YE.mouse,function(r){cD(t,r,function(i){i=cE(i),t.touching||n[r].call(e,i)})}))}function sD(e,t){Pe.pointerEventsSupported?F(XE.pointer,n):Pe.touchEventsSupported||F(XE.mouse,n);function n(n){function r(r){r=cE(r),nD(e,r.target)||(r=tD(e,r),t.domHandlers[n].call(e,r))}cD(t,n,r,{capture:!0})}}function cD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,dE(e.domTarget,t,n,r)}function lD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&fE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var uD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),dD=function(e){a(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 uD(t,iD),JE&&(r._globalHandlerScope=new uD(document,aD)),oD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){lD(this._localHandlerScope),JE&&lD(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,JE&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?sD(this,t):lD(t)}},t}(Ui),fD={},pD={};function mD(e){delete pD[e]}function hD(e){if(!e)return!1;if(typeof e==`string`)return Xr(e,1)<Ki;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Xr(t[i].color,1);return n/=r,n<Ki}return!1}var gD=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 UE,a=n.renderer||`canvas`;fD[a]||(a=L(fD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new fD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Pe.node&&!Pe.worker&&!s?new dD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Pe.touchEventsSupported:!!l,d=44,f;u&&(f=W(n.pointerSize,d)),this.handler=new EE(i,o,c,o.root,f),this.animation=new KE({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=hD(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=GE(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=GE();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 Hu&&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,mD(this.id))},e}();function _D(e,t){var n=new gD(E(),e,t);return pD[n.id]=n,n}function vD(e,t){fD[e]=t}var yD;function bD(e){if(typeof yD==`function`)return yD(e)}function xD(e){yD=e}var SD=``;typeof navigator<`u`&&(SD=navigator.platform||``);var CD=`rgba(0, 0, 0, 0.2)`,wD=J.color.theme[0],TD=qr(wD,null,null,.9),ED={darkMode:`auto`,colorBy:`series`,color:J.color.theme,gradientColor:[TD,wD],aria:{decal:{decals:[{color:CD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:CD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:CD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:CD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:CD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:CD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:SD.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},DD=G();function OD(e,t,n){var r=DD.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var kD,AD,jD,MD=`\0_ec_inner`,ND=1,PD=function(e){a(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 xp(r),this._locale=new xp(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=zD(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,zD(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`?jD(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;Dp(this),F(e,function(e,t){e!=null&&(y_.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?O(e):k(n[t],e,!0))}),s&&s.each(function(e,t){y_.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),y_.topologicalTravel(a,y_.getAllClassMainTypes(),c,this);function c(t){var a=OD(this,t,tc(e[t])),o=r.get(t),c=oc(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);vc(c,t,y_),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=y_.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=A({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),A(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`&&kD(this)}this._seriesIndices||kD(this)},t.prototype.getOption=function(){var e=O(this.option);return F(e,function(t,n){if(y_.hasClass(n)){for(var r=tc(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!_c(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[MD],e},t.prototype.setTheme=function(e){this._theme=new xp(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?re(a,function(e){return!!e}):LD(`name`,i,a):LD(`id`,r,a):(o=[],F(tc(n),function(e){a[e]&&o.push(a[e])})),RD(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(RD(r?this.queryComponents(r):re(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?re(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=hc(e,null);return re(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 re(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return re(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){AD(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){AD(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 AD(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){AD(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){kD(this);var t=this._componentsMap,n=[];t.each(function(e,t){y_.hasClass(t)&&n.push(t)}),y_.topologicalTravel(n,y_.getAllClassMainTypes(),function(n){F(t.get(n),function(t){t&&(n!==`series`||!FD(t,e))&&t.restoreData()})})},t.internalField=function(){kD=function(e){var t=e._seriesIndices=[];F(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=G(t)},AD=function(e){},jD=function(e,t){e.option={},e.option[MD]=ND,e._componentsMap=G({series:[]}),e._componentsCount=G();var n=t.aria;U(n)&&n.enabled==null&&(n.enabled=!0),ID(t,e._theme.option),k(t,ED,!1),e._mergeOption(t,null)}}(),t}(xp);function FD(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 ID(e,t){var n=e.color&&!e.colorLayer;F(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||y_.hasClass(r)||(typeof t==`object`?e[r]=e[r]?k(e[r],t,!1):O(t):e[r]??(e[r]=t))})}function LD(e,t,n){if(B(t)){var r=G();return F(t,function(e){e!=null&&hc(e,null)!=null&&r.set(e,!0)}),re(n,function(t){return t&&r.get(t[e])})}var i=hc(t,null);return re(n,function(t){return t&&i!=null&&t[e]===i})}function RD(e,t){return t.hasOwnProperty(`subType`)?re(e,function(e){return e&&e.subType===t.subType}):e}function zD(e){var t=G();return e&&F(tc(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}P(PD,C_);var BD=/^(min|max)?(.+)$/,VD=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(F(tc(e.series),function(e){e&&e.data&&le(e.data)&&xe(e.data)}),F(tc(e.dataset),function(e){e&&e.source&&le(e.source)&&xe(e.source)})),e=O(e);var r=this._optionBackup,i=HD(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=[],O(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=O(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++)UD(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!GD(a,this._currentMediaIndices)&&(o=I(a,function(e){return O(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function HD(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 UD(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return F(e,function(e,t){var n=t.match(BD);if(n&&n[1]&&n[2]){var a=n[1];WD(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function WD(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function GD(e,t){return e.join(`,`)===t.join(`,`)}var KD=F,qD=U,JD=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function YD(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=JD.length;n<r;n++){var i=JD[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?k(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?k(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function XD(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,M(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 ZD(e){XD(e,`itemStyle`),XD(e,`lineStyle`),XD(e,`areaStyle`),XD(e,`label`),XD(e,`labelLine`),XD(e,`upperLabel`),XD(e,`edgeLabel`)}function QD(e,t){var n=qD(e)&&e[t],r=qD(n)&&n.textStyle;if(r)for(var i=0,a=rc.length;i<a;i++){var o=rc[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function $D(e){e&&(ZD(e),QD(e,`label`),e.emphasis&&QD(e.emphasis,`label`))}function eO(e){if(qD(e)){YD(e),ZD(e),QD(e,`label`),QD(e,`upperLabel`),QD(e,`edgeLabel`),e.emphasis&&(QD(e.emphasis,`label`),QD(e.emphasis,`upperLabel`),QD(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(YD(t),$D(t));var n=e.markLine;n&&(YD(n),$D(n));var r=e.markArea;r&&$D(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++)$D(a[o]);F(e.categories,function(e){ZD(e)})}if(i&&!le(i))for(var o=0;o<i.length;o++)$D(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)$D(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)B(c[o])?($D(c[o][0]),$D(c[o][1])):$D(c[o]);e.type===`gauge`?(QD(e,`axisLabel`),QD(e,`title`),QD(e,`detail`)):e.type===`treemap`?(XD(e.breadcrumb,`itemStyle`),F(e.levels,function(e){ZD(e)})):e.type===`tree`&&ZD(e.leaves)}}function tO(e){return B(e)?e:e?[e]:[]}function nO(e){return(B(e)?e[0]:e)||{}}function rO(e,t){KD(tO(e.series),function(e){qD(e)&&eO(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),KD(n,function(t){KD(tO(e[t]),function(e){e&&(QD(e,`axisLabel`),QD(e.axisPointer,`label`))})}),KD(tO(e.parallel),function(e){var t=e&&e.parallelAxisDefault;QD(t,`axisLabel`),QD(t&&t.axisPointer,`label`)}),KD(tO(e.calendar),function(e){XD(e,`itemStyle`),QD(e,`dayLabel`),QD(e,`monthLabel`),QD(e,`yearLabel`)}),KD(tO(e.radar),function(e){QD(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)}),KD(tO(e.geo),function(e){qD(e)&&($D(e),KD(tO(e.regions),function(e){$D(e)}))}),KD(tO(e.timeline),function(e){$D(e),XD(e,`label`),XD(e,`itemStyle`),XD(e,`controlStyle`,!0);var t=e.data;B(t)&&F(t,function(e){U(e)&&(XD(e,`label`),XD(e,`itemStyle`))})}),KD(tO(e.toolbox),function(e){XD(e,`iconStyle`),KD(e.feature,function(e){XD(e,`iconStyle`)})}),QD(nO(e.axisPointer),`label`),QD(nO(e.tooltip).axisPointer,`label`)}function iO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function aO(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 oO(e){e&&F(sO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var sO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],cO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],lO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function uO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<lO.length;n++){var r=lO[n][1],i=lO[n][0];t[r]!=null&&(t[i]=t[r])}}function dO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function fO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function pO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function mO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&mO(e[n].children,t)}function hO(e,t){rO(e,t),e.series=tc(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),dO(e.label);var n=e.data;if(n&&!le(n))for(var r=0;r<n.length;r++)dO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=iO(e,`pointer.color`);i!=null&&aO(e,`itemStyle.color`,i)}else if(t===`bar`){uO(e),uO(e.backgroundStyle),uO(e.emphasis);var n=e.data;if(n&&!le(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(uO(n[r]),uO(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)),fO(e),mO(e.data,fO)}else t===`graph`||t===`sankey`?pO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&M(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),oO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),F(cO,function(t){var n=e[t];n&&(B(n)||(n=[n]),F(n,function(e){oO(e)}))})}var gO=Zc(_O);function _O(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)}),vO(e))})}function vO(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=As(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var yO=function(){function e(){this.group=new Hu,this.uid=Eh(`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}();He(yO),Ye(yO);var bO=xc(),xO={itemStyle:Xe(vp,!0),lineStyle:Xe(hp,!0)},SO={lineStyle:`stroke`,itemStyle:`fill`};function CO(e,t){return e.visualStyleMapper||xO[t]||(console.warn(`Unknown style type '`+t+`'.`),xO.itemStyle)}function wO(e,t){return e.visualDrawType||SO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var TO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=CO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=wO(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=A({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},EO=new xp,DO={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=CO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){EO.option=n[r];var o=i(EO);A(e.ensureUniqueItemVisual(t,`style`),o),EO.option.decal&&(e.setItemVisual(t,`decal`,EO.option.decal),EO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},OO={performRawSeries:!0,overallReset:function(e){var t=G();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();bO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=bO(e).scope,a=wO(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)}})}})}},kO=Math.PI;function AO(e,t){t||={},M(t,{text:`loading`,textColor:J.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:J.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Hu,r=new Bo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Go({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 Bo({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 Ed({shape:{startAngle:-kO/2,endAngle:-kO/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:kO*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:kO*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 jO=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):Yc(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,{});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;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)||j_({plan:IO,reset:LO,count:BO}));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||j_({reset:MO});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;ve(!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,j_({reset:NO,onDirty:FO})));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:VO(e)}),e.uid=Eh(`stageHandler`),t&&(e.visualType=t),e},e}();function MO(e){e.overallReset(e.ecModel,e.api,e.payload)}function NO(e){return e.dirtyOnOverallProgress&&PO}function PO(){this.agent.dirty(),this.getDownstream().dirty()}function FO(){this.agent&&this.agent.dirty()}function IO(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function LO(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=tc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?I(t,function(e,t){return zO(t)}):RO}var RO=zO(0);function zO(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 BO(e){return e.data.count()}function VO(e){WO=null;try{e(HO,UO)}catch{}return WO}var HO={},UO={},WO;GO(HO,PD),GO(UO,dl),HO.eachSeriesByType=HO.eachRawSeriesByType=function(e){WO=e},HO.eachComponent=function(e){e.mainType===`series`&&e.subType&&(WO=e.subType)};function GO(e,t){for(var n in t.prototype)e[n]=je}var Y=J.darkColor,KO=Y.background,qO=function(){return{axisLine:{lineStyle:{color:Y.axisLine}},splitLine:{lineStyle:{color:Y.axisSplitLine}},splitArea:{areaStyle:{color:[Y.backgroundTint,Y.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Y.axisMinorSplitLine}},axisLabel:{color:Y.axisLabel},axisName:{}}},JO={label:{color:Y.secondary},itemStyle:{borderColor:Y.borderTint},dividerLineStyle:{color:Y.border}},YO={darkMode:!0,color:Y.theme,backgroundColor:KO,axisPointer:{lineStyle:{color:Y.border},crossStyle:{color:Y.borderShade},label:{color:Y.tertiary}},legend:{textStyle:{color:Y.secondary},pageTextStyle:{color:Y.tertiary}},textStyle:{color:Y.secondary},title:{textStyle:{color:Y.primary},subtextStyle:{color:Y.quaternary}},toolbox:{iconStyle:{borderColor:Y.accent50},feature:{dataView:{backgroundColor:KO,textColor:Y.primary,textareaColor:Y.background,textareaBorderColor:Y.border,buttonColor:Y.accent50,buttonTextColor:Y.neutral00}}},tooltip:{backgroundColor:Y.neutral20,defaultBorderColor:Y.border,textStyle:{color:Y.tertiary}},dataZoom:{borderColor:Y.accent10,textStyle:{color:Y.tertiary},brushStyle:{color:Y.backgroundTint},handleStyle:{color:Y.neutral00,borderColor:Y.accent20},moveHandleStyle:{color:Y.accent40},emphasis:{handleStyle:{borderColor:Y.accent50}},dataBackground:{lineStyle:{color:Y.accent30},areaStyle:{color:Y.accent20}},selectedDataBackground:{lineStyle:{color:Y.accent50},areaStyle:{color:Y.accent30}}},visualMap:{textStyle:{color:Y.secondary},handleStyle:{borderColor:Y.neutral30}},timeline:{lineStyle:{color:Y.accent10},label:{color:Y.tertiary},controlStyle:{color:Y.accent30,borderColor:Y.accent30}},calendar:{itemStyle:{color:Y.neutral00,borderColor:Y.neutral20},dayLabel:{color:Y.tertiary},monthLabel:{color:Y.secondary},yearLabel:{color:Y.secondary}},matrix:{x:JO,y:JO,backgroundColor:{borderColor:Y.axisLine},body:{itemStyle:{borderColor:Y.borderTint}}},timeAxis:qO(),logAxis:qO(),valueAxis:qO(),categoryAxis:qO(),line:{symbol:`circle`},graph:{color:Y.theme},gauge:{title:{color:Y.secondary},axisLine:{lineStyle:{color:[[1,Y.neutral05]]}},axisLabel:{color:Y.axisLabel},detail:{color:Y.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:Y.background}},radar:function(){var e=qO();return e.axisName={color:Y.axisLabel},e.axisLine.lineStyle.color=Y.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:Y.neutral20,textStyle:{color:Y.secondary}},emphasis:{itemStyle:{color:Y.neutral30}}}},sunburst:{itemStyle:{borderColor:Y.background}},map:{itemStyle:{borderColor:Y.border,areaColor:Y.neutral10},label:{color:Y.tertiary},emphasis:{label:{color:Y.primary},itemStyle:{areaColor:Y.highlight}},select:{label:{color:Y.primary},itemStyle:{areaColor:Y.highlight}}},geo:{itemStyle:{borderColor:Y.border,areaColor:Y.neutral10},emphasis:{label:{color:Y.primary},itemStyle:{areaColor:Y.highlight}},select:{label:{color:Y.primary},itemStyle:{color:Y.highlight}}}};YO.categoryAxis.splitLine.show=!1;var XO=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(H(e)){var i=ze(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}(),ZO=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],QO=ZO.concat([`symbolKeepAspect`]),$O={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<ZO.length;o++){var s=ZO[o],c=e.get(s);V(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(A({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=L(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}}},ek={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<QO.length;r++){var i=QO[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function tk(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 nk(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 rk(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 ik(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var ak=new Ui,ok={};function sk(e,t){ok[e]=t}function ck(e){return ok[e]}var lk={};function uk(e,t){lk[e]=t}var dk=Math.round(Math.random()*9),fk=typeof Object.defineProperty==`function`,pk=function(){function e(){this._id=`__ec_inner_`+dk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return fk?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 mk(e){return isFinite(e)}function hk(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=mk(r)?r:0,i=mk(i)?i:1,a=mk(a)?a:0,o=mk(o)?o:0,e.createLinearGradient(r,a,i,o)}function gk(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=mk(o)?o:.5,s=mk(s)?s:.5,c=c>=0&&mk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function _k(e,t,n){for(var r=t.type===`radial`?gk(e,t,n):hk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function vk(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 yk(e){return parseInt(e,10)}function bk(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]||yk(s[r])||yk(e.style[r]))-(yk(s[a])||0)-(yk(s[o])||0)||0}function xk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:se(e)?[e]:B(e)?e:null}function Sk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&xk(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 Ck=new eo(!0);function wk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Tk(e){return typeof e==`string`&&e!==`none`}function Ek(e){var t=e.fill;return t!=null&&t!==`none`}function Dk(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 Ok(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 kk(e,t,n){var r=it(t.image,t.__image,n);if(ot(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)*Me),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Ak(e,t,n,r,i){var a,o=wk(n),s=Ek(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Ck,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?_k(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?_k(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?kk(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?kk(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=Sk(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&&Ok(e,n),s&&Dk(e,n)):(s&&Dk(e,n),o&&Ok(e,n)),T&&e.setLineDash([])}function jk(e,t,n){var r=t.__image=it(n.image,t.__image,t,t.onload);if(r&&ot(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 Mk(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=Sk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(wk(n)&&e.strokeText(i,n.x,n.y),Ek(n)&&e.fillText(i,n.x,n.y)):(Ek(n)&&e.fillText(i,n.x,n.y),wk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Nk=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Pk=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Fk(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Kk(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ma.opacity:o}(r||t.blend!==n.blend)&&(a||=(Kk(e,i),!0),e.globalCompositeOperation=t.blend||ma.blend);for(var s=0;s<Nk.length;s++){var c=Nk[s];(r||t[c]!==n[c])&&(a||=(Kk(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(Kk(e,i),!0),e.shadowColor=t.shadowColor||ma.shadowColor),a}function Ik(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=Fk(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(Kk(e,i),!0),Tk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(Kk(e,i),!0),Tk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(Kk(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||=(Kk(e,i),!0),e.lineWidth=c)}for(var l=0;l<Pk.length;l++){var u=Pk[l],d=u[0];(r||a[d]!==o[d])&&(s||=(Kk(e,i),!0),e[d]=a[d]||u[1])}return s}function Lk(e,t,n,r,i){return Fk(e,t.style,n&&n.style,r,i)}function Rk(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 zk(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),Rk(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function Bk(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 Vk=1,Hk=2,Uk=3,Wk=4;function Gk(e){var t=Ek(e),n=wk(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 Kk(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function qk(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};Jk(e,t,n),Yk(e,n)}function Jk(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||vk(i,a))&&(a&&(Kk(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(Kk(e,n),e.save(),zk(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 Eo&&t.autoBatch&&Gk(o);s||Bk(r,l.transform)?(Kk(e,n),Rk(e,t)):u||Kk(e,n),t instanceof Eo?(n.lastDrawType!==Vk&&(c=!0,n.lastDrawType=Vk),Ik(e,t,l,c,n),u&&(n.batchFill||n.batchStroke)||e.beginPath(),Ak(e,t,o,u,n)):t instanceof Oo?(n.lastDrawType!==Uk&&(c=!0,n.lastDrawType=Uk),Ik(e,t,l,c,n),Mk(e,t,o)):t instanceof Mo?(n.lastDrawType!==Hk&&(c=!0,n.lastDrawType=Hk),Lk(e,t,l,c,n),jk(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==Wk&&(c=!0,n.lastDrawType=Wk),Xk(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&Kk(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}}function Yk(e,t){Kk(e,t),t.prevElClipPaths&&e.restore()}function Xk(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(),Jk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}Yk(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Jk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}Yk(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Zk=new pk,Qk=new tt(100),$k=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function eA(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&Zk.delete(e);var a=Zk.get(e);if(a)return a;var o=M(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,Zk.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<$k.length;++s){var c=o[$k[s]];if(c!=null&&!B(c)&&!H(c)&&!se(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=Qk.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=nA(o.dashArrayX),p=rA(o.dashArrayY),m=tA(o.symbol),h=iA(d),g=aA(p),_=!i&&f.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&&Qk.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=Ws(e,h[t]);for(var r=1,t=0,n=m.length;t<n;++t)r=Ws(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,f=0,h=0,x=0;f<y.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(h%2==0){var C=(1-o.symbolSize)*.5,w=f+d[l][h]*C,T=a+p[s]*C,E=d[l][h]*o.symbolSize,D=p[s]*o.symbolSize,O=x/2%m[u].length;k(w,T,E,D,m[u][O])}f+=d[l][h],++x,++h,h===d[l].length&&(h=0)}++l,l===d.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=Lv(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 qk(b,u)}}}}function tA(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 tA([e]);for(var r=[],n=0;n<e.length;++n)H(e[n])?r.push([e[n]]):r.push(e[n]);return r}function nA(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 nA([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=I(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function rA(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=I(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function iA(e){return I(e,function(e){return aA(e)})}function aA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var oA=Zc(sA);function sA(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=eA(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=eA(i,t)}}})}var cA=1,lA=800,uA=900,dA=920,fA=1e3,pA=2e3,mA=5e3,hA=1e3,gA=1100,_A=2e3,vA=3e3,yA=4e3,bA=4500,xA=4600,SA=5e3,CA=6e3,wA=7e3,TA={PROCESSOR:{SERIES_FILTER:lA,AXIS_STATISTICS:dA,FILTER:fA,STATISTIC:mA,STATISTICS:mA},VISUAL:{LAYOUT:hA,PROGRESSIVE_LAYOUT:gA,GLOBAL:_A,CHART:vA,POST_CHART_LAYOUT:xA,COMPONENT:yA,BRUSH:SA,CHART_ITEM:bA,ARIA:CA,DECAL:wA}},EA=`__flagInMainProcess`,DA=`__mainProcessVersion`,OA=`__pendingUpdate`,kA=`__needsUpdateStatus`,AA=/^[a-zA-Z0-9_]+$/,jA=`__connectUpdateStatus`,MA=0,NA=1,PA=2;function FA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed())this.id;else return LA(this,e,t)}}function IA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return LA(this,e,t)}}function LA(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Ui.prototype[t].apply(e,n)}var RA=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ui),zA=RA.prototype;zA.on=IA(`on`),zA.off=IA(`off`);var BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj,ij,aj=function(e){a(t,e);function t(t,n,r){var i=e.call(this,new XO)||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[DA]=1,r.ssr&&xD(function(e){var t=Qc(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=_D(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=Cw(R(c.flush,c),17),i._updateTheme(n),i._locale=$h(r.locale||Zh),i._coordSysMgr=new ih;var l=i._api=ej(i);function u(e,t){return e.__prio-t.__prio}return zE(pj,u),zE(dj,u),i._scheduler=new jO(i,l,dj,pj),i._messageCenter=new RA,i._initEvents(),i.resize=R(i.resize,i),c.animation.on(`frame`,i._onframe,i),YA(c,i),XA(c,i),xe(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(rj(this),this[OA]){var r=this[OA].silent;this[EA]=!0,ij(this);try{BA(this),UA.update.call(this,null,this[OA].updateParams)}catch(e){throw this[EA]=!1,this[OA]=null,e}this._zr.flush(),this[EA]=!1,this[OA]=null,qA.call(this,r),JA.call(this,r)}else if(e.unfinished){var i=cA;do{e.unfinished=!1;var a=f.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),GA(this,t),e.performVisualTasks(t),$A(this,this._model,n,`remain`,{}),i-=f.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[EA]){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[EA]=!0,ij(this),!this._model||t){var o=new VD(this._api),s=this._theme,c=this._model=new PD;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},fj);var l={seriesTransition:a,optionChanged:!0};if(n)this[OA]={silent:r,updateParams:l},this[EA]=!1,this.getZr().wakeUp();else{try{BA(this),UA.update.call(this,null,l)}catch(e){throw this[OA]=null,this[EA]=!1,e}this._ssr||this._zr.flush(),this[OA]=null,this[EA]=!1,qA.call(this,r),JA.call(this,r)}}}},t.prototype.setTheme=function(e,t){if(!this[EA]){if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[OA]&&(r??=this[OA].silent,i=this[OA].updateParams,this[OA]=null),this[EA]=!0,ij(this);try{this._updateTheme(e),n.setTheme(this._theme),BA(this),UA.update.call(this,{type:`setTheme`},i)}catch(e){throw this[EA]=!1,e}this[EA]=!1,qA.call(this,r),JA.call(this,r)}}}},t.prototype._updateTheme=function(e){H(e)&&(e=mj[e]),e&&(e=O(e),e&&hO(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||Pe.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(_j[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();F(gj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(O(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*=d,s*=d,c*=d,l*=d;var p=c-o,m=l-s,h=f.createCanvas(),g=_D(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 Bo({shape:{x:0,y:0,width:p,height:m},style:{fill:e.connectedBackgroundColor}})),F(u,function(e){var t=new Mo({style:{x:e.left*d-o,y:e.top*d-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 WA(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return WA(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return WA(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed)this.id;else{var n=this._model,r;return F(Cc(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=Cc(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?nk(i,t):tk(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(sj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&ik(i,function(e){var t=Qc(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=A({},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(uj,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),sT(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()&&kc(this.getDom(),yj,``);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 gj[e.id]}},t.prototype.resize=function(e){if(!this[EA]){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[OA]&&(r??=this[OA].silent,n=!0,this[OA]=null),this[EA]=!0,ij(this);try{n&&BA(this),UA.update.call(this,{type:`resize`,animation:A({duration:0},e&&e.animation)})}catch(e){throw this[EA]=!1,e}this[EA]=!1,qA.call(this,r),JA.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(),hj[e]){var n=hj[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=A({},e);return t.type=lj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(U(t)||(t={silent:!!t}),cj[e.type]&&this._model){if(this[EA])this._pendingActions.push(e);else{var n=t.silent;KA.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),qA.call(this,n),JA.call(this,n)}}},t.prototype.updateLabelLayout=function(){ak.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(){BA=function(e){zx(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),VA(e,!0),VA(e,!1),t.plan()},VA=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=ze(e.type);u=new(t?yO.getClass(d.main,d.sub):gy.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)}},HA=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=Oc(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=G(),F(tc(s),function(e){var t=hc(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(vu(n)){if(t instanceof Sv)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&eu(t,n,e._api);else{var r=tu(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&$l(t.mainType,t.componentIndex,e._api),a&&F(a,function(e){n.type===`highlight`?Wl(e):Gl(e)})}}else _u(n)&&t instanceof Sv&&(iu(t,n,e._api),au(t),nj(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)}},UA={prepareAndUpdate:function(e){BA(this),UA.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){Bx(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),ak.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),GA(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),ZA(this,r,i,e,n),ak.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}),$A(t,n,r,e,{},a),ak.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),gy.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),ZA(this,n,this._api,e,{}),ak.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()}),gy.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)}),ak.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){UA.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=Cc(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}}WA=e,GA=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},KA=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=cj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&ze(s[0]);this[EA]=!0,ij(this);var u=[e],d=!1;e.batch&&(d=!0,u=I(e.batch,function(t){return t=M(A({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=_u(e),_=vu(e);if(_&&Zl(this._api),F(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=A({},t),p.type=h,f.push(p),_){var a=wc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;HA(n,c,t,u),nj(n)}else g?(HA(n,c,t,`series`),nj(n)):l&&HA(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[OA]?(BA(this),UA.update.call(this,e),this[OA]=null):UA[c].call(this,e)}catch(e){throw this[EA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[EA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;ve(U(y)),v=M({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)}},qA=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();KA.call(this,n,e)}},JA=function(e){!e&&this.trigger(`updated`)},YA=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[OA]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},XA=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=ik(n,hu);r&&(nu(r,e,t._api),nj(t))}).on(`mouseout`,function(e){var n=e.target,r=ik(n,hu);r&&(ru(r,e,t._api),nj(t))}).on(`click`,function(e){var n=e.target,r=ik(n,function(e){return Qc(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Qc(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;zE(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)})}}ZA=function(e,t,r,i,a){n(t),QA(e,t,r,i,a),F(e._chartsViews,function(e){e.__alive=!1}),$A(e,t,r,i,a),F(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},QA=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)})},$A=function(e,t,n,r,a,u){var d=e._scheduler;a=A(a||{},{updatedSeries:t.getSeries()}),ak.trigger(`series:beforeupdate`,t,n,a);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),au(t)}),d.unfinished=f||d.unfinished,ak.trigger(`series:layoutlabels`,t,n,a),ak.trigger(`series:transition`,t,n,a),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];s(t,n),l(t,n)}),i(e,t),ak.trigger(`series:afterupdate`,t,n,a)},nj=function(e){e[kA]=!0,e.getZr().wakeUp()},ij=function(e){e[DA]=(e[DA]+1)%1e6},rj=function(e){e[kA]&&(e.getZr().storage.traverse(function(e){qd(e)||r(e)}),e[kA]=!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 i(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`),ED.hoverLayerThreshold)&&!Pe.node&&!Pe.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=zf(e);t.eachRendered(function(e){return Vf(e,n.z,n.zlevel),!0})}}function c(e,t){t.eachRendered(function(e){if(!qd(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(qd(e))return;if(e instanceof Eo&&yu(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)}})}ej=function(e){return new(function(t){a(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){Wl(t,n),nj(e)},n.prototype.leaveEmphasis=function(t,n){Gl(t,n),nj(e)},n.prototype.enterBlur=function(t){Kl(t),nj(e)},n.prototype.leaveBlur=function(t){ql(t),nj(e)},n.prototype.enterSelect=function(t){Jl(t),nj(e)},n.prototype.leaveSelect=function(t){Yl(t),nj(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[DA]},n.prototype.usingTHL=function(){return e._usingTHL},n}(dl))(e)},tj=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[jA]=t}}F(lj,function(n,r){e._messageCenter.on(r,function(n){if(_j[e.group]&&e[jA]!==MA){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];F(gj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,MA),F(i,function(e){e[jA]!==NA&&e.dispatchAction(r)}),t(i,PA)}})})}}(),t}(Ui),oj=aj.prototype;oj.on=FA(`on`),oj.off=FA(`off`),oj.one=function(e,t,n){var r=this;function i(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var sj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],cj={},lj={},uj={},dj=[],fj=[],pj=[],mj={},hj={},gj={},_j={},vj=new Date-0;new Date-0;var yj=`_echarts_instance_`;function bj(e,t,n){var r=!(n&&n.ssr);if(r){var i=xj(e);if(i)return i}var a=new aj(e,t,n);return a.id=`ec_`+vj++,gj[a.id]=a,r&&kc(e,yj,a.id),tj(a),ak.trigger(`afterinit`,a),a}function xj(e){return gj[Ac(e,yj)]}function Sj(e,t){mj[e]=t}function Cj(e){N(fj,e)<0&&fj.push(e)}function wj(e,t){Nj(dj,e,t,pA)}function Tj(e){Dj(`afterinit`,e)}function Ej(e){Dj(`afterupdate`,e)}function Dj(e,t){ak.on(e,t)}function Oj(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;cj[r]||(ve(AA.test(r)&&AA.test(i)),a&&ve(i!==r),cj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},uj[i]=1,a&&s&&(uj[l]=1),lj[l]=r)}function kj(e,t){ih.register(e,t)}function Aj(e,t){Nj(pj,e,t,hA,`layout`,!0)}function jj(e,t){Nj(pj,e,t,vA,`visual`,!0)}var Mj=[];function Nj(e,t,n,r,i,a){if((V(t)||U(t))&&(n=t,t=r),!(N(Mj,n)>=0)){Mj.push(n);var o=jO.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function Pj(e,t){hj[e]=t}function Fj(e,t,n){var r=ck(`registerMap`);r&&r(e,t,n)}var Ij=V_;jj(_A,TO),jj(bA,DO),jj(bA,OO),jj(_A,$O),jj(bA,ek),jj(wA,oA),Cj(hO),wj(uA,gO),Pj(`default`,AO),Oj({type:yl,event:yl,update:yl},je),Oj({type:bl,event:bl,update:bl},je),Oj({type:xl,event:wl,update:xl,action:je,refineEvent:Lj,publishNonRefinedEvent:!0}),Oj({type:Sl,event:wl,update:Sl,action:je,refineEvent:Lj,publishNonRefinedEvent:!0}),Oj({type:Cl,event:wl,update:Cl,action:je,refineEvent:Lj,publishNonRefinedEvent:!0});function Lj(e,t,n,r){return{eventContent:{selected:ou(n),isFromClick:t.isFromClick||!1}}}Sj(`default`,{}),Sj(`dark`,YO);var Rj=[],zj={registerPreprocessor:Cj,registerProcessor:wj,registerPostInit:Tj,registerPostUpdate:Ej,registerUpdateLifecycle:Dj,registerAction:Oj,registerCoordinateSystem:kj,registerLayout:Aj,registerVisual:jj,registerTransform:Ij,registerLoading:Pj,registerMap:Fj,registerImpl:sk,PRIORITY:TA,ComponentModel:y_,ComponentView:yO,SeriesModel:Sv,ChartView:gy,registerComponentModel:function(e){y_.registerClass(e)},registerComponentView:function(e){yO.registerClass(e)},registerSeriesModel:function(e){Sv.registerClass(e)},registerChartView:function(e){gy.registerClass(e)},registerCustomSeries:function(e,t){uk(e,t)},registerSubTypeDefaulter:function(e,t){y_.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){vD(e,t)}};function Bj(e){B(e)?F(e,function(e){Bj(e)}):N(Rj,e)>=0||(Rj.push(e),V(e)&&(e={install:e}),e.install(zj))}var Vj=function(e){a(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 Sh(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:J.color.primary}},universalTransition:{divideShape:`clone`}},t}(Sv),Hj=4,Uj=function(){function e(){}return e}(),Wj=function(e){a(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 Uj},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]<Hj,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}(Eo),Gj=function(){function e(){this.group=new Hu}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 Wj({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=Lv(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<Hj;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=Qc(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}(),Kj=function(e){a(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,qj(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(),Jc(t),qj(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=ux(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(qj(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 Gj:new Yv,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}(gy);function qj(e){return{clipShape:Ty(e)}}var Jj=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),Yj=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tc).models[0]},t.type=`cartesian2dAxis`,t}(y_);P(Yj,Jj);var Xj={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:J.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:J.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:J.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[J.color.backgroundTint,J.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:J.color.neutral00,borderColor:J.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},Zj=k({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},Xj),Qj=k({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:J.color.axisMinorSplitLine,width:1}}},Xj),$j={category:Zj,value:Qj,time:k({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},Qj),log:M({logBase:10},Qj)};function eM(e,t,n,r){F(Ob,function(i,o){var s=k(k({},$j[o],!0),r,!0),c=function(e){a(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=m_(this),r=n?g_(e):{};k(e,t.getTheme().get(o+`Axis`)),k(e,this.getDefaultOption()),e.type=tM(e),n&&h_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Ny.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=LS();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+o,n.defaultOption=s,n}(n);e.registerComponentModel(c)}),e.registerSubTypeDefaulter(t+`Axis`,tM)}function tM(e){return e.type||(e.data?`category`:`value`)}var nM=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(),re(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}(),rM=[`x`,`y`];function iM(e){return(e.type===`interval`||e.type===`time`)&&!sg(e)}var aM=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=aw,t.dimensions=rM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(iM(e)&&iM(t)){var n=By(e,null),r=By(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=mt([],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 At(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 At(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}(nM);function oM(e,t){var n=e.scale,r=e.model,i=KC(n,r,r.ecModel,e,null),a=Yy(n),o=Yy(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=us(l[0].value-l[1].value),g=us(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=tb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*ls(c,2):Zy(E),D=Qy(E)}function j(){w=ws(k-E*f,D)}function M(){T=ws(O+E*p,D)}function N(){k=f?ws(w+E*f,D):w}function ee(){O=p?ws(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(),te=us(P[1]-P[0]);D=Os([T,w],te,.5/m),N(),ee(),Gs(D)&&(E=ws(E,D))}else{var F=C[1]-C[0];E=a?ls(Is(F),1):Rs(F/m,2),D=Qy(E),b[0]?(w=C[0],A(function(){if(N(),O=ws(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(ee(),k=ws(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=ws(ps(C[0]/E)*E,D),O=ws(fs(C[1]/E)*E,D);var e=ds((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=fs(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=ws(k-E*n[0],D),O=ws(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}Wb(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function sM(e,t){var n=Yy(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=tb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?lM(r,t):cM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Qy(d)),i[0]||(s[0]=ws(fs(s[0]/u)*u,l)),i[1]||(s[1]=ws(ps(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Wb(e,i,o,s,a,c)}function cM(e,t){var n=rb(t.splitNumber,5),r=Hy(e),i=t.minInterval,a=t.maxInterval,o=Rs(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Qy(o),c=e.getExtent(),l=[ws(ps(c[0]/o)*o,s),ws(fs(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function lM(e,t){var n=rb(t.splitNumber,10),r=e.getExtent(),i=Hy(e),a=ls(Is(i),1);n/i*a<=.5&&(a*=10);var o=Qy(a),s=[ws(ps(r[0]/a)*a,o),ws(fs(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function uM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;dM(t,n,r,i,null)}function dM(e,t,n,r,i){var a=KC(e,t,r,n,i),o=qy(e)||Jy(e);fM(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&&JC(n,e,a,r)}function fM(e,t){pM[e.type](e,t)}var pM={interval:sM,log:sM,time:bb,ordinal:je},mM=[[3,1],[0,2]],hM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=rM,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){BC(e,1);var t=e.scale;Xy(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=L(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):uM(i)}F(n,function(e){bM(e,e.__alignTo)?uM(e):oM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};F(n.x,function(e){_M(n,`y`,e,i)}),F(n.y,function(e){_M(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=d_(e,t),i=this._rect=l_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(SM(a,i),!n){var c=EM(i,o,a,s,t),l=void 0;if(s)wM?(wM(this._axesList,i),SM(a,i)):l=TM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=OM(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=TM(d,f,p,i,a,c,r))}DM(i,a,_x.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`,Tc).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Tc).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,N(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 aM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),yM(o.x),yM(o.y);function c(t){return function(n,r){if(gM(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=Ab(n),u=new _S(t,jb(n,l,!0),[0,0],l,c);u.onBand=Kb(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);N(t,i)<0&&t.push(i),N(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){zC(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;uh({targetModel:e,coordSysType:aw,coordSysProvider:r});function r(){var r=OC(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(aS(t,e,aw),aS(n,e,aw))},this),r},e.dimensions=rM,e.dimIdxMap=Fm(rM),e}();function gM(e,t){return e.getCoordSysModel()===t}function _M(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)vM(s,i[c])&&(a=i[c]);else for(var l in i)if(Ae(i,l)&&vM(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 vM(e,t){if(!t)return!1;var n=t.scale,r=Mb(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Pb(t)&&(i=!1),i}function yM(e){for(var t=L(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Ky(a.scale)&&Hb(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 bM(e,t){return sg(e.scale)||sg(t.scale)||t.scale.getTicks().length<2}function xM(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 SM(e,t){F(e.x,function(e){return CM(e,t.x,t.width)}),F(e.y,function(e){return CM(e,t.y,t.height)})}function CM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),xM(e,t)}var wM;function TM(e,t,n,r,i,a,o){DM(r,i,_x.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=ie(s,function(e){return e>0})==null;return kf(r,s,!0,!0,n),SM(i,r),c;function l(e){F(i[ef[e]],function(t){if(Vb(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(Gb(t.scale,XS(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=Bb(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[ef[n]]-t[ef[n]],a=t[tf[n]]+t[ef[n]]-(e[tf[n]]+e[ef[n]]);i=d(i,1-r),a=d(a,r);var o=mM[n][0],c=mM[n][1];s[o]=ls(s[o],i),s[c]=ls(s[c],a)}function d(e,t){return e>0&&!pe(t)&&t>1e-4&&(e/=t),e}}function EM(e,t,n,r,i){var a=new QS(kM);return F(n,function(n){return F(n,function(n){if(Vb(n.model)){var o=!r;n.axisBuilder=kC(e,t,n.model,i,a,o)}})}),a}function DM(e,t,n,r,i,a){var o=n===_x.determine;F(t,function(t){return F(t,function(t){Vb(t.model)&&(AC(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[ef[1-t]]=e[tf[t]]<=a.refContainer[tf[t]]*.5?0:1-t==1?2:1}F(t,function(e,t){return F(e,function(e){Vb(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function OM(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=l_(e.get(`outerBounds`,!0)||rw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||N([`all`,`axisLabel`],a)<0?`all`:a,s=[xs(W(e.get(`outerBoundsClampWidth`,!0),iw[0]),t.width),xs(W(e.get(`outerBoundsClampHeight`,!0),iw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var kM=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;nC(e,t,n,r,i,a),Bb(e.nameLocation)||F(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&iC(e.labelInfoList,e.dirVec,r,i)})};function AM(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return jM(n,e,t),n.seriesInvolved&&NM(n,e),n}function jM(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=BM(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(F(n.getAxes(),z(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,z(p,!d||`cross`,u)),d&&F(f.otherAxes,z(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||zM(d))){s??=d.get(`triggerTooltip`),d=r?MM(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=BM(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:zM(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=PM(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function MM(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]=O(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&&M(l,u.textStyle)}return e.model.getModel(`axisPointer`,new xp(c,n,r))}function NM(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[BM(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 PM(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(FM(a[r+`AxisId`],n.id)||FM(a[r+`AxisIndex`],n.componentIndex)||FM(a[r+`AxisName`],n.name))return i}}function FM(e,t){return e===`all`||B(e)&&N(e,t)>=0||e===t}function IM(e){var t=LM(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=zM(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 LM(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[BM(e)]}function RM(e){var t=LM(e);return t&&t.axisPointerModel}function zM(e){return!!e.get([`handle`,`show`])}function BM(e){return e.type+`||`+e.id}var VM={},HM=function(e){a(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&&IM(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=RM(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){VM[e]=t},t.getAxisPointerClass=function(e){return e&&VM[e]},t.type=`axis`,t}(yO),UM=xc();function WM(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=UM(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 Bo({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:M({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}UM(e).splitAreaColors=f}}}function GM(e){UM(e).splitAreaColors=null}var KM=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],qM=function(e){a(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 Hu,this.group.add(this._axisGroup),Vb(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),F(KM,function(e){t.get([e,`show`])&&JM[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||xf(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){GM(this)},t.type=`cartesianAxis`,t}(HM),JM={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 bd({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:M({stroke:c[x]},_),silent:!0});pf(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 bd({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});pf(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){WM(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=LS(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},YM=function(e){a(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(qM),XM=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=YM.type,t}return t.type=`yAxis`,t}(qM),ZM=function(e){a(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 Bo({shape:e.coordinateSystem.getRect(),style:M({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(yO),QM={offset:0};function $M(e){e.registerComponentView(ZM),e.registerComponentModel(ow),e.registerCoordinateSystem(`cartesian2d`,hM),eM(e,`x`,Yj,QM),eM(e,`y`,Yj,QM),e.registerComponentView(YM),e.registerComponentView(XM),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function eN(e){Bj($M),e.registerSeriesModel(Vj),e.registerChartView(Kj),e.registerLayout(ux(`scatter`))}var tN=xc();function nN(e,t){return!!tN(e)[t]}Oj({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},je);var rN={axisPointer:1,tooltip:1,brush:1};function iN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||rN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=zf(r),o=zf(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var aN=function(e){a(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=R(n._mousedownHandler,n),i=R(n._mousemoveHandler,n),a=R(n._mouseupHandler,n),o=R(n._mousewheelHandler,n),s=R(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=zf(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:W(c.z2,-1/0)},p=A({},n.triggerInfo);this._opt=M(A({},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`)&&(lN(t,`mousedown`,r,f),lN(t,`mousemove`,i,f),lN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(lN(t,`mousewheel`,o,f),lN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,uN(t,`mousedown`,r),uN(t,`mousemove`,i),uN(t,`mouseup`,a),uN(t,`mousewheel`,o),uN(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(iN(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(!(mE(e)||oN(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`||nN(t,`globalPan`)||oN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!mN(`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&&pE(e.event),e.__ecRoamConsumed=!0,pN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}}},t.prototype._mouseupHandler=function(e){if(!oN(e)){var t=this._zr;if(!mE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!oN(e)){var t=mN(`zoomOnMouseWheel`,e,this._opt),n=mN(`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(!(nN(this._zr,`globalPan`)||oN(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)&&(pE(r.event),r.__ecRoamConsumed=!0,pN(e,t,n,r,i))},t}(Ui);function oN(e){return e.__ecRoamConsumed}var sN=xc();function cN(e){var t=sN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function lN(e,t,n,r){for(var i=cN(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}),dN(e,t)}function uN(e,t,n){for(var r=cN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||fN(e,t);return}}function dN(e,t){var n=cN(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 fN(e,t){var n=cN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function pN(e,t,n,r,i){i.isAvailableBehavior=R(mN,null,n,r),e.trigger(t,i)}function mN(e,t,n){var r=n[e];return!e||r&&(!H(r)||t.event[r+`Key`])}function hN(e){return e}var gN=`view`,_N=function(e){a(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=gN,i.dimensions=[`x`,`y`];var a=hN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Xn(),o[1]=Xn(),o[2]=Xn(),a.mtRaw=st(),a.mtRawInv=st(),a.mtOverall=st(),a.mtOverallInv=st(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return yN(null,this)},t.prototype.getViewRect=function(){return bN(null,this)},t.prototype.getRoamTransform=function(){return Yn(hN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?hN(this).mtRaw:hN(this).mtOverall;return n||=[],r?At(n,e,r):gt(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=hN(this).mtOverallInv;return r?At(n,e,r):gt(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=BN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=BN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=hN(this);return Yt(vN,t.dataRect),Zt(vN,vN,t.mtOverall),Qt(vN,e[0],e[1])},t.dimensions=[`x`,`y`],t}(Jn),vN=qt();function yN(e,t){return Yt(e||qt(),hN(t).dataRect)}function bN(e,t){return Yt(e||qt(),hN(t).viewRect)}function xN(e,t,n){return Qn(e||Xn(),hN(t).trans[n])}function SN(e){return!!(e.dataRect&&e.viewRect)}function CN(e,t,n,r){r===1?LN(e,t.trans[0],n):Qn(e,n)}function wN(e,t,n){Yn(n,TN),ut(TN,TN,t.mtRawInv),Wf(e,TN)}var TN=st();function EN(e,t){var n=hN(e);n.centerOption=t.getShallow(`center`);var r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=aP(t.getShallow(`zoom`)||1,r)||1,SN(n)&&kN(n)}function DN(e,t,n,r,i){var a=hN(e);a.dataRect=new K(t,n,r,i),SN(a)&&kN(a)}function ON(e,t,n,r,i){var a=hN(e);a.viewRect=new K(t,n,r,i),SN(a)&&kN(a)}function kN(e){AN(e),NN(e),FN(e)}function AN(e){var t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=Yt(MN,t),t.y=-t.y-t.height),Xt(jN,t,n),Wf(r,jN),i&&(r.scaleY=-r.scaleY);var a=Yn(r,e.mtRaw);mt(e.mtRawInv,a)}var jN=st(),MN=qt();function NN(e){var t=VN(e),n=QN(PN,e,e.centerOption)?At(PN,PN,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 PN=[];function FN(e){var t=e.trans,n=t[1],r=t[0],i=t[2];LN(i,r,n);var a=Yn(i,e.mtOverall),o=mt(e.mtOverallInv,a);IN(e,i,a,o),IN(e.lgGeo,i,a,o)}function IN(e,t,n,r){e&&(Qn(e,t),lt(e.transform||=[],n),lt(e.invTransform||=[],r))}function LN(e,t,n){Yn(t,RN),Yn(n,zN),ut(zN,zN,RN),Wf(e,zN)}var RN=st(),zN=st();function BN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function VN(e){var t=e.viewRect;return HN[0]=t.x+t.width/2,HN[1]=t.y+t.height/2,HN}var HN=[];function UN(e,t,n,r){var i=hN(n);i.syncBackEl=e,i.syncBackType=t,r?Gd(e,xN(null,n,t),r):(xN(e,n,t),e.dirty())}function WN(e,t,n,r){var i=hN(e),a=i.syncBackEl;a?(a.stopAnimation(),CN(GN,i,a,i.syncBackType)):Qn(GN,i.trans[2]),wN(KN,i,GN),r?XN(GN,KN,i,r):Qn(GN,KN),wN(GN,i,GN),nP(i,t,n,GN)}var GN=Xn(),KN=Xn();function qN(e,t,n){var r=JN(t);r&&(WN(r,t,n,e),EN(r,t))}function JN(e){return e.__ownRoamView?e.__ownRoamView():null}function YN(e,t,n,r){n.setUpdatePayload(Uf(e));var i=fl(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function XN(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=ZN(t),o=aP(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 ZN(e){return e.scaleX}function QN(e,t,n){var r=t.dataRect;if(!n)return!1;var i=t.lgCt;return i?vt(e,q(n[0],i.w),q(n[1],i.h)):r&&vt(e,q(n[0],r.width,r.x),q(n[1],r.height,r.y)),!0}function $N(e,t){var n=e.centerOption,r=e.dataRect;return!n||e.lgCt?t.slice():[eP(0,t,n,r),eP(1,t,n,r)]}function eP(e,t,n,r){return n&&r&&r[tf[e]]&&Ss(n[e])?(t[e]-r[ef[e]])/r[tf[e]]*100+`%`:t[e]}function tP(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function nP(e,t,n,r){var i=VN(e),a=ZN(r),o=us(a)>1e-6;rP[0]=o?(i[0]-r.x)/a:i[0],rP[1]=o?(i[1]-r.y)/a:i[1],At(rP,rP,e.mtRawInv);var s=$N(e,rP);iP(t,s,a),F(n,function(e){e!==t&&iP(e,s.slice(),a)})}var rP=[];function iP(e,t,n){var r=e.option;r.center=t,r.zoom=n}function aP(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 oP(e,t,n,r,i,a,o,s){if(!JN(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=Uf(M({type:uP(r,e.subType,ll)},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 sP(e){return function(t,n,r){return cP.copy(e.getBoundingRect()),cP.applyTransform(e.getComputedTransform()),cP.contain(n,r)}}var cP=new K(0,0,0,0);function lP(e,t,n){var r=uP(t,n,ll);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Oc(e,t,n),function(t){qN(e,t),YN(e,t,r,i)})})}function uP(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function dP(e,t,n,r,i,a,o){var s=new _N(null,tP(e.ecModel,t));return DN(s,n,r,i,a),o?ON(s,o.x,o.y,o.width,o.height):ON(s,n,r,i,a),EN(s,e),s}var fP=xc();function pP(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,bP(t,n,e),F(n,function(n){F(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,z(mP,e))})}),t.wrapMethod(`cloneShallow`,z(gP,e)),F(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,z(hP,e))}),ve(n[t.dataType]===t)}function mP(e,t){if(yP(this)){var n=A({},fP(this).datas);n[this.dataType]=t,bP(t,n,e)}else xP(t,this.dataType,fP(this).mainData,e);return t}function hP(e,t){return e.struct&&e.struct.update(),t}function gP(e,t){return F(fP(t).datas,function(n,r){n!==t&&xP(n.cloneShallow(),r,t,e)}),t}function _P(e){var t=fP(this).mainData;return e==null||t==null?t:fP(t).datas[e]}function vP(){var e=fP(this).mainData;return e==null?[{data:e}]:I(L(fP(e).datas),function(t){return{type:t,data:fP(e).datas[t]}})}function yP(e){return fP(e).mainData===e}function bP(e,t,n){fP(e).datas={},F(t,function(t,r){xP(t,r,e,n)})}function xP(e,t,n,r){fP(n).datas[t]=e,fP(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=_P,e.getLinkedDataAll=vP}var SP=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}(),CP=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 SP(hc(e.name,``),i);t?wP(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=$m(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Qm(c,n);return l.initData(a),r&&r(l),pP({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function wP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function TP(e,t,n){if(e&&N(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 EP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function DP(e,t){return N(EP(e),t)>=0}function OP(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 kP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function AP(e){for(var t=0;t<kP.length;t++)e.registerAction({type:kP[t],update:`updateView`},je);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=TP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=DP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function jP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=w_(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var MP=function(e){a(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};NP(n);var r=e.levels||[],i=new xp({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=PP(r,t);var a=I(r||[],function(e){return new xp(e,i,t)},this),o=CP.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 nv(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=OP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},A(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(){jP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:J.size.l,top:J.size.xxxl,right:J.size.l,bottom:J.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:J.size.m,emptyItemWidth:25,itemStyle:{color:J.color.backgroundShade,textStyle:{color:J.color.secondary}},emphasis:{itemStyle:{color:J.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:J.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:J.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}(Sv);function NP(e){var t=0;F(e.children,function(e){NP(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 PP(e,t){var n=tc(t.get(`color`)),r=tc(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new xp(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 FP=8,IP=8,LP=5,RP=function(){function e(e){this.group=new Hu,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=d_(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=l_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),f_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=hc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+FP*2,t.emptyItemWidth);t.totalWidth+=o+IP,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 hd({shape:{points:zP(c,0,_,u,m===f.length-1,m===0)},style:M(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Go({style:Qf(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:z(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Qf(o,{text:v}),y.ensureState(`emphasis`).style=p,lu(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),BP(y,e,g),c+=_+IP}},e.prototype.remove=function(){this.group.removeAll()},e}();function zP(e,t,n,r,i,a){var o=[[i?e:e-LP,t],[e+n,t],[e+n,t+r],[i?e:e-LP,t+r]];return!a&&o.splice(2,0,[e+n+LP,t+r/2]),!i&&o.push([e,t+r/2]),o}function BP(e,t,n){Qc(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&&OP(n,t)}}var VP=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 HP(){return new VP}var UP=Math.max,WP=Math.min,GP=F,KP=[`itemStyle`,`borderWidth`],qP=[`itemStyle`,`gapWidth`],JP=[`upperLabel`,`show`],YP=[`upperLabel`,`height`],XP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=d_(e,n).refContainer,o=l_(e.getBoxLayoutParams(),a),s=r&&r.type,c=TP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=EP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,iF(e,c,u,o)):l?(f=!0,A({},l)):A({},o);if(f){var m=cF(o,p);m=lF(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(_),ZP(u,g,!1,0),_=u.getLayout(),GP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(A({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(aF(o,l,c),!0),e.setLayoutInfo(o),oF(v,new K(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function ZP(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(KP),l=s.get(qP)/2,u=sF(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=UP(i-2*f,0),a=UP(a-f-p,0);var m=i*a,h=QP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=WP(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=nF(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,rF(y,_,g,l,!1),_=WP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&rF(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++)ZP(h[b],t,n,r+1)}}}function QP(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=re(o,function(e){return!e.isRemoved()}),eF(o,s);var l=tF(t,o,s);if(l.sum===0||(l.sum=$P(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 $P(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 eF(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 tF(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=Pc(),GP(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 nF(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?UP(l*r/c,c/(l*i)):1/0}function rF(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]]=UP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=UP(v-2*r,0);m[s[o]]=n[s[o]]+WP(r,g/2),m[s[a]]=l+WP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function iF(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=A({},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(KP),v=Math.max(_,sF(g));u+=4*_*_+(3*_+v)*u**.5,u>js&&(u=js),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function aF(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 oF(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);GP(e.viewChildren||[],function(e){oF(e,c,n,r,i+1)})}}function sF(e){return e.get(JP)?e.get(YP):0}function cF(e,t){return t.width/e.width||t.height/e.height||1}function lF(e,t){return aP(e,t.get(`scaleLimit`,!0))}var uF=Hu,dF=Bo,fF=3,pF=`label`,mF=`upperLabel`,hF=100,gF=20,_F=30,vF=Xe([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),yF=function(e){var t=vF(e);return t.stroke=t.fill=t.lineWidth=null,t},bF=xc(),xF=function(e){a(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=SF(),n}return t.prototype.render=function(e,t,n,r){if(!(N(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=TP(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 uF,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=SF(),o=SF(),s=this._storage,c=[];function l(e,r,i,l){return CF(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 wp(t,e,a,a).add(o).update(o).remove(z(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=SF();return e&&F(e,function(e,n){var r=t[n];F(e,function(e){e&&(r.push(e),bF(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=HP();F(t.willDeleteEls,function(e,t){F(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=bF(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 Hu?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=A({},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(R(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 aN(e.getZr()),r.on(`pan`,R(this._onPan,this)),r.on(`zoom`,R(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)>fF||Math.abs(e.dy)>fF)){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=cF(c,o),u=l*r;u=lF(u,i);var d=u/l;t-=c.x,n-=c.y;var f=st();dt(f,f,[-t,-n]),pt(f,f,[d,d]),dt(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&&e_(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 RP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(DP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=SF(),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}(gy);function SF(){return{nodeGroup:[],background:[],content:[]}}function CF(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`,uF);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),bF(D).nodeWidth=p,bF(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=L(`background`,dF,l,gF);O&&F(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),j=k.get(`focus`),M=k.get(`blurScope`),N=k.get(`disabled`),ee=j===`ancestor`?o.getAncestorsIndices():j===`descendant`?o.getDescendantIndices():j;if(x)hu(D)&&mu(D,!1),O&&(mu(O,!N),d.setItemGraphicEl(o.dataIndex,O),uu(O,ee,M));else{var P=L(`content`,dF,l,_F);P&&I(D,P),O.disableMorphing=!0,O&&hu(O)&&mu(O,!1),mu(D,!N),d.setItemGraphicEl(o.dataIndex,D);var te=f.getShallow(`cursor`);te&&P.attr(`cursor`,te),uu(D,ee,M)}return D;function F(t,n,r){var i=Qc(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)ne(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=yF(S);c.fill=s;var l=vF(C);l.fill=C.get(`borderColor`);var u=vF(w);u.fill=w.get(`borderColor`);var d=vF(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;re(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,Vl(n)}t.add(n)}function I(t,n){var r=Qc(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)ne(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=yF(S);l.fill=c,l.decal=s.decal;var u=vF(C),d=vF(w),f=vF(T);re(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Vl(n)}t.add(n)}function ne(e){!e.invisible&&a.push(e)}function re(t,n,r,i){var a=f.getModel(i?mF:pF),s=hc(f.get(`name`),null),c=a.getShallow(`show`);Xf(t,Zf(f,i?mF:pF),{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 va&&(s.z2=wF(a,o)),R(c,s)),t[e][_]=s}function ae(e,t){var n=e[_]={};t instanceof uF?(n.oldX=t.x,n.oldY=t.y):n.oldShape=A({},t.shape)}function R(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Hu;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 wF(e,t){return e*hF+t}var TF=F,EF=U,DF=-1,OF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=O(t);this.type=r,this.mappingMethod=n,this._normalizeData=BF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(jF(i),kF(i)):n===`category`?i.categories?AF(i):jF(i,!0):(ve(n!==`linear`||i.dataExtent),jF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return R(this._normalizeData,this)},e.listVisualTypes=function(){return L(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&&TF(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(EF(e)){var t=[];TF(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(VF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(VF(u[0],l[0],e))return a}else if(VF(u[0],l[0],e)&&VF(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:PF(`color`),getColorMapper:function(){var e=this.option;return R(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),FF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Gr(t,e.parsedVisual,r),i?r:Yr(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return Yr(Gr(e,this.option.parsedVisual),`rgba`)},category:FF,piecewise:function(e,t){var n=RF.call(this,t);return n??=Yr(Gr(e,this.option.parsedVisual),`rgba`),n},fixed:IF}},colorHue:MF(function(e,t){return qr(e,t)}),colorSaturation:MF(function(e,t){return qr(e,null,t)}),colorLightness:MF(function(e,t){return qr(e,null,null,t)}),colorAlpha:MF(function(e,t){return Jr(e,t)}),decal:{applyVisual:PF(`decal`),_normalizedToVisual:{linear:null,category:FF,piecewise:null,fixed:null}},opacity:{applyVisual:PF(`opacity`),_normalizedToVisual:LF([0,1])},liftZ:{applyVisual:PF(`liftZ`),_normalizedToVisual:{linear:IF,category:IF,piecewise:IF,fixed:IF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:NF,category:FF,piecewise:function(e,t){var n=RF.call(this,t);return n??=NF.call(this,e),n},fixed:IF}},symbolSize:{applyVisual:PF(`symbolSize`),_normalizedToVisual:LF([0,1])}},e}();function kF(e){var t=e.pieceList;e.hasSpecialVisual=!1,F(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function AF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(TF(t,function(e,t){n[e]=t}),!B(r)){var i=[];U(r)?TF(r,function(e,t){var r=n[t];i[r??DF]=e}):i[DF]=r,r=zF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function jF(e,t){var n=e.visual,r=[];U(n)?TF(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]),zF(e,r)}function MF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:LF([0,1])}}function NF(e){var t=this.option.visual;return t[Math.round(ys(e,[0,1],[0,t.length-1],!0))]||{}}function PF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function FF(e){var t=this.option.visual;return t[this.option.loop&&e!==DF?e%t.length:e]}function IF(){return this.option.visual[0]}function LF(e){return{linear:function(t){return ys(t,e,this.option.visual,!0)},category:FF,piecewise:function(t,n){var r=RF.call(this,n);return r??=ys(t,e,this.option.visual,!0),r},fixed:IF}}function RF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[OF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function zF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return Vr(e)||[0,0,0,1]})),t}var BF={linear:function(e){return ys(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=OF.findPieceIndex(e,t,!0);if(n!=null)return ys(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??DF},fixed:je};function VF(e,t,n){return e?t<=n:t<n}var HF=`itemStyle`,UF=xc(),WF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||GF(t,{},e.getViewRoot().getAncestors(),e)}};function GF(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(HF),c=KF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=qF(c),u=JF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=qF(c),l.fill=f;else{var m=XF(e,i,a,s,c,p);F(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&GF(e,QF(i,c,e,t,m,r),n,r)})}}}function KF(e,t,n){var r=A({},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 qF(e){var t=YF(e,`color`);if(t){var n=YF(e,`colorAlpha`),r=YF(e,`colorSaturation`);return r&&(t=qr(t,null,null,r)),n&&(t=Jr(t,n)),t}}function JF(e,t){return t==null?null:qr(t,null,null,e)}function YF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function XF(e,t,n,r,i,a){if(a&&a.length){var o=ZF(t,`color`)||i.color!=null&&i.color!==`none`&&(ZF(t,`colorAlpha`)||ZF(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 OF(d);return UF(f).drColorMappingBy=u,f}}}function ZF(e,t){var n=e.get(t);return B(n)&&n.length?{name:t,range:n}:null}function QF(e,t,n,r,i,a){var o=A({},t);if(i){var s=i.type,c=s===`color`&&UF(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 $F(e){e.registerSeriesModel(MP),e.registerChartView(xF),e.registerVisual(WF),e.registerLayout(XP),AP(e)}function eI(e){return`_EC_`+e}var tI=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[eI(e)]){var r=new nI(e,t);return r.hostGraph=this,this.nodes.push(r),n[eI(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[eI(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 nI||(e=r[eI(e)]),t instanceof nI||(t=r[eI(t)]),e&&t){var a=e.id+`-`+t.id,o=new rI(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 nI&&(e=e.id),t instanceof nI&&(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 nI||(t=this._nodesMap[eI(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}(),nI=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}(),rI=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 iI(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)}}}P(nI,iI(`hostGraph`,`data`)),P(rI,iI(`hostGraph`,`edgeData`));function aI(e,t,n,r,i){for(var a=new tI(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(hc(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=Sh(e,n);else{var h=ih.get(p),g=h&&h.dimensions||[];N(g,`value`)<0&&g.concat([`value`]);var _=$m(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Qm(_,n),m.initData(e)}var v=new Qm([`value`],n);return v.initData(c,s),i&&i(m,v),pP({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var oI=bd.prototype,sI=wd.prototype,cI=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(cI);function lI(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var uI=function(e){a(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:J.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new cI},t.prototype.buildPath=function(e,t){lI(t)?oI.buildPath.call(this,e,t):sI.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return lI(this.shape)?oI.pointAt.call(this,e):sI.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=lI(t)?[t.x2-t.x1,t.y2-t.y1]:sI.tangentAt.call(this,e);return wt(n,n)},t}(Eo),dI=[`fromSymbol`,`toSymbol`];function fI(e){return`_`+e+`Type`}function pI(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=Rv(i),l=zv(o||0,c);return r+c+l+(a||``)+(s||``)}function mI(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=Rv(i),l=zv(o||0,c),u=Lv(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 hI(e){var t=new uI({name:`line`,subPixelOptimize:!0});return gI(t.shape,e),t}function gI(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 _I=function(e){a(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=hI(i);o.shape.percent=0,Kd(o,{z2:W(a,0),shape:{percent:1}},r,t),this.add(o),F(dI,function(n){var r=mI(n,e,t);this.add(r),this[fI(n)]=pI(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:{}};gI(o.shape,a),Gd(i,o,r,t),F(dI,function(n){var r=pI(n,e,t),i=fI(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=mI(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=Zf(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(dI,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<_l.length;n++){var r=_l[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);Xf(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||J.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?ws(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}),lu(this,u,d,l)},t.prototype.highlight=function(){Wl(this)},t.prototype.downplay=function(){Gl(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`);gI(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=bt([],l,c);wt(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}(Hu),vI=function(){function e(e){this.group=new Hu,this._LineCtor=e||_I}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=bI(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=bI(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!yI(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(SI(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){Pf(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(SI(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);SI(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 yI(e){return e.animators&&e.animators.length>0}function bI(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:Zf(t)}}function xI(e){return isNaN(e[0])||isNaN(e[1])}function SI(e){return e&&!xI(e[0])&&!xI(e[1])}var CI=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),wI=function(e){a(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new CI},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}(Eo);function TI(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 EI(e,t){var n=e==null?``:e+``;return t&&(H(t)?n=t.replace(`{value}`,n):V(t)&&(n=t(e))),n}var DI=function(e){a(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=TI(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`)?Dw:ld,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];$a(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=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,M=new bd({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,N=EI(ws(A*(m-p)/v+p,14),_.get(`formatter`)),ee=r(A/v),P=O*(f-b-j)+u,te=k*(f-b-j)+d,F=_.get(`rotate`),I=0;F===`radial`?(I=-S+2*Math.PI,I>Math.PI/2&&(I+=Math.PI)):F===`tangential`?I=-S-Math.PI/2:se(F)&&(I=F*Math.PI/180),I===0?l.add(new Go({style:Qf(_,{text:N,x:P,y:te,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ee}),silent:!0})):l.add(new Go({style:Qf(_,{text:N,x:P,y:te,verticalAlign:`middle`,align:`center`},{inheritColor:ee}),silent:!0,originX:P,originY:te,rotation:I}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var ne=0;ne<=y;ne++){O=Math.cos(S),k=Math.sin(S);var re=new bd({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`&&re.setStyle({stroke:r((A+ne/y)/v)}),l.add(re),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?Lv(s,l-a/2,u-o,a,o,null,d):new wI({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`)?Dw:ld,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=ys(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);Kd(r,{rotation:-((isNaN(+n)?x[0]:ys(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Kd(i,{shape:{endAngle:ys(n,b,x,m.get(`clip`))}},e),l.add(i),$c(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,Gd(s,{rotation:-((isNaN(+r)?x[0]:ys(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);Gd(v,{shape:{endAngle:ys(r,b,x,m.get(`clip`))}},e),l.add(v),$c(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(ys(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 Mo){var d=c.style;c.useStyle(A({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,pu(c,t),lu(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,pu(m,t),lu(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=Lv(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 Hu,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Go({silent:!0}),f[e]=new Go({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 Hu,g=r(ys(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:Qf(_,{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:Qf(S,{x:w,y:T,text:EI(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),cp(x,{normal:S},a,function(e){return EI(e,k)}),p&&lp(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return EI(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}(gy),OI=function(e){a(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 lT(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,J.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:J.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:J.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:J.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:J.color.neutral00,borderWidth:0,borderColor:J.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:J.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:J.color.transparent,borderWidth:0,borderColor:J.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:J.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(Sv);function kI(e){e.registerChartView(DI),e.registerSeriesModel(OI)}var AI=`funnel`,jI=function(e){a(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 uT(R(this.getData,this),R(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return lT(this,{coordDimensions:[`value`],encodeDefaulter:z(kp,this)})},t.prototype._defaultLabelLine=function(e){nc(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.`+AI,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:J.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:J.color.primary}}},t}(Sv),MI=[`itemStyle`,`opacity`],NI=function(e){a(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new _d,o=new Go;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(MI);c??=1,n||Zd(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Kd(r,{style:{opacity:c}},i,t)):Gd(r,{style:{opacity:c},shape:{points:o.points}},i,t),pu(r,a),this._updateLabel(e,t),lu(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;Xf(i,Zf(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 Nt(d[0][0],d[0][1]):null},Gd(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),FT(n,IT(o),{stroke:l})},t}(hd),PI=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=AI,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 NI(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){Xd(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=AI,t}(gy);function FI(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 II(e){var t=e.hostModel,n=zI(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&&N([`top`,`bottom`],i)>-1&&(i=`left`),n&&N([`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 LI=Xc(AI,RI);function RI(e,t){e.eachSeriesByType(AI,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=d_(e,t),o=l_(e.getBoxLayoutParams(),a.refContainer),s=zI(e),c=o.width,l=o.height,u=FI(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=ys(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=ys(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())})}}II(n)})}function zI(e){return e.get(`orient`)===`horizontal`}function BI(e){e.registerChartView(PI),e.registerSeriesModel(jI),e.registerLayout(LI),e.registerProcessor(cT(AI))}function VI(e,t,n,r,i,a){e||=0;var o=As(n[1],-n[0]);if(i!=null&&(i=UI(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(As(t[1],-t[0]));s=UI(s,[0,o]),i=a=UI(s,[i,a]),r=0}t[0]=UI(t[0],n),t[1]=UI(t[1],n);var c=HI(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=As(u[0],l):u[1]=As(u[1],-l),t[r]=UI(t[r],u);var d=HI(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=As(t[r],c.sign*i)),d=HI(t,r),a!=null&&d.span>a&&(t[1-r]=As(t[r],d.sign*a)),t}function HI(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 UI(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var WI=`sankey`,GI=function(e){a(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 xp(i[o],this,t));return aI(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 nv(`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 nv(`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.`+WI,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:J.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:J.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(Sv),KI=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}(),qI=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new KI},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(){Wl(this)},t.prototype.downplay=function(){Gl(this)},t}(Eo),JI=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=WI,t._mainGroup=new Hu,t}return t.prototype.init=function(e,t){this._controller=new aN(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),oP(e,n,this._controller,sP(i),null),r.eachEdge(function(t){var n=new qI,r=Qc(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()),YI(n.style,u,t);var k=``+a.get(`value`),A=Zf(a,`edgeLabel`);Xf(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`);pu(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return YI(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var M=j.get(`focus`);lu(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 Bo({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});Xf(f,Zf(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),pu(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Qc(f).dataType=`node`;var p=u.get(`focus`);lu(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(XI(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){UN(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=dP(e,t,n.x,n.y,n.width,n.height);UN(this.group,2,r,this._firstRender?null:e)},t.type=WI,t}(gy);function YI(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 kd(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function XI(e,t,n){var r=new Bo({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Kd(r,{shape:{width:e.width+20}},t,n),r}var ZI=Xc(WI,QI);function QI(e,t){e.eachSeriesByType(WI,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=d_(e,t).refContainer,a=l_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;eL(l),$I(l,u,n,r,o,s,re(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function $I(e,t,n,r,i,a,o,s,c){tL(e,t,n,i,a,s,c),oL(e,t,a,i,r,o,s),yL(e,s)}function eL(e){F(e,function(e){var t=_L(e.outEdges,gL),n=_L(e.inEdges,gL),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function tL(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=N(t,y);s[b]=0;var x=y.node2,S=N(e,x);--c[S]===0&&N(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`&&rL(e,o,a,C),aL(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function nL(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function rL(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];N(i,u.node1)<0&&i.push(u.node1)}}a=i,i=[],++o}F(e,function(e){nL(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&iL(e,r)}function iL(e,t){F(e,function(e){!nL(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function aL(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 oL(e,t,n,r,i,a,o){var s=sL(e,o);cL(s,t,n,r,i,o),lL(s,i,n,r,o);for(var c=1;a>0;a--)c*=.99,uL(s,c,o),lL(s,i,n,r,o),vL(s,c,o),lL(s,i,n,r,o)}function sL(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Mc(e,function(e){return e.getLayout()[r]});return Ts(i.keys),F(i.keys,function(e){n.push(i.buckets.get(e))}),n}function cL(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 lL(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 uL(e,t,n){F(e.slice().reverse(),function(e){F(e,function(e){if(e.outEdges.length){var r=_L(e.outEdges,dL,n)/_L(e.outEdges,gL);if(isNaN(r)){var i=e.outEdges.length;r=i?_L(e.outEdges,fL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-hL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-hL(e,n))*t;e.setLayout({y:o},!0)}}})})}function dL(e,t){return hL(e.node2,t)*e.getValue()}function fL(e,t){return hL(e.node2,t)}function pL(e,t){return hL(e.node1,t)*e.getValue()}function mL(e,t){return hL(e.node1,t)}function hL(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function gL(e){return e.getValue()}function _L(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 vL(e,t,n){F(e,function(e){F(e,function(e){if(e.inEdges.length){var r=_L(e.inEdges,pL,n)/_L(e.inEdges,gL);if(isNaN(r)){var i=e.inEdges.length;r=i?_L(e.inEdges,mL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-hL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-hL(e,n))*t;e.setLayout({y:o},!0)}}})})}function yL(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 bL=Xc(WI,xL);function xL(e){e.eachSeriesByType(WI,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 OF({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 SL(e){e.registerChartView(JI),e.registerSeriesModel(GI),e.registerLayout(ZI),e.registerVisual(bL),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:el,subType:WI,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),lP(e,el,WI)}var CL=256,wL=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=f.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*(CL-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||=f.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=J.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]=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 TL(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 EL(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 DL=function(e){a(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()):Dy(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&&(Dy(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Pf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=Ey(a,`cartesian2d`),s=Ey(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=uS(f).w+.5,l=uS(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=Zf(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 Bo({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(pe(M.x))continue;D=new Bo({z2:1,shape:M,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var N=a.dataToLayout([h.get(T[0],E)]),M=N.contentRect||N.rect;if(pe(M.x)||pe(M.y))continue;D=new Bo({z2:1,shape:M,style:O})}if(h.hasItemOption){var ee=h.getItemModel(E),P=ee.getModel(`emphasis`);g=P.getModel(`itemStyle`).getItemStyle(),_=ee.getModel([`blur`,`itemStyle`]).getItemStyle(),v=ee.getModel([`select`,`itemStyle`]).getItemStyle(),y=ee.get([`itemStyle`,`borderRadius`]),S=P.get(`focus`),C=P.get(`blurScope`),w=P.get(`disabled`),b=Zf(ee)}D.shape.r=y;var te=e.getRawValue(E),F=`-`;te&&te[2]!=null&&(F=te[2]+``),Xf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:F}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,lu(D,S,C,w),D.incremental=Jc(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 wL;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`?EL(v,n.option.range):TL(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 Mo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(gy),OL=function(e){a(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 Sh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=ih.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:J.color.primary}}},t}(Sv);function kL(e){e.registerChartView(DL),e.registerSeriesModel(OL)}var AL={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},jL=L(AL);ne(Zn,function(e,t){return e[t]=1,e},{}),Zn.join(`, `);var ML=[``,`style`,`shape`,`extra`],NL=xc();function PL(e,t,n,r,i){var a=e+`Animation`,o=Ud(e,r,i)||{},s=NL(t).userDuring;return o.duration>0&&(o.during=s?R(WL,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),A(o,n[a]),o}function FL(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=NL(e),l=t.style;c.userDuring=t.during;var u={},d={};if(JL(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];KL(`shape`,h,f[m])}else KL(`shape`,t,d),KL(`extra`,t,d);if(!a&&s&&(qL(e,t,u),GL(`shape`,e,t,u),GL(`extra`,e,t,u),YL(e,t,l,u)),d.style=l,zL(e,d,o),VL(e,t),s){if(a){var g={};F(ML,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),A(e?g[e]:g,n.enterFrom))});var _=PL(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else BL(e,t,i||0,n,u)}IL(e,t),l?e.dirty():e.markRedraw()}function IL(e,t){for(var n=NL(e).leaveToProps,r=0;r<ML.length;r++){var i=ML[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=NL(e).leaveToProps={},i&&(n[i]=n[i]||{}),A(i?n[i]:n,a.leaveTo))}}function LL(e,t,n,r){if(e){var i=e.parent,a=NL(e).leaveToProps;if(a){var o=PL(`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 RL(e){return e===`all`}function zL(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 BL(e,t,n,r,i){if(i){var a=PL(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function VL(e,t){Ae(t,`silent`)&&(e.silent=t.silent),Ae(t,`ignore`)&&(e.ignore=t.ignore),e instanceof va&&Ae(t,`invisible`)&&(e.invisible=t.invisible),e instanceof Eo&&Ae(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var HL={},UL={setTransform:function(e,t){return HL.el[e]=t,this},getTransform:function(e){return HL.el[e]},setShape:function(e,t){var n=HL.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=HL.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=HL.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=HL.el.style;if(t)return t[e]},setExtra:function(e,t){var n=HL.el.extra||(HL.el.extra={});return n[e]=t,this},getExtra:function(e){var t=HL.el.extra;if(t)return t[e]}};function WL(){var e=this,t=e.el;if(t){var n=NL(t).userDuring,r=e.userDuring;n===r?(HL.el=t,r(UL)):e.el=e.userDuring=null}}function GL(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]={}),RL(c))A(o,a);else for(var l=tc(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(RL(s)||N(s,e)>=0){!o&&(o=r[e]={});for(var p=L(a),u=0;u<p.length;u++){var d=p[u],f=a[d];XL(i[d],f)&&(o[d]=f)}}}}}function KL(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=L(r),o=0;o<a.length;o++){var s=a[o];i[s]=Oi(r[s])}}function qL(e,t,n){for(var r=t.transition,i=RL(r)?Zn:tc(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function JL(e,t,n){for(var r=0;r<jL.length;r++){var i=jL[r],a=AL[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<Zn.length;r++){var s=Zn[r];t[s]!=null&&(n[s]=t[s])}}function YL(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!RL(o)){var c=tc(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&&(RL(s)||RL(o)||N(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=L(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function XL(e,t){return te(e)?e!==t:e!=null&&isFinite(e)}var ZL=xc(),QL=[`percent`,`easing`,`shape`,`style`,`extra`];function $L(e){e.stopAnimation(`keyframe`),e.attr(ZL(e))}function eR(e,t,n){if(n.isAnimationEnabled()&&t){if(B(t))F(t,function(t){eR(e,t,n)});else{var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Ud(`enter`,n,0);i=a&&a.duration}if(r&&i){var o=ZL(e);F(ML,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=L(c);if(n||(l=re(l,function(e){return N(QL,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 tR=xc(),nR=O,rR=R,iR=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 Hu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=z(aR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}lR(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&&uS(r).w>o)return!0;if(a){var s=LM(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=tR(e).pointerEl=new Qd[i.type](nR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=tR(e).labelEl=new Go(nR(t.label));e.add(i),sR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=tR(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=tR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),sR(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=wf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){pE(e.event)},onmousedown:rR(this._onHandleDragMove,this,0,0),drift:rR(this._onHandleDragMove,this),ondragend:rR(this._onHandleDragEnd,this)}),n.add(r)),lR(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,ww(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}}},e.prototype._moveHandleToValue=function(e,t){aR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,cR(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(cR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(cR(r)),tR(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),Tw(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 aR(e,t,n,r){oR(tR(n).lastProp,r)||(tR(n).lastProp=r,t?Gd(n,r,e):(n.stopAnimation(),n.attr(r)))}function oR(e,t){if(U(e)&&U(t)){var n=!0;return F(t,function(t,r){n&&=oR(e[r],t)}),!!n}return e===t}function sR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function cR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function lR(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 uR(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 dR(e,t,n,r,i){var a=pR(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=Kg(o.get(`padding`)||0),c=o.getFont(),l=pn(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),fR(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:Qf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function fR(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 pR(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:Ib(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 mR(e,t,n){var r=st();return ft(r,r,n.rotation),dt(r,r,n.position),_f([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function hR(e,t,n,r,i,a){var o=aC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),dR(t,r,i,a,{position:mR(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function gR(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function _R(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function vR(e,t,n){return uS(e,{fromStat:{sers:I(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function yR(e,t,n){return[ls(cs(t[0],t[1]),e-n/2),cs(e+n/2,ls(t[0],t[1]))]}var bR=function(e){a(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=xR(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=uR(r),f=SR[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}hR(t,e,EC(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=EC(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=mR(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=xR(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=cs(o[1],l[c]),l[c]=ls(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}(iR);function xR(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var SR={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:gR([t,r[0]],[t,r[1]],CR(e))}},shadow:function(e,t,n,r,i,a){var o=vR(e,i,a),s=r[1]-r[0],c=yR(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:_R([l,r[0]],[u-l,s],CR(e))}}};function CR(e){return e.dim===`x`?0:1}var wR=function(e){a(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:J.color.border,width:1,type:`dashed`},shadowStyle:{color:J.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:J.color.neutral00,padding:[5,7,5,7],backgroundColor:J.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:J.color.accent40,throttle:40}},t}(y_),TR=xc(),ER=F;function DR(e,t,n){if(!Pe.node){var r=t.getZr();TR(r).records||(TR(r).records={}),OR(r,t);var i=TR(r).records[e]||(TR(r).records[e]={});i.handler=n}}function OR(e,t){if(TR(e).initialized)return;TR(e).initialized=!0,n(`click`,z(jR,`click`)),n(`mousemove`,z(jR,`mousemove`)),n(`mousewheel`,z(jR,`mousewheel`)),n(`globalout`,AR);function n(n,r){e.on(n,function(n){var i=MR(t);ER(TR(e).records,function(e){e&&r(e,n,i.dispatchAction)}),kR(i.pendings,t)})}}function kR(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 AR(e,t,n){e.handler(`leave`,null,n)}function jR(e,t,n,r){t.handler(e,n,r)}function MR(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 NR(e,t){if(!Pe.node){var n=t.getZr();(TR(n).records||{})[e]&&(TR(n).records[e]=null)}}var PR=function(e){a(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`;DR(`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){NR(`axisPointer`,t)},t.prototype.dispose=function(e,t){NR(`axisPointer`,t)},t.type=`axisPointer`,t}(yO);function FR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bc(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 IR=xc();function LR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||R(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){qR(i)&&(i=FR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=qR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||qR(i),f={},p={},m={list:[],map:{}},h={showPointer:z(BR,p),showTooltip:z(VR,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=GR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&RR(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,KR(t),KR(e)))),g[e.key]=a}})}),F(g,function(e,t){RR(u[t],e,h,!0,f)}),HR(p,u,f),UR(m,i,e,o),WR(u,o,n),f}}function RR(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=zR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&A(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}}function zR(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(Gs(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 BR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function VR(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=BM(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 HR(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 UR(e,t,n,r){if(qR(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 WR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=IR(r)[i]||{},o=IR(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 GR(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 KR(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 qR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function JR(e){HM.registerAxisPointerClass(`CartesianAxisPointer`,bR),e.registerComponentModel(wR),e.registerComponentView(PR),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=AM(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},LR)}function YR(e){Bj($M),Bj(JR)}var XR=function(e){a(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=g_(t);e.prototype.init.apply(this,arguments),ZR(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),ZR(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:J.color.axisLine,width:1,type:`solid`}},itemStyle:{color:J.color.neutral00,borderWidth:1,borderColor:J.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:J.size.s,color:J.color.secondary},monthLabel:{show:!0,position:`start`,margin:J.size.s,align:`center`,formatter:null,color:J.color.secondary},yearLabel:{show:!0,position:null,margin:J.size.xl,formatter:null,color:J.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(y_);function ZR(e,t){var n=e.cellSize,r=B(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),h_(e,t,{type:`box`,ignoreSize:I([0,1],function(e){return p_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var QR=function(e){a(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 Bo({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 _d({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?Zg(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 Go({z2:30,style:Qf(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=eg(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 Go({z2:30,style:A(Qf(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=eg(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=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 Go({z2:30,style:A(Qf(a,{text:c[_]}),this._weekTextPositionControl(g,r,s,l,f)),silent:p});i.add(v)}}},t.type=`calendar`,t}(yO),$R=864e5,ez=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=Fs(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=l_(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+$R))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),kf(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=tz(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=tz(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=tz(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/$R)-Math.floor(t[0].time/$R)+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){uh({targetModel:t,coordSysType:`calendar`,coordSysProvider:dh})}),r},e.dimensions=[`time`,`value`],e}();function tz(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function nz(e){e.registerComponentModel(XR),e.registerComponentView(QR),e.registerCoordinateSystem(`calendar`,ez)}function rz(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 iz(e,t){var n;return F(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function az(e,t,n){var r=A({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(k(i,r,!0),h_(i,r,{ignoreSize:!0}),__(n,i),cz(n,i),cz(n,i,`shape`),cz(n,i,`style`),cz(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var oz=[`transition`,`enterFrom`,`leaveTo`],sz=oz.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function cz(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?oz:sz,i=0;i<r.length;i++){var a=r[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function lz(e,t){if(e&&(e.hv=t.hv=[iz(t,[`left`,`right`]),iz(t,[`top`,`bottom`])],e.type===`group`)){var n=e,r=t;n.width??=r.width=0,n.height??=r.height=0}}var uz=function(e){a(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=oc(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];F(o,function(e,t){var n=e.newOption;n&&(s.push(n),rz(e,n),az(i,t,n),lz(i[t],n))},this),n.elements=re(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}(y_),dz={path:null,compoundPath:null,group:Hu,image:Mo,text:Go},fz=xc(),pz=function(e){a(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=hc(t.id,null),s=o==null?null:n.get(o),c=hc(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&&Oy(d,u,!!p,!!f)){var m=ky(d,u,!0);!p&&m.textConfig&&(p=t.textConfig=m.textConfig),!f&&m.textContent&&(f=m.textContent)}var h=vz(t),g=t.$action||`merge`,_=g===`merge`,v=g===`replace`;if(_){var y=!s,b=s;y?b=hz(o,l,t.type,n):(b&&(fz(b).isNew=!1),$L(b)),b&&(FL(b,h,e,{isInit:y}),_z(b,t,i,a))}else if(v){gz(s,t,n,e);var x=hz(o,l,t.type,n);x&&(FL(x,h,e,{isInit:!0}),_z(x,t,i,a))}else g===`remove`&&(IL(s,t),gz(s,t,n,e));var S=n.get(o);if(S&&f){if(_){var C=S.getTextContent();C?C.attr(f):S.setTextContent(new Go(f))}else v&&S.setTextContent(new Go(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||fz(D).type!==T,E=y?mz(T):D}else v&&(y=!0,E=mz(T));S.setClipPath(E),FL(E,w,e,{isInit:y}),eR(E,w.keyframeAnimation,e)}var O=fz(S);S.setTextConfig(p),O.option=t,yz(S,e,t),Mf({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),eR(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=hc(l.id,null),d=u==null?null:i.get(u);if(d&&d.isGroup){var f=d.parent,p=f===r,m=fz(d),h=fz(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=hc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=fz(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=f_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!fz(d).isNew&&v){for(var y=l.transition,b={},x=0;x<s.length;x++){var S=s[x],C=_[S];y&&(RL(y)||N(y,S)>=0)?b[S]=C:d[S]=C}Gd(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){gz(n,fz(n).option,t,e._lastGraphicModel)}),this._elMap=G()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(yO);function mz(e){var t=new(Ae(dz,e)?dz[e]:sf(e))({});return fz(t).type=e,t}function hz(e,t,n,r){var i=mz(n);return t.add(i),r.set(e,i),fz(i).id=e,fz(i).isNew=!0,i}function gz(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){gz(e,t,n,r)}),LL(e,t,r),n.removeKey(fz(e).id))}function _z(e,t,n,r){e.isGroup||F([[`cursor`,va.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];Ae(t,r)?e[r]=W(t[r],n[1]):e[r]??(e[r]=n[1])}),F(L(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=V(r)?r:null}}),Ae(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function vz(e){return e=A({},e),F([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(n_),function(t){delete e[t]}),e}function yz(e,t,n){var r=Qc(e).eventData;e.silent||e.ignore||r||(r=Qc(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function bz(e){e.registerComponentModel(uz),e.registerComponentView(pz),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 xz=[`x`,`y`,`radius`,`angle`,`single`],Sz=xc(),Cz=[`cartesian2d`,`polar`,`singleAxis`];function wz(e){return N(Cz,e.get(`coordinateSystem`))>=0}function Tz(e){return e+`Axis`}function Ez(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 Dz(e){var t=e.ecModel,n={infoList:[],infoMap:G()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(Tz(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 Oz(e){var t=Sz(Vx(e));return t.axisProxyMap||=G()}function kz(e){if(e)return Oz(e.ecModel).get(e.uid)}function Az(e,t){Oz(e.ecModel).set(e.uid,t)}function jz(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?kz(n.model):null}var Mz=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}(),Nz=function(e){a(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=Pz(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Pz(e);k(this.option,e,!0),k(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(xz,function(n){var r=this.getReferringComponents(Tz(n),Ec);if(r.specified){t=!0;var i=new Mz;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 Mz;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Tc).models[0];o&&F(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Tc).models[0]&&a.add(e.componentIndex)})}}}r&&F(xz,function(t){if(r){var i=n.findComponents({mainType:Tz(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new Mz;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(Tz(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 kz(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(Tz(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 kz(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}(y_);function Pz(e){var t={};return F([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Fz=function(e){a(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}(yO),Iz=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 O(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(wz(t)){var n=Tz(this._dimName),r=t.getReferringComponents(n,Tc).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 O(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=ys(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=ys(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),Ts(s),Ts(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`;VI(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(var o=0;o<2;o++)t[o]=ys(e[o],n,r,!0),i&&(t[o]=t[o],l[o]=!0);Hc(t)}var f=Xy(r)||Jy(r),p=n.getExtent(),m=us(p[1]-p[0]),h=f?0:Os(s,m,.5);F([[0,ps],[1,fs]],function(e){var n=e[0],r=e[1];l[n]&&isFinite(h)&&(s[n]=ws(s[n],h),s[n]=cs(t[1],ls(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],f&&(s[n]=r(s[n]))))}),Hc(s);var g=[ys(s[0],t,a,!0),ys(s[1],t,a,!0)];return Hc(g),{value:s,percent:o,percentInverted:g,valuePrecision:h}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;BC(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=M({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=ys(i,[0,100],n,!0)-n[0]):i=ys(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),Lz={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(Tz(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!kz(i)){var o=new Iz(t,r,a,e);n.push(o),Az(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=jz(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 Rz(e){e.registerAction(`dataZoom`,function(e,t){F(Ez(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var zz=Uc();function Bz(e){zz(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Lz),Rz(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function Vz(e,t){var n=Kg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Bo({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 Hz=function(e){a(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:J.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:J.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:J.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:J.color.tertiary,fontSize:14}},t}(y_);function Uz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Wz(e){if(Pe.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var Gz=Wz([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Kz=Wz([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function qz(e,t){if(!e)return t;t=Gg(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function Jz(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var Yz=qz(Kz,`transition`),Xz=qz(Gz,`transform`),Zz=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Pe.transform3dSupported?`will-change:transform;`:``);function Qz(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function $z(e,t,n){if(!H(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=$g(t);var a=Qz(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=Xz+`:`,l;N([`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 eB(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?`,`:``)+(Pe.transformSupported?``+Xz+i:`,left`+i+`,top`+i)),Yz+`:`+a}function tB(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Pe.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Pe.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Xz+`:`+o+`;`:[[`top`,0],[`left`,0],[Gz,o]]}function nB(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 rB(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=gv(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(eB(a,n,r)),o&&i.push(`background-color:`+o),F([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Gg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(nB(d)),f!=null&&i.push(`padding:`+Kg(f).join(`px `)+`px`),i.join(`;`)+`;`}function iB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Fh(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 aB=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,Pe.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):ue(i)?i:V(i)&&i(e.getDom()));iB(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;lE(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=Jz(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=Zz+rB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+tB(i[0],i[1],!0)+(`border-color:`+$g(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`&&!Uz(n)&&(o=$z(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++)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(iB(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;F(tB(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`,Pe.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(R(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;Ih(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}(),oB=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),lB(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)&&Zs(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Go({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:gv(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=cB(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;lB(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=sB(i.borderWidth||0),o=cB(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(R(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function sB(e){return Math.max(0,e)}function cB(e){var t=sB(e.shadowBlur||0),n=sB(e.shadowOffsetX||0),r=sB(e.shadowOffsetY||0);return{left:sB(t-n),right:sB(t+n),top:sB(t-r),bottom:sB(t+r)}}function lB(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var uB=new Bo({shape:{x:-1,y:-1,width:2,height:2}}),dB=function(e){a(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(!Pe.node&&t.getDom()){var n=e.getComponent(`tooltip`),r=this._renderMode=jc(n.get(`renderMode`));this._tooltipContent=r===`richText`?new oB(t):new aB(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!Pe.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`)?ww(this,`_updatePosition`,50,`fixRate`):Tw(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);DR(`itemTooltip`,this._api,R(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&&!Pe.node&&n.getDom()){var i=pB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=vB(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=uB;c.x=r.x,c.y=r.y,c.update(),Qc(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=FR(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(pB(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&&fB([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(Qc(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;ik(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Qc(e).dataIndex==null?Qc(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=R(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=fB([t.tooltipOption],r),o=this._renderMode,s=[],c=nv(`section`,{blocks:[],noHeader:!0}),l=[],u=new _v;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=pR(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=nv(`section`,{header:f,noHeader:!ye(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=Ib(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,$g(m.color),o);var h=A_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=fB([a],r).get(`valueFormatter`);p.blocks.push(_?A({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=cv(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
14
|
+
`];function tv(e,t){return t.type=e,t}function nv(e){return e.type===`section`}function rv(e){return nv(e)?av:ov}function iv(e){if(nv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return F(e.blocks,function(e){var n=iv(e);n>=t&&(t=n+ +(r&&(!n||nv(e)&&!e.noHeader)))}),t}return 0}function av(e,t,n,r){var i=t.noHeader,a=cv(iv(t)),o=[],s=t.blocks||[];_e(!s||V(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 _m(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=rv(n)(s?A(A({},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):lv(r,o.join(``),i?n:a.html);if(i)return d;var f=Kg(t.header,`ordinal`,e.useUTC),p=Q_(r,e.renderMode).nameStyle,m=Z_(r);return e.renderMode===`richText`?fv(e,f,p)+a.richText+d:lv(r,`<div style="`+p+`;`+m+`;">`+Hh(f)+`</div>`+d,n)}function ov(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=V(e)?e:[e],I(e,function(e,t){return Kg(e,V(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Y.color.secondary,i),f=a?``:Kg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=Q_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:fv(e,f,v))+(o?``:pv(e,m,h,g,y)):lv(r,(s?``:d)+(a?``:uv(f,!s,v))+(o?``:dv(m,h,g,y)),n)}}function sv(e,t,n,r,i,a){if(e)return rv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function cv(e){return{html:$_[e],richText:ev[e]}}function lv(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Z_(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function uv(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Hh(e)+`</span>`}function dv(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=V(e)?e:[e],`<span style="`+i+`;`+r+`">`+I(e,function(e){return Hh(e)}).join(` `)+`</span>`}function fv(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function pv(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(V(t)?t.join(` `):t,a)}function mv(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return Qg(n)}function hv(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var gv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Vs()}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=Zg({color:t,type:e,renderMode:n,markerId:r});return U(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};V(t)?F(t,function(e){return A(n,e)}):A(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function _v(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=V(s),l=mv(t,n),u,d,f,p;if(o>1||c&&!o){var m=vv(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=cm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=hc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return tv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[tv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ve(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function vv(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?F(r,function(e){u(cm(a,n,e),e)}):F(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(tv(`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 yv=bc();function bv(e,t){return e.getName(t)||e.getId(t)}var xv=function(e){a(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=A_({count:wv,reset:Tv}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(yv(this).sourceManager=new W_(this)).prepareSource();var r=this.getInitialData(e,n);Dv(r,this),this.dataTask.context.data=r,yv(this).dataBeforeProcessed=r,Sv(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=p_(this),r=n?h_(e):{},i=this.subType;v_.hasClass(i)&&(i+=`Series`),k(e,t.getTheme().get(this.subType)),k(e,this.getDefaultOption()),tc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&m_(e,r,n)},t.prototype.mergeOption=function(e,t){e=k(this.option,e,!0),this.fillDataTextStyle(e.data);var n=p_(this);n&&m_(this.option,e,n);var r=yv(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Dv(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,yv(this).dataBeforeProcessed=i,Sv(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&&tc(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=kv(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return yv(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=kv(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}yv(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return K(e)},t.prototype.getSourceManager=function(){return yv(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return yv(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 _v({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=S_.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=bv(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[bv(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`){W(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=bv(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=bv(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 v_.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}(v_);P(xv,O_),P(xv,S_),Ue(xv,v_);function Sv(e){var t=e.name;hc(e)||(e.name=Cv(e)||t)}function Cv(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 wv(e){return e.model.getRawData().count()}function Tv(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Ev}function Ev(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Dv(e,t){F(Ee(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,B(Ov,t))})}function Ov(e,t){var n=kv(e);return n&&n.setOutputEnd((t||this).count()),t}function kv(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 Av=To.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()}}),jv={line:yd,rect:zo,roundRect:zo,square:zo,circle:Uu,diamond:To.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:To.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:To.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:Av},Mv={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}},Nv={};F(jv,function(e,t){Nv[t]=new e});var Pv=To.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=_n(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=Nv[r];i||=(r=`rect`,Nv[r]),Mv[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Fv(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 Iv(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?cf(e.slice(8),new q(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?sf(e.slice(7),{},new q(t,n,r,i),o?`center`:`cover`):new Pv({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Fv,a&&c.setColor(a),c}function Lv(e){return V(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Rv(e,t){if(e!=null)return V(e)||(e=[e,e]),[J(e[0],t[0])||0,J(G(e[1],e[0]),t[1])||0]}var zv=function(e){a(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 xh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Vu,n=Iv(`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=Iv(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}(xv);function Bv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=cm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(cm(e,t,n[o]));return a.join(` `)}}function Vv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!V(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 Hv=function(e){a(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=Iv(e,-1,-1,2,2,null,a);o.attr({z2:G(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Uv,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(){Ul(this.childAt(0))},t.prototype.downplay=function(){Wl(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):Wd(f,p,o,n),Xd(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,Gd(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=Xf(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=Rv(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 jo){var S=a.style;a.useStyle(A({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(A({},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;Yf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Bv(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),cu(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=Zc(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&qd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();qd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Lv(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Vu);function Uv(e,t){this.parent.drift(e,t)}function Wv(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 Gv(e){return e!=null&&!W(e)&&(e={isIgnore:e}),e||{}}function Kv(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:Xf(t),cursorStyle:t.get(`cursor`)}}function qv(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 Jv=function(){function e(e){this.group=new Vu,this._SymbolCtor=e||Hv}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Gv(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Kv(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);Wv(e,i,r,t)&&qv(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Wv(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):Wd(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);Wv(t,s,i,e)?(o||=qv(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=Kv(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=Gv(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(Wv(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){Nf(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 Yv(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Xv(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 _h(t,d[0])&&(f=!0,d[0]=p),_h(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 Xv(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 Zv(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 Qv(e,t){return!isFinite(e)||!isFinite(t)}var $v=typeof Float32Array<`u`?Float32Array:void 0,ey=typeof Float64Array<`u`?Float64Array:void 0;function ty(e){return ny({ctor:$v},e).arr}function ny(e,t){var n=e.arr,r=e.ctor;if(t>As&&(t=As),!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 ry(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 iy(e,t,n,r,i,a,o,s){for(var c=ry(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Yv(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=Zv(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,N=ty(M),ee=ty(M),P=ty(M),te=ty(M),F=[],y=0;y<m.length;y++){var I=m[y],ne=y*2,L=I*2;N[ne]=l[L],N[ne+1]=l[L+1],ee[ne]=u[L],ee[ne+1]=u[L+1],P[ne]=d[L],P[ne+1]=d[L+1],te[ne]=f[L],te[ne+1]=f[L+1],F[y]=p[I]}return{current:N,next:ee,stackedOnCurrent:P,stackedOnNext:te,status:F}}var ay=Math.min,oy=Math.max;function sy(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(Qv(_,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(;Qv(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||Qv(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,ee=void 0,P=void 0;if(s===`x`){ee=Math.abs(A),P=Math.abs(j);var te=E>0?1:-1;p=_-te*ee*o,m=v,O=_+te*P*o,k=v}else if(s===`y`){ee=Math.abs(M),P=Math.abs(N);var F=D>0?1:-1;p=_,m=v-F*ee*o,O=_,k=v+F*P*o}else ee=Math.sqrt(A*A+M*M),P=Math.sqrt(j*j+N*N),T=P/(P+ee),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=ay(O,oy(S,_)),k=ay(k,oy(C,v)),O=oy(O,ay(S,_)),k=oy(k,ay(C,v)),E=O-_,D=k-v,p=_-E*ee/P,m=v-D*ee/P,p=ay(p,oy(l,_)),m=ay(m,oy(u,v)),p=oy(p,ay(l,_)),m=oy(m,ay(u,v)),E=_-p,D=v-m,O=_+E*P/ee,k=v+D*P/ee}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var cy=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),ly=function(e){a(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 cy},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Qv(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Qv(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=sy(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=$a.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?fr(i,u,f,m,e,s):fr(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?ur(a,d,p,h,b):ur(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(To),uy=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(cy),dy=function(e){a(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 uy},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&&Qv(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Qv(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=sy(e,n,i,a,a,1,t.smooth,o,t.connectNulls);sy(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(To);function fy(){var e=bc();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 py=bc(),my=fy(),hy=function(){function e(){this.group=new Vu,this.uid=Th(`viewChart`),this.renderTask=A_({plan:vy,reset:yy}),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&&_y(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&_y(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){Nf(this.group,e)},e.markUpdateMethod=function(e,t){py(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function gy(e,t,n){e&&mu(e)&&(t===`emphasis`?Ul:Wl)(e,n)}function _y(e,t,n){var r=yc(e,t),i=t&&t.highlightKey!=null?hu(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){gy(e,n,i)}):F(ec(r),function(t){gy(e.getItemGraphicEl(t),n,i)})}Ve(hy,[`dispose`]),Je(hy);function vy(e){return my(e.model)}function yy(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&py(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),by[c]}var by={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 xy(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 zo({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=H(i)?function(e){i(e,d)}:null;Gd(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function Sy(e,t,n){var r=e.getArea(),i=Cs(r.r0,1),a=Cs(r.r,1),o=new cd({shape:{cx:Cs(e.cx,1),cy:Cs(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,Gd(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function Cy(e,t,n,r,i){return e?e.type===`polar`?Sy(e,t,n):e.type===`cartesian2d`?xy(e,t,n,r,i):null:null}function wy(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function Ty(e,t){return e.type===t}function Ey(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}function Dy(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||ke(e,`text`)))}function Oy(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 ky(o,e),F(o.rich,function(e){ky(e,e)}),{textConfig:i,textContent:a}}function ky(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 Ay=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Je(Ay);var jy=0,My=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++jy,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&I(r,Ny);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(!U(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||=K(this.categories)},e}();function Ny(e){return W(e)&&e.value!=null?e.value:e+``}var Py=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 Fy(e,t,n){var r;e||={};var i=rg();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(F(Py,function(t){a[t]&&(e[t]=z(a[t],a))}),r=a)}return r??Hy(e,n),{brk:r,mapper:e}}function Iy(e,t){F(Py,function(n){e[n]=t[n]})}function Ly(e,t){e.freeze=Ae}function Ry(e){return e.getExtentUnsafe(0,2)}function zy(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function By(e){var t=zy(e,3);return t[1]-t[0]}function Vy(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Hy(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Nc(),A(n,Uy),n}var Uy={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=zy(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){Wy(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Wy(r,e,t,n)},freeze:function(){}};function Wy(e,t,n,r){zc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Gy(e){return Ky(e)||Jy(e)}function Ky(e){return e.type===`interval`}function qy(e){return e.type===`time`}function Jy(e){return e.type===`log`}function Yy(e){return e.type===`ordinal`}function Xy(e){var t=Is(e),n=ps(10,t),r=us(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Cs(r*n,-t)}function Zy(e){return Ts(e)+2}function Qy(e,t){return ms(e)/ms(t)}function $y(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 ps(t,e)}function eb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=ls(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return Rc(r[0])&&Rc(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function tb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function nb(e,t){return e||=t,us(cs(e,1))}function rb(e,t,n){var r=Ry(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 ib=function(e){a(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Iy(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new My({}),V(i)&&(i=new My({categories:I(i,function(e){return W(e)?e.value:e})})),r._ordinalMeta=i;var a=Fy(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Ly(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:U(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=us(e),e},t.prototype.getTicks=function(){var e=[];return rb(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=ss(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=Ry(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(us(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}(Ay);Ay.registerClass(ib);function ab(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=Zy(f);u<t-1;){var m=Cs(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=rg();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var ob=function(e){a(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Fy(r,ig(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 O(this._cfg)},t.prototype.setConfig=function(e){var t=Ry(this);this._cfg=e=O(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Zy(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Ry(this),i=t.niceExtent,a=t.intervalPrecision,o=rg(),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?Cs(i[0]-n,a):r[0]});for(var d=function(e,t){return us((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=ss(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Cs(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Cs(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?Cs(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 ab(this,e,ag(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ts(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Ug(Cs(e.value,n,!0))},t.type=`interval`,t}(Ay);Ay.registerClass(ob);var sb=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},cb=function(e){a(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=Fy(r,ig(r,n),null).brk,r}return t.prototype.getLabel=function(e){return Tg(e.value,gg[wg(Sg(this._minLevelUnit))]||gg.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return Eg(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Ry(this),r=rg(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return rg().addBreaksToTicks(o,i.breaks,n),o;o=vb(this._minLevelUnit,this._approxInterval,s,n,Vy(this),i);var c=_g.length-1,l=0;return F(o,function(e){e.time&&(c=Math.min(c,N(_g,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&rg().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&rg().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(N(_g,Dg(e.vmin,s)),N(_g,Dg(e.vmax,s))),n=0,r=0;r<_g.length;r++)if(!ub(_g[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:_g[Math.max(i,t)],upperTimeUnit:_g[i]}}),o},t.prototype.getMinorTicks=function(e){return ab(this,e,ag(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):+Ps(e)},t.type=`time`,t}(Ay),lb=[[`second`,sg],[`minute`,cg],[`hour`,lg],[`quarter-day`,lg*6],[`half-day`,lg*12],[`day`,ug*1.2],[`half-week`,ug*3.5],[`week`,ug*7],[`month`,ug*31],[`quarter`,ug*95],[`half-year`,dg/2],[`year`,dg]];function ub(e,t,n,r){return Og(new Date(t),e,r).getTime()===Og(new Date(n),e,r).getTime()}function db(e,t){return e/=ug,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function fb(e){var t=30*ug;return e/=t,e>6?6:e>3?3:e>2?2:1}function pb(e){return e/=lg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function mb(e,t){return e/=t?cg:sg,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function hb(e){return cs(Ls(e,!0),1)}function gb(e,t,n){var r=Math.max(0,N(_g,t)-1);return Og(new Date(e),_g[r],n).getTime()}function _b(e,t){var n=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 vb(e,t,n,r,i,a){var o=vg,s=0;function c(e,t,n,i,o,c,l){for(var u=_b(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(!ub(Sg(e),r[0],r[1],n)){s&&(i=[{value:gb(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/ug/365)),p=kg(n),m=Ig(n);break;case`half-year`:case`quarter`:case`month`:f=fb(t),p=Ag(n),m=Lg(n);break;case`week`:case`half-week`:case`day`:f=db(t,31),p=jg(n),m=Rg(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=pb(t),p=Mg(n),m=zg(n);break;case`minute`:f=mb(t,!0),p=Ng(n),m=Bg(n);break;case`second`:f=mb(t,!1),p=Pg(n),m=Vg(n);break;case`millisecond`:f=hb(t),p=Fg(n),m=Hg(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=Sg(o[m]);if(Cg(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?Sg(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=Dg(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Wc(S,Gc,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=Dg(r[0],n),k=Dg(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 yb=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=ug,n[1]+=ug),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-ug}e.setExtent(n[0],n[1]);var i=nb(t.splitNumber,10),a=Vy(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=lb.length,l=Math.min(sb(lb,a,0,c),c-1),u=lb[l][1],d=lb[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Ay.registerClass(cb);var bb=0,xb=1,Sb=2,Cb=function(e){a(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=ob.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[bb]=i[xb]=a[bb]=a[xb]=NaN,Iy(r,t.mapperMethods);var s=rg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Sb,l),r.powStub=new ob({breakParsed:l.original}),r.intervalStub=new ob({breakParsed:l.transformed}),Ly(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=rg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return I(i.getTicks(e||{}),function(e){var i=e.value,o=$y(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,ag(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return ab(this,e,ag(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(Qy(e,this.base))},scale:function(e){return $y(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Qy(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return wb.depth=n,Tb.lookup=this._lookup,$y(n===2?e:this.intervalStub.transformOut(e,wb),this.base,Tb)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!zc(t,n)||t<=0||n<=0)){var r=Eb,i=Eb;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[bb]=t,r[xb]=n);var o=this.base;this.intervalStub.setExtent2(e,i[bb]=Qy(t,o),i[xb]=Qy(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return zc(t[0],t[1])&&Ws(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}(Ay);Ay.registerClass(Cb);var wb={},Tb={},Eb=[],Db={value:1,category:1,time:1,log:1},Ob=bc();function kb(e){var t=e.get(`type`);return(t==null||!ke(Db,t)&&!Ay.getClass(t))&&(t=`value`),t}function Ab(e,t,n){var r=rg(),i;switch(r&&(i=Vb(e,t,n)),t){case`category`:return new ib({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Nc()});case`time`:return new cb({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Cb({logBase:e.get(`logBase`),breakOption:i});case`value`:return new ob({breakOption:i});default:return new((Ay.getClass(t))||ob)({})}}function jb(e,t,n){var r=n?zy(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return zc(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Mb(e){Ob(e).noOnMyZero=!0}function Nb(e){return Ob(e).noOnMyZero}function Pb(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=yg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(U(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(H(t)){if(e.type===`category`)return function(n,r){return t(Fb(e,n),n.value-e.scale.getExtent()[0],null)};var r=rg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Fb(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Fb(e,t){var n=e.scale;return Yy(n)?n.getLabel(t):t.value}function Ib(e){return e.get(`interval`)??`auto`}function Lb(e){return e.type===`category`&&Ib(e.getLabelModel())===0}function Rb(e,t){var n={};return F(e.mapDimensionsAll(t),function(t){n[vh(e,t)]=!0}),R(n)}function zb(e){return e===`middle`||e===`center`}function Bb(e){return e.getShallow(`show`)}function Vb(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!rg()||!n||!Hb(t)?void 0:r}function Hb(e){return e!==`category`}function Ub(e,t,n,r,i,a){var o=Jy(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=tb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Wb(e,t){return Yy(e)?e.getRawOrdinalNumber(t.value):t.value}function Gb(e,t){return Yy(e)&&!!t.get(`boundaryGap`)}function Kb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function qb(e){for(var t=Nc(),n=Nc(),r=0;r<e.length;){var i=e[r++],a=e[r++];Qv(i,a)||(Pc(t,i),Pc(n,a))}return[t,n]}function Jb(e,t){var n=qb(e),r=n[0],i=n[1],a=qb(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 Yb(e){return oe(e)?e:e?.5:0}function Xb(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=ty(r*2),a=0;a<r;a++){var o=Zv(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Zb(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;Qv(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 Qb(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Gr((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 $b(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=Qb(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 Od(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function ex(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&tx(a,t))){var o=t.mapDimension(a.dim),s={};return F(a.getViewLabels(),function(e){e.tick.offInterval||(s[Wb(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function tx(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(Hv.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function nx(e){for(var t=e.length/2;t>0&&Qv(e[t*2-2],e[t*2-1]);t--);return t-1}function rx(e,t){return[e[t*2],e[t*2+1]]}function ix(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],!Qv(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 ax(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<gl.length;t++)if(e.get([gl[t],`endLabel`,`show`]))return!0;return!1}function ox(e,t,n,r){if(Ty(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=ax(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=xy(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 Sy(t,n,r)}function sx(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 cx=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Vu,t=new Jv;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=Yv(r,a,_),y=g&&Xb(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&ex(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=$b(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&&=Zb(y,c,r,w,x),c=Zb(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,Qg(E)),m.setClipPath(ox(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,Qg(E));var D=m.getClipPath();D?Gd(D,{shape:ox(this,r,!1,e).shape},e):m.setClipPath(ox(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]]}}),Kb(this._stackedOnPoints,y)&&Kb(this._points,c)||(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Zb(y,c,r,w,x),c=Zb(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`),j=O.get(`disabled`);if(f.useStyle(M(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),fu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var N=f.getState(`emphasis`).style;N.lineWidth=+f.style.lineWidth+1}Zc(f).seriesIndex=e.seriesIndex,cu(f,k,A,j);var ee=Yb(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:ee,smoothMonotone:P,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),F=0;p.useStyle(M(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(F=Yb(te.get(`smooth`))),p.setShape({smooth:ee,stackedOnSmooth:F,smoothMonotone:P,connectNulls:x}),fu(p,e,`areaStyle`),Zc(p).seriesIndex=e.seriesIndex,cu(p,k,A,j)}var I=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=I)}),this._polyline.onHoverStateChange=I,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ne=e.get(`triggerEvent`),L=e.get(`triggerLineEvent`),re=L===!0||ne===!0||ne===`line`,R=L===!0||ne===!0||ne===`area`;this.packEventData(e,f,re),p&&this.packEventData(e,p,R)},t.prototype.packEventData=function(e,t,n){Zc(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=yc(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(Qv(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Hv(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 hy.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=yc(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 hy.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Pl(this._polyline,e),t&&Pl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new ly({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 dy({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`);H(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=H(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=H(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(ax(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 Wo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=nx(o);c>=0&&(Yf(a,Xf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Bv(i,e):Vv(i,n)},enableTextSetter:!0},sx(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=ix(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=rx(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=Mc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=rx(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=op(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=iy(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=Zb(u.stackedOnCurrent,u.current,n,i,o),d=Zb(u.current,null,n,i,o),m=Zb(u.stackedOnNext,u.next,n,i,o),p=Zb(u.next,null,n,i,o)),Jb(d,p)>3e3||c&&Jb(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(),Wd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Wd(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}(hy);function lx(e,t){return{seriesType:e,plan:fy(),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`);_h(n,o[0])&&(o[0]=c),_h(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&&ty(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 ux={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]}},dx=function(e){return Math.round(e.length/2)};function fx(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;U(i)?p=ux[i]:H(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,dx))}}}}}function px(e){e.registerChartView(cx),e.registerSeriesModel(zv),e.registerLayout(lx(`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,fx(`line`))}var mx=bc(),hx=bc(),gx={estimate:1,determine:2};function _x(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function vx(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:I(bx(n,r),function(t,n){return{formattedLabel:Pb(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?xx(e,t):Tx(e)}function yx(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:bx(i,r)}:e.type===`category`?Cx(e,t):{ticks:r.getTicks(n)}}function bx(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)}),Wc(r,Kc,null),ws(r),I(r,function(e){return{value:e}})}function xx(e,t){var n=e.getLabelModel(),r=Sx(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function Sx(e,t,n){var r=Dx(e),i=Ib(t),a=n.kind===gx.estimate;if(!a){var o=kx(r,i);if(o)return o}var s,c;H(i)?s=Ix(e,i,!1):(c=i===`auto`?jx(e,n):i,s=Ix(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Ax(r,i,l),!0}):Ax(r,i,l),l}function Cx(e,t){var n=Ex(e),r=Ib(t),i=kx(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),H(r))a=Ix(e,r,!0);else if(r===`auto`){var s=Sx(e,e.getLabelModel(),_x(gx.determine));o=s.labelCategoryInterval,a=I(s.labels,function(e){return e.tick})}else o=r,a=Ix(e,o,!0);return Ax(n,r,{ticks:a,tickCategoryInterval:o})}function Tx(e){var t=e.scale.getTicks(),n=Pb(e);return{labels:I(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Ex=Ox(`axisTick`),Dx=Ox(`axisLabel`);function Ox(e){return function(t){return hx(t)[e]||(hx(t)[e]={list:[]})}}function kx(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function Ax(e,t,n){return e.list.push({key:t,value:n}),n}function jx(e,t){if(t.kind===gx.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return hx(e).autoInterval=n,!0}),n}return hx(e).autoInterval??(hx(e).autoInterval=e.calculateCategoryInterval(t))}function Mx(e,t){var n=t.kind,r=Fx(e),i=Pb(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=fn(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===gx.estimate?(t.out.noPxChangeTryDetermine.push(z(Nx,null,e,S,c)),S):Px(e,S,c)??S}function Nx(e,t,n){return Px(e,t,n)==null}function Px(e,t,n){var r=mx(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 Fx(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 Ix(e,t,n){var r=Pb(e),i=e.scale,a=[],o=H(t);return rb(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 Lx=bc();function Rx(e){Lx(e).prepare={}}function zx(e){Lx(e).fullUpdate={}}function Bx(e){return Lx(e).prepare}function Vx(e){return Lx(e).fullUpdate}var Hx=Hc(),Ux=bc(),Wx=bc();function Gx(e,t){var n=e.model,r=Ux(Vx(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Kx(e,t){return Yx(Gx(e,t))}function qx(e,t){var n=[];return Jx(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(Yx(e))}),n}function Jx(e,t){var n=Ux(Vx(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function Yx(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function Xx(e,t){var n=e.model.ecModel,r=Ux(Vx(n)).axSer;r&&Qx(n,r.get(e.model.uid),t)}function Zx(e,t,n){var r=Gx(e,t);r&&Qx(e.model.ecModel,r.sers,n)}function Qx(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function $x(e,t,n){var r=Ux(Vx(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function eS(e,t){var n=e.model,r=Ux(Vx(n.ecModel)).keys;r&&F(r.get(n.uid),function(e){t(e)})}function tS(e){var t=Wx(Bx(e)),n=t.keyed||=K();Jx(e,function(t,r,i){var a=n.get(r)||n.set(r,K()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&rS.liPosMinGap(e,t,o)})}function nS(e,t){rS[e]=t}var rS={};function iS(e,t,n){if(e){var r=t.ecModel,i=Ux(Vx(r)),a=e.model.uid,o=i.axSer||=K();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=sS.get(aS(s,c,n))||sS.get(aS(s,c,null));if(l){var u=i.keyed||=K(),d=i.keys||=K(),f=l.key,p=u.get(f)||u.set(f,K()),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 aS(e,t,n){return e+`|&`+G(t,!0)+`|&`+(n||``)}function oS(e,t){var n=aS(t.seriesType,t.baseAxis,t.coordSysType);sS.set(n,t),Hx(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:tS})})}var sS=K(),cS=.8;function lS(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=By(r);Ws(o)||(o=NaN);var s=e.getExtent(),c=ls(s[1]-s[0]);return Yy(r)?uS(n,e,o,c):i&&dS(n,e,o,c,i),a!=null&&(n.w=Ws(n.w)?cs(a,n.w):a),n}function uS(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 dS(e,t,n,r,i){var a=!1,o=-1/0;F(i.key?[Kx(t,i.key)]:qx(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Ws(n)&&n>0&&Ws(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*cS,e.w2=e.w*n/r)}var fS=[0,1],pS=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)),vs(e,fS,mS(this),t)},e.prototype.coordToData=function(e,t){var n=vs(e,mS(this),fS,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(yx(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Wb(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=hS(this,n,r);return I(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Yy(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||=_x(gx.determine),vx(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 lS(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=_x(gx.determine),Mx(this,e)},e}();function mS(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 hS(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=lS(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 gS=function(e){a(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}(pS),_S=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],vS=1,yS=2,bS=vS|yS;function xS(e,t,n){n||=bS,t?e.dirty|=n:e.dirty&=~n}function SS(e,t){return t||=bS,e.dirty==null||!!(e.dirty&t)}function CS(e){if(e)return SS(e)&&wS(e,e.label,e),e}function wS(e,t,n){var r=t.getComputedTransform();e.transform=Lf(e.transform,r);var i=e.localRect=If(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=lp.textMargin);for(var d=0;d<4;d++)TS[d]=u===lp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===lp.textMargin&&Of(i,TS,!1,!1);var f=e.rect=If(e.rect,i);return r&&f.applyTransform(r),u===lp.minMargin&&Of(f,TS,!1,!1),e.axisAligned=Pf(r),(e.label=e.label||{}).ignore=t.ignore,xS(e,!1),xS(e,!0,yS),e}var TS=[0,0,0,0];function ES(e,t,n){return e.transform=Lf(e.transform,n),e.localRect=If(e.localRect,t),e.rect=If(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Pf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function DS(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 OS(e,t){for(var n=0;n<_S.length;n++){var r=_S[n];e[r]??(e[r]=t[r])}return CS(e)}function kS(e){var t=e.obb;return(!t||SS(e,yS))&&(e.obb=t||=new Rd,t.fromBoundingRect(e.localRect,e.transform),xS(e,!1,yS)),t}function AS(e,t,n,r,i){var a=e.length,o=$d[t],s=ef[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 jS(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 MS(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=CS(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(NS(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function NS(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:kS(e).intersect(kS(t),n,r)}var PS=null;function FS(e){PS||=e}function IS(){return PS}var LS=`expandAxisBreak`,RS=`collapseAxisBreak`,zS=`toggleAxisBreak`,BS=`axisbreakchanged`,VS={type:LS,event:BS,update:`update`,refineEvent:WS},HS={type:RS,event:BS,update:`update`,refineEvent:WS},US={type:zS,event:BS,update:`update`,refineEvent:WS};function WS(e,t,n,r){var i=[];return F(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function GS(e){e.registerAction(VS,t),e.registerAction(HS,t),e.registerAction(US,t);function t(e,t){var n=[],r=Sc(t,e);function i(t,i){F(r[t],function(t){F(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(M((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var KS=Math.PI,qS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],JS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],YS=bc(),XS=bc(),ZS=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 QS(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=SC(e.axisName)&&zb(e.nameLocation);F(r,function(e){var t=CS(e);if(t&&!t.label.ignore){o.push(t);var n=a.transGroup;c&&(n.transform?pt($S,n.transform):st($S),t.transform&<($S,$S,t.transform),q.copy(eC,t.localRect),eC.applyTransform($S),s?s.union(eC):q.copy(s=new q(0,0,0,0),eC))}});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 $S=ot(),eC=new q(0,0,0,0),tC=function(e,t,n,r,i,a){if(zb(e.nameLocation)){var o=a.stOccupiedRect;o&&nC(ES({},o,a.transGroup.transform),r,i)}else rC(a.labelInfoList,a.dirVec,r,i)};function nC(e,t,n){var r=new Mt;NS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&DS(t,r)}function rC(e,t,n,r){for(var i=Mt.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||nC(s,n,r)}}var iC=function(){function e(e,t,n,r){this.group=new Vu,this._axisModel=e,this._api=t,this._local={},this._shared=r||new ZS(tC),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=G(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=G(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:G(e.nameDirection,1),tickDirection:G(e.tickDirection,1),labelDirection:G(e.labelDirection,1),labelOffset:G(e.labelOffset,0),silent:G(e.silent,!0),axisName:r,nameLocation:me(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:SC(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Vu({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 Mt(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(aC,function(r){e[r]&&oC[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=js(t-e),i,a;return Ms(r)?(a=n>0?`top`:`bottom`,i=`center`):Ms(r-KS)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<KS?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}(),aC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],oC={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=A({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&og(r.axis.scale))IS().buildAxisBreakLine(r,i,a,m);else{var h=new yd(A({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));ff(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`]);U(g)&&(g=[g,g]),(U(_)||oe(_))&&(_=[_,_]);var v=Rv(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=Iv(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){hC(t,i,s)&&sC(e,t,n,r,i,a,o,gx.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){hC(t,i,s)&&sC(e,t,n,r,i,a,o,gx.determine);var c=pC(e,i,a,r);uC(e,t.labelLayoutList,c),mC(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(SC(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 Mt(0,0),_=new Mt(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*KS/180);var b,x;zb(u)?b=iC.innerTextLayout(e.rotation,y??e.rotation,d):(b=cC(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 Wo({x:g.x,y:g.y,rotation:b.rotation,silent:iC.isLabelSilent(r),style:Zf(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(jf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=iC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Zc(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=CS({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:zb(u)?qS[E]:JS[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 sC(e,t,n,r,i,a,o,s){_C(t)||gC(e,t,i,s,r,o);var c=t.labelLayoutList;yC(e,r,c,a),wC(r,e.rotation,c);var l=e.optionHideOverlap;lC(r,c,l),l&&MS(L(c,function(e){return e&&!e.label.ignore})),QS(e,n,r,c)}function cC(e,t,n,r){var i=js(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ms(i-KS/2)?(o=c?`bottom`:`top`,a=`center`):Ms(i-KS*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<KS*1.5&&i>KS/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function lC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Lb(r))return;function a(e,a,o){var s=CS(t[a]),c=CS(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=YS(s.label).labelInfo.tick;if(qy(l)&&u.notNice||Yy(l)&&u.offInterval){dC(s.label);return}}if(e===!1||s.suggestIgnore)dC(s.label);else if(c.suggestIgnore)dC(c.label);else{var d=.1;if(!n){var f=[0,0,0,0];s=OS({marginForce:f},s),c=OS({marginForce:f},c)}NS(s,c,null,{touchThreshold:d})&&dC(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 uC(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=XS(r),a=YS(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){dC(r);return}}})}function dC(e){e&&(e.ignore=!0)}function fC(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 yd({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});ff(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=XS(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function pC(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=fC(i.getTicksCoords(),n.transform,c,M(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function mC(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=M(c.getLineStyle(),M(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=fC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function hC(e,t,n){if(_C(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),vC(e,null,null,null))}return!0}function gC(e,t,n,r,i,a){var o=i.axis,s=pe(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Vu;n.add(c);var l=_x(r);if(!s||o.scale.isBlank())vC(t,[],c,l);else{var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(pe(e.raw.labelRotate,u.get(`rotate`))||0)*KS/180,p=iC.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=Wb(o.scale,n);if(m&&m[f]){var y=m[f];W(y)&&y.textStyle&&(l=new bp(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=G(l.getShallow(`alignMinLabel`,!0),x),C=G(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=G(l.getShallow(`verticalAlignMinLabel`,!0),w),E=G(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Wo({x:0,y:0,rotation:0,silent:iC.isLabelSilent(i),z2:D,style:Zf(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:H(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=YS(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,jf({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=iC.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),Zc(O).eventData=A,j&&CC(i,a,O,j)}h.push(O),c.add(O)}),vC(t,I(h,function(e){return{label:e,priority:YS(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}}function _C(e){return!!e.labelLayoutList}function vC(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function yC(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);F(n,function(n,a){var o=CS(n);if(o){var s=o.label,c=YS(s);o.suggestIgnore=s.ignore,s.ignore=!1,Zn(bC,xC);var l=t.axis;bC.x=l.dataToCoord(Wb(l.scale,c.labelInfo.tick)),bC.y=e.labelOffset+e.labelDirection*i,bC.rotation=c.layoutRotation,r.add(bC),bC.updateTransform(),r.remove(bC),bC.decomposeTransform(),Zn(s,bC),s.markRedraw(),xS(o,!0),CS(o)}})}var bC=new zo,xC=new zo;function SC(e){return!!e}function CC(e,t,n,r){n.on(`click`,function(n){var i={type:LS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function wC(e,t,n){var r=rg();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&YS(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&F(i,function(r){IS().adjustBreakLabelPair(e.axis.inverse,t,[CS(n[r[0]]),CS(n[r[1]])])})}}function TC(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 EC(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function DC(e){var t={xAxisModel:null,yAxisModel:null};return F(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,wc).models[0]}),t}function OC(e,t,n,r,i,a){for(var o=TC(e,n),s=!1,c=!1,l=0;l<t.length;l++)Gy(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 iC(n,r,o,i)}function kC(e,t,n){var r=TC(t,n);e.updateCfg(r)}var AC=bc(),jC=3,MC=function(){function e(e,t,n,r,i){var a=Yy(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Ky(e)||Jy(e)||qy(e))&&(Fc(l,PC(e,t.get(`dataMin`,!0))),Ic(l,PC(e,t.get(`dataMax`,!0)))),Bc(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]=PC(e,H(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]=PC(e,H(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=FC(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,!Rc(u[0])&&(u[0]=NaN),!Rc(u[1])&&(u[1]=NaN);var g=s||fe(u[0])||fe(u[1])||a&&!o,_=Ky(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=PC(e,t.get(`startValue`,!0)),x=b!=null;!Ws(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Ws(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)),NC(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),NC(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 NC(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),Vc(t))}function PC(e,t){return t==null?null:fe(t)?NaN:e.parse(t)}function FC(e,t){var n;if(Yy(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=V(r)?r:[r,r]}return[IC(n[0]),IC(n[1])]}function IC(e){return gn(typeof e==`boolean`?0:e,1)||0}function LC(e){var t=AC(e.scale);return t.extent||=Nc(),t}function RC(e,t){LC(e).dimIdxInCoord=t.get(e.dim)}function zC(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||BC(n,e,i,r,t)}function BC(e,t,n,r,i){var a=LC(t),o=a.extent,s=!1;Xx(t,function(r){if(r.boxCoordinateSystem){var i=sh(r).coord,c=a.dimIdxInCoord;if(c>=0&&V(i)){var l=i[c];l!=null&&!V(l)&&Pc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;F(Rb(u,n),function(e){Lc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=KC(e,t,r);HC(e,new MC(e,r,o,s,c),i),a.extent=null}function VC(e,t){var n=e.scale;HC(n,new MC(n,e.model,t,!1,!1),jC)}function HC(e,t,n){e.rawExtentInfo=t,t.from=n}function UC(e,t){WC.set(e,t)}var WC=K();function GC(e,t,n,r,i){e.rawExtentInfo||VC({scale:e,model:t},i||Nc());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 KC(e,t,n){var r=Gb(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return eS(t,function(e){a=!!WC.get(e)||a}),a}function qC(e,t,n,r){if(n.ctnShp){var i;if(eS(e,function(t){var n=WC.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Fc(i,a[0]),Ic(i,a[1]),Mb(e))}}),i){var a=t.getExtent();if(Yy(t))e.onBand||t.setExtent2(1,ss(a[0],a[0]+i[0]),cs(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ss(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=cs(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 JC(){nS(`liPosMinGap`,YC)}function YC(e,t,n){var r=K(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=vm(u);function f(n){Qx(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{ny(XC,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||ym(d,a))&&(l&&(a=c.transformIn(a,null)),XC.arr[m++]=a)}});var h=XC.typed?XC.arr.subarray(0,m):(XC.arr.length=m,XC.arr);XC.typed?h.sort():ws(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Ws(g)?g:m>0?-2:-1,n.serUids=r}}var XC=ny({ctor:ey},50);function ZC(e){return function(t,n){var r=lS(t,{fromStat:{key:e}});if(Ws(r.w2))return[-r.w2/2,r.w2/2]}}function QC(e,t){return e+`|&`+t}function $C(e){return JC(),{liPosMinGap:!Yy(e.scale)}}function ew(e,t,n,r){oS(e,{key:t,seriesType:n,coordSysType:r,getMetrics:$C})}function tw(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var nw={left:0,right:0,top:0,bottom:0},rw=[`25%`,`25%`],iw=`cartesian2d`,aw=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=h_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&m_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&m_(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:nw,outerBoundsContain:`all`,outerBoundsClampWidth:rw[0],outerBoundsClampHeight:rw[1],backgroundColor:Y.color.transparent,borderWidth:1,borderColor:Y.color.neutral30},t}(v_),ow=Hc(),sw=`__ec_stack_`;function cw(e){return e.get(`stack`)||sw+e.seriesIndex}function lw(e,t){var n=uw(e,t);return n.columnMap=dw(n),n}function uw(e,t){var n=QC(t,iw),r=[],i=lS(e,{fromStat:{key:n},min:1});return Zx(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`)||(mw(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:cw(e)})}),{bandWidthResult:i,seriesInfo:r}}function dw(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=ss(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??=cs(35-o.length*4,15)+`%`;var c=J(i,t),l=J(a,1),u=(n-c)/(r+(r-1)*l);u=cs(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=ss(o,i)),a&&(o=cs(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=ss(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=cs(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 fw(e){return{seriesType:e,overallReset:function(t){var n=QC(e,iw);$x(t,n,function(t){var r=lw(t,e);Zx(t,n,function(e){var t=r.columnMap[cw(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function pw(e){return{seriesType:e,plan:fy(),reset:function(e){if(EC(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=_h(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(tw(i))),p=mw(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&&ty(r*3),c=p&&s&&ty(r*3),l=p&&ty(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,ls(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,ls(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 mw(e){return e.pipelineContext&&e.pipelineContext.large}function hw(e){return ZC(QC(e,iw))}function gw(e){ow(e,function(){function t(t){var n=QC(t,iw);ew(e,n,t,iw),UC(n,hw(t))}t(`bar`),t(`pictorialBar`)})}var _w=function(e){a(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 xh(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}(xv);xv.registerClass(_w);var vw=function(e){a(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 xh(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=Jc(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=Oh(_w.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}(_w),yw=`\0__throttleOriginMethod`,bw=`\0__throttleRate`,xw=`\0__throttleType`;function Sw(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];r=new Date().getTime(),c=this,l=e;var p=u||t,m=u||n;u=null,s=r-(m?i:a)-p,clearTimeout(o),m?o=setTimeout(d,p):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 Cw(e,t,n,r){var i=e[t];if(i){var a=i[yw]||i,o=i[xw];if(i[bw]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Sw(a,n,r===`debounce`),i[yw]=a,i[xw]=r,i[bw]=n}return i}}function ww(e,t){var n=e[t];n&&n[yw]&&(n.clear&&n.clear(),e[t]=n[yw])}var Tw=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}(),Ew=function(e){a(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Tw},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}(To);function Dw(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return _n(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)+kw(m,s+_,!1),x=u+p*y(m)+Aw(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+kw(m,-s+_,!1),x=u+p*y(m)+Aw(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)+kw(h,s+_,!0),x=u+p*y(h)+Aw(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+kw(h,-s+_,!0),x=u+p*y(h)+Aw(h,-s+_,!0),S=`right`,C=`middle`;break;default:return _n(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function Ow(e,t,n,r){if(oe(r))e.setTextConfig({rotation:r});else if(V(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 kw(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Aw(e,t,n){return t*Math.cos(e)*(n?1:-1)}function jw(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;V(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:I(r,function(e){return gn(e,i)})}}var Mw=Math.max,Nw=Math.min,Pw=function(e){a(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){Nf(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=Lw(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=Uw[s.type](a,e);if(!t)return null;var n=eT(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=Uw[s.type](a,t,n);if(r&&(h&&S(t),a.hasValue(t)&&Hw[s.type](r))){var o=!1;f&&(o=Fw[s.type](p,r));var g=Iw[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),Kw(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?Rw(d,u,g,r,t,l,!1,!1):Gd(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=Uw[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=Uw[s.type](a,t),E=$w(l,T,s);Wd(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!Hw[s.type](C))i.remove(D);else{var O=!1;if(f&&(O=Fw[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Yd(D,e,n),D=null),D?Xd(D):D=Iw[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=op(k);A.prevValue!=null&&(A.prevValue=A.value)}}else Kw(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?Rw(d,u,D,C,t,l,!0,x):Wd(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&&Yd(n,e,t)}).execute();var C=this._backgroundGroup||=new Vu;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(),Xw(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),Xw(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&Cy(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){Yd(t,e,Zc(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}(hy),Fw={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=Mw(t.x,e.x),s=Nw(t.x+t.width,i),c=Mw(t.y,e.y),l=Nw(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=Nw(t.r,e.r),a=Mw(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}},Iw={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new zo({shape:A({},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?Ew:cd,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=Dw(Gw(i),{isRoundCap:l===Ew}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Wd:Gd)(u,{shape:p},a)}return u}};function Lw(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 Rw(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?Wd:Gd)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Wd:Gd)(n,{shape:l},u,i)}function zw(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var Bw=[`x`,`y`,`width`,`height`],Vw=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],Hw={cartesian2d:function(e){return!zw(e,Bw)},polar:function(e){return!zw(e,Vw)}},Uw={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?qw(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 Ww(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Gw(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 Kw(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;A(u,jw(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?tT(i,a.coordinateSystem):nT(i,a.coordinateSystem),p=Xf(r);Yf(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Bv(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,Ow(e,h===`outside`?f:h,Gw(o),r.get([`label`,`rotate`]))}sp(m,p,a.getRawValue(n),function(e){return Vv(t,e)});var g=r.getModel([`emphasis`]);cu(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),fu(e,r),Ww(i)&&(e.style.fill=`none`,e.style.stroke=`none`,F(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function qw(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 Jw=function(){function e(){}return e}(),Yw=function(e){a(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new Jw},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}(To);function Xw(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?qc(e):0;if(l){var d=new Yw({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 Yw({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,Zc(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,Zw),f.on(`mousemove`,Zw)),n&&n.push(f)}var Zw=Sw(function(e){var t=this,n=Qw(t,e.offsetX,e.offsetY);Zc(t).dataIndex=n>=0?n:null},30,!1);function Qw(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 $w(e,t,n){if(Ty(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 eT(e,t,n){return new(e.type===`polar`?cd:zo)({shape:$w(t,n,e),silent:!0,z2:0})}function tT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function nT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function rT(e){e.registerChartView(Pw),e.registerSeriesModel(vw),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,fw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,pw(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,fx(`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)})}),gw(e)}function iT(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=A({},t),i.dispatchAction(A(t,{type:e[1],seriesIndex:n(r,t)}))})})}function aT(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=yc(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:V(l)?c.getName(l[0]):c.getName(l),selected:U(r)?r:A({},r)})}})}function oT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(aT(`map`,`selectchanged`,t,r,e),aT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(aT(`map`,`selected`,t,r,e),aT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(aT(`map`,`unselected`,t,r,e),aT(`pie`,`unselected`,t,r,e))})}function sT(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 cT(e,t,n){t=V(t)&&{coordDimensions:t}||A({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Qm(r,t).dimensions,a=new Zm(i,e);return a.initData(r,n),a}var lT=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}(),uT=bc(),dT=function(e){a(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 lT(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 cT(this,{coordDimensions:[`value`],encodeDefaulter:B(Op,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=uT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Os(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){tc(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}(xv);ah({fullType:dT.type,getCoord2:function(e){return e.getShallow(`center`)}});var fT=Math.PI*2,pT=$a.CMD,mT=[`top`,`right`,`bottom`,`left`];function hT(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 gT(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)%fT<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=io(i),i=io(f)}else r=io(r),i=io(i);r>i&&(i+=fT);var p=Math.atan2(s,o);if(p<0&&(p+=fT),p>=r&&p<=i||p+fT>=r&&p+fT<=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 _T(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 vT(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 yT=[];function bT(e,t,n){var r=vT(t.x,t.y,t.width,t.height,e.x,e.y,yT);return n.set(yT[0],yT[1]),r}function xT(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 pT.M:a=u[p++],o=u[p++],r=a,i=o;break;case pT.L:h=_T(r,i,u[p],u[p+1],d,f,yT,!0),r=u[p++],i=u[p++];break;case pT.C:h=hr(r,i,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,f,yT),r=u[p++],i=u[p++];break;case pT.Q:h=Sr(r,i,u[p++],u[p++],u[p],u[p+1],d,f,yT),r=u[p++],i=u[p++];break;case pT.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=gT(g,_,y,b,b+x,S,C,f,yT),r=Math.cos(b+x)*v+g,i=Math.sin(b+x)*y+_;break;case pT.R:a=r=u[p++],o=i=u[p++];var w=u[p++],T=u[p++];h=vT(a,o,w,T,d,f,yT);break;case pT.Z:h=_T(r,i,a,o,d,f,yT,!0),r=a,i=o}h<l&&(l=h,n.set(yT[0],yT[1]))}return l}var ST=new Mt,CT=new Mt,wT=new Mt,TT=new Mt,ET=new Mt;function DT(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||mT,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&&wT.copy(l);for(var p=0;p<o.length;p++){var m=o[p];hT(m,0,s,ST,TT),Mt.scaleAndAdd(CT,ST,TT,f),CT.transform(d);var h=e.getBoundingRect(),g=l?l.distance(CT):e instanceof To?xT(CT,e.path,wT):bT(CT,h,wT);g<c&&(c=g,CT.transform(u),wT.transform(u),wT.toArray(a[0]),CT.toArray(a[1]),ST.toArray(a[2]))}AT(a,t.get(`minTurnAngle`)),n.setShape({points:a})}}}var OT=[],kT=new Mt;function AT(e,t){if(t<=180&&t>0){t=t/180*Math.PI,ST.fromArray(e[0]),CT.fromArray(e[1]),wT.fromArray(e[2]),Mt.sub(TT,ST,CT),Mt.sub(ET,wT,CT);var n=TT.len(),r=ET.len();if(!(n<.001||r<.001)){TT.scale(1/n),ET.scale(1/r);var i=TT.dot(ET);if(Math.cos(t)<i){var a=_T(CT.x,CT.y,wT.x,wT.y,ST.x,ST.y,OT,!1);kT.fromArray(OT),kT.scaleAndAdd(ET,a/Math.tan(Math.PI-t));var o=wT.x===CT.x?(kT.y-CT.y)/(wT.y-CT.y):(kT.x-CT.x)/(wT.x-CT.x);if(isNaN(o))return;o<0?Mt.copy(kT,CT):o>1&&Mt.copy(kT,wT),kT.toArray(e[1])}}}}function jT(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,ST.fromArray(e[0]),CT.fromArray(e[1]),wT.fromArray(e[2]),Mt.sub(TT,CT,ST),Mt.sub(ET,wT,CT);var r=TT.len(),i=ET.len();if(!(r<.001||i<.001)&&(TT.scale(1/r),ET.scale(1/i),TT.dot(t)<Math.cos(n))){var a=_T(CT.x,CT.y,wT.x,wT.y,ST.x,ST.y,OT,!1);kT.fromArray(OT);var o=Math.PI/2,s=o+Math.acos(ET.dot(t))-n;if(s>=o)Mt.copy(kT,wT);else{kT.scaleAndAdd(ET,a/Math.tan(Math.PI/2-s));var c=wT.x===CT.x?(kT.y-CT.y)/(wT.y-CT.y):(kT.x-CT.x)/(wT.x-CT.x);if(isNaN(c))return;c<0?Mt.copy(kT,CT):c>1&&Mt.copy(kT,wT)}kT.toArray(e[1])}}}function MT(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 NT(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 PT(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<_l.length;c++){var l=_l[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:G(i.states[l]&&i.states[l].ignore,s))||!G(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&MT(r,!0,l,u);continue}r||(r=new gd,e.setTextGuideLine(r),d||!s&&o||MT(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),MT(r,!1,l,u)}}if(r){M(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=NT}}}function FT(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<gl.length;r++){var i=gl[r];n[i]=e.getModel([i,t])}return n}var IT=Math.PI/180;function LT(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;zT(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}AS(e,1,c,c+o)&&d(e)}function RT(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;UT(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(!UT(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,zT(m,g,!1)}}LT(l,t,n,r,1,i,a,o,s,d),LT(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!UT(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 zT(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)}BT(a,r)}}}function BT(e,t){HT.rect=e,wS(HT,t,VT)}var VT={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},HT={};function UT(e){return e.position===`center`}function WT(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*IT,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,N;r=d.cx,i=d.cy;var ee=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,N=`center`;else{var P=(ee?(d.r+d.r0)/2*O:d.r*O)+r,te=(ee?(d.r+d.r0)/2*k:d.r*k)+i;if(A=P+O*3,j=te+k*3,!ee){var I=P+O*(T+c-d.r),ne=te+k*(T+c-d.r),L=I+(O<0?-1:1)*E,re=ne;A=x===`edge`?O<0?u+S:u+l-S:L+(O<0?-b:b),j=re,M=[[P,te],[I,ne],[L,re]]}N=ee?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var R=Math.PI,ie=0,z=v.get(`rotate`);if(oe(z))ie=R/180*z;else if(y===`center`)ie=0;else if(z===`radial`||z===!0)ie=O<0?-D+R:-D;else if(z===`tangential`||z===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var B=Math.atan2(O,k);B<0&&(B=R*2+B),k>0&&z!==`tangential-noflip`&&(B=R+B),ie=B-R}if(a=!!ie,h.x=A,h.y=j,h.rotation=ie,h.setStyle({verticalAlign:`middle`}),ee){h.setStyle({align:N});var V=h.states.select;V&&(V.x+=h.x,V.y+=h.y)}else{var H=new q(0,0,0,0);BT(H,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new Mt(O,k),linePoints:M,textAlign:N,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:H,unconstrainedWidth:H.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ee})}}),!a&&e.get(`avoidLabelOverlap`)&&RT(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):(AT(x,g.minTurnAngle),jT(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new Mt(x[0][0],x[0][1])})}}}var GT=Math.PI*2,KT=Math.PI/180,qT=Yc(`pie`,JT);function JT(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=s_(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*KT,d=e.get(`endAngle`),f=e.get(`padAngle`)*KT;d=d===`auto`?u-GT:-d*KT;var p=e.get(`minAngle`)*KT+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;Qa(S,!_),u=S[0],d=S[1];var w=YT(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?vs(e,b,[c,s]):s}),O=i}}),E<GT&&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 YT=bc(),XT=function(e){a(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Wo;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=A(jw(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?(Gd(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,Gd(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Wd(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Gd(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Xd(i),Wd(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),fu(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=A({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},jw(s.getModel(`itemStyle`),c)),A(i.ensureState(`select`),{x:p,y:m,shape:jw(o.getModel([`select`,`itemStyle`]),c)}),A(i.ensureState(`blur`),{shape:jw(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&A(g.ensureState(`select`),{x:p,y:m}),A(_.ensureState(`select`),{x:p,y:m}),cu(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;Yf(r,Xf(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 gd,this.setTextGuideLine(d)),PT(this,FT(i),{stroke:s,opacity:me(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(cd),ZT=function(e){a(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 cd({shape:O(YT(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new XT(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){Yd(a.getItemGraphicEl(t),e,t)}).execute(),WT(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}(hy);function QT(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 $T(e){e.registerChartView(ZT),e.registerSeriesModel(dT),iT(`pie`,e.registerAction),e.registerLayout(qT),e.registerProcessor(sT(`pie`)),e.registerProcessor(QT(`pie`))}var eE=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),tE=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 eE(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 eE(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 eE(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new eE(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new eE(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new eE(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),nE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rE=[],iE=Ne.browser.firefox&&+Ne.browser.version.split(`.`)[0]<39;function aE(e,t,n,r){return n||={},r?oE(e,t,n):iE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?oE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function oE(e,t,n){if(Ne.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(zh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ih(rE,e,r,i)){n.zrX=rE[0],n.zrY=rE[1];return}}n.zrX=n.zrY=0}function sE(e){return e||window.event}function cE(e,t,n){if(t=sE(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&&aE(e,i,t,n)}else{aE(e,t,t,n);var a=lE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&nE.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function lE(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 uE(e,t,n,r){e.addEventListener(t,n,r)}function dE(e,t,n,r){e.removeEventListener(t,n,r)}var fE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function pE(e){return e.which===2||e.which===3}var mE=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=aE(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 _E)if(_E.hasOwnProperty(t)){var n=_E[t](this._track,e);if(n)return n}},e}();function hE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function gE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var _E={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=hE(r)/hE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=gE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},vE=`silent`;function yE(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:bE}}function bE(){fE(this.event)}var xE=function(e){a(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}(Hi),SE=function(){function e(e,t){this.x=e,this.y=t}return e}(),CE=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],wE=new q(0,0,0,0),TE=function(e){a(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new SE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new xE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new tE(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(F(CE,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=OE(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 SE(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 SE(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=yE(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 SE(e,t);if(DE(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||(wE.copy(u.getBoundingRect()),u.transform&&wE.applyTransform(u.transform),wE.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(DE(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 mE;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 SE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Hi);F([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){TE.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=OE(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 EE(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||vE}return!1}function DE(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=EE(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==vE)){t.target=o;break}}}function OE(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var kE=32,AE=7;function jE(e){for(var t=0;e>=kE;)t|=e&1,e>>=1;return e+t}function ME(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++;NE(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function NE(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function PE(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 FE(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 IE(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 LE(e,t){var n=AE,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=IE(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=FE(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=IE(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=FE(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>=AE||m>=AE);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-IE(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-FE(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>=AE||g>=AE);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 RE(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<kE)a=ME(e,n,r,t),PE(e,n,r,n+a,t);else{var o=LE(e,t),s=jE(i);do{if(a=ME(e,n,r,t),a<s){var c=i;c>s&&(c=s),PE(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 zE=!1;function BE(){zE||(zE=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function VE(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var HE=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=VE}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,RE(n,VE)},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)&&(BE(),p.z=0),isNaN(p.z2)&&(BE(),p.z2=0),isNaN(p.zlevel)&&(BE(),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=N(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}(),UE=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 WE(){return new Date().getTime()}var GE=function(e){a(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=WE()-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&&(UE(t),!e._paused&&e.update())}UE(t)},t.prototype.start=function(){this._running||(this._time=WE(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=WE(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=WE()-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 Vi(e,t.loop);return this.addAnimator(n),n},t}(Hi),KE=300,qE=Ne.domSupported,JE=(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})}})(),YE={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},XE=!1;function ZE(e){var t=e.pointerType;return t===`pen`||t===`touch`}function QE(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 $E(e){e&&(e.zrByTouch=!0)}function eD(e,t){return cE(e.dom,new nD(e,t),!0)}function tD(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 nD=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}(),rD={mousedown:function(e){e=cE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=cE(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=cE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=cE(this.dom,e);var t=e.toElement||e.relatedTarget;tD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){XE=!0,e=cE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){XE||(e=cE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=cE(this.dom,e),$E(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),rD.mousemove.call(this,e),rD.mousedown.call(this,e)},touchmove:function(e){e=cE(this.dom,e),$E(e),this.handler.processGesture(e,`change`),rD.mousemove.call(this,e)},touchend:function(e){e=cE(this.dom,e),$E(e),this.handler.processGesture(e,`end`),rD.mouseup.call(this,e),+new Date-this.__lastTouchMoment<KE&&rD.click.call(this,e)},pointerdown:function(e){rD.mousedown.call(this,e)},pointermove:function(e){ZE(e)||rD.mousemove.call(this,e)},pointerup:function(e){rD.mouseup.call(this,e)},pointerout:function(e){ZE(e)||rD.mouseout.call(this,e)}};F([`click`,`dblclick`,`contextmenu`],function(e){rD[e]=function(t){t=cE(this.dom,t),this.trigger(e,t)}});var iD={pointermove:function(e){ZE(e)||iD.mousemove.call(this,e)},pointerup:function(e){iD.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 aD(e,t){var n=t.domHandlers;Ne.pointerEventsSupported?F(JE.pointer,function(r){sD(t,r,function(t){n[r].call(e,t)})}):(Ne.touchEventsSupported&&F(JE.touch,function(r){sD(t,r,function(i){n[r].call(e,i),QE(t)})}),F(JE.mouse,function(r){sD(t,r,function(i){i=sE(i),t.touching||n[r].call(e,i)})}))}function oD(e,t){Ne.pointerEventsSupported?F(YE.pointer,n):Ne.touchEventsSupported||F(YE.mouse,n);function n(n){function r(r){r=sE(r),tD(e,r.target)||(r=eD(e,r),t.domHandlers[n].call(e,r))}sD(t,n,r,{capture:!0})}}function sD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,uE(e.domTarget,t,n,r)}function cD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&dE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var lD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),uD=function(e){a(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 lD(t,rD),qE&&(r._globalHandlerScope=new lD(document,iD)),aD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){cD(this._localHandlerScope),qE&&cD(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,qE&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?oD(this,t):cD(t)}},t}(Hi),dD={},fD={};function pD(e){delete fD[e]}function mD(e){if(!e)return!1;if(typeof e==`string`)return Yr(e,1)<Gi;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Yr(t[i].color,1);return n/=r,n<Gi}return!1}var hD=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 HE,a=n.renderer||`canvas`;dD[a]||(a=R(dD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new dD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Ne.node&&!Ne.worker&&!s?new uD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Ne.touchEventsSupported:!!l,d=44,f;u&&(f=G(n.pointerSize,d)),this.handler=new TE(i,o,c,o.root,f),this.animation=new GE({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=mD(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=WE(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=WE();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 Vu&&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,pD(this.id))},e}();function gD(e,t){var n=new hD(E(),e,t);return fD[n.id]=n,n}function _D(e,t){dD[e]=t}var vD;function yD(e){if(typeof vD==`function`)return vD(e)}function bD(e){vD=e}var xD=``;typeof navigator<`u`&&(xD=navigator.platform||``);var SD=`rgba(0, 0, 0, 0.2)`,CD=Y.color.theme[0],wD=Kr(CD,null,null,.9),TD={darkMode:`auto`,colorBy:`series`,color:Y.color.theme,gradientColor:[wD,CD],aria:{decal:{decals:[{color:SD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:SD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:SD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:SD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:SD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:SD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:xD.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},ED=K();function DD(e,t,n){var r=ED.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var OD,kD,AD,jD=`\0_ec_inner`,MD=1,ND=function(e){a(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 bp(r),this._locale=new bp(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=RD(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,RD(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`?AD(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=K(),s=t&&t.replaceMergeMainTypeMap;Ep(this),F(e,function(e,t){e!=null&&(v_.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?O(e):k(n[t],e,!0))}),s&&s.each(function(e,t){v_.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),v_.topologicalTravel(a,v_.getAllClassMainTypes(),c,this);function c(t){var a=DD(this,t,ec(e[t])),o=r.get(t),c=ac(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);_c(c,t,v_),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=v_.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=A({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),A(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`&&OD(this)}this._seriesIndices||OD(this)},t.prototype.getOption=function(){var e=O(this.option);return F(e,function(t,n){if(v_.hasClass(n)){for(var r=ec(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!gc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[jD],e},t.prototype.setTheme=function(e){this._theme=new bp(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}):ID(`name`,i,a):ID(`id`,r,a):(o=[],F(ec(n),function(e){a[e]&&o.push(a[e])})),LD(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(LD(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(H(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=U(e)?r.get(e):W(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=mc(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){kD(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){kD(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 kD(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){kD(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=K(n)},t.prototype.restoreData=function(e){OD(this);var t=this._componentsMap,n=[];t.each(function(e,t){v_.hasClass(t)&&n.push(t)}),v_.topologicalTravel(n,v_.getAllClassMainTypes(),function(n){F(t.get(n),function(t){t&&(n!==`series`||!PD(t,e))&&t.restoreData()})})},t.internalField=function(){OD=function(e){var t=e._seriesIndices=[];F(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=K(t)},kD=function(e){},AD=function(e,t){e.option={},e.option[jD]=MD,e._componentsMap=K({series:[]}),e._componentsCount=K();var n=t.aria;W(n)&&n.enabled==null&&(n.enabled=!0),FD(t,e._theme.option),k(t,TD,!1),e._mergeOption(t,null)}}(),t}(bp);function PD(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 FD(e,t){var n=e.color&&!e.colorLayer;F(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||v_.hasClass(r)||(typeof t==`object`?e[r]=e[r]?k(e[r],t,!1):O(t):e[r]??(e[r]=t))})}function ID(e,t,n){if(V(t)){var r=K();return F(t,function(e){e!=null&&mc(e,null)!=null&&r.set(e,!0)}),L(n,function(t){return t&&r.get(t[e])})}var i=mc(t,null);return L(n,function(t){return t&&i!=null&&t[e]===i})}function LD(e,t){return t.hasOwnProperty(`subType`)?L(e,function(e){return e&&e.subType===t.subType}):e}function RD(e){var t=K();return e&&F(ec(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}P(ND,S_);var zD=/^(min|max)?(.+)$/,BD=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(F(ec(e.series),function(e){e&&e.data&&ce(e.data)&&be(e.data)}),F(ec(e.dataset),function(e){e&&e.source&&ce(e.source)&&be(e.source)})),e=O(e);var r=this._optionBackup,i=VD(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=[],O(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=O(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++)HD(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!WD(a,this._currentMediaIndices)&&(o=I(a,function(e){return O(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function VD(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&&V(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 HD(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return F(e,function(e,t){var n=t.match(zD);if(n&&n[1]&&n[2]){var a=n[1];UD(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function UD(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function WD(e,t){return e.join(`,`)===t.join(`,`)}var GD=F,KD=W,qD=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function JD(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=qD.length;n<r;n++){var i=qD[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?k(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?k(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function YD(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,M(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 XD(e){YD(e,`itemStyle`),YD(e,`lineStyle`),YD(e,`areaStyle`),YD(e,`label`),YD(e,`labelLine`),YD(e,`upperLabel`),YD(e,`edgeLabel`)}function ZD(e,t){var n=KD(e)&&e[t],r=KD(n)&&n.textStyle;if(r)for(var i=0,a=nc.length;i<a;i++){var o=nc[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function QD(e){e&&(XD(e),ZD(e,`label`),e.emphasis&&ZD(e.emphasis,`label`))}function $D(e){if(KD(e)){JD(e),XD(e),ZD(e,`label`),ZD(e,`upperLabel`),ZD(e,`edgeLabel`),e.emphasis&&(ZD(e.emphasis,`label`),ZD(e.emphasis,`upperLabel`),ZD(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(JD(t),QD(t));var n=e.markLine;n&&(JD(n),QD(n));var r=e.markArea;r&&QD(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++)QD(a[o]);F(e.categories,function(e){XD(e)})}if(i&&!ce(i))for(var o=0;o<i.length;o++)QD(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)QD(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)V(c[o])?(QD(c[o][0]),QD(c[o][1])):QD(c[o]);e.type===`gauge`?(ZD(e,`axisLabel`),ZD(e,`title`),ZD(e,`detail`)):e.type===`treemap`?(YD(e.breadcrumb,`itemStyle`),F(e.levels,function(e){XD(e)})):e.type===`tree`&&XD(e.leaves)}}function eO(e){return V(e)?e:e?[e]:[]}function tO(e){return(V(e)?e[0]:e)||{}}function nO(e,t){GD(eO(e.series),function(e){KD(e)&&$D(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),GD(n,function(t){GD(eO(e[t]),function(e){e&&(ZD(e,`axisLabel`),ZD(e.axisPointer,`label`))})}),GD(eO(e.parallel),function(e){var t=e&&e.parallelAxisDefault;ZD(t,`axisLabel`),ZD(t&&t.axisPointer,`label`)}),GD(eO(e.calendar),function(e){YD(e,`itemStyle`),ZD(e,`dayLabel`),ZD(e,`monthLabel`),ZD(e,`yearLabel`)}),GD(eO(e.radar),function(e){ZD(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)}),GD(eO(e.geo),function(e){KD(e)&&(QD(e),GD(eO(e.regions),function(e){QD(e)}))}),GD(eO(e.timeline),function(e){QD(e),YD(e,`label`),YD(e,`itemStyle`),YD(e,`controlStyle`,!0);var t=e.data;V(t)&&F(t,function(e){W(e)&&(YD(e,`label`),YD(e,`itemStyle`))})}),GD(eO(e.toolbox),function(e){YD(e,`iconStyle`),GD(e.feature,function(e){YD(e,`iconStyle`)})}),ZD(tO(e.axisPointer),`label`),ZD(tO(e.tooltip).axisPointer,`label`)}function rO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function iO(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 aO(e){e&&F(oO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var oO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],sO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],cO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function lO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<cO.length;n++){var r=cO[n][1],i=cO[n][0];t[r]!=null&&(t[i]=t[r])}}function uO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function dO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function fO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function pO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&pO(e[n].children,t)}function mO(e,t){nO(e,t),e.series=ec(e.series),F(e.series,function(e){if(W(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),uO(e.label);var n=e.data;if(n&&!ce(n))for(var r=0;r<n.length;r++)uO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=rO(e,`pointer.color`);i!=null&&iO(e,`itemStyle.color`,i)}else if(t===`bar`){lO(e),lO(e.backgroundStyle),lO(e.emphasis);var n=e.data;if(n&&!ce(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(lO(n[r]),lO(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)),dO(e),pO(e.data,dO)}else t===`graph`||t===`sankey`?fO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&M(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),aO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),F(sO,function(t){var n=e[t];n&&(V(n)||(n=[n]),F(n,function(e){aO(e)}))})}var hO=Xc(gO);function gO(e){var t=K();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)}),_O(e))})}function _O(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=ks(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var vO=function(){function e(){this.group=new Vu,this.uid=Th(`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(vO),Je(vO);var yO=bc(),bO={itemStyle:Ye(_p,!0),lineStyle:Ye(mp,!0)},xO={lineStyle:`stroke`,itemStyle:`fill`};function SO(e,t){return e.visualStyleMapper||bO[t]||(console.warn(`Unknown style type '`+t+`'.`),bO.itemStyle)}function CO(e,t){return e.visualDrawType||xO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var wO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=SO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=CO(e,r),c=a[s],l=H(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`||H(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||H(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=A({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},TO=new bp,EO={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=SO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){TO.option=n[r];var o=i(TO);A(e.ensureUniqueItemVisual(t,`style`),o),TO.option.decal&&(e.setItemVisual(t,`decal`,TO.option.decal),TO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},DO={performRawSeries:!0,overallReset:function(e){var t=K();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();yO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=yO(e).scope,a=CO(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)}})}})}},OO=Math.PI;function kO(e,t){t||={},M(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 Vu,r=new zo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Wo({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 zo({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 Td({shape:{startAngle:-OO/2,endAngle:-OO/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:OO*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:OO*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 AO=function(){function e(e,t,n,r){this._stageTaskMap=K(),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):Jc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=K();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=K(),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)||A_({plan:FO,reset:IO,count:zO}));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||A_({reset:jO});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=K(),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,A_({reset:MO,onDirty:PO})));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 H(e)&&(e={overallReset:e,seriesType:BO(e)}),e.uid=Th(`stageHandler`),t&&(e.visualType=t),e},e}();function jO(e){e.overallReset(e.ecModel,e.api,e.payload)}function MO(e){return e.dirtyOnOverallProgress&&NO}function NO(){this.agent.dirty(),this.getDownstream().dirty()}function PO(){this.agent&&this.agent.dirty()}function FO(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function IO(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ec(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?I(t,function(e,t){return RO(t)}):LO}var LO=RO(0);function RO(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 zO(e){return e.data.count()}function BO(e){UO=null;try{e(VO,HO)}catch{}return UO}var VO={},HO={},UO;WO(VO,ND),WO(HO,ul),VO.eachSeriesByType=VO.eachRawSeriesByType=function(e){UO=e},VO.eachComponent=function(e){e.mainType===`series`&&e.subType&&(UO=e.subType)};function WO(e,t){for(var n in t.prototype)e[n]=Ae}var X=Y.darkColor,GO=X.background,KO=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:{}}},qO={label:{color:X.secondary},itemStyle:{borderColor:X.borderTint},dividerLineStyle:{color:X.border}},JO={darkMode:!0,color:X.theme,backgroundColor:GO,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:GO,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:qO,y:qO,backgroundColor:{borderColor:X.axisLine},body:{itemStyle:{borderColor:X.borderTint}}},timeAxis:KO(),logAxis:KO(),valueAxis:KO(),categoryAxis:KO(),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=KO();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}}}};JO.categoryAxis.splitLine.show=!1;var YO=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(U(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}(),XO=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],ZO=XO.concat([`symbolKeepAspect`]),QO={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<XO.length;o++){var s=XO[o],c=e.get(s);H(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(A({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}}},$O={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<ZO.length;r++){var i=ZO[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function ek(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 tk(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 nk(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 rk(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var ik=new Hi,ak={};function ok(e,t){ak[e]=t}function sk(e){return ak[e]}var ck={};function lk(e,t){ck[e]=t}var uk=Math.round(Math.random()*9),dk=typeof Object.defineProperty==`function`,fk=function(){function e(){this._id=`__ec_inner_`+uk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return dk?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 pk(e){return isFinite(e)}function mk(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=pk(r)?r:0,i=pk(i)?i:1,a=pk(a)?a:0,o=pk(o)?o:0,e.createLinearGradient(r,a,i,o)}function hk(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=pk(o)?o:.5,s=pk(s)?s:.5,c=c>=0&&pk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function gk(e,t,n){for(var r=t.type===`radial`?hk(e,t,n):mk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function _k(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 vk(e){return parseInt(e,10)}function yk(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]||vk(s[r])||vk(e.style[r]))-(vk(s[a])||0)-(vk(s[o])||0)||0}function bk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:oe(e)?[e]:V(e)?e:null}function xk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&bk(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 Sk=new $a(!0);function Ck(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function wk(e){return typeof e==`string`&&e!==`none`}function Tk(e){var t=e.fill;return t!=null&&t!==`none`}function Ek(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 Dk(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 Ok(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 kk(e,t,n,r,i){var a,o=Ck(n),s=Tk(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Sk,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?gk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?gk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Ok(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Ok(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=xk(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&&Dk(e,n),s&&Ek(e,n)):(s&&Ek(e,n),o&&Dk(e,n)),T&&e.setLineDash([])}function Ak(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 jk(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=xk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Ck(n)&&e.strokeText(i,n.x,n.y),Tk(n)&&e.fillText(i,n.x,n.y)):(Tk(n)&&e.fillText(i,n.x,n.y),Ck(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Mk=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Nk=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Pk(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Gk(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?pa.opacity:o}(r||t.blend!==n.blend)&&(a||=(Gk(e,i),!0),e.globalCompositeOperation=t.blend||pa.blend);for(var s=0;s<Mk.length;s++){var c=Mk[s];(r||t[c]!==n[c])&&(a||=(Gk(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(Gk(e,i),!0),e.shadowColor=t.shadowColor||pa.shadowColor),a}function Fk(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=Pk(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(Gk(e,i),!0),wk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(Gk(e,i),!0),wk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(Gk(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||=(Gk(e,i),!0),e.lineWidth=c)}for(var l=0;l<Nk.length;l++){var u=Nk[l],d=u[0];(r||a[d]!==o[d])&&(s||=(Gk(e,i),!0),e[d]=a[d]||u[1])}return s}function Ik(e,t,n,r,i){return Pk(e,t.style,n&&n.style,r,i)}function Lk(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 Rk(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),Lk(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function zk(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 Bk=1,Vk=2,Hk=3,Uk=4;function Wk(e){var t=Tk(e),n=Ck(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 Gk(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function Kk(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};qk(e,t,n),Jk(e,n)}function qk(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||_k(i,a))&&(a&&(Gk(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(Gk(e,n),e.save(),Rk(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 To&&t.autoBatch&&Wk(o);s||zk(r,l.transform)?(Gk(e,n),Lk(e,t)):u||Gk(e,n),t instanceof To?(n.lastDrawType!==Bk&&(c=!0,n.lastDrawType=Bk),Fk(e,t,l,c,n),u&&(n.batchFill||n.batchStroke)||e.beginPath(),kk(e,t,o,u,n)):t instanceof Do?(n.lastDrawType!==Hk&&(c=!0,n.lastDrawType=Hk),Fk(e,t,l,c,n),jk(e,t,o)):t instanceof jo?(n.lastDrawType!==Vk&&(c=!0,n.lastDrawType=Vk),Ik(e,t,l,c,n),Ak(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==Uk&&(c=!0,n.lastDrawType=Uk),Yk(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&Gk(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}}function Jk(e,t){Gk(e,t),t.prevElClipPaths&&e.restore()}function Yk(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(),qk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}Jk(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),qk(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}Jk(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Xk=new fk,Zk=new et(100),Qk=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function $k(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&Xk.delete(e);var a=Xk.get(e);if(a)return a;var o=M(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,Xk.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<Qk.length;++s){var c=o[Qk[s]];if(c!=null&&!V(c)&&!U(c)&&!oe(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=Zk.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=tA(o.dashArrayX),p=nA(o.dashArrayY),m=eA(o.symbol),h=rA(d),g=iA(p),_=!i&&f.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&&Zk.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=Us(e,h[t]);for(var r=1,t=0,n=m.length;t<n;++t)r=Us(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,f=0,h=0,x=0;f<y.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(h%2==0){var C=(1-o.symbolSize)*.5,w=f+d[l][h]*C,T=a+p[s]*C,E=d[l][h]*o.symbolSize,D=p[s]*o.symbolSize,O=x/2%m[u].length;k(w,T,E,D,m[u][O])}f+=d[l][h],++x,++h,h===d[l].length&&(h=0)}++l,l===d.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=Iv(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 Kk(b,u)}}}}function eA(e){if(!e||e.length===0)return[[`rect`]];if(U(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!U(e[n])){t=!1;break}if(t)return eA([e]);for(var r=[],n=0;n<e.length;++n)U(e[n])?r.push([e[n]]):r.push(e[n]);return r}function tA(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 tA([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 nA(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 rA(e){return I(e,function(e){return iA(e)})}function iA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var aA=Xc(oA);function oA(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=$k(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=$k(i,t)}}})}var sA=1,cA=800,lA=900,uA=920,dA=1e3,fA=2e3,pA=5e3,mA=1e3,hA=1100,gA=2e3,_A=3e3,vA=4e3,yA=4500,bA=4600,xA=5e3,SA=6e3,CA=7e3,wA={PROCESSOR:{SERIES_FILTER:cA,AXIS_STATISTICS:uA,FILTER:dA,STATISTIC:pA,STATISTICS:pA},VISUAL:{LAYOUT:mA,PROGRESSIVE_LAYOUT:hA,GLOBAL:gA,CHART:_A,POST_CHART_LAYOUT:bA,COMPONENT:vA,BRUSH:xA,CHART_ITEM:yA,ARIA:SA,DECAL:CA}},TA=`__flagInMainProcess`,EA=`__mainProcessVersion`,DA=`__pendingUpdate`,OA=`__needsUpdateStatus`,kA=/^[a-zA-Z0-9_]+$/,AA=`__connectUpdateStatus`,jA=0,MA=1,NA=2;function PA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed())this.id;else return IA(this,e,t)}}function FA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return IA(this,e,t)}}function IA(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Hi.prototype[t].apply(e,n)}var LA=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Hi),RA=LA.prototype;RA.on=FA(`on`),RA.off=FA(`off`);var zA,BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj,ij=function(e){a(t,e);function t(t,n,r){var i=e.call(this,new YO)||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[EA]=1,r.ssr&&bD(function(e){var t=Zc(e),n=t.dataIndex;if(n!=null){var r=K();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=gD(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:G(r.useDirtyRect,s),useCoarsePointer:G(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=Sw(z(c.flush,c),17),i._updateTheme(n),i._locale=Qh(r.locale||Xh),i._coordSysMgr=new rh;var l=i._api=$A(i);function u(e,t){return e.__prio-t.__prio}return RE(fj,u),RE(uj,u),i._scheduler=new AO(i,l,uj,fj),i._messageCenter=new LA,i._initEvents(),i.resize=z(i.resize,i),c.animation.on(`frame`,i._onframe,i),JA(c,i),YA(c,i),be(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(nj(this),this[DA]){var r=this[DA].silent;this[TA]=!0,rj(this);try{zA(this),HA.update.call(this,null,this[DA].updateParams)}catch(e){throw this[TA]=!1,this[DA]=null,e}this._zr.flush(),this[TA]=!1,this[DA]=null,KA.call(this,r),qA.call(this,r)}else if(e.unfinished){var i=sA;do{e.unfinished=!1;var a=f.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),WA(this,t),e.performVisualTasks(t),QA(this,this._model,n,`remain`,{}),i-=f.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[TA]){if(this._disposed)this.id;else{var r,i,a;if(W(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[TA]=!0,rj(this),!this._model||t){var o=new BD(this._api),s=this._theme,c=this._model=new ND;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},dj);var l={seriesTransition:a,optionChanged:!0};if(n)this[DA]={silent:r,updateParams:l},this[TA]=!1,this.getZr().wakeUp();else{try{zA(this),HA.update.call(this,null,l)}catch(e){throw this[DA]=null,this[TA]=!1,e}this._ssr||this._zr.flush(),this[DA]=null,this[TA]=!1,KA.call(this,r),qA.call(this,r)}}}},t.prototype.setTheme=function(e,t){if(!this[TA]){if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[DA]&&(r??=this[DA].silent,i=this[DA].updateParams,this[DA]=null),this[TA]=!0,rj(this);try{this._updateTheme(e),n.setTheme(this._theme),zA(this),HA.update.call(this,{type:`setTheme`},i)}catch(e){throw this[TA]=!1,e}this[TA]=!1,KA.call(this,r),qA.call(this,r)}}}},t.prototype._updateTheme=function(e){U(e)&&(e=pj[e]),e&&(e=O(e),e&&mO(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(gj[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();F(hj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(O(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*=d,s*=d,c*=d,l*=d;var p=c-o,m=l-s,h=f.createCanvas(),g=gD(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 zo({shape:{x:0,y:0,width:p,height:m},style:{fill:e.connectedBackgroundColor}})),F(u,function(e){var t=new jo({style:{x:e.left*d-o,y:e.top*d-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 UA(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return UA(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return UA(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed)this.id;else{var n=this._model,r;return F(Sc(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=Sc(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?tk(i,t):ek(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(oj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&rk(i,function(e){var t=Zc(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=A({},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(lj,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),oT(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()&&Oc(this.getDom(),vj,``);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 hj[e.id]}},t.prototype.resize=function(e){if(!this[TA]){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[DA]&&(r??=this[DA].silent,n=!0,this[DA]=null),this[TA]=!0,rj(this);try{n&&zA(this),HA.update.call(this,{type:`resize`,animation:A({duration:0},e&&e.animation)})}catch(e){throw this[TA]=!1,e}this[TA]=!1,KA.call(this,r),qA.call(this,r)}}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(W(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),mj[e]){var n=mj[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=A({},e);return t.type=cj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(W(t)||(t={silent:!!t}),sj[e.type]&&this._model){if(this[TA])this._pendingActions.push(e);else{var n=t.silent;GA.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ne.browser.weChat&&this._throttledZrFlush(),KA.call(this,n),qA.call(this,n)}}},t.prototype.updateLabelLayout=function(){ik.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(){zA=function(e){Rx(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),BA(e,!0),BA(e,!1),t.plan()},BA=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?vO.getClass(d.main,d.sub):hy.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)}},VA=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=Dc(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=K(),F(ec(s),function(e){var t=mc(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(_u(n)){if(t instanceof xv)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&$l(t,n,e._api);else{var r=eu(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Ql(t.mainType,t.componentIndex,e._api),a&&F(a,function(e){n.type===`highlight`?Ul(e):Wl(e)})}}else gu(n)&&t instanceof xv&&(ru(t,n,e._api),iu(t),tj(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)}},HA={prepareAndUpdate:function(e){zA(this),HA.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){zx(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),ik.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),WA(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),XA(this,r,i,e,n),ik.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=K();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}),QA(t,n,r,e,{},a),ik.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),hy.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),XA(this,n,this._api,e,{}),ik.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()}),hy.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)}),ik.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){HA.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=Sc(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}}UA=e,WA=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},GA=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=sj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Re(s[0]);this[TA]=!0,rj(this);var u=[e],d=!1;e.batch&&(d=!0,u=I(e.batch,function(t){return t=M(A({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=gu(e),_=_u(e);if(_&&Xl(this._api),F(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=A({},t),p.type=h,f.push(p),_){var a=Cc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;VA(n,c,t,u),tj(n)}else g?(VA(n,c,t,`series`),tj(n)):l&&VA(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[DA]?(zA(this),HA.update.call(this,e),this[DA]=null):HA[c].call(this,e)}catch(e){throw this[TA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[TA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;_e(W(y)),v=M({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)}},KA=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();GA.call(this,n,e)}},qA=function(e){!e&&this.trigger(`updated`)},JA=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[DA]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},YA=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=rk(n,mu);r&&(tu(r,e,t._api),tj(t))}).on(`mouseout`,function(e){var n=e.target,r=rk(n,mu);r&&(nu(r,e,t._api),tj(t))}).on(`click`,function(e){var n=e.target,r=rk(n,function(e){return Zc(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Zc(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;RE(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)})}}XA=function(e,t,r,i,a){n(t),ZA(e,t,r,i,a),F(e._chartsViews,function(e){e.__alive=!1}),QA(e,t,r,i,a),F(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},ZA=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)})},QA=function(e,t,n,r,a,u){var d=e._scheduler;a=A(a||{},{updatedSeries:t.getSeries()}),ik.trigger(`series:beforeupdate`,t,n,a);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),iu(t)}),d.unfinished=f||d.unfinished,ik.trigger(`series:layoutlabels`,t,n,a),ik.trigger(`series:transition`,t,n,a),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];s(t,n),l(t,n)}),i(e,t),ik.trigger(`series:afterupdate`,t,n,a)},tj=function(e){e[OA]=!0,e.getZr().wakeUp()},rj=function(e){e[EA]=(e[EA]+1)%1e6},nj=function(e){e[OA]&&(e.getZr().storage.traverse(function(e){Kd(e)||r(e)}),e[OA]=!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 i(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>G(t.get(`hoverLayerThreshold`),TD.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=Rf(e);t.eachRendered(function(e){return Bf(e,n.z,n.zlevel),!0})}}function c(e,t){t.eachRendered(function(e){if(!Kd(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(Kd(e))return;if(e instanceof To&&vu(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)}})}$A=function(e){return new(function(t){a(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){Ul(t,n),tj(e)},n.prototype.leaveEmphasis=function(t,n){Wl(t,n),tj(e)},n.prototype.enterBlur=function(t){Gl(t),tj(e)},n.prototype.leaveBlur=function(t){Kl(t),tj(e)},n.prototype.enterSelect=function(t){ql(t),tj(e)},n.prototype.leaveSelect=function(t){Jl(t),tj(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[EA]},n.prototype.usingTHL=function(){return e._usingTHL},n}(ul))(e)},ej=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[AA]=t}}F(cj,function(n,r){e._messageCenter.on(r,function(n){if(gj[e.group]&&e[AA]!==jA){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];F(hj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,jA),F(i,function(e){e[AA]!==MA&&e.dispatchAction(r)}),t(i,NA)}})})}}(),t}(Hi),aj=ij.prototype;aj.on=PA(`on`),aj.off=PA(`off`),aj.one=function(e,t,n){var r=this;function i(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var oj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],sj={},cj={},lj={},uj=[],dj=[],fj=[],pj={},mj={},hj={},gj={},_j=new Date-0;new Date-0;var vj=`_echarts_instance_`;function yj(e,t,n){var r=!(n&&n.ssr);if(r){var i=bj(e);if(i)return i}var a=new ij(e,t,n);return a.id=`ec_`+_j++,hj[a.id]=a,r&&Oc(e,vj,a.id),ej(a),ik.trigger(`afterinit`,a),a}function bj(e){return hj[kc(e,vj)]}function xj(e,t){pj[e]=t}function Sj(e){N(dj,e)<0&&dj.push(e)}function Cj(e,t){Mj(uj,e,t,fA)}function wj(e){Ej(`afterinit`,e)}function Tj(e){Ej(`afterupdate`,e)}function Ej(e,t){ik.on(e,t)}function Dj(e,t,n){var r,i,a,o,s;H(t)&&(n=t,t=``),W(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;sj[r]||(_e(kA.test(r)&&kA.test(i)),a&&_e(i!==r),sj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},lj[i]=1,a&&s&&(lj[l]=1),cj[l]=r)}function Oj(e,t){rh.register(e,t)}function kj(e,t){Mj(fj,e,t,mA,`layout`,!0)}function Aj(e,t){Mj(fj,e,t,_A,`visual`,!0)}var jj=[];function Mj(e,t,n,r,i,a){if((H(t)||W(t))&&(n=t,t=r),!(N(jj,n)>=0)){jj.push(n);var o=AO.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function Nj(e,t){mj[e]=t}function Pj(e,t,n){var r=sk(`registerMap`);r&&r(e,t,n)}var Fj=B_;Aj(gA,wO),Aj(yA,EO),Aj(yA,DO),Aj(gA,QO),Aj(yA,$O),Aj(CA,aA),Sj(mO),Cj(lA,hO),Nj(`default`,kO),Dj({type:vl,event:vl,update:vl},Ae),Dj({type:yl,event:yl,update:yl},Ae),Dj({type:bl,event:Cl,update:bl,action:Ae,refineEvent:Ij,publishNonRefinedEvent:!0}),Dj({type:xl,event:Cl,update:xl,action:Ae,refineEvent:Ij,publishNonRefinedEvent:!0}),Dj({type:Sl,event:Cl,update:Sl,action:Ae,refineEvent:Ij,publishNonRefinedEvent:!0});function Ij(e,t,n,r){return{eventContent:{selected:au(n),isFromClick:t.isFromClick||!1}}}xj(`default`,{}),xj(`dark`,JO);var Lj=[],Rj={registerPreprocessor:Sj,registerProcessor:Cj,registerPostInit:wj,registerPostUpdate:Tj,registerUpdateLifecycle:Ej,registerAction:Dj,registerCoordinateSystem:Oj,registerLayout:kj,registerVisual:Aj,registerTransform:Fj,registerLoading:Nj,registerMap:Pj,registerImpl:ok,PRIORITY:wA,ComponentModel:v_,ComponentView:vO,SeriesModel:xv,ChartView:hy,registerComponentModel:function(e){v_.registerClass(e)},registerComponentView:function(e){vO.registerClass(e)},registerSeriesModel:function(e){xv.registerClass(e)},registerChartView:function(e){hy.registerClass(e)},registerCustomSeries:function(e,t){lk(e,t)},registerSubTypeDefaulter:function(e,t){v_.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){_D(e,t)}};function zj(e){V(e)?F(e,function(e){zj(e)}):N(Lj,e)>=0||(Lj.push(e),H(e)&&(e={install:e}),e.install(Rj))}var Bj=function(e){a(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 xh(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}(xv),Vj=4,Hj=function(){function e(){}return e}(),Uj=function(e){a(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 Hj},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]<Vj,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}(To),Wj=function(){function e(){this.group=new Vu}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 Uj({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=Iv(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<Vj;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=Zc(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}(),Gj=function(e){a(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,Kj(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(),qc(t),Kj(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=lx(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(Kj(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 Wj:new Jv,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}(hy);function Kj(e){return{clipShape:wy(e)}}var qj=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),Jj=function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,wc).models[0]},t.type=`cartesian2dAxis`,t}(v_);P(Jj,qj);var Yj={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`}},Xj=k({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},Yj),Zj=k({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}}},Yj),Qj={category:Xj,value:Zj,time:k({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},Zj),log:M({logBase:10},Zj)};function $j(e,t,n,r){F(Db,function(i,o){var s=k(k({},Qj[o],!0),r,!0),c=function(e){a(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=p_(this),r=n?h_(e):{};k(e,t.getTheme().get(o+`Axis`)),k(e,this.getDefaultOption()),e.type=eM(e),n&&m_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=My.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=IS();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+o,n.defaultOption=s,n}(n);e.registerComponentModel(c)}),e.registerSubTypeDefaulter(t+`Axis`,eM)}function eM(e){return e.type||(e.data?`category`:`value`)}var tM=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}(),nM=[`x`,`y`];function rM(e){return(e.type===`interval`||e.type===`time`)&&!og(e)}var iM=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=iw,t.dimensions=nM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(rM(e)&&rM(t)){var n=zy(e,null),r=zy(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}(tM);function aM(e,t){var n=e.scale,r=e.model,i=GC(n,r,r.ecModel,e,null),a=Jy(n),o=Jy(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=ls(l[0].value-l[1].value),g=ls(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=eb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*cs(c,2):Xy(E),D=Zy(E)}function j(){w=Cs(k-E*f,D)}function M(){T=Cs(O+E*p,D)}function N(){k=f?Cs(w+E*f,D):w}function ee(){O=p?Cs(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(),te=ls(P[1]-P[0]);D=Ds([T,w],te,.5/m),N(),ee(),Ws(D)&&(E=Cs(E,D))}else{var F=C[1]-C[0];E=a?cs(Fs(F),1):Ls(F/m,2),D=Zy(E),b[0]?(w=C[0],A(function(){if(N(),O=Cs(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(ee(),k=Cs(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Cs(fs(C[0]/E)*E,D),O=Cs(ds(C[1]/E)*E,D);var e=us((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=ds(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Cs(k-E*n[0],D),O=Cs(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}Ub(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function oM(e,t){var n=Jy(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=eb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?cM(r,t):sM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Zy(d)),i[0]||(s[0]=Cs(ds(s[0]/u)*u,l)),i[1]||(s[1]=Cs(fs(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Ub(e,i,o,s,a,c)}function sM(e,t){var n=nb(t.splitNumber,5),r=Vy(e),i=t.minInterval,a=t.maxInterval,o=Ls(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Zy(o),c=e.getExtent(),l=[Cs(fs(c[0]/o)*o,s),Cs(ds(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function cM(e,t){var n=nb(t.splitNumber,10),r=e.getExtent(),i=Vy(e),a=cs(Fs(i),1);n/i*a<=.5&&(a*=10);var o=Zy(a),s=[Cs(fs(r[0]/a)*a,o),Cs(ds(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function lM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;uM(t,n,r,i,null)}function uM(e,t,n,r,i){var a=GC(e,t,r,n,i),o=Ky(e)||qy(e);dM(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&&qC(n,e,a,r)}function dM(e,t){fM[e.type](e,t)}var fM={interval:oM,log:oM,time:yb,ordinal:Ae},pM=[[3,1],[0,2]],mM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=nM,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){zC(e,1);var t=e.scale;Yy(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):lM(i)}F(n,function(e){yM(e,e.__alignTo)?lM(e):aM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};F(n.x,function(e){gM(n,`y`,e,i)}),F(n.y,function(e){gM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=u_(e,t),i=this._rect=c_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(xM(a,i),!n){var c=TM(i,o,a,s,t),l=void 0;if(s)CM?(CM(this._axesList,i),xM(a,i)):l=wM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=DM(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=wM(d,f,p,i,a,c,r))}EM(i,a,gx.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]}W(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`,wc).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,wc).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,N(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 iM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),vM(o.x),vM(o.y);function c(t){return function(n,r){if(hM(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=kb(n),u=new gS(t,Ab(n,l,!0),[0,0],l,c);u.onBand=Gb(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);N(t,i)<0&&t.push(i),N(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){RC(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;lh({targetModel:e,coordSysType:iw,coordSysProvider:r});function r(){var r=DC(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(iS(t,e,iw),iS(n,e,iw))},this),r},e.dimensions=nM,e.dimIdxMap=Pm(nM),e}();function hM(e,t){return e.getCoordSysModel()===t}function gM(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)_M(s,i[c])&&(a=i[c]);else for(var l in i)if(ke(i,l)&&_M(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 _M(e,t){if(!t)return!1;var n=t.scale,r=jb(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Nb(t)&&(i=!1),i}function vM(e){for(var t=R(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Gy(a.scale)&&Vb(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 yM(e,t){return og(e.scale)||og(t.scale)||t.scale.getTicks().length<2}function bM(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 xM(e,t){F(e.x,function(e){return SM(e,t.x,t.width)}),F(e.y,function(e){return SM(e,t.y,t.height)})}function SM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),bM(e,t)}var CM;function wM(e,t,n,r,i,a,o){EM(r,i,gx.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 Of(r,s,!0,!0,n),xM(i,r),c;function l(e){F(i[$d[e]],function(t){if(Bb(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(Wb(t.scale,YS(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=zb(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[$d[n]]-t[$d[n]],a=t[ef[n]]+t[$d[n]]-(e[ef[n]]+e[$d[n]]);i=d(i,1-r),a=d(a,r);var o=pM[n][0],c=pM[n][1];s[o]=cs(s[o],i),s[c]=cs(s[c],a)}function d(e,t){return e>0&&!fe(t)&&t>1e-4&&(e/=t),e}}function TM(e,t,n,r,i){var a=new ZS(OM);return F(n,function(n){return F(n,function(n){if(Bb(n.model)){var o=!r;n.axisBuilder=OC(e,t,n.model,i,a,o)}})}),a}function EM(e,t,n,r,i,a){var o=n===gx.determine;F(t,function(t){return F(t,function(t){Bb(t.model)&&(kC(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[$d[1-t]]=e[ef[t]]<=a.refContainer[ef[t]]*.5?0:1-t==1?2:1}F(t,function(e,t){return F(e,function(e){Bb(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function DM(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=c_(e.get(`outerBounds`,!0)||nw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||N([`all`,`axisLabel`],a)<0?`all`:a,s=[bs(G(e.get(`outerBoundsClampWidth`,!0),rw[0]),t.width),bs(G(e.get(`outerBoundsClampHeight`,!0),rw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var OM=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;tC(e,t,n,r,i,a),zb(e.nameLocation)||F(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&rC(e.labelInfoList,e.dirVec,r,i)})};function kM(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return AM(n,e,t),n.seriesInvolved&&MM(n,e),n}function AM(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=zM(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(F(n.getAxes(),B(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,B(p,!d||`cross`,u)),d&&F(f.otherAxes,B(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||RM(d))){s??=d.get(`triggerTooltip`),d=r?jM(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=zM(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:RM(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=NM(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function jM(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]=O(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&&M(l,u.textStyle)}return e.model.getModel(`axisPointer`,new bp(c,n,r))}function MM(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[zM(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 NM(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(PM(a[r+`AxisId`],n.id)||PM(a[r+`AxisIndex`],n.componentIndex)||PM(a[r+`AxisName`],n.name))return i}}function PM(e,t){return e===`all`||V(e)&&N(e,t)>=0||e===t}function FM(e){var t=IM(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=RM(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 IM(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[zM(e)]}function LM(e){var t=IM(e);return t&&t.axisPointerModel}function RM(e){return!!e.get([`handle`,`show`])}function zM(e){return e.type+`||`+e.id}var BM={},VM=function(e){a(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&&FM(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=LM(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){BM[e]=t},t.getAxisPointerClass=function(e){return e&&BM[e]},t.type=`axis`,t}(vO),HM=bc();function UM(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=HM(e).splitAreaColors,f=K(),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=V(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 zo({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:M({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}HM(e).splitAreaColors=f}}}function WM(e){HM(e).splitAreaColors=null}var GM=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],KM=function(e){a(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 Vu,this.group.add(this._axisGroup),Bb(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),F(GM,function(e){t.get([e,`show`])&&qM[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||bf(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){WM(this)},t.type=`cartesianAxis`,t}(VM),qM={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=V(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 yd({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:M({stroke:c[x]},_),silent:!0});ff(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 yd({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});ff(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){UM(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=IS(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},JM=function(e){a(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(KM),YM=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=JM.type,t}return t.type=`yAxis`,t}(KM),XM=function(e){a(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 zo({shape:e.coordinateSystem.getRect(),style:M({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(vO),ZM={offset:0};function QM(e){e.registerComponentView(XM),e.registerComponentModel(aw),e.registerCoordinateSystem(`cartesian2d`,mM),$j(e,`x`,Jj,ZM),$j(e,`y`,Jj,ZM),e.registerComponentView(JM),e.registerComponentView(YM),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function $M(e){zj(QM),e.registerSeriesModel(Bj),e.registerChartView(Gj),e.registerLayout(lx(`scatter`))}var eN=bc();function tN(e,t){return!!eN(e)[t]}Dj({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Ae);var nN={axisPointer:1,tooltip:1,brush:1};function rN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||nN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Rf(r),o=Rf(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var iN=function(e){a(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=Rf(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:G(c.z2,-1/0)},p=A({},n.triggerInfo);this._opt=M(A({},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`)&&(cN(t,`mousedown`,r,f),cN(t,`mousemove`,i,f),cN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(cN(t,`mousewheel`,o,f),cN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,lN(t,`mousedown`,r),lN(t,`mousemove`,i),lN(t,`mouseup`,a),lN(t,`mousewheel`,o),lN(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(rN(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(!(pE(e)||aN(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`||tN(t,`globalPan`)||aN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!pN(`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&&fE(e.event),e.__ecRoamConsumed=!0,fN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}}},t.prototype._mouseupHandler=function(e){if(!aN(e)){var t=this._zr;if(!pE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!aN(e)){var t=pN(`zoomOnMouseWheel`,e,this._opt),n=pN(`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(!(tN(this._zr,`globalPan`)||aN(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)&&(fE(r.event),r.__ecRoamConsumed=!0,fN(e,t,n,r,i))},t}(Hi);function aN(e){return e.__ecRoamConsumed}var oN=bc();function sN(e){var t=oN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function cN(e,t,n,r){for(var i=sN(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}),uN(e,t)}function lN(e,t,n){for(var r=sN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||dN(e,t);return}}function uN(e,t){var n=sN(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 dN(e,t){var n=sN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function fN(e,t,n,r,i){i.isAvailableBehavior=z(pN,null,n,r),e.trigger(t,i)}function pN(e,t,n){var r=n[e];return!e||r&&(!U(r)||t.event[r+`Key`])}function mN(e){return e}var hN=`view`,gN=function(e){a(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=hN,i.dimensions=[`x`,`y`];var a=mN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Yn(),o[1]=Yn(),o[2]=Yn(),a.mtRaw=ot(),a.mtRawInv=ot(),a.mtOverall=ot(),a.mtOverallInv=ot(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return vN(null,this)},t.prototype.getViewRect=function(){return yN(null,this)},t.prototype.getRoamTransform=function(){return Jn(mN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?mN(this).mtRaw:mN(this).mtOverall;return n||=[],r?kt(n,e,r):ht(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=mN(this).mtOverallInv;return r?kt(n,e,r):ht(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=zN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=zN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=mN(this);return Jt(_N,t.dataRect),Xt(_N,_N,t.mtOverall),Zt(_N,e[0],e[1])},t.dimensions=[`x`,`y`],t}(qn),_N=Kt();function vN(e,t){return Jt(e||Kt(),mN(t).dataRect)}function yN(e,t){return Jt(e||Kt(),mN(t).viewRect)}function bN(e,t,n){return Zn(e||Yn(),mN(t).trans[n])}function xN(e){return!!(e.dataRect&&e.viewRect)}function SN(e,t,n,r){r===1?IN(e,t.trans[0],n):Zn(e,n)}function CN(e,t,n){Jn(n,wN),lt(wN,wN,t.mtRawInv),Uf(e,wN)}var wN=ot();function TN(e,t){var n=mN(e);n.centerOption=t.getShallow(`center`);var r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=iP(t.getShallow(`zoom`)||1,r)||1,xN(n)&&ON(n)}function EN(e,t,n,r,i){var a=mN(e);a.dataRect=new q(t,n,r,i),xN(a)&&ON(a)}function DN(e,t,n,r,i){var a=mN(e);a.viewRect=new q(t,n,r,i),xN(a)&&ON(a)}function ON(e){kN(e),MN(e),PN(e)}function kN(e){var t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=Jt(jN,t),t.y=-t.y-t.height),Yt(AN,t,n),Uf(r,AN),i&&(r.scaleY=-r.scaleY);var a=Jn(r,e.mtRaw);pt(e.mtRawInv,a)}var AN=ot(),jN=Kt();function MN(e){var t=BN(e),n=ZN(NN,e,e.centerOption)?kt(NN,NN,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 NN=[];function PN(e){var t=e.trans,n=t[1],r=t[0],i=t[2];IN(i,r,n);var a=Jn(i,e.mtOverall),o=pt(e.mtOverallInv,a);FN(e,i,a,o),FN(e.lgGeo,i,a,o)}function FN(e,t,n,r){e&&(Zn(e,t),ct(e.transform||=[],n),ct(e.invTransform||=[],r))}function IN(e,t,n){Jn(t,LN),Jn(n,RN),lt(RN,RN,LN),Uf(e,RN)}var LN=ot(),RN=ot();function zN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function BN(e){var t=e.viewRect;return VN[0]=t.x+t.width/2,VN[1]=t.y+t.height/2,VN}var VN=[];function HN(e,t,n,r){var i=mN(n);i.syncBackEl=e,i.syncBackType=t,r?Wd(e,bN(null,n,t),r):(bN(e,n,t),e.dirty())}function UN(e,t,n,r){var i=mN(e),a=i.syncBackEl;a?(a.stopAnimation(),SN(WN,i,a,i.syncBackType)):Zn(WN,i.trans[2]),CN(GN,i,WN),r?YN(WN,GN,i,r):Zn(WN,GN),CN(WN,i,WN),tP(i,t,n,WN)}var WN=Yn(),GN=Yn();function KN(e,t,n){var r=qN(t);r&&(UN(r,t,n,e),TN(r,t))}function qN(e){return e.__ownRoamView?e.__ownRoamView():null}function JN(e,t,n,r){n.setUpdatePayload(Hf(e));var i=dl(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function YN(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=XN(t),o=iP(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 XN(e){return e.scaleX}function ZN(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 QN(e,t){var n=e.centerOption,r=e.dataRect;return!n||e.lgCt?t.slice():[$N(0,t,n,r),$N(1,t,n,r)]}function $N(e,t,n,r){return n&&r&&r[ef[e]]&&xs(n[e])?(t[e]-r[$d[e]])/r[ef[e]]*100+`%`:t[e]}function eP(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function tP(e,t,n,r){var i=BN(e),a=XN(r),o=ls(a)>1e-6;nP[0]=o?(i[0]-r.x)/a:i[0],nP[1]=o?(i[1]-r.y)/a:i[1],kt(nP,nP,e.mtRawInv);var s=QN(e,nP);rP(t,s,a),F(n,function(e){e!==t&&rP(e,s.slice(),a)})}var nP=[];function rP(e,t,n){var r=e.option;r.center=t,r.zoom=n}function iP(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 aP(e,t,n,r,i,a,o,s){if(!qN(e)){n.disable();return}n.enable(G(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=Hf(M({type:lP(r,e.subType,cl)},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 oP(e){return function(t,n,r){return sP.copy(e.getBoundingRect()),sP.applyTransform(e.getComputedTransform()),sP.contain(n,r)}}var sP=new q(0,0,0,0);function cP(e,t,n){var r=lP(t,n,cl);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Dc(e,t,n),function(t){KN(e,t),JN(e,t,r,i)})})}function lP(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function uP(e,t,n,r,i,a,o){var s=new gN(null,eP(e.ecModel,t));return EN(s,n,r,i,a),o?DN(s,o.x,o.y,o.width,o.height):DN(s,n,r,i,a),TN(s,e),s}var dP=bc();function fP(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,yP(t,n,e),F(n,function(n){F(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,B(pP,e))})}),t.wrapMethod(`cloneShallow`,B(hP,e)),F(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,B(mP,e))}),_e(n[t.dataType]===t)}function pP(e,t){if(vP(this)){var n=A({},dP(this).datas);n[this.dataType]=t,yP(t,n,e)}else bP(t,this.dataType,dP(this).mainData,e);return t}function mP(e,t){return e.struct&&e.struct.update(),t}function hP(e,t){return F(dP(t).datas,function(n,r){n!==t&&bP(n.cloneShallow(),r,t,e)}),t}function gP(e){var t=dP(this).mainData;return e==null||t==null?t:dP(t).datas[e]}function _P(){var e=dP(this).mainData;return e==null?[{data:e}]:I(R(dP(e).datas),function(t){return{type:t,data:dP(e).datas[t]}})}function vP(e){return dP(e).mainData===e}function yP(e,t,n){dP(e).datas={},F(t,function(t,r){bP(t,r,e,n)})}function bP(e,t,n,r){dP(n).datas[t]=e,dP(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=gP,e.getLinkedDataAll=_P}var xP=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){H(e)&&(n=t,t=e,e=null),e||={},U(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}(),SP=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,V(n)?n.length:1),a.push(e);var r=new xP(mc(e.name,``),i);t?CP(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=Qm(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Zm(c,n);return l.initData(a),r&&r(l),fP({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function CP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function wP(e,t,n){if(e&&N(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(U(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 TP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function EP(e,t){return N(TP(e),t)>=0}function DP(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 OP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function kP(e){for(var t=0;t<OP.length;t++)e.registerAction({type:OP[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=wP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=EP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function AP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=C_(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var jP=function(e){a(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};MP(n);var r=e.levels||[],i=new bp({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=NP(r,t);var a=I(r||[],function(e){return new bp(e,i,t)},this),o=SP.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 tv(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=DP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},A(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=K(),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(){AP(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}(xv);function MP(e){var t=0;F(e.children,function(e){MP(e);var n=e.value;V(n)&&(n=n[0]),t+=n});var n=e.value;V(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),V(e.value)?e.value[0]=n:e.value=n}function NP(e,t){var n=ec(t.get(`color`)),r=ec(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new bp(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 PP=8,FP=8,IP=5,LP=function(){function e(e){this.group=new Vu,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=u_(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=c_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),d_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=mc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+PP*2,t.emptyItemWidth);t.totalWidth+=o+FP,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 md({shape:{points:RP(c,0,_,u,m===f.length-1,m===0)},style:M(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Wo({style:Zf(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:B(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Zf(o,{text:v}),y.ensureState(`emphasis`).style=p,cu(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),zP(y,e,g),c+=_+FP}},e.prototype.remove=function(){this.group.removeAll()},e}();function RP(e,t,n,r,i,a){var o=[[i?e:e-IP,t],[e+n,t],[e+n,t+r],[i?e:e-IP,t+r]];return!a&&o.splice(2,0,[e+n+IP,t+r/2]),!i&&o.push([e,t+r/2]),o}function zP(e,t,n){Zc(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&&DP(n,t)}}var BP=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 VP(){return new BP}var HP=Math.max,UP=Math.min,WP=F,GP=[`itemStyle`,`borderWidth`],KP=[`itemStyle`,`gapWidth`],qP=[`upperLabel`,`show`],JP=[`upperLabel`,`height`],YP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=u_(e,n).refContainer,o=c_(e.getBoxLayoutParams(),a),s=r&&r.type,c=wP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=TP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,rF(e,c,u,o)):l?(f=!0,A({},l)):A({},o);if(f){var m=sF(o,p);m=cF(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(_),XP(u,g,!1,0),_=u.getLayout(),WP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(A({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(iF(o,l,c),!0),e.setLayoutInfo(o),aF(v,new q(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function XP(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(GP),l=s.get(KP)/2,u=oF(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=HP(i-2*f,0),a=HP(a-f-p,0);var m=i*a,h=ZP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=UP(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=tF(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,nF(y,_,g,l,!1),_=UP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&nF(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++)XP(h[b],t,n,r+1)}}}function ZP(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()}),$P(o,s);var l=eF(t,o,s);if(l.sum===0||(l.sum=QP(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 QP(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 $P(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 eF(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=Nc(),WP(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 tF(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?HP(l*r/c,c/(l*i)):1/0}function nF(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]]=HP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=HP(v-2*r,0);m[s[o]]=n[s[o]]+UP(r,g/2),m[s[a]]=l+UP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function rF(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=A({},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(GP),v=Math.max(_,oF(g));u+=4*_*_+(3*_+v)*u**.5,u>As&&(u=As),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function iF(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 aF(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);WP(e.viewChildren||[],function(e){aF(e,c,n,r,i+1)})}}function oF(e){return e.get(qP)?e.get(JP):0}function sF(e,t){return t.width/e.width||t.height/e.height||1}function cF(e,t){return iP(e,t.get(`scaleLimit`,!0))}var lF=Vu,uF=zo,dF=3,fF=`label`,pF=`upperLabel`,mF=100,hF=20,gF=30,_F=Ye([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),vF=function(e){var t=_F(e);return t.stroke=t.fill=t.lineWidth=null,t},yF=bc(),bF=function(e){a(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=xF(),n}return t.prototype.render=function(e,t,n,r){if(!(N(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=wP(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 lF,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=xF(),o=xF(),s=this._storage,c=[];function l(e,r,i,l){return SF(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 Cp(t,e,a,a).add(o).update(o).remove(B(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=xF();return e&&F(e,function(e,n){var r=t[n];F(e,function(e){e&&(r.push(e),yF(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=(H(i)?0:i)||0,s=(H(a)?null:a)||`cubicOut`,c=VP();F(t.willDeleteEls,function(e,t){F(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=yF(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 Vu?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=A({},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 iN(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)>dF||Math.abs(e.dy)>dF)){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=sF(c,o),u=l*r;u=cF(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&&$g(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 LP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(EP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=xF(),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}(hy);function xF(){return{nodeGroup:[],background:[],content:[]}}function SF(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=R(`nodeGroup`,lF);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),yF(D).nodeWidth=p,yF(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=R(`background`,uF,l,hF);O&&F(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),j=k.get(`focus`),M=k.get(`blurScope`),N=k.get(`disabled`),ee=j===`ancestor`?o.getAncestorsIndices():j===`descendant`?o.getDescendantIndices():j;if(x)mu(D)&&pu(D,!1),O&&(pu(O,!N),d.setItemGraphicEl(o.dataIndex,O),lu(O,ee,M));else{var P=R(`content`,uF,l,gF);P&&I(D,P),O.disableMorphing=!0,O&&mu(O)&&pu(O,!1),pu(D,!N),d.setItemGraphicEl(o.dataIndex,D);var te=f.getShallow(`cursor`);te&&P.attr(`cursor`,te),lu(D,ee,M)}return D;function F(t,n,r){var i=Zc(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)ne(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=vF(S);c.fill=s;var l=_F(C);l.fill=C.get(`borderColor`);var u=_F(w);u.fill=w.get(`borderColor`);var d=_F(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;L(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,Bl(n)}t.add(n)}function I(t,n){var r=Zc(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)ne(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=vF(S);l.fill=c,l.decal=s.decal;var u=_F(C),d=_F(w),f=_F(T);L(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Bl(n)}t.add(n)}function ne(e){!e.invisible&&a.push(e)}function L(t,n,r,i){var a=f.getModel(i?pF:fF),s=mc(f.get(`name`),null),c=a.getShallow(`show`);Yf(t,Xf(f,i?pF:fF),{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`,re(d,i,u);var m=l.getState(`emphasis`);re(m?m.style:null,i,u)}}function re(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 R(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ie(c,s)):g||(s=new r,s instanceof _a&&(s.z2=CF(a,o)),z(c,s)),t[e][_]=s}function ie(e,t){var n=e[_]={};t instanceof lF?(n.oldX=t.x,n.oldY=t.y):n.oldShape=A({},t.shape)}function z(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Vu;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 CF(e,t){return e*mF+t}var wF=F,TF=W,EF=-1,DF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=O(t);this.type=r,this.mappingMethod=n,this._normalizeData=zF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(AF(i),OF(i)):n===`category`?i.categories?kF(i):AF(i,!0):(_e(n!==`linear`||i.dataExtent),AF(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){W(e)?F(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=V(t)?[]:W(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&&wF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(V(e))e=e.slice();else if(TF(e)){var t=[];wF(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||U(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(BF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(BF(u[0],l[0],e))return a}else if(BF(u[0],l[0],e)&&BF(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:NF(`color`),getColorMapper:function(){var e=this.option;return z(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),PF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Wr(t,e.parsedVisual,r),i?r:Jr(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return Jr(Wr(e,this.option.parsedVisual),`rgba`)},category:PF,piecewise:function(e,t){var n=LF.call(this,t);return n??=Jr(Wr(e,this.option.parsedVisual),`rgba`),n},fixed:FF}},colorHue:jF(function(e,t){return Kr(e,t)}),colorSaturation:jF(function(e,t){return Kr(e,null,t)}),colorLightness:jF(function(e,t){return Kr(e,null,null,t)}),colorAlpha:jF(function(e,t){return qr(e,t)}),decal:{applyVisual:NF(`decal`),_normalizedToVisual:{linear:null,category:PF,piecewise:null,fixed:null}},opacity:{applyVisual:NF(`opacity`),_normalizedToVisual:IF([0,1])},liftZ:{applyVisual:NF(`liftZ`),_normalizedToVisual:{linear:FF,category:FF,piecewise:FF,fixed:FF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:MF,category:PF,piecewise:function(e,t){var n=LF.call(this,t);return n??=MF.call(this,e),n},fixed:FF}},symbolSize:{applyVisual:NF(`symbolSize`),_normalizedToVisual:IF([0,1])}},e}();function OF(e){var t=e.pieceList;e.hasSpecialVisual=!1,F(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function kF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(wF(t,function(e,t){n[e]=t}),!V(r)){var i=[];W(r)?wF(r,function(e,t){var r=n[t];i[r??EF]=e}):i[EF]=r,r=RF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function AF(e,t){var n=e.visual,r=[];W(n)?wF(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]),RF(e,r)}function jF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:IF([0,1])}}function MF(e){var t=this.option.visual;return t[Math.round(vs(e,[0,1],[0,t.length-1],!0))]||{}}function NF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function PF(e){var t=this.option.visual;return t[this.option.loop&&e!==EF?e%t.length:e]}function FF(){return this.option.visual[0]}function IF(e){return{linear:function(t){return vs(t,e,this.option.visual,!0)},category:PF,piecewise:function(t,n){var r=LF.call(this,n);return r??=vs(t,e,this.option.visual,!0),r},fixed:FF}}function LF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[DF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function RF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return Br(e)||[0,0,0,1]})),t}var zF={linear:function(e){return vs(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=DF.findPieceIndex(e,t,!0);if(n!=null)return vs(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??EF},fixed:Ae};function BF(e,t,n){return e?t<=n:t<n}var VF=`itemStyle`,HF=bc(),UF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||WF(t,{},e.getViewRoot().getAncestors(),e)}};function WF(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(VF),c=GF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=KF(c),u=qF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=KF(c),l.fill=f;else{var m=YF(e,i,a,s,c,p);F(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&WF(e,ZF(i,c,e,t,m,r),n,r)})}}}function GF(e,t,n){var r=A({},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 KF(e){var t=JF(e,`color`);if(t){var n=JF(e,`colorAlpha`),r=JF(e,`colorSaturation`);return r&&(t=Kr(t,null,null,r)),n&&(t=qr(t,n)),t}}function qF(e,t){return t==null?null:Kr(t,null,null,e)}function JF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function YF(e,t,n,r,i,a){if(a&&a.length){var o=XF(t,`color`)||i.color!=null&&i.color!==`none`&&(XF(t,`colorAlpha`)||XF(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 DF(d);return HF(f).drColorMappingBy=u,f}}}function XF(e,t){var n=e.get(t);return V(n)&&n.length?{name:t,range:n}:null}function ZF(e,t,n,r,i,a){var o=A({},t);if(i){var s=i.type,c=s===`color`&&HF(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 QF(e){e.registerSeriesModel(jP),e.registerChartView(bF),e.registerVisual(UF),e.registerLayout(YP),kP(e)}function $F(e){return`_EC_`+e}var eI=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[$F(e)]){var r=new tI(e,t);return r.hostGraph=this,this.nodes.push(r),n[$F(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[$F(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 tI||(e=r[$F(e)]),t instanceof tI||(t=r[$F(t)]),e&&t){var a=e.id+`-`+t.id,o=new nI(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 tI&&(e=e.id),t instanceof tI&&(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 tI||(t=this._nodesMap[$F(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}(),tI=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=K(),t=K(),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}(),nI=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=K(),t=K();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 rI(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)}}}P(tI,rI(`hostGraph`,`data`)),P(nI,rI(`hostGraph`,`edgeData`));function iI(e,t,n,r,i){for(var a=new eI(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(mc(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=xh(e,n);else{var h=rh.get(p),g=h&&h.dimensions||[];N(g,`value`)<0&&g.concat([`value`]);var _=Qm(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Zm(_,n),m.initData(e)}var v=new Zm([`value`],n);return v.initData(c,s),i&&i(m,v),fP({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var aI=yd.prototype,oI=Cd.prototype,sI=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){a(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(sI);function cI(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var lI=function(e){a(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 sI},t.prototype.buildPath=function(e,t){cI(t)?aI.buildPath.call(this,e,t):oI.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return cI(this.shape)?aI.pointAt.call(this,e):oI.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=cI(t)?[t.x2-t.x1,t.y2-t.y1]:oI.tangentAt.call(this,e);return Ct(n,n)},t}(To),uI=[`fromSymbol`,`toSymbol`];function dI(e){return`_`+e+`Type`}function fI(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=Lv(i),l=Rv(o||0,c);return r+c+l+(a||``)+(s||``)}function pI(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=Lv(i),l=Rv(o||0,c),u=Iv(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 mI(e){var t=new lI({name:`line`,subPixelOptimize:!0});return hI(t.shape,e),t}function hI(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 gI=function(e){a(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=mI(i);o.shape.percent=0,Gd(o,{z2:G(a,0),shape:{percent:1}},r,t),this.add(o),F(uI,function(n){var r=pI(n,e,t);this.add(r),this[dI(n)]=fI(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:{}};hI(o.shape,a),Wd(i,o,r,t),F(uI,function(n){var r=fI(n,e,t),i=dI(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=pI(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=Xf(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(uI,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<gl.length;n++){var r=gl[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);Yf(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)?Cs(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`);V(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),cu(this,u,d,l)},t.prototype.highlight=function(){Ul(this)},t.prototype.downplay=function(){Wl(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`);hI(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}(Vu),_I=function(){function e(e){this.group=new Vu,this._LineCtor=e||gI}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=yI(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=yI(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!vI(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(xI(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){Nf(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(xI(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);xI(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 vI(e){return e.animators&&e.animators.length>0}function yI(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:Xf(t)}}function bI(e){return isNaN(e[0])||isNaN(e[1])}function xI(e){return e&&!bI(e[0])&&!bI(e[1])}var SI=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),CI=function(e){a(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new SI},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}(To);function wI(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 TI(e,t){var n=e==null?``:e+``;return t&&(U(t)?n=t.replace(`{value}`,n):H(t)&&(n=t(e))),n}var EI=function(e){a(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=wI(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`)?Ew:cd,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Qa(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 yd({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,N=TI(Cs(A*(m-p)/v+p,14),_.get(`formatter`)),ee=r(A/v),P=O*(f-b-j)+u,te=k*(f-b-j)+d,F=_.get(`rotate`),I=0;F===`radial`?(I=-S+2*Math.PI,I>Math.PI/2&&(I+=Math.PI)):F===`tangential`?I=-S-Math.PI/2:oe(F)&&(I=F*Math.PI/180),I===0?l.add(new Wo({style:Zf(_,{text:N,x:P,y:te,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ee}),silent:!0})):l.add(new Wo({style:Zf(_,{text:N,x:P,y:te,verticalAlign:`middle`,align:`center`},{inheritColor:ee}),silent:!0,originX:P,originY:te,rotation:I}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var ne=0;ne<=y;ne++){O=Math.cos(S),k=Math.sin(S);var L=new yd({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`&&L.setStyle({stroke:r((A+ne/y)/v)}),l.add(L),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?Iv(s,l-a/2,u-o,a,o,null,d):new CI({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`)?Ew:cd,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=vs(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);Gd(r,{rotation:-((isNaN(+n)?x[0]:vs(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Gd(i,{shape:{endAngle:vs(n,b,x,m.get(`clip`))}},e),l.add(i),Qc(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,Wd(s,{rotation:-((isNaN(+r)?x[0]:vs(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);Wd(v,{shape:{endAngle:vs(r,b,x,m.get(`clip`))}},e),l.add(v),Qc(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(vs(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 jo){var d=c.style;c.useStyle(A({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,fu(c,t),cu(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,fu(m,t),cu(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=Iv(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 Vu,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Wo({silent:!0}),f[e]=new Wo({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 Vu,g=r(vs(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:Zf(_,{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:Zf(S,{x:w,y:T,text:TI(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),sp(x,{normal:S},a,function(e){return TI(e,k)}),p&&cp(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return TI(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}(hy),DI=function(e){a(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 cT(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}(xv);function OI(e){e.registerChartView(EI),e.registerSeriesModel(DI)}var kI=`funnel`,AI=function(e){a(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 lT(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return cT(this,{coordDimensions:[`value`],encodeDefaulter:B(Op,this)})},t.prototype._defaultLabelLine=function(e){tc(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.`+kI,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}(xv),jI=[`itemStyle`,`opacity`],MI=function(e){a(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new gd,o=new Wo;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(jI);c??=1,n||Xd(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Gd(r,{style:{opacity:c}},i,t)):Wd(r,{style:{opacity:c},shape:{points:o.points}},i,t),fu(r,a),this._updateLabel(e,t),cu(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;Yf(i,Xf(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 Mt(d[0][0],d[0][1]):null},Wd(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),PT(n,FT(o),{stroke:l})},t}(md),NI=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=kI,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 MI(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){Yd(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=kI,t}(hy);function PI(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 H(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function FI(e){var t=e.hostModel,n=RI(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`);U(i)&&(!n&&N([`top`,`bottom`],i)>-1&&(i=`left`),n&&N([`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 II=Yc(kI,LI);function LI(e,t){e.eachSeriesByType(kI,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=u_(e,t),o=c_(e.getBoxLayoutParams(),a.refContainer),s=RI(e),c=o.width,l=o.height,u=PI(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=vs(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=vs(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())})}}FI(n)})}function RI(e){return e.get(`orient`)===`horizontal`}function zI(e){e.registerChartView(NI),e.registerSeriesModel(AI),e.registerLayout(II),e.registerProcessor(sT(kI))}function BI(e,t,n,r,i,a){e||=0;var o=ks(n[1],-n[0]);if(i!=null&&(i=HI(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(ks(t[1],-t[0]));s=HI(s,[0,o]),i=a=HI(s,[i,a]),r=0}t[0]=HI(t[0],n),t[1]=HI(t[1],n);var c=VI(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=ks(u[0],l):u[1]=ks(u[1],-l),t[r]=HI(t[r],u);var d=VI(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=ks(t[r],c.sign*i)),d=VI(t,r),a!=null&&d.span>a&&(t[1-r]=ks(t[r],d.sign*a)),t}function VI(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 HI(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var UI=`sankey`,WI=function(e){a(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 bp(i[o],this,t));return iI(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 tv(`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 tv(`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.`+UI,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}(xv),GI=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}(),KI=function(e){a(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new GI},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(){Ul(this)},t.prototype.downplay=function(){Wl(this)},t}(To),qI=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=UI,t._mainGroup=new Vu,t}return t.prototype.init=function(e,t){this._controller=new iN(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),aP(e,n,this._controller,oP(i),null),r.eachEdge(function(t){var n=new KI,r=Zc(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()),JI(n.style,u,t);var k=``+a.get(`value`),A=Xf(a,`edgeLabel`);Yf(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`);fu(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return JI(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var M=j.get(`focus`);cu(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 zo({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});Yf(f,Xf(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),fu(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Zc(f).dataType=`node`;var p=u.get(`focus`);cu(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(YI(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){HN(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=uP(e,t,n.x,n.y,n.width,n.height);HN(this.group,2,r,this._firstRender?null:e)},t.type=UI,t}(hy);function JI(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`);U(r)&&U(i)&&(e.fill=new Od(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function YI(e,t,n){var r=new zo({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Gd(r,{shape:{width:e.width+20}},t,n),r}var XI=Yc(UI,ZI);function ZI(e,t){e.eachSeriesByType(UI,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=u_(e,t).refContainer,a=c_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;$I(l),QI(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 QI(e,t,n,r,i,a,o,s,c){eL(e,t,n,i,a,s,c),aL(e,t,a,i,r,o,s),vL(e,s)}function $I(e){F(e,function(e){var t=gL(e.outEdges,hL),n=gL(e.inEdges,hL),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function eL(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=N(t,y);s[b]=0;var x=y.node2,S=N(e,x);--c[S]===0&&N(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`&&nL(e,o,a,C),iL(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function tL(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function nL(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];N(i,u.node1)<0&&i.push(u.node1)}}a=i,i=[],++o}F(e,function(e){tL(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&rL(e,r)}function rL(e,t){F(e,function(e){!tL(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function iL(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 aL(e,t,n,r,i,a,o){var s=oL(e,o);sL(s,t,n,r,i,o),cL(s,i,n,r,o);for(var c=1;a>0;a--)c*=.99,lL(s,c,o),cL(s,i,n,r,o),_L(s,c,o),cL(s,i,n,r,o)}function oL(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=jc(e,function(e){return e.getLayout()[r]});return ws(i.keys),F(i.keys,function(e){n.push(i.buckets.get(e))}),n}function sL(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 cL(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 lL(e,t,n){F(e.slice().reverse(),function(e){F(e,function(e){if(e.outEdges.length){var r=gL(e.outEdges,uL,n)/gL(e.outEdges,hL);if(isNaN(r)){var i=e.outEdges.length;r=i?gL(e.outEdges,dL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-mL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-mL(e,n))*t;e.setLayout({y:o},!0)}}})})}function uL(e,t){return mL(e.node2,t)*e.getValue()}function dL(e,t){return mL(e.node2,t)}function fL(e,t){return mL(e.node1,t)*e.getValue()}function pL(e,t){return mL(e.node1,t)}function mL(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function hL(e){return e.getValue()}function gL(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 _L(e,t,n){F(e,function(e){F(e,function(e){if(e.inEdges.length){var r=gL(e.inEdges,fL,n)/gL(e.inEdges,hL);if(isNaN(r)){var i=e.inEdges.length;r=i?gL(e.inEdges,pL,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-mL(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-mL(e,n))*t;e.setLayout({y:o},!0)}}})})}function vL(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 yL=Yc(UI,bL);function bL(e){e.eachSeriesByType(UI,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 DF({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 xL(e){e.registerChartView(qI),e.registerSeriesModel(WI),e.registerLayout(XI),e.registerVisual(yL),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:$c,subType:UI,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),cP(e,$c,UI)}var SL=256,CL=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=f.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*(SL-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||=f.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]=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 wL(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 TL(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 EL=function(e){a(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()):Ey(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&&(Ey(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Nf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=Ty(a,`cartesian2d`),s=Ty(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=lS(f).w+.5,l=lS(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=Xf(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 zo({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 zo({z2:1,shape:M,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var N=a.dataToLayout([h.get(T[0],E)]),M=N.contentRect||N.rect;if(fe(M.x)||fe(M.y))continue;D=new zo({z2:1,shape:M,style:O})}if(h.hasItemOption){var ee=h.getItemModel(E),P=ee.getModel(`emphasis`);g=P.getModel(`itemStyle`).getItemStyle(),_=ee.getModel([`blur`,`itemStyle`]).getItemStyle(),v=ee.getModel([`select`,`itemStyle`]).getItemStyle(),y=ee.get([`itemStyle`,`borderRadius`]),S=P.get(`focus`),C=P.get(`blurScope`),w=P.get(`disabled`),b=Xf(ee)}D.shape.r=y;var te=e.getRawValue(E),F=`-`;te&&te[2]!=null&&(F=te[2]+``),Yf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:F}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,cu(D,S,C,w),D.incremental=qc(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 CL;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`?TL(v,n.option.range):wL(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 jo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(hy),DL=function(e){a(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 xh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=rh.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}(xv);function OL(e){e.registerChartView(EL),e.registerSeriesModel(DL)}var kL={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},AL=R(kL);ne(Xn,function(e,t){return e[t]=1,e},{}),Xn.join(`, `);var jL=[``,`style`,`shape`,`extra`],ML=bc();function NL(e,t,n,r,i){var a=e+`Animation`,o=Hd(e,r,i)||{},s=ML(t).userDuring;return o.duration>0&&(o.during=s?z(UL,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),A(o,n[a]),o}function PL(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=ML(e),l=t.style;c.userDuring=t.during;var u={},d={};if(qL(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];GL(`shape`,h,f[m])}else GL(`shape`,t,d),GL(`extra`,t,d);if(!a&&s&&(KL(e,t,u),WL(`shape`,e,t,u),WL(`extra`,e,t,u),JL(e,t,l,u)),d.style=l,RL(e,d,o),BL(e,t),s){if(a){var g={};F(jL,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),A(e?g[e]:g,n.enterFrom))});var _=NL(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else zL(e,t,i||0,n,u)}FL(e,t),l?e.dirty():e.markRedraw()}function FL(e,t){for(var n=ML(e).leaveToProps,r=0;r<jL.length;r++){var i=jL[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=ML(e).leaveToProps={},i&&(n[i]=n[i]||{}),A(i?n[i]:n,a.leaveTo))}}function IL(e,t,n,r){if(e){var i=e.parent,a=ML(e).leaveToProps;if(a){var o=NL(`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 LL(e){return e===`all`}function RL(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 zL(e,t,n,r,i){if(i){var a=NL(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function BL(e,t){ke(t,`silent`)&&(e.silent=t.silent),ke(t,`ignore`)&&(e.ignore=t.ignore),e instanceof _a&&ke(t,`invisible`)&&(e.invisible=t.invisible),e instanceof To&&ke(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var VL={},HL={setTransform:function(e,t){return VL.el[e]=t,this},getTransform:function(e){return VL.el[e]},setShape:function(e,t){var n=VL.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=VL.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=VL.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=VL.el.style;if(t)return t[e]},setExtra:function(e,t){var n=VL.el.extra||(VL.el.extra={});return n[e]=t,this},getExtra:function(e){var t=VL.el.extra;if(t)return t[e]}};function UL(){var e=this,t=e.el;if(t){var n=ML(t).userDuring,r=e.userDuring;n===r?(VL.el=t,r(HL)):e.el=e.userDuring=null}}function WL(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]={}),LL(c))A(o,a);else for(var l=ec(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(LL(s)||N(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];YL(i[d],f)&&(o[d]=f)}}}}}function GL(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]=Di(r[s])}}function KL(e,t,n){for(var r=t.transition,i=LL(r)?Xn:ec(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function qL(e,t,n){for(var r=0;r<AL.length;r++){var i=AL[r],a=kL[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<Xn.length;r++){var s=Xn[r];t[s]!=null&&(n[s]=t[s])}}function JL(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!LL(o)){var c=ec(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&&(LL(s)||LL(o)||N(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 YL(e,t){return te(e)?e!==t:e!=null&&isFinite(e)}var XL=bc(),ZL=[`percent`,`easing`,`shape`,`style`,`extra`];function QL(e){e.stopAnimation(`keyframe`),e.attr(XL(e))}function $L(e,t,n){if(n.isAnimationEnabled()&&t){if(V(t))F(t,function(t){$L(e,t,n)});else{var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Hd(`enter`,n,0);i=a&&a.duration}if(r&&i){var o=XL(e);F(jL,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 N(ZL,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 eR=bc(),tR=O,nR=z,rR=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 Vu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=B(iR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}cR(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&&lS(r).w>o)return!0;if(a){var s=IM(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=eR(e).pointerEl=new Zd[i.type](tR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=eR(e).labelEl=new Wo(tR(t.label));e.add(i),oR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=eR(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=eR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),oR(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=Cf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){fE(e.event)},onmousedown:nR(this._onHandleDragMove,this,0,0),drift:nR(this._onHandleDragMove,this),ondragend:nR(this._onHandleDragEnd,this)}),n.add(r)),cR(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);V(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Cw(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}}},e.prototype._moveHandleToValue=function(e,t){iR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,sR(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(sR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(sR(r)),eR(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),ww(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 iR(e,t,n,r){aR(eR(n).lastProp,r)||(eR(n).lastProp=r,t?Wd(n,r,e):(n.stopAnimation(),n.attr(r)))}function aR(e,t){if(W(e)&&W(t)){var n=!0;return F(t,function(t,r){n&&=aR(e[r],t)}),!!n}return e===t}function oR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function sR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function cR(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 lR(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 uR(e,t,n,r,i){var a=fR(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=Gg(o.get(`padding`)||0),c=o.getFont(),l=fn(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),dR(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:Zf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function dR(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 fR(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:Fb(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)}),U(o)?a=o.replace(`{value}`,a):H(o)&&(a=o(s))}return a}function pR(e,t,n){var r=ot();return dt(r,r,n.rotation),ut(r,r,n.position),gf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function mR(e,t,n,r,i,a){var o=iC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),uR(t,r,i,a,{position:pR(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function hR(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function gR(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function _R(e,t,n){return lS(e,{fromStat:{sers:I(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function vR(e,t,n){return[cs(ss(t[0],t[1]),e-n/2),ss(e+n/2,cs(t[0],t[1]))]}var yR=function(e){a(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=bR(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=lR(r),f=xR[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}mR(t,e,TC(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=TC(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=pR(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=bR(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ss(o[1],l[c]),l[c]=cs(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}(rR);function bR(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var xR={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:hR([t,r[0]],[t,r[1]],SR(e))}},shadow:function(e,t,n,r,i,a){var o=_R(e,i,a),s=r[1]-r[0],c=vR(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:gR([l,r[0]],[u-l,s],SR(e))}}};function SR(e){return e.dim===`x`?0:1}var CR=function(e){a(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}(v_),wR=bc(),TR=F;function ER(e,t,n){if(!Ne.node){var r=t.getZr();wR(r).records||(wR(r).records={}),DR(r,t);var i=wR(r).records[e]||(wR(r).records[e]={});i.handler=n}}function DR(e,t){if(wR(e).initialized)return;wR(e).initialized=!0,n(`click`,B(AR,`click`)),n(`mousemove`,B(AR,`mousemove`)),n(`mousewheel`,B(AR,`mousewheel`)),n(`globalout`,kR);function n(n,r){e.on(n,function(n){var i=jR(t);TR(wR(e).records,function(e){e&&r(e,n,i.dispatchAction)}),OR(i.pendings,t)})}}function OR(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 kR(e,t,n){e.handler(`leave`,null,n)}function AR(e,t,n,r){t.handler(e,n,r)}function jR(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 MR(e,t){if(!Ne.node){var n=t.getZr();(wR(n).records||{})[e]&&(wR(n).records[e]=null)}}var NR=function(e){a(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`;ER(`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){MR(`axisPointer`,t)},t.prototype.dispose=function(e,t){MR(`axisPointer`,t)},t.type=`axisPointer`,t}(vO);function PR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=yc(a,e);if(o==null||o<0||V(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 FR=bc();function IR(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){KR(i)&&(i=PR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=KR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||KR(i),f={},p={},m={list:[],map:{}},h={showPointer:B(zR,p),showTooltip:B(BR,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=WR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&LR(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,GR(t),GR(e)))),g[e.key]=a}})}),F(g,function(e,t){LR(u[t],e,h,!0,f)}),VR(p,u,f),HR(m,i,e,o),UR(u,o,n),f}}function LR(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=RR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&A(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}}function RR(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(Ws(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 zR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function BR(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=zM(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 VR(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 HR(e,t,n,r){if(KR(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 UR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=FR(r)[i]||{},o=FR(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 WR(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 GR(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 KR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function qR(e){VM.registerAxisPointerClass(`CartesianAxisPointer`,yR),e.registerComponentModel(CR),e.registerComponentView(NR),e.registerPreprocessor(function(e){if(e){e.axisPointer&&e.axisPointer.length!==0||(e.axisPointer={});var t=e.axisPointer.link;t&&!V(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=kM(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},IR)}function JR(e){zj(QM),zj(qR)}var YR=function(e){a(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=h_(t);e.prototype.init.apply(this,arguments),XR(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),XR(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}(v_);function XR(e,t){var n=e.cellSize,r=V(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),m_(e,t,{type:`box`,ignoreSize:I([0,1],function(e){return f_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var ZR=function(e){a(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 zo({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 gd({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 U(e)&&e?Xg(e,t):H(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 Wo({z2:30,style:Zf(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||U(a))&&(a&&(t=$h(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 Wo({z2:30,style:A(Zf(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||U(c))&&(c&&(t=$h(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 Wo({z2:30,style:A(Zf(a,{text:c[_]}),this._weekTextPositionControl(g,r,s,l,f)),silent:p});i.add(v)}}},t.type=`calendar`,t}(vO),QR=864e5,$R=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=Ps(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=c_(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||=[],V(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+QR))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),Of(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=ez(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=ez(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=ez(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(V(e)&&e.length===1&&(e=e[0]),V(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/QR)-Math.floor(t[0].time/QR)+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){lh({targetModel:t,coordSysType:`calendar`,coordSysProvider:uh})}),r},e.dimensions=[`time`,`value`],e}();function ez(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function tz(e){e.registerComponentModel(YR),e.registerComponentView(ZR),e.registerCoordinateSystem(`calendar`,$R)}function nz(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 rz(e,t){var n;return F(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function iz(e,t,n){var r=A({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(k(i,r,!0),m_(i,r,{ignoreSize:!0}),g_(n,i),sz(n,i),sz(n,i,`shape`),sz(n,i,`style`),sz(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var az=[`transition`,`enterFrom`,`leaveTo`],oz=az.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function sz(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?az:oz,i=0;i<r.length;i++){var a=r[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function cz(e,t){if(e&&(e.hv=t.hv=[rz(t,[`left`,`right`]),rz(t,[`top`,`bottom`])],e.type===`group`)){var n=e,r=t;n.width??=r.width=0,n.height??=r.height=0}}var lz=function(e){a(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=ac(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];F(o,function(e,t){var n=e.newOption;n&&(s.push(n),nz(e,n),iz(i,t,n),cz(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}(v_),uz={path:null,compoundPath:null,group:Vu,image:jo,text:Wo},dz=bc(),fz=function(e){a(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=K()},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=mc(t.id,null),s=o==null?null:n.get(o),c=mc(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&&Dy(d,u,!!p,!!f)){var m=Oy(d,u,!0);!p&&m.textConfig&&(p=t.textConfig=m.textConfig),!f&&m.textContent&&(f=m.textContent)}var h=_z(t),g=t.$action||`merge`,_=g===`merge`,v=g===`replace`;if(_){var y=!s,b=s;y?b=mz(o,l,t.type,n):(b&&(dz(b).isNew=!1),QL(b)),b&&(PL(b,h,e,{isInit:y}),gz(b,t,i,a))}else if(v){hz(s,t,n,e);var x=mz(o,l,t.type,n);x&&(PL(x,h,e,{isInit:!0}),gz(x,t,i,a))}else g===`remove`&&(FL(s,t),hz(s,t,n,e));var S=n.get(o);if(S&&f){if(_){var C=S.getTextContent();C?C.attr(f):S.setTextContent(new Wo(f))}else v&&S.setTextContent(new Wo(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||dz(D).type!==T,E=y?pz(T):D}else v&&(y=!0,E=pz(T));S.setClipPath(E),PL(E,w,e,{isInit:y}),$L(E,w.keyframeAnimation,e)}var O=dz(S);S.setTextConfig(p),O.option=t,vz(S,e,t),jf({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),$L(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=mc(l.id,null),d=u==null?null:i.get(u);if(d&&d.isGroup){var f=d.parent,p=f===r,m=dz(d),h=dz(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=mc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=dz(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=d_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!dz(d).isNew&&v){for(var y=l.transition,b={},x=0;x<s.length;x++){var S=s[x],C=_[S];y&&(LL(y)||N(y,S)>=0)?b[S]=C:d[S]=C}Wd(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){hz(n,dz(n).option,t,e._lastGraphicModel)}),this._elMap=K()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(vO);function pz(e){var t=new(ke(uz,e)?uz[e]:of(e))({});return dz(t).type=e,t}function mz(e,t,n,r){var i=pz(n);return t.add(i),r.set(e,i),dz(i).id=e,dz(i).isNew=!0,i}function hz(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){hz(e,t,n,r)}),IL(e,t,r),n.removeKey(dz(e).id))}function gz(e,t,n,r){e.isGroup||F([[`cursor`,_a.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];ke(t,r)?e[r]=G(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]=H(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 _z(e){return e=A({},e),F([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(t_),function(t){delete e[t]}),e}function vz(e,t,n){var r=Zc(e).eventData;e.silent||e.ignore||r||(r=Zc(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function yz(e){e.registerComponentModel(lz),e.registerComponentView(fz),e.registerPreprocessor(function(e){var t=e.graphic;V(t)?e.graphic=!t[0]||!t[0].elements?[{elements:t}]:[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var bz=[`x`,`y`,`radius`,`angle`,`single`],xz=bc(),Sz=[`cartesian2d`,`polar`,`singleAxis`];function Cz(e){return N(Sz,e.get(`coordinateSystem`))>=0}function wz(e){return e+`Axis`}function Tz(e,t){var n=K(),r=[],i=K();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 Ez(e){var t=e.ecModel,n={infoList:[],infoMap:K()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(wz(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 Dz(e){var t=xz(Bx(e));return t.axisProxyMap||=K()}function Oz(e){if(e)return Dz(e.ecModel).get(e.uid)}function kz(e,t){Dz(e.ecModel).set(e.uid,t)}function Az(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?Oz(n.model):null}var jz=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}(),Mz=function(e){a(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=Nz(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Nz(e);k(this.option,e,!0),k(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=K();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(bz,function(n){var r=this.getReferringComponents(wz(n),Tc);if(r.specified){t=!0;var i=new jz;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 jz;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,wc).models[0];o&&F(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,wc).models[0]&&a.add(e.componentIndex)})}}}r&&F(bz,function(t){if(r){var i=n.findComponents({mainType:wz(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new jz;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(wz(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 Oz(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(wz(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 Oz(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}(v_);function Nz(e){var t={};return F([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Pz=function(e){a(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}(vO),Fz=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 O(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Cz(t)){var n=wz(this._dimName),r=t.getReferringComponents(n,wc).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 O(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=vs(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=vs(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),ws(s),ws(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`;BI(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(var o=0;o<2;o++)t[o]=vs(e[o],n,r,!0),i&&(t[o]=t[o],l[o]=!0);Vc(t)}var f=Yy(r)||qy(r),p=n.getExtent(),m=ls(p[1]-p[0]),h=f?0:Ds(s,m,.5);F([[0,fs],[1,ds]],function(e){var n=e[0],r=e[1];l[n]&&isFinite(h)&&(s[n]=Cs(s[n],h),s[n]=ss(t[1],cs(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],f&&(s[n]=r(s[n]))))}),Vc(s);var g=[vs(s[0],t,a,!0),vs(s[1],t,a,!0)];return Vc(g),{value:s,percent:o,percentInverted:g,valuePrecision:h}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;zC(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=M({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=vs(i,[0,100],n,!0)-n[0]):i=vs(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),Iz={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(wz(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!Oz(i)){var o=new Fz(t,r,a,e);n.push(o),kz(i,o)}});var r=K();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=Az(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 Lz(e){e.registerAction(`dataZoom`,function(e,t){F(Tz(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Rz=Hc();function zz(e){Rz(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Iz),Lz(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function Bz(e,t){var n=Gg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new zo({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 Vz=function(e){a(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}(v_);function Hz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Uz(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 Wz=Uz([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Gz=Uz([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function Kz(e,t){if(!e)return t;t=Wg(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function qz(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var Jz=Kz(Gz,`transition`),Yz=Kz(Wz,`transform`),Xz=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Ne.transform3dSupported?`will-change:transform;`:``);function Zz(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function Qz(e,t,n){if(!U(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=Qg(t);var a=Zz(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=Yz+`:`,l;N([`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 $z(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?``+Yz+i:`,left`+i+`,top`+i)),Jz+`:`+a}function eB(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;`+Yz+`:`+o+`;`:[[`top`,0],[`left`,0],[Wz,o]]}function tB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=G(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 nB(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=hv(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push($z(a,n,r)),o&&i.push(`background-color:`+o),F([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Wg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(tB(d)),f!=null&&i.push(`padding:`+Gg(f).join(`px `)+`px`),i.join(`;`)+`;`}function rB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Ph(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 iB=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&&(U(i)?document.querySelector(i):le(i)?i:H(i)&&i(e.getDom()));rB(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;cE(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=qz(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=Xz+nB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+eB(i[0],i[1],!0)+(`border-color:`+Qg(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(U(i)&&n.get(`trigger`)===`item`&&!Hz(n)&&(o=Qz(n,r,i)),U(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,V(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(rB(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;F(eB(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;Fh(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}(),aB=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),cB(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;W(e)&&Xs(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Wo({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:hv(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=sB(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;cB(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=oB(i.borderWidth||0),o=sB(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 oB(e){return Math.max(0,e)}function sB(e){var t=oB(e.shadowBlur||0),n=oB(e.shadowOffsetX||0),r=oB(e.shadowOffsetY||0);return{left:oB(t-n),right:oB(t+n),top:oB(t-r),bottom:oB(t+r)}}function cB(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var lB=new zo({shape:{x:-1,y:-1,width:2,height:2}}),uB=function(e){a(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=Ac(n.get(`renderMode`));this._tooltipContent=r===`richText`?new aB(t):new iB(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`)?Cw(this,`_updatePosition`,50,`fixRate`):ww(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);ER(`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=fB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=_B(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=lB;c.x=r.x,c.y=r.y,c.update(),Zc(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=PR(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(fB(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&&dB([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(Zc(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;rk(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Zc(e).dataIndex==null?Zc(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=dB([t.tooltipOption],r),o=this._renderMode,s=[],c=tv(`section`,{blocks:[],noHeader:!0}),l=[],u=new gv;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=fR(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=tv(`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=Fb(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,Qg(m.color),o);var h=k_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=dB([a],r).get(`valueFormatter`);p.blocks.push(_?A({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=sv(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=Qc(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=fB([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 _v;h.marker=g.makeTooltipMarker(`item`,$g(h.color),d);var _=A_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?cv(y?A({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=Qc(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=O(a),a.content=Uh(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=fB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new _v;this._showOrMove(d,function(){var n=O(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=Eg(m.axisValue,d,p)),d=Xg(d,n,!0)}else if(V(u)){var g=R(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=q(t[0],s),r=q(t[1],c);else if(U(t)){var p=t;p.width=l[0],p.height=l[1];var m=l_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(H(t)&&o){var h=gB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=mB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=_B(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=_B(d)?l[1]/2:d===`bottom`?l[1]:0),Uz(e)){var h=hB(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){!Pe.node&&t.getDom()&&(Tw(this,`_updatePosition`),this._tooltipContent.dispose(),NR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(yO);function fB(e,t,n){var r=t.ecModel,i;n?(i=new xp(n,r,r),i=new xp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof xp&&(o=o.get(`tooltip`,!0)),H(o)&&(o={formatter:o}),o&&(i=new xp(o,i,r)))}return i}function pB(e,t){return e.dispatchAction||R(t.dispatchAction,t)}function mB(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 hB(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 gB(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 _B(e){return e===`center`||e===`middle`}function vB(e,t,n){var r=wc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Dc(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=Qc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function yB(e){Bj(JR),e.registerComponentModel(Hz),e.registerComponentView(dB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},je),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},je)}var bB=F;function xB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function SB(e,t,n){var r={};return bB(t,function(t){var a=r[t]=i();bB(e[t],function(e,r){if(OF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new OF(i),r===`opacity`&&(i=O(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new OF(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function CB(e,t,n){var r;F(n,function(e){t.hasOwnProperty(e)&&xB(t[e])&&(r=!0)}),r&&F(n,function(n){t.hasOwnProperty(n)&&xB(t[n])?e[n]=O(t[n]):delete e[n]})}function wB(e,t,n,r){var i={};return F(e,function(e){i[e]=OF.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return tk(a,l,e)}function c(e,t){rk(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 TB=function(e){a(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:J.size.m,backgroundColor:J.color.transparent,borderColor:J.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:J.color.primary},subtextStyle:{fontSize:12,color:J.color.quaternary}},t}(y_),EB=function(e){a(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 Go({style:Qf(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Go({style:Qf(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(){e_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){e_(p,`_`+e.get(`subtarget`))}),Qc(c).eventData=Qc(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 _=l_(g,d_(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 Bo({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}(yO);function DB(e){e.registerComponentModel(TB),e.registerComponentView(EB)}function OB(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 kB(e){nc(e,`label`,[`show`])}var AB=xc(),jB=function(e){a(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(Pe.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=AB(e)[i];!n||!n.data?AB(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&kB(n),F(n.data,function(e){e instanceof Array?(kB(e[0]),kB(e[1])):kB(e)}),a=this.createMarkerModelFromSeries(n,this,t),A(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),AB(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return nv(`section`,{header:this.name,blocks:[nv(`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=k_.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 AB(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(y_);P(jB,k_.prototype);function MB(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function NB(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function PB(e,t,n,r,i,a,o){var s=[],c=vh(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=VB(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=Es(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var FB={min:z(PB,`min`),max:z(PB,`max`),average:z(PB,`average`),median:z(PB,`median`)};function IB(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!NB(t)&&!B(t.coord)&&B(i)){var a=LB(t,n,r,e);if(t=O(t),t.type&&FB[t.type]&&a.baseAxis&&a.valueAxis){var o=N(i,a.baseAxis.dim),s=N(i,a.valueAxis.dim),c=FB[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&&FB[t.type]){var u=r.getOtherAxis(l);u&&(t.value=VB(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)FB[d[f]]&&(d[f]=VB(n,n.mapDimension(i[f]),d[f]));return t}}function LB(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(RB(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 RB(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function zB(e,t){return e&&e.containData&&t.coord&&!MB(t)?e.containData(t.coord):!0}function BB(e,t){return e?function(e,n,r,i){return gm(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return gm(e.value,t[i])}}function VB(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 HB=xc(),UB=function(e){a(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){HB(e).keep=!1}),t.eachSeries(function(e){var i=jB.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!HB(e).keep&&r.group.remove(e.group)}),WB(t,i,this.type)},t.prototype.markKeep=function(e){HB(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;F(e,function(e){var r=jB.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Kl(e):ql(e))})})},t.type=`marker`,t}(yO);function WB(e,t,n){e.eachSeries(function(e){var r=jB.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=zf(r),o=a.z,s=a.zlevel;Vf(i.group,o,s)}})}var GB=function(e){a(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}(jB),KB=xc(),qB=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=me(r.yAxis,r.xAxis);else{var l=LB(r,i,t,e);s=l.valueAxis,c=VB(i,yh(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=O(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=[IB(e,a[0]),IB(e,a[1]),A({},a[2])];return h[2].type=h[2].type||null,k(h[2],h[0]),k(h[2],h[1]),h};function JB(e){return!isNaN(e)&&!isFinite(e)}function YB(e,t,n,r){var i=1-e,a=r.dimensions[e];return JB(t[i])&&JB(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function XB(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(YB(1,n,r,e)||YB(0,n,r,e)))return!0}return zB(e,t[0])&&zB(e,t[1])}function ZB(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(Ey(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;JB(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):JB(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 QB=function(e){a(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=jB.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=KB(t).from,a=KB(t).to;i.each(function(t){ZB(i,t,!0,e,n),ZB(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 vI);this.group.add(c.group);var l=$B(i,e,t),u=l.from,d=l.to,f=l.line;KB(t).from=u,KB(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){Qc(e).dataModel=t,e.traverse(function(e){Qc(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);ZB(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=nk(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}(UB);function $B(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return A(A({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Qm(r,n),a=new Qm(r,n),o=new Qm([],n),s=I(n.get(`data`),z(qB,t,e,n));e&&(s=re(s,z(XB,e)));var c=BB(!!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 eV(e){e.registerComponentModel(GB),e.registerComponentView(QB),e.registerPreprocessor(function(e){OB(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var tV=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`])}},nV=function(e){a(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]=k(e,tV(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&&gc(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=G(),a=I(r,function(e){return(H(e)||se(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new xp(e,this,this.ecModel))},this);this._data=re(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])&&N(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:J.size.m,align:`auto`,backgroundColor:J.color.transparent,borderColor:J.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:J.color.disabled,inactiveBorderColor:J.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:J.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:J.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:J.color.tertiary,borderWidth:1,borderColor:J.color.border},emphasis:{selectorLabel:{show:!0,color:J.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(y_),rV=z,iV=F,aV=Hu,oV=function(e){a(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 aV),this.group.add(this._selectorGroup=new aV),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=d_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=l_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=l_(M({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=Vz(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)}),iV(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
-
`)){var p=new
|
|
18
|
-
`&&r!==``){var i=e.isSelected(r);n[r]=Ae(n,r)?n[r]&&i:i}}),n}function mV(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,z(fV,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,z(fV,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,z(fV,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,z(fV,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,z(fV,`unSelect`))}var hV=Zc(gV);function gV(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 _V(e){e.registerComponentModel(nV),e.registerComponentView(oV),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,hV),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),mV(e)}var vV=function(e){a(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=g_(t);e.prototype.init.call(this,t,n,r),yV(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),yV(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=kh(nV.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:J.color.accent50,pageIconInactiveColor:J.color.accent10,pageIconSize:15,pageTextStyle:{color:J.color.tertiary},animationDurationUpdate:800}),t}(nV);function yV(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,h_(t,n,{type:`box`,ignoreSize:!!i})}var bV=Hu,xV=[`width`,`height`],SV=[`x`,`y`],CV=function(e){a(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 bV),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new bV)},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 Go({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=wf(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:R(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=xV[s],l=SV[s],u=xV[1-s],d=SV[1-s];i&&a_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=O(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;a_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),a_(`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 Bo({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&&Gd(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=xV[i],o=SV[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}(oV);function wV(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 TV(e){Bj(_V),e.registerComponentModel(vV),e.registerComponentView(CV),wV(e)}function EV(e){Bj(_V),Bj(TV)}var DV=function(e){a(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=kh(Nz.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Nz),OV=xc();function kV(e,t,n){OV(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function AV(e,t){for(var n=OV(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||jV(n,o))}}}function jV(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function MV(e,t){var n={model:t,containsPoint:z(PV,t),dispatchAction:z(NV,e),dataZoomInfoMap:null,controller:null},r=n.controller=new aN(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 NV(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function PV(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function FV(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 IV(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=OV(t),r=n.coordSysRecordMap||=G();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){F(Dz(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,MV(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)jV(r,e);else{var s=FV(a,e,t);n.enable(s.controlType,s.opt),ww(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var LV=function(e){a(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(),kV(r,t,{pan:R(RV.pan,this),zoom:R(RV.zoom,this),scrollMove:R(RV.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){AV(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(Fz),RV={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=BV[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(VI(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:zV(function(e,t,n,r,i,a){var o=BV[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:zV(function(e,t,n,r,i,a){return BV[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function zV(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(VI(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 BV={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 VV(e){Bz(e),e.registerComponentModel(DV),e.registerComponentView(LV),IV(e)}var HV=function(e){a(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=kh(Nz.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:J.color.accent10,borderRadius:0,backgroundColor:J.color.transparent,dataBackground:{lineStyle:{color:J.color.accent30,width:.5},areaStyle:{color:J.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:J.color.accent40,width:.5},areaStyle:{color:J.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:J.color.neutral00,borderColor:J.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:J.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:J.color.tertiary},brushSelect:!0,brushStyle:{color:J.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:J.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Nz),UV=Bo,WV=1,GV=30,KV=7,qV=`horizontal`,JV=`vertical`,YV=5,XV=[`line`,`bar`,`candlestick`,`scatter`],ZV={easing:`cubicOut`,duration:100,delay:0},QV=function(e){a(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=R(this._onBrush,this),this._onBrushEnd=R(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),ww(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(){Tw(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 Hu;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`)?KV:0,r=d_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===qV?{right:r.width-i.x-i.width,top:r.height-GV-a-n,width:i.width,height:GV}:{right:a,top:i.y,width:GV,height:i.height},s=g_(e.option);F([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=l_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===JV&&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===qV&&!i?{scaleY:o?1:-1,scaleX:1}:n===qV&&i?{scaleY:o?1:-1,scaleX:-1}:n===JV&&!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 UV({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new UV({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:R(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:ys(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 Hu,r=new hd({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new _d({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&&N(XV,e.get(`type`))<0)){var o=r.getComponent(Tz(i),a).axis,s=eH(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 UV({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new UV({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:WV,fill:J.color.transparent}})),F([0,1],function(t){var a=o.get(`handleIcon`);!Pv[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=Lv(a,-1,0,2,2,null,!0);s.attr({cursor:tH(this._orient),draggable:!0,drift:R(this._onDragMove,this,t),ondragend:R(this._onDragEnd,this),onmouseover:R(this._onOverDataInfoTriggerArea,this,!0),onmouseout:R(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(),su(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 Go({silent:!0,invisible:!f,style:Qf(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 Bo({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=Lv(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,J.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 Bo({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:R(this._onActualMoveZoneDrift,this),ondragstart:R(this._onActualMoveZoneDragStart,this),ondragend:R(this._onActualMoveZoneDragEnd,this),onmouseover:R(this._onOverDataInfoTriggerArea,this,!0),onmouseout:R(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ys(e[0],[0,100],t,!0),ys(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];VI(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:ys(a.minSpan,o,i,!0),a.maxSpan==null?null:ys(a.maxSpan,o,i,!0));var s=this._range,c=this._range=Ts([ys(r[0],i,o,!0),ys(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=Ts(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 Bo,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=jz(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=[$V(t,0,l,s),$V(t,1,l,s)]}}var p=Ts(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=gf(n.handles[e].parent,this.group),o=vf(e===0?`right`:`left`,t),s=this._handleWidth/2+YV,c=_f([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===qV?`middle`:o,align:i===qV?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,pE(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=_f([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 Nt(t,n),this._brushing=!0,this._brushStartTime=+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(!(+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();VI(0,a,r,0,o.minSpan==null?null:ys(o.minSpan,i,r,!0),o.maxSpan==null?null:ys(o.maxSpan,i,r,!0)),this._range=Ts([ys(a[0],r,i,!0),ys(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(pE(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 UV({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?ZV:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Dz(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}(Fz);function $V(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)?``:Xy(r)||Jy(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?ws(o,a,!0):o+``;return V(i)?i(o,s):H(i)?i.replace(`{value}`,s):s}function eH(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function tH(e){return e===`vertical`?`ns-resize`:`ew-resize`}function nH(e){e.registerComponentModel(HV),e.registerComponentView(QV),Bz(e)}function rH(e){Bj(VV),Bj(nH)}var iH={get:function(e,t,n){var r=O((aH[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},aH={color:{active:[`#006edd`,`#e0ffff`],inactive:[J.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]}},oH=OF.mapVisual,sH=OF.eachVisual,cH=B,lH=F,uH=Ts,dH=ys,fH=function(e){a(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&&CB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=R(e,this),this.controllerVisuals=SB(this.option.controller,t,e),this.targetVisuals=SB(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 lH(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=Dc(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=uH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=ie(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||={};k(r,n),k(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){cH(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]={},lH(r,function(e,t){if(OF.isValidType(t)){var n=iH.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`;lH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&O(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&O(n)||(a?s[0]:[s[0],s[0]])),c.symbol=oH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;sH(l,function(e){e>u&&(u=e)}),c.symbolSize=oH(l,function(e){return dH(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:J.color.transparent,borderColor:J.color.borderTint,contentColor:J.color.theme[0],inactiveColor:J.color.disabled,borderWidth:0,padding:J.size.m,textGap:10,precision:0,textStyle:{color:J.color.secondary}},t}(y_),pH=function(e){a(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=Kg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Bo({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(OF.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),OF.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=d_(t,n).refContainer;f_(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(yO),mH=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function hH(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=mH[o],c=[0,null,10],l={},u=0;u<3;u++)l[mH[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=l_(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 gH(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 _H={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},vH=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},yH=[{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(wB(t.stateList,t.targetVisuals,R(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(R(bH,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function bH(e,t,n,r){for(var i=t.targetVisuals[r],a=OF.prepareVisualTypes(i),o={color:nk(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 xH=F;function SH(e){var t=e&&e.visualMap;B(t)||(t=t?[t]:[]),xH(t,function(e){if(e){CH(e,`splitList`)&&!CH(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&B(t)&&xH(t,function(e){U(e)&&(CH(e,`start`)&&!CH(e,`min`)&&(e.min=e.start),CH(e,`end`)&&!CH(e,`max`)&&(e.max=e.end))})}})}function CH(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var wH=!1;function TH(e){wH||(wH=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(_H,vH),F(yH,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(SH))}var EH=function(e){a(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=[],DH[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=O(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=I(this._pieceList,function(e){return e=O(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=OF.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]=iH.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=O(e)},t.prototype.getValueState=function(e){var t=OF.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){OF.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=kh(fH.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}(fH),DH={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]}),zs(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),OH(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=OF.retrieveVisuals(t),e.push(r)},this),OH(t,e),zs(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 OH(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var kH=function(e){a(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),F(o.viewPieceList,function(o){var s=o.piece,u=new Hu;u.onclick=R(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 Go({style:Qf(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),a_(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:gH(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return hH(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 Hu,o=this.visualMapModel.textStyleModel;a.add(new Go({style:Qf(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=Lv(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=O(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}(pH);function AH(e){e.registerComponentModel(EH),e.registerComponentView(kH),TH(e)}function jH(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function MH(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:jH(r&&r.shape.points)}}var NH=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],PH=new Jn,FH=xc(),IH=xc();function LH(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];t[i]!=null&&(e[i]=t[i])}}var RH=[`x`,`y`,`rotation`],zH=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?PH.setLocalTransform(s):(PH.x=PH.y=PH.rotation=PH.originX=PH.originY=0,PH.scaleX=PH.scaleY=1),PH.rotation=ao(PH.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:PH.x,y:PH.y,scaleX:PH.scaleX,scaleY:PH.scaleY,rotation:PH.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)||L(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),a=Qc(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(){OT(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(MH(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=FH(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<NH.length;m++){var h=NH[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(kS({},e))});var i=re(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=re(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});jS(i,0,0,t),jS(a,1,0,n);var o=re(r,function(e){return e.layoutOption.hideOverlap});MS(o),NS(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=FH(o).needsUpdateLabelLine),a&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=Qc(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`);FT(e,IT(o),s),OT(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&&!qd(e))){var i=FH(n),a=i.oldLayout,o=Qc(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&&(N(u,`select`)>=0&&n.attr(i.oldLayoutSelect),N(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Gd(n,c,t,s)}else if(n.attr(c),!sp(n).valueAnimation){var d=W(n.style.opacity,1);n.style.opacity=0,Kd(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};LH(f,c,RH),LH(f,n.states.select,RH)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};LH(p,c,RH),LH(p,n.states.emphasis,RH)}lp(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=IH(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Gd(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Kd(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),BH=xc();function VH(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=BH(t).labelManager;r||=BH(t).labelManager=new zH,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=BH(t).labelManager;F(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var HH=function(){function e(t,n){Ly(this,e.decoratedMethods),this._outOfBrk=Uy(null,n);var r=this._linear=Uy(null,n);Ry(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){Bc(t,n)&&(e===0&&KH(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=WH,r=GH,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=WH,r=GH,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 UH(e,t){return new HH(e,t)}var WH=0,GH=0;function KH(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=YH(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:ls(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function qH(e,t,n,r,i,a){e!==`no`&&F(n,function(n){var o=YH(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 JH(e,t,n,r){F(t,function(t){var i=YH(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 YH(e,t){var n=ls(e.vmin,t[0]),r=cs(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 XH(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:O(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=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&&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:re(r,function(e){return!!e})}}function ZH(e,t){return QH(t)===QH(e)}function QH(e){return e.start+`_\0_`+e.end}function $H(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=ie(r,function(n){return ZH(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 eU(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=ie(n,function(e){return ZH(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:O(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function tU(e,t,n,r,i){i.original=XH(e,t,n);var a=i.transformed=XH(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 nU={vmin:`start`,vmax:`end`};function rU(e,t){return t&&(e||={},e.break={type:nU[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function iU(){rg({createBreakScaleMapper:UH,pruneTicksByBreak:qH,addBreaksToTicks:JH,parseAxisBreakOption:XH,identifyAxisBreak:ZH,serializeAxisBreakIdentifier:QH,retrieveAxisBreakPairs:$H,getTicksBreakOutwardTransform:eU,parseAxisBreakOptionInwardTransform:tU,makeAxisLabelFormatterParamBreak:rU})}var aU=xc();function oU(e,t){var n=ie(e,function(e){return ig().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function sU(e){F(e,function(e){return e.shouldRemove=!0})}function cU(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function lU(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!ig())return;var o=ig().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 Hu({ignoreModelZ:!0}),y=a.isHorizontal(),b=aU(t).visualList||(aU(t).visualList=[]);sU(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=oU(b,t);s.shouldRemove=!1;var c=new Hu;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:RS,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),cU(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[ef[v]]+r[tf[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[ef[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return Fo(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[ef[v]],T=0;;T++){var E=w===r[ef[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=ig().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new _d({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new _d({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var M=S.slice();M.reverse();var N=x.concat(M);t.add(new hd({anid:`break_c_`+j,shape:{points:N},style:{fill:_,opacity:p.opacity},z:f}))}}}function uU(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=I(ig().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:ig().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&&(At(e,e,a),At(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};Fo(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 bd(A({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 dU(e,t,n){if(ie(n,function(e){return!e}))return;var r=new Nt;if(!PS(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=st();ft(i,i,-t);var a=I(n,function(e){return e.transform?ut(st(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new Nt(t[tf[e]]*a[0][0],t[tf[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 Nt;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 Nt,h=new Nt;Nt.scale(m,r,-s),Nt.scale(h,r,1-s),OS(n[0],m),OS(n[1],h)}function fU(e,t){var n={breaks:[]};return F(t.breaks,function(r){if(r){var i=ie(e.get(`breaks`,!0),function(e){return ig().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 pU(){IS({adjustBreakLabelPair:dU,buildAxisBreakLine:uU,rectCoordBuildBreakAxis:lU,updateModelAxisBreak:fU})}function mU(e){KS(e),iU(),pU()}var hU=Math.sin,gU=Math.cos,_U=Math.PI,vU=Math.PI*2,yU=180/_U,bU=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=ni(u-vU)||(l?c>=vU:-c>=vU),f=c>0?c%vU:c%vU+vU,p=!1;p=d?!0:!ni(u)&&f>=_U==!!l;var m=e+n*gU(a),h=t+r*hU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*yU);if(d){var _=1/this._p,v=(l?1:-1)*(vU-_);this._add(`A`,n,r,g,1,+l,e+n*gU(a+v),t+r*hU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*gU(o),b=t+r*hU(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}(),xU=`none`,SU=Math.round;function CU(e){var t=e.fill;return t!=null&&t!==xU}function wU(e){var t=e.stroke;return t!=null&&t!==xU}var TU=[`lineCap`,`miterLimit`,`lineJoin`],EU=I(TU,function(e){return`stroke-`+e.toLowerCase()});function DU(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof Mo)e(`opacity`,i);else{if(CU(t)){var a=ei(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`,xU);if(wU(t)){var s=ei(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=Sk(n),p=f[0],m=f[1];p&&(m=SU(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,xU);for(var h=0;h<TU.length;h++){var g=TU[h];if(r||t[g]!==Co[g]){var _=t[g]||Co[g];_&&e(EU[h],_)}}}else r&&e(`stroke`,xU)}}var OU=`http://www.w3.org/2000/svg`,kU=`http://www.w3.org/1999/xlink`,AU=`http://www.w3.org/2000/xmlns/`,jU=`http://www.w3.org/XML/1998/namespace`,MU=`ecmeta_`;function NU(e){return document.createElementNS(OU,e)}function PU(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function FU(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 IU(e){return`</`+e+`>`}function LU(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
|
|
20
|
-
`:``,i=` {`+r,a=r+`}`,o=I(L(e),function(t){return t+i+I(L(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=I(L(t),function(e){return`@keyframes `+e+i+I(L(t[e]),function(n){return n+i+I(L(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 zU(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function BU(e,t,n,r){return PU(`svg`,`root`,{width:e,height:t,xmlns:OU,"xmlns:xlink":kU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var VU=0;function HU(){return VU++}var UU={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`},WU=`transform-origin`;function GU(e,t,n){var r=A({},e.shape);A(r,t),e.buildPath(n,r);var i=new bU;return i.reset(_i(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function KU(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[WU]=n+`px `+r+`px`)}var qU={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function JU(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function YU(e,t,n){var r=e.shape.paths,i={},a,o;if(F(r,function(e){var t=zU(n.zrId);t.animation=!0,ZU(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=L(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=JU(i,n);return a.replace(o,s)}}function XU(e){return H(e)?UU[e]?`cubic-bezier(`+UU[e]+`)`:Er(e)?e:``:``}function ZU(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Dd){var s=YU(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=XU(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=XU(d.easing),m=d.rawValue;(H(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={};Qn(g,e),A(g,s[h]);var _=vi(g),v=s[h][u];l[h]=_?{transform:_}:{},KU(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 eo);var S=y.len();y.reset(),l[h].d=GU(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 qU[e]})}for(var w=L(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][WU]!==l[O][WU]){T=!1;break}E=l[D][WU]}if(T&&E){for(var h in l)l[h][WU]&&delete l[h][WU];t[WU]=E}if(re(w,function(e){return L(l[e]).length>0}).length)return JU(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-`+HU();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function QU(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};$U(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=Qr(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),$U(r,t,n,!0)}}}function $U(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+HU(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var eW=Math.round;function tW(e){return e&&H(e.src)}function nW(e){return e&&V(e.toDataURL)}function rW(e,t,n,r){DU(function(i,a){var o=i===`fill`||i===`stroke`;o&&hi(a)?vW(t,e,i,r):o&&fi(a)?yW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),_W(n,e,r)}function iW(e,t){var n=bD(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[MU+`silent`]=`true`))}function aW(e){return ni(e[0]-1)&&ni(e[1])&&ni(e[2])&&ni(e[3]-1)}function oW(e){return ni(e[4])&&ni(e[5])}function sW(e,t,n){if(t&&!(oW(t)&&aW(t))){var r=n?10:1e4;e.transform=aW(t)?`translate(`+eW(t[4]*r)/r+` `+eW(t[5]*r)/r+`)`:ai(t)}}function cW(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(eW(r[a][0]*n)/n),i.push(eW(r[a][1]*n)/n);t.points=i.join(` `)}function lW(e){return!e.smooth}function uW(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]]=eW(o*r)/r)}}}var dW={circle:[uW([`cx`,`cy`,`r`])],polyline:[cW,lW],polygon:[cW,lW]};function fW(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function pW(e,t){var n=e.style,r=e.shape,i=dW[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&_i(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&fW(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 bU,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return sW(a,e.transform),rW(a,n,e,t),iW(a,e),t.animation&&ZU(e,a,t),t.emphasis&&QU(e,a,t),PU(s,e.id+``,a)}function mW(e,t){var n=e.style,r=n.image;if(r&&!H(r)&&(tW(r)?r=r.src:nW(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),sW(c,e.transform),rW(c,n,e,t),iW(c,e),t.animation&&ZU(e,c,t),PU(`image`,e.id+``,c)}}function hW(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=si(n.y||0,gn(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":oi[n.textAlign]||n.textAlign};if(Zo(n)){var c=``,l=n.fontStyle,u=Yo(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),sW(s,e.transform),rW(s,n,e,t),iW(s,e),t.animation&&ZU(e,s,t),PU(`text`,e.id+``,s,void 0,r)}}function gW(e,t){if(e instanceof Eo)return pW(e,t);if(e instanceof Mo)return mW(e,t);if(e instanceof Oo)return hW(e,t)}function _W(e,t,n){var r=e.style;if(ci(r)){var i=li(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=ei(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]=PU(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[PU(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=gi(o)}}function vW(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(pi(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(mi(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=ii(s[l].offset)*100+`%`,f=s[l].color,p=ei(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(PU(`stop`,l+``,g))}var _=LU(PU(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=PU(a,y,o,c)),t[n]=gi(y)}function yW(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(ui(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(H(h)?m=h:tW(h)?m=h.src:nW(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=it(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=PU(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=O(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=vi(i);x&&(o.patternTransform=x);var S=PU(`pattern`,``,o,[d]),C=LU(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=PU(`pattern`,T,o,[d])),t[n]=gi(T)}}function bW(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]=PU(`clipPath`,a,o,[pW(e,n)])}t[`clip-path`]=gi(a)}function xW(e){return document.createTextNode(e)}function SW(e,t,n){e.insertBefore(t,n)}function CW(e,t){e.removeChild(t)}function wW(e,t){e.appendChild(t)}function TW(e){return e.parentNode}function EW(e){return e.nextSibling}function DW(e,t){e.textContent=t}var OW=58,kW=120,AW=PU(``,``);function jW(e){return e===void 0}function MW(e){return e!==void 0}function NW(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 PW(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function FW(e){var t,n=e.children,r=e.tag;if(MW(r)){var i=e.elm=NU(r);if(RW(AW,e),B(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&wW(i,FW(a))}else MW(e.text)&&!U(e.text)&&wW(i,xW(e.text))}else e.elm=xW(e.text);return e.elm}function IW(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&SW(e,FW(a),t)}}function LW(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(MW(i.tag)?CW(TW(i.elm),i.elm):CW(e,i.elm))}}function RW(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)===kW?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(AU,n,o):n.charCodeAt(3)===OW?r.setAttributeNS(jU,n,o):n.charCodeAt(5)===OW?r.setAttributeNS(kU,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function zW(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]:PW(o,l)?(BW(o,l),o=t[++r],l=n[++i]):PW(s,u)?(BW(s,u),s=t[--a],u=n[--c]):PW(o,u)?(BW(o,u),SW(e,o.elm,EW(s.elm)),o=t[++r],u=n[--c]):PW(s,l)?(BW(s,l),SW(e,s.elm,o.elm),s=t[--a],l=n[++i]):(jW(d)&&(d=NW(t,r,a)),f=d[l.key],jW(f)?SW(e,FW(l),o.elm):(p=t[f],p.tag===l.tag?(BW(p,l),t[f]=void 0,SW(e,p.elm,o.elm)):SW(e,FW(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,IW(e,m,n,i,c)):LW(e,t,r,a))}function BW(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(RW(e,t),jW(t.text)?MW(r)&&MW(i)?r!==i&&zW(n,r,i):MW(i)?(MW(e.text)&&DW(n,``),IW(n,null,i,0,i.length-1)):MW(r)?LW(n,r,0,r.length-1):MW(e.text)&&DW(n,``):e.text!==t.text&&(MW(r)&&LW(n,r,0,r.length-1),DW(n,t.text)))}function VW(e,t){if(PW(e,t))BW(e,t);else{var n=e.elm,r=TW(n);FW(t),r!==null&&(SW(r,t.elm,EW(n)),LW(r,[e],0,0))}return t}var HW=0,UW=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=WW(`configLayer`),this.storage=t,this._opts=n=A({},n),this.root=e,this._id=`zr`+HW++,this._oldVNode=BU(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=NU(`svg`);RW(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`,VW(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return gW(e,zU(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=zU(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=GW(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=PU(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=I(L(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(PU(`defs`,`defs`,{},c)),e.animation){var l=RU(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=PU(`style`,`stl`,{},[],l);a.push(u)}}return BU(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},LU(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 _={};bW(d[g],_,t);var v=PU(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=gW(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=bk(r,0,n),t=bk(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(fi(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=yi(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function WW(e){return function(){}}function GW(e,t,n,r){var i;if(n&&n!==`none`){if(i=PU(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),hi(n))vW({fill:n},i.attrs,`fill`,r);else if(fi(n))yW({style:{fill:n},dirty:je,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=ei(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function KW(e){e.registerPainter(`svg`,UW)}function qW(e,t,n){var r=f.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 JW(e){return!e.__cursors.get(0)}function YW(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var XW=function(e){a(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||=Gi,typeof t==`string`?a=qW(t,n,r):U(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=YW(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=qW(`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=YW(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||_k(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=kk(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}(Ui),ZW=1e5,QW=314159,$W=void 0,eG=1,tG=2;function nG(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function rG(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 iG(e,t,n,r){var i=new XW(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,aG(i),i}function aG(e){e.__cursorStack=[],e.__cursors=G()}function oG(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function sG(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,oG({key:r})))}function cG(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function lG(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function uG(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&dG&&!s.__builtin__||n&fG&&s.__builtin__||n&pG&&s===e.hoverlayer)||t(s,a,o,i)}}var dG=1,fG=2,pG=4,mG=dG|pG,hG=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=A({},n||{}),this.dpr=n.devicePixelRatio||Gi,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=iG(a,this,QW,0);c.initContext(),this._insertLayer(c,QW,0,!0),this._domRoot=e}else{this._width=bk(e,0,n),this._height=bk(e,1,n);var l=this._domRoot=rG(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=tG),!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 uG(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},fG),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=$W,n!==$W&&(!t&&n===tG&&(t=this._i.hoverlayer=this._ensureLayer(ZW)),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),Jk(i,s,r),c&&(s.style=l)}}i&&(Yk(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(ZW)},e.prototype.paintOne=function(e,t){qk(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)uG(this._i,function(e){e.afterBrush&&e.afterBrush()},mG),this._paintHoverList(e);else{var i=this;WE(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(QW).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),uG(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},dG)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return uG(this._i,function(i){var a=!1;if(cG(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!JW(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)}cG(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},mG),Pe.wxa&&uG(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=JW(e),c=s&&f.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var p=n[d];if(!(d<l&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=tG),r!=null){var m=p.getPaintRect();m&&m.intersect(r)&&(Jk(o,p,a),p.setPrevPaintRect(m))}else Jk(o,p,a);if(s&&f.getTime()-c>15){d++;break}}}Yk(o,a),t.drawIdx=Math.max(d,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=QW,t=0);var i=lG(this._i,e)[t];return i||(i=iG(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&k(i,this._layerConfig[e],!0),(n||r&&e!==QW)&&(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])&&nG(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=lG(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),lG(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 uG(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return uG(this._i,function(n,r){e.call(t,n,r)},dG)},e.prototype.eachOtherLayer=function(e,t){return uG(this._i,function(n,r){e.call(t,n,r)},fG)},e.prototype.getLayers=function(){var e={};return uG(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}}uG(n._i,function(e){e.__dirty=!1,cG(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},mG);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__))D(`ZLevel `+d+` has been used by unknown layer `+o.id);else{if((!s||f!==s.key)&&(s=sG(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))}}uG(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;(JW(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&&(cG(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===$W&&(n._hoverLayerDirty=eG))},mG)},e.prototype.clear=function(){return uG(this._i,function(e){e.clear(),aG(e)},dG),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,uG(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?k(n[e],t,!0):n[e]=t,uG(this._i,function(e,t){k(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=bk(i,0,r),t=bk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,uG(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(QW).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[QW][0].dom;var t=new XW(`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;uG(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];Jk(n,l,a)}Yk(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function gG(e){e.registerPainter(`canvas`,hG)}var _G=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),vG=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),yG=(e=`INR`)=>_G[e]??`${e} `;function bG(e,...t){console.warn(e,...t)}function xG(e,...t){console.error(e,...t)}function SG(e,t){if(e==null)throw Error(t);return e}function CG(e,t,...n){if(e.toLowerCase()===`svg`)throw Error(`make() builds HTML elements; use svgRoot for svg`);let r=document.createElement(e);for(let[e,n]of Object.entries(t??{}))n===!0?r.setAttribute(e,``):(typeof n==`string`||typeof n==`number`)&&r.setAttribute(e,String(n));let i=[];for(let e of n)e instanceof Node?i.push(e):(typeof e==`string`||typeof e==`number`)&&i.push(document.createTextNode(String(e)));return r.append(...i),r}var wG=`en-IN`,TG=/\{([A-Za-z0-9_]+)\}/g,EG=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,DG,OG=new Map,kG=0,AG=new Map;function jG(e,t){let n=OG.get(e);if(n===void 0)return t;let r=AG.get(e);if(r!==void 0&&r.version===kG&&r.english===t&&IG(r.merged,t))return r.merged;let i=FG(e,n,t);return AG.set(e,{version:kG,english:t,merged:i}),i}function MG(){return DG??wG}function NG(e,t){return e.replace(TG,(e,n)=>EG(t,n)?String(t[n]):e)}function PG(e,t,n,r){let i=`${t}Other`;if(!EG(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(MG()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[EG(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return NG(s,{count:n,...r})}function FG(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=EG(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=LG(t);for(let t of LG(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function IG(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>EG(e,t))}function LG(e){return Array.from(e.matchAll(TG),e=>e[1]??``)}var RG={aprShortLabel:`Apr`,aprilLabel:`April`,augShortLabel:`Aug`,augustLabel:`August`,decShortLabel:`Dec`,decemberLabel:`December`,emptyValueLabel:`-`,febShortLabel:`Feb`,februaryLabel:`February`,friMinLabel:`Fr`,friShortLabel:`Fri`,fridayLabel:`Friday`,janShortLabel:`Jan`,januaryLabel:`January`,julShortLabel:`Jul`,julyLabel:`July`,junShortLabel:`Jun`,juneLabel:`June`,marShortLabel:`Mar`,marchLabel:`March`,mayLabel:`May`,mayShortLabel:`May`,monMinLabel:`Mo`,monShortLabel:`Mon`,mondayLabel:`Monday`,novShortLabel:`Nov`,novemberLabel:`November`,octShortLabel:`Oct`,octoberLabel:`October`,satMinLabel:`Sa`,satShortLabel:`Sat`,saturdayLabel:`Saturday`,sepShortLabel:`Sep`,septemberLabel:`September`,sunMinLabel:`Su`,sunShortLabel:`Sun`,sundayLabel:`Sunday`,thuMinLabel:`Th`,thuShortLabel:`Thu`,thursdayLabel:`Thursday`,tueMinLabel:`Tu`,tueShortLabel:`Tue`,tuesdayLabel:`Tuesday`,wedMinLabel:`We`,wedShortLabel:`Wed`,wednesdayLabel:`Wednesday`},zG=`Asia/Kolkata`,BG=198e5,VG=new Map;function HG(e){let t=VG.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`}),VG.set(e,t)),t}function UG(e){if(typeof e!=`string`||e===``)return!1;try{return HG(e),!0}catch{return!1}}function WG(e,t=zG){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(HG(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 GG(e,t=zG){if(t===`Asia/Kolkata`)return BG;let n=WG(e,t),r=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 KG(e,t=zG){let n=e-GG(e,t);return n=e-GG(n,t),n}var qG=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],JG=[`rupees`,`paise`],YG=[`ms`,`s`,`min`,`h`],XG=[`day`,`month`,`year`,`datetime`,`time`],ZG=()=>jG(`formatters`,RG),QG=()=>ZG().emptyValueLabel,$G=`−`,eK=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],tK={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},nK=(e,t)=>ZG()[SG(e[t],`no date name at index ${t}`)],rK=e=>nK(eK,e);function iK(e,t){return nK(tK[t],e)}var aK=(e,t)=>SG(e[t],`no compact unit at index ${t}`),oK=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],sK=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],cK=e=>!e||e===`INR`?`en-IN`:`en-US`,lK=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,uK=new Map,dK=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=uK.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),uK.set(n,r)),r},fK=new Map,pK=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=fK.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),fK.set(n,r)),r},mK=e=>typeof e==`number`&&Number.isFinite(e),hK=e=>e<0&&!Object.is(Math.abs(e),0)?$G:``;function gK(e){if(!Number.isInteger(e))throw Error(`A paise amount must be a whole number, got ${e}`);let t=BigInt(Math.abs(e)).toString().padStart(3,`0`);return`${e<0?`-`:``}${t.slice(0,-2)}.${t.slice(-2)}`}var _K=(e,t)=>t===`paise`?Number(gK(e)):e,vK=2,yK=(e,t,n)=>{let r=Math.min(t,vK),i=10n**BigInt(vK-r),a=(BigInt(gK(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=pK(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function bK(e,{decimals:t}={}){if(!mK(e))return QG();let n=dK(lK(t,2)).format(Math.abs(e));return n===`0`?`0`:hK(e)+n}function xK(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!mK(e))return QG();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=lK(r,0),o=cK(i),s=n===`paise`?yK(Math.abs(e),a,o):pK(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:hK(e))+yG(i)+s}var SK=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function CK(e,{currency:t,unit:n=`rupees`}={}){if(!mK(e))return QG();let r=t?_K(e,n):e,i=t?yG(t):``,a=t?cK(t):`en-IN`,o=a===`en-IN`?oK:sK,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=dK(SK(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:hK(r))+i+e;c=o.length-1}let[l,u]=aK(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]=aK(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${hK(r)}${i}${dK(f,a).format(p)} ${u}`}function wK(e,{decimals:t}={}){return mK(e)?`${bK(e*100,{decimals:lK(t,1)})}%`:QG()}var TK={ms:1,s:1e3,min:6e4,h:36e5};function EK(e,{unit:t=`s`}={}){if(!mK(e))return QG();let n=TK[t]??1e3,r=Math.abs(e*n),i=hK(e);if(Math.round(r)<1e3)return`${i}${dK(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${dK(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}${dK(0).format(l)}h ${s(c%60)}m`}function DK(e,t=zG){if(e instanceof Date)return e.getTime();if(mK(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?KG(a.getTime(),t):NaN}return Date.parse(e)}function OK(e,t=zG){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 kK(e,{pattern:t=`day`,timeZone:n=zG}={}){let r=DK(e,n);if(!Number.isFinite(r))return QG();let i=OK(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${rK(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${rK(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function AK(e,{timeZone:t=zG}={}){let n=DK(e,t);if(!Number.isFinite(n))return QG();let r=OK(n,t);return`${String(r.day).padStart(2,`0`)}-${rK(r.month)}`}function X(e,t){if(e==null||e===``)return QG();let n=t?.style;if(n===`date`)return kK(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return xK(e,{...t,currency:t?.currency??``});case`percent`:return wK(e,t);case`compact`:return CK(e,t);case`duration`:return EK(e,t);default:return bK(e,t)}}function jK(e){let t=e?.style;if(t===`currency`){if(!e?.currency)throw TypeError(`[@webority/ui-elements] a currency format needs a currency, an ISO 4217 code such as "INR".`);return{style:`compact`,currency:e.currency,unit:e.unit}}return!t||t===`number`?{style:`compact`}:e??{}}var MK={aboveLabel:`Above`,areaChartLabel:`Area chart`,arrowKeysText:`{title}: use the arrow keys to read the values`,bandLabel:`Band`,barChartLabel:`Bar chart`,belowLabel:`Below`,bubbleChartLabel:`Bubble chart`,calendarHeatmapLabel:`Calendar heatmap`,calendarRangeText:`, from {first} to {last}`,calendarSummaryTextOne:`Calendar heatmap of {label}, {n} day.`,calendarSummaryTextOther:`Calendar heatmap of {label}, {n} days{range}.`,categoryLabel:`Category`,centerLabel:`Total`,changeLabel:`Change`,chartLabel:`chart`,columnChartLabel:`Column chart`,columnFallbackLabel:`column`,columnXLabel:`X`,constantSpanText:`{label} is {lo}.`,currencyFormatText:`This chart's currency format needs a currency code, such as "INR", in its currency field.`,dataSuffixLabel:`data`,dateLabel:`Date`,donutChartLabel:`Donut chart`,donutLargestText:`{top} is the largest, at {share}.`,donutSummaryTextOne:`Donut chart of {label} in {rows} part, {total} in all.`,donutSummaryTextOther:`Donut chart of {label} in {rows} parts, {total} in all.`,emptyText:`No data to show for this chart.`,errorText:`This chart couldn't load. Try again in a moment.`,everySeriesHiddenText:`Every series is hidden.`,firstStageLabel:`first stage`,fromLabel:`From`,funnelChartLabel:`Funnel chart`,funnelPreviousStepText:`{share} of previous step`,funnelStartText:`{first} is {firstValue} and {last} is {lastValue}, {share} of the start.`,funnelSummaryText:`Funnel chart of {label} in {n} stages.`,gaugeBandText:`, in the {band} band`,gaugeLabel:`Gauge`,gaugeSummaryText:`{type}: {label} is {value} on a scale from {min} to {max}{band}.`,groupLabel:`Group`,groupsTextOne:` in {count} group: {groups}`,groupsTextOther:` in {count} groups: {groups}`,heatmapLabel:`Heatmap`,heatmapSummaryText:`Heatmap of {label} by {group} and {x}, {n} cells.`,highestAtLowestAtText:`Highest is {highValue} at {highGroup}, {high}; lowest is {lowValue} at {lowGroup}, {low}.`,highestLowestText:`Highest is {maxValue} on {max}; lowest is {minValue} on {min}.`,itemLabel:`Item`,largestFallText:`The largest fall is {xText}, {signed}.`,largestFlowText:`The largest flow is {xText} to {toText}, {fmtAt}.`,largestRiseText:`The largest rise is {xText}, {signed}.`,latestText:`Latest {latest}`,legendLabel:`Legend`,lessLabel:`Less`,lineChartLabel:`Line chart`,loadingText:`Loading chart`,measureLabel:`Measure`,moreLabel:`More`,ofFirstStepText:`Of {first}`,ofPreviousStepLabel:`Of previous step`,openingShareText:`{share} of opening`,opensAtClosesAtText:`It opens at {opening} and closes at {closing}.`,otherLabel:`Other`,pointsSummaryTextOne:`{n} point, {first}.`,pointsSummaryTextOther:`{n} points, from {first} to {last}.`,rangeSpanText:`{label} runs from {lo} to {hi}.`,rowFallbackLabel:`row`,rowLabel:`Row`,runningTotalLabel:`Running total`,sankeyLabel:`Sankey diagram`,sankeySummaryText:`Sankey diagram of {label}: {n} flows between {nodes} places.`,scaleLabel:`Scale`,scaleRangeText:`{min} to {max}`,scatterPlotLabel:`Scatter plot`,scatterSummaryText:`{type} of {label} against {xLabel}, {count} points{groups}.`,shareLabel:`Share`,shareOfAllLabel:`Share of all`,shareOfGroupLabel:`Share of group`,shareOfParentText:`Share of {parent}`,shareOfStepText:`{share} of {first}`,sharedAxisText:`, sharing one x axis`,showingFirstRowsDownloadText:`Showing the first {rows} of {total} rows. Download the CSV for all of them.`,smallMultiplesLabel:`Small multiples`,stackedPercentText:`, stacked to 100%`,stackedText:`, stacked`,stageLabel:`Stage`,stepLabel:`Step`,summaryText:`{type} of {series}{stacked}{sharedAxis}.`,targetGapText:`{direction} {label} by {gap}`,targetLabel:`target`,toLabel:`To`,tooManyGroupsText:`This chart has more groups than it can show clearly.`,tooManySeriesText:`This chart has more series than it can show clearly.`,totalText:`Total {total}`,treemapEmptyText:`Treemap of {label}: no items.`,treemapLabel:`Treemap`,treemapLargestGroupText:`{name} is the largest group, at {share}.`,treemapSummaryText:`Treemap of {label}: {n} items in {totals} groups, {total} in all.`,trendLabel:`Trend`,untitledLabel:`Chart`,waterfallLabel:`Waterfall chart`,waterfallSummaryText:`Waterfall chart of {label}.`},Z=()=>jG(`chart`,MK),NK=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],PK=[`none`,`stacked`,`percent`],FK=[`category`,`time`,`value`],IK=[`auto`,`svg`,`canvas`],LK=[`ready`,`loading`,`empty`,`error`],RK=[`chart`,`table`],zK=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],BK=8,VK=6,HK={line:`lineChartLabel`,area:`areaChartLabel`,column:`columnChartLabel`,bar:`barChartLabel`,donut:`donutChartLabel`,heatmap:`heatmapLabel`,calendar:`calendarHeatmapLabel`,funnel:`funnelChartLabel`,gauge:`gaugeLabel`,waterfall:`waterfallLabel`,treemap:`treemapLabel`,sankey:`sankeyLabel`,scatter:`scatterPlotLabel`,bubble:`bubbleChartLabel`,multiples:`smallMultiplesLabel`},UK=e=>Z()[HK[e]],WK=[`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`],GK=e=>WK.includes(e),KK=[`area`,`column`,`bar`],qK=[`line`,`area`,`column`,`bar`,`multiples`],JK={line:[`category`,`time`],area:[`category`,`time`],column:[`category`,`time`],bar:[`category`,`time`],multiples:[`category`,`time`],calendar:[`time`],scatter:[`value`],bubble:[`value`]},YK={group:[`heatmap`,`treemap`,`scatter`,`bubble`],to:[`sankey`],size:[`bubble`],trend:[`scatter`,`bubble`],zoom:[`line`,`area`],bands:[`gauge`],centerLabel:[`donut`],sliceValues:[`donut`],valueLabels:[`line`,`column`,`bar`]},XK={gauge:240,calendar:200,treemap:340,sankey:340},ZK=100,QK=72,$K=32,eq=[`type`,`title`,`description`,`data`,`x`,`series`,`group`,`to`,`size`,`trend`,`zoom`,`bands`,`stack`,`y`,`target`,`centerLabel`,`sliceValues`,`valueLabels`,`height`,`state`,`emptyText`,`errorText`,`loadingText`,`renderer`,`timeZone`],tq=[`key`,`kind`,`format`,`label`,`labelFit`],nq=[`auto`,`all`,`rotate`,`ellipsis`],rq=[`key`,`label`,`format`,`colour`],iq=[`key`,`label`],aq=[`key`,`label`,`format`],oq=[`upTo`,`label`],sq=[`label`,`format`,`min`,`max`,`wholeNumbers`],cq=[`value`,`label`],lq=[`style`,`currency`,`unit`,`decimals`,`pattern`],uq=[...JG,...YG],dq=new Set;function fq(e){dq.has(e)||(dq.add(e),bG(`[@webority/ui-elements] <wui-chart> ${e}`))}var pq=e=>e.map(e=>`"${e}"`).join(` | `),mq=e=>typeof e==`number`&&Number.isFinite(e),hq=e=>typeof e==`object`&&!!e&&!Array.isArray(e),gq=(e,t)=>Reflect.get(e,t),_q=e=>e===null||typeof e==`string`||typeof e==`number`,vq=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,_q(t)?t:null]));function yq(e,t){if(e==null)throw Error(`${t} missing`);return e}var bq=(e,t)=>e.some(e=>e===t);function xq(e,t,n){t==null||n.includes(t)||fq(`received ${e}="${String(t)}", which is not one of ${pq(n)}. The chart uses its default instead.`)}function Sq(e,t,n){for(let r of Object.keys(t))n.includes(r)||(/^(y2|secondary)/i.test(r)?fq(`ignores ${e}.${r}: a chart has one value axis by design. Show the second measure as its own chart.`):fq(`ignores the unknown key ${e}.${r}. Known keys: ${n.join(`, `)}.`))}function Cq(e,t){if(t==null)return;if(typeof t!=`object`){fq(`expects ${e} to be an object such as { style: "currency" }.`);return}Sq(e,t,lq);let n=gq(t,`style`);xq(`${e}.style`,n,qG);let r=gq(t,`currency`);r!=null&&!vG(r)&&fq(`received ${e}.currency="${String(r)}", which is not an ISO 4217 code such as "INR", so the format has no currency.`);let i=gq(t,`unit`);i!=null&&xq(`${e}.unit`,i,n===`duration`?YG:JG);let a=gq(t,`pattern`);xq(`${e}.pattern`,a,XG);let o=gq(t,`decimals`);o!=null&&!(typeof o==`number`&&Number.isInteger(o)&&o>=0&&o<=20)&&fq(`received ${e}.decimals=${String(o)}, which is not a whole number from 0 to 20. The chart uses its default instead.`);let s={style:bq(qG,n)?n:`number`};return typeof r==`string`&&vG(r)&&(s.currency=r),bq(uq,i)&&(s.unit=i),typeof o==`number`&&(s.decimals=o),bq(XG,a)&&(s.pattern=a),s}function wq(e,t){return t?.style!==`currency`||t.currency?null:`${e} is a currency format with no valid currency: set ${e}.currency to an ISO 4217 code such as "INR".`}function Tq(e){let t=(e,t=Z().errorText)=>(xG(`[@webority/ui-elements] <wui-chart> ${e}`),{spec:null,problem:t});if(!hq(e))return t('has no spec: set the `spec` property or add a <script type="application/json"> child.');let n=e;Sq(`spec`,n,eq);let r=gq(n,`type`);if(xq(`type`,r,NK),!bq(NK,r))return t(`cannot draw type "${String(r)}".`);let i=r,a=gq(n,`title`);typeof a==`string`&&a.trim()||fq("needs a `title`: it names the chart for screen readers and names exported files.");for(let[e,t]of Object.entries(YK))gq(n,e)!=null&&!t.includes(i)&&fq(`ignores spec.${e} on a ${i} chart: it applies to ${t.join(`, `)}.`);let o=gq(n,`x`),s=hq(o)?o:{};Sq(`spec.x`,s,tq);let c=JK[i]??[`category`],l=gq(s,`kind`);xq(`x.kind`,l,FK),bq(FK,l)&&!c.includes(l)&&fq(`ignores x.kind="${l}" on a ${i} chart: it takes ${pq(c)}.`);let u=gq(s,`labelFit`);xq(`x.labelFit`,u,nq);let d=Cq(`x.format`,gq(s,`format`)),f=gq(s,`key`);typeof f!=`string`&&i!==`gauge`&&fq("needs `x.key`, the column holding each row's x value or slice name.");let p=typeof f==`string`?f:``,m=gq(n,`y`),h=hq(m)?m:{};Sq(`spec.y`,h,sq);let g=Cq(`y.format`,gq(h,`format`)),_=wq(`x.format`,d);if(_)return t(_,Z().currencyFormatText);let v=wq(`y.format`,g);if(v)return t(v,Z().currencyFormatText);let y=gq(n,`series`),b=Array.isArray(y)?y.filter(hq):[],x=[];for(let[e,n]of b.entries()){Sq(`spec.series[${e}]`,n,rq);let r=Cq(`series[${e}].format`,gq(n,`format`)),i=wq(`series[${e}].format`,r);if(i)return t(i,Z().currencyFormatText);let a=gq(n,`key`);typeof a!=`string`&&fq(`needs series[${e}].key, the column holding that series' values.`);let o=gq(n,`label`),s=gq(n,`colour`);xq(`series[${e}].colour`,s,zK),x.push({key:String(a),named:typeof a==`string`,label:typeof o==`string`&&o?o:String(a),format:r,colour:bq(zK,s)?s:void 0})}let S=x[0];if(!S)return t(`has no series to draw.`);let C=x.filter(e=>e.named).map(e=>e.key),w=C.find((e,t)=>C.indexOf(e)!==t);if(w!==void 0)return t(`has two series with the key "${w}": each series needs its own key.`);if(x.length>8)return t(`refuses ${x.length} series: 8 is the most that stay distinguishable. Fold the smallest into an Other series, or split the chart.`,Z().tooManySeriesText);let T=GK(i);if(T&&x.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.`;fq(`draws one series as a ${i}; it got ${x.length} and shows the first. ${e}`)}let E=(e,t,n,r)=>{if(t==null)return null;if(!hq(t))return fq(`expects ${e} to be an object such as { key: "column" }.`),null;Sq(e,t,n);let i=gq(t,`key`);if(typeof i!=`string`)return fq(`needs ${e}.key, the column holding ${r}.`),null;let a=Cq(`${e}.format`,gq(t,`format`)),o=gq(t,`label`);return{key:i,label:typeof o==`string`?o:``,format:a}},D=YK.group.includes(i)?E(`spec.group`,gq(n,`group`),iq,`each row's group`):null,O=i===`sankey`?E(`spec.to`,gq(n,`to`),iq,`where each flow ends`):null,k=i===`bubble`?E(`spec.size`,gq(n,`size`),aq,`each bubble's size`):null,A=wq(`group.format`,D?.format)??wq(`to.format`,O?.format)??wq(`size.format`,k?.format);if(A)return t(A,Z().currencyFormatText);if((i===`heatmap`||i===`treemap`)&&!D)return t(`needs \`group.key\` to draw a ${i}: the column holding each ${i===`heatmap`?`row`:`parent`}.`);if(i===`sankey`&&!O)return t("needs `to.key` to draw a sankey: the column holding where each flow ends.");if(i===`bubble`&&!k)return t("needs `size.key` to draw a bubble chart: the column holding each bubble's size.");let j=KK.includes(i)?PK:[`none`],M=gq(n,`stack`);xq(`stack`,M,j);let N=gq(n,`state`);xq(`state`,N,LK);let ee=gq(n,`renderer`);xq(`renderer`,ee,IK);let P=gq(n,`timeZone`);P!=null&&!UG(P)&&fq(`received timeZone="${String(P)}", which is not a time zone this browser knows. The chart uses Asia/Kolkata instead.`);let te=UG(P)?P:zG,F=gq(n,`target`),I=hq(F)?gq(F,`value`):void 0;F!=null&&(hq(F)&&Sq(`spec.target`,F,cq),hq(F)&&mq(I)||fq("ignores a `target` without a numeric `value`."));let ne=gq(n,`trend`);ne!=null&&typeof ne!=`boolean`&&fq("expects `trend` to be true or false.");let re=gq(n,`zoom`);re!=null&&typeof re!=`boolean`&&fq("expects `zoom` to be true or false.");let ie=[],L=gq(n,`bands`);if(i===`gauge`&&L!=null){let e=Array.isArray(L)?L.filter(hq):[];for(let t of e)Sq(`spec.bands[]`,t,oq);ie=e.map(e=>({upTo:gq(e,`upTo`),label:gq(e,`label`)})).filter(e=>mq(e.upTo)&&typeof e.label==`string`&&e.label!==``).sort((e,t)=>e.upTo-t.upTo),Array.isArray(L)&&ie.length===e.length||fq("ignores a gauge band without a numeric `upTo` and a `label`.")}let ae=g??S.format,R=(T?x.slice(0,1):x).map(e=>({key:e.key,label:e.label,format:e.format??ae,colour:e.colour})),z=bq(c,l)?l:c[0],B=gq(n,`data`),V=Array.isArray(B)?B:[],H=V.filter(hq).map(vq),oe=-1,se=null,U=S.key;i===`donut`&&H.length>6&&(se=H,{data:H,otherIndex:oe}=Oq(H,p,U),fq(`draws at most 6 donut slices; the smallest ${V.length-5} are shown as "${Z().otherLabel}". Send fewer rows, or use a bar chart for many parts.`));let ce=(e,t)=>{let n=H.filter(e);n.length!==H.length&&fq(`leaves out ${H.length-n.length} row(s) ${t}.`),H=n},le=e=>e!=null&&e!==``,ue=e=>mq(e)&&e>0;if(z===`time`&&qK.includes(i)&&ce(e=>Number.isFinite(DK(e[p],te)),`without a readable date`),i===`gauge`&&H.length>1)fq(`draws one value as a gauge; it got ${H.length} rows and shows the first.`),H=H.slice(0,1);else if(i===`scatter`||i===`bubble`){ce(e=>mq(e[p])&&mq(e[U])&&(i!==`bubble`||k!=null&&ue(e[k.key])),`without a number for x and y (and a positive size)`);let e=new Set(D?H.map(e=>String(e[D.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.`,Z().tooManyGroupsText)}else if(i===`calendar`)ce(e=>Number.isFinite(DK(e[p],te)),`without a readable date`);else if(i===`heatmap`&&D)ce(e=>le(e[p])&&le(e[D.key]),`without a column or a row`);else if(i===`treemap`&&D){ce(e=>le(e[p])&&le(e[D.key])&&ue(e[U]),`without a name, a parent and a positive size`);let e=new Set(H.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.`,Z().tooManyGroupsText)}else if(i===`sankey`&&O){ce(e=>le(e[p])&&le(e[O.key])&&ue(e[U]),`without a start, an end and a positive size`);let e=Eq(H,p,O.key);if(e)return t(e.reason,e.text)}else if(i===`waterfall`){let e=Dq(H,U);if(e?.refuse)return t(e.refuse);e?.warn&&fq(e.warn)}let de=gq(n,`height`),fe=mq(de)&&de>0?de:null;if(i===`multiples`){let e=QK*R.length+$K;fe!=null&&fe<e&&(fq(`needs at least ${e}px of height for ${R.length} small charts; it got ${fe}px and draws at ${e}px.`),fe=e),fe??=ZK*R.length+40}fe??=XK[i]??320;let pe=bq(j,M)?M:`none`,me=YK.valueLabels.includes(i)&&(gq(n,`valueLabels`)??i===`line`)===!0;me&&pe!==`none`&&fq(`ignores valueLabels on a stacked chart.`);let W=me&&pe===`none`,he=YK.sliceValues.includes(i)&&(gq(n,`sliceValues`)??!0)===!0,ge=gq(n,`description`),_e=gq(s,`label`),ve=gq(h,`label`),ye=gq(h,`min`),be=gq(h,`max`),xe=gq(n,`centerLabel`),Se=(e,t)=>typeof e==`string`&&e?e:t;return{problem:null,spec:{type:i,title:typeof a==`string`?a.trim():``,description:typeof ge==`string`?ge:``,data:H,allData:se??H,x:{key:p,kind:z,format:d??(z===`time`?{style:`date`}:z===`value`?{style:`number`}:void 0),label:typeof _e==`string`?_e:``,labelFit:bq(nq,u)?u:`auto`},series:R,group:D,to:O,size:k,trend:YK.trend.includes(i)&&ne===!0,zoom:YK.zoom.includes(i)?(re??H.length>5e3)===!0:!1,bands:ie,stack:pe,y:{label:typeof ve==`string`?ve:``,format:ae,min:mq(ye)?ye:void 0,max:mq(be)?be:void 0,wholeNumbers:gq(h,`wholeNumbers`)===!0},target:hq(F)&&mq(I)?{value:I,label:String(gq(F,`label`)??``)}:null,centerLabel:i===`donut`&&typeof xe==`string`&&xe.trim()?xe.trim():``,sliceValues:he,valueLabels:W,height:fe,state:bq(LK,N)?N:`ready`,emptyText:Se(gq(n,`emptyText`),Z().emptyText),errorText:Se(gq(n,`errorText`),Z().errorText),loadingText:Se(gq(n,`loadingText`),Z().loadingText),renderer:bq(IK,ee)?ee:`auto`,timeZone:te,otherIndex:oe}}}function Eq(e,t,n){let r=e.map(e=>[String(e[t]),String(e[n])]),i=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:Z().tooManyGroupsText};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:Z().errorText}:null}function Dq(e,t){let n=e.map(e=>mq(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 Oq(e,t,n){let r=new Set(e.map((e,t)=>({i:t,v:mq(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)||!mq(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=Z().otherLabel;for(let e=2;o.has(s);e+=1)s=`${Z().otherLabel} (${e})`;return a.push({[t]:s,[n]:i}),{data:a,otherIndex:a.length-1}}function kq(e){return yq(e.series[0],`series`)}function Aq(e,t){return yq(e.data[t],`row ${t}`)}function Q(e,t,n){let r=e.data[n]?.[t];return mq(r)?r:null}function jq(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===``?QG():e.x.format?X(n,{...e.x.format,timeZone:e.timeZone}):String(n)}function Mq(e,t){return DK(e.data[t]?.[e.x.key],e.timeZone)}function Nq(e,t){let n=e.group?e.data[t]?.[e.group.key]:null;return n==null||n===``?QG():String(n)}function Pq(e,t){let n=e.to?e.data[t]?.[e.to.key]:null;return n==null||n===``?QG():String(n)}var Fq=e=>[...new Set(e)];function Iq(e){return e.group?Fq(e.data.map((t,n)=>Nq(e,n))):[]}function Lq(e){return GK(e.type)?e.data.length:e.data.length*e.series.length}function Rq(e){return e.renderer===`auto`?Lq(e)>5e3?`canvas`:`svg`:e.renderer}function zq(e){switch(e.type){case`donut`:return e.data.map((t,n)=>$(e,n));case`scatter`:case`bubble`:return Iq(e);case`line`:case`area`:case`column`:case`bar`:return e.series.map(e=>e.key);default:return[]}}function Bq(e){return[`line`,`area`,`column`,`bar`].includes(e.type)?e.series.map(e=>e.label):zq(e)}function Vq(e,t,n){return e.type===`donut`?n.has($(e,t)):(e.type===`scatter`||e.type===`bubble`)&&e.group?n.has(Nq(e,t)):!1}function Hq(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]}))})}function Uq(e,t=zG){return`${iK(new Date(e+GG(e,t)).getUTCDay(),`short`)}, ${kK(e,{timeZone:t})}`}var Wq=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.min(e,t),1/0),Gq=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.max(e,t),-1/0),Kq=(e,t)=>e.data.map((n,r)=>Q(e,t,r)).filter(e=>e!=null),qq=(e,t)=>t?X((e??0)/t,{style:`percent`}):QG();function Jq(e,t){let n=e.filter(mq);if(!n.length)return[];let r=Wq(n),i=Gq(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 Yq(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 Xq(e,t){return Array.from({length:e},(n,r)=>t[e===1?6:Math.round(6-r*4/(e-1))])}function Zq(e,t){return e.bands.find(e=>t<=e.upTo)??e.bands[e.bands.length-1]??null}var Qq=(e,t)=>t==null?QG():yq(Zq(e,t),`gauge band`).label;function $q(e){return{min:e.y.min??0,max:e.y.max??100}}function eJ(e){let t=kq(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 tJ(e,t){let n=kq(e).key,r=yq(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=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=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=yq((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 nJ(e){let t=kq(e).key,n=new Map(Iq(e).map(e=>[e,0]));return e.data.forEach((r,i)=>{n.set(Nq(e,i),(n.get(Nq(e,i))??0)+(Q(e,t,i)??0))}),n}function rJ(e,t,n){let{palette:r,neutral:i,seq:a,rise:o,fall:s}=n,c=kq(e).key;switch(e.type){case`donut`:return oJ(e,t,n);case`funnel`:return Xq(e.data.length,yq(a,`sequential colours`))[t];case`heatmap`:case`calendar`:return Yq(Jq(Kq(e,c),yq(a,`sequential colours`)),Q(e,c,t));case`gauge`:return r[0];case`waterfall`:{let n=yq(eJ(e)[t],`waterfall bar ${t}`);return n.total?r[0]:n.value>=0?o:s}case`treemap`:return r[[...nJ(e).keys()].indexOf(Nq(e,t))%r.length];case`sankey`:return tJ(e,r).get(String(Aq(e,t)[e.x.key]));case`scatter`:case`bubble`:return r[Math.max(0,Iq(e).indexOf(Nq(e,t)))];default:return r[sJ(kq(e),0)]??i}}function iJ(e,t,n,r){let i=kq(e),a=Q(e,i.key,t),o=()=>rJ(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:X(a,i.format)},{label:Z().shareLabel,value:r&&a!=null?X(a/r,{style:`percent`}):QG()}],foot:``}}case`heatmap`:return{title:`${Nq(e,t)}, ${$(e,t)}`,rows:[{color:o(),label:i.label,value:X(a,i.format)}],foot:``};case`calendar`:return{title:Uq(Mq(e,t),e.timeZone),rows:[{color:o(),label:i.label,value:X(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:X(a,i.format)}];return t&&s.push({label:Z().ofPreviousStepLabel,value:qq(a,r)}),s.push({label:NG(Z().ofFirstStepText,{first:$(e,0)}),value:qq(a,n)}),{title:$(e,t),rows:s,foot:``}}case`gauge`:{let{min:n,max:r}=$q(e),s=a==null?null:Zq(e,a),c=[{color:o(),label:i.label,value:X(a,i.format)}];return c.push({label:Z().scaleLabel,value:NG(Z().scaleRangeText,{min:X(n,i.format),max:X(r,i.format)})}),s&&c.push({label:Z().bandLabel,value:s.label}),{title:e.data[t]?.[e.x.key]==null?i.label:$(e,t),rows:c,foot:``}}case`waterfall`:{let n=eJ(e),r=yq(n[t],`waterfall bar ${t}`),a=yq(n[0],`waterfall opening bar`).value,s=r.total?[{color:o(),label:i.label,value:X(r.value,i.format)}]:[{color:o(),label:Z().changeLabel,value:aJ(r.value,i.format)},{label:Z().runningTotalLabel,value:X(r.level,i.format)}],c=!r.total&&a?NG(Z().openingShareText,{share:aJ(r.value/a*100,{style:`number`,decimals:2},`%`)}):``;return{title:$(e,t),rows:s,foot:c}}case`treemap`:{let n=Nq(e,t),r=nJ(e).get(n);return{title:`${n} / ${$(e,t)}`,rows:[{color:o(),label:i.label,value:X(a,i.format)},{label:NG(Z().shareOfParentText,{parent:n}),value:qq(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:NG(Z().scaleRangeText,{min:n,max:Pq(e,t)}),rows:[{color:o(),label:i.label,value:X(a,i.format)},{label:NG(Z().shareOfParentText,{parent:n}),value:qq(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:X(a,i.format)}];return e.size&&n.push({label:e.size.label||String(e.size.key),value:X(Aq(e,t)[e.size.key],e.size.format)}),{title:e.group?Nq(e,t):i.label,rows:n,foot:``}}}let s=e.stack===`percent`?Hq(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=X(a,n.format);return{color:e.type===`multiples`?r.palette[0]:r.palette[sJ(n,i)],line:e.type===`line`||e.type===`multiples`,label:n.label,value:s&&a!=null?`${o} (${X(s[n.key],{style:`percent`})})`:o}}),u=``,d=c[0];if(e.stack!==`none`&&d&&c.length>1){let n=c.reduce((n,{s:r})=>n+(Q(e,r.key,t)??0),0);u=NG(Z().totalText,{total:X(n,d.s.format)})}if(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||Z().targetLabel;u=NG(Z().targetGapText,{direction:t>=0?Z().aboveLabel:Z().belowLabel,label:r,gap:X(Math.abs(t),d.s.format)})}}return{title:$(e,t),rows:l,foot:u}}function aJ(e,t,n=``){let r=`${X(Math.abs(e),t)}${n}`;return e>0?`+${r}`:e<0?`−${r}`:r}function oJ(e,t,n){return t===e.otherIndex?n.neutral:n.palette[t%n.palette.length]}function sJ(e,t){return e.colour?Number(e.colour.slice(6))-1:t}function cJ(e){let t=CG(`div`,{class:`wui-chart-tooltip-body`});e.title&&t.append(CG(`div`,{class:`wui-chart-tooltip-title`},e.title));for(let n of e.rows){let e=CG(`div`,{class:`wui-chart-tooltip-row`});if(n.color){let t=document.createElement(`span`);t.className=n.line?`wui-chart-tooltip-swatch wui-chart-tooltip-swatch-line`:`wui-chart-tooltip-swatch`,t.style.background=n.color,e.append(t)}let r=document.createElement(`span`);r.className=`wui-chart-tooltip-label`,r.textContent=n.label;let i=document.createElement(`span`);i.className=`wui-chart-tooltip-value`,i.textContent=n.value,e.append(r,i),t.append(e)}return e.foot&&t.append(CG(`div`,{class:`wui-chart-tooltip-foot`},e.foot)),t}function lJ(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 uJ(e){return e.x.label?e.x.label:{gauge:Z().measureLabel,funnel:Z().stageLabel,waterfall:Z().stepLabel,sankey:Z().fromLabel,scatter:Z().columnXLabel,bubble:Z().columnXLabel}[e.type]??(e.x.kind===`time`?Z().dateLabel:Z().categoryLabel)}function dJ(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=kq(t),r=(e,r=n)=>X(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=Fq(a.map(e=>$(t,e))),n=Iq(t),o=new Map(a.map(e=>[`${Nq(t,e)}\u0000${$(t,e)}`,r(e)]));return i([yq(t.group,`group column`).label||Z().rowLabel,...e],n.map(t=>({head:t,cells:e.map(e=>o.get(`${t}\u0000${e}`)??QG())})))}case`funnel`:{let e=Q(t,n.key,0);return i([uJ(t),n.label,Z().ofPreviousStepLabel,NG(Z().ofFirstStepText,{first:$(t,0)})],a.map(i=>({head:$(t,i),cells:[r(i),i?qq(Q(t,n.key,i),Q(t,n.key,i-1)):QG(),qq(Q(t,n.key,i),e)]})))}case`gauge`:return i([uJ(t),n.label,...t.bands.length?[Z().bandLabel]:[]],a.map(e=>({head:Aq(t,e)[t.x.key]==null?n.label:$(t,e),cells:[r(e),...t.bands.length?[Qq(t,Q(t,n.key,e))]:[]]})));case`waterfall`:return i([uJ(t),Z().changeLabel,Z().runningTotalLabel],eJ(t).map(e=>({head:$(t,e.index),cells:[e.total?QG():aJ(e.value,n.format),X(e.level,n.format)]})));case`treemap`:{let e=nJ(t);return i([yq(t.group,`group column`).label||Z().groupLabel,t.x.label||Z().itemLabel,n.label,Z().shareOfGroupLabel],a.map(i=>({head:Nq(t,i),cells:[$(t,i),r(i),qq(Q(t,n.key,i),e.get(Nq(t,i)))]})))}case`sankey`:return i([uJ(t),yq(t.to,`to column`).label||Z().toLabel,n.label],a.map(e=>({head:$(t,e),cells:[Pq(t,e),r(e)]})));case`scatter`:case`bubble`:return i([uJ(t),n.label,...t.size?[t.size.label||t.size.key]:[],...t.group?[t.group.label||Z().groupLabel]:[]],a.map(e=>({head:$(t,e),cells:[r(e),...t.size?[X(Aq(t,e)[t.size.key],t.size.format)]:[],...t.group?[Nq(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=[uJ(t),...t.series.map(e=>e.label)];return o&&c.push(Z().shareLabel),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?X(r/s,{style:`percent`}):QG())}return{head:$(t,e),cells:i}}),t.data.length)}function fJ(e){switch(e?.style){case`currency`:case`compact`:return e.currency?` (${e.currency})`:``;case`percent`:return` (%)`;case`duration`:return` (${e.unit??`s`})`;default:return``}}function pJ(e,t){return e==null?e:t?.unit===`paise`?Number(gK(e)):t?.style===`percent`?Number((e*100).toPrecision(12)):e}function mJ(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`?kK(n,{pattern:t.x.format?.pattern??`day`,timeZone:t.timeZone}):n}},i=t.series.map(e=>({head:`${e.label}${fJ(e.format)}`,value:t=>{let n=t[e.key];return pJ(mq(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,yq(o,`group column`),...i];break;case`treemap`:s=[yq(o,`group column`),r,...i];break;case`sankey`:{let e=yq(t.to,`to column`);s=[r,{head:e.label||e.key,value:t=>t[e.key]},...i];break}case`bubble`:{let e=yq(t.size,`size column`);s=[r,...i,{head:`${e.label||e.key}${fJ(e.format)}`,value:t=>{let n=t[e.key];return pJ(mq(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 hJ(e){return(e?.title??``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)||`chart`}var gJ=(e,t,n)=>{if(!t.length)return null;let r=Wq(t),i=Gq(t);return r===i?NG(Z().constantSpanText,{label:e,lo:X(r,n)}):NG(Z().rangeSpanText,{label:e,lo:X(r,n),hi:X(i,n)})};function _J(e,t=new Set){let n=[];e.description&&n.push(e.description.replace(/\.?\s*$/,`.`));let r=zq(e);if(r.length&&r.every(e=>t.has(e)))return n.push(Z().everySeriesHiddenText),n.join(` `);let i=e.data.length,a=e.data.map((e,t)=>t).filter(n=>!Vq(e,n,t)),o=kq(e),s=Kq(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(PG(Z(),`donutSummaryText`,a.length,{rows:a.length,label:o.label,total:X(t,o.format)})),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,yq(a[0],`first slice`));n.push(NG(Z().donutLargestText,{top:$(e,r),share:X((Q(e,o.key,r)??0)/t,{style:`percent`})}))}return n.join(` `)}case`heatmap`:if(n.push(NG(Z().heatmapSummaryText,{label:o.label,group:yq(e.group,`group column`).label||Z().rowFallbackLabel,x:e.x.label||Z().columnFallbackLabel,n:i})),s.length){let t=l(),r=u();n.push(NG(Z().highestAtLowestAtText,{highValue:vJ(e,t),highGroup:Nq(e,t),high:$(e,t),lowValue:vJ(e,r),lowGroup:Nq(e,r),low:$(e,r)}))}return n.join(` `);case`calendar`:return n.push(i===1?NG(Z().calendarSummaryTextOne,{label:o.label,n:i}):NG(Z().calendarSummaryTextOther,{label:o.label,n:i,range:i>1?NG(Z().calendarRangeText,{first:$(e,0),last:$(e,i-1)}):``})),s.length&&n.push(NG(Z().highestLowestText,{maxValue:vJ(e,l()),max:$(e,l()),minValue:vJ(e,u()),min:$(e,u())})),n.join(` `);case`funnel`:return n.push(NG(Z().funnelSummaryText,{label:o.label,n:i})),i>1&&n.push(NG(Z().funnelStartText,{first:$(e,0),firstValue:vJ(e,0),last:$(e,i-1),lastValue:vJ(e,i-1),share:qq(Q(e,o.key,i-1),Q(e,o.key,0))})),n.join(` `);case`gauge`:{let t=Q(e,o.key,0),{min:r,max:i}=$q(e),a=t==null?null:Zq(e,t);return n.push(NG(Z().gaugeSummaryText,{type:UK(`gauge`),label:o.label,value:X(t,o.format),min:X(r,o.format),max:X(i,o.format),band:a?NG(Z().gaugeBandText,{band:a.label}):``})),n.join(` `)}case`waterfall`:{let t=eJ(e);if(n.push(NG(Z().waterfallSummaryText,{label:o.label})),i>1){let r=t.filter(e=>!e.total);n.push(NG(Z().opensAtClosesAtText,{opening:X(yq(t[0],`waterfall opening bar`).value,o.format),closing:X(yq(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(NG(Z().largestRiseText,{xText:$(e,a.index),signed:aJ(a.value,o.format)})),s&&n.push(NG(Z().largestFallText,{xText:$(e,s.index),signed:aJ(s.value,o.format)}))}return n.join(` `)}case`treemap`:{let t=nJ(e);if(!t.size)return NG(Z().treemapEmptyText,{label:o.label});let[r,a]=[...t].reduce((e,t)=>t[1]>e[1]?t:e);return n.push(NG(Z().treemapSummaryText,{label:o.label,n:i,totals:t.size,total:X(c,o.format)})),n.push(NG(Z().treemapLargestGroupText,{name:r,share:qq(a,c)})),n.join(` `)}case`sankey`:{let t=yq(e.to,`to column`).key,r=Fq(e.data.flatMap(n=>[String(n[e.x.key]),String(n[t])])),a=l();return n.push(NG(Z().sankeySummaryText,{label:o.label,n:i,nodes:r.length})),n.push(NG(Z().largestFlowText,{xText:$(e,a),toText:Pq(e,a),fmtAt:vJ(e,a)})),n.join(` `)}case`scatter`:case`bubble`:{let r=Iq(e).filter(e=>!t.has(e));n.push(NG(Z().scatterSummaryText,{type:UK(e.type),label:o.label,xLabel:e.x.label||e.x.key,count:a.length,groups:r.length?PG(Z(),`groupsText`,r.length,{groups:r.join(`, `)}):``}));let i=a.map(t=>Aq(e,t)[e.x.key]).filter(mq),s=a.map(t=>Q(e,o.key,t)).filter(e=>e!=null);for(let t of[gJ(e.x.label||String(e.x.key),i,e.x.format),gJ(o.label,s,o.format)])t&&n.push(t);return n.join(` `)}}let d=e.stack===`percent`?Z().stackedPercentText:e.stack===`stacked`?Z().stackedText:``,f=e.series.filter(e=>!t.has(e.key));n.push(NG(Z().summaryText,{type:UK(e.type),series:f.map(e=>e.label).join(`, `),stacked:d,sharedAxis:e.type===`multiples`?Z().sharedAxisText:``})),i&&n.push(i===1?NG(Z().pointsSummaryTextOne,{n:i,first:$(e,0)}):NG(Z().pointsSummaryTextOther,{n:i,first:$(e,0),last:$(e,i-1)}));for(let t of f){let r=gJ(t.label,Kq(e,t.key),t.format);r&&n.push(r)}return n.join(` `)}var vJ=(e,t)=>{let n=kq(e);return X(Q(e,n.key,t),n.format)};function yJ(e){return e.stack===`percent`?{style:`percent`,decimals:0}:jK(e.y.format)}var bJ=864e5,xJ={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},SJ=e=>xJ[e]??0,CJ=[`donut`,`funnel`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`];function wJ(e,t){let n=e.data.map((e,t)=>t).filter(n=>!Vq(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 TJ(e){let t=Fq(e.data.map((t,n)=>$(e,n))),n=Iq(e),r=new Map(e.data.map((r,i)=>[`${t.indexOf($(e,i))},${n.indexOf(Nq(e,i))}`,i]));return{columns:t.length,rows:n.length,at:r,position:r=>[t.indexOf($(e,r)),n.indexOf(Nq(e,r))]}}function EJ(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 xJ||n===`Home`||n===`End`?{index:0,series:0}:t;if(e.type===`heatmap`||e.type===`calendar`)return DJ(e,t,n);let a=CJ.includes(e.type),o=e.series.map((e,t)=>r.has(e.key)?-1:t).filter(e=>e>=0),s=a?wJ(e,r):[];if(a?!s.length:!o.length)return t;let c=t??{index:a?yq(s[0],`first mark`):0,series:a?0:yq(o[0],`first visible series`)};if(t==null&&n in xJ)return c;if(a){let e=Math.max(0,s.indexOf(c.index));return n===`Home`?{index:yq(s[0],`first mark`),series:0}:n===`End`?{index:yq(s[s.length-1],`last mark`),series:0}:n in xJ?{index:yq(s[(e+SJ(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 xJ))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+SJ(n)))};let l=Math.max(0,o.indexOf(c.series)),u=e.type===`bar`?SJ(n):-SJ(n);return{...c,series:yq(o[Math.min(o.length-1,Math.max(0,l+u))],`series`)}}function DJ(e,t,n){let r=e.data.length,i=e.type===`calendar`,a=i?e.data.map((e,t)=>t).sort((t,n)=>Mq(e,t)-Mq(e,n)):[],o=i?null:TJ(e),s=t??{index:i?yq(a[0],`first day`):0,series:0};if(t==null&&n in xJ)return s;if(n===`Home`)return{index:i?yq(a[0],`first day`):0,series:0};if(n===`End`)return{index:i?yq(a[r-1],`last day`):r-1,series:0};if(!(n in xJ))return t;if(i){let t=n===`ArrowDown`||n===`ArrowUp`?SJ(n):SJ(n)*7,r=t=>{let n=Mq(e,t);return Math.floor((n+GG(n,e.timeZone))/bJ)},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`?[SJ(n),0]:[0,SJ(n)];return{index:o.at.get(`${c+u},${l+d}`)??s.index,series:0}}var OJ=()=>jG(`chart`,MK);Bj([mx,iT,eE,kL,BI,kI,$F,SL,eN,YR,yB,EV,eV,bz,nz,AH,rH,DB,mU,VH,KW,gG]);function kJ(e){let t=e.series[0];if(!t)throw Error(`chart spec has no series`);return t}var AJ=e=>typeof e==`number`;function jJ(e,t){let n=e.data[t];if(!n)throw Error(`chart row ${t} missing`);return n}function MJ(e){if(!e.to)throw Error("chart spec has no `to` column");return e.to.key}function NJ(e){if(!e.size)throw Error("chart spec has no `size` column");return e.size.key}function PJ(e,t,n){let r=e[t];if(!r)throw Error(`percent shares for row ${t} missing`);return r[n]??null}function FJ(e,t,n){let r=e?.[t];if(!r)throw Error(`bar radii for row ${t} missing`);return r[n]}var IJ=e=>AJ(e)?e:null;function LJ(e){return typeof e==`object`&&e&&`row`in e?IJ(e.row):null}function RJ(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 AJ(n)&&Number.isFinite(n)&&AJ(r)&&Number.isFinite(r)?{start:n,end:r}:null}function zJ(e){if(!e)throw Error(`chart has not been drawn`);return e}var BJ=[`series`,`graphic`,`grid`,`xAxis`,`yAxis`,`title`,`visualMap`,`calendar`,`dataZoom`],VJ=e=>String(e).replace(/[{}]/g,e=>e===`{`?`{`:`}`);function HJ(e){return e.wholeNumbers===!0||e.format?.style===`currency`&&e.format.unit===`paise`}function UJ(e,t,n,r,i=!1){let a=jK(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 WJ=(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)]},GJ=24,KJ=4,qJ=.6,JJ=(e,t)=>String(e).length*t*qJ,YJ=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`chart palette has no colour at slot ${t}`);return n};function XJ(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 ZJ(e,t){let n=XJ(e);return n?`rgba(${n.join(`,`)},${t})`:String(e??``).trim()}function QJ(e,t,n){let r=XJ(e),i=XJ(t);return r&&i?`rgb(${r.map((e,t)=>Math.round(e+((i[t]??0)-e)*n)).join(`,`)})`:e}var $J=[.2126,.7152,.0722],eY=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*($J[n]??0),0),tY=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05);function nY(e,t){let n=XJ(e),r=XJ(t.text),i=XJ(t.surface);return!n||!r||!i||tY(eY(n),eY(r))>=tY(eY(n),eY(i))?t.text:t.surface}var rY=(e,t)=>({type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:ZJ(e,t)},{offset:1,color:ZJ(e,0)}]}),iY=(e,t)=>e+GG(e,t);function aY(e){let t=e.x.format?.pattern;return n=>{let r=KG(n,e.timeZone);if(t===`month`||t===`year`)return kK(r,{pattern:t,timeZone:e.timeZone});let i=WG(r,e.timeZone);return i.hour||i.minute?kK(r,{pattern:`time`,timeZone:e.timeZone}):AK(r,{timeZone:e.timeZone})}}function oY(e,t,n){let r=KJ,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 sY(e,t,n,r){let i=n.width<576,a=r.animation!==!1&&!t.reducedMotion&&Lq(e)<=5e3,o=zq(e),s=Object.fromEntries(o.map(e=>[e,!r.hidden.has(e)])),c={palette:t.palette,neutral:t.neutral,rise:t.rise,fall:t.fall,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=eX[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`?Hq(e,r.hidden):null,g=p||e.type===`column`?oY(e,r.hidden,p):null,_=e.series.length===1,v=r.renderer===`canvas`,[y,b]=WJ(e.series.flatMap(t=>e.data.map((n,r)=>Q(e,t.key,r))),!0),x=e.stack===`percent`?yJ(e):UJ(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=>JJ(X(e,x),12)))-20},D=!1;if(e.valueLabels){let t=e.data.length>MY?E():jY(T.length,E()),r=p?n.width-xY(T.map(e=>JJ(e,12)))-20:e.type===`line`?t:jY(T.length,E())/Math.max(1,w.length);D=w.flatMap(t=>e.type===`line`?[...NY(e,t.key)].map(n=>Q(e,t.key,n)):e.data.map((n,r)=>Q(e,t.key,r))).filter(e=>e!=null).every(e=>JJ(X(e,x),12)<=r)}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}:FY(e.x.labelFit,T,E()),...m?{formatter:aY(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:HJ(e.y)?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=>X(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&&!e.valueLabels,M=e.series.map((n,r)=>{let o=YJ(t.palette,sJ(n,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?PJ(h,t,n.key):r;return m?[iY(Mq(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 i=e.type===`area`?_||e.stack!==`none`?t.dark?.34:.22:.1:0,u=e.valueLabels?NY(e,n.key):null;return{...l,type:`line`,data:e.data.map((e,t)=>c(t)),smooth:.35,smoothMonotone:`x`,connectNulls:!1,symbol:`circle`,showSymbol:s||e.valueLabels,label:e.valueLabels?{show:D,position:`top`,distance:6,fontFamily:t.font,fontSize:12,fontWeight:600,color:t.text,formatter:e=>e.value==null||!u?.has(e.dataIndex)?``:X(Array.isArray(e.value)?e.value[1]:e.value,x)}:void 0,symbolSize:8,sampling:v?`lttb`:void 0,lineStyle:{width:2,color:o,..._&&!v?{shadowColor:ZJ(o,.35),shadowBlur:10,shadowOffsetY:6}:{}},itemStyle:{color:o,borderColor:t.surface,borderWidth:2},areaStyle:i?{color:rY(o,i)}:void 0,endLabel:j?{show:!0,formatter:e=>X(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?cY(e,t,!1,a):void 0}}return{...l,type:`bar`,barMaxWidth:GJ,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:FJ(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?``:X(e.value,x)}:void 0,markLine:r===C?cY(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`||e.type===`line`)?24:12,bottom:A?44:4,outerBoundsMode:`same`},dataZoom:A?ZY(e,t,YJ(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:ZJ(t.neutral,t.dark?.12:.1)}},formatter:t=>cJ(iJ(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,c))},xAxis:p?k:O,yAxis:p?O:k,series:M}}function cY(e,t,n,r){if(!e.target)return;let i=kJ(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,X(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 lY(e,t,n,r,i){let{base:a,tooltipBase:o,colours:s,compact:c}=i,l=kJ(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=>cJ(iJ(e,t.dataIndex,r.hidden,s))},graphic:[{type:`group`,left:`center`,top:`middle`,silent:!0,children:[{type:`text`,style:{text:X(d,jK(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||OJ().centerLabel,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:e.sliceValues?{show:!0,position:`outside`,color:t.label,fontFamily:t.font,fontSize:12,lineHeight:16,formatter:e=>`${e.name}\n${X(Number(e.value),l.format)} (${X(e.percent/100,{style:`percent`,decimals:0})})`}:c?{show:!1}:{show:!0,position:`outside`,color:t.label,fontFamily:t.font,fontSize:12,lineHeight:16,formatter:e=>`${e.name}\n${X(e.percent/100,{style:`percent`,decimals:0})}`},labelLine:{length:10,length2:8,smooth:.2,lineStyle:{color:t.axis}},labelLayout:{hideOverlap:!e.sliceValues},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:oJ(e,n,s)}}))}]}}var uY=e=>[...new Set(e)],dY=(e,t)=>e.data.map((n,r)=>Q(e,t,r));function fY(e,t){return{...e,trigger:`item`,formatter:e=>t(e)}}var pY=(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}),mY=(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 hY(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:[OJ().moreLabel,OJ().lessLabel],textGap:8,selectedMode:!1,textStyle:{color:e.label,fontSize:12,fontFamily:e.font},...n}}function gY(e,t,n,r,i){let a=kJ(e),o=uY(e.data.map((t,n)=>$(e,n))),s=Iq(e),c=Jq(dY(e,a.key),t.seq);return{...i.base,grid:{left:4,right:4,top:8,bottom:40,outerBoundsMode:`same`},tooltip:fY(i.tooltipBase,t=>cJ(iJ(e,t.dataIndex,r.hidden,i.colours))),xAxis:pY(t,o,{axisLine:{show:!1},splitArea:{show:!1}}),yAxis:pY(t,s,{inverse:!0,axisLine:{show:!1}}),visualMap:hY(t,c),series:[{type:`heatmap`,data:e.data.map((t,n)=>[o.indexOf($(e,n)),s.indexOf(Nq(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 _Y=6048e5,vY=(e,t)=>{let n=WG(e,t);return`${n.year}-${String(n.month+1).padStart(2,`0`)}-${String(n.day).padStart(2,`0`)}`};function yY(e,t){let n=e.data.map((t,n)=>Mq(e,n)).filter(Number.isFinite),r=bY(n),i=xY(n),a=Math.ceil((i-r)/_Y)+1,o=Math.floor((t.height-62)/7),s=Math.max(SY,Math.min(CY,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)*_Y:r,to:i}}var bY=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.min(t,e),1/0),xY=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.max(t,e),-1/0),SY=9,CY=24;function wY(e,t,n,r,i){let a=kJ(e),{cell:o,from:s,to:c}=yY(e,n),l=Jq(dY(e,a.key),t.seq);return{...i.base,tooltip:fY(i.tooltipBase,t=>cJ(iJ(e,t.dataIndex,r.hidden,i.colours))),visualMap:hY(t,l,{right:4}),calendar:{range:[vY(s,e.timeZone),vY(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:[``,iK(1,`short`),``,iK(3,`short`),``,iK(5,`short`),``],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)=>[vY(Mq(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 TY(e,t,n,r,i){let a=kJ(e),o=Xq(e.data.length,t.seq),s=Q(e,a.key,0);return{...i.base,tooltip:fY(i.tooltipBase,t=>cJ(iJ(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=nY(o[r],t),c=Q(e,a.key,r),l=r?NG(OJ().funnelPreviousStepText,{share:qq(c,Q(e,a.key,r-1))}):NG(OJ().shareOfStepText,{share:qq(c,s),first:VJ($(e,0))});return{name:$(e,r),value:c??0,itemStyle:{color:o[r]},label:{formatter:`{n|${VJ($(e,r))}} {v|${VJ(X(c,a.format))}}\n{p|${r?l:OJ().firstStageLabel}}`,rich:{n:{color:i,fontSize:12.5,fontWeight:500,fontFamily:t.font},v:{color:i,fontSize:13,fontWeight:700,fontFamily:t.font},p:{color:ZJ(i,.78),fontSize:12,fontFamily:t.font}}}}})}]}}function EY(e,t,n,r,i){let a=kJ(e),{min:o,max:s}=$q(e),c=Q(e,a.key,0),l=c??o,u=c==null?null:Zq(e,c),d=YJ(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:fY(i.tooltipBase,()=>cJ(iJ(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:ZJ(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|${VJ(c==null?X(null):X(e,a.format))}}{u|/${VJ(X(s,a.format))}}${u?`\n{s|${VJ(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 DY(e){let t=xY(e.map(e=>e.level).concat(e.map(e=>e.from),e.map(e=>e.to))),n=bY(e.filter(e=>!e.total).map(e=>Math.min(e.from,e.to)).concat(e.filter(e=>e.total).map(e=>e.value))),r=xY(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 OY=4,kY=72,AY=12,jY=(e,t)=>Math.floor(t/Math.max(1,e)-OY),MY=12;function NY(e,t){let n=e.data.map((e,t)=>t).filter(n=>Q(e,t,n)!=null);if(e.data.length<=MY||!n.length)return new Set(n);let r=n=>Q(e,t,n)??0,i=n.reduce((e,t)=>r(t)>r(e)?t:e),a=n.reduce((e,t)=>r(t)<r(e)?t:e);return new Set([n[0],n[n.length-1],i,a].filter(AJ))}function PY(e,t){return xY(e.flatMap(e=>String(e).split(/\s+/)).map(e=>JJ(e,AY)))<=t?{interval:0,width:t,overflow:`break`}:{interval:0,rotate:45,width:kY,overflow:`truncate`}}function FY(e,t,n){let r=jY(t.length,n);return e===`all`?{...PY(t,r),hideOverlap:!1}:e===`rotate`?{interval:0,rotate:45,width:kY,overflow:`truncate`,hideOverlap:!1}:e===`ellipsis`?{interval:0,rotate:0,width:Math.max(1,r),overflow:`truncate`,hideOverlap:!1}:{hideOverlap:!0}}function IY(e,t,n){let r=jY(e.length,n),i=PY(e,r);return{nameSize:AY,valueSize:12,category:`rotate`in i?{...i,hideOverlap:!0}:i,showValues:t.every(e=>JJ(e,12)<=r)}}function LY(e,t,n,r,i){let a=kJ(e),o=eJ(e),s=yJ(e),c=DY(o),l=t=>rJ(e,t.index,i.colours),u=o.map(t=>$(e,t.index)),d=o.map(e=>e.total?X(e.value,s):aJ(e.value,s)),f=o.flatMap(e=>[e.from,e.to]),p=Math.max(JJ(X(xY(f),s),11),JJ(X(bY(f),s),11))+8,m=IY(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:ZJ(t.neutral,.1)}},formatter:t=>cJ(iJ(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:pY(t,u,{axisLabel:{color:t.label,fontSize:m.nameSize,margin:12,...m.category}}),yAxis:mY(t,e=>X(e,s),{min:0,minInterval:HJ(e.y)?1:void 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 RY(e){let t=kJ(e).key;return Iq(e).map(n=>({name:n,rows:e.data.map((e,t)=>t).filter(t=>Nq(e,t)===n).sort((n,r)=>(Q(e,t,r)??0)-(Q(e,t,n)??0)||n-r)}))}function zY(e,t,n,r,i){let a=kJ(e),o=nJ(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(JJ(t[0],12),JJ(t[1],11.5))+20<=Math.sqrt(r)},l=RY(e).map(({name:n,rows:r},i)=>{let s=o.get(n),l=YJ(t.palette,i%t.palette.length),u=nY(l,t);return{name:n,value:s,itemStyle:{color:l,borderColor:l},upperLabel:{color:u,formatter:`{n|${VJ(n)}} {v|${VJ(X(s,a.format))}}`,rich:{n:{fontWeight:600,fontSize:12,color:u,fontFamily:t.font},v:{fontSize:12,color:ZJ(u,.8),fontFamily:t.font}}},children:r.map((n,r)=>{let i=QJ(l,t.surface,Math.min(.55,r*.14)),o=nY(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),X(s,a.format)]),formatter:`{n|${VJ($(e,n))}}\n{v|${VJ(X(s,a.format))}}`,rich:{n:{color:o,fontSize:12,fontWeight:500,fontFamily:t.font,lineHeight:16},v:{color:ZJ(o,.82),fontSize:12,fontFamily:t.font}}}}})}});return{...i.base,tooltip:fY(i.tooltipBase,t=>t.data?.row==null?cJ({title:t.name,rows:[{color:t.color,label:a.label,value:X(t.value,a.format)},{label:OJ().shareOfAllLabel,value:qq(IJ(t.value),s)}],foot:``}):cJ(iJ(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 BY(e){let t=MJ(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 VY(e,t,n,r,i){let a=kJ(e),o=MJ(e),s=tJ(e,t.palette),c=BY(e),l=xY([...c.values()]),u=new Map,d=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|${VJ(e.name)}}\n{v|${X(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:fY(i.tooltipBase,t=>cJ(t.dataType===`edge`?iJ(e,t.dataIndex,r.hidden,i.colours):{title:t.name,rows:[{color:t.color,label:a.label,value:X(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 HY(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=bY(e.map(e=>e[1])),s=xY(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(bY(e.map(e=>e[0]))),c(xY(e.map(e=>e[0])))]}var UY=44,WY=28,GY=8;function KY(e,t,n,r,i){let a=kJ(e),o=Iq(e),s=e.type===`bubble`,c=xY(s?e.data.map(t=>t[NJ(e)]).filter(AJ):[]),l=e=>Math.max(GY,(i.compact?WY:UY)*Math.sqrt(e/c)),u=t=>e.data.map((e,t)=>t).filter(n=>!e.group||Nq(e,n)===t),d=(e.group?o:[null]).filter(e=>e==null||!r.hidden.has(e)).flatMap(e=>u(e)),f=e.trend?HY(d.flatMap(t=>{let n=jJ(e,t)[e.x.key],r=Q(e,a.key,t);return AJ(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]=WJ(p,!1),[_,v]=WJ(m,!1),y=UJ(e.y.format,e.y.min??_,e.y.max??v,4),b=UJ(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:ZJ(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:[jJ(e,t)[e.x.key],Q(e,a.key,t),...s?[jJ(e,t)[NJ(e)]]:[]],row:t}))}));return f&&x.push({name:OJ().trendLabel,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:OJ().trendLabel,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:fY(i.tooltipBase,t=>t.data?.row==null?``:cJ(iJ(e,t.data.row,r.hidden,i.colours))),xAxis:mY(t,e=>X(e,b),{scale:!0,minInterval:HJ(e.x)?1:void 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:mY(t,e=>X(e,y),{min:e.y.min,max:e.y.max,minInterval:HJ(e.y)?1:void 0,...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 qY=32,JY=8,YY=26;function XY(e,t,n,r,i){let a=e.x.kind===`time`,o=e.series.length,s=(n.height-6-YY)/o,c=s-qY-JY,l=YJ(t.palette,0),u=e.data.map((t,n)=>$(e,n)),d=e.series.flatMap((n,r)=>{let i=dY(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:NG(OJ().latestText,{latest:X(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?[iY(Mq(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+qY,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=>cJ(iJ(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:e.series.map((n,r)=>({...a?{type:`time`}:pY(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:aY(e)}:{}}})),yAxis:e.series.map((n,r)=>{let[i,a]=WJ(dY(e,n.key),!1),o=UJ(n.format,e.y.min??i,e.y.max??a,2);return mY(t,e=>X(e,o),{gridIndex:r,splitNumber:2,scale:e.y.min==null,min:e.y.min,max:e.y.max,minInterval:HJ(n)?1:void 0,axisLabel:{color:t.label,fontSize:12,formatter:e=>X(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:rY(l,t.dark?.26:.16)},animationDelay:i.animate?r*160:0,emphasis:{disabled:!0}}))}}function ZY(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:ZJ(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:ZJ(t.neutral,.15)}},selectedDataBackground:{lineStyle:{color:n,width:.75},areaStyle:{color:ZJ(n,.18)}},textStyle:{color:t.label,fontSize:12,fontFamily:t.font}}]}function QY(e,t,n){switch(e.type){case`scatter`:case`bubble`:{if(!e.group)return{seriesIndex:0,dataIndex:n};let t=Nq(e,n),r=e.data.map((e,t)=>t).filter(n=>Nq(e,n)===t);return{seriesIndex:Iq(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 RY(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 $Y(e,t){switch(e.type){case`scatter`:case`bubble`:case`treemap`:{let e=LJ(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 eX={donut:lY,heatmap:gY,calendar:wY,funnel:TY,gauge:EY,waterfall:LY,treemap:zY,sankey:VY,scatter:KY,bubble:KY,multiples:XY};function tX(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=bj(a,null,{renderer:`canvas`,devicePixelRatio:i,width:n.width,height:n.height});try{return o.setOption(sY(e,t,n,{...r,renderer:`canvas`,animation:!1})),o.getDataURL({type:`png`,pixelRatio:i,backgroundColor:t.surface})}finally{o.dispose(),a.remove()}}function nX(e,{renderer:t}){let n=bj(e,null,{renderer:t}),r=!1,i=null;return{renderer:t,render(e,t,a,o,{replace:s=!1}={}){let c=r&&!s?RJ(n.getOption()):null,l=sY(e,t,a,{...o,zoom:c});i=e,n.setOption(l,s||!r?{notMerge:!0}:{replaceMerge:BJ}),r=!0},focusPoint(e,t){let{tip:r=!0,...a}=QY(zJ(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()},flush(){n.getZr().flush()},onSelect(e){n.on(`click`,t=>{if(t.componentType!==`series`)return;let n=$Y(zJ(i),t);n&&e({seriesIndex:n.series,dataIndex:n.row})})},onFinished(e){n.on(`finished`,e)},dispose(){n.dispose()}}}var rX=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(rX);var iX=HTMLElement,aX=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0;function oX(e){return e.isComposing||e.keyCode===229}function sX(e){return e.key===`Enter`&&!oX(e)}function cX(e){return getComputedStyle(e).direction===`rtl`}function lX(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}function uX(e){"@babel/helpers - typeof";return uX=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uX(e)}function dX(e,t){if(uX(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uX(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function fX(e){var t=dX(e,`string`);return uX(t)==`symbol`?t:t+``}function pX(e,t,n){return(t=fX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mX=()=>jG(`chart`,MK),hX=`wui-chart:select`,gX=`wui-chart:legend-change`,_X=`wui-chart:ready`,vX=[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`],yX=`(prefers-color-scheme: dark)`,bX=`(prefers-reduced-motion: reduce)`,xX=`(forced-colors: active)`,SX=`(prefers-contrast: more)`,CX=`print`,wX=e=>typeof window.matchMedia==`function`?window.matchMedia(e):null,TX=!1,EX=new Map;function DX(e,t){let n=[...new Set(t)].filter(e=>e&&!EX.has(e));if(!n.length)return;let r=document.createElement(`span`);r.hidden=!0;let i=n.map(e=>{let t=document.createElement(`span`);return t.style.setProperty(`forced-color-adjust`,`none`),t.style.color=e,r.append(t),[e,t]});e.append(r);for(let[e,t]of i)EX.set(e,getComputedStyle(t).color);r.remove()}var OX=[...[1,2,3,4,5,6,7,8].map(e=>`--color-chart-${e}`),...[0,1,2,3,4,5,6].map(e=>`--color-chart-seq-${e}`),`--color-chart-neutral`,`--wui-chart-rise`,`--wui-chart-fall`,`--color-chart-grid`,`--color-chart-axis`,`--color-chart-label`,`--color-surface`,`--color-text`,`--color-text-body`,`--color-text-muted`];function kX(e){let t=getComputedStyle(e),n=!!wX(xX)?.matches,r=e=>t.getPropertyValue(e).trim();n&&DX(e,OX.map(r));let i=e=>n?EX.get(r(e))??r(e):r(e),a=e.closest(`[data-bs-theme], [data-theme]`)??document.documentElement,o=a.getAttribute(`data-bs-theme`)||a.getAttribute(`data-theme`),s={palette:[1,2,3,4,5,6,7,8].map(e=>i(`--color-chart-${e}`)),seq:[0,1,2,3,4,5,6].map(e=>i(`--color-chart-seq-${e}`)),neutral:i(`--color-chart-neutral`),rise:i(`--wui-chart-rise`),fall:i(`--wui-chart-fall`),grid:i(`--color-chart-grid`),axis:i(`--color-chart-axis`),label:i(`--color-chart-label`),surface:i(`--color-surface`),text:i(`--color-text`),textBody:i(`--color-text-body`),textMuted:i(`--color-text-muted`),shadow:r(`--wui-shadow-popover`),font:t.fontFamily,dark:o===`dark`||o===`auto`&&!!wX(yX)?.matches,reducedMotion:!!wX(bX)?.matches};return!s.palette[0]&&!TX&&(TX=!0,bG(`[@webority/ui-elements] <wui-chart> found no --color-chart-* colours: load @webority/theme on the page.`)),s}var AX=new Set,jX=null;function MX(e){if(AX.add(e),jX)return;let t=()=>{EX.clear();for(let e of AX)e._themeChanged()},n=()=>{EX.clear();for(let e of AX)e._themeChanged(!0)},r=new MutationObserver(t);r.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`data-bs-theme`,`class`]});let i=new MutationObserver(t);i.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[`data-theme`,`data-bs-theme`]});let a=[[yX,t],[bX,t],[xX,t],[SX,t],[CX,n]],o=[];for(let[e,t]of a){let n=wX(e);n&&o.push([n,t])}for(let[e,t]of o)e.addEventListener?.(`change`,t);window.addEventListener(`beforeprint`,n),window.addEventListener(`afterprint`,t),jX=()=>{r.disconnect(),i.disconnect();for(let[e,t]of o)e.removeEventListener?.(`change`,t);window.removeEventListener(`beforeprint`,n),window.removeEventListener(`afterprint`,t),jX=null}}function NX(e){AX.delete(e),AX.size||jX?.()}function PX(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.append(n),n.click(),n.remove()}var FX=0,IX=class extends iX{static get observedAttributes(){return[`view`]}constructor(){super(),pX(this,`uid`,void 0),pX(this,`_spec`,void 0),pX(this,`_normal`,void 0),pX(this,`_hidden`,void 0),pX(this,`_focus`,void 0),pX(this,`_awaitingSpec`,!1),pX(this,`_parts`,null),pX(this,`_theme`,null),pX(this,`_width`,null),pX(this,`_visible`,!1),pX(this,`_resizeObserver`,null),pX(this,`_intersection`,null),pX(this,`_engine`,null),pX(this,`_drawn`,!1),pX(this,`_drawnType`,null),pX(this,`_announcedReady`,!1),pX(this,`_legendSignature`,null),pX(this,`_tableSpec`,null),FX+=1,this.uid=`wui-chart-${FX}`,this._spec=null,this._normal=null,this._hidden=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(aX(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(),MX(this),this._theme=kX(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(){NX(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&&(xq(`view`,n,RK),this._update())}toCsv(){let{spec:e}=this._normalized();return e?mJ(e):``}toPng(){let{spec:e}=this._normalized();return e?tX(e,this._theme??kX(this),this._size(e),{hidden:this._hidden,renderer:Rq(e)}):``}exportCsv(e){let t=URL.createObjectURL(new Blob([this.toCsv()],{type:`text/csv;charset=utf-8`}));PX(t,e??`${hJ(this._normalized().spec)}.csv`),setTimeout(()=>URL.revokeObjectURL(t),2e3)}exportPng(e){let t=this.toPng();t&&PX(t,e??`${hJ(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 xG(`[@webority/ui-elements] <wui-chart> could not read its JSON spec:`,e instanceof Error?e.message:void 0),null}}_normalized(){return this._normal??=Tq(this._spec),this._normal}_build(){let e=CG(`div`,{class:`wui-chart-legend`});e.setAttribute(`role`,`group`),e.setAttribute(`aria-label`,mX().legendLabel),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=CG(`div`,{class:`wui-chart-surface`});t.tabIndex=0,t.setAttribute(`role`,`group`),t.setAttribute(`aria-roledescription`,mX().chartLabel),t.addEventListener(`keydown`,e=>this._onKey(e)),t.addEventListener(`blur`,()=>this._clearFocus());let n=CG(`div`,{class:`wui-chart-canvas`});n.setAttribute(`aria-hidden`,`true`),t.append(n);let r=CG(`div`,{class:`wui-chart-state`});r.setAttribute(`role`,`status`),r.hidden=!0;let i=CG(`div`,{class:`wui-chart-table-wrap visually-hidden`}),a=CG(`p`,{class:`visually-hidden`});a.id=`${this.uid}-summary`;let o=CG(`div`,{class:`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||!jq(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||mX().untitledLabel),r===`loading`?this.setAttribute(`aria-busy`,`true`):this.removeAttribute(`aria-busy`),this.setAttribute(`data-state`,r),n.surface.setAttribute(`aria-label`,NG(mX().arrowKeysText,{title:e?.title||mX().untitledLabel})),n.summary.textContent=e?_J(e,this._hidden):``,e){if(!s){let t=new Set(zq(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??mX().loadingText: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||mX().untitledLabel} ${mX().dataSuffixLabel}`)):(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(CG(`div`,{class:`skeleton wui-chart-skeleton`}),CG(`span`,{class:`visually-hidden`},t)):i.replaceChildren(CG(`p`,{class:`wui-chart-state-text`},t))):i.replaceChildren()}_colour(e,t){let n=this._theme;if(!n)return;if(e.type===`donut`)return rJ(e,t,n);let r=e.series[t],i=e.type===`line`||e.type===`area`||e.type===`column`||e.type===`bar`;return n.palette[r&&i?sJ(r,t):t]}_renderLegend(e,t){let n=this._parts?.legend;if(!n)return;let r=e?zq(e):[],i=!!e&&t&&r.length>=2;if(n.hidden=!i,!e||!i)return;let a=Bq(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=CG(`button`,{class:`wui-chart-legend-item`});r.type=`button`,r.dataset.key=t;let i=CG(`span`,{class: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,CG(`span`,{class:`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=dJ(e),n=CG(`table`,{class:`wui-chart-table`});n.append(CG(`caption`,{class:`visually-hidden`},t.caption));let r=CG(`tr`);t.head.forEach((e,t)=>{let n=CG(`th`,t?{class:`wui-chart-num`}:null,e);n.scope=`col`,r.append(n)});let i=CG(`thead`);i.append(r),n.append(i);let a=CG(`tbody`);for(let e of t.rows){let t=CG(`tr`),n=CG(`th`,null,e.head);n.scope=`row`,t.append(n,...e.cells.map(e=>CG(`td`,{class:`wui-chart-num`},e))),a.append(t)}n.append(a);let o=[n];t.truncated&&o.push(CG(`p`,{class:`wui-chart-table-note`},NG(mX().showingFirstRowsDownloadText,{rows:t.rows.length,total:t.total}))),this._parts.tableWrap.replaceChildren(...o)}_draw(){let{spec:e}=this._normalized();if(!e||!this._parts||!this._theme)return;let t=Rq(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=nX(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(_X,{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(e=!1){if(!this._parts)return;let t=kX(this);JSON.stringify(t)!==JSON.stringify(this._theme)&&(this._theme=t,this._update(),e&&this._engine?.flush())}_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(zq(t).map(e=>[e,!this._hidden.has(e)]));this.dispatchEvent(new CustomEvent(gX,{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(sX(e)){if(!this._focus)return;e.preventDefault(),this._select(this._focus.series,this._focus.index);return}if(!vX.includes(e.key)||e.key===`Escape`&&!this._focus)return;e.preventDefault();let n=EJ(t,this._focus,lX(e.key,cX(this)),this._hidden);n?(this._focus=n,this._engine.focusPoint(n.series,n.index),this._announce(lJ(iJ(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[GK(n.type)?0:e];if(!r)return;let i=n.data[t]??null;this.dispatchEvent(new CustomEvent(hX,{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}}))}};return r(`wui-chart`,IX),e.CHART_STATES=LK,e.CHART_TYPES=NK,e.CHART_VIEWS=RK,e.MAX_SERIES=BK,e.MAX_SLICES=VK,e.RENDERERS=IK,e.STACK_MODES=PK,e.WuiChart=IX,e.X_KINDS=FK,e.formatValue=X,e.normalizeSpec=Tq,e})({});
|
|
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=Zc(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=dB([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 gv;h.marker=g.makeTooltipMarker(`item`,Qg(h.color),d);var _=k_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?sv(y?A({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=Zc(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(U(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=O(a),a.content=Hh(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=dB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new gv;this._showOrMove(d,function(){var n=O(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(U(u)){var p=e.ecModel.get(`useUTC`),m=V(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Tg(m.axisValue,d,p)),d=Yg(d,n,!0)}else if(H(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`||V(t))return{color:r||i};if(!V(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),H(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),V(t))n=J(t[0],s),r=J(t[1],c);else if(W(t)){var p=t;p.width=l[0],p.height=l[1];var m=c_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(U(t)&&o){var h=hB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=pB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=gB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=gB(d)?l[1]/2:d===`bottom`?l[1]:0),Hz(e)){var h=mB(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()&&(ww(this,`_updatePosition`),this._tooltipContent.dispose(),MR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(vO);function dB(e,t,n){var r=t.ecModel,i;n?(i=new bp(n,r,r),i=new bp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof bp&&(o=o.get(`tooltip`,!0)),U(o)&&(o={formatter:o}),o&&(i=new bp(o,i,r)))}return i}function fB(e,t){return e.dispatchAction||z(t.dispatchAction,t)}function pB(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 mB(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 hB(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 gB(e){return e===`center`||e===`middle`}function _B(e,t,n){var r=Cc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Ec(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=Zc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function vB(e){zj(qR),e.registerComponentModel(Vz),e.registerComponentView(uB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ae),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ae)}var yB=F;function bB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function xB(e,t,n){var r={};return yB(t,function(t){var a=r[t]=i();yB(e[t],function(e,r){if(DF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new DF(i),r===`opacity`&&(i=O(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new DF(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function SB(e,t,n){var r;F(n,function(e){t.hasOwnProperty(e)&&bB(t[e])&&(r=!0)}),r&&F(n,function(n){t.hasOwnProperty(n)&&bB(t[n])?e[n]=O(t[n]):delete e[n]})}function CB(e,t,n,r){var i={};return F(e,function(e){i[e]=DF.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return ek(a,l,e)}function c(e,t){nk(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 wB=function(e){a(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}(v_),TB=function(e){a(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=G(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Wo({style:Zf(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Wo({style:Zf(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(){$g(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){$g(p,`_`+e.get(`subtarget`))}),Zc(c).eventData=Zc(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 _=c_(g,u_(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 zo({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}(vO);function EB(e){e.registerComponentModel(wB),e.registerComponentView(TB)}function DB(e,t){if(!e)return!1;for(var n=V(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function OB(e){tc(e,`label`,[`show`])}var kB=bc(),AB=function(e){a(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=kB(e)[i];!n||!n.data?kB(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&OB(n),F(n.data,function(e){e instanceof Array?(OB(e[0]),OB(e[1])):OB(e)}),a=this.createMarkerModelFromSeries(n,this,t),A(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),kB(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return tv(`section`,{header:this.name,blocks:[tv(`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=O_.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 kB(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(v_);P(AB,O_.prototype);function jB(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function MB(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function NB(e,t,n,r,i,a,o){var s=[],c=_h(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=BB(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=Ts(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var PB={min:B(NB,`min`),max:B(NB,`max`),average:B(NB,`average`),median:B(NB,`median`)};function FB(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!MB(t)&&!V(t.coord)&&V(i)){var a=IB(t,n,r,e);if(t=O(t),t.type&&PB[t.type]&&a.baseAxis&&a.valueAxis){var o=N(i,a.baseAxis.dim),s=N(i,a.valueAxis.dim),c=PB[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||!V(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&PB[t.type]){var u=r.getOtherAxis(l);u&&(t.value=BB(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)PB[d[f]]&&(d[f]=BB(n,n.mapDimension(i[f]),d[f]));return t}}function IB(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(LB(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 LB(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function RB(e,t){return e&&e.containData&&t.coord&&!jB(t)?e.containData(t.coord):!0}function zB(e,t){return e?function(e,n,r,i){return hm(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return hm(e.value,t[i])}}function BB(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 VB=bc(),HB=function(e){a(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=K()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){VB(e).keep=!1}),t.eachSeries(function(e){var i=AB.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!VB(e).keep&&r.group.remove(e.group)}),UB(t,i,this.type)},t.prototype.markKeep=function(e){VB(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;F(e,function(e){var r=AB.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Gl(e):Kl(e))})})},t.type=`marker`,t}(vO);function UB(e,t,n){e.eachSeries(function(e){var r=AB.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Rf(r),o=a.z,s=a.zlevel;Bf(i.group,o,s)}})}var WB=function(e){a(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}(AB),GB=bc(),KB=function(e,t,n,r){var i=e.getData(),a;if(V(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=IB(r,i,t,e);s=l.valueAxis,c=BB(i,vh(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=O(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=[FB(e,a[0]),FB(e,a[1]),A({},a[2])];return h[2].type=h[2].type||null,k(h[2],h[0]),k(h[2],h[1]),h};function qB(e){return!isNaN(e)&&!isFinite(e)}function JB(e,t,n,r){var i=1-e,a=r.dimensions[e];return qB(t[i])&&qB(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function YB(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(JB(1,n,r,e)||JB(0,n,r,e)))return!0}return RB(e,t[0])&&RB(e,t[1])}function XB(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(Ty(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;qB(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):qB(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 ZB=function(e){a(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=AB.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=GB(t).from,a=GB(t).to;i.each(function(t){XB(i,t,!0,e,n),XB(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 _I);this.group.add(c.group);var l=QB(i,e,t),u=l.from,d=l.to,f=l.line;GB(t).from=u,GB(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);V(p)||(p=[p,p]),V(m)||(m=[m,m]),V(h)||(h=[h,h]),V(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:G(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){Zc(e).dataModel=t,e.traverse(function(e){Zc(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);XB(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=tk(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:G(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:G(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:G(a.get(`symbolSize`),m[+!i]),symbol:G(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(HB);function QB(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return A(A({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Zm(r,n),a=new Zm(r,n),o=new Zm([],n),s=I(n.get(`data`),B(KB,t,e,n));e&&(s=L(s,B(YB,e)));var c=zB(!!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 $B(e){e.registerComponentModel(WB),e.registerComponentView(ZB),e.registerPreprocessor(function(e){DB(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var eV=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`])}},tV=function(e){a(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`]),V(t)&&F(t,function(e,r){U(e)&&(e={type:e}),t[r]=k(e,eV(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&&hc(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=K(),a=I(r,function(e){return(U(e)||oe(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new bp(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])&&N(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}(v_),nV=B,rV=F,iV=Vu,aV=function(e){a(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 iV),this.group.add(this._selectorGroup=new iV),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=u_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=c_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=c_(M({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=Bz(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=K(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),rV(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
+
`)){var p=new iV;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`,nV(cV,f,null,r,d)).on(`mouseover`,nV(lV,m.name,null,r,d)).on(`mouseout`,nV(uV,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Zc(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`),_=Br(h.fill);_&&_[3]===0&&(_[3]=.2,h=A(A({},h),{fill:Jr(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,nV(cV,null,f,r,d)).on(`mouseover`,nV(lV,null,f,r,d)).on(`mouseout`,nV(uV,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Zc(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};Zc(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();rV(e,function(e){var r=e.type,i=new Wo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Yf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ou(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=oV(c,r,o,s,d,m,u),y=new iV,b=r.getModel(`textStyle`);if(H(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(sV({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;U(w)&&w?T=w.replace(`{name}`,t??``):H(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Wo({style:Zf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new zo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&jf({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),ou(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();i_(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){i_(`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}(vO);function oV(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),rV(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:$k(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 sV(e){var t=e.icon||`roundRect`,n=Iv(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 cV(e,t,n,r){uV(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),lV(e,t,n,r)}function lV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function uV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function dV(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),fV(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){F(i,function(t,n){e[t?`select`:`unSelect`](n)}),fV(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function fV(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 pV(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,B(dV,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,B(dV,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,B(dV,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,B(dV,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,B(dV,`unSelect`))}var mV=Xc(hV);function hV(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 gV(e){e.registerComponentModel(tV),e.registerComponentView(aV),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,mV),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),pV(e)}var _V=function(e){a(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=h_(t);e.prototype.init.call(this,t,n,r),vV(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),vV(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Oh(tV.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}(tV);function vV(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,m_(t,n,{type:`box`,ignoreSize:!!i})}var yV=Vu,bV=[`width`,`height`],xV=[`x`,`y`],SV=function(e){a(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 yV),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new yV)},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=V(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Wo({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=Cf(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=bV[s],l=xV[s],u=bV[1-s],d=xV[1-s];i&&i_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=O(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;i_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),i_(`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],_=G(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 zo({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&&Wd(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`,U(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=bV[i],o=xV[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}(aV);function CV(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 wV(e){zj(gV),e.registerComponentModel(_V),e.registerComponentView(SV),CV(e)}function TV(e){zj(gV),zj(wV)}var EV=function(e){a(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=Oh(Mz.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Mz),DV=bc();function OV(e,t,n){DV(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function kV(e,t){for(var n=DV(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||AV(n,o))}}}function AV(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function jV(e,t){var n={model:t,containsPoint:B(NV,t),dispatchAction:B(MV,e),dataZoomInfoMap:null,controller:null},r=n.controller=new iN(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 MV(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function NV(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function PV(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=G(t.get(`cursorGrab`,!0),s),c=G(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 FV(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=DV(t),r=n.coordSysRecordMap||=K();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){F(Ez(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,jV(t,n.model));(a.dataZoomInfoMap||=K()).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)AV(r,e);else{var s=PV(a,e,t);n.enable(s.controlType,s.opt),Cw(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var IV=function(e){a(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(),OV(r,t,{pan:z(LV.pan,this),zoom:z(LV.zoom,this),scrollMove:z(LV.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){kV(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(Pz),LV={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=zV[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(BI(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:RV(function(e,t,n,r,i,a){var o=zV[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:RV(function(e,t,n,r,i,a){return zV[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function RV(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(BI(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 zV={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 BV(e){zz(e),e.registerComponentModel(EV),e.registerComponentView(IV),FV(e)}var VV=function(e){a(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=Oh(Mz.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}(Mz),HV=zo,UV=1,WV=30,GV=7,KV=`horizontal`,qV=`vertical`,JV=5,YV=[`line`,`bar`,`candlestick`,`scatter`],XV={easing:`cubicOut`,duration:100,delay:0},ZV=function(e){a(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),Cw(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(){ww(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 Vu;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`)?GV:0,r=u_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===KV?{right:r.width-i.x-i.width,top:r.height-WV-a-n,width:i.width,height:WV}:{right:a,top:i.y,width:WV,height:i.height},s=h_(e.option);F([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=c_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===qV&&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===KV&&!i?{scaleY:o?1:-1,scaleX:1}:n===KV&&i?{scaleY:o?1:-1,scaleX:-1}:n===qV&&!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 HV({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new HV({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:vs(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 Vu,r=new md({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new gd({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&&N(YV,e.get(`type`))<0)){var o=r.getComponent(wz(i),a).axis,s=$V(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 HV({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new HV({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:UV,fill:Y.color.transparent}})),F([0,1],function(t){var a=o.get(`handleIcon`);!Nv[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=Iv(a,-1,0,2,2,null,!0);s.attr({cursor:eH(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(),ou(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 Wo({silent:!0,invisible:!f,style:Zf(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 zo({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=Iv(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 zo({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=[vs(e[0],[0,100],t,!0),vs(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];BI(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:vs(a.minSpan,o,i,!0),a.maxSpan==null?null:vs(a.maxSpan,o,i,!0));var s=this._range,c=this._range=ws([vs(r[0],i,o,!0),vs(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=ws(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 zo,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=Az(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=[QV(t,0,l,s),QV(t,1,l,s)]}}var p=ws(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=hf(n.handles[e].parent,this.group),o=_f(e===0?`right`:`left`,t),s=this._handleWidth/2+JV,c=gf([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===KV?`middle`:o,align:i===KV?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,fE(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=gf([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 Mt(t,n),this._brushing=!0,this._brushStartTime=+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(!(+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();BI(0,a,r,0,o.minSpan==null?null:vs(o.minSpan,i,r,!0),o.maxSpan==null?null:vs(o.maxSpan,i,r,!0)),this._range=ws([vs(a[0],r,i,!0),vs(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(fE(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 HV({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?XV:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Ez(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}(Pz);function QV(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)?``:Yy(r)||qy(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Cs(o,a,!0):o+``;return H(i)?i(o,s):U(i)?i.replace(`{value}`,s):s}function $V(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function eH(e){return e===`vertical`?`ns-resize`:`ew-resize`}function tH(e){e.registerComponentModel(VV),e.registerComponentView(ZV),zz(e)}function nH(e){zj(BV),zj(tH)}var rH={get:function(e,t,n){var r=O((iH[e]||{})[t]);return n&&V(r)?r[r.length-1]:r}},iH={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]}},aH=DF.mapVisual,oH=DF.eachVisual,sH=V,cH=F,lH=ws,uH=vs,dH=function(e){a(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&&SB(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=xB(this.option.controller,t,e),this.targetVisuals=xB(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 cH(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=Ec(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||=[`<`,`>`],V(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return U(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):H(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=lH([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||={};k(r,n),k(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){sH(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]={},cH(r,function(e,t){if(DF.isValidType(t)){var n=rH.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`;cH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&O(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&O(n)||(a?s[0]:[s[0],s[0]])),c.symbol=aH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;oH(l,function(e){e>u&&(u=e)}),c.symbolSize=aH(l,function(e){return uH(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}(v_),fH=function(e){a(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=Gg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new zo({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(DF.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),DF.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=u_(t,n).refContainer;d_(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(vO),pH=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function mH(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=pH[o],c=[0,null,10],l={},u=0;u<3;u++)l[pH[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=c_(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 hH(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 gH={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},_H=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},vH=[{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(CB(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(yH,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function yH(e,t,n,r){for(var i=t.targetVisuals[r],a=DF.prepareVisualTypes(i),o={color:tk(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 bH=F;function xH(e){var t=e&&e.visualMap;V(t)||(t=t?[t]:[]),bH(t,function(e){if(e){SH(e,`splitList`)&&!SH(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&V(t)&&bH(t,function(e){W(e)&&(SH(e,`start`)&&!SH(e,`min`)&&(e.min=e.start),SH(e,`end`)&&!SH(e,`max`)&&(e.max=e.end))})}})}function SH(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var CH=!1;function wH(e){CH||(CH=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(gH,_H),F(vH,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(xH))}var TH=function(e){a(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=[],EH[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=O(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=I(this._pieceList,function(e){return e=O(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=DF.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]=rH.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=O(e)},t.prototype.getValueState=function(e){var t=DF.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){DF.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=Oh(dH.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}(dH),EH={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]}),Rs(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),DH(t,e)},pieces:function(e){var t=this.option;F(t.pieces,function(t,n){W(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=DF.retrieveVisuals(t),e.push(r)},this),DH(t,e),Rs(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 DH(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var OH=function(e){a(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 Vu;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 Wo({style:Zf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:G(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),i_(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:hH(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return mH(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 Vu,o=this.visualMapModel.textStyleModel;a.add(new Wo({style:Zf(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=Iv(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=O(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}(fH);function kH(e){e.registerComponentModel(TH),e.registerComponentView(OH),wH(e)}function AH(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function jH(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:AH(r&&r.shape.points)}}var MH=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],NH=new qn,PH=bc(),FH=bc();function IH(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];t[i]!=null&&(e[i]=t[i])}}var LH=[`x`,`y`,`rotation`],RH=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?NH.setLocalTransform(s):(NH.x=NH.y=NH.rotation=NH.originX=NH.originY=0,NH.scaleX=NH.scaleY=1),NH.rotation=io(NH.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:NH.x,y:NH.y,scaleX:NH.scaleX,scaleY:NH.scaleY,rotation:NH.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`);(H(r)||R(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),a=Zc(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(){DT(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=H(a.layoutOptionOrCb)?a.layoutOptionOrCb(jH(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=PH(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<MH.length;m++){var h=MH[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(OS({},e))});var i=L(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=L(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});AS(i,0,0,t),AS(a,1,0,n);var o=L(r,function(e){return e.layoutOption.hideOverlap});jS(o),MS(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=PH(o).needsUpdateLabelLine),a&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=Zc(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`);PT(e,FT(o),s),DT(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&&!Kd(e))){var i=PH(n),a=i.oldLayout,o=Zc(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&&(N(u,`select`)>=0&&n.attr(i.oldLayoutSelect),N(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Wd(n,c,t,s)}else if(n.attr(c),!op(n).valueAnimation){var d=G(n.style.opacity,1);n.style.opacity=0,Gd(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};IH(f,c,LH),IH(f,n.states.select,LH)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};IH(p,c,LH),IH(p,n.states.emphasis,LH)}cp(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=FH(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Wd(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Gd(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),zH=bc();function BH(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=zH(t).labelManager;r||=zH(t).labelManager=new RH,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=zH(t).labelManager;F(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var VH=function(){function e(t,n){Iy(this,e.decoratedMethods),this._outOfBrk=Hy(null,n);var r=this._linear=Hy(null,n);Ly(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){zc(t,n)&&(e===0&&GH(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=UH,r=WH,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=UH,r=WH,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 HH(e,t){return new VH(e,t)}var UH=0,WH=0;function GH(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=JH(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:cs(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function KH(e,t,n,r,i,a){e!==`no`&&F(n,function(n){var o=JH(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 qH(e,t,n,r){F(t,function(t){var i=JH(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 JH(e,t){var n=cs(e.vmin,t[0]),r=ss(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 YH(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:O(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(U(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 XH(e,t){return ZH(t)===ZH(e)}function ZH(e){return e.start+`_\0_`+e.end}function QH(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=re(r,function(n){return XH(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 $H(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=re(n,function(e){return XH(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:O(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function eU(e,t,n,r,i){i.original=YH(e,t,n);var a=i.transformed=YH(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 tU={vmin:`start`,vmax:`end`};function nU(e,t){return t&&(e||={},e.break={type:tU[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function rU(){ng({createBreakScaleMapper:HH,pruneTicksByBreak:KH,addBreaksToTicks:qH,parseAxisBreakOption:YH,identifyAxisBreak:XH,serializeAxisBreakIdentifier:ZH,retrieveAxisBreakPairs:QH,getTicksBreakOutwardTransform:$H,parseAxisBreakOptionInwardTransform:eU,makeAxisLabelFormatterParamBreak:nU})}var iU=bc();function aU(e,t){var n=re(e,function(e){return rg().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function oU(e){F(e,function(e){return e.shouldRemove=!0})}function sU(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function cU(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!rg())return;var o=rg().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 Vu({ignoreModelZ:!0}),y=a.isHorizontal(),b=iU(t).visualList||(iU(t).visualList=[]);oU(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=aU(b,t);s.shouldRemove=!1;var c=new Vu;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:LS,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),sU(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[$d[v]]+r[ef[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[$d[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return Po(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[$d[v]],T=0;;T++){var E=w===r[$d[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=rg().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new gd({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new gd({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var M=S.slice();M.reverse();var N=x.concat(M);t.add(new md({anid:`break_c_`+j,shape:{points:N},style:{fill:_,opacity:p.opacity},z:f}))}}}function lU(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(rg().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:rg().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]};Po(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 yd(A({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 uU(e,t,n){if(re(n,function(e){return!e}))return;var r=new Mt;if(!NS(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 Mt(t[ef[e]]*a[0][0],t[ef[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 Mt;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 Mt,h=new Mt;Mt.scale(m,r,-s),Mt.scale(h,r,1-s),DS(n[0],m),DS(n[1],h)}function dU(e,t){var n={breaks:[]};return F(t.breaks,function(r){if(r){var i=re(e.get(`breaks`,!0),function(e){return rg().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 fU(){FS({adjustBreakLabelPair:uU,buildAxisBreakLine:lU,rectCoordBuildBreakAxis:cU,updateModelAxisBreak:dU})}function pU(e){GS(e),rU(),fU()}var mU=Math.sin,hU=Math.cos,gU=Math.PI,_U=Math.PI*2,vU=180/gU,yU=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=ti(u-_U)||(l?c>=_U:-c>=_U),f=c>0?c%_U:c%_U+_U,p=!1;p=d?!0:!ti(u)&&f>=gU==!!l;var m=e+n*hU(a),h=t+r*mU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*vU);if(d){var _=1/this._p,v=(l?1:-1)*(_U-_);this._add(`A`,n,r,g,1,+l,e+n*hU(a+v),t+r*mU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*hU(o),b=t+r*mU(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}(),bU=`none`,xU=Math.round;function SU(e){var t=e.fill;return t!=null&&t!==bU}function CU(e){var t=e.stroke;return t!=null&&t!==bU}var wU=[`lineCap`,`miterLimit`,`lineJoin`],TU=I(wU,function(e){return`stroke-`+e.toLowerCase()});function EU(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof jo)e(`opacity`,i);else{if(SU(t)){var a=$r(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`,bU);if(CU(t)){var s=$r(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=xk(n),p=f[0],m=f[1];p&&(m=xU(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,bU);for(var h=0;h<wU.length;h++){var g=wU[h];if(r||t[g]!==So[g]){var _=t[g]||So[g];_&&e(TU[h],_)}}}else r&&e(`stroke`,bU)}}var DU=`http://www.w3.org/2000/svg`,OU=`http://www.w3.org/1999/xlink`,kU=`http://www.w3.org/2000/xmlns/`,AU=`http://www.w3.org/XML/1998/namespace`,jU=`ecmeta_`;function MU(e){return document.createElementNS(DU,e)}function NU(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function PU(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 FU(e){return`</`+e+`>`}function IU(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 PU(i,a)+(i===`style`?o||``:Hh(o))+(t?``+n+I(t,function(e){return r(e)}).join(n)+n:``)+FU(i)}return r(e)}function LU(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 RU(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function zU(e,t,n,r){return NU(`svg`,`root`,{width:e,height:t,xmlns:DU,"xmlns:xlink":OU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var BU=0;function VU(){return BU++}var HU={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`},UU=`transform-origin`;function WU(e,t,n){var r=A({},e.shape);A(r,t),e.buildPath(n,r);var i=new yU;return i.reset(gi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function GU(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[UU]=n+`px `+r+`px`)}var KU={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function qU(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function JU(e,t,n){var r=e.shape.paths,i={},a,o;if(F(r,function(e){var t=RU(n.zrId);t.animation=!0,XU(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=qU(i,n);return a.replace(o,s)}}function YU(e){return U(e)?HU[e]?`cubic-bezier(`+HU[e]+`)`:Tr(e)?e:``:``}function XU(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Ed){var s=JU(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=YU(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=YU(d.easing),m=d.rawValue;(U(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={};Zn(g,e),A(g,s[h]);var _=_i(g),v=s[h][u];l[h]=_?{transform:_}:{},GU(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 $a);var S=y.len();y.reset(),l[h].d=WU(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 KU[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][UU]!==l[O][UU]){T=!1;break}E=l[D][UU]}if(T&&E){for(var h in l)l[h][UU]&&delete l[h][UU];t[UU]=E}if(L(w,function(e){return R(l[e]).length>0}).length)return qU(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-`+VU();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function ZU(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};QU(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=Zr(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),QU(r,t,n,!0)}}}function QU(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+VU(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var $U=Math.round;function eW(e){return e&&U(e.src)}function tW(e){return e&&H(e.toDataURL)}function nW(e,t,n,r){EU(function(i,a){var o=i===`fill`||i===`stroke`;o&&mi(a)?_W(t,e,i,r):o&&di(a)?vW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),gW(n,e,r)}function rW(e,t){var n=yD(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[jU+`silent`]=`true`))}function iW(e){return ti(e[0]-1)&&ti(e[1])&&ti(e[2])&&ti(e[3]-1)}function aW(e){return ti(e[4])&&ti(e[5])}function oW(e,t,n){if(t&&!(aW(t)&&iW(t))){var r=n?10:1e4;e.transform=iW(t)?`translate(`+$U(t[4]*r)/r+` `+$U(t[5]*r)/r+`)`:ii(t)}}function sW(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push($U(r[a][0]*n)/n),i.push($U(r[a][1]*n)/n);t.points=i.join(` `)}function cW(e){return!e.smooth}function lW(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]]=$U(o*r)/r)}}}var uW={circle:[lW([`cx`,`cy`,`r`])],polyline:[sW,cW],polygon:[sW,cW]};function dW(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function fW(e,t){var n=e.style,r=e.shape,i=uW[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&gi(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&dW(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 yU,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return oW(a,e.transform),nW(a,n,e,t),rW(a,e),t.animation&&XU(e,a,t),t.emphasis&&ZU(e,a,t),NU(s,e.id+``,a)}function pW(e,t){var n=e.style,r=n.image;if(r&&!U(r)&&(eW(r)?r=r.src:tW(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),oW(c,e.transform),nW(c,n,e,t),rW(c,e),t.animation&&XU(e,c,t),NU(`image`,e.id+``,c)}}function mW(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=oi(n.y||0,hn(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":ai[n.textAlign]||n.textAlign};if(Xo(n)){var c=``,l=n.fontStyle,u=Jo(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),oW(s,e.transform),nW(s,n,e,t),rW(s,e),t.animation&&XU(e,s,t),NU(`text`,e.id+``,s,void 0,r)}}function hW(e,t){if(e instanceof To)return fW(e,t);if(e instanceof jo)return pW(e,t);if(e instanceof Do)return mW(e,t)}function gW(e,t,n){var r=e.style;if(si(r)){var i=ci(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=$r(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]=NU(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[NU(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=hi(o)}}function _W(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(fi(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(pi(i))a=`radialGradient`,o.cx=G(i.x,.5),o.cy=G(i.y,.5),o.r=G(i.r,.5);else return;for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=ri(s[l].offset)*100+`%`,f=s[l].color,p=$r(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(NU(`stop`,l+``,g))}var _=IU(NU(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=NU(a,y,o,c)),t[n]=hi(y)}function vW(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(li(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(U(h)?m=h:eW(h)?m=h.src:tW(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=NU(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=O(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=_i(i);x&&(o.patternTransform=x);var S=NU(`pattern`,``,o,[d]),C=IU(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=NU(`pattern`,T,o,[d])),t[n]=hi(T)}}function yW(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]=NU(`clipPath`,a,o,[fW(e,n)])}t[`clip-path`]=hi(a)}function bW(e){return document.createTextNode(e)}function xW(e,t,n){e.insertBefore(t,n)}function SW(e,t){e.removeChild(t)}function CW(e,t){e.appendChild(t)}function wW(e){return e.parentNode}function TW(e){return e.nextSibling}function EW(e,t){e.textContent=t}var DW=58,OW=120,kW=NU(``,``);function AW(e){return e===void 0}function jW(e){return e!==void 0}function MW(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 NW(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function PW(e){var t,n=e.children,r=e.tag;if(jW(r)){var i=e.elm=MU(r);if(LW(kW,e),V(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&CW(i,PW(a))}else jW(e.text)&&!W(e.text)&&CW(i,bW(e.text))}else e.elm=bW(e.text);return e.elm}function FW(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&xW(e,PW(a),t)}}function IW(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(jW(i.tag)?SW(wW(i.elm),i.elm):SW(e,i.elm))}}function LW(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)===OW?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(kU,n,o):n.charCodeAt(3)===DW?r.setAttributeNS(AU,n,o):n.charCodeAt(5)===DW?r.setAttributeNS(OU,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function RW(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]:NW(o,l)?(zW(o,l),o=t[++r],l=n[++i]):NW(s,u)?(zW(s,u),s=t[--a],u=n[--c]):NW(o,u)?(zW(o,u),xW(e,o.elm,TW(s.elm)),o=t[++r],u=n[--c]):NW(s,l)?(zW(s,l),xW(e,s.elm,o.elm),s=t[--a],l=n[++i]):(AW(d)&&(d=MW(t,r,a)),f=d[l.key],AW(f)?xW(e,PW(l),o.elm):(p=t[f],p.tag===l.tag?(zW(p,l),t[f]=void 0,xW(e,p.elm,o.elm)):xW(e,PW(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,FW(e,m,n,i,c)):IW(e,t,r,a))}function zW(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(LW(e,t),AW(t.text)?jW(r)&&jW(i)?r!==i&&RW(n,r,i):jW(i)?(jW(e.text)&&EW(n,``),FW(n,null,i,0,i.length-1)):jW(r)?IW(n,r,0,r.length-1):jW(e.text)&&EW(n,``):e.text!==t.text&&(jW(r)&&IW(n,r,0,r.length-1),EW(n,t.text)))}function BW(e,t){if(NW(e,t))zW(e,t);else{var n=e.elm,r=wW(n);PW(t),r!==null&&(xW(r,t.elm,TW(n)),IW(r,[e],0,0))}return t}var VW=0,HW=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=UW(`configLayer`),this.storage=t,this._opts=n=A({},n),this.root=e,this._id=`zr`+VW++,this._oldVNode=zU(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=MU(`svg`);LW(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`,BW(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return hW(e,RU(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=RU(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=WW(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=NU(`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(NU(`defs`,`defs`,{},c)),e.animation){var l=LU(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=NU(`style`,`stl`,{},[],l);a.push(u)}}return zU(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},IU(this.renderToVNode({animation:G(e.cssAnimation,!0),emphasis:G(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:G(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 _={};yW(d[g],_,t);var v=NU(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=hW(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=yk(r,0,n),t=yk(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(di(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=vi(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function UW(e){return function(){}}function WW(e,t,n,r){var i;if(n&&n!==`none`){if(i=NU(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),mi(n))_W({fill:n},i.attrs,`fill`,r);else if(di(n))vW({style:{fill:n},dirty:Ae,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=$r(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function GW(e){e.registerPainter(`svg`,HW)}function KW(e,t,n){var r=f.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 qW(e){return!e.__cursors.get(0)}function JW(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var YW=function(e){a(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||=Wi,typeof t==`string`?a=KW(t,n,r):W(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=JW(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=KW(`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=JW(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||gk(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=Ok(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}(Hi),XW=1e5,ZW=314159,QW=void 0,$W=1,eG=2;function tG(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function nG(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 rG(e,t,n,r){var i=new YW(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,iG(i),i}function iG(e){e.__cursorStack=[],e.__cursors=K()}function aG(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function oG(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,aG({key:r})))}function sG(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function cG(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function lG(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&uG&&!s.__builtin__||n&dG&&s.__builtin__||n&fG&&s===e.hoverlayer)||t(s,a,o,i)}}var uG=1,dG=2,fG=4,pG=uG|fG,mG=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=A({},n||{}),this.dpr=n.devicePixelRatio||Wi,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=rG(a,this,ZW,0);c.initContext(),this._insertLayer(c,ZW,0,!0),this._domRoot=e}else{this._width=yk(e,0,n),this._height=yk(e,1,n);var l=this._domRoot=nG(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&&!W(e)?{paintAll:!!e}:e||{},n=G(t.refresh,!0),r=G(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=eG),!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 lG(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},dG),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=QW,n!==QW&&(!t&&n===eG&&(t=this._i.hoverlayer=this._ensureLayer(XW)),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),qk(i,s,r),c&&(s.style=l)}}i&&(Jk(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(XW)},e.prototype.paintOne=function(e,t){Kk(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)lG(this._i,function(e){e.afterBrush&&e.afterBrush()},pG),this._paintHoverList(e);else{var i=this;UE(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(ZW).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),lG(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},uG)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return lG(this._i,function(i){var a=!1;if(sG(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!qW(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)}sG(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},pG),Ne.wxa&&lG(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=qW(e),c=s&&f.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var p=n[d];if(!(d<l&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=eG),r!=null){var m=p.getPaintRect();m&&m.intersect(r)&&(qk(o,p,a),p.setPrevPaintRect(m))}else qk(o,p,a);if(s&&f.getTime()-c>15){d++;break}}}Jk(o,a),t.drawIdx=Math.max(d,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=ZW,t=0);var i=cG(this._i,e)[t];return i||(i=rG(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&k(i,this._layerConfig[e],!0),(n||r&&e!==ZW)&&(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])&&tG(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=cG(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),cG(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 lG(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return lG(this._i,function(n,r){e.call(t,n,r)},uG)},e.prototype.eachOtherLayer=function(e,t){return lG(this._i,function(n,r){e.call(t,n,r)},dG)},e.prototype.getLayers=function(){var e={};return lG(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}}lG(n._i,function(e){e.__dirty=!1,sG(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},pG);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__))D(`ZLevel `+d+` has been used by unknown layer `+o.id);else{if((!s||f!==s.key)&&(s=oG(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))}}lG(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;(qW(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&&(sG(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===QW&&(n._hoverLayerDirty=$W))},pG)},e.prototype.clear=function(){return lG(this._i,function(e){e.clear(),iG(e)},uG),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,lG(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?k(n[e],t,!0):n[e]=t,lG(this._i,function(e,t){k(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=yk(i,0,r),t=yk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,lG(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(ZW).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[ZW][0].dom;var t=new YW(`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;lG(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];qk(n,l,a)}Jk(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function hG(e){e.registerPainter(`canvas`,mG)}var gG=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),_G=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),vG=(e=`INR`)=>gG[e]??`${e} `;function yG(e,...t){console.warn(e,...t)}function bG(e,...t){console.error(e,...t)}function xG(e,t){if(e==null)throw Error(t);return e}function SG(e,t,...n){if(e.toLowerCase()===`svg`)throw Error(`make() builds HTML elements; use svgRoot for svg`);let r=document.createElement(e);for(let[e,n]of Object.entries(t??{}))n===!0?r.setAttribute(e,``):(typeof n==`string`||typeof n==`number`)&&r.setAttribute(e,String(n));let i=[];for(let e of n)e instanceof Node?i.push(e):(typeof e==`string`||typeof e==`number`)&&i.push(document.createTextNode(String(e)));return r.append(...i),r}var CG=`en-IN`,wG=/\{([A-Za-z0-9_]+)\}/g,TG=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,EG,DG=new Map,OG=0,kG=new Map;function AG(e,t){let n=DG.get(e);if(n===void 0)return t;let r=kG.get(e);if(r!==void 0&&r.version===OG&&r.english===t&&FG(r.merged,t))return r.merged;let i=PG(e,n,t);return kG.set(e,{version:OG,english:t,merged:i}),i}function jG(){return EG??CG}function MG(e,t){return e.replace(wG,(e,n)=>TG(t,n)?String(t[n]):e)}function NG(e,t,n,r){let i=`${t}Other`;if(!TG(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(jG()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[TG(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return MG(s,{count:n,...r})}function PG(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=TG(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=IG(t);for(let t of IG(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function FG(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>TG(e,t))}function IG(e){return Array.from(e.matchAll(wG),e=>e[1]??``)}var LG={aprShortLabel:`Apr`,aprilLabel:`April`,augShortLabel:`Aug`,augustLabel:`August`,decShortLabel:`Dec`,decemberLabel:`December`,emptyValueLabel:`-`,febShortLabel:`Feb`,februaryLabel:`February`,friMinLabel:`Fr`,friShortLabel:`Fri`,fridayLabel:`Friday`,janShortLabel:`Jan`,januaryLabel:`January`,julShortLabel:`Jul`,julyLabel:`July`,junShortLabel:`Jun`,juneLabel:`June`,marShortLabel:`Mar`,marchLabel:`March`,mayLabel:`May`,mayShortLabel:`May`,monMinLabel:`Mo`,monShortLabel:`Mon`,mondayLabel:`Monday`,novShortLabel:`Nov`,novemberLabel:`November`,octShortLabel:`Oct`,octoberLabel:`October`,satMinLabel:`Sa`,satShortLabel:`Sat`,saturdayLabel:`Saturday`,sepShortLabel:`Sep`,septemberLabel:`September`,sunMinLabel:`Su`,sunShortLabel:`Sun`,sundayLabel:`Sunday`,thuMinLabel:`Th`,thuShortLabel:`Thu`,thursdayLabel:`Thursday`,tueMinLabel:`Tu`,tueShortLabel:`Tue`,tuesdayLabel:`Tuesday`,wedMinLabel:`We`,wedShortLabel:`Wed`,wednesdayLabel:`Wednesday`},RG=`Asia/Kolkata`,zG=198e5,BG=new Map;function VG(e){let t=BG.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`}),BG.set(e,t)),t}function HG(e){if(typeof e!=`string`||e===``)return!1;try{return VG(e),!0}catch{return!1}}function UG(e,t=RG){if(t===`Asia/Kolkata`){let t=new Date(e+zG);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(VG(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 WG(e,t=RG){if(t===`Asia/Kolkata`)return zG;let n=UG(e,t),r=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 GG(e,t=RG){let n=e-WG(e,t);return n=e-WG(n,t),n}var KG=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],qG=[`rupees`,`paise`],JG=[`ms`,`s`,`min`,`h`],YG=[`day`,`month`,`year`,`datetime`,`time`],XG=()=>AG(`formatters`,LG),ZG=()=>XG().emptyValueLabel,QG=`−`,$G=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],eK={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},tK=(e,t)=>XG()[xG(e[t],`no date name at index ${t}`)],nK=e=>tK($G,e);function rK(e,t){return tK(eK[t],e)}var iK=(e,t)=>xG(e[t],`no compact unit at index ${t}`),aK=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],oK=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],sK=e=>!e||e===`INR`?`en-IN`:`en-US`,cK=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,lK=new Map,uK=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=lK.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),lK.set(n,r)),r},dK=new Map,fK=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=dK.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),dK.set(n,r)),r},pK=e=>typeof e==`number`&&Number.isFinite(e),mK=e=>e<0&&!Object.is(Math.abs(e),0)?QG:``;function hK(e){if(!Number.isInteger(e))throw Error(`A paise amount must be a whole number, got ${e}`);let t=BigInt(Math.abs(e)).toString().padStart(3,`0`);return`${e<0?`-`:``}${t.slice(0,-2)}.${t.slice(-2)}`}var gK=(e,t)=>t===`paise`?Number(hK(e)):e,_K=2,vK=(e,t,n)=>{let r=Math.min(t,_K),i=10n**BigInt(_K-r),a=(BigInt(hK(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=fK(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function yK(e,{decimals:t}={}){if(!pK(e))return ZG();let n=uK(cK(t,2)).format(Math.abs(e));return n===`0`?`0`:mK(e)+n}function bK(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!pK(e))return ZG();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=cK(r,0),o=sK(i),s=n===`paise`?vK(Math.abs(e),a,o):fK(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:mK(e))+vG(i)+s}var xK=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function SK(e,{currency:t,unit:n=`rupees`}={}){if(!pK(e))return ZG();let r=t?gK(e,n):e,i=t?vG(t):``,a=t?sK(t):`en-IN`,o=a===`en-IN`?aK:oK,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=uK(xK(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:mK(r))+i+e;c=o.length-1}let[l,u]=iK(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]=iK(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${mK(r)}${i}${uK(f,a).format(p)} ${u}`}function CK(e,{decimals:t}={}){return pK(e)?`${yK(e*100,{decimals:cK(t,1)})}%`:ZG()}var wK={ms:1,s:1e3,min:6e4,h:36e5};function TK(e,{unit:t=`s`}={}){if(!pK(e))return ZG();let n=wK[t]??1e3,r=Math.abs(e*n),i=mK(e);if(Math.round(r)<1e3)return`${i}${uK(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${uK(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}${uK(0).format(l)}h ${s(c%60)}m`}function EK(e,t=RG){if(e instanceof Date)return e.getTime();if(pK(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?GG(a.getTime(),t):NaN}return Date.parse(e)}function DK(e,t=RG){let{year:n,month:r,day:i,hour:a,minute:o}=UG(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function OK(e,{pattern:t=`day`,timeZone:n=RG}={}){let r=EK(e,n);if(!Number.isFinite(r))return ZG();let i=DK(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${nK(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${nK(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function kK(e,{timeZone:t=RG}={}){let n=EK(e,t);if(!Number.isFinite(n))return ZG();let r=DK(n,t);return`${String(r.day).padStart(2,`0`)}-${nK(r.month)}`}function Z(e,t){if(e==null||e===``)return ZG();let n=t?.style;if(n===`date`)return OK(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return bK(e,{...t,currency:t?.currency??``});case`percent`:return CK(e,t);case`compact`:return SK(e,t);case`duration`:return TK(e,t);default:return yK(e,t)}}function AK(e){let t=e?.style;if(t===`currency`){if(!e?.currency)throw TypeError(`[@webority/ui-elements] a currency format needs a currency, an ISO 4217 code such as "INR".`);return{style:`compact`,currency:e.currency,unit:e.unit}}return!t||t===`number`?{style:`compact`}:e??{}}var jK={aboveLabel:`Above`,areaChartLabel:`Area chart`,arrowKeysText:`{title}: use the arrow keys to read the values`,bandLabel:`Band`,barChartLabel:`Bar chart`,belowLabel:`Below`,bubbleChartLabel:`Bubble chart`,calendarHeatmapLabel:`Calendar heatmap`,calendarRangeText:`, from {first} to {last}`,calendarSummaryTextOne:`Calendar heatmap of {label}, {n} day.`,calendarSummaryTextOther:`Calendar heatmap of {label}, {n} days{range}.`,categoryLabel:`Category`,centerLabel:`Total`,changeLabel:`Change`,chartLabel:`chart`,columnChartLabel:`Column chart`,columnFallbackLabel:`column`,columnXLabel:`X`,constantSpanText:`{label} is {lo}.`,currencyFormatText:`This chart's currency format needs a currency code, such as "INR", in its currency field.`,dataSuffixLabel:`data`,dateLabel:`Date`,donutChartLabel:`Donut chart`,donutLargestText:`{top} is the largest, at {share}.`,donutSummaryTextOne:`Donut chart of {label} in {rows} part, {total} in all.`,donutSummaryTextOther:`Donut chart of {label} in {rows} parts, {total} in all.`,emptyText:`No data to show for this chart.`,errorText:`This chart couldn't load. Try again in a moment.`,everySeriesHiddenText:`Every series is hidden.`,firstStageLabel:`first stage`,fromLabel:`From`,funnelChartLabel:`Funnel chart`,funnelPreviousStepText:`{share} of previous step`,funnelStartText:`{first} is {firstValue} and {last} is {lastValue}, {share} of the start.`,funnelSummaryText:`Funnel chart of {label} in {n} stages.`,gaugeBandText:`, in the {band} band`,gaugeLabel:`Gauge`,gaugeSummaryText:`{type}: {label} is {value} on a scale from {min} to {max}{band}.`,groupLabel:`Group`,groupsTextOne:` in {count} group: {groups}`,groupsTextOther:` in {count} groups: {groups}`,heatmapLabel:`Heatmap`,heatmapSummaryText:`Heatmap of {label} by {group} and {x}, {n} cells.`,highestAtLowestAtText:`Highest is {highValue} at {highGroup}, {high}; lowest is {lowValue} at {lowGroup}, {low}.`,highestLowestText:`Highest is {maxValue} on {max}; lowest is {minValue} on {min}.`,itemLabel:`Item`,largestFallText:`The largest fall is {xText}, {signed}.`,largestFlowText:`The largest flow is {xText} to {toText}, {fmtAt}.`,largestRiseText:`The largest rise is {xText}, {signed}.`,latestText:`Latest {latest}`,legendLabel:`Legend`,lessLabel:`Less`,lineChartLabel:`Line chart`,loadingText:`Loading chart`,measureLabel:`Measure`,moreLabel:`More`,ofFirstStepText:`Of {first}`,ofPreviousStepLabel:`Of previous step`,openingShareText:`{share} of opening`,opensAtClosesAtText:`It opens at {opening} and closes at {closing}.`,otherLabel:`Other`,pointsSummaryTextOne:`{n} point, {first}.`,pointsSummaryTextOther:`{n} points, from {first} to {last}.`,rangeSpanText:`{label} runs from {lo} to {hi}.`,rowFallbackLabel:`row`,rowLabel:`Row`,runningTotalLabel:`Running total`,sankeyLabel:`Sankey diagram`,sankeySummaryText:`Sankey diagram of {label}: {n} flows between {nodes} places.`,scaleLabel:`Scale`,scaleRangeText:`{min} to {max}`,scatterPlotLabel:`Scatter plot`,scatterSummaryText:`{type} of {label} against {xLabel}, {count} points{groups}.`,shareLabel:`Share`,shareOfAllLabel:`Share of all`,shareOfGroupLabel:`Share of group`,shareOfParentText:`Share of {parent}`,shareOfStepText:`{share} of {first}`,sharedAxisText:`, sharing one x axis`,showingFirstRowsDownloadText:`Showing the first {rows} of {total} rows. Download the CSV for all of them.`,smallMultiplesLabel:`Small multiples`,soFarText:`so far`,stackedPercentText:`, stacked to 100%`,stackedText:`, stacked`,stageLabel:`Stage`,stepLabel:`Step`,summaryText:`{type} of {series}{stacked}{sharedAxis}.`,targetGapText:`{direction} {label} by {gap}`,targetLabel:`target`,toLabel:`To`,tooManyGroupsText:`This chart has more groups than it can show clearly.`,tooManySeriesText:`This chart has more series than it can show clearly.`,totalText:`Total {total}`,treemapEmptyText:`Treemap of {label}: no items.`,treemapLabel:`Treemap`,treemapLargestGroupText:`{name} is the largest group, at {share}.`,treemapSummaryText:`Treemap of {label}: {n} items in {totals} groups, {total} in all.`,trendLabel:`Trend`,untitledLabel:`Chart`,waterfallLabel:`Waterfall chart`,waterfallSummaryText:`Waterfall chart of {label}.`},Q=()=>AG(`chart`,jK),MK=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],NK=[`none`,`stacked`,`percent`],PK=[`category`,`time`,`value`],FK=[`auto`,`svg`,`canvas`],IK=[`ready`,`loading`,`empty`,`error`],LK=[`chart`,`table`],RK=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],zK=8,BK=6,VK={line:`lineChartLabel`,area:`areaChartLabel`,column:`columnChartLabel`,bar:`barChartLabel`,donut:`donutChartLabel`,heatmap:`heatmapLabel`,calendar:`calendarHeatmapLabel`,funnel:`funnelChartLabel`,gauge:`gaugeLabel`,waterfall:`waterfallLabel`,treemap:`treemapLabel`,sankey:`sankeyLabel`,scatter:`scatterPlotLabel`,bubble:`bubbleChartLabel`,multiples:`smallMultiplesLabel`},HK=e=>Q()[VK[e]],UK=[`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`],WK=e=>UK.includes(e),GK=[`area`,`column`,`bar`],KK=[`line`,`area`,`column`,`bar`,`multiples`],qK={line:[`category`,`time`],area:[`category`,`time`],column:[`category`,`time`],bar:[`category`,`time`],multiples:[`category`,`time`],calendar:[`time`],scatter:[`value`],bubble:[`value`]},JK={group:[`heatmap`,`treemap`,`scatter`,`bubble`],to:[`sankey`],size:[`bubble`],trend:[`scatter`,`bubble`],zoom:[`line`,`area`],bands:[`gauge`],centerLabel:[`donut`],sliceValues:[`donut`],valueLabels:[`line`,`column`,`bar`],incompleteLast:[`line`,`area`,`column`,`bar`]},YK={gauge:240,calendar:200,treemap:340,sankey:340},XK=100,ZK=72,QK=32,$K=`type.title.description.data.x.series.group.to.size.trend.zoom.bands.stack.y.target.centerLabel.sliceValues.valueLabels.incompleteLast.height.state.emptyText.errorText.loadingText.renderer.timeZone`.split(`.`),eq=[`key`,`kind`,`format`,`label`,`labelFit`],tq=[`auto`,`all`,`rotate`,`ellipsis`],nq=[`key`,`label`,`format`,`colour`],rq=[`key`,`label`],iq=[`key`,`label`,`format`],aq=[`upTo`,`label`],oq=[`label`,`format`,`min`,`max`,`wholeNumbers`],sq=[`value`,`label`],cq=[`style`,`currency`,`unit`,`decimals`,`pattern`],lq=[...qG,...JG],uq=new Set;function dq(e){uq.has(e)||(uq.add(e),yG(`[@webority/ui-elements] <wui-chart> ${e}`))}var fq=e=>e.map(e=>`"${e}"`).join(` | `),pq=e=>typeof e==`number`&&Number.isFinite(e),mq=e=>typeof e==`object`&&!!e&&!Array.isArray(e),hq=(e,t)=>Reflect.get(e,t),gq=e=>e===null||typeof e==`string`||typeof e==`number`,_q=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,gq(t)?t:null]));function vq(e,t){if(e==null)throw Error(`${t} missing`);return e}var yq=(e,t)=>e.some(e=>e===t);function bq(e,t,n){t==null||n.includes(t)||dq(`received ${e}="${String(t)}", which is not one of ${fq(n)}. The chart uses its default instead.`)}function xq(e,t,n){for(let r of Object.keys(t))n.includes(r)||(/^(y2|secondary)/i.test(r)?dq(`ignores ${e}.${r}: a chart has one value axis by design. Show the second measure as its own chart.`):dq(`ignores the unknown key ${e}.${r}. Known keys: ${n.join(`, `)}.`))}function Sq(e,t){if(t==null)return;if(typeof t!=`object`){dq(`expects ${e} to be an object such as { style: "currency" }.`);return}xq(e,t,cq);let n=hq(t,`style`);bq(`${e}.style`,n,KG);let r=hq(t,`currency`);r!=null&&!_G(r)&&dq(`received ${e}.currency="${String(r)}", which is not an ISO 4217 code such as "INR", so the format has no currency.`);let i=hq(t,`unit`);i!=null&&bq(`${e}.unit`,i,n===`duration`?JG:qG);let a=hq(t,`pattern`);bq(`${e}.pattern`,a,YG);let o=hq(t,`decimals`);o!=null&&!(typeof o==`number`&&Number.isInteger(o)&&o>=0&&o<=20)&&dq(`received ${e}.decimals=${String(o)}, which is not a whole number from 0 to 20. The chart uses its default instead.`);let s={style:yq(KG,n)?n:`number`};return typeof r==`string`&&_G(r)&&(s.currency=r),yq(lq,i)&&(s.unit=i),typeof o==`number`&&(s.decimals=o),yq(YG,a)&&(s.pattern=a),s}function Cq(e,t){return t?.style!==`currency`||t.currency?null:`${e} is a currency format with no valid currency: set ${e}.currency to an ISO 4217 code such as "INR".`}function wq(e){let t=(e,t=Q().errorText)=>(bG(`[@webority/ui-elements] <wui-chart> ${e}`),{spec:null,problem:t});if(!mq(e))return t('has no spec: set the `spec` property or add a <script type="application/json"> child.');let n=e;xq(`spec`,n,$K);let r=hq(n,`type`);if(bq(`type`,r,MK),!yq(MK,r))return t(`cannot draw type "${String(r)}".`);let i=r,a=hq(n,`title`);typeof a==`string`&&a.trim()||dq("needs a `title`: it names the chart for screen readers and names exported files.");for(let[e,t]of Object.entries(JK))hq(n,e)!=null&&!t.includes(i)&&dq(`ignores spec.${e} on a ${i} chart: it applies to ${t.join(`, `)}.`);let o=hq(n,`x`),s=mq(o)?o:{};xq(`spec.x`,s,eq);let c=qK[i]??[`category`],l=hq(s,`kind`);bq(`x.kind`,l,PK),yq(PK,l)&&!c.includes(l)&&dq(`ignores x.kind="${l}" on a ${i} chart: it takes ${fq(c)}.`);let u=hq(s,`labelFit`);bq(`x.labelFit`,u,tq);let d=Sq(`x.format`,hq(s,`format`)),f=hq(s,`key`);typeof f!=`string`&&i!==`gauge`&&dq("needs `x.key`, the column holding each row's x value or slice name.");let p=typeof f==`string`?f:``,m=hq(n,`y`),h=mq(m)?m:{};xq(`spec.y`,h,oq);let g=Sq(`y.format`,hq(h,`format`)),_=Cq(`x.format`,d);if(_)return t(_,Q().currencyFormatText);let v=Cq(`y.format`,g);if(v)return t(v,Q().currencyFormatText);let y=hq(n,`series`),b=Array.isArray(y)?y.filter(mq):[],x=[];for(let[e,n]of b.entries()){xq(`spec.series[${e}]`,n,nq);let r=Sq(`series[${e}].format`,hq(n,`format`)),i=Cq(`series[${e}].format`,r);if(i)return t(i,Q().currencyFormatText);let a=hq(n,`key`);typeof a!=`string`&&dq(`needs series[${e}].key, the column holding that series' values.`);let o=hq(n,`label`),s=hq(n,`colour`);bq(`series[${e}].colour`,s,RK),x.push({key:String(a),named:typeof a==`string`,label:typeof o==`string`&&o?o:String(a),format:r,colour:yq(RK,s)?s:void 0})}let S=x[0];if(!S)return t(`has no series to draw.`);let C=x.filter(e=>e.named).map(e=>e.key),w=C.find((e,t)=>C.indexOf(e)!==t);if(w!==void 0)return t(`has two series with the key "${w}": each series needs its own key.`);if(x.length>8)return t(`refuses ${x.length} series: 8 is the most that stay distinguishable. Fold the smallest into an Other series, or split the chart.`,Q().tooManySeriesText);let T=WK(i);if(T&&x.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.`;dq(`draws one series as a ${i}; it got ${x.length} and shows the first. ${e}`)}let E=(e,t,n,r)=>{if(t==null)return null;if(!mq(t))return dq(`expects ${e} to be an object such as { key: "column" }.`),null;xq(e,t,n);let i=hq(t,`key`);if(typeof i!=`string`)return dq(`needs ${e}.key, the column holding ${r}.`),null;let a=Sq(`${e}.format`,hq(t,`format`)),o=hq(t,`label`);return{key:i,label:typeof o==`string`?o:``,format:a}},D=JK.group.includes(i)?E(`spec.group`,hq(n,`group`),rq,`each row's group`):null,O=i===`sankey`?E(`spec.to`,hq(n,`to`),rq,`where each flow ends`):null,k=i===`bubble`?E(`spec.size`,hq(n,`size`),iq,`each bubble's size`):null,A=Cq(`group.format`,D?.format)??Cq(`to.format`,O?.format)??Cq(`size.format`,k?.format);if(A)return t(A,Q().currencyFormatText);if((i===`heatmap`||i===`treemap`)&&!D)return t(`needs \`group.key\` to draw a ${i}: the column holding each ${i===`heatmap`?`row`:`parent`}.`);if(i===`sankey`&&!O)return t("needs `to.key` to draw a sankey: the column holding where each flow ends.");if(i===`bubble`&&!k)return t("needs `size.key` to draw a bubble chart: the column holding each bubble's size.");let j=GK.includes(i)?NK:[`none`],M=hq(n,`stack`);bq(`stack`,M,j);let N=hq(n,`state`);bq(`state`,N,IK);let ee=hq(n,`renderer`);bq(`renderer`,ee,FK);let P=hq(n,`timeZone`);P!=null&&!HG(P)&&dq(`received timeZone="${String(P)}", which is not a time zone this browser knows. The chart uses Asia/Kolkata instead.`);let te=HG(P)?P:RG,F=hq(n,`target`),I=mq(F)?hq(F,`value`):void 0;F!=null&&(mq(F)&&xq(`spec.target`,F,sq),mq(F)&&pq(I)||dq("ignores a `target` without a numeric `value`."));let ne=hq(n,`trend`);ne!=null&&typeof ne!=`boolean`&&dq("expects `trend` to be true or false.");let L=hq(n,`zoom`);L!=null&&typeof L!=`boolean`&&dq("expects `zoom` to be true or false.");let re=[],R=hq(n,`bands`);if(i===`gauge`&&R!=null){let e=Array.isArray(R)?R.filter(mq):[];for(let t of e)xq(`spec.bands[]`,t,aq);re=e.map(e=>({upTo:hq(e,`upTo`),label:hq(e,`label`)})).filter(e=>pq(e.upTo)&&typeof e.label==`string`&&e.label!==``).sort((e,t)=>e.upTo-t.upTo),Array.isArray(R)&&re.length===e.length||dq("ignores a gauge band without a numeric `upTo` and a `label`.")}let ie=g??S.format,z=(T?x.slice(0,1):x).map(e=>({key:e.key,label:e.label,format:e.format??ie,colour:e.colour})),B=yq(c,l)?l:c[0],V=hq(n,`data`),H=Array.isArray(V)?V:[],U=H.filter(mq).map(_q),ae=-1,oe=null,W=S.key;i===`donut`&&U.length>6&&(oe=U,{data:U,otherIndex:ae}=Dq(U,p,W),dq(`draws at most 6 donut slices; the smallest ${H.length-5} are shown as "${Q().otherLabel}". Send fewer rows, or use a bar chart for many parts.`));let se=(e,t)=>{let n=U.filter(e);n.length!==U.length&&dq(`leaves out ${U.length-n.length} row(s) ${t}.`),U=n},ce=e=>e!=null&&e!==``,le=e=>pq(e)&&e>0;if(B===`time`&&KK.includes(i)&&se(e=>Number.isFinite(EK(e[p],te)),`without a readable date`),i===`gauge`&&U.length>1)dq(`draws one value as a gauge; it got ${U.length} rows and shows the first.`),U=U.slice(0,1);else if(i===`scatter`||i===`bubble`){se(e=>pq(e[p])&&pq(e[W])&&(i!==`bubble`||k!=null&&le(e[k.key])),`without a number for x and y (and a positive size)`);let e=new Set(D?U.map(e=>String(e[D.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.`,Q().tooManyGroupsText)}else if(i===`calendar`)se(e=>Number.isFinite(EK(e[p],te)),`without a readable date`);else if(i===`heatmap`&&D)se(e=>ce(e[p])&&ce(e[D.key]),`without a column or a row`);else if(i===`treemap`&&D){se(e=>ce(e[p])&&ce(e[D.key])&&le(e[W]),`without a name, a parent and a positive size`);let e=new Set(U.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.`,Q().tooManyGroupsText)}else if(i===`sankey`&&O){se(e=>ce(e[p])&&ce(e[O.key])&&le(e[W]),`without a start, an end and a positive size`);let e=Tq(U,p,O.key);if(e)return t(e.reason,e.text)}else if(i===`waterfall`){let e=Eq(U,W);if(e?.refuse)return t(e.refuse);e?.warn&&dq(e.warn)}let ue=hq(n,`height`),de=pq(ue)&&ue>0?ue:null;if(i===`multiples`){let e=ZK*z.length+QK;de!=null&&de<e&&(dq(`needs at least ${e}px of height for ${z.length} small charts; it got ${de}px and draws at ${e}px.`),de=e),de??=XK*z.length+40}de??=YK[i]??320;let fe=yq(j,M)?M:`none`,pe=JK.valueLabels.includes(i)&&(hq(n,`valueLabels`)??i===`line`)===!0;pe&&fe!==`none`&&dq(`ignores valueLabels on a stacked chart.`);let G=pe&&fe===`none`,me=hq(n,`incompleteLast`);me!=null&&typeof me!=`boolean`&&dq(`expects incompleteLast to be true or false.`);let he=JK.incompleteLast.includes(i)&&me===!0,ge=i===`line`||i===`area`;he&&ge&&fe!==`none`&&dq(`ignores incompleteLast on a stacked line or area.`);let _e=he&&!(ge&&fe!==`none`),ve=JK.sliceValues.includes(i)&&(hq(n,`sliceValues`)??!0)===!0,ye=hq(n,`description`),be=hq(s,`label`),xe=hq(h,`label`),Se=hq(h,`min`),Ce=hq(h,`max`),we=hq(n,`centerLabel`),Te=(e,t)=>typeof e==`string`&&e?e:t;return{problem:null,spec:{type:i,title:typeof a==`string`?a.trim():``,description:typeof ye==`string`?ye:``,data:U,allData:oe??U,x:{key:p,kind:B,format:d??(B===`time`?{style:`date`}:B===`value`?{style:`number`}:void 0),label:typeof be==`string`?be:``,labelFit:yq(tq,u)?u:`auto`},series:z,group:D,to:O,size:k,trend:JK.trend.includes(i)&&ne===!0,zoom:JK.zoom.includes(i)?(L??U.length>5e3)===!0:!1,bands:re,stack:fe,y:{label:typeof xe==`string`?xe:``,format:ie,min:pq(Se)?Se:void 0,max:pq(Ce)?Ce:void 0,wholeNumbers:hq(h,`wholeNumbers`)===!0},target:mq(F)&&pq(I)?{value:I,label:String(hq(F,`label`)??``)}:null,centerLabel:i===`donut`&&typeof we==`string`&&we.trim()?we.trim():``,sliceValues:ve,valueLabels:G,incompleteLast:_e,height:de,state:yq(IK,N)?N:`ready`,emptyText:Te(hq(n,`emptyText`),Q().emptyText),errorText:Te(hq(n,`errorText`),Q().errorText),loadingText:Te(hq(n,`loadingText`),Q().loadingText),renderer:yq(FK,ee)?ee:`auto`,timeZone:te,otherIndex:ae}}}function Tq(e,t,n){let r=e.map(e=>[String(e[t]),String(e[n])]),i=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:Q().tooManyGroupsText};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:Q().errorText}:null}function Eq(e,t){let n=e.map(e=>pq(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 Dq(e,t,n){let r=new Set(e.map((e,t)=>({i:t,v:pq(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)||!pq(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=Q().otherLabel;for(let e=2;o.has(s);e+=1)s=`${Q().otherLabel} (${e})`;return a.push({[t]:s,[n]:i}),{data:a,otherIndex:a.length-1}}function Oq(e){return vq(e.series[0],`series`)}function kq(e,t){return vq(e.data[t],`row ${t}`)}function $(e,t,n){let r=e.data[n]?.[t];return pq(r)?r:null}function Aq(e){return e.type===`gauge`||e.series.some(t=>e.data.some((n,r)=>$(e,t.key,r)!=null))}function jq(e,t){let n=e.data[t]?.[e.x.key];return n==null||n===``?ZG():e.x.format?Z(n,{...e.x.format,timeZone:e.timeZone}):String(n)}function Mq(e,t){return EK(e.data[t]?.[e.x.key],e.timeZone)}function Nq(e,t){let n=e.group?e.data[t]?.[e.group.key]:null;return n==null||n===``?ZG():String(n)}function Pq(e,t){let n=e.to?e.data[t]?.[e.to.key]:null;return n==null||n===``?ZG():String(n)}var Fq=e=>[...new Set(e)];function Iq(e){return e.group?Fq(e.data.map((t,n)=>Nq(e,n))):[]}function Lq(e){return WK(e.type)?e.data.length:e.data.length*e.series.length}function Rq(e){return e.renderer===`auto`?Lq(e)>5e3?`canvas`:`svg`:e.renderer}function zq(e){switch(e.type){case`donut`:return e.data.map((t,n)=>jq(e,n));case`scatter`:case`bubble`:return Iq(e);case`line`:case`area`:case`column`:case`bar`:return e.series.map(e=>e.key);default:return[]}}function Bq(e){return[`line`,`area`,`column`,`bar`].includes(e.type)?e.series.map(e=>e.label):zq(e)}function Vq(e,t,n){return e.type===`donut`?n.has(jq(e,t)):(e.type===`scatter`||e.type===`bubble`)&&e.group?n.has(Nq(e,t)):!1}function Hq(e,t){return e.data.map((n,r)=>{let i=e.series.filter(e=>!t.has(e.key)).reduce((t,n)=>t+Math.abs($(e,n.key,r)??0),0);return Object.fromEntries(e.series.map(t=>{let n=$(e,t.key,r);return[t.key,i&&n!=null?n/i:null]}))})}function Uq(e,t=RG){return`${rK(new Date(e+WG(e,t)).getUTCDay(),`short`)}, ${OK(e,{timeZone:t})}`}var Wq=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.min(e,t),1/0),Gq=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.max(e,t),-1/0),Kq=(e,t)=>e.data.map((n,r)=>$(e,t,r)).filter(e=>e!=null),qq=(e,t)=>t?Z((e??0)/t,{style:`percent`}):ZG();function Jq(e,t){let n=e.filter(pq);if(!n.length)return[];let r=Wq(n),i=Gq(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 Yq(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 Xq(e,t){return Array.from({length:e},(n,r)=>t[e===1?6:Math.round(6-r*4/(e-1))])}function Zq(e,t){return e.bands.find(e=>t<=e.upTo)??e.bands[e.bands.length-1]??null}var Qq=(e,t)=>t==null?ZG():vq(Zq(e,t),`gauge band`).label;function $q(e){return{min:e.y.min??0,max:e.y.max??100}}function eJ(e){let t=Oq(e).key,n=e.data.length-1,r=0;return e.data.map((i,a)=>{let o=$(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 tJ(e,t){let n=Oq(e).key,r=vq(e.to,`to column`).key,i=e.data.map((t,i)=>({from:String(t[e.x.key]),to:String(t[r]),value:$(e,n,i)??0})),a=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=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=vq((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 nJ(e){let t=Oq(e).key,n=new Map(Iq(e).map(e=>[e,0]));return e.data.forEach((r,i)=>{n.set(Nq(e,i),(n.get(Nq(e,i))??0)+($(e,t,i)??0))}),n}function rJ(e,t,n){let{palette:r,neutral:i,seq:a,rise:o,fall:s}=n,c=Oq(e).key;switch(e.type){case`donut`:return sJ(e,t,n);case`funnel`:return Xq(e.data.length,vq(a,`sequential colours`))[t];case`heatmap`:case`calendar`:return Yq(Jq(Kq(e,c),vq(a,`sequential colours`)),$(e,c,t));case`gauge`:return r[0];case`waterfall`:{let n=vq(eJ(e)[t],`waterfall bar ${t}`);return n.total?r[0]:n.value>=0?o:s}case`treemap`:return r[[...nJ(e).keys()].indexOf(Nq(e,t))%r.length];case`sankey`:return tJ(e,r).get(String(kq(e,t)[e.x.key]));case`scatter`:case`bubble`:return r[Math.max(0,Iq(e).indexOf(Nq(e,t)))];default:return r[cJ(Oq(e),0)]??i}}function iJ(e,t,n,r){let i=aJ(e,t,n,r);return!e.incompleteLast||t!==e.data.length-1?i:{...i,title:`${i.title}, ${Q().soFarText}`}}function aJ(e,t,n,r){let i=Oq(e),a=$(e,i.key,t),o=()=>rJ(e,t,r);switch(e.type){case`donut`:{let r=e.data.reduce((t,r,a)=>t+(n.has(jq(e,a))?0:$(e,i.key,a)??0),0);return{title:jq(e,t),rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:Q().shareLabel,value:r&&a!=null?Z(a/r,{style:`percent`}):ZG()}],foot:``}}case`heatmap`:return{title:`${Nq(e,t)}, ${jq(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)}],foot:``};case`calendar`:return{title:Uq(Mq(e,t),e.timeZone),rows:[{color:o(),label:i.label,value:Z(a,i.format)}],foot:``};case`funnel`:{let n=$(e,i.key,0),r=t?$(e,i.key,t-1):null,s=[{color:o(),label:i.label,value:Z(a,i.format)}];return t&&s.push({label:Q().ofPreviousStepLabel,value:qq(a,r)}),s.push({label:MG(Q().ofFirstStepText,{first:jq(e,0)}),value:qq(a,n)}),{title:jq(e,t),rows:s,foot:``}}case`gauge`:{let{min:n,max:r}=$q(e),s=a==null?null:Zq(e,a),c=[{color:o(),label:i.label,value:Z(a,i.format)}];return c.push({label:Q().scaleLabel,value:MG(Q().scaleRangeText,{min:Z(n,i.format),max:Z(r,i.format)})}),s&&c.push({label:Q().bandLabel,value:s.label}),{title:e.data[t]?.[e.x.key]==null?i.label:jq(e,t),rows:c,foot:``}}case`waterfall`:{let n=eJ(e),r=vq(n[t],`waterfall bar ${t}`),a=vq(n[0],`waterfall opening bar`).value,s=r.total?[{color:o(),label:i.label,value:Z(r.value,i.format)}]:[{color:o(),label:Q().changeLabel,value:oJ(r.value,i.format)},{label:Q().runningTotalLabel,value:Z(r.level,i.format)}],c=!r.total&&a?MG(Q().openingShareText,{share:oJ(r.value/a*100,{style:`number`,decimals:2},`%`)}):``;return{title:jq(e,t),rows:s,foot:c}}case`treemap`:{let n=Nq(e,t),r=nJ(e).get(n);return{title:`${n} / ${jq(e,t)}`,rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:MG(Q().shareOfParentText,{parent:n}),value:qq(a,r)}],foot:``}}case`sankey`:{let n=String(kq(e,t)[e.x.key]),r=e.data.reduce((t,r,a)=>String(r[e.x.key])===n?t+($(e,i.key,a)??0):t,0);return{title:MG(Q().scaleRangeText,{min:n,max:Pq(e,t)}),rows:[{color:o(),label:i.label,value:Z(a,i.format)},{label:MG(Q().shareOfParentText,{parent:n}),value:qq(a,r)}],foot:``}}case`scatter`:case`bubble`:{let n=[{color:o(),label:e.x.label||String(e.x.key),value:jq(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(kq(e,t)[e.size.key],e.size.format)}),{title:e.group?Nq(e,t):i.label,rows:n,foot:``}}}let s=e.stack===`percent`?Hq(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=$(e,n.key,t),o=Z(a,n.format);return{color:e.type===`multiples`?r.palette[0]:r.palette[cJ(n,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){let n=c.reduce((n,{s:r})=>n+($(e,r.key,t)??0),0);u=MG(Q().totalText,{total:Z(n,d.s.format)})}if(e.target&&d&&c.length===1){let n=$(e,d.s.key,t);if(n!=null){let t=n-e.target.value,r=e.target.label||Q().targetLabel;u=MG(Q().targetGapText,{direction:t>=0?Q().aboveLabel:Q().belowLabel,label:r,gap:Z(Math.abs(t),d.s.format)})}}return{title:jq(e,t),rows:l,foot:u}}function oJ(e,t,n=``){let r=`${Z(Math.abs(e),t)}${n}`;return e>0?`+${r}`:e<0?`−${r}`:r}function sJ(e,t,n){return t===e.otherIndex?n.neutral:n.palette[t%n.palette.length]}function cJ(e,t){return e.colour?Number(e.colour.slice(6))-1:t}function lJ(e){let t=SG(`div`,{class:`wui-chart-tooltip-body`});e.title&&t.append(SG(`div`,{class:`wui-chart-tooltip-title`},e.title));for(let n of e.rows){let e=SG(`div`,{class:`wui-chart-tooltip-row`});if(n.color){let t=document.createElement(`span`);t.className=n.line?`wui-chart-tooltip-swatch wui-chart-tooltip-swatch-line`:`wui-chart-tooltip-swatch`,t.style.background=n.color,e.append(t)}let r=document.createElement(`span`);r.className=`wui-chart-tooltip-label`,r.textContent=n.label;let i=document.createElement(`span`);i.className=`wui-chart-tooltip-value`,i.textContent=n.value,e.append(r,i),t.append(e)}return e.foot&&t.append(SG(`div`,{class:`wui-chart-tooltip-foot`},e.foot)),t}function uJ(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 dJ(e){return e.x.label?e.x.label:{gauge:Q().measureLabel,funnel:Q().stageLabel,waterfall:Q().stepLabel,sankey:Q().fromLabel,scatter:Q().columnXLabel,bubble:Q().columnXLabel}[e.type]??(e.x.kind===`time`?Q().dateLabel:Q().categoryLabel)}function fJ(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=Oq(t),r=(e,r=n)=>Z($(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=Fq(a.map(e=>jq(t,e))),n=Iq(t),o=new Map(a.map(e=>[`${Nq(t,e)}\u0000${jq(t,e)}`,r(e)]));return i([vq(t.group,`group column`).label||Q().rowLabel,...e],n.map(t=>({head:t,cells:e.map(e=>o.get(`${t}\u0000${e}`)??ZG())})))}case`funnel`:{let e=$(t,n.key,0);return i([dJ(t),n.label,Q().ofPreviousStepLabel,MG(Q().ofFirstStepText,{first:jq(t,0)})],a.map(i=>({head:jq(t,i),cells:[r(i),i?qq($(t,n.key,i),$(t,n.key,i-1)):ZG(),qq($(t,n.key,i),e)]})))}case`gauge`:return i([dJ(t),n.label,...t.bands.length?[Q().bandLabel]:[]],a.map(e=>({head:kq(t,e)[t.x.key]==null?n.label:jq(t,e),cells:[r(e),...t.bands.length?[Qq(t,$(t,n.key,e))]:[]]})));case`waterfall`:return i([dJ(t),Q().changeLabel,Q().runningTotalLabel],eJ(t).map(e=>({head:jq(t,e.index),cells:[e.total?ZG():oJ(e.value,n.format),Z(e.level,n.format)]})));case`treemap`:{let e=nJ(t);return i([vq(t.group,`group column`).label||Q().groupLabel,t.x.label||Q().itemLabel,n.label,Q().shareOfGroupLabel],a.map(i=>({head:Nq(t,i),cells:[jq(t,i),r(i),qq($(t,n.key,i),e.get(Nq(t,i)))]})))}case`sankey`:return i([dJ(t),vq(t.to,`to column`).label||Q().toLabel,n.label],a.map(e=>({head:jq(t,e),cells:[Pq(t,e),r(e)]})));case`scatter`:case`bubble`:return i([dJ(t),n.label,...t.size?[t.size.label||t.size.key]:[],...t.group?[t.group.label||Q().groupLabel]:[]],a.map(e=>({head:jq(t,e),cells:[r(e),...t.size?[Z(kq(t,e)[t.size.key],t.size.format)]:[],...t.group?[Nq(t,e)]:[]]})))}let o=t.type===`donut`,s=o?t.data.reduce((e,r,i)=>e+($(t,n.key,i)??0),0):0,c=[dJ(t),...t.series.map(e=>e.label)];return o&&c.push(Q().shareLabel),i(c,a.slice(0,500).map(e=>{let i=t.series.map(t=>r(e,t));if(o){let r=$(t,n.key,e);i.push(s&&r!=null?Z(r/s,{style:`percent`}):ZG())}return{head:jq(t,e),cells:i}}),t.data.length)}function pJ(e){switch(e?.style){case`currency`:case`compact`:return e.currency?` (${e.currency})`:``;case`percent`:return` (%)`;case`duration`:return` (${e.unit??`s`})`;default:return``}}function mJ(e,t){return e==null?e:t?.unit===`paise`?Number(hK(e)):t?.style===`percent`?Number((e*100).toPrecision(12)):e}function hJ(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`?OK(n,{pattern:t.x.format?.pattern??`day`,timeZone:t.timeZone}):n}},i=t.series.map(e=>({head:`${e.label}${pJ(e.format)}`,value:t=>{let n=t[e.key];return mJ(pq(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,vq(o,`group column`),...i];break;case`treemap`:s=[vq(o,`group column`),r,...i];break;case`sankey`:{let e=vq(t.to,`to column`);s=[r,{head:e.label||e.key,value:t=>t[e.key]},...i];break}case`bubble`:{let e=vq(t.size,`size column`);s=[r,...i,{head:`${e.label||e.key}${pJ(e.format)}`,value:t=>{let n=t[e.key];return mJ(pq(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 gJ(e){return(e?.title??``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)||`chart`}var _J=(e,t,n)=>{if(!t.length)return null;let r=Wq(t),i=Gq(t);return r===i?MG(Q().constantSpanText,{label:e,lo:Z(r,n)}):MG(Q().rangeSpanText,{label:e,lo:Z(r,n),hi:Z(i,n)})};function vJ(e,t=new Set){let n=[];e.description&&n.push(e.description.replace(/\.?\s*$/,`.`));let r=zq(e);if(r.length&&r.every(e=>t.has(e)))return n.push(Q().everySeriesHiddenText),n.join(` `);let i=e.data.length,a=e.data.map((e,t)=>t).filter(n=>!Vq(e,n,t)),o=Oq(e),s=Kq(e,o.key),c=s.reduce((e,t)=>e+t,0),l=()=>e.data.reduce((t,n,r)=>($(e,o.key,r)??-1/0)>($(e,o.key,t)??-1/0)?r:t,0),u=()=>e.data.reduce((t,n,r)=>($(e,o.key,r)??1/0)<($(e,o.key,t)??1/0)?r:t,0);switch(e.type){case`donut`:{let t=a.reduce((t,n)=>t+($(e,o.key,n)??0),0);if(n.push(NG(Q(),`donutSummaryText`,a.length,{rows:a.length,label:o.label,total:Z(t,o.format)})),a.length&&t){let r=a.reduce((t,n)=>($(e,o.key,n)??-1/0)>($(e,o.key,t)??-1/0)?n:t,vq(a[0],`first slice`));n.push(MG(Q().donutLargestText,{top:jq(e,r),share:Z(($(e,o.key,r)??0)/t,{style:`percent`})}))}return n.join(` `)}case`heatmap`:if(n.push(MG(Q().heatmapSummaryText,{label:o.label,group:vq(e.group,`group column`).label||Q().rowFallbackLabel,x:e.x.label||Q().columnFallbackLabel,n:i})),s.length){let t=l(),r=u();n.push(MG(Q().highestAtLowestAtText,{highValue:yJ(e,t),highGroup:Nq(e,t),high:jq(e,t),lowValue:yJ(e,r),lowGroup:Nq(e,r),low:jq(e,r)}))}return n.join(` `);case`calendar`:return n.push(i===1?MG(Q().calendarSummaryTextOne,{label:o.label,n:i}):MG(Q().calendarSummaryTextOther,{label:o.label,n:i,range:i>1?MG(Q().calendarRangeText,{first:jq(e,0),last:jq(e,i-1)}):``})),s.length&&n.push(MG(Q().highestLowestText,{maxValue:yJ(e,l()),max:jq(e,l()),minValue:yJ(e,u()),min:jq(e,u())})),n.join(` `);case`funnel`:return n.push(MG(Q().funnelSummaryText,{label:o.label,n:i})),i>1&&n.push(MG(Q().funnelStartText,{first:jq(e,0),firstValue:yJ(e,0),last:jq(e,i-1),lastValue:yJ(e,i-1),share:qq($(e,o.key,i-1),$(e,o.key,0))})),n.join(` `);case`gauge`:{let t=$(e,o.key,0),{min:r,max:i}=$q(e),a=t==null?null:Zq(e,t);return n.push(MG(Q().gaugeSummaryText,{type:HK(`gauge`),label:o.label,value:Z(t,o.format),min:Z(r,o.format),max:Z(i,o.format),band:a?MG(Q().gaugeBandText,{band:a.label}):``})),n.join(` `)}case`waterfall`:{let t=eJ(e);if(n.push(MG(Q().waterfallSummaryText,{label:o.label})),i>1){let r=t.filter(e=>!e.total);n.push(MG(Q().opensAtClosesAtText,{opening:Z(vq(t[0],`waterfall opening bar`).value,o.format),closing:Z(vq(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(MG(Q().largestRiseText,{xText:jq(e,a.index),signed:oJ(a.value,o.format)})),s&&n.push(MG(Q().largestFallText,{xText:jq(e,s.index),signed:oJ(s.value,o.format)}))}return n.join(` `)}case`treemap`:{let t=nJ(e);if(!t.size)return MG(Q().treemapEmptyText,{label:o.label});let[r,a]=[...t].reduce((e,t)=>t[1]>e[1]?t:e);return n.push(MG(Q().treemapSummaryText,{label:o.label,n:i,totals:t.size,total:Z(c,o.format)})),n.push(MG(Q().treemapLargestGroupText,{name:r,share:qq(a,c)})),n.join(` `)}case`sankey`:{let t=vq(e.to,`to column`).key,r=Fq(e.data.flatMap(n=>[String(n[e.x.key]),String(n[t])])),a=l();return n.push(MG(Q().sankeySummaryText,{label:o.label,n:i,nodes:r.length})),n.push(MG(Q().largestFlowText,{xText:jq(e,a),toText:Pq(e,a),fmtAt:yJ(e,a)})),n.join(` `)}case`scatter`:case`bubble`:{let r=Iq(e).filter(e=>!t.has(e));n.push(MG(Q().scatterSummaryText,{type:HK(e.type),label:o.label,xLabel:e.x.label||e.x.key,count:a.length,groups:r.length?NG(Q(),`groupsText`,r.length,{groups:r.join(`, `)}):``}));let i=a.map(t=>kq(e,t)[e.x.key]).filter(pq),s=a.map(t=>$(e,o.key,t)).filter(e=>e!=null);for(let t of[_J(e.x.label||String(e.x.key),i,e.x.format),_J(o.label,s,o.format)])t&&n.push(t);return n.join(` `)}}let d=e.stack===`percent`?Q().stackedPercentText:e.stack===`stacked`?Q().stackedText:``,f=e.series.filter(e=>!t.has(e.key));n.push(MG(Q().summaryText,{type:HK(e.type),series:f.map(e=>e.label).join(`, `),stacked:d,sharedAxis:e.type===`multiples`?Q().sharedAxisText:``})),i&&n.push(i===1?MG(Q().pointsSummaryTextOne,{n:i,first:jq(e,0)}):MG(Q().pointsSummaryTextOther,{n:i,first:jq(e,0),last:jq(e,i-1)}));for(let t of f){let r=_J(t.label,Kq(e,t.key),t.format);r&&n.push(r)}return n.join(` `)}var yJ=(e,t)=>{let n=Oq(e);return Z($(e,n.key,t),n.format)};function bJ(e){return e.stack===`percent`?{style:`percent`,decimals:0}:AK(e.y.format)}var xJ=864e5,SJ={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},CJ=e=>SJ[e]??0,wJ=[`donut`,`funnel`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`];function TJ(e,t){let n=e.data.map((e,t)=>t).filter(n=>!Vq(e,n,t));if(e.type!==`scatter`&&e.type!==`bubble`)return n;let r=t=>$(e,e.x.key,t)??0;return n.sort((e,t)=>r(e)-r(t)||e-t)}function EJ(e){let t=Fq(e.data.map((t,n)=>jq(e,n))),n=Iq(e),r=new Map(e.data.map((r,i)=>[`${t.indexOf(jq(e,i))},${n.indexOf(Nq(e,i))}`,i]));return{columns:t.length,rows:n.length,at:r,position:r=>[t.indexOf(jq(e,r)),n.indexOf(Nq(e,r))]}}function DJ(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 SJ||n===`Home`||n===`End`?{index:0,series:0}:t;if(e.type===`heatmap`||e.type===`calendar`)return OJ(e,t,n);let a=wJ.includes(e.type),o=e.series.map((e,t)=>r.has(e.key)?-1:t).filter(e=>e>=0),s=a?TJ(e,r):[];if(a?!s.length:!o.length)return t;let c=t??{index:a?vq(s[0],`first mark`):0,series:a?0:vq(o[0],`first visible series`)};if(t==null&&n in SJ)return c;if(a){let e=Math.max(0,s.indexOf(c.index));return n===`Home`?{index:vq(s[0],`first mark`),series:0}:n===`End`?{index:vq(s[s.length-1],`last mark`),series:0}:n in SJ?{index:vq(s[(e+CJ(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 SJ))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+CJ(n)))};let l=Math.max(0,o.indexOf(c.series)),u=e.type===`bar`?CJ(n):-CJ(n);return{...c,series:vq(o[Math.min(o.length-1,Math.max(0,l+u))],`series`)}}function OJ(e,t,n){let r=e.data.length,i=e.type===`calendar`,a=i?e.data.map((e,t)=>t).sort((t,n)=>Mq(e,t)-Mq(e,n)):[],o=i?null:EJ(e),s=t??{index:i?vq(a[0],`first day`):0,series:0};if(t==null&&n in SJ)return s;if(n===`Home`)return{index:i?vq(a[0],`first day`):0,series:0};if(n===`End`)return{index:i?vq(a[r-1],`last day`):r-1,series:0};if(!(n in SJ))return t;if(i){let t=n===`ArrowDown`||n===`ArrowUp`?CJ(n):CJ(n)*7,r=t=>{let n=Mq(e,t);return Math.floor((n+WG(n,e.timeZone))/xJ)},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`?[CJ(n),0]:[0,CJ(n)];return{index:o.at.get(`${c+u},${l+d}`)??s.index,series:0}}var kJ=()=>AG(`chart`,jK);zj([px,rT,$T,OL,zI,OI,QF,xL,$M,JR,vB,TV,$B,yz,tz,kH,nH,EB,pU,BH,GW,hG]);function AJ(e){let t=e.series[0];if(!t)throw Error(`chart spec has no series`);return t}var jJ=e=>typeof e==`number`;function MJ(e,t){let n=e.data[t];if(!n)throw Error(`chart row ${t} missing`);return n}function NJ(e){if(!e.to)throw Error("chart spec has no `to` column");return e.to.key}function PJ(e){if(!e.size)throw Error("chart spec has no `size` column");return e.size.key}function FJ(e,t,n){let r=e[t];if(!r)throw Error(`percent shares for row ${t} missing`);return r[n]??null}function IJ(e,t,n){let r=e?.[t];if(!r)throw Error(`bar radii for row ${t} missing`);return r[n]}var LJ=e=>jJ(e)?e:null;function RJ(e){return typeof e==`object`&&e&&`row`in e?LJ(e.row):null}function zJ(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 jJ(n)&&Number.isFinite(n)&&jJ(r)&&Number.isFinite(r)?{start:n,end:r}:null}function BJ(e){if(!e)throw Error(`chart has not been drawn`);return e}var VJ=[`series`,`graphic`,`grid`,`xAxis`,`yAxis`,`title`,`visualMap`,`calendar`,`dataZoom`],HJ=e=>String(e).replace(/[{}]/g,e=>e===`{`?`{`:`}`);function UJ(e){return e.wholeNumbers===!0||e.format?.style===`currency`&&e.format.unit===`paise`}function WJ(e,t,n,r,i=!1){let a=AK(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 GJ=(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)]},KJ=24,qJ=4,JJ=.6,YJ=(e,t)=>String(e).length*t*JJ,XJ=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`chart palette has no colour at slot ${t}`);return n};function ZJ(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 QJ(e,t){let n=ZJ(e);return n?`rgba(${n.join(`,`)},${t})`:String(e??``).trim()}function $J(e,t,n){let r=ZJ(e),i=ZJ(t);return r&&i?`rgb(${r.map((e,t)=>Math.round(e+((i[t]??0)-e)*n)).join(`,`)})`:e}var eY=[.2126,.7152,.0722],tY=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*(eY[n]??0),0),nY=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05);function rY(e,t){let n=ZJ(e),r=ZJ(t.text),i=ZJ(t.surface);return!n||!r||!i||nY(tY(n),tY(r))>=nY(tY(n),tY(i))?t.text:t.surface}var iY=(e,t)=>({type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:QJ(e,t)},{offset:1,color:QJ(e,0)}]}),aY=(e,t)=>e+WG(e,t);function oY(e){let t=e.x.format?.pattern;return n=>{let r=GG(n,e.timeZone);if(t===`month`||t===`year`)return OK(r,{pattern:t,timeZone:e.timeZone});let i=UG(r,e.timeZone);return i.hour||i.minute?OK(r,{pattern:`time`,timeZone:e.timeZone}):kK(r,{timeZone:e.timeZone})}}function sY(e,t,n){let r=qJ,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(($(e,t.key,r)??0)<0);return a}let o=null,s=null;for(let n of e.series){let i=$(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 cY(e,t,n,r){let i=n.width<576,a=r.animation!==!1&&!t.reducedMotion&&Lq(e)<=5e3,o=zq(e),s=Object.fromEntries(o.map(e=>[e,!r.hidden.has(e)])),c={palette:t.palette,neutral:t.neutral,rise:t.rise,fall:t.fall,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=tX[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`?Hq(e,r.hidden):null,g=p||e.type===`column`?sY(e,r.hidden,p):null,_=e.series.length===1,v=r.renderer===`canvas`,[y,b]=GJ(e.series.flatMap(t=>e.data.map((n,r)=>$(e,t.key,r))),!0),x=e.stack===`percent`?bJ(e):WJ(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)=>jq(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=>YJ(Z(e,x),12)))-20},D=!1;if(e.valueLabels){let t=e.data.length>NY?E():MY(T.length,E()),r=p?n.width-SY(T.map(e=>YJ(e,12)))-20:e.type===`line`?t:MY(T.length,E())/Math.max(1,w.length);D=w.flatMap(t=>e.type===`line`?[...PY(e,t.key)].map(n=>$(e,t.key,n)):e.data.map((n,r)=>$(e,t.key,r))).filter(e=>e!=null).every(e=>YJ(Z(e,x),12)<=r)}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}:IY(e.x.labelFit,T,E()),...m?{formatter:oY(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:UJ(e.y)?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&&!e.valueLabels,M=e.series.map((n,r)=>{let o=XJ(t.palette,cJ(n,r)%t.palette.length),s=e.data.some((t,r)=>$(e,n.key,r)!=null&&$(e,n.key,r-1)==null&&$(e,n.key,r+1)==null),c=t=>{let r=$(e,n.key,t),i=h?FJ(h,t,n.key):r;return m?[aY(Mq(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 i=e.type===`area`?_||e.stack!==`none`?t.dark?.34:.22:.1:0,u=e.valueLabels?PY(e,n.key):null;return{...l,type:`line`,data:e.data.map((e,t)=>c(t)),smooth:.35,smoothMonotone:`x`,connectNulls:!1,symbol:`circle`,showSymbol:s||e.valueLabels,label:e.valueLabels?{show:D,position:`top`,distance:6,fontFamily:t.font,fontSize:12,fontWeight:600,color:t.text,formatter:e=>e.value==null||!u?.has(e.dataIndex)?``:Z(Array.isArray(e.value)?e.value[1]:e.value,x)}:void 0,symbolSize:8,sampling:v?`lttb`:void 0,lineStyle:{width:2,color:o,..._&&!v?{shadowColor:QJ(o,.35),shadowBlur:10,shadowOffsetY:6}:{}},itemStyle:{color:o,borderColor:t.surface,borderWidth:2},areaStyle:i?{color:iY(o,i)}: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?lY(e,t,!1,a):void 0}}return{...l,type:`bar`,barMaxWidth:KJ,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((t,r)=>({value:c(r),itemStyle:{borderRadius:IJ(g,r,n.key),...e.incompleteLast&&r===e.data.length-1?{opacity:.45,borderType:`dashed`,borderWidth:1.5,borderColor:o}:{}}})),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?lY(e,t,p,a):void 0}}),N=e.data.length-1;if(e.incompleteLast&&e.stack===`none`&&N>=1&&(e.type===`line`||e.type===`area`))for(let n of e.series){let r=t=>m?[aY(Mq(e,t),e.timeZone),$(e,n.key,t)]:$(e,n.key,t);M.push({id:`${n.key}:so-far`,name:`${n.key}:so-far`,type:`line`,silent:!0,tooltip:{show:!1},symbol:`none`,smooth:.35,smoothMonotone:`x`,connectNulls:!1,data:e.data.map((e,t)=>t>=N-1?r(t):null),lineStyle:{width:2.5,color:t.surface,type:`dashed`}})}return{...u,useUTC:m,grid:{left:4,right:j?64:i?8:16,top:e.y.label?28:D&&(e.type===`column`||e.type===`line`)?24:12,bottom:A?44:4,outerBoundsMode:`same`},dataZoom:A?QY(e,t,XJ(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:QJ(t.neutral,t.dark?.12:.1)}},formatter:t=>lJ(iJ(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,c))},xAxis:p?k:O,yAxis:p?O:k,series:M}}function lY(e,t,n,r){if(!e.target)return;let i=AJ(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 uY(e,t,n,r,i){let{base:a,tooltipBase:o,colours:s,compact:c}=i,l=AJ(e),u=e.data.map((t,n)=>jq(e,n)),d=e.data.reduce((t,n,i)=>t+(r.hidden.has(jq(e,i))?0:$(e,l.key,i)??0),0);return{...a,tooltip:{...o,trigger:`item`,formatter:t=>lJ(iJ(e,t.dataIndex,r.hidden,s))},graphic:[{type:`group`,left:`center`,top:`middle`,silent:!0,children:[{type:`text`,style:{text:Z(d,AK(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||kJ().centerLabel,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:e.sliceValues?{show:!0,position:`outside`,color:t.label,fontFamily:t.font,fontSize:12,lineHeight:16,formatter:e=>`${e.name}\n${Z(Number(e.value),l.format)} (${Z(e.percent/100,{style:`percent`,decimals:0})})`}: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:!e.sliceValues},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:$(e,l.key,n)??0,itemStyle:{color:sJ(e,n,s)}}))}]}}var dY=e=>[...new Set(e)],fY=(e,t)=>e.data.map((n,r)=>$(e,t,r));function pY(e,t){return{...e,trigger:`item`,formatter:e=>t(e)}}var mY=(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}),hY=(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 gY(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:[kJ().moreLabel,kJ().lessLabel],textGap:8,selectedMode:!1,textStyle:{color:e.label,fontSize:12,fontFamily:e.font},...n}}function _Y(e,t,n,r,i){let a=AJ(e),o=dY(e.data.map((t,n)=>jq(e,n))),s=Iq(e),c=Jq(fY(e,a.key),t.seq);return{...i.base,grid:{left:4,right:4,top:8,bottom:40,outerBoundsMode:`same`},tooltip:pY(i.tooltipBase,t=>lJ(iJ(e,t.dataIndex,r.hidden,i.colours))),xAxis:mY(t,o,{axisLine:{show:!1},splitArea:{show:!1}}),yAxis:mY(t,s,{inverse:!0,axisLine:{show:!1}}),visualMap:gY(t,c),series:[{type:`heatmap`,data:e.data.map((t,n)=>[o.indexOf(jq(e,n)),s.indexOf(Nq(e,n)),$(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 vY=6048e5,yY=(e,t)=>{let n=UG(e,t);return`${n.year}-${String(n.month+1).padStart(2,`0`)}-${String(n.day).padStart(2,`0`)}`};function bY(e,t){let n=e.data.map((t,n)=>Mq(e,n)).filter(Number.isFinite),r=xY(n),i=SY(n),a=Math.ceil((i-r)/vY)+1,o=Math.floor((t.height-62)/7),s=Math.max(CY,Math.min(wY,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)*vY:r,to:i}}var xY=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.min(t,e),1/0),SY=e=>e.reduce((e,t)=>Number.isNaN(t)?e:Math.max(t,e),-1/0),CY=9,wY=24;function TY(e,t,n,r,i){let a=AJ(e),{cell:o,from:s,to:c}=bY(e,n),l=Jq(fY(e,a.key),t.seq);return{...i.base,tooltip:pY(i.tooltipBase,t=>lJ(iJ(e,t.dataIndex,r.hidden,i.colours))),visualMap:gY(t,l,{right:4}),calendar:{range:[yY(s,e.timeZone),yY(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:[``,rK(1,`short`),``,rK(3,`short`),``,rK(5,`short`),``],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)=>[yY(Mq(e,n),e.timeZone),$(e,a.key,n)??`-`]),itemStyle:{borderRadius:3,borderColor:t.surface,borderWidth:2},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}}}]}}function EY(e,t,n,r,i){let a=AJ(e),o=Xq(e.data.length,t.seq),s=$(e,a.key,0);return{...i.base,tooltip:pY(i.tooltipBase,t=>lJ(iJ(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=rY(o[r],t),c=$(e,a.key,r),l=r?MG(kJ().funnelPreviousStepText,{share:qq(c,$(e,a.key,r-1))}):MG(kJ().shareOfStepText,{share:qq(c,s),first:HJ(jq(e,0))});return{name:jq(e,r),value:c??0,itemStyle:{color:o[r]},label:{formatter:`{n|${HJ(jq(e,r))}} {v|${HJ(Z(c,a.format))}}\n{p|${r?l:kJ().firstStageLabel}}`,rich:{n:{color:i,fontSize:12.5,fontWeight:500,fontFamily:t.font},v:{color:i,fontSize:13,fontWeight:700,fontFamily:t.font},p:{color:QJ(i,.78),fontSize:12,fontFamily:t.font}}}}})}]}}function DY(e,t,n,r,i){let a=AJ(e),{min:o,max:s}=$q(e),c=$(e,a.key,0),l=c??o,u=c==null?null:Zq(e,c),d=XJ(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:pY(i.tooltipBase,()=>lJ(iJ(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:QJ(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:jq(e,0)}]}]}}function OY(e){let t=SY(e.map(e=>e.level).concat(e.map(e=>e.from),e.map(e=>e.to))),n=xY(e.filter(e=>!e.total).map(e=>Math.min(e.from,e.to)).concat(e.filter(e=>e.total).map(e=>e.value))),r=SY(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 kY=4,AY=72,jY=12,MY=(e,t)=>Math.floor(t/Math.max(1,e)-kY),NY=12;function PY(e,t){let n=e.data.map((e,t)=>t).filter(n=>$(e,t,n)!=null);if(e.data.length<=NY||!n.length)return new Set(n);let r=n=>$(e,t,n)??0,i=n.reduce((e,t)=>r(t)>r(e)?t:e),a=n.reduce((e,t)=>r(t)<r(e)?t:e);return new Set([n[0],n[n.length-1],i,a].filter(jJ))}function FY(e,t){return SY(e.flatMap(e=>String(e).split(/\s+/)).map(e=>YJ(e,jY)))<=t?{interval:0,width:t,overflow:`break`}:{interval:0,rotate:45,width:AY,overflow:`truncate`}}function IY(e,t,n){let r=MY(t.length,n);return e===`all`?{...FY(t,r),hideOverlap:!1}:e===`rotate`?{interval:0,rotate:45,width:AY,overflow:`truncate`,hideOverlap:!1}:e===`ellipsis`?{interval:0,rotate:0,width:Math.max(1,r),overflow:`truncate`,hideOverlap:!1}:{hideOverlap:!0}}function LY(e,t,n){let r=MY(e.length,n),i=FY(e,r);return{nameSize:jY,valueSize:12,category:`rotate`in i?{...i,hideOverlap:!0}:i,showValues:t.every(e=>YJ(e,12)<=r)}}function RY(e,t,n,r,i){let a=AJ(e),o=eJ(e),s=bJ(e),c=OY(o),l=t=>rJ(e,t.index,i.colours),u=o.map(t=>jq(e,t.index)),d=o.map(e=>e.total?Z(e.value,s):oJ(e.value,s)),f=o.flatMap(e=>[e.from,e.to]),p=Math.max(YJ(Z(SY(f),s),11),YJ(Z(xY(f),s),11))+8,m=LY(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:QJ(t.neutral,.1)}},formatter:t=>lJ(iJ(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:mY(t,u,{axisLabel:{color:t.label,fontSize:m.nameSize,margin:12,...m.category}}),yAxis:hY(t,e=>Z(e,s),{min:0,minInterval:UJ(e.y)?1:void 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 zY(e){let t=AJ(e).key;return Iq(e).map(n=>({name:n,rows:e.data.map((e,t)=>t).filter(t=>Nq(e,t)===n).sort((n,r)=>($(e,t,r)??0)-($(e,t,n)??0)||n-r)}))}function BY(e,t,n,r,i){let a=AJ(e),o=nJ(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(YJ(t[0],12),YJ(t[1],11.5))+20<=Math.sqrt(r)},l=zY(e).map(({name:n,rows:r},i)=>{let s=o.get(n),l=XJ(t.palette,i%t.palette.length),u=rY(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:QJ(u,.8),fontFamily:t.font}}},children:r.map((n,r)=>{let i=$J(l,t.surface,Math.min(.55,r*.14)),o=rY(i,t),s=$(e,a.key,n);return{name:jq(e,n),value:s,row:n,itemStyle:{color:i},label:{show:c(s,[jq(e,n),Z(s,a.format)]),formatter:`{n|${HJ(jq(e,n))}}\n{v|${HJ(Z(s,a.format))}}`,rich:{n:{color:o,fontSize:12,fontWeight:500,fontFamily:t.font,lineHeight:16},v:{color:QJ(o,.82),fontSize:12,fontFamily:t.font}}}}})}});return{...i.base,tooltip:pY(i.tooltipBase,t=>t.data?.row==null?lJ({title:t.name,rows:[{color:t.color,label:a.label,value:Z(t.value,a.format)},{label:kJ().shareOfAllLabel,value:qq(LJ(t.value),s)}],foot:``}):lJ(iJ(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 VY(e){let t=NJ(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 HY(e,t,n,r,i){let a=AJ(e),o=NJ(e),s=tJ(e,t.palette),c=VY(e),l=SY([...c.values()]),u=new Map,d=new Map;e.data.forEach((t,n)=>{let r=$(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:pY(i.tooltipBase,t=>lJ(t.dataType===`edge`?iJ(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 UY(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=xY(e.map(e=>e[1])),s=SY(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(xY(e.map(e=>e[0]))),c(SY(e.map(e=>e[0])))]}var WY=44,GY=28,KY=8;function qY(e,t,n,r,i){let a=AJ(e),o=Iq(e),s=e.type===`bubble`,c=SY(s?e.data.map(t=>t[PJ(e)]).filter(jJ):[]),l=e=>Math.max(KY,(i.compact?GY:WY)*Math.sqrt(e/c)),u=t=>e.data.map((e,t)=>t).filter(n=>!e.group||Nq(e,n)===t),d=(e.group?o:[null]).filter(e=>e==null||!r.hidden.has(e)).flatMap(e=>u(e)),f=e.trend?UY(d.flatMap(t=>{let n=MJ(e,t)[e.x.key],r=$(e,a.key,t);return jJ(n)&&r!=null?[[n,r]]:[]})):null,p=e.data.map(t=>t[e.x.key]),m=e.data.map((t,n)=>$(e,a.key,n)),[h,g]=GJ(p,!1),[_,v]=GJ(m,!1),y=WJ(e.y.format,e.y.min??_,e.y.max??v,4),b=WJ(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:QJ(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:[MJ(e,t)[e.x.key],$(e,a.key,t),...s?[MJ(e,t)[PJ(e)]]:[]],row:t}))}));return f&&x.push({name:kJ().trendLabel,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:kJ().trendLabel,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:pY(i.tooltipBase,t=>t.data?.row==null?``:lJ(iJ(e,t.data.row,r.hidden,i.colours))),xAxis:hY(t,e=>Z(e,b),{scale:!0,minInterval:UJ(e.x)?1:void 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:hY(t,e=>Z(e,y),{min:e.y.min,max:e.y.max,minInterval:UJ(e.y)?1:void 0,...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 JY=32,YY=8,XY=26;function ZY(e,t,n,r,i){let a=e.x.kind===`time`,o=e.series.length,s=(n.height-6-XY)/o,c=s-JY-YY,l=XJ(t.palette,0),u=e.data.map((t,n)=>jq(e,n)),d=e.series.flatMap((n,r)=>{let i=fY(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:MG(kJ().latestText,{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=$(e,t.key,n);return a?[aY(Mq(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+JY,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=>lJ(iJ(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:e.series.map((n,r)=>({...a?{type:`time`}:mY(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:oY(e)}:{}}})),yAxis:e.series.map((n,r)=>{let[i,a]=GJ(fY(e,n.key),!1),o=WJ(n.format,e.y.min??i,e.y.max??a,2);return hY(t,e=>Z(e,o),{gridIndex:r,splitNumber:2,scale:e.y.min==null,min:e.y.min,max:e.y.max,minInterval:UJ(n)?1:void 0,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:iY(l,t.dark?.26:.16)},animationDelay:i.animate?r*160:0,emphasis:{disabled:!0}}))}}function QY(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:QJ(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:QJ(t.neutral,.15)}},selectedDataBackground:{lineStyle:{color:n,width:.75},areaStyle:{color:QJ(n,.18)}},textStyle:{color:t.label,fontSize:12,fontFamily:t.font}}]}function $Y(e,t,n){switch(e.type){case`scatter`:case`bubble`:{if(!e.group)return{seriesIndex:0,dataIndex:n};let t=Nq(e,n),r=e.data.map((e,t)=>t).filter(n=>Nq(e,n)===t);return{seriesIndex:Iq(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 zY(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 eX(e,t){switch(e.type){case`scatter`:case`bubble`:case`treemap`:{let e=RJ(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 tX={donut:uY,heatmap:_Y,calendar:TY,funnel:EY,gauge:DY,waterfall:RY,treemap:BY,sankey:HY,scatter:qY,bubble:qY,multiples:ZY};function nX(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=yj(a,null,{renderer:`canvas`,devicePixelRatio:i,width:n.width,height:n.height});try{return o.setOption(cY(e,t,n,{...r,renderer:`canvas`,animation:!1})),o.getDataURL({type:`png`,pixelRatio:i,backgroundColor:t.surface})}finally{o.dispose(),a.remove()}}function rX(e,{renderer:t}){let n=yj(e,null,{renderer:t}),r=!1,i=null;return{renderer:t,render(e,t,a,o,{replace:s=!1}={}){let c=r&&!s?zJ(n.getOption()):null,l=cY(e,t,a,{...o,zoom:c});i=e,n.setOption(l,s||!r?{notMerge:!0}:{replaceMerge:VJ}),r=!0},focusPoint(e,t){let{tip:r=!0,...a}=$Y(BJ(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()},flush(){n.getZr().flush()},onSelect(e){n.on(`click`,t=>{if(t.componentType!==`series`)return;let n=eX(BJ(i),t);n&&e({seriesIndex:n.series,dataIndex:n.row})})},onFinished(e){n.on(`finished`,e)},dispose(){n.dispose()}}}var iX=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(iX);var aX=HTMLElement,oX=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0;function sX(e){return e.isComposing||e.keyCode===229}function cX(e){return e.key===`Enter`&&!sX(e)}function lX(e){return getComputedStyle(e).direction===`rtl`}function uX(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}function dX(e){"@babel/helpers - typeof";return dX=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dX(e)}function fX(e,t){if(dX(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dX(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function pX(e){var t=fX(e,`string`);return dX(t)==`symbol`?t:t+``}function mX(e,t,n){return(t=pX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hX=()=>AG(`chart`,jK),gX=`wui-chart:select`,_X=`wui-chart:legend-change`,vX=`wui-chart:ready`,yX=[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`],bX=`(prefers-color-scheme: dark)`,xX=`(prefers-reduced-motion: reduce)`,SX=`(forced-colors: active)`,CX=`(prefers-contrast: more)`,wX=`print`,TX=e=>typeof window.matchMedia==`function`?window.matchMedia(e):null,EX=!1,DX=new Map;function OX(e,t){let n=[...new Set(t)].filter(e=>e&&!DX.has(e));if(!n.length)return;let r=document.createElement(`span`);r.hidden=!0;let i=n.map(e=>{let t=document.createElement(`span`);return t.style.setProperty(`forced-color-adjust`,`none`),t.style.color=e,r.append(t),[e,t]});e.append(r);for(let[e,t]of i)DX.set(e,getComputedStyle(t).color);r.remove()}var kX=[...[1,2,3,4,5,6,7,8].map(e=>`--color-chart-${e}`),...[0,1,2,3,4,5,6].map(e=>`--color-chart-seq-${e}`),`--color-chart-neutral`,`--wui-chart-rise`,`--wui-chart-fall`,`--color-chart-grid`,`--color-chart-axis`,`--color-chart-label`,`--color-surface`,`--color-text`,`--color-text-body`,`--color-text-muted`];function AX(e){let t=getComputedStyle(e),n=!!TX(SX)?.matches,r=e=>t.getPropertyValue(e).trim();n&&OX(e,kX.map(r));let i=e=>n?DX.get(r(e))??r(e):r(e),a=e.closest(`[data-bs-theme], [data-theme]`)??document.documentElement,o=a.getAttribute(`data-bs-theme`)||a.getAttribute(`data-theme`),s={palette:[1,2,3,4,5,6,7,8].map(e=>i(`--color-chart-${e}`)),seq:[0,1,2,3,4,5,6].map(e=>i(`--color-chart-seq-${e}`)),neutral:i(`--color-chart-neutral`),rise:i(`--wui-chart-rise`),fall:i(`--wui-chart-fall`),grid:i(`--color-chart-grid`),axis:i(`--color-chart-axis`),label:i(`--color-chart-label`),surface:i(`--color-surface`),text:i(`--color-text`),textBody:i(`--color-text-body`),textMuted:i(`--color-text-muted`),shadow:r(`--wui-shadow-popover`),font:t.fontFamily,dark:o===`dark`||o===`auto`&&!!TX(bX)?.matches,reducedMotion:!!TX(xX)?.matches};return!s.palette[0]&&!EX&&(EX=!0,yG(`[@webority/ui-elements] <wui-chart> found no --color-chart-* colours: load @webority/theme on the page.`)),s}var jX=new Set,MX=null;function NX(e){if(jX.add(e),MX)return;let t=()=>{DX.clear();for(let e of jX)e._themeChanged()},n=()=>{DX.clear();for(let e of jX)e._themeChanged(!0)},r=new MutationObserver(t);r.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`data-bs-theme`,`class`]});let i=new MutationObserver(t);i.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[`data-theme`,`data-bs-theme`]});let a=[[bX,t],[xX,t],[SX,t],[CX,t],[wX,n]],o=[];for(let[e,t]of a){let n=TX(e);n&&o.push([n,t])}for(let[e,t]of o)e.addEventListener?.(`change`,t);window.addEventListener(`beforeprint`,n),window.addEventListener(`afterprint`,t),MX=()=>{r.disconnect(),i.disconnect();for(let[e,t]of o)e.removeEventListener?.(`change`,t);window.removeEventListener(`beforeprint`,n),window.removeEventListener(`afterprint`,t),MX=null}}function PX(e){jX.delete(e),jX.size||MX?.()}function FX(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.append(n),n.click(),n.remove()}var IX=0,LX=class extends aX{static get observedAttributes(){return[`view`]}constructor(){super(),mX(this,`uid`,void 0),mX(this,`_spec`,void 0),mX(this,`_normal`,void 0),mX(this,`_hidden`,void 0),mX(this,`_focus`,void 0),mX(this,`_awaitingSpec`,!1),mX(this,`_parts`,null),mX(this,`_theme`,null),mX(this,`_width`,null),mX(this,`_visible`,!1),mX(this,`_resizeObserver`,null),mX(this,`_intersection`,null),mX(this,`_engine`,null),mX(this,`_drawn`,!1),mX(this,`_drawnType`,null),mX(this,`_announcedReady`,!1),mX(this,`_legendSignature`,null),mX(this,`_tableSpec`,null),IX+=1,this.uid=`wui-chart-${IX}`,this._spec=null,this._normal=null,this._hidden=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(oX(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(),NX(this),this._theme=AX(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(){PX(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&&(bq(`view`,n,LK),this._update())}toCsv(){let{spec:e}=this._normalized();return e?hJ(e):``}toPng(){let{spec:e}=this._normalized();return e?nX(e,this._theme??AX(this),this._size(e),{hidden:this._hidden,renderer:Rq(e)}):``}exportCsv(e){let t=URL.createObjectURL(new Blob([this.toCsv()],{type:`text/csv;charset=utf-8`}));FX(t,e??`${gJ(this._normalized().spec)}.csv`),setTimeout(()=>URL.revokeObjectURL(t),2e3)}exportPng(e){let t=this.toPng();t&&FX(t,e??`${gJ(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 bG(`[@webority/ui-elements] <wui-chart> could not read its JSON spec:`,e instanceof Error?e.message:void 0),null}}_normalized(){return this._normal??=wq(this._spec),this._normal}_build(){let e=SG(`div`,{class:`wui-chart-legend`});e.setAttribute(`role`,`group`),e.setAttribute(`aria-label`,hX().legendLabel),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=SG(`div`,{class:`wui-chart-surface`});t.tabIndex=0,t.setAttribute(`role`,`group`),t.setAttribute(`aria-roledescription`,hX().chartLabel),t.addEventListener(`keydown`,e=>this._onKey(e)),t.addEventListener(`blur`,()=>this._clearFocus());let n=SG(`div`,{class:`wui-chart-canvas`});n.setAttribute(`aria-hidden`,`true`),t.append(n);let r=SG(`div`,{class:`wui-chart-state`});r.setAttribute(`role`,`status`),r.hidden=!0;let i=SG(`div`,{class:`wui-chart-table-wrap visually-hidden`}),a=SG(`p`,{class:`visually-hidden`});a.id=`${this.uid}-summary`;let o=SG(`div`,{class:`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||!Aq(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||hX().untitledLabel),r===`loading`?this.setAttribute(`aria-busy`,`true`):this.removeAttribute(`aria-busy`),this.setAttribute(`data-state`,r),n.surface.setAttribute(`aria-label`,MG(hX().arrowKeysText,{title:e?.title||hX().untitledLabel})),n.summary.textContent=e?vJ(e,this._hidden):``,e){if(!s){let t=new Set(zq(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??hX().loadingText: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||hX().untitledLabel} ${hX().dataSuffixLabel}`)):(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(SG(`div`,{class:`skeleton wui-chart-skeleton`}),SG(`span`,{class:`visually-hidden`},t)):i.replaceChildren(SG(`p`,{class:`wui-chart-state-text`},t))):i.replaceChildren()}_colour(e,t){let n=this._theme;if(!n)return;if(e.type===`donut`)return rJ(e,t,n);let r=e.series[t],i=e.type===`line`||e.type===`area`||e.type===`column`||e.type===`bar`;return n.palette[r&&i?cJ(r,t):t]}_renderLegend(e,t){let n=this._parts?.legend;if(!n)return;let r=e?zq(e):[],i=!!e&&t&&r.length>=2;if(n.hidden=!i,!e||!i)return;let a=Bq(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=SG(`button`,{class:`wui-chart-legend-item`});r.type=`button`,r.dataset.key=t;let i=SG(`span`,{class: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,SG(`span`,{class:`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=fJ(e),n=SG(`table`,{class:`wui-chart-table`});n.append(SG(`caption`,{class:`visually-hidden`},t.caption));let r=SG(`tr`);t.head.forEach((e,t)=>{let n=SG(`th`,t?{class:`wui-chart-num`}:null,e);n.scope=`col`,r.append(n)});let i=SG(`thead`);i.append(r),n.append(i);let a=SG(`tbody`);for(let e of t.rows){let t=SG(`tr`),n=SG(`th`,null,e.head);n.scope=`row`,t.append(n,...e.cells.map(e=>SG(`td`,{class:`wui-chart-num`},e))),a.append(t)}n.append(a);let o=[n];t.truncated&&o.push(SG(`p`,{class:`wui-chart-table-note`},MG(hX().showingFirstRowsDownloadText,{rows:t.rows.length,total:t.total}))),this._parts.tableWrap.replaceChildren(...o)}_draw(){let{spec:e}=this._normalized();if(!e||!this._parts||!this._theme)return;let t=Rq(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=rX(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(vX,{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(e=!1){if(!this._parts)return;let t=AX(this);JSON.stringify(t)!==JSON.stringify(this._theme)&&(this._theme=t,this._update(),e&&this._engine?.flush())}_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(zq(t).map(e=>[e,!this._hidden.has(e)]));this.dispatchEvent(new CustomEvent(_X,{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(cX(e)){if(!this._focus)return;e.preventDefault(),this._select(this._focus.series,this._focus.index);return}if(!yX.includes(e.key)||e.key===`Escape`&&!this._focus)return;e.preventDefault();let n=DJ(t,this._focus,uX(e.key,lX(this)),this._hidden);n?(this._focus=n,this._engine.focusPoint(n.series,n.index),this._announce(uJ(iJ(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[WK(n.type)?0:e];if(!r)return;let i=n.data[t]??null;this.dispatchEvent(new CustomEvent(gX,{bubbles:!0,detail:{series:r.key,label:r.label,x:i?.[n.x.key]??null,value:$(n,r.key,t),row:i,index:t}}))}};return r(`wui-chart`,LX),e.CHART_STATES=IK,e.CHART_TYPES=MK,e.CHART_VIEWS=LK,e.MAX_SERIES=zK,e.MAX_SLICES=BK,e.RENDERERS=FK,e.STACK_MODES=NK,e.WuiChart=LX,e.X_KINDS=PK,e.formatValue=Z,e.normalizeSpec=wq,e})({});
|