@agions/taroviz 1.6.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +30 -21
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/esm/index.js +49471 -2199
  4. package/package.json +2 -1
  5. package/src/adapters/__tests__/index.test.ts +4 -2
  6. package/src/adapters/h5/index.ts +16 -0
  7. package/src/adapters/types.ts +28 -120
  8. package/src/charts/common/BaseChartWrapper.tsx +193 -32
  9. package/src/charts/index.ts +5 -1
  10. package/src/charts/liquid/index.tsx +227 -0
  11. package/src/charts/liquid/types.ts +130 -0
  12. package/src/charts/tree/index.tsx +117 -0
  13. package/src/charts/tree/types.ts +174 -0
  14. package/src/charts/types.ts +1 -1
  15. package/src/components/DataFilter/index.tsx +587 -0
  16. package/src/core/animation/AnimationManager.ts +69 -42
  17. package/src/core/components/BaseChart.tsx +72 -9
  18. package/src/core/types/common.ts +21 -110
  19. package/src/core/types/index.ts +4 -135
  20. package/src/core/types/platform.ts +38 -230
  21. package/src/core/utils/drillDown.ts +643 -0
  22. package/src/core/utils/export/ExportUtils.ts +10 -1
  23. package/src/core/utils/performance/PerformanceAnalyzer.ts +21 -1
  24. package/src/core/utils/performance/types.ts +5 -0
  25. package/src/hooks/__tests__/index.test.tsx +7 -5
  26. package/src/hooks/index.ts +41 -2
  27. package/src/hooks/useAnimation.ts +427 -0
  28. package/src/hooks/useChartConnect.ts +362 -0
  29. package/src/hooks/useChartDownload.ts +692 -0
  30. package/src/hooks/useDataZoom.ts +323 -0
  31. package/src/hooks/usePerformance.ts +291 -0
  32. package/src/index.ts +25 -2
  33. package/src/themes/__tests__/index.test.ts +7 -13
  34. package/src/themes/index.ts +3 -0
  35. package/src/themes/useAutoTheme.ts +66 -0
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={219(e,t,r){r.d(t,{D:()=>n});var n=function(){function e(e){void 0===e&&(e={}),this.chartInstance=null,this.config=e}return e.prototype.getInstance=function(){return this.chartInstance},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){this.config.theme=e;var t=this.chartInstance;(null==t?void 0:t.setTheme)&&t.setTheme(e)},e.prototype.getWidth=function(){var e=this.config.width;if("number"==typeof e)return e;if("string"==typeof e){var t=parseInt(e,10);if(!isNaN(t))return t}return 300},e.prototype.getHeight=function(){var e=this.config.height;if("number"==typeof e)return e;if("string"==typeof e){var t=parseInt(e,10);if(!isNaN(t))return t}return 300},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},e.prototype.clear=function(){var e,t;null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.clear)||void 0===t||t.call(e)},e.prototype.on=function(e,t){var r,n;null===(n=null===(r=this.chartInstance)||void 0===r?void 0:r.on)||void 0===n||n.call(r,e,t)},e.prototype.off=function(e,t){var r,n;null===(n=null===(r=this.chartInstance)||void 0===r?void 0:r.off)||void 0===n||n.call(r,e,t)},e.prototype.showLoading=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.showLoading)||void 0===r||r.call(t,e)},e.prototype.hideLoading=function(){var e,t;null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.hideLoading)||void 0===t||t.call(e)},e.prototype.dispose=function(){var e,t;this.chartInstance&&(null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.dispose)||void 0===t||t.call(e),this.chartInstance=null)},e.prototype.resize=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.resize)||void 0===r||r.call(t,e)},e.prototype.setComponent=function(e){this.config.component=e},e.prototype.parseSize=function(e,t){if("number"==typeof e)return e;if("string"==typeof e){var r=parseInt(e,10);if(!isNaN(r))return r}return t},e}()},123(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(163),o=r(348),a=r(613),i=r(15),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};o.use([n.GridComponent,n.TooltipComponent,n.TitleComponent,n.LegendComponent,a.CanvasRenderer,a.SVGRenderer]);const c=function(){function e(e){this.instance=null,this.containerRef=null,this.options=e||{},this.containerRef=e.containerRef,this.canvasId=this.options.canvasId||"taroviz-echarts-canvas"}return e.create=function(t){return new e(t)},e.prototype.init=function(e){var t,r;if(this.instance)return this.instance;var n=(null===(t=this.containerRef)||void 0===t?void 0:t.current)||document.getElementById(this.canvasId);if(!n)throw new Error("[TaroViz] H5Adapter: container not found (canvasId: ".concat(this.canvasId,")"));return this.instance=o.init(n,this.options.theme,{useDirtyRect:!0,renderer:this.options.renderer||"canvas"}),this.instance&&this.instance.setOption({animation:!1!==(null===(r=this.options.option)||void 0===r?void 0:r.animation),animationDurationUpdate:300,animationEasingUpdate:"cubicOut",progressive:500,progressiveThreshold:1e3},!0),this.options.option&&this.instance&&this.instance.setOption(this.options.option,{notMerge:!1,lazyUpdate:!0}),this.options.onInit&&this.instance&&this.options.onInit(this.instance),this.instance},e.prototype.getInstance=function(){return this.instance},e.prototype.setOption=function(e,t){this.instance?this.instance.setOption(e,l({lazyUpdate:!0},t)):this.options.option=e},e.prototype.setTheme=function(e){var t,r;this.options.theme=e,this.instance&&(null===(r=(t=this.instance).setTheme)||void 0===r||r.call(t,e))},e.prototype.getWidth=function(){var e;return(null===(e=this.instance)||void 0===e?void 0:e.getWidth())||0},e.prototype.getHeight=function(){var e;return(null===(e=this.instance)||void 0===e?void 0:e.getHeight())||0},e.prototype.getDom=function(){var e;return(null===(e=this.containerRef)||void 0===e?void 0:e.current)||null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.instance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.instance&&this.instance.clear()},e.prototype.on=function(e,t){this.instance&&this.instance.on(e,t)},e.prototype.off=function(e,t){this.instance&&this.instance.off(e,t)},e.prototype.showLoading=function(e){this.instance&&this.instance.showLoading(e)},e.prototype.hideLoading=function(){this.instance&&this.instance.hideLoading()},e.prototype.setComponent=function(e){this.containerRef=e},e.prototype.render=function(){var e=this.options,t=e.width,r=void 0===t?"100%":t,n=e.height,o=void 0===n?"300px":n,a=e.style,c=void 0===a?{}:a,s=e.direction,u=void 0===s?"ltr":s;return i.createElement("div",{id:this.canvasId,ref:this.containerRef,style:l({width:r,height:o,direction:u},c)})},e.prototype.dispose=function(){this.instance&&(this.instance.dispose(),this.instance=null)},e.prototype.resize=function(e){this.instance&&this.instance.resize(e)},e.prototype.getName=function(){return"H5Adapter"},e.prototype.getVersion=function(){return"1.1.1"},e.prototype.getPlatformInfo=function(){return{platform:"h5",renderer:this.options.renderer||"canvas",userAgent:navigator.userAgent,devicePixelRatio:window.devicePixelRatio}},e}()},382(e,t,r){r.r(t),r.d(t,{default:()=>a});var n=r(15),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};const a=function(){function e(e){this.chartInstance=null,this.component=null,this.config=e,this.component=e.component}return e.create=function(t){return new e(t)},e.prototype.getInstance=function(){return this.chartInstance},e.prototype.init=function(){var e=this.config,t=e.canvasId,r=e.width,n=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:r,height:n,theme:o});return a&&i.setOption(a),this.chartInstance=i,this.config.onInit&&this.config.onInit(i),i},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){var t,r;this.config.theme=e,this.chartInstance&&(null===(r=(t=this.chartInstance).setTheme)||void 0===r||r.call(t,e))},e.prototype.getWidth=function(){return 0},e.prototype.getHeight=function(){return 0},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},e.prototype.on=function(e,t){this.chartInstance&&this.chartInstance.on(e,t)},e.prototype.off=function(e,t){this.chartInstance&&this.chartInstance.off(e,t)},e.prototype.showLoading=function(e){this.chartInstance&&this.chartInstance.showLoading(e)},e.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},e.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},e.prototype.resize=function(e){this.chartInstance&&this.chartInstance.resize(e)},e.prototype.setComponent=function(e){this.component=e},e.prototype.render=function(){var e=this.config,t=e.canvasId,r=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,l=e.height,c=void 0===l?"300px":l,s=e.style,u=void 0===s?{}:s;return n.createElement("view",{id:r,style:o({width:i,height:c},u)})},e.prototype.dispatchAction=function(e){this.chartInstance&&this.chartInstance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e}()},574(e,t,r){var n,o;r.d(t,{li:()=>s,cK:()=>d,_$:()=>u}),function(e){e.CLICK="click",e.MOUSEMOVE="mousemove",e.MOUSEUP="mouseup",e.MOUSEDOWN="mousedown",e.MOUSEOVER="mouseover",e.MOUSEOUT="mouseout",e.GLOBALOUT="globalout",e.LEGENDSELECTED="legendselected",e.LEGENDUNSELECTED="legendunselected",e.LEGENDSELECTCHANGED="legendselectchanged",e.LEGENDSCROLL="legendscroll",e.DATAZOOM="datazoom",e.DATARANGESELECTED="datarangeselected",e.TIMELINECHANGED="timelinechanged",e.TIMELINEPLAYCHANGED="timelineplaychanged",e.RESTORE="restore",e.DATAVIEWCHANGED="dataviewchanged",e.MAGICTYPECHANGED="magictypechanged",e.GEOSELECTCHANGED="geoselectchanged",e.GEOSELECTED="geoselected",e.GEOUNSELECTED="geounselected",e.PIESELECTCHANGED="pieselectchanged",e.PIESELECTED="pieselected",e.PIEUNSELECTED="pieunselected",e.MAPSELECTCHANGED="mapselectchanged",e.MAPSELECTED="mapselected",e.MAPUNSELECTED="mapunselected",e.AXISAREASELECTED="axisareaselected",e.FOCUSNODEADJACENCY="focusnodeadjacency",e.UNFOCUSNODEADJACENCY="unfocusnodeadjacency",e.BRUSH="brush",e.BRUSHSELECTED="brushselected",e.RENDERED="rendered",e.FINISHED="finished",e.CHART_READY="chartReady",e.CHART_RESIZE="chartResize",e.CHART_ERROR="chartError",e.CHART_DISPOSE="chartDispose"}(n||(n={})),function(e){e.H5="h5",e.WEAPP="weapp",e.ALIPAY="alipay",e.SWAN="swan",e.TT="tt",e.QQ="qq",e.JD="jd",e.HARMONY="harmony",e.DD="dd",e.QYWX="qywx",e.LARK="lark",e.KWAI="kwai"}(o||(o={}));r(251),r(524),r(930),r(123),r(999),r(85),r(280),r(382);var a,i=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},l=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}},c=((a={})[o.H5]={name:"H5"},a[o.WEAPP]={name:"Wechat",requireComponent:!0},a[o.ALIPAY]={name:"Alipay",requireComponent:!0},a[o.SWAN]={name:"Baidu",requireComponent:!0},a[o.TT]={name:"ByteDance",requireComponent:!0},a[o.QQ]={name:"QQ",requireComponent:!0},a[o.JD]={name:"JD",requireComponent:!0},a[o.DD]={name:"DingTalk",requireComponent:!0},a[o.QYWX]={name:"QiyeWechat"},a[o.LARK]={name:"Lark"},a[o.KWAI]={name:"Kwai",requireComponent:!0},a[o.HARMONY]={name:"HarmonyOS",requireComponent:!0},a);function s(){if("undefined"==typeof window)return o.H5;for(var e=window,t=[{test:function(){var t,r;return!!(null===(t=e.wx)||void 0===t?void 0:t.getSystemInfoSync)&&!(null===(r=e.wx)||void 0===r?void 0:r.qy)},platform:o.WEAPP},{test:function(){var t;return!!(null===(t=e.my)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.ALIPAY},{test:function(){var t;return!!(null===(t=e.swan)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.SWAN},{test:function(){var t;return!!(null===(t=e.tt)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.TT},{test:function(){var t;return!!(null===(t=e.qq)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.QQ},{test:function(){var t;return!!(null===(t=e.jd)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.JD},{test:function(){var t;return!!(null===(t=e.dd)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.DD},{test:function(){var t;return!!(null===(t=e.wx)||void 0===t?void 0:t.qy)},platform:o.QYWX},{test:function(){var t,r;return"lark"===(null===(r=null===(t=e.tt)||void 0===t?void 0:t.env)||void 0===r?void 0:r.appName)},platform:o.LARK},{test:function(){return navigator.userAgent.includes("HarmonyOS")},platform:o.HARMONY}],r=0,n=t;r<n.length;r++){var a=n[r];if(a.test())return a.platform}return o.H5}function u(){var e;return"undefined"!=typeof window&&"undefined"!=typeof document?"h5":void 0!==r.g&&(null===(e=null===r.g||void 0===r.g?void 0:r.g.wx)||void 0===e?void 0:e.getSystemInfoSync)?"weapp":"unknown"}function d(e){return i(this,void 0,Promise,function(){var t,n;return l(this,function(a){switch(a.label){case 0:t=s(),null==(n=c[t])||n.requireComponent,a.label=1;case 1:switch(a.trys.push([1,15,,17]),t){case o.H5:case o.ALIPAY:case o.QQ:case o.JD:case o.DD:case o.QYWX:case o.LARK:case o.KWAI:return[3,2];case o.WEAPP:return[3,4];case o.SWAN:return[3,6];case o.TT:return[3,8];case o.HARMONY:return[3,10]}return[3,12];case 2:return[4,Promise.resolve().then(r.bind(r,123))];case 3:return[2,a.sent().default.create(e)];case 4:return[4,Promise.resolve().then(r.bind(r,999))];case 5:return[2,a.sent().default.create(e)];case 6:return[4,Promise.resolve().then(r.bind(r,85))];case 7:return[2,a.sent().default.create(e)];case 8:return[4,Promise.resolve().then(r.bind(r,280))];case 9:return[2,a.sent().default.create(e)];case 10:return[4,Promise.resolve().then(r.bind(r,382))];case 11:return[2,a.sent().default.create(e)];case 12:return[4,Promise.resolve().then(r.bind(r,123))];case 13:return[2,a.sent().default.create(e)];case 14:return[3,17];case 15:return a.sent(),[4,Promise.resolve().then(r.bind(r,123))];case 16:return[2,a.sent().default.create(e)];case 17:return[2]}})})}},85(e,t,r){r.r(t),r.d(t,{SwanAdapter:()=>i,default:()=>l});var n,o=r(219),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(t){var r=e.call(this,t)||this;return r.component=null,r.component=t.component,r}return a(t,e),t.create=function(e){return new t(e)},t.prototype.init=function(){var e=this.config,t=e.canvasId,r=e.width,n=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var l=this.config.onInit;return l&&l(i),i},t.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},t.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},t.prototype.setComponent=function(e){this.component=e},t.prototype.dispatchAction=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},t.prototype.getDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},t}(o.D);const l=i},280(e,t,r){r.r(t),r.d(t,{TTAdapter:()=>i,default:()=>l});var n,o=r(219),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(t){var r=e.call(this,t)||this;return r.component=null,r.component=t.component,r}return a(t,e),t.create=function(e){return new t(e)},t.prototype.init=function(){var e=this.config,t=e.canvasId,r=e.width,n=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var l=this.config.onInit;return l&&l(i),i},t.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},t.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},t.prototype.setComponent=function(e){this.component=e},t.prototype.dispatchAction=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},t.prototype.getDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},t}(o.D);const l=i},999(e,t,r){r.r(t),r.d(t,{WeappAdapter:()=>i,default:()=>l});var n,o=r(219),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(t){var r=e.call(this,t)||this;return r.component=null,r.component=t.component,r}return a(t,e),t.create=function(e){return new t(e)},t.prototype.init=function(){var e=this.config,t=e.canvasId,r=e.width,n=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var l=this.config.onInit;return l&&l(i),i},t.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},t.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},t.prototype.setComponent=function(e){this.component=e},t.prototype.dispatchAction=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},t.prototype.getDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},t}(o.D);const l=i},188(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"bar-chart"}))});l.displayName="BarChart";const c=l},412(e,t,r){r.d(t,{A:()=>f});var n=r(15),o=r.n(n),a=r(574),i=r(524),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function c(e){var t={width:"number"==typeof e.width?e.width:void 0,height:"number"==typeof e.height?e.height:void 0,theme:"string"==typeof e.theme?e.theme:void 0,autoResize:e.autoResize,canvasId:e.canvasId,containerRef:e.containerRef,option:e.option,renderer:e.renderer},r=l({},t);return Object.keys(e).forEach(function(n){n in t||(r[n]=e[n])}),r}var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},u=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},d=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}};const f=function(e){var t=e.option,r=e.width,l=void 0===r?"100%":r,f=e.height,p=void 0===f?"300px":f,h=e.theme,m=e.style,v=void 0===m?{}:m,g=e.className,y=void 0===g?"":g,b=e.autoResize,x=void 0===b||b,E=e.loading,C=void 0!==E&&E,w=e.loadingOption,I=e.onChartInit,S=e.onChartReady,T=e.renderer,k=void 0===T?"canvas":T,O=e.onEvents,A=void 0===O?{}:O,D=e.chartType,R=void 0===D?"chart":D,P=(0,n.useRef)("".concat(R,"-").concat((0,i.uR)())),M=(0,n.useRef)(null),N=(0,n.useRef)(null),j=(0,n.useMemo)(function(){return c({canvasId:P.current,containerRef:N,width:l,height:p,theme:h,autoResize:x,renderer:k,option:t})},[l,p,h,x,k,t]);(0,n.useEffect)(function(){var e=u(void 0,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return e=c(s(s({},j),{onInit:function(e){M.current=e,A&&Object.keys(A).forEach(function(t){e.on(t,A[t])}),I&&I(e),S&&S(e)}})),[4,(0,a.cK)(e)];case 1:return t.sent().init(),[2,function(){M.current&&(A&&Object.keys(A).forEach(function(e){var t;null===(t=M.current)||void 0===t||t.off(e)}),M.current.dispose(),M.current=null)}]}})});return function(){e.then(function(e){return null==e?void 0:e()})}},[j,I,S,A]),(0,n.useEffect)(function(){M.current&&t&&M.current.setOption(t,!0)},[t]),(0,n.useEffect)(function(){M.current&&(C?M.current.showLoading(w):M.current.hideLoading())},[C,w]);var L=s({width:"number"==typeof l?"".concat(l,"px"):l,height:"number"==typeof p?"".concat(p,"px"):p},v);return o().createElement("div",{className:"taroviz-".concat(R," ").concat(y),style:L,ref:N})}},133(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"funnel-chart"}))});l.displayName="FunnelChart";const c=l},334(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"gauge-chart"}))});l.displayName="GaugeChart";const c=l},835(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"heatmap-chart"}))});l.displayName="HeatmapChart";const c=l},127(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"line-chart"}))});l.displayName="LineChart";const c=l},481(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"pie-chart"}))});l.displayName="PieChart";const c=l},443(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"radar-chart"}))});l.displayName="RadarChart";const c=l},490(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sankey-chart"}))});l.displayName="SankeyChart";const c=l},589(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=(r(930),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)}),l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"scatter-chart"}))});l.displayName="ScatterChart";const c=l},673(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sunburst-chart"}))});l.displayName="SunburstChart";const c=l},37(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(15),o=r.n(n),a=r(412),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"treemap-chart"}))});l.displayName="TreeMapChart";const c=l},251(e,t,r){var n;r.d(t,{ek:()=>l}),function(e){e.ANIMATION_START="animationStart",e.ANIMATION_UPDATE="animationUpdate",e.ANIMATION_END="animationEnd",e.ANIMATION_CANCEL="animationCancel",e.ANIMATION_REPEAT="animationRepeat"}(n||(n={}));var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},a=[{name:"default",description:"默认动画配置",config:{enabled:!0,duration:1e3,easing:"cubicOut",appearDuration:1200,appearEasing:"cubicOut",updateDuration:800,updateEasing:"cubicOut",disappearDuration:600,disappearEasing:"cubicIn",threshold:1e3,progressive:!0,progressiveStep:500}},{name:"fast",description:"快速动画配置",config:{enabled:!0,duration:500,easing:"linear",appearDuration:600,appearEasing:"linear",updateDuration:400,updateEasing:"linear",disappearDuration:300,disappearEasing:"linear",threshold:2e3,progressive:!0,progressiveStep:1e3}},{name:"slow",description:"慢速动画配置",config:{enabled:!0,duration:2e3,easing:"cubicInOut",appearDuration:2400,appearEasing:"cubicInOut",updateDuration:1600,updateEasing:"cubicInOut",disappearDuration:1200,disappearEasing:"cubicInOut",threshold:500,progressive:!0,progressiveStep:250}},{name:"bounce",description:"弹跳动画配置",config:{enabled:!0,duration:1500,easing:"bounceOut",appearDuration:1800,appearEasing:"bounceOut",updateDuration:1200,updateEasing:"bounceOut",disappearDuration:900,disappearEasing:"bounceIn",threshold:500,progressive:!0,progressiveStep:250}},{name:"elastic",description:"弹性动画配置",config:{enabled:!0,duration:1500,easing:"elasticOut",appearDuration:1800,appearEasing:"elasticOut",updateDuration:1200,updateEasing:"elasticOut",disappearDuration:900,disappearEasing:"elasticIn",threshold:500,progressive:!0,progressiveStep:250}}],i=function(){function e(e){this.presets=new Map,this.templates=new Map,this.eventHandlers=new Map,this.defaultConfig=(null==e?void 0:e.defaultConfig)||a[0].config,this.performanceConfig=(null==e?void 0:e.performance)||{monitor:!1,frameRate:60,hardwareAcceleration:!0},this.registerPresets(a)}return e.getInstance=function(t){return e.instance?t&&e.instance.updateConfig(t):e.instance=new e(t),e.instance},e.prototype.registerPreset=function(e){this.presets.set(e.name,e)},e.prototype.registerPresets=function(e){var t=this;e.forEach(function(e){return t.registerPreset(e)})},e.prototype.getPreset=function(e){return this.presets.get(e)},e.prototype.getAllPresets=function(){return Array.from(this.presets.values())},e.prototype.registerTemplate=function(e){this.templates.set(e.name,e)},e.prototype.getTemplate=function(e){return this.templates.get(e)},e.prototype.getAllTemplates=function(){return Array.from(this.templates.values())},e.prototype.setDefaultConfig=function(e){this.defaultConfig=e},e.prototype.getDefaultConfig=function(){return this.defaultConfig},e.prototype.getOptimizedConfig=function(e,t){void 0===e&&(e={}),void 0===t&&(t=0);var r=o(o({},this.defaultConfig),e);return r.threshold&&t>r.threshold&&(r.enabled=!1),r},e.prototype.getAnimationConfigByType=function(e,t){switch(t){case"appear":return{duration:e.appearDuration||e.duration||1e3,easing:e.appearEasing||e.easing||"cubicOut"};case"update":return{duration:e.updateDuration||e.duration||800,easing:e.updateEasing||e.easing||"cubicOut"};case"disappear":return{duration:e.disappearDuration||e.duration||600,easing:e.disappearEasing||e.easing||"cubicIn"};case"emphasis":return{duration:e.duration||300,easing:e.easing||"cubicOut"};default:return{duration:e.duration||1e3,easing:e.easing||"cubicOut"}}},e.prototype.generateEChartsAnimationConfig=function(e,t){void 0===e&&(e={}),void 0===t&&(t=0);var r=this.getOptimizedConfig(e,t);return r.enabled?{animation:!0,animationDuration:r.duration,animationEasing:r.easing,animationDelay:r.delay,animationDurationUpdate:r.updateDuration,animationEasingUpdate:r.updateEasing,animationDelayUpdate:r.delay,animationThreshold:r.threshold,progressive:r.progressive,progressiveThreshold:r.progressiveStep,progressiveChunkMode:"sequential"}:{animation:!1}},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(r=this.eventHandlers.get(e))||void 0===r||r.add(t)},e.prototype.off=function(e,t){var r;t?null===(r=this.eventHandlers.get(e))||void 0===r||r.delete(t):this.eventHandlers.delete(e)},e.prototype.emit=function(e,t){var r=this.eventHandlers.get(e);r&&r.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.updatePerformanceConfig=function(e){this.performanceConfig=o(o({},this.performanceConfig),e)},e.prototype.updateConfig=function(e){e.defaultConfig&&(this.defaultConfig=e.defaultConfig),e.performance&&this.updatePerformanceConfig(e.performance)},e.prototype.getPerformanceConfig=function(){return this.performanceConfig},e.prototype.reset=function(){this.presets.clear(),this.templates.clear(),this.eventHandlers.clear(),this.registerPresets(a)},e}();function l(e,t){return void 0===e&&(e={}),void 0===t&&(t=0),i.getInstance().generateEChartsAnimationConfig(e,t)}i.getInstance()},930(e,t,r){var n=r(348);const o=require("echarts/charts");var a=r(163),i=r(613),l=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};n.use(i.CanvasRenderer);var c=[o.PieChart,o.LineChart,o.BarChart,o.GaugeChart,o.ScatterChart,o.RadarChart,o.HeatmapChart,o.FunnelChart],s=[a.TitleComponent,a.TooltipComponent,a.LegendComponent,a.GridComponent,a.DataZoomComponent,a.VisualMapComponent];n.use(l(l([],c,!0),s,!0))},524(e,t,r){r.d(t,{sg:()=>x,$N:()=>b,AZ:()=>y,ZV:()=>w,w5:()=>I,uc:()=>C,t2:()=>v,m_:()=>m,nF:()=>E,uR:()=>h});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function a(e,t){void 0===t&&(t={});var r=t.locale,a=void 0===r?"zh-CN":r,i=t.timeZone,l=void 0===i?"Asia/Shanghai":i,c=o(t,["locale","timeZone"]),s="string"==typeof e||"number"==typeof e?new Date(e):e;return new Intl.DateTimeFormat(a,n({timeZone:l},c)).format(s)}function i(e,t){return void 0===t&&(t={}),a(e,n(n({},t),{timeStyle:void 0,hour:void 0,minute:void 0,second:void 0,fractionalSecondDigits:void 0}))}function l(e,t){return void 0===t&&(t={}),a(e,n(n({},t),{dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0,hour:t.hour||"2-digit",minute:t.minute||"2-digit"}))}function c(e,t){var r=t.locale,n=void 0===r?"zh-CN":r,o=t.currency,a=t.currencyDisplay,i=void 0===a?"symbol":a,l=t.digits,c=void 0===l?2:l,s=t.useGrouping,u=void 0===s||s;return new Intl.NumberFormat(n,{style:"currency",currency:o,currencyDisplay:i,minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:u}).format(e)}function s(e,t){void 0===t&&(t={});var r=t.locale,n=void 0===r?"zh-CN":r,o=t.digits,a=void 0===o?2:o,i=t.useGrouping,l=void 0===i||i;return new Intl.NumberFormat(n,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:l}).format(e)}function u(e,t){void 0===t&&(t={});var r=t.locale,a=void 0===r?"zh-CN":r,i=t.digits,l=void 0===i?2:i,c=t.useGrouping,s=void 0===c||c,u=o(t,["locale","digits","useGrouping"]);return new Intl.NumberFormat(a,n({minimumFractionDigits:l,maximumFractionDigits:l,useGrouping:s},u)).format(e)}function d(){return"undefined"!=typeof window&&window.navigator.language||"zh-CN"}function f(){return Intl.DateTimeFormat().resolvedOptions().timeZone}var p=function(){function e(e){void 0===e&&(e={}),this.locale=e.locale||d(),this.timeZone=e.timeZone||f()}return e.prototype.setLocale=function(e){this.locale=e},e.prototype.getLocale=function(){return this.locale},e.prototype.setTimeZone=function(e){this.timeZone=e},e.prototype.getTimeZone=function(){return this.timeZone},e.prototype.formatDateTime=function(e,t){return void 0===t&&(t={}),a(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatDate=function(e,t){return void 0===t&&(t={}),i(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatTime=function(e,t){return void 0===t&&(t={}),l(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatCurrency=function(e,t){return c(e,n(n({},t),{locale:this.locale}))},e.prototype.formatPercent=function(e,t){return void 0===t&&(t={}),s(e,n(n({},t),{locale:this.locale}))},e.prototype.formatNumber=function(e,t){return void 0===t&&(t={}),u(e,n(n({},t),{locale:this.locale}))},e}();new p;function h(){var e;if("function"==typeof(null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();var t=Date.now().toString(36),r=Math.random().toString(36).substring(2,15);return"".concat(t,"-").concat(r,"-").concat(Math.random().toString(36).substring(2,10))}function m(){return Math.random().toString(36).substring(2,10)}function v(e){return"".concat(e,"-").concat(m())}var g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y={click:"click",mousemove:"mousemove",mouseup:"mouseup",mousedown:"mousedown",mouseover:"mouseover",mouseout:"mouseout",globalout:"globalout"};function b(e,t){var r=g({},e);return Object.keys(t).forEach(function(n){t[n]instanceof Object&&n in e&&e[n]instanceof Object?r[n]=b(e[n],t[n]):r[n]=t[n]}),r}function x(e,t){var r=null;return function(){for(var n=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r&&clearTimeout(r),r=setTimeout(function(){e.apply(n,o),r=null},t)}}function E(e,t){var r=0;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=Date.now();a-r>=t&&(e.apply(this,n),r=a)}}function C(){var e="undefined"==typeof window,t=!e,r=void 0!==window.wx&&"function"==typeof window.wx.getSystemInfoSync,n=void 0!==window.my&&"function"==typeof window.my.getSystemInfoSync;return{isServer:e,isClient:t,isWeapp:r,isAlipay:n,isWeb:t&&!r&&!n}}function w(e,t,r){void 0===t&&(t=2),void 0===r&&(r={});var n=r.useGrouping,o=void 0===n||n,a=r.locale,i=void 0===a?"zh-CN":a;return new Intl.NumberFormat(i,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:o}).format(e)}function I(e){var t=e.replace("#","");return(299*parseInt(t.substring(0,2),16)+587*parseInt(t.substring(2,4),16)+114*parseInt(t.substring(4,6),16))/1e3>128?"#000000":"#FFFFFF"}},163(e){e.exports=require("echarts/components")},348(e){e.exports=require("echarts/core")},613(e){e.exports=require("echarts/renderers")},15(e){e.exports=require("react")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{AnnotationPresets:()=>ct,BarChart:()=>k.default,BaseChart:()=>I,BoxplotChart:()=>J,CandlestickChart:()=>_,EnhancedThemeEditor:()=>Re,ErrorBoundary:()=>je,FunnelChart:()=>M.default,GaugeChart:()=>P.default,GraphChart:()=>H,H5Adapter:()=>X.default,HeatmapChart:()=>R.default,LazyChartRegistry:()=>nt,LineChart:()=>T.default,PRESET_THEMES:()=>we,ParallelChart:()=>K,PieChart:()=>O.default,RadarChart:()=>D.default,SankeyChart:()=>L.default,ScatterChart:()=>A.default,SunburstChart:()=>j.default,ThemeEditor:()=>ke,TreeMapChart:()=>N.default,WeappAdapter:()=>ee.default,WordCloudChart:()=>V,convertAnnotationToMarkArea:()=>at,convertAnnotationToMarkLine:()=>ot,convertAnnotationToScatter:()=>it,createCompositeAnnotation:()=>st,createLazyChart:()=>rt,darkTheme:()=>oe,debounce:()=>S.sg,deepMerge:()=>S.$N,defaultTheme:()=>ne,detectPlatform:()=>$.li,events:()=>S.AZ,exportChart:()=>vt,formatNumber:()=>S.ZV,getAdapter:()=>$.cK,getContrastColor:()=>S.w5,getDarkThemes:()=>xe,getEnv:()=>$._$,getEnvironment:()=>S.uc,getLightThemes:()=>be,getRegisteredThemes:()=>me,getTheme:()=>pe,getThemeByName:()=>ve,getThemesByTag:()=>ye,name:()=>Ht,prefixedId:()=>S.t2,preloadAllCharts:()=>tt,preloadChart:()=>et,registerTheme:()=>he,shortId:()=>S.m_,switchTheme:()=>ge,themeManager:()=>Ie,throttle:()=>S.nF,useAnnotation:()=>lt,useChart:()=>Tt,useChartData:()=>Pt,useChartTheme:()=>Rt,useChartTools:()=>Ft,useDataPolling:()=>jt,useDataTransform:()=>bt,useEvents:()=>At,useExport:()=>zt,useFullscreen:()=>Lt,useLoading:()=>Dt,useOption:()=>kt,useResize:()=>Ot,useResponsive:()=>Mt,useTableTransform:()=>xt,useThemeSwitcher:()=>Nt,useTimeSeriesTransform:()=>Et,uuid:()=>S.uR,version:()=>Bt,withErrorBoundary:()=>Le,withLazyLoad:()=>Xe});var o,a=r(15),i=r.n(a),l=r(251),c={};function s(e){return c[e]}!function(e){e.PANEL_SHOW="debugPanelShow",e.PANEL_HIDE="debugPanelHide",e.TAB_CHANGE="debugPanelTabChange",e.INFO_UPDATE="debugPanelInfoUpdate"}(o||(o={}));var u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},d=function(e){var t=e.debugInfo,r=e.options,n=void 0===r?{}:r,l=e.onEvent,c=(0,a.useState)(n.autoExpand||!1),s=c[0],d=c[1],p=(0,a.useState)(n.defaultTab||"instance"),h=p[0],m=p[1],v=(0,a.useRef)(null),g=n.position,y=void 0===g?"bottom-right":g,b=n.width,x=void 0===b?400:b,E=n.height,C=void 0===E?300:E,w=function(e){m(e),null==l||l({type:o.TAB_CHANGE,data:{tab:e}})},I=function(){var e=t.instance;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"图表实例信息"),i().createElement("div",{style:f.debugInfoGrid},i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"ID:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.id)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"类型:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.type)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"版本:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.version)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"渲染器:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.renderer)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"宽度:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.width)||"N/A","px")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"高度:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.height)||"N/A","px")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"平台:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.platform)||"N/A"))))},S=function(){var e=t.config;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"配置信息"),i().createElement("div",{style:f.debugConfig},i().createElement("pre",{style:f.pre},JSON.stringify(e,null,2))))},T=function(){var e,r,n=t.data;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"数据信息"),i().createElement("div",{style:f.debugInfoGrid},i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"系列数量:"),i().createElement("span",{style:f.debugInfoValue},(null===(e=null==n?void 0:n.series)||void 0===e?void 0:e.length)||0)),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"总数据量:"),i().createElement("span",{style:f.debugInfoValue},(null==n?void 0:n.totalDataCount)||0)),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"当前数据量:"),i().createElement("span",{style:f.debugInfoValue},(null==n?void 0:n.currentDataCount)||0))),i().createElement("div",{style:f.debugDataSeries},i().createElement("h4",{style:f.h4},"系列数据"),null===(r=null==n?void 0:n.series)||void 0===r?void 0:r.map(function(e,t){var r,n;return i().createElement("div",{key:t,style:f.debugDataSeriesItem},i().createElement("h5",{style:f.h5},"系列 ",t+1,": ",e.name||"未命名"),i().createElement("pre",{style:f.pre},JSON.stringify(null===(r=e.data)||void 0===r?void 0:r.slice(0,5),null,2),"..."),i().createElement("div",{style:f.debugSeriesInfo},i().createElement("span",null,"数据量: ",(null===(n=e.data)||void 0===n?void 0:n.length)||0)))})))},k=function(){var e=t.performance;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"性能信息"),i().createElement("div",{style:f.debugInfoGrid},i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"初始化时间:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.initTime)||0,"ms")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"渲染时间:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.renderTime)||0,"ms")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"更新时间:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.updateTime)||0,"ms")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"数据大小:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.dataSize)||0," bytes")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"帧率:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.frameRate)||0," FPS"))),i().createElement("div",{style:f.debugPerformanceChart}))},O=function(){var e=t.events;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"事件信息"),i().createElement("div",{style:f.debugEventsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:f.debugEventItem},i().createElement("div",{style:f.debugEventHeader},i().createElement("span",{style:f.debugEventType},e.type),i().createElement("span",{style:f.debugEventTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:f.debugEventParams},i().createElement("pre",{style:f.pre},JSON.stringify(e.params,null,2))))}),(!e||0===e.length)&&i().createElement("div",{style:f.debugEmptyState},"暂无事件记录")))},A=function(){var e=t.errors;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"错误信息"),i().createElement("div",{style:f.debugErrorsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:f.debugErrorItem},i().createElement("div",{style:f.debugErrorHeader},i().createElement("span",{style:f.debugErrorType},e.type),i().createElement("span",{style:f.debugErrorTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:f.debugErrorMessage},e.message),e.stack&&i().createElement("div",{style:f.debugErrorStack},i().createElement("pre",{style:f.pre},e.stack)))}),(!e||0===e.length)&&i().createElement("div",{style:f.debugEmptyState},"暂无错误记录")))},D=function(){return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"调试工具"),i().createElement("div",{style:f.debugToolsGrid},i().createElement("button",{style:f.debugToolButton},"导出配置"),i().createElement("button",{style:f.debugToolButton},"导出数据"),i().createElement("button",{style:f.debugToolButton},"刷新图表"),i().createElement("button",{style:f.debugToolButton},"清空数据"),i().createElement("button",{style:f.debugToolButton},"性能分析"),i().createElement("button",{style:f.debugToolButton},"重置图表")))},R=u(u(u(u(u(u({position:"fixed",zIndex:9999,backgroundColor:"rgba(255, 255, 255, 0.95)",border:"1px solid #e0e0e0",borderRadius:"4px",boxShadow:"0 2px 12px 0 rgba(0, 0, 0, 0.1)",fontFamily:"monospace",fontSize:"12px",overflow:"hidden"},"top-left"===y&&{top:"10px",left:"10px"}),"top-right"===y&&{top:"10px",right:"10px"}),"bottom-left"===y&&{bottom:"10px",left:"10px"}),"bottom-right"===y&&{bottom:"10px",right:"10px"}),s&&{width:x,height:C}),f.tarovizDebugPanel);return i().createElement("div",{ref:v,style:R},i().createElement("div",{style:f.debugPanelHeader},i().createElement("div",{style:f.debugPanelTitle},i().createElement("span",{style:f.debugPanelLogo},"🐛"),i().createElement("span",null,"TaroViz Debug Panel")),i().createElement("button",{style:f.debugPanelToggle,onClick:function(){var e=!s;d(e),null==l||l({type:e?o.PANEL_SHOW:o.PANEL_HIDE})},title:s?"收起":"展开"},s?"▼":"▶")),s&&i().createElement(i().Fragment,null,i().createElement("div",{style:f.debugPanelTabs},i().createElement("button",{style:u(u({},f.debugTab),"instance"===h&&f.debugTabActive),onClick:function(){return w("instance")},title:"实例信息"},"实例"),i().createElement("button",{style:u(u({},f.debugTab),"config"===h&&f.debugTabActive),onClick:function(){return w("config")},title:"配置信息"},"配置"),i().createElement("button",{style:u(u({},f.debugTab),"data"===h&&f.debugTabActive),onClick:function(){return w("data")},title:"数据信息"},"数据"),i().createElement("button",{style:u(u({},f.debugTab),"performance"===h&&f.debugTabActive),onClick:function(){return w("performance")},title:"性能信息"},"性能"),i().createElement("button",{style:u(u({},f.debugTab),"events"===h&&f.debugTabActive),onClick:function(){return w("events")},title:"事件信息"},"事件"),i().createElement("button",{style:u(u({},f.debugTab),"errors"===h&&f.debugTabActive),onClick:function(){return w("errors")},title:"错误信息"},"错误"),i().createElement("button",{style:u(u({},f.debugTab),"tools"===h&&f.debugTabActive),onClick:function(){return w("tools")},title:"调试工具"},"工具")),i().createElement("div",{style:f.debugPanelBody},function(){switch(h){case"instance":return I();case"config":return S();case"data":return T();case"performance":return k();case"events":return O();case"errors":return A();case"tools":return D();default:return i().createElement("div",null,"未知标签页")}}())))},f={tarovizDebugPanel:{transition:"all 0.3s ease"},debugPanelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 12px",backgroundColor:"#f5f5f5",borderBottom:"1px solid #e0e0e0",cursor:"pointer"},debugPanelTitle:{display:"flex",alignItems:"center",gap:"8px",fontWeight:"bold",color:"#333"},debugPanelLogo:{fontSize:"14px"},debugPanelToggle:{background:"none",border:"none",fontSize:"12px",cursor:"pointer",color:"#666",padding:"4px"},debugPanelTabs:{display:"flex",borderBottom:"1px solid #e0e0e0",overflowX:"auto",whiteSpace:"nowrap"},debugTab:{padding:"8px 12px",background:"none",border:"none",borderBottom:"2px solid transparent",cursor:"pointer",fontSize:"12px",color:"#666",transition:"all 0.2s ease"},debugTabActive:{color:"#1890ff",borderBottomColor:"#1890ff",fontWeight:"bold"},debugPanelBody:{height:"calc(100% - 70px)",overflow:"auto"},debugPanelContent:{padding:"12px"},h3:{margin:"0 0 12px 0",fontSize:"14px",color:"#333"},h4:{margin:"12px 0 8px 0",fontSize:"13px",color:"#666"},h5:{margin:"8px 0 4px 0",fontSize:"12px",color:"#666"},debugInfoGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px",marginBottom:"12px"},debugInfoItem:{display:"flex",justifyContent:"space-between",padding:"4px 8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugInfoLabel:{fontWeight:"bold",color:"#666"},debugInfoValue:{color:"#333"},debugConfig:{backgroundColor:"#f5f5f5",padding:"8px",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},pre:{margin:"0",fontSize:"11px",overflow:"auto"},debugDataSeries:{marginTop:"12px"},debugDataSeriesItem:{marginBottom:"12px",padding:"8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugSeriesInfo:{marginTop:"4px",fontSize:"11px",color:"#666"},debugPerformanceChart:{marginTop:"12px",height:"120px",backgroundColor:"#f9f9f9",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"},debugEventsList:{maxHeight:"200px",overflow:"auto"},debugEventItem:{marginBottom:"8px",padding:"8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugEventHeader:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},debugEventType:{fontWeight:"bold",color:"#333"},debugEventTime:{fontSize:"10px",color:"#999"},debugEventParams:{fontSize:"11px",overflow:"auto",maxHeight:"80px"},debugErrorsList:{maxHeight:"200px",overflow:"auto"},debugErrorItem:{marginBottom:"8px",padding:"8px",backgroundColor:"#fff1f0",border:"1px solid #ffccc7",borderRadius:"4px"},debugErrorHeader:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},debugErrorType:{fontWeight:"bold",color:"#f5222d"},debugErrorTime:{fontSize:"10px",color:"#999"},debugErrorMessage:{color:"#f5222d",marginBottom:"4px"},debugErrorStack:{fontSize:"10px",maxHeight:"100px",overflow:"auto"},debugToolsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},debugToolButton:{padding:"8px 12px",backgroundColor:"#f0f0f0",border:"1px solid #e0e0e0",borderRadius:"4px",cursor:"pointer",fontSize:"12px",transition:"all 0.2s ease"},debugEmptyState:{textAlign:"center",color:"#999",padding:"16px"}};var p,h=function(){return h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},m=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},v=function(){function e(){this.debugInfo={},this.isEnabled=!1,this.eventHandlers=new Map,this.maxEvents=100,this.maxErrors=50,this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]}}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.init=function(){this.isEnabled=!0},e.prototype.enable=function(){this.isEnabled=!0},e.prototype.disable=function(){this.isEnabled=!1},e.prototype.getStatus=function(){return this.isEnabled},e.prototype.getDebugInfo=function(){return this.debugInfo},e.prototype.updateDebugInfo=function(e){this.isEnabled&&(this.debugInfo=h(h({},this.debugInfo),e),this.emitEvent(o.INFO_UPDATE,{info:e}))},e.prototype.updateInstanceInfo=function(e){this.updateDebugInfo({instance:e})},e.prototype.updateConfig=function(e){this.updateDebugInfo({config:e})},e.prototype.updateData=function(e){this.updateDebugInfo({data:e})},e.prototype.updatePerformance=function(e){this.updateDebugInfo({performance:e})},e.prototype.addEvent=function(e,t){if(this.isEnabled){var r={type:e,timestamp:Date.now(),params:t};this.debugInfo.events&&this.debugInfo.events.length>=this.maxEvents&&this.debugInfo.events.shift(),this.debugInfo.events=m(m([],this.debugInfo.events||[],!0),[r],!1),this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.addError=function(e,t,r){if(this.isEnabled){var n={type:e,message:t,stack:r,timestamp:Date.now()};this.debugInfo.errors&&this.debugInfo.errors.length>=this.maxErrors&&this.debugInfo.errors.shift(),this.debugInfo.errors=m(m([],this.debugInfo.errors||[],!0),[n],!1),this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.clear=function(){this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]},this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(r=this.eventHandlers.get(e))||void 0===r||r.add(t)},e.prototype.off=function(e,t){var r;t?null===(r=this.eventHandlers.get(e))||void 0===r||r.delete(t):this.eventHandlers.delete(e)},e.prototype.emitEvent=function(e,t){var r=this.eventHandlers.get(e);r&&r.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.setMaxEvents=function(e){this.maxEvents=e},e.prototype.setMaxErrors=function(e){this.maxErrors=e},e}().getInstance();!function(e){e.MONITORING_START="performanceMonitoringStart",e.MONITORING_END="performanceMonitoringEnd",e.METRIC_UPDATE="performanceMetricUpdate",e.ANALYSIS_COMPLETE="performanceAnalysisComplete"}(p||(p={}));var g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},b=function(){function e(e){void 0===e&&(e={});var t,r=this;this.metrics=new Map,this.eventHandlers=new Map,this.isMonitoring=!1,this.startTime=0,this.sampleIntervalId=null,this.frameRateHistory=[],this.lastFrameTime=0,this.rafId=null,this.config=g({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!1},e),null===(t=this.config.metrics)||void 0===t||t.forEach(function(e){r.metrics.set(e,[])}),this.config.autoStart&&this.start()}return e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.resetInstance=function(){e.instance&&(e.instance.stop(),e.instance=null)},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),null===(r=this.eventHandlers.get(e))||void 0===r||r.push(t)},e.prototype.off=function(e,t){var r=this.eventHandlers.get(e);if(r){var n=r.indexOf(t);n>-1&&r.splice(n,1)}},e.prototype.emit=function(e,t){var r=this.eventHandlers.get(e);null==r||r.forEach(function(r){try{r({type:e,data:t})}catch(e){}})},e.prototype.start=function(){var e=this;!this.isMonitoring&&this.config.enabled&&(this.isMonitoring=!0,this.startTime=Date.now(),this.lastFrameTime=performance.now(),this.config.sampleInterval&&this.config.realTime&&(this.sampleIntervalId=setInterval(function(){e.sampleMetrics()},this.config.sampleInterval)),this.startFrameRateMonitoring(),this.emit(p.MONITORING_START))},e.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(p.MONITORING_END))},e.prototype.dispose=function(){this.stop(),this.metrics.clear(),this.eventHandlers.clear(),this.frameRateHistory=[],e.instance===this&&(e.instance=null)},e.prototype.startFrameRateMonitoring=function(){var e=this,t=function(){var r;if(e.isMonitoring){var n=performance.now(),o=n-e.lastFrameTime,a=o>0?Math.round(1e3/o):0,i=null!==(r=e.config.maxSamples)&&void 0!==r?r:100;e.frameRateHistory.length>=i&&e.frameRateHistory.shift(),e.frameRateHistory.push(a),e.lastFrameTime=n,e.rafId=requestAnimationFrame(t)}};this.rafId=requestAnimationFrame(t)},e.prototype.stopFrameRateMonitoring=function(){null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.frameRateHistory=[]},e.prototype.sampleMetrics=function(){var e,t;if(this.isMonitoring){if((null===(e=this.config.metrics)||void 0===e?void 0:e.includes("frameRate"))&&this.frameRateHistory.length>0){var r=this.frameRateHistory.reduce(function(e,t){return e+t},0)/this.frameRateHistory.length;this.recordMetric("frameRate",r,"FPS")}if((null===(t=this.config.metrics)||void 0===t?void 0:t.includes("memoryUsage"))&&void 0!==performance.memory){var n=(performance.memory.usedJSHeapSize/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(n),"MB")}}},e.prototype.recordMetric=function(e,t,r,n){var o;if(this.config.enabled&&(null===(o=this.config.metrics)||void 0===o?void 0:o.includes(e))){var a={type:e,value:t,unit:r,timestamp:Date.now(),description:n},i=this.metrics.get(e)||[];i.push(a),this.config.maxSamples&&i.length>this.config.maxSamples&&i.shift(),this.metrics.set(e,i),this.emit(p.METRIC_UPDATE,a)}},e.prototype.recordInitTime=function(e){this.recordMetric("initTime",e,"ms","图表初始化耗时")},e.prototype.recordRenderTime=function(e){this.recordMetric("renderTime",e,"ms","图表渲染耗时")},e.prototype.recordUpdateTime=function(e){this.recordMetric("updateTime",e,"ms","图表更新耗时")},e.prototype.recordDataSize=function(e){try{var t=new Blob([JSON.stringify(e)]).size/1024;this.recordMetric("dataSize",t,"KB","图表数据大小")}catch(e){}},e.prototype.analyze=function(){var e={},t={},r={},n={},o=0,a=100,i=[];this.metrics.forEach(function(a,i){if(0!==a.length){o+=a.length,n[i]=y([],a,!0);var l=a.reduce(function(e,t){return e+t.value},0);e[i]=parseFloat((l/a.length).toFixed(2)),t[i]=Math.max.apply(Math,a.map(function(e){return e.value})),r[i]=Math.min.apply(Math,a.map(function(e){return e.value}))}}),e.renderTime>100&&(a-=20,i.push("渲染时间过长,建议优化数据处理或减少图表复杂度")),e.updateTime>50&&(a-=15,i.push("更新时间过长,建议优化数据更新逻辑")),e.frameRate<30&&(a-=25,i.push("帧率过低,建议减少动画效果或优化渲染逻辑")),e.dataSize>100&&(a-=10,i.push("数据量过大,建议进行数据压缩或分页处理")),a=Math.max(0,Math.min(100,a));var l={averages:e,maxValues:t,minValues:r,trends:n,score:a,suggestions:i,totalSamples:o,duration:Date.now()-this.startTime};return this.emit(p.ANALYSIS_COMPLETE,l),l},e.prototype.generateReport=function(e){void 0===e&&(e={});var t=this.analyze(),r=g({format:"json",includeCharts:!1,includeSuggestions:!0,includeDetailedData:!1},e);switch(r.format){case"json":default:return this.generateJsonReport(t,r);case"csv":return this.generateCsvReport(t,r);case"html":return this.generateHtmlReport(t,r)}},e.prototype.generateJsonReport=function(e,t){var r={timestamp:(new Date).toISOString(),duration:e.duration,score:e.score,totalSamples:e.totalSamples};return t.includeSuggestions&&(r.suggestions=e.suggestions),t.includeDetailedData&&(r.averages=e.averages,r.maxValues=e.maxValues,r.minValues=e.minValues,r.trends=e.trends),r},e.prototype.generateCsvReport=function(e,t){var r="Metric,Type,Value,Unit\n";return Object.entries(e.averages).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Average,").concat(n,",ms\n")}),Object.entries(e.maxValues).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Max,").concat(n,",ms\n")}),Object.entries(e.minValues).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Min,").concat(n,",ms\n")}),r},e.prototype.generateHtmlReport=function(e,t){var r='\n <!DOCTYPE html>\n <html>\n <head>\n <title>TaroViz 性能报告</title>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; }\n .report-header { background: #f0f0f0; padding: 20px; border-radius: 8px; }\n .score { font-size: 48px; font-weight: bold; color: #4CAF50; }\n .metric-section { margin: 20px 0; }\n .metric-table { border-collapse: collapse; width: 100%; }\n .metric-table th, .metric-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }\n .metric-table th { background-color: #f2f2f2; }\n .suggestions { background: #fff3cd; padding: 15px; border-radius: 8px; margin: 20px 0; }\n </style>\n </head>\n <body>\n <div class="report-header">\n <h1>TaroViz 性能报告</h1>\n <p>生成时间: '.concat((new Date).toISOString(),"</p>\n <p>监控时长: ").concat(Math.round(e.duration/1e3),' 秒</p>\n <div class="score">').concat(e.score," / 100</div>\n </div>\n ");return r+='\n <div class="metric-section">\n <h2>性能指标</h2>\n <table class="metric-table">\n <tr>\n <th>指标</th>\n <th>平均值</th>\n <th>最大值</th>\n <th>最小值</th>\n </tr>',Object.entries(e.averages).forEach(function(t){var n=t[0],o=t[1],a=e.maxValues[n],i=e.minValues[n];r+="\n <tr>\n <td>".concat(n,"</td>\n <td>").concat(o," ms</td>\n <td>").concat(a," ms</td>\n <td>").concat(i," ms</td>\n </tr>")}),r+="\n </table>\n </div>",t.includeSuggestions&&e.suggestions.length>0&&(r+='\n <div class="suggestions">\n <h2>性能建议</h2>\n <ul>',e.suggestions.forEach(function(e){r+="\n <li>".concat(e,"</li>")}),r+="\n </ul>\n </div>"),r+="\n </body>\n </html>"},e.prototype.getIsMonitoring=function(){return this.isMonitoring},e.prototype.getConfig=function(){return g({},this.config)},e.prototype.updateConfig=function(e){this.config=g(g({},this.config),e)},e.prototype.getAllMetrics=function(){return new Map(this.metrics)},e.prototype.getMetricsByType=function(e){return this.metrics.get(e)||[]},e.prototype.clearMetrics=function(){this.metrics.clear(),this.frameRateHistory=[],this.startTime=Date.now()},e.prototype.getScore=function(){return this.analyze().score},e.instance=null,e}();b.getInstance();function x(e,t){return void 0===e?t:"number"==typeof e?"".concat(e,"px"):e}function E(e){if(!e)return 0;var t=0;if(e.series)for(var r=0,n=Array.isArray(e.series)?e.series:[e.series];r<n.length;r++){var o=n[r];o.data&&(Array.isArray(o.data)?t+=o.data.length:"object"==typeof o.data&&(t+=Object.keys(o.data).length))}return t}var C=r(412),w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},w.apply(this,arguments)};const I=function(e){var t=e.chartId,r=e.option,n=e.animation,o=e.debug,u=e.width,f=void 0===u?"100%":u,p=e.height,h=void 0===p?"300px":p,m=e.theme,g=e.autoResize,y=void 0===g||g,I=e.direction,S=void 0===I?"ltr":I,T=e.onInit,k=(e.onClick,e.onDataZoom,e.style),O=e.className,A=(e.children,e.virtualScroll),D=void 0!==A&&A,R=e.virtualScrollPageSize,P=void 0===R?100:R,M=e.virtualScrollPreloadSize,N=void 0===M?50:M,j=e.enablePerformanceMonitoring,L=void 0!==j&&j,z=e.onPerformance,F=(e.enableZoom,e.onZoom),H=e.enableDataFiltering,B=void 0!==H&&H,U=e.filters,_=void 0===U?{}:U,G=e.onDataFiltered,W=e.enableLegendInteraction,V=void 0!==W&&W,Z=e.legendInteractionMode,q=void 0===Z?"single":Z,J=e.onLegendSelect,Y=e.onLegendUnselect,Q=(e.onLegendSelectAll,e.onLegendInverseSelect,e.enableCustomTooltip),K=void 0!==Q&&Q,$=e.customTooltipContent,X=e.customTooltipStyle,ee=e.onTooltipShow,te=e.onTooltipHide,re=(e.onExport,e.linkageConfig),ne=void 0===re?{}:re,oe=e.onDataUpdate,ae=e.dataUpdateOptions,ie=void 0===ae?{}:ae,le=(0,a.useRef)(null),ce=(0,a.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0}),se=(0,a.useRef)({currentPage:0,totalPages:1,totalDataCount:0,isScrolling:!1}),ue=(0,a.useRef)(r),de=(0,a.useRef)(null),fe=(0,a.useRef)(null),pe=(0,a.useRef)(null),he=(0,a.useMemo)(function(){return o?"boolean"==typeof o?{enabled:o,autoExpand:!1}:w({enabled:!0},o):null},[o]),me=(0,a.useMemo)(function(){if(r){var e=w({},r);B&&_&&Object.keys(_).length>0&&(e=JSON.parse(JSON.stringify(e))).series&&Array.isArray(e.series)&&(e.series=e.series.map(function(e){if(e.data&&Array.isArray(e.data)){var t=function(e,t){return t&&0!==Object.keys(t).length?e.filter(function(e){for(var r,n,o=0,a=Object.entries(t);o<a.length;o++){var i=a[o],l=i[0],c=i[1];if(e[l]!==c&&!(null===(n=null===(r=e[l])||void 0===r?void 0:r.includes)||void 0===n?void 0:n.call(r,c)))return!1}return!0}):e}(e.data,_);if(G&&G(t,_),D){se.current.totalDataCount=t.length,se.current.totalPages=Math.ceil(t.length/P);var r=se.current.currentPage*P,n=Math.min(r+P+N,t.length);return w(w({},e),{data:t.slice(r,n)})}return w(w({},e),{data:t})}return e}));var t=E(e),o=(0,l.ek)(n,t);return w(w({},e),o)}},[r,n,B,_,D,P,N,G]),ve=(0,a.useCallback)(function(e){var r,n;le.current=e,de.current=e,L&&(pe.current=b.getInstance({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),ce.current.initStartTime=Date.now(),t&&function(e,t){if(c[e])try{c[e].dispose()}catch(e){}c[e]=t}(t,e),e&&(ne.enableClickLinkage&&t&&ne.linkedChartIds&&e.on("click",function(e){ne.linkedChartIds.forEach(function(t){var r=s(t);r&&r.dispatchAction({type:"highlight",name:e.name})})}),e.on("datazoom",function(e){if(F&&F({start:e.start||0,end:e.end||100,dataZoomIndex:e.dataZoomIndex||0}),D&&!se.current.isScrolling){se.current.isScrolling=!0;var r=Math.floor((e.start||0)/100*se.current.totalPages);r!==se.current.currentPage&&(se.current.currentPage=r),setTimeout(function(){se.current.isScrolling=!1},100)}ne.enableZoomLinkage&&t&&ne.linkedChartIds&&ne.linkedChartIds.forEach(function(t){var r=s(t);r&&r.dispatchAction({type:"dataZoom",start:e.start,end:e.end,dataZoomIndex:e.dataZoomIndex})})}),V&&e.on("legendselectchanged",function(r){var n=r.name,o=r.selected;if(ne.enableLegendLinkage&&t&&ne.linkedChartIds&&ne.linkedChartIds.forEach(function(e){var t=s(e);t&&t.setOption({legend:{selected:o}})}),"single"===q){var a={};Object.keys(o).forEach(function(e){a[e]=e===n}),e.setOption({legend:{selected:a}}),null==J||J({name:n,selected:a})}else o[n]?null==J||J({name:n,selected:o}):null==Y||Y({name:n,selected:o})}),K&&$&&(e.on("tooltipshow",function(e){return null==ee?void 0:ee(e)}),e.on("tooltiphide",function(e){return null==te?void 0:te(e)}),e.setOption({tooltip:w({formatter:function(e){return String($(e))}},X&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})}))),(null===(r=fe.current)||void 0===r?void 0:r.enabled)&&(n={instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof f?f:void 0,height:"number"==typeof h?h:void 0,platform:"web"},config:me,data:{series:Array.isArray(null==me?void 0:me.series)?me.series:[],totalDataCount:E(me),currentDataCount:E(me)},performance:{initTime:0,renderTime:0,dataSize:JSON.stringify(me).length}},v.updateDebugInfo(n)),null==T||T(e),ce.current.initEndTime=Date.now()},[t,L,T,ne,D,F,V,q,J,Y,K,$,X,ee,te,me,f,h]);(0,a.useEffect)(function(){if(le.current&&z){var e=ce.current;z({renderTime:e.renderEndTime-e.renderStartTime,initTime:e.initEndTime-e.initStartTime,updateTime:e.updateEndTime-e.updateStartTime,dataSize:JSON.stringify(r).length})}},[r,z]),(0,a.useEffect)(function(){if(oe&&!1!==(null==ie?void 0:ie.enabled)){var e=ue.current;e!==r&&(oe(e,r),ue.current=r)}},[r,oe,ie]),(0,a.useEffect)(function(){return function(){t&&function(e){if(c[e]){try{c[e].dispose()}catch(e){}delete c[e]}}(t),pe.current&&(pe.current.dispose(),pe.current=null),de.current&&de.current.dispose()}},[t]);var ge=w({},function(e,t,r,n){return w({width:x(e,"100%"),height:x(t,"300px"),direction:r},n)}(f,h,S,k)),ye={option:me,width:f,height:h,theme:m,autoResize:y,loading:!1,onChartInit:ve,renderer:"canvas",onEvents:{},chartType:"base",style:ge,className:O};return i().createElement(i().Fragment,null,i().createElement(C.A,w({},ye)),(null==he?void 0:he.enabled)&&i().createElement(d,{options:he,debugInfo:{instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof f?f:void 0,height:"number"==typeof h?h:void 0,platform:"web"},config:r,data:{series:Array.isArray(null==r?void 0:r.series)?r.series:[],totalDataCount:E(r),currentDataCount:E(r)},performance:{initTime:ce.current.initEndTime-ce.current.initStartTime,renderTime:ce.current.renderEndTime-ce.current.renderStartTime,updateTime:0,dataSize:JSON.stringify(r).length}}}))};var S=r(524),T=r(127),k=r(188),O=r(481),A=r(589),D=r(443),R=r(835),P=r(334),M=r(133),N=r(37),j=r(673),L=r(490),z=function(){return z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},z.apply(this,arguments)},F=(0,a.memo)(function(e){return i().createElement(C.A,z({},e,{chartType:"graph-chart"}))});F.displayName="GraphChart";const H=F;var B=function(){return B=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)},U=(0,a.memo)(function(e){return i().createElement(C.A,B({},e,{chartType:"candlestick-chart"}))});U.displayName="CandlestickChart";const _=U;var G=function(){return G=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G.apply(this,arguments)},W=(0,a.memo)(function(e){return i().createElement(C.A,G({},e,{chartType:"wordcloud-chart"}))});W.displayName="WordCloudChart";const V=W;var Z=function(){return Z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Z.apply(this,arguments)},q=(0,a.memo)(function(e){return i().createElement(C.A,Z({},e,{chartType:"boxplot"}))});q.displayName="BoxplotChart";const J=q;var Y=function(){return Y=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Y.apply(this,arguments)},Q=(0,a.memo)(function(e){return i().createElement(C.A,Y({},e,{chartType:"parallel"}))});Q.displayName="ParallelChart";const K=Q;var $=r(574),X=r(123),ee=r(999),te=function(){return te=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},te.apply(this,arguments)},re=new Map,ne={theme:"default",name:"Default",description:"简洁现代的默认主题",type:"light",mode:"light",darkMode:!1,tags:["modern","clean","default"],colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"#ffffff",textColor:"#333333",textColorSecondary:"#666666",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#333333",backgroundColor:"transparent",borderColor:"#e8e8e8"},axis:{textColor:"#666666",lineColor:"#e8e8e8",tickColor:"#e8e8e8",splitLineColor:"#f0f0f0"},tooltip:{textColor:"#333333",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e8e8e8",borderRadius:4},title:{textColor:"#333333",subTextColor:"#666666"}}},oe={theme:"dark",name:"Dark",description:"优雅的深色主题,适合夜间使用",type:"dark",mode:"dark",darkMode:!0,tags:["dark","night","modern"],colors:["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff9f7f","#8d48e3","#dd79ff"],backgroundColor:"#1a1a2e",textColor:"#e8e8e8",textColorSecondary:"#a0a0a0",borderColor:"#2d2d44",dividerColor:"#252538",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#e8e8e8",backgroundColor:"transparent",borderColor:"#2d2d44"},axis:{textColor:"#a0a0a0",lineColor:"#2d2d44",tickColor:"#2d2d44",splitLineColor:"#252538"},tooltip:{textColor:"#e8e8e8",backgroundColor:"rgba(26, 26, 46, 0.95)",borderColor:"#2d2d44",borderRadius:4},title:{textColor:"#e8e8e8",subTextColor:"#a0a0a0"}}},ae={theme:"neon",name:"Neon",description:"赛博朋克霓虹风格,炫酷吸睛",type:"dark",mode:"dark",darkMode:!0,tags:["neon","cyberpunk","colorful","dark"],colors:["#00fff5","#ff00ff","#ffff00","#00ff00","#ff6b6b","#4ecdc4","#ffe66d","#95e1d3","#f38181"],backgroundColor:"#0d0d1a",textColor:"#ffffff",textColorSecondary:"#b0b0b0",borderColor:"#1a1a2e",dividerColor:"#1a1a2e",fontFamily:'"JetBrains Mono", "Fira Code", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 255, 245, 0.3)",gradients:!0},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(13, 13, 26, 0.95)",borderColor:"#00fff5",borderRadius:4,shadowColor:"rgba(0, 255, 245, 0.3)"}}},ie={theme:"glass",name:"Glass",description:"现代玻璃态设计,半透明质感",type:"light",mode:"light",darkMode:!1,tags:["glass","modern","minimal","light"],colors:["#667eea","#764ba2","#f093fb","#f5576c","#4facfe","#00f2fe","#43e97b","#38f9d7","#fa709a"],backgroundColor:"rgba(255, 255, 255, 0.8)",backgroundGradient:{start:"#f5f7fa",end:"#c3cfe2",angle:135},textColor:"#2d3748",textColorSecondary:"#718096",borderColor:"rgba(255, 255, 255, 0.5)",dividerColor:"rgba(255, 255, 255, 0.3)",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif",effects:{glassmorphism:!0,blur:10,shadows:!0,shadowColor:"rgba(0, 0, 0, 0.1)",borderRadius:"large"},chart:{tooltip:{textColor:"#2d3748",backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"rgba(255, 255, 255, 0.5)",borderRadius:12}}},le={theme:"pastel",name:"Pastel",description:"柔和粉彩配色,温馨舒适",type:"light",mode:"light",darkMode:!1,tags:["pastel","soft","gentle","light"],colors:["#ffb3ba","#ffdfba","#ffffba","#baffc9","#bae1ff","#f0b3ff","#b3fff0","#ffb3d9","#d9ffb3"],backgroundColor:"#fff9f5",textColor:"#5d5d5d",textColorSecondary:"#8a8a8a",borderColor:"#f0e6e0",dividerColor:"#f5f0eb",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",chart:{tooltip:{textColor:"#5d5d5d",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#f0e6e0",borderRadius:8}}},ce={theme:"sunset",name:"Sunset",description:"温暖日落渐变,夕阳余晖",type:"light",mode:"light",darkMode:!1,tags:["sunset","warm","gradient","light"],colors:["#ff6b6b","#feca57","#ff9ff3","#54a0ff","#5f27cd","#ff9f43","#ee5a24","#009432","#f368e0"],backgroundColor:"#fff5f0",backgroundGradient:{start:"#ffecd2",end:"#fcb69f",angle:135},textColor:"#4a4a4a",textColorSecondary:"#7a7a7a",borderColor:"#ffd5c8",dividerColor:"#ffebe6",fontFamily:"Quicksand, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(255, 107, 107, 0.2)",borderRadius:"medium"}},se={theme:"ocean",name:"Ocean",description:"深邃海洋蓝,宁静清新",type:"light",mode:"light",darkMode:!1,tags:["ocean","blue","calm","light"],colors:["#0077b6","#00b4d8","#90e0ef","#caf0f8","#03045e","#023e8a","#0096c7","#48cae4","#ade8f4"],backgroundColor:"#f0f8ff",backgroundGradient:{start:"#e0f2fe",end:"#bae6fd",angle:180},textColor:"#1e3a5f",textColorSecondary:"#4a6fa5",borderColor:"#cce7f5",dividerColor:"#e1f0f9",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(0, 119, 182, 0.15)"}},ue={theme:"cyber",name:"Cyber",description:"未来科技感,赛博朋克",type:"dark",mode:"dark",darkMode:!0,tags:["cyber","tech","futuristic","dark"],colors:["#00f5ff","#ff00ff","#00ff00","#ffff00","#ff0080","#8000ff","#00ff80","#ff8000","#0080ff"],backgroundColor:"#0a0a12",textColor:"#e0e0e0",textColorSecondary:"#808090",borderColor:"#1a1a2e",dividerColor:"#12121e",fontFamily:'"Orbitron", "Rajdhani", "JetBrains Mono", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 245, 255, 0.4)",gradients:!0,borderRadius:"none"},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(10, 10, 18, 0.95)",borderColor:"#00f5ff",borderRadius:0,shadowColor:"rgba(0, 245, 255, 0.4)"}}},de={theme:"retro",name:"Retro",description:"怀旧复古风格,温馨怀旧",type:"light",mode:"light",darkMode:!1,tags:["retro","vintage","nostalgic","light"],colors:["#d63031","#e17055","#fdcb6e","#00b894","#0984e3","#6c5ce7","#e84393","#00cec9","#fab1a0"],backgroundColor:"#fdf6e3",textColor:"#5c4b37",textColorSecondary:"#8b7355",borderColor:"#e8dcc8",dividerColor:"#f0e8d8",fontFamily:'"Courier Prime", "Courier New", monospace',effects:{shadows:!1,borderRadius:"small"}},fe={theme:"elegant",name:"Elegant",description:"低调雅致风格,精致品味",type:"light",mode:"light",darkMode:!1,tags:["elegant","minimal","sophisticated","light"],colors:["#2c3e50","#34495e","#7f8c8d","#95a5a6","#bdc3c7","#ecf0f1","#1abc9c","#16a085","#3498db"],backgroundColor:"#fafafa",textColor:"#2c3e50",textColorSecondary:"#7f8c8d",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'"Playfair Display", Georgia, serif',effects:{shadows:!0,shadowColor:"rgba(0, 0, 0, 0.08)",borderRadius:"medium"}};function pe(e){if(!e)return ne;var t;if(e.theme&&"string"==typeof e.theme){var r=re.get(e.theme);t=r||(e.darkMode?oe:ne)}else t=e.darkMode?oe:ne;return te(te({},t),e)}function he(e,t){re.set(e,te(te({},t),{name:e}))}function me(){return Array.from(re.values())}function ve(e){return re.get(e)}function ge(e,t){var r;"string"==typeof e?r=re.get(e)||ne:(r=e,e.name&&he(e.name,e));return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:r})),null==t||t(),r}function ye(e){return me().filter(function(t){var r;return null===(r=t.tags)||void 0===r?void 0:r.includes(e)})}function be(){return me().filter(function(e){return!e.darkMode})}function xe(){return me().filter(function(e){return e.darkMode})}var Ee={default:ne,dark:oe,walden:te(te({},ne),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),chalk:te(te({},ne),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),"purple-passion":te(te({},ne),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),"blue-green":te(te({},ne),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),golden:te(te({},ne),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),forest:te(te({},ne),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),neon:ae,glass:ie,pastel:le,sunset:ce,ocean:se,cyber:ue,retro:de,elegant:fe};Object.entries(Ee).forEach(function(e){var t=e[0],r=e[1];re.set(t,r)});var Ce=function(){return Ce=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)},we={default:{name:"default",type:"light",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#fafafa","--tv-text-color":"#333333","--tv-text-color-secondary":"#666666","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9d9d9","--tv-divider-color":"#f0f0f0","--tv-shadow-color":"rgba(0, 0, 0, 0.1)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},dark:{name:"dark",type:"dark",isDark:!0,variables:{"--tv-bg-color":"#1a1a2e","--tv-bg-color-secondary":"#16213e","--tv-text-color":"#e0e0e0","--tv-text-color-secondary":"#a0a0a0","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#404040","--tv-divider-color":"#303030","--tv-shadow-color":"rgba(0, 0, 0, 0.3)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},vintage:{name:"vintage",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fef9ef","--tv-bg-color-secondary":"#fcf5e9","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#d4a574","--tv-primary-color-hover":"#c49566","--tv-primary-color-active":"#b8895a","--tv-success-color":"#8db78e","--tv-warning-color":"#e6c87a","--tv-error-color":"#c97c6d","--tv-border-color":"#e0d5c7","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.1)","--tv-chart-color-1":"#d4a574","--tv-chart-color-2":"#8db78e","--tv-chart-color-3":"#e6c87a","--tv-chart-color-4":"#c97c6d","--tv-chart-color-5":"#9ab5a8","--tv-chart-color-6":"#c9b8d4","--tv-chart-color-7":"#a8c4d4","--tv-chart-color-8":"#d4c49a","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},macarons:{name:"macarons",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fefcf9","--tv-bg-color-secondary":"#f9f6f2","--tv-text-color":"#505050","--tv-text-color-secondary":"#757575","--tv-primary-color":"#60acf2","--tv-primary-color-hover":"#4d9de0","--tv-primary-color-active":"#3d8bd0","--tv-success-color":"#62d17a","--tv-warning-color":"#f7c752","--tv-error-color":"#f4645a","--tv-border-color":"#e8e4e0","--tv-divider-color":"#f0ece8","--tv-shadow-color":"rgba(80, 80, 80, 0.08)","--tv-chart-color-1":"#60acf2","--tv-chart-color-2":"#62d17a","--tv-chart-color-3":"#f7c752","--tv-chart-color-4":"#f4645a","--tv-chart-color-5":"#95d9f2","--tv-chart-color-6":"#a8e6cf","--tv-chart-color-7":"#ffd3b6","--tv-chart-color-8":"#ffaaa5","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"12px","--tv-border-radius-small":"8px","--tv-transition-duration":"0.3s"}},infographic:{name:"infographic",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#f5f7fa","--tv-text-color":"#1a1a1a","--tv-text-color-secondary":"#666666","--tv-primary-color":"#277 ace","--tv-primary-color-hover":"#3a8ee6","--tv-primary-color-active":"#146bb3","--tv-success-color":"#2fc25b","--tv-warning-color":"#fbd438","--tv-error-color":"#e8352e","--tv-border-color":"#e0e6ed","--tv-divider-color":"#f0f2f5","--tv-shadow-color":"rgba(26, 26, 26, 0.06)","--tv-chart-color-1":"#277ace","--tv-chart-color-2":"#31cce8","--tv-chart-color-3":"#23d3a2","--tv-chart-color-4":"#fbd438","--tv-chart-color-5":"#f87f50","--tv-chart-color-6":"#e8352e","--tv-chart-color-7":"#b02ad3","--tv-chart-color-8":"#6475d4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"2px","--tv-border-radius-small":"1px","--tv-transition-duration":"0.2s"}},helianthus:{name:"helianthus",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fffbf5","--tv-bg-color-secondary":"#fef7f0","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#f5c242","--tv-primary-color-hover":"#e6b53e","--tv-primary-color-active":"#d4a435","--tv-success-color":"#7ec890","--tv-warning-color":"#f5a623","--tv-error-color":"#e74c3c","--tv-border-color":"#e8dccf","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.08)","--tv-chart-color-1":"#f5c242","--tv-chart-color-2":"#7ec890","--tv-chart-color-3":"#5eb8d9","--tv-chart-color-4":"#e74c3c","--tv-chart-color-5":"#9b7ed4","--tv-chart-color-6":"#f5a623","--tv-chart-color-7":"#6dd3ce","--tv-chart-color-8":"#d4778b","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"6px","--tv-border-radius-small":"4px","--tv-transition-duration":"0.3s"}},blue:{name:"blue",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f0f7ff","--tv-bg-color-secondary":"#e6f0ff","--tv-text-color":"#1a3a5c","--tv-text-color-secondary":"#4a6a8c","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bfd9f2","--tv-divider-color":"#d9e8fc","--tv-shadow-color":"rgba(24, 144, 255, 0.15)","--tv-chart-color-1":"#1890ff","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},red:{name:"red",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fff5f5","--tv-bg-color-secondary":"#ffe6e6","--tv-text-color":"#5c1a1a","--tv-text-color-secondary":"#8c4a4a","--tv-primary-color":"#ff4d4f","--tv-primary-color-hover":"#ff7875","--tv-primary-color-active":"#d9363e","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#f2bfbf","--tv-divider-color":"#fcd9d9","--tv-shadow-color":"rgba(255, 77, 79, 0.15)","--tv-chart-color-1":"#ff4d4f","--tv-chart-color-2":"#ffd700","--tv-chart-color-3":"#ff7c4d","--tv-chart-color-4":"#9c4dff","--tv-chart-color-5":"#00d0ff","--tv-chart-color-6":"#52c41a","--tv-chart-color-7":"#faad14","--tv-chart-color-8":"#8b5cf6","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},green:{name:"green",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f5fff5","--tv-bg-color-secondary":"#e6ffe6","--tv-text-color":"#1a3d1a","--tv-text-color-secondary":"#4a6c4a","--tv-primary-color":"#52c41a","--tv-primary-color-hover":"#73d13d","--tv-primary-color-active":"#389e0d","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bff2bf","--tv-divider-color":"#d9fcd9","--tv-shadow-color":"rgba(82, 196, 26, 0.15)","--tv-chart-color-1":"#52c41a","--tv-chart-color-2":"#1890ff","--tv-chart-color-3":"#faad14","--tv-chart-color-4":"#ff4d4f","--tv-chart-color-5":"#722ed1","--tv-chart-color-6":"#13c2c2","--tv-chart-color-7":"#fa8c16","--tv-chart-color-8":"#eb2f96","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},purple:{name:"purple",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#faf5ff","--tv-bg-color-secondary":"#f0e6ff","--tv-text-color":"#3d1a5c","--tv-text-color-secondary":"#6a4a8c","--tv-primary-color":"#722ed1","--tv-primary-color-hover":"#9254de","--tv-primary-color-active":"#531dab","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9bff2","--tv-divider-color":"#ecd9fc","--tv-shadow-color":"rgba(114, 46, 209, 0.15)","--tv-chart-color-1":"#722ed1","--tv-chart-color-2":"#eb2f96","--tv-chart-color-3":"#1890ff","--tv-chart-color-4":"#52c41a","--tv-chart-color-5":"#faad14","--tv-chart-color-6":"#ff4d4f","--tv-chart-color-7":"#13c2c2","--tv-chart-color-8":"#fa8c16","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}}},Ie=function(){function e(){this.currentTheme=we.default,this.listeners=new Set,this.cssVarPrefix="--tv-"}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.getCurrentTheme=function(){return this.currentTheme},e.prototype.getPresetTheme=function(e){return we[e]},e.prototype.getPresetThemeNames=function(){return Object.keys(we)},e.prototype.setTheme=function(e){var t="string"==typeof e?we[e]:e;t&&(this.currentTheme=t,this.applyThemeVariables(t),this.notifyListeners())},e.prototype.applyThemeVariables=function(e){if("undefined"!=typeof document){var t=document.documentElement,r=e.variables;Object.entries(r).forEach(function(e){var r=e[0],n=e[1];t.style.setProperty(r,n)}),t.setAttribute("data-theme",e.name),t.setAttribute("data-theme-type",e.type),e.isDark?t.setAttribute("data-theme-dark","true"):t.removeAttribute("data-theme-dark")}},e.prototype.getEChartsTheme=function(){var e=this.currentTheme;return{color:[e.variables["--tv-chart-color-1"],e.variables["--tv-chart-color-2"],e.variables["--tv-chart-color-3"],e.variables["--tv-chart-color-4"],e.variables["--tv-chart-color-5"],e.variables["--tv-chart-color-6"],e.variables["--tv-chart-color-7"],e.variables["--tv-chart-color-8"]],backgroundColor:e.variables["--tv-bg-color"],textStyle:{color:e.variables["--tv-text-color"],fontFamily:e.variables["--tv-font-family"]}}},e.prototype.toggleDarkMode=function(){"dark"===this.currentTheme.type?this.setTheme("default"):this.setTheme("dark")},e.prototype.isDarkMode=function(){return this.currentTheme.isDark||"dark"===this.currentTheme.type},e.prototype.onThemeChange=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.notifyListeners=function(){var e=this;this.listeners.forEach(function(t){try{t(e.currentTheme)}catch(e){}})},e.prototype.createCustomTheme=function(e,t){return void 0===t&&(t="custom"),{name:t,type:"custom",isDark:!1,variables:Ce(Ce({},we.default.variables),e)}},e.prototype.exportThemeAsCSS=function(e){var t=e||this.currentTheme,r=t.variables;return':root[data-theme="'.concat(t.name,'"] {\n').concat(Object.entries(r).map(function(e){var t=e[0],r=e[1];return" ".concat(t,": ").concat(r,";")}).join("\n"),"\n}")},e.prototype.exportThemeAsJSON=function(e){var t=e||this.currentTheme;return JSON.stringify(t,null,2)},e.instance=null,e}().getInstance();var Se=function(){return Se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Se.apply(this,arguments)},Te=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};const ke=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,o=e.disabled,l=void 0!==o&&o,c=e.style,s=void 0===c?{}:c,u=e.className,d=void 0===u?"":u,f=me(),p=(0,a.useState)(f[0]||{}),h=p[0],m=p[1],v=(0,a.useState)(""),g=v[0],y=v[1],b=(0,a.useState)(!1),x=b[0],E=b[1],C=(0,a.useState)(h.colors||[]),w=C[0],I=C[1],S=(0,a.useState)(h.backgroundColor||"#ffffff"),T=S[0],k=S[1],O=(0,a.useState)(h.textColor||"#333333"),A=O[0],D=O[1],R=(0,a.useState)(h.darkMode||!1),P=R[0],M=R[1];(0,a.useEffect)(function(){if(t){var e=f.find(function(e){return e.name===t});e&&(m(e),I(e.colors||[]),k(e.backgroundColor||"#ffffff"),D(e.textColor||"#333333"),M(e.darkMode||!1))}},[t,f]),(0,a.useEffect)(function(){I(h.colors||[]),k(h.backgroundColor||"#ffffff"),D(h.textColor||"#333333"),M(h.darkMode||!1)},[h]);var N=function(e,t){var r=Te([],w,!0);r[e]=t,z({colors:r})},j=function(e){z({backgroundColor:e})},L=function(e){z({textColor:e})},z=function(e){var t=Se(Se({},h),e);m(t),r&&r(t),ge(t)};return i().createElement("div",{className:"taroviz-theme-editor ".concat(d),style:Se({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},s)},i().createElement("h3",null,"主题编辑器"),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"选择主题"),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},f.map(function(e){return i().createElement("button",{key:e.name,onClick:function(){return function(e){m(e),r&&r(e),ge(e)}(e)},disabled:l,style:{padding:"8px 16px",border:"2px solid ".concat(h.name===e.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:h.name===e.name?"#1890ff":"#ffffff",color:h.name===e.name?"#ffffff":"#333333",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},e.name)}),i().createElement("button",{onClick:function(){E(!0),y("")},disabled:l,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333333",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"+ 新主题"))),x&&i().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},i().createElement("h4",null,"新建主题"),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),i().createElement("input",{type:"text",value:g,onChange:function(e){return y(e.target.value)},disabled:l,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:l?.6:1},placeholder:"输入主题名称"}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},i().createElement("h4",null,"主题颜色"),i().createElement("button",{onClick:function(){I(Te(Te([],w,!0),["#000000"],!1))},disabled:l,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"+ 添加颜色")),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},w.map(function(e,t){return i().createElement("div",{key:t,style:{display:"flex",alignItems:"center",gap:"5px"}},i().createElement("input",{type:"color",value:e,onChange:function(e){return N(t,e.target.value)},disabled:l,style:{width:"50px",height:"30px",border:"none",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}}),i().createElement("input",{type:"text",value:e,onChange:function(e){return N(t,e.target.value)},disabled:l,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:l?.6:1}}),i().createElement("button",{onClick:function(){return function(e){var t=w.filter(function(t,r){return r!==e});I(t),z({colors:t})}(t)},disabled:l||w.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:l||w.length<=1?"not-allowed":"pointer",opacity:l||w.length<=1?.6:1}},"删除"))}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"基础配置"),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:T,onChange:function(e){return j(e.target.value)},disabled:l,style:{width:"50px",height:"30px",border:"none",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}}),i().createElement("input",{type:"text",value:T,onChange:function(e){return j(e.target.value)},disabled:l,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:l?.6:1}}))),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:A,onChange:function(e){return L(e.target.value)},disabled:l,style:{width:"50px",height:"30px",border:"none",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}}),i().createElement("input",{type:"text",value:A,onChange:function(e){return L(e.target.value)},disabled:l,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:l?.6:1}}))),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("label",null,"深色模式:"),i().createElement("input",{type:"checkbox",checked:P,onChange:function(){z({darkMode:!P})},disabled:l,style:{cursor:l?"not-allowed":"pointer",opacity:l?.6:1}}))),i().createElement("button",{onClick:function(){var e=Se(Se({},h),{colors:w,backgroundColor:T,textColor:A,darkMode:P});x&&g?(he(g,e),E(!1),y("")):he(h.name||"custom",e),n&&n(e)},disabled:l,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"保存主题"))};var Oe=function(){return Oe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Oe.apply(this,arguments)},Ae=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},De=[{name:"预设-科技蓝",colors:["#0050b3","#1890ff","#40a9ff","#69c0ff","#bae7ff"],backgroundColor:"#001529",textColor:"#ffffff",darkMode:!0},{name:"预设-活力橙",colors:["#d46b08","#ff7a45","#ffa940","#ffc53d","#ffe58f"],backgroundColor:"#f5f5f5",textColor:"#333333",darkMode:!1},{name:"预设-森林绿",colors:["#237804","#52c41a","#73d13d","#95de64","#b7eb8f"],backgroundColor:"#f6ffed",textColor:"#333333",darkMode:!1},{name:"预设-神秘紫",colors:["#531dab","#722ed1","#9254de","#b37feb","#d3adf7"],backgroundColor:"#f9f0ff",textColor:"#333333",darkMode:!1},{name:"预设-商务灰",colors:["#434343","#595959","#8c8c8c","#bfbfbf","#e8e8e8"],backgroundColor:"#fafafa",textColor:"#333333",darkMode:!1}];const Re=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,o=e.disabled,l=void 0!==o&&o,c=e.enableLivePreview,s=void 0===c||c,u=e.enableImportExport,d=void 0===u||u,f=e.enablePresets,p=void 0===f||f,h=e.style,m=void 0===h?{}:h,v=e.className,g=void 0===v?"":v,y=me(),b=(0,a.useState)(y.find(function(e){return e.name===t})||y[0]||{}),x=b[0],E=b[1],C=(0,a.useState)(""),w=C[0],I=C[1],S=(0,a.useState)(!1),k=S[0],O=S[1],A=(0,a.useState)(x.colors||[]),D=A[0],R=A[1],P=(0,a.useState)(x.backgroundColor||"#ffffff"),M=P[0],N=P[1],j=(0,a.useState)(x.textColor||"#333333"),L=j[0],z=j[1],F=(0,a.useState)(x.darkMode||!1),H=F[0],B=F[1],U=(0,a.useState)("basic"),_=U[0],G=U[1],W={title:{text:"主题预览",textStyle:{color:L}},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri"],axisLabel:{color:L}},yAxis:{type:"value",axisLabel:{color:L}},series:[{data:[120,200,150,80,70],type:"bar",itemStyle:{color:D[0]||"#1890ff"}},{data:[120,200,150,80,70].map(function(e){return{value:1.2*e,itemStyle:{color:D[1]||"#40a9ff"}}}),type:"bar"}],backgroundColor:M};(0,a.useEffect)(function(){if(t){var e=y.find(function(e){return e.name===t});e&&(E(e),R(e.colors||[]),N(e.backgroundColor||"#ffffff"),z(e.textColor||"#333333"),B(e.darkMode||!1))}},[t,y]);var V=(0,a.useCallback)(function(e){var t=Oe(Oe({},x),e);E(t),R(t.colors||[]),N(t.backgroundColor||"#ffffff"),z(t.textColor||"#333333"),B(t.darkMode||!1),s&&ge(t),null==r||r(t)},[x,s,r]),Z=function(e,t){var r=Ae([],D,!0);r[e]=t,V({colors:r})},q=function(e){var t=Oe(Oe({},x),{colors:D,backgroundColor:M,textColor:L,darkMode:H}),r="",n="",o="";"json"===e?(r=JSON.stringify(t,null,2),n="".concat(t.name||"theme",".json"),o="application/json"):"css"===e?(r=":root {\n --theme-colors: ".concat(D.join(", "),";\n --theme-bg: ").concat(M,";\n --theme-text: ").concat(L,";\n}"),n="".concat(t.name||"theme",".css"),o="text/css"):(r="$theme-colors: (".concat(D.join(", "),");\n$theme-bg: ").concat(M,";\n$theme-text: ").concat(L,";"),n="".concat(t.name||"theme",".scss"),o="text/x-scss");var a=new Blob([r],{type:o}),i=URL.createObjectURL(a),l=document.createElement("a");l.href=i,l.download=n,l.click(),URL.revokeObjectURL(i)};return i().createElement("div",{className:"taroviz-enhanced-theme-editor ".concat(g),style:Oe({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},m)},i().createElement("h3",{style:{marginBottom:"20px"}},"增强版主题编辑器"),i().createElement("div",{style:{display:"flex",borderBottom:"1px solid #e0e0e0",marginBottom:"20px"}},["basic","advanced","presets"].map(function(e){return i().createElement("button",{key:e,onClick:function(){return G(e)},style:{padding:"10px 20px",border:"none",borderBottom:_===e?"2px solid #1890ff":"2px solid transparent",backgroundColor:"transparent",color:_===e?"#1890ff":"#666",cursor:"pointer",fontWeight:_===e?"bold":"normal"}},"basic"===e?"基础配置":"advanced"===e?"高级配置":"预设主题")})),"basic"===_&&i().createElement(i().Fragment,null,i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"选择主题"),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},y.map(function(e){return i().createElement("button",{key:e.name,onClick:function(){O(!1),V(e)},disabled:l,style:{padding:"8px 16px",border:"2px solid ".concat(x.name===e.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:x.name===e.name?"#1890ff":"#ffffff",color:x.name===e.name?"#ffffff":"#333",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},e.name)}),i().createElement("button",{onClick:function(){O(!0),I("")},disabled:l,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"+ 新主题"))),k&&i().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},i().createElement("h4",null,"新建主题"),i().createElement("input",{type:"text",value:w,onChange:function(e){return I(e.target.value)},disabled:l,placeholder:"输入主题名称",style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",marginTop:"10px",opacity:l?.6:1}})),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},i().createElement("h4",null,"主题颜色"),i().createElement("button",{onClick:function(){var e=Ae(Ae([],D,!0),["#000000"],!1);V({colors:e})},disabled:l,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"+ 添加颜色")),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},D.map(function(e,t){return i().createElement("div",{key:t,style:{display:"flex",alignItems:"center",gap:"5px"}},i().createElement("input",{type:"color",value:e,onChange:function(e){return Z(t,e.target.value)},disabled:l,style:{width:"50px",height:"30px",border:"none",cursor:"pointer"}}),i().createElement("input",{type:"text",value:e,onChange:function(e){return Z(t,e.target.value)},disabled:l,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px"}}),i().createElement("button",{onClick:function(){return function(e){if(!(D.length<=1)){var t=D.filter(function(t,r){return r!==e});V({colors:t})}}(t)},disabled:l||D.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:l||D.length<=1?"not-allowed":"pointer",opacity:l||D.length<=1?.6:1}},"删除"))}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"基础配置"),i().createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"15px",marginTop:"10px"}},i().createElement("div",null,i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:M,onChange:function(e){return V({backgroundColor:e.target.value})},disabled:l,style:{width:"50px",height:"30px",border:"none",cursor:"pointer"}}),i().createElement("input",{type:"text",value:M,onChange:function(e){return V({backgroundColor:e.target.value})},disabled:l,style:{width:"100px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px"}}))),i().createElement("div",null,i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:L,onChange:function(e){return V({textColor:e.target.value})},disabled:l,style:{width:"50px",height:"30px",border:"none",cursor:"pointer"}}),i().createElement("input",{type:"text",value:L,onChange:function(e){return V({textColor:e.target.value})},disabled:l,style:{width:"100px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px"}})))),i().createElement("div",{style:{marginTop:"10px"}},i().createElement("label",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"checkbox",checked:H,onChange:function(e){return V({darkMode:e.target.checked})},disabled:l}),"深色模式")))),"presets"===_&&p&&i().createElement("div",null,i().createElement("h4",null,"选择预设主题"),i().createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"15px",marginTop:"15px"}},De.map(function(e){return i().createElement("div",{key:e.name,onClick:function(){return function(e){V(Oe(Oe({},e),{name:k&&w?w:e.name})),k||(ge(e),null==r||r(e))}(e)},style:{padding:"15px",border:"2px solid #e0e0e0",borderRadius:"8px",cursor:"pointer",backgroundColor:e.backgroundColor,color:e.textColor,transition:"all 0.2s"}},i().createElement("div",{style:{display:"flex",gap:"5px",marginBottom:"10px"}},(e.colors||[]).map(function(e,t){return i().createElement("div",{key:t,style:{width:"30px",height:"30px",backgroundColor:e,borderRadius:"4px"}})})),i().createElement("div",{style:{fontSize:"14px",fontWeight:"bold"}},e.name),i().createElement("div",{style:{fontSize:"12px",opacity:.7}},e.darkMode?"深色":"浅色"))}))),"advanced"===_&&i().createElement("div",null,i().createElement("h4",null,"导入导出"),d&&i().createElement("div",{style:{display:"flex",gap:"10px",marginTop:"15px"}},i().createElement("button",{onClick:function(){return q("json")},disabled:l,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"导出 JSON"),i().createElement("button",{onClick:function(){return q("css")},disabled:l,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"导出 CSS"),i().createElement("label",{style:{padding:"8px 16px",border:"1px solid #1890ff",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:"pointer"}},"导入 JSON",i().createElement("input",{type:"file",accept:".json",onChange:function(e){var t,r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(r){var n=new FileReader;n.onload=function(e){var t;try{var n=null===(t=e.target)||void 0===t?void 0:t.result;if(r.name.endsWith(".json")){var o=JSON.parse(n);V(o)}else alert("请选择 JSON 格式的主题文件")}catch(e){alert("文件格式错误")}},n.readAsText(r)}},style:{display:"none"}})))),s&&i().createElement("div",{style:{marginTop:"20px"}},i().createElement("h4",null,"实时预览"),i().createElement("div",{style:{marginTop:"10px",border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"}},i().createElement(T.default,{option:W,width:"100%",height:200}))),i().createElement("div",{style:{marginTop:"20px",display:"flex",gap:"10px"}},i().createElement("button",{onClick:function(){var e=k&&w?w:x.name||"custom",t=Oe(Oe({},x),{name:e,colors:D,backgroundColor:M,textColor:L,darkMode:H});he(e,t),O(!1),I(""),n&&n(t)},disabled:l,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"保存主题"),i().createElement("button",{onClick:function(){return V(x)},disabled:l,style:{padding:"10px 20px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333",cursor:l?"not-allowed":"pointer",opacity:l?.6:1}},"重置预览")))};var Pe,Me=(Pe=function(e,t){return Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Pe(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Pe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ne=function(){return Ne=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ne.apply(this,arguments)},je=function(e){function t(t){var r=e.call(this,t)||this;return r.handleReset=function(){r.setState({hasError:!1,error:null})},r.state={hasError:!1,error:null},r}return Me(t,e),t.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},t.prototype.componentDidCatch=function(e,t){var r,n;null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)},t.prototype.render=function(){var e=this.state,t=e.hasError,r=e.error,n=this.props,o=n.children,a=n.fallback,l=n.showDetails,c=void 0!==l&&l;return t&&r?a?a(r,this.handleReset):i().createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"20px",backgroundColor:"#fff",border:"1px solid #ff4d4f",borderRadius:"8px",color:"#333",minHeight:"200px"}},i().createElement("div",{style:{fontSize:"48px",marginBottom:"16px"}},"⚠️"),i().createElement("h3",{style:{margin:"0 0 12px",color:"#ff4d4f"}},"图表渲染失败"),i().createElement("p",{style:{margin:"0 0 16px",color:"#666",textAlign:"center"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),c&&i().createElement("details",{style:{width:"100%",padding:"12px",backgroundColor:"#f5f5f5",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace",overflow:"auto",maxHeight:"150px"}},i().createElement("summary",{style:{cursor:"pointer",marginBottom:"8px"}},"错误详情"),i().createElement("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"}},r.message,"\n\n",r.stack)),i().createElement("button",{onClick:this.handleReset,style:{marginTop:"16px",padding:"8px 24px",backgroundColor:"#1890ff",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"重试")):o},t}(a.Component);function Le(e,t){var r=function(r){return i().createElement(je,Ne({},t),i().createElement(e,Ne({},r)))},n=e.displayName||e.name;return r.displayName=n?"withErrorBoundary(".concat(n,")"):"withErrorBoundary(WrappedChart)",r}var ze=function(){return ze=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ze.apply(this,arguments)},Fe=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},He=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,127))}),Be=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,188))}),Ue=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,481))}),_e=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,589))}),Ge=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,443))}),We=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,835))}),Ve=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,334))}),Ze=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,133))}),qe=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,37))}),Je=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,673))}),Ye=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,490))}),Qe={line:function(){return Promise.resolve().then(r.bind(r,127))},bar:function(){return Promise.resolve().then(r.bind(r,188))},pie:function(){return Promise.resolve().then(r.bind(r,481))},scatter:function(){return Promise.resolve().then(r.bind(r,589))},radar:function(){return Promise.resolve().then(r.bind(r,443))},heatmap:function(){return Promise.resolve().then(r.bind(r,835))},gauge:function(){return Promise.resolve().then(r.bind(r,334))},funnel:function(){return Promise.resolve().then(r.bind(r,133))},treemap:function(){return Promise.resolve().then(r.bind(r,37))},sunburst:function(){return Promise.resolve().then(r.bind(r,673))},sankey:function(){return Promise.resolve().then(r.bind(r,490))}},Ke=Object.keys(Qe),$e=function(e){var t=e.text,r=void 0===t?"加载中...":t;return i().createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",minHeight:"200px",backgroundColor:"#f5f5f5",borderRadius:"8px"}},i().createElement("div",{style:{textAlign:"center"}},i().createElement("div",{style:{width:"40px",height:"40px",border:"3px solid #1890ff",borderTopColor:"transparent",borderRadius:"50%",animation:"taroviz-spin 1s linear infinite",margin:"0 auto 12px"}}),i().createElement("style",null,"\n @keyframes taroviz-spin {\n to { transform: rotate(360deg); }\n }\n "),i().createElement("span",{style:{color:"#666",fontSize:"14px"}},r)))};function Xe(e,t){var r=function(r){var n=r.loadingText,o=r.fallback,l=Fe(r,["loadingText","fallback"]),c=t||$e;return i().createElement(a.Suspense,{fallback:i().createElement(c,{text:n})},o?i().createElement(i().Fragment,null,o,i().createElement(e,ze({},l))):i().createElement(e,ze({},l)))};return r.displayName="withLazyLoad(".concat(e.displayName||e.name||"Chart",")"),r}function et(e,t){void 0===t&&(t=!0);var r=Qe[e];return r?r().then(function(){}).catch(function(e){}):t?Promise.resolve():Promise.reject(new Error("Unknown chart type: ".concat(e)))}function tt(){return Promise.all(Ke.map(function(e){return et(e)}))}function rt(e){return{line:He,bar:Be,pie:Ue,scatter:_e,radar:Ge,heatmap:We,gauge:Ve,funnel:Ze,treemap:qe,sunburst:Je,sankey:Ye}[e]||null}var nt={get:function(e){return rt(e)},preload:function(e,t){return void 0===t&&(t=!0),et(e,t)},preloadAll:function(){return tt()}};function ot(e){var t=e.data,r=e.lineStyle,n=e.label,o=e.animation,a=e.animationDuration,i=e.precision;return[{type:"line",markLine:{symbol:["circle","arrow"],silent:!0,animation:!1!==o,animationDuration:a||300,precision:void 0===i?2:i,lineStyle:{color:(null==r?void 0:r.color)||"#333",width:(null==r?void 0:r.width)||2,type:(null==r?void 0:r.type)||"dashed",opacity:null==r?void 0:r.opacity},label:{show:!1!==(null==n?void 0:n.show),position:(null==n?void 0:n.position)||"end",formatter:null==n?void 0:n.formatter,color:(null==n?void 0:n.color)||"#333",fontSize:(null==n?void 0:n.fontSize)||12},data:t.map(function(e){return{xAxis:e.xAxis,yAxis:e.yAxis,name:e.name}})}}]}function at(e){var t=e.data,r=e.style,n=e.label;return[{type:"bar",markArea:{silent:!0,animation:!1!==e.animation,animationDuration:e.animationDuration||300,itemStyle:{color:(null==r?void 0:r.color)||"rgba(24, 144, 255, 0.1)",opacity:(null==r?void 0:r.opacity)||.3,borderColor:(null==r?void 0:r.borderColor)||"transparent",borderWidth:(null==r?void 0:r.borderWidth)||0,borderType:null==r?void 0:r.borderType},label:{show:!1!==(null==n?void 0:n.show),position:(null==n?void 0:n.position)||"inside",formatter:null==n?void 0:n.formatter,color:(null==n?void 0:n.color)||"#333",fontSize:(null==n?void 0:n.fontSize)||12},data:t.map(function(e){var t=e[0],r=e[1];return[{xAxis:t.xAxis,yAxis:t.yAxis},{xAxis:r.xAxis,yAxis:r.yAxis}]})}}]}function it(e){var t=e.data,r=e.symbol,n=e.symbolSize,o=e.itemStyle,a=e.label;return[{type:"scatter",markPoint:{symbol:r,symbolSize:n,itemStyle:o,label:{show:!1!==(null==a?void 0:a.show),position:(null==a?void 0:a.position)||"top",formatter:null==a?void 0:a.formatter,color:(null==a?void 0:a.color)||"#333"},data:t}}]}function lt(e){var t=e.type,r=e.markLine,n=e.markArea,o=e.scatter;return(0,a.useMemo)(function(){var e=[];if("line"===t&&r){var a=ot(r);e.push.apply(e,Array.isArray(a)?a:[a])}if("area"===t&&n){var i=at(n);e.push.apply(e,Array.isArray(i)?i:[i])}if("scatter"===t&&o){var l=it(o);e.push.apply(e,Array.isArray(l)?l:[l])}return{series:e}},[t,r,n,o])}var ct={averageLine:function(e){return void 0===e&&(e="#1890ff"),{data:[{type:"average",name:"平均值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},maxLine:function(e){return void 0===e&&(e="#f5222d"),{data:[{type:"max",name:"最大值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},minLine:function(e){return void 0===e&&(e="#52c41a"),{data:[{type:"min",name:"最小值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},thresholdLine:function(e,t){return void 0===t&&(t="#faad14"),{data:[{yAxis:e,name:"警戒线"}],lineStyle:{color:t,type:"solid",width:2},label:{show:!0,position:"start",color:t}}},targetArea:function(e,t,r){return void 0===r&&(r="rgba(82, 196, 26, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:r,opacity:.3},label:{show:!0,position:"inside",color:"#52c41a"}}},warningArea:function(e,t,r){return void 0===r&&(r="rgba(250, 173, 20, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:r,opacity:.3},label:{show:!0,position:"inside",color:"#faad14"}}}};function st(e){var t=[];return e.forEach(function(e){if("line"===e.type&&e.markLine){var r=ot(e.markLine);t.push.apply(t,Array.isArray(r)?r:[r])}if("area"===e.type&&e.markArea){r=at(e.markArea);t.push.apply(t,Array.isArray(r)?r:[r])}if("scatter"===e.type&&e.scatter){r=it(e.scatter);t.push.apply(t,Array.isArray(r)?r:[r])}}),{series:t}}var ut=function(){return ut=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ut.apply(this,arguments)},dt=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},ft=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}};function pt(e){for(var t,r=e.split(","),n=(null===(t=r[0].match(/:(.*?);/))||void 0===t?void 0:t[1])||"image/png",o=atob(r[1]),a=o.length,i=new Uint8Array(a);a--;)i[a]=o.charCodeAt(a);return new Blob([i],{type:n})}function ht(e,t){var r=(new Date).toISOString().slice(0,10),n=e.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g,"_");return"".concat(n,"_").concat(r,".").concat(t)}var mt=function(){function e(){}return e.exportImage=function(e,t){void 0===t&&(t={});var r=t.type,n=void 0===r?"png":r,o=t.pixelRatio,a=void 0===o?2:o,i=t.backgroundColor,l=void 0===i?"#ffffff":i,c=t.quality,s=void 0===c?.8:c,u="image/".concat(n);return{data:e.getDataURL({type:n,pixelRatio:a,backgroundColor:l,quality:s}),filename:ht("chart",n),mimeType:u}},e.exportSVG=function(e,t){void 0===t&&(t={});var r=t.compress,n=void 0!==r&&r,o=e.getDataURL({type:"svg"});if(!o||"data:image/svg+xml;charset=utf8,"===o)throw new Error("SVG export is not supported. Please use canvas renderer.");var a=o,i="image/svg+xml";return n&&(a=a.replace(/>\s+</g,"><").replace(/\s+/g," "),i+=";charset=utf-8"),{data:a,filename:ht("chart","svg"),mimeType:i}},e.exportPDF=function(e){return dt(this,arguments,Promise,function(e,t){var r,n,o,a,i,l,c,s,u,d,f,p,h,m,v,g,y,b,x,E,C,w,I,S,T,k,O,A;return void 0===t&&(t={}),ft(this,function(D){switch(D.label){case 0:r=t.orientation,n=void 0===r?"portrait":r,o=t.pageSize,a=void 0===o?"a4":o,i=t.title,l=void 0===i?"Chart Export":i,c=t.author,s=void 0===c?"TaroViz":c,u=t.margin,d=void 0===u?{top:40,right:40,bottom:40,left:40}:u,f=t.includeTitle,p=void 0===f||f,h=e.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return m=D.sent().default,[3,4];case 3:return D.sent(),[2,{data:h,filename:ht("chart","png"),mimeType:"image/png"}];case 4:return v={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[a],g="landscape"===n,(y=new m({orientation:n,unit:"mm",format:a})).setProperties({title:l,author:s,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),b=g?v.height:v.width,x=.6*b,E=g?v.height:v.width,C=g?v.width:v.height,w=d.top||40,I=d.left||40,p&&(y.setFontSize(16),y.setTextColor(51,51,51),y.text(l,I,w)),S=p?w+15:w,T=(E-b)/2,y.addImage(h,"PNG",T,S,b,x),k=C-(null!==(A=d.bottom)&&void 0!==A?A:40)/2,y.setFontSize(10),y.setTextColor(153,153,153),y.text("Generated by TaroViz on ".concat((new Date).toLocaleDateString()),I,k),[2,{data:O=y.output("blob"),filename:ht(l.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:O.size}]}})})},e.exportBatch=function(e,t){return dt(this,void 0,Promise,function(){var r,n,o,a,i,l,c,s,u,d;return ft(this,function(f){switch(f.label){case 0:r=t.format,n=t.filenamePrefix,o=t.compress,a=[],i=0,l=e,f.label=1;case 1:if(!(i<l.length))return[3,8];c=l[i],s=c.name,u=c.chart,f.label=2;case 2:return f.trys.push([2,6,,7]),d=void 0,"pdf"!==r?[3,4]:[4,this.exportPDF(u,{title:s})];case 3:return d=f.sent(),[3,5];case 4:d=this.exportImage(u,{type:r}),f.label=5;case 5:return o&&d.filename&&(d.filename=d.filename.replace(/\.(\w+)$/,".$1")),a.push(d),[3,7];case 6:return f.sent(),[3,7];case 7:return i++,[3,1];case 8:return[2,a]}})})},e.download=function(e){var t,r,n,o,a;t=e.data,r=e.filename,e.mimeType,n="string"==typeof t?pt(t):t,o=URL.createObjectURL(n),(a=document.createElement("a")).href=o,a.download=r,a.style.display="none",document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),URL.revokeObjectURL(o)},100)},e.copyToClipboard=function(e){return dt(this,arguments,Promise,function(e,t){var r,n,o;return void 0===t&&(t={}),ft(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=this.exportImage(e,ut(ut({},t),{type:"png"})),n=pt(r.data),[4,navigator.clipboard.write([new ClipboardItem((o={},o[n.type]=n,o))])];case 1:return a.sent(),[2,!0];case 2:return a.sent(),[2,!1];case 3:return[2]}})})},e.calculateExportSize=function(e,t){void 0===t&&(t=300);var r=e.getWidth(),n=e.getHeight(),o=t/96;return{width:Math.round(r*o),height:Math.round(n*o)}},e}(),vt=mt;var gt=function(){return gt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gt.apply(this,arguments)},yt=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function bt(e){var t=e.data,r=e.chartType,n=e.mapping,o=void 0===n?{}:n,i=e.extraConfig,l=void 0===i?{}:i;return(0,a.useMemo)(function(){switch(r){case"line":case"bar":return function(e,t,r,n){var o,a=r||{},i=a.xField,l=void 0===i?"name":i,c=a.yField,s=void 0===c?"value":c,u=a.seriesField,d=e.categories||(null===(o=e.rows)||void 0===o?void 0:o.map(function(e){return String(e[l])}))||[],f=e.series||e.rows||[];if(u){var p=new Map;f.forEach(function(e){var t=String(e[u]||"default");p.has(t)||p.set(t,[]),p.get(t).push(e)});var h=Array.from(p.entries()).map(function(e){var r=e[0],n=e[1];return{name:r,type:t,data:n.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}});return gt({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:h},n)}var m=[{type:t,data:f.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}];return gt({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:m},n)}(t,r,o,l);case"pie":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,l=void 0===i?"value":i,c=(e.series||e.rows||[]).map(function(e){return{name:String(e[a]||""),value:Number(e[l])||0}});return gt({series:[{type:"pie",radius:"60%",data:c}]},r)}(t,o,l);case"scatter":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,l=void 0===i?"y":i,c=n.sizeField,s=(e.series||e.rows||[]).map(function(e){var t=e,r=[Number(t[a])||0,Number(t[l])||0];return c&&r.push(Number(t[c])||1),r});return gt({xAxis:{type:"value",scale:!0},yAxis:{type:"value",scale:!0},series:[{type:"scatter",data:s}]},r)}(t,o,l);case"radar":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,l=void 0===i?"value":i,c=(e.series||e.rows||[]).map(function(e){var t=e;return{name:String(t[a]||""),max:Math.max(Number(t[l])||100,100)}}),s=(e.series||e.rows||[]).map(function(e){return Number(e[l])||0});return gt({radar:{indicator:c},series:[{type:"radar",data:[{value:s}]}]},r)}(t,o,l);case"heatmap":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,l=void 0===i?"y":i,c=n.valueField,s=void 0===c?"value":c,u=yt([],new Set((e.series||e.rows||[]).map(function(e){return String(e[a])})),!0),d=yt([],new Set((e.series||e.rows||[]).map(function(e){return String(e[l])})),!0),f=(e.series||e.rows||[]).map(function(e){var t=e;return[u.indexOf(String(t[a])),d.indexOf(String(t[l])),Number(t[s])||0]});return gt({xAxis:{type:"category",data:u},yAxis:{type:"category",data:d},visualMap:{min:0,calculable:!0},series:[{type:"heatmap",data:f}]},r)}(t,o,l);default:return{}}},[t,r,o,l])}function xt(e){var t=e.data,r=e.columns,n=void 0===r?[]:r,o=e.transpose,i=void 0!==o&&o,l=e.extraConfig,c=void 0===l?{}:l;return(0,a.useMemo)(function(){if(!t||0===t.length)return{};var e=t[0],r=n.length>0?n.map(function(e){return e.field}):Object.keys(e),o=new Map(n.map(function(e){return[e.field,e]})),a=i?r:t.map(function(e){return String(e[r[0]]||"")}),l=(i?r:r.slice(1)).map(function(e){var r="string"==typeof e?e:"",n=o.get(r),a=t.map(function(e){return Number(e[r])||0});return{name:(null==n?void 0:n.label)||r,type:"bar",data:a,itemStyle:(null==n?void 0:n.color)?{color:n.color}:void 0}});return gt({xAxis:{type:"category",data:a},yAxis:{type:"value"},series:l},c)},[t,n,i,c])}function Et(e){var t=e.data,r=e.dateField,n=e.valueField,o=e.groupField,i=e.period,l=void 0===i?"day":i,c=e.aggregation,s=void 0===c?"sum":c,u=e.fillMissing,d=void 0===u?"forward":u,f=e.extraConfig,p=void 0===f?{}:f;return(0,a.useMemo)(function(){if(!t||0===t.length)return{};var e=function(e,t,r){return e.reduce(function(e,n){var o,a=new Date(String(n[t]));switch(r){case"day":default:o=a.toISOString().split("T")[0];break;case"week":var i=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),r=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-r);var n=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-n.getTime())/864e5+1)/7)}(a);o="".concat(a.getFullYear(),"-W").concat(i);break;case"month":o="".concat(a.getFullYear(),"-").concat(String(a.getMonth()+1).padStart(2,"0"));break;case"quarter":o="".concat(a.getFullYear(),"-Q").concat(Math.ceil((a.getMonth()+1)/3));break;case"year":o=String(a.getFullYear())}return e[o]||(e[o]=[]),e[o].push(n),e},{})}(t,r,l),a=Object.keys(e).sort();if(o){var i=new Set(t.map(function(e){return String(e[o])})),c=Array.from(i).map(function(t){var r=a.map(function(r){var a;return Ct((null===(a=e[r])||void 0===a?void 0:a.filter(function(e){return String(e[o])===t}))||[],n,s,d)});return{name:t,type:"line",data:r,smooth:!0}});return gt({xAxis:{type:"category",data:a},yAxis:{type:"value"},series:c},p)}var u=a.map(function(t){return Ct(e[t]||[],n,s,d)});return gt({xAxis:{type:"category",data:a},yAxis:{type:"value"},series:[{type:"line",data:u,smooth:!0}]},p)},[t,r,n,o,l,s,d,p])}function Ct(e,t,r,n){if(0===e.length)return"zero"===n?0:NaN;var o=e.map(function(e){return Number(e[t])||0});switch(r){case"sum":for(var a=0,i=0;i<o.length;i++)a+=o[i];return a;case"average":if(0===o.length)return 0;for(a=0,i=0;i<o.length;i++)a+=o[i];return a/o.length;case"max":var l=o[0];for(i=1;i<o.length;i++)o[i]>l&&(l=o[i]);return l;case"min":var c=o[0];for(i=1;i<o.length;i++)o[i]<c&&(c=o[i]);return c;case"count":return o.length;case"first":default:return o[0];case"last":return o[o.length-1]}}var wt=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},It=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}},St=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function Tt(e,t){var r=this,n=(0,a.useState)(null),o=n[0],i=n[1],l=(0,a.useState)(!1),c=l[0],s=l[1],u=(0,a.useRef)(t);return u.current=t,(0,a.useEffect)(function(){if(e.current&&!o){return wt(r,void 0,void 0,function(){var e;return It(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,$.cK)(u.current||{})];case 1:return e=t.sent(),i(e),s(!0),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})}),function(){var e;if(o){try{var t=o;(null===(e=t.isDisposed)||void 0===e?void 0:e.call(t))||t.dispose()}catch(e){}i(null),s(!1)}}}},[e]),[o,i,c]}function kt(e,t,r){var n=r||{},o=n.notMerge,i=void 0!==o&&o,l=n.lazyUpdate,c=void 0!==l&&l,s=n.replaceMerge,u=n.deps,d=void 0===u?[]:u;(0,a.useEffect)(function(){if(e&&t)try{e.setOption(t,i,c)}catch(e){}},St([e,t,i,c,s],d,!0))}function Ot(e,t){var r=t||{},n=r.delay,o=void 0===n?300:n,i=r.minWidth,l=r.minHeight,c=r.enabled,s=void 0===c||c,u=(0,a.useRef)();(0,a.useEffect)(function(){var t;if(e&&s){var r=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){var t,r;try{var n=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(n){var o=n.clientWidth,a=n.clientHeight;if(i&&o<i)return;if(l&&a<l)return}null===(r=e.resize)||void 0===r||r.call(e)}catch(e){}},o)};window.addEventListener("resize",r);var n=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(n&&"undefined"!=typeof ResizeObserver){var a=new ResizeObserver(r);return a.observe(n),function(){a.disconnect(),window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}return function(){window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}},[e,o,i,l,s])}function At(e,t){(0,a.useEffect)(function(){if(e&&t){var r=Object.entries(t);return r.forEach(function(t){var r=t[0],n=t[1];try{e.on(r,n)}catch(e){}}),function(){r.forEach(function(t){var r=t[0],n=t[1];try{e.off(r,n)}catch(e){}})}}},[e,t])}function Dt(e,t,r){(0,a.useEffect)(function(){if(e)try{t?e.showLoading(r):e.hideLoading()}catch(e){}},[e,t,r])}function Rt(e,t){return void 0===t&&(t=!1),(0,a.useMemo)(function(){if("string"==typeof e)try{return ve(e)||(t?"dark":e)}catch(r){return t?"dark":e}return e},[e,t])}function Pt(e,t){return(0,a.useMemo)(function(){return e?t(e):{}},[e,t])}function Mt(e){var t=e||{},r=t.breakpoints,n=void 0===r?{xs:0,sm:576,md:768,lg:992,xl:1200}:r,o=t.defaultBreakpoint,i=void 0===o?"md":o,l=(0,a.useState)(i),c=l[0],s=l[1],u=(0,a.useState)({width:0,height:0}),d=u[0],f=u[1];return(0,a.useEffect)(function(){var e=function(){var e=window.innerWidth;f({width:e,height:window.innerHeight});var t="xs";e>=n.xl?t="xl":e>=n.lg?t="lg":e>=n.md?t="md":e>=n.sm&&(t="sm"),s(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[n]),{breakpoint:c,windowSize:d}}function Nt(e){void 0===e&&(e="default");var t=(0,a.useState)(e),r=t[0],n=t[1],o=(0,a.useState)(!1),i=o[0],l=o[1];return{theme:r,isDark:i,switchTheme:(0,a.useCallback)(function(e){n(e),"string"==typeof e&&l("dark"===e||e.includes("dark"))},[]),toggleDark:(0,a.useCallback)(function(){l(function(e){return!e}),n(function(e){return"dark"===e?"default":"dark"})},[]),setTheme:n}}function jt(e,t){var r=this,n=t||{},o=n.interval,i=void 0===o?5e3:o,l=n.autoStart,c=void 0!==l&&l,s=n.retryCount,u=void 0===s?3:s,d=n.retryDelay,f=void 0===d?1e3:d,p=(0,a.useState)(null),h=p[0],m=p[1],v=(0,a.useState)(c),g=v[0],y=v[1],b=(0,a.useState)(null),x=b[0],E=b[1],C=(0,a.useRef)({cancelled:!1}),w=(0,a.useCallback)(function(){return wt(r,void 0,void 0,function(){var t,r,n,o,a;return It(this,function(i){switch(i.label){case 0:C.current.cancelled=!0,C.current={cancelled:!1},t=C.current,r=u,y(!0),E(null),i.label=1;case 1:if(!(r>0)||t.cancelled)return[3,9];i.label=2;case 2:return i.trys.push([2,4,,8]),[4,e()];case 3:return o=i.sent(),t.cancelled||(m(o),y(!1)),[2];case 4:return n=i.sent(),--r<=0||t.cancelled?(t.cancelled||E(n),y(!1),[2]):[3,5];case 5:return[4,new Promise(function(e){return setTimeout(e,f)})];case 6:i.sent(),i.label=7;case 7:return[3,8];case 8:return[3,1];case 9:if(!(u<=0)||t.cancelled)return[3,14];i.label=10;case 10:return i.trys.push([10,12,,13]),[4,e()];case 11:return o=i.sent(),t.cancelled||(m(o),y(!1)),[3,13];case 12:return a=i.sent(),t.cancelled||(E(a),y(!1)),[3,13];case 13:return[2];case 14:return t.cancelled||(E(new Error("All retries failed")),y(!1)),[2]}})})},[e,u,f]);return(0,a.useEffect)(function(){if(c&&w(),i>0){var e=setInterval(w,i);return function(){clearInterval(e),C.current.cancelled=!0}}return function(){C.current.cancelled=!0}},[i,c,w]),{data:h,loading:g,error:x,refresh:(0,a.useCallback)(function(){w()},[w])}}function Lt(e){var t=(0,a.useState)(!1),r=t[0],n=t[1],o=(0,a.useCallback)(function(){e.current&&(r?document.exitFullscreen&&document.exitFullscreen():e.current.requestFullscreen&&e.current.requestFullscreen())},[e,r]);return(0,a.useEffect)(function(){var e=function(){n(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){return document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:r,toggle:o}}function zt(e){var t=e;return{exportImage:(0,a.useCallback)(function(e){var r;if(!t)return null;var n=e||{},o=n.type,a=void 0===o?"png":o,i=n.pixelRatio,l=void 0===i?2:i,c=n.backgroundColor;return null===(r=t.getDataURL)||void 0===r?void 0:r.call(t,{type:a,pixelRatio:l,backgroundColor:c})},[t]),exportSVG:(0,a.useCallback)(function(){var e;return t?null===(e=t.getSvgData)||void 0===e?void 0:e.call(t):null},[t]),exportCSV:(0,a.useCallback)(function(e){var r;return t?null===(r=t.getCompressedDataURL)||void 0===r?void 0:r.call(t,e):null},[t])}}function Ft(e){var t=e;return{getInstance:(0,a.useCallback)(function(){return e},[e]),clear:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.clear)||void 0===e||e.call(t)},[t]),repaint:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.resize)||void 0===e||e.call(t)},[t]),dispatchAction:(0,a.useCallback)(function(e){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},[t]),showTip:(0,a.useCallback)(function(e,r){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,{type:"showTip",seriesIndex:e,dataIndex:r})},[t]),hideTip:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.dispatchAction)||void 0===e||e.call(t,{type:"hideTip"})},[t]),zoom:(0,a.useCallback)(function(e,r){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,{type:"dataZoom",start:null!=e?e:0,end:null!=r?r:100})},[t])}}var Ht="taroviz",Bt="1.6.0";module.exports=n})();
1
+ (()=>{"use strict";var t={219(t,e,n){n.d(e,{D:()=>r});var r=function(){function t(t){void 0===t&&(t={}),this.chartInstance=null,this.config=t}return t.prototype.getInstance=function(){return this.chartInstance},t.prototype.setOption=function(t,e){this.chartInstance?this.chartInstance.setOption(t,e):this.config.option=t},t.prototype.setTheme=function(t){this.config.theme=t;var e=this.chartInstance;(null==e?void 0:e.setTheme)&&e.setTheme(t)},t.prototype.getWidth=function(){var t=this.config.width;if("number"==typeof t)return t;if("string"==typeof t){var e=parseInt(t,10);if(!isNaN(e))return e}return 300},t.prototype.getHeight=function(){var t=this.config.height;if("number"==typeof t)return t;if("string"==typeof t){var e=parseInt(t,10);if(!isNaN(e))return e}return 300},t.prototype.getDom=function(){return null},t.prototype.convertToDataURL=function(t){var e,n;return null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.getDataURL)||void 0===n?void 0:n.call(e,t)},t.prototype.clear=function(){var t,e;null===(e=null===(t=this.chartInstance)||void 0===t?void 0:t.clear)||void 0===e||e.call(t)},t.prototype.on=function(t,e){var n,r;null===(r=null===(n=this.chartInstance)||void 0===n?void 0:n.on)||void 0===r||r.call(n,t,e)},t.prototype.off=function(t,e){var n,r;null===(r=null===(n=this.chartInstance)||void 0===n?void 0:n.off)||void 0===r||r.call(n,t,e)},t.prototype.showLoading=function(t){var e,n;null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.showLoading)||void 0===n||n.call(e,t)},t.prototype.hideLoading=function(){var t,e;null===(e=null===(t=this.chartInstance)||void 0===t?void 0:t.hideLoading)||void 0===e||e.call(t)},t.prototype.dispose=function(){var t,e;this.chartInstance&&(null===(e=null===(t=this.chartInstance)||void 0===t?void 0:t.dispose)||void 0===e||e.call(t),this.chartInstance=null)},t.prototype.resize=function(t){var e,n;null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.resize)||void 0===n||n.call(e,t)},t.prototype.setComponent=function(t){this.config.component=t},t.prototype.parseSize=function(t,e){if("number"==typeof t)return t;if("string"==typeof t){var n=parseInt(t,10);if(!isNaN(n))return n}return e},t}()},123(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(163),i=n(348),o=n(613),a=n(15),s=function(){return s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)};i.use([r.GridComponent,r.TooltipComponent,r.TitleComponent,r.LegendComponent,o.CanvasRenderer,o.SVGRenderer]);const l=function(){function t(t){this.instance=null,this.containerRef=null,this.options=t||{},this.containerRef=t.containerRef,this.canvasId=this.options.canvasId||"taroviz-echarts-canvas"}return t.create=function(e){return new t(e)},t.prototype.init=function(t){var e,n;if(this.instance)return this.instance;var r=(null===(e=this.containerRef)||void 0===e?void 0:e.current)||document.getElementById(this.canvasId);if(!r)throw new Error("[TaroViz] H5Adapter: container not found (canvasId: ".concat(this.canvasId,")"));return this.instance=i.init(r,this.options.theme,{useDirtyRect:!0,renderer:this.options.renderer||"canvas"}),this.instance&&this.instance.setOption({animation:!1!==(null===(n=this.options.option)||void 0===n?void 0:n.animation),animationDurationUpdate:300,animationEasingUpdate:"cubicOut",progressive:500,progressiveThreshold:1e3},!0),this.options.option&&this.instance&&this.instance.setOption(this.options.option,{notMerge:!1,lazyUpdate:!0}),this.options.onInit&&this.instance&&this.options.onInit(this.instance),this.instance},t.prototype.getInstance=function(){return this.instance},t.prototype.setOption=function(t,e){this.instance?this.instance.setOption(t,s({lazyUpdate:!0},e)):this.options.option=t},t.prototype.setTheme=function(t){var e,n;this.options.theme=t,this.instance&&(null===(n=(e=this.instance).setTheme)||void 0===n||n.call(e,t))},t.prototype.getWidth=function(){var t;return(null===(t=this.instance)||void 0===t?void 0:t.getWidth())||0},t.prototype.getHeight=function(){var t;return(null===(t=this.instance)||void 0===t?void 0:t.getHeight())||0},t.prototype.getDom=function(){var t;return(null===(t=this.containerRef)||void 0===t?void 0:t.current)||null},t.prototype.convertToDataURL=function(t){var e;return null===(e=this.instance)||void 0===e?void 0:e.getDataURL(t)},t.prototype.clear=function(){this.instance&&this.instance.clear()},t.prototype.on=function(t,e){this.instance&&this.instance.on(t,e)},t.prototype.off=function(t,e){this.instance&&this.instance.off(t,e)},t.prototype.showLoading=function(t){this.instance&&this.instance.showLoading(t)},t.prototype.hideLoading=function(){this.instance&&this.instance.hideLoading()},t.prototype.setComponent=function(t){this.containerRef=t},t.prototype.render=function(){var t=this.options,e=t.width,n=void 0===e?"100%":e,r=t.height,i=void 0===r?"300px":r,o=t.style,l=void 0===o?{}:o,u=t.direction,c=void 0===u?"ltr":u;return a.createElement("div",{id:this.canvasId,ref:this.containerRef,style:s({width:n,height:i,direction:c},l)})},t.prototype.dispose=function(){this.instance&&(this.instance.dispose(),this.instance=null)},t.prototype.dispatchAction=function(t){this.instance&&this.instance.dispatchAction(t)},t.prototype.getDataURL=function(t){var e;return null===(e=this.instance)||void 0===e?void 0:e.getDataURL(t)},t.prototype.resize=function(t){this.instance&&this.instance.resize(t)},t.prototype.getName=function(){return"H5Adapter"},t.prototype.getVersion=function(){return"1.1.1"},t.prototype.getPlatformInfo=function(){return{platform:"h5",renderer:this.options.renderer||"canvas",userAgent:navigator.userAgent,devicePixelRatio:window.devicePixelRatio}},t}()},382(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(15),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};const o=function(){function t(t){this.chartInstance=null,this.component=null,this.config=t,this.component=t.component}return t.create=function(e){return new t(e)},t.prototype.getInstance=function(){return this.chartInstance},t.prototype.init=function(){var t=this.config,e=t.canvasId,n=t.width,r=t.height,i=t.theme,o=t.option;if(!this.component)return null;if(!e)return null;var a=this.component.createChart({id:e,width:n,height:r,theme:i});return o&&a.setOption(o),this.chartInstance=a,this.config.onInit&&this.config.onInit(a),a},t.prototype.setOption=function(t,e){this.chartInstance?this.chartInstance.setOption(t,e):this.config.option=t},t.prototype.setTheme=function(t){var e,n;this.config.theme=t,this.chartInstance&&(null===(n=(e=this.chartInstance).setTheme)||void 0===n||n.call(e,t))},t.prototype.getWidth=function(){return 0},t.prototype.getHeight=function(){return 0},t.prototype.getDom=function(){return null},t.prototype.convertToDataURL=function(t){var e;return null===(e=this.chartInstance)||void 0===e?void 0:e.getDataURL(t)},t.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},t.prototype.on=function(t,e){this.chartInstance&&this.chartInstance.on(t,e)},t.prototype.off=function(t,e){this.chartInstance&&this.chartInstance.off(t,e)},t.prototype.showLoading=function(t){this.chartInstance&&this.chartInstance.showLoading(t)},t.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},t.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},t.prototype.resize=function(t){this.chartInstance&&this.chartInstance.resize(t)},t.prototype.setComponent=function(t){this.component=t},t.prototype.render=function(){var t=this.config,e=t.canvasId,n=void 0===e?"ec-canvas":e,o=t.width,a=void 0===o?"100%":o,s=t.height,l=void 0===s?"300px":s,u=t.style,c=void 0===u?{}:u;return r.createElement("view",{id:n,style:i({width:a,height:l},c)})},t.prototype.dispatchAction=function(t){this.chartInstance&&this.chartInstance.dispatchAction(t)},t.prototype.getDataURL=function(t){var e;return null===(e=this.chartInstance)||void 0===e?void 0:e.getDataURL(t)},t}()},574(t,e,n){var r,i;n.d(e,{li:()=>u,cK:()=>h,_$:()=>c}),function(t){t.CLICK="click",t.MOUSEMOVE="mousemove",t.MOUSEUP="mouseup",t.MOUSEDOWN="mousedown",t.MOUSEOVER="mouseover",t.MOUSEOUT="mouseout",t.GLOBALOUT="globalout",t.LEGENDSELECTED="legendselected",t.LEGENDUNSELECTED="legendunselected",t.LEGENDSELECTCHANGED="legendselectchanged",t.LEGENDSCROLL="legendscroll",t.DATAZOOM="datazoom",t.DATARANGESELECTED="datarangeselected",t.TIMELINECHANGED="timelinechanged",t.TIMELINEPLAYCHANGED="timelineplaychanged",t.RESTORE="restore",t.DATAVIEWCHANGED="dataviewchanged",t.MAGICTYPECHANGED="magictypechanged",t.GEOSELECTCHANGED="geoselectchanged",t.GEOSELECTED="geoselected",t.GEOUNSELECTED="geounselected",t.PIESELECTCHANGED="pieselectchanged",t.PIESELECTED="pieselected",t.PIEUNSELECTED="pieunselected",t.MAPSELECTCHANGED="mapselectchanged",t.MAPSELECTED="mapselected",t.MAPUNSELECTED="mapunselected",t.AXISAREASELECTED="axisareaselected",t.FOCUSNODEADJACENCY="focusnodeadjacency",t.UNFOCUSNODEADJACENCY="unfocusnodeadjacency",t.BRUSH="brush",t.BRUSHSELECTED="brushselected",t.RENDERED="rendered",t.FINISHED="finished",t.CHART_READY="chartReady",t.CHART_RESIZE="chartResize",t.CHART_ERROR="chartError",t.CHART_DISPOSE="chartDispose"}(r||(r={})),function(t){t.H5="h5",t.WEAPP="weapp",t.ALIPAY="alipay",t.SWAN="swan",t.TT="tt",t.QQ="qq",t.JD="jd",t.HARMONY="harmony",t.DD="dd",t.QYWX="qywx",t.LARK="lark",t.KWAI="kwai"}(i||(i={}));n(251),n(524),n(930),n(123),n(999),n(85),n(280),n(382);var o,a=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},s=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},l=((o={})[i.H5]={name:"H5"},o[i.WEAPP]={name:"Wechat",requireComponent:!0},o[i.ALIPAY]={name:"Alipay",requireComponent:!0},o[i.SWAN]={name:"Baidu",requireComponent:!0},o[i.TT]={name:"ByteDance",requireComponent:!0},o[i.QQ]={name:"QQ",requireComponent:!0},o[i.JD]={name:"JD",requireComponent:!0},o[i.DD]={name:"DingTalk",requireComponent:!0},o[i.QYWX]={name:"QiyeWechat"},o[i.LARK]={name:"Lark"},o[i.KWAI]={name:"Kwai",requireComponent:!0},o[i.HARMONY]={name:"HarmonyOS",requireComponent:!0},o);function u(){if("undefined"==typeof window)return i.H5;for(var t=window,e=[{test:function(){var e,n;return!!(null===(e=t.wx)||void 0===e?void 0:e.getSystemInfoSync)&&!(null===(n=t.wx)||void 0===n?void 0:n.qy)},platform:i.WEAPP},{test:function(){var e;return!!(null===(e=t.my)||void 0===e?void 0:e.getSystemInfoSync)},platform:i.ALIPAY},{test:function(){var e;return!!(null===(e=t.swan)||void 0===e?void 0:e.getSystemInfoSync)},platform:i.SWAN},{test:function(){var e;return!!(null===(e=t.tt)||void 0===e?void 0:e.getSystemInfoSync)},platform:i.TT},{test:function(){var e;return!!(null===(e=t.qq)||void 0===e?void 0:e.getSystemInfoSync)},platform:i.QQ},{test:function(){var e;return!!(null===(e=t.jd)||void 0===e?void 0:e.getSystemInfoSync)},platform:i.JD},{test:function(){var e;return!!(null===(e=t.dd)||void 0===e?void 0:e.getSystemInfoSync)},platform:i.DD},{test:function(){var e;return!!(null===(e=t.wx)||void 0===e?void 0:e.qy)},platform:i.QYWX},{test:function(){var e,n;return"lark"===(null===(n=null===(e=t.tt)||void 0===e?void 0:e.env)||void 0===n?void 0:n.appName)},platform:i.LARK},{test:function(){return navigator.userAgent.includes("HarmonyOS")},platform:i.HARMONY}],n=0,r=e;n<r.length;n++){var o=r[n];if(o.test())return o.platform}return i.H5}function c(){var t;return"undefined"!=typeof window&&"undefined"!=typeof document?"h5":void 0!==n.g&&(null===(t=null===n.g||void 0===n.g?void 0:n.g.wx)||void 0===t?void 0:t.getSystemInfoSync)?"weapp":"unknown"}function h(t){return a(this,void 0,Promise,function(){var e,r;return s(this,function(o){switch(o.label){case 0:e=u(),null==(r=l[e])||r.requireComponent,o.label=1;case 1:switch(o.trys.push([1,15,,17]),e){case i.H5:case i.ALIPAY:case i.QQ:case i.JD:case i.DD:case i.QYWX:case i.LARK:case i.KWAI:return[3,2];case i.WEAPP:return[3,4];case i.SWAN:return[3,6];case i.TT:return[3,8];case i.HARMONY:return[3,10]}return[3,12];case 2:return[4,Promise.resolve().then(n.bind(n,123))];case 3:return[2,o.sent().default.create(t)];case 4:return[4,Promise.resolve().then(n.bind(n,999))];case 5:return[2,o.sent().default.create(t)];case 6:return[4,Promise.resolve().then(n.bind(n,85))];case 7:return[2,o.sent().default.create(t)];case 8:return[4,Promise.resolve().then(n.bind(n,280))];case 9:return[2,o.sent().default.create(t)];case 10:return[4,Promise.resolve().then(n.bind(n,382))];case 11:return[2,o.sent().default.create(t)];case 12:return[4,Promise.resolve().then(n.bind(n,123))];case 13:return[2,o.sent().default.create(t)];case 14:return[3,17];case 15:return o.sent(),[4,Promise.resolve().then(n.bind(n,123))];case 16:return[2,o.sent().default.create(t)];case 17:return[2]}})})}},85(t,e,n){n.r(e),n.d(e,{SwanAdapter:()=>a,default:()=>s});var r,i=n(219),o=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=t.call(this,e)||this;return n.component=null,n.component=e.component,n}return o(e,t),e.create=function(t){return new e(t)},e.prototype.init=function(){var t=this.config,e=t.canvasId,n=t.width,r=t.height,i=t.theme,o=t.option;if(!this.component)return null;if(!e)return null;var a=this.component.createChart({id:e,width:n,height:r,theme:i});o&&a.setOption(o),this.chartInstance=a;var s=this.config.onInit;return s&&s(a),a},e.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},e.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},e.prototype.setComponent=function(t){this.component=t},e.prototype.dispatchAction=function(t){var e,n;null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.dispatchAction)||void 0===n||n.call(e,t)},e.prototype.getDataURL=function(t){var e,n;return null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.getDataURL)||void 0===n?void 0:n.call(e,t)},e}(i.D);const s=a},280(t,e,n){n.r(e),n.d(e,{TTAdapter:()=>a,default:()=>s});var r,i=n(219),o=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=t.call(this,e)||this;return n.component=null,n.component=e.component,n}return o(e,t),e.create=function(t){return new e(t)},e.prototype.init=function(){var t=this.config,e=t.canvasId,n=t.width,r=t.height,i=t.theme,o=t.option;if(!this.component)return null;if(!e)return null;var a=this.component.createChart({id:e,width:n,height:r,theme:i});o&&a.setOption(o),this.chartInstance=a;var s=this.config.onInit;return s&&s(a),a},e.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},e.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},e.prototype.setComponent=function(t){this.component=t},e.prototype.dispatchAction=function(t){var e,n;null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.dispatchAction)||void 0===n||n.call(e,t)},e.prototype.getDataURL=function(t){var e,n;return null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.getDataURL)||void 0===n?void 0:n.call(e,t)},e}(i.D);const s=a},999(t,e,n){n.r(e),n.d(e,{WeappAdapter:()=>a,default:()=>s});var r,i=n(219),o=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=t.call(this,e)||this;return n.component=null,n.component=e.component,n}return o(e,t),e.create=function(t){return new e(t)},e.prototype.init=function(){var t=this.config,e=t.canvasId,n=t.width,r=t.height,i=t.theme,o=t.option;if(!this.component)return null;if(!e)return null;var a=this.component.createChart({id:e,width:n,height:r,theme:i});o&&a.setOption(o),this.chartInstance=a;var s=this.config.onInit;return s&&s(a),a},e.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},e.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},e.prototype.setComponent=function(t){this.component=t},e.prototype.dispatchAction=function(t){var e,n;null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.dispatchAction)||void 0===n||n.call(e,t)},e.prototype.getDataURL=function(t){var e,n;return null===(n=null===(e=this.chartInstance)||void 0===e?void 0:e.getDataURL)||void 0===n?void 0:n.call(e,t)},e}(i.D);const s=a},188(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"bar-chart"}))});s.displayName="BarChart";const l=s},698(t,e,n){n.d(e,{A:()=>d});var r=n(15),i=n.n(r),o=n(574),a=n(524),s=n(855),l=function(){return l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},l.apply(this,arguments)},u=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},c=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};function h(t){var e=t;return(null==e?void 0:e.series)&&Array.isArray(e.series)?e.series.filter(function(t){return(null==t?void 0:t.data)&&Array.isArray(t.data)}).map(function(t){return{name:t.name||"系列",data:t.data}}):[]}const d=function(t){var e,n,d=t.option,p=t.width,f=void 0===p?"100%":p,v=t.height,g=void 0===v?"300px":v,y=t.theme,m=t.style,_=void 0===m?{}:m,b=t.className,x=void 0===b?"":b,w=t.autoResize,S=void 0===w||w,C=t.loading,T=void 0!==C&&C,k=t.loadingOption,I=t.onChartInit,M=t.onChartReady,D=t.renderer,E=void 0===D?"canvas":D,O=t.onEvents,A=void 0===O?{}:O,P=t.chartType,L=void 0===P?"chart":P,R=(0,r.useRef)("".concat(L,"-").concat((0,a.uR)())),N=(0,r.useRef)(null),z=(0,r.useRef)(null),F=(0,r.useRef)(!0),B=(0,r.useRef)(null),H=(0,r.useId)(),j=(0,r.useMemo)(function(){return h(d)},[d]),V=(0,r.useMemo)(function(){return function(t,e){var n=h(e);if(!n.length)return"chart"===t?"空图表":"".concat(t," 空图表");var r=n.reduce(function(t,e){return t+e.data.length},0),i=n.map(function(t){return t.name}).join("、");return"".concat(t,"图表,包含").concat(n.length,"个系列(").concat(i,"),共").concat(r,"个数据点")}(L,d)},[L,d]),W=(0,r.useCallback)(function(t){var e,n,r,i,o,a,s=N.current;if(s){var l=function(t,e){s.dispatchAction({type:"dataZoom",startDelta:t,endDelta:e})};if("Home"===t.key)return t.preventDefault(),void s.dispatchAction({type:"dataZoom",start:0,end:100});switch(t.key){case"+":case"=":if(t.preventDefault(),d=null===(e=null==(h=s.getOption())?void 0:h.dataZoom)||void 0===e?void 0:e[0]){var u=Math.max(0,(null!==(n=d.end)&&void 0!==n?n:100)-5),c=Math.max(0,(null!==(r=d.start)&&void 0!==r?r:0)-5);s.dispatchAction({type:"dataZoom",start:c,end:u})}break;case"-":case"_":var h,d;if(t.preventDefault(),d=null===(i=null==(h=s.getOption())?void 0:h.dataZoom)||void 0===i?void 0:i[0]){u=Math.min(100,(null!==(o=d.end)&&void 0!==o?o:100)+5),c=Math.min((null!==(a=d.start)&&void 0!==a?a:0)+5,u);s.dispatchAction({type:"dataZoom",start:c,end:u})}break;case"ArrowLeft":t.preventDefault(),l(-10,0);break;case"ArrowRight":t.preventDefault(),l(10,0);break;case"ArrowUp":t.preventDefault(),l(0,-10);break;case"ArrowDown":t.preventDefault(),l(0,10)}}},[]),U=(0,r.useMemo)(function(){return(0,s.X)({canvasId:R.current,containerRef:z,width:f,height:g,theme:y,autoResize:S,renderer:E,option:d})},[f,g,y,S,E,d]);(0,r.useEffect)(function(){F.current=!0;return u(void 0,void 0,void 0,function(){var t,e;return c(this,function(n){switch(n.label){case 0:return t=(0,s.X)(l(l({},U),{onInit:function(t){F.current?(N.current=t,A&&Object.entries(A).forEach(function(e){var n=e[0],r=e[1];t.on(n,r)}),I&&I(t),M&&M(t)):t.dispose()}})),[4,(0,o.cK)(t)];case 1:return e=n.sent(),F.current?(e.init(),B.current=function(){N.current&&(A&&Object.entries(A).forEach(function(t){var e=t[0];N.current.off(e)}),N.current.dispose(),N.current=null)},[2]):[2]}})}),function(){F.current=!1,B.current&&(B.current(),B.current=null)}},[U,I,M,A]),(0,r.useEffect)(function(){N.current&&d&&N.current.setOption(d,!0)},[d]),(0,r.useEffect)(function(){N.current&&(T?N.current.showLoading(k):N.current.hideLoading())},[T,k]);var G=l({width:"number"==typeof f?"".concat(f,"px"):f,height:"number"==typeof g?"".concat(g,"px"):g},_);return i().createElement(i().Fragment,null,i().createElement("table",{id:H,"aria-label":"".concat(L," 图表数据"),style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0,0,0,0)",clipPath:"inset(50%)",whiteSpace:"nowrap"},"aria-live":"polite","aria-atomic":"false"},i().createElement("caption",null,V),i().createElement("thead",null,i().createElement("tr",null,j.map(function(t,e){return i().createElement("th",{key:e,scope:"col"},t.name)}))),i().createElement("tbody",null,Array.from({length:Math.min(20,null!==(n=null===(e=j[0])||void 0===e?void 0:e.data.length)&&void 0!==n?n:0)}).map(function(t,e){return i().createElement("tr",{key:e},j.map(function(t,n){var r;return i().createElement("td",{key:n},String(null!==(r=t.data[e])&&void 0!==r?r:""))}))}))),i().createElement("div",{className:"taroviz-".concat(L," ").concat(x),style:G,ref:z,role:"application","aria-label":V,"aria-describedby":H,tabIndex:0,onKeyDown:W}))}},133(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"funnel-chart"}))});s.displayName="FunnelChart";const l=s},334(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"gauge-chart"}))});s.displayName="GaugeChart";const l=s},835(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"heatmap-chart"}))});s.displayName="HeatmapChart";const l=s},127(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"line-chart"}))});s.displayName="LineChart";const l=s},481(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"pie-chart"}))});s.displayName="PieChart";const l=s},443(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"radar-chart"}))});s.displayName="RadarChart";const l=s},490(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)},s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"sankey-chart"}))});s.displayName="SankeyChart";const l=s},589(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=(n(930),function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)}),s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"scatter-chart"}))});s.displayName="ScatterChart";const l=s},673(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)},s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"sunburst-chart"}))});s.displayName="SunburstChart";const l=s},37(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(15),i=n.n(r),o=n(698),a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)},s=(0,r.memo)(function(t){return i().createElement(o.A,a({},t,{chartType:"treemap-chart"}))});s.displayName="TreeMapChart";const l=s},855(t,e,n){n.d(e,{X:()=>i});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function i(t){var e={width:"number"==typeof t.width?t.width:void 0,height:"number"==typeof t.height?t.height:void 0,theme:"string"==typeof t.theme?t.theme:void 0,autoResize:t.autoResize,canvasId:t.canvasId,containerRef:t.containerRef,option:t.option,renderer:t.renderer},n=r({},e);return Object.keys(t).forEach(function(r){r in e||(n[r]=t[r])}),n}},251(t,e,n){var r;n.d(e,{ek:()=>s}),function(t){t.ANIMATION_START="animationStart",t.ANIMATION_UPDATE="animationUpdate",t.ANIMATION_END="animationEnd",t.ANIMATION_CANCEL="animationCancel",t.ANIMATION_REPEAT="animationRepeat"}(r||(r={}));var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};var o=[{name:"default",description:"默认动画配置 — 专业级 (300-500ms, cubicOut)",config:{enabled:!0,duration:400,easing:"cubicOut",appearDuration:450,appearEasing:"cubicOut",updateDuration:300,updateEasing:"cubicOut",disappearDuration:250,disappearEasing:"cubicIn",threshold:1e3,progressive:!0,progressiveStep:500}},{name:"fast",description:"快速动画配置 — 微交互 (150-200ms)",config:{enabled:!0,duration:150,easing:"cubicOut",appearDuration:200,appearEasing:"cubicOut",updateDuration:150,updateEasing:"cubicOut",disappearDuration:100,disappearEasing:"cubicIn",threshold:2e3,progressive:!0,progressiveStep:1e3}},{name:"slow",description:"慢速动画配置 — 页面过渡 (500-600ms, capped)",config:{enabled:!0,duration:500,easing:"cubicInOut",appearDuration:600,appearEasing:"cubicInOut",updateDuration:400,updateEasing:"cubicInOut",disappearDuration:300,disappearEasing:"cubicInOut",threshold:500,progressive:!0,progressiveStep:250}},{name:"bounce",description:"[已废弃] 弹跳动画 — 请使用 default 或 fast",config:{enabled:!1,duration:0,easing:"cubicOut",appearDuration:0,appearEasing:"cubicOut",updateDuration:0,updateEasing:"cubicOut",disappearDuration:0,disappearEasing:"cubicIn",threshold:500,progressive:!1,progressiveStep:250}},{name:"elastic",description:"[已废弃] 弹性动画 — 请使用 default 或 fast",config:{enabled:!1,duration:0,easing:"cubicOut",appearDuration:0,appearEasing:"cubicOut",updateDuration:0,updateEasing:"cubicOut",disappearDuration:0,disappearEasing:"cubicIn",threshold:500,progressive:!1,progressiveStep:250}}],a=function(){function t(t){this.presets=new Map,this.templates=new Map,this.eventHandlers=new Map,this.defaultConfig=(null==t?void 0:t.defaultConfig)||o[0].config,this.performanceConfig=(null==t?void 0:t.performance)||{monitor:!1,frameRate:60,hardwareAcceleration:!0},this.registerPresets(o)}return t.getInstance=function(e){return t.instance?e&&t.instance.updateConfig(e):t.instance=new t(e),t.instance},t.prototype.registerPreset=function(t){this.presets.set(t.name,t)},t.prototype.registerPresets=function(t){var e=this;t.forEach(function(t){return e.registerPreset(t)})},t.prototype.getPreset=function(t){return this.presets.get(t)},t.prototype.getAllPresets=function(){return Array.from(this.presets.values())},t.prototype.registerTemplate=function(t){this.templates.set(t.name,t)},t.prototype.getTemplate=function(t){return this.templates.get(t)},t.prototype.getAllTemplates=function(){return Array.from(this.templates.values())},t.prototype.setDefaultConfig=function(t){this.defaultConfig=t},t.prototype.getDefaultConfig=function(){return this.defaultConfig},t.prototype.getOptimizedConfig=function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var n=i(i({},this.defaultConfig),t);return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?i(i({},n),{enabled:!1,duration:0,appearDuration:0,updateDuration:0,disappearDuration:0}):(n.threshold&&e>n.threshold&&(n.enabled=!1),n)},t.prototype.getAnimationConfigByType=function(t,e){switch(e){case"appear":return{duration:t.appearDuration||t.duration||1e3,easing:t.appearEasing||t.easing||"cubicOut"};case"update":return{duration:t.updateDuration||t.duration||800,easing:t.updateEasing||t.easing||"cubicOut"};case"disappear":return{duration:t.disappearDuration||t.duration||600,easing:t.disappearEasing||t.easing||"cubicIn"};case"emphasis":return{duration:t.duration||300,easing:t.easing||"cubicOut"};default:return{duration:t.duration||1e3,easing:t.easing||"cubicOut"}}},t.prototype.generateEChartsAnimationConfig=function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var n=this.getOptimizedConfig(t,e);return n.enabled?{animation:!0,animationDuration:n.duration,animationEasing:n.easing,animationDelay:n.delay,animationDurationUpdate:n.updateDuration,animationEasingUpdate:n.updateEasing,animationDelayUpdate:n.delay,animationThreshold:n.threshold,progressive:n.progressive,progressiveThreshold:n.progressiveStep,progressiveChunkMode:"sequential"}:{animation:!1}},t.prototype.on=function(t,e){var n;this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set),null===(n=this.eventHandlers.get(t))||void 0===n||n.add(e)},t.prototype.off=function(t,e){var n;e?null===(n=this.eventHandlers.get(t))||void 0===n||n.delete(e):this.eventHandlers.delete(t)},t.prototype.emit=function(t,e){var n=this.eventHandlers.get(t);n&&n.forEach(function(t){try{t(e)}catch(t){}})},t.prototype.updatePerformanceConfig=function(t){this.performanceConfig=i(i({},this.performanceConfig),t)},t.prototype.updateConfig=function(t){t.defaultConfig&&(this.defaultConfig=t.defaultConfig),t.performance&&this.updatePerformanceConfig(t.performance)},t.prototype.getPerformanceConfig=function(){return this.performanceConfig},t.prototype.reset=function(){this.presets.clear(),this.templates.clear(),this.eventHandlers.clear(),this.registerPresets(o)},t}();function s(t,e){return void 0===t&&(t={}),void 0===e&&(e=0),a.getInstance().generateEChartsAnimationConfig(t,e)}a.getInstance()},930(t,e,n){var r=n(348);const i=require("echarts/charts");var o=n(163),a=n(613),s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};r.use(a.CanvasRenderer);var l=[i.PieChart,i.LineChart,i.BarChart,i.GaugeChart,i.ScatterChart,i.RadarChart,i.HeatmapChart,i.FunnelChart],u=[o.TitleComponent,o.TooltipComponent,o.LegendComponent,o.GridComponent,o.DataZoomComponent,o.VisualMapComponent];r.use(s(s([],l,!0),u,!0))},524(t,e,n){n.d(e,{sg:()=>b,$N:()=>_,AZ:()=>m,ZV:()=>S,w5:()=>C,uc:()=>w,t2:()=>g,m_:()=>v,nF:()=>x,uR:()=>f});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function o(t,e){void 0===e&&(e={});var n=e.locale,o=void 0===n?"zh-CN":n,a=e.timeZone,s=void 0===a?"Asia/Shanghai":a,l=i(e,["locale","timeZone"]),u="string"==typeof t||"number"==typeof t?new Date(t):t;return new Intl.DateTimeFormat(o,r({timeZone:s},l)).format(u)}function a(t,e){return void 0===e&&(e={}),o(t,r(r({},e),{timeStyle:void 0,hour:void 0,minute:void 0,second:void 0,fractionalSecondDigits:void 0}))}function s(t,e){return void 0===e&&(e={}),o(t,r(r({},e),{dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0,hour:e.hour||"2-digit",minute:e.minute||"2-digit"}))}function l(t,e){var n=e.locale,r=void 0===n?"zh-CN":n,i=e.currency,o=e.currencyDisplay,a=void 0===o?"symbol":o,s=e.digits,l=void 0===s?2:s,u=e.useGrouping,c=void 0===u||u;return new Intl.NumberFormat(r,{style:"currency",currency:i,currencyDisplay:a,minimumFractionDigits:l,maximumFractionDigits:l,useGrouping:c}).format(t)}function u(t,e){void 0===e&&(e={});var n=e.locale,r=void 0===n?"zh-CN":n,i=e.digits,o=void 0===i?2:i,a=e.useGrouping,s=void 0===a||a;return new Intl.NumberFormat(r,{style:"percent",minimumFractionDigits:o,maximumFractionDigits:o,useGrouping:s}).format(t)}function c(t,e){void 0===e&&(e={});var n=e.locale,o=void 0===n?"zh-CN":n,a=e.digits,s=void 0===a?2:a,l=e.useGrouping,u=void 0===l||l,c=i(e,["locale","digits","useGrouping"]);return new Intl.NumberFormat(o,r({minimumFractionDigits:s,maximumFractionDigits:s,useGrouping:u},c)).format(t)}function h(){return"undefined"!=typeof window&&window.navigator.language||"zh-CN"}function d(){return Intl.DateTimeFormat().resolvedOptions().timeZone}var p=function(){function t(t){void 0===t&&(t={}),this.locale=t.locale||h(),this.timeZone=t.timeZone||d()}return t.prototype.setLocale=function(t){this.locale=t},t.prototype.getLocale=function(){return this.locale},t.prototype.setTimeZone=function(t){this.timeZone=t},t.prototype.getTimeZone=function(){return this.timeZone},t.prototype.formatDateTime=function(t,e){return void 0===e&&(e={}),o(t,r(r({},e),{locale:this.locale,timeZone:this.timeZone}))},t.prototype.formatDate=function(t,e){return void 0===e&&(e={}),a(t,r(r({},e),{locale:this.locale,timeZone:this.timeZone}))},t.prototype.formatTime=function(t,e){return void 0===e&&(e={}),s(t,r(r({},e),{locale:this.locale,timeZone:this.timeZone}))},t.prototype.formatCurrency=function(t,e){return l(t,r(r({},e),{locale:this.locale}))},t.prototype.formatPercent=function(t,e){return void 0===e&&(e={}),u(t,r(r({},e),{locale:this.locale}))},t.prototype.formatNumber=function(t,e){return void 0===e&&(e={}),c(t,r(r({},e),{locale:this.locale}))},t}();new p;function f(){var t;if("function"==typeof(null===(t=globalThis.crypto)||void 0===t?void 0:t.randomUUID))return globalThis.crypto.randomUUID();var e=Date.now().toString(36),n=Math.random().toString(36).substring(2,15);return"".concat(e,"-").concat(n,"-").concat(Math.random().toString(36).substring(2,10))}function v(){return Math.random().toString(36).substring(2,10)}function g(t){return"".concat(t,"-").concat(v())}var y=function(){return y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},y.apply(this,arguments)},m={click:"click",mousemove:"mousemove",mouseup:"mouseup",mousedown:"mousedown",mouseover:"mouseover",mouseout:"mouseout",globalout:"globalout"};function _(t,e){var n=y({},t);return Object.keys(e).forEach(function(r){e[r]instanceof Object&&r in t&&t[r]instanceof Object?n[r]=_(t[r],e[r]):n[r]=e[r]}),n}function b(t,e){var n=null;return function(){for(var r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n&&clearTimeout(n),n=setTimeout(function(){t.apply(r,i),n=null},e)}}function x(t,e){var n=0;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=Date.now();o-n>=e&&(t.apply(this,r),n=o)}}function w(){var t="undefined"==typeof window,e=!t,n=void 0!==window.wx&&"function"==typeof window.wx.getSystemInfoSync,r=void 0!==window.my&&"function"==typeof window.my.getSystemInfoSync;return{isServer:t,isClient:e,isWeapp:n,isAlipay:r,isWeb:e&&!n&&!r}}function S(t,e,n){void 0===e&&(e=2),void 0===n&&(n={});var r=n.useGrouping,i=void 0===r||r,o=n.locale,a=void 0===o?"zh-CN":o;return new Intl.NumberFormat(a,{minimumFractionDigits:e,maximumFractionDigits:e,useGrouping:i}).format(t)}function C(t){var e=t.replace("#","");return(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4,6),16))/1e3>128?"#000000":"#FFFFFF"}},129(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var n="12px sans-serif";var r,i,o=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n<t.length;n++){var r=String.fromCharCode(n+32),i=(t.charCodeAt(n)-20)/100;e[r]=i}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),a={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){if(!r){var s=a.createCanvas();r=s&&s.getContext("2d")}if(r)return i!==e&&(i=r.font=e||n),r.measureText(t);t=t||"";var l=/((?:\d+)?\.?\d*)px/.exec(e=e||n),u=l&&+l[1]||12,c=0;if(e.indexOf("mono")>=0)c=u*t.length;else for(var h=0;h<t.length;h++){var d=o[t[h]];c+=null==d?u:d*u}return{width:c}},loadImage:function(t,e,n){var r=new Image;return r.onload=e,r.onerror=n,r.src=t,r}};var s=E(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),l=E(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),u=Object.prototype.toString,c=Array.prototype,h=c.forEach,d=c.filter,p=c.slice,f=c.map,v=function(){}.constructor,g=v?v.prototype:null,y="__proto__",m=2311;function _(){return m++}function b(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function x(t){if(null==t||"object"!=typeof t)return t;var e=t,n=u.call(t);if("[object Array]"===n){if(!$(t)){e=[];for(var r=0,i=t.length;r<i;r++)e[r]=x(t[r])}}else if(l[n]){if(!$(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(r=0,i=t.length;r<i;r++)e[r]=t[r]}}}else if(!s[n]&&!$(t)&&!V(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==y&&(e[a]=x(t[a]));return e}function w(t,e,n){if(!B(e)||!B(t))return n?x(e):t;for(var r in e)if(e.hasOwnProperty(r)&&r!==y){var i=t[r],o=e[r];!B(o)||!B(i)||R(o)||R(i)||V(o)||V(i)||H(o)||H(i)||$(o)||$(i)?!n&&r in t||(t[r]=x(e[r])):w(i,o,n)}return t}function S(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==y&&(t[n]=e[n]);return t}function C(t,e,n){for(var r=A(e),i=0,o=r.length;i<o;i++){var a=r[i];(n?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}a.createCanvas;function T(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n}return-1}function k(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else C(t,e,n)}function I(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function M(t,e,n){if(t&&e)if(t.forEach&&t.forEach===h)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function D(t,e,n){if(!t)return[];if(!e)return Z(t);if(t.map&&t.map===f)return t.map(e,n);for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.call(n,t[i],i,t));return r}function E(t,e,n,r){if(t&&e){for(var i=0,o=t.length;i<o;i++)n=e.call(r,n,t[i],i,t);return n}}function O(t,e,n){if(!t)return[];if(!e)return Z(t);if(t.filter&&t.filter===d)return t.filter(e,n);for(var r=[],i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t)&&r.push(t[i]);return r}function A(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}var P=g&&N(g.bind)?g.call.bind(g.bind):function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return t.apply(e,n.concat(p.call(arguments)))}};function L(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(p.call(arguments)))}}function R(t){return Array.isArray?Array.isArray(t):"[object Array]"===u.call(t)}function N(t){return"function"==typeof t}function z(t){return"string"==typeof t}function F(t){return"number"==typeof t}function B(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function H(t){return!!s[u.call(t)]}function j(t){return!!l[u.call(t)]}function V(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function W(t){return null!=t.colorStops}function U(t){return t!=t}function G(t,e){return null!=t?t:e}function Y(t,e,n){return null!=t?t:null!=e?e:n}function Z(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return p.apply(t,e)}function q(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function X(t,e){if(!t)throw new Error(e)}function K(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Q="__ec_primitive__";function J(t){t[Q]=!0}function $(t){return t[Q]}var tt=function(){function t(){this.data={}}return t.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e,this},t.prototype.keys=function(){return A(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},t}(),et="function"==typeof Map;var nt=function(){function t(e){var n=R(e);this.data=et?new Map:new tt;var r=this;function i(t,e){n?r.set(t,e):r.set(e,t)}e instanceof t?e.each(i):e&&M(e,i)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,e){return this.data.set(t,e),e},t.prototype.each=function(t,e){this.data.forEach(function(n,r){t.call(e,n,r)})},t.prototype.keys=function(){var t=this.data.keys();return et?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function rt(t){return new nt(t)}function it(t,e){var n;if(Object.create)n=Object.create(t);else{var r=function(){};r.prototype=t,n=new r}return e&&S(n,e),n}function ot(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function at(t,e){return t.hasOwnProperty(e)}function st(){}var lt=180/Math.PI,ut=(Number.EPSILON||Math.pow(2,-52),function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}),ct=new function(){this.browser=new ut,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(ct.wxa=!0,ct.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?ct.worker=!0:!ct.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(ct.node=!0,ct.svgSupported=!0):function(t,e){var n=e.browser,r=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11);var s=e.domSupported="undefined"!=typeof document;if(s){var l=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in l||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,ct);const ht=ct;function dt(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return z(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function pt(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function ft(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return function(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),r=n>0?+e.slice(n+1):0,i=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(t)}function vt(t,e){var n=Math.max(ft(t),ft(e)),r=t+e;return n>20?r:pt(r,n)}var gt=/^(?:(\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 yt(t){if(t instanceof Date)return t;if(z(t)){var e=gt.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(Math.round(t))}function mt(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function _t(t,e){var n=mt(t),r=Math.pow(10,n),i=t/r;return t=(e?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,n>=-20?+t.toFixed(n<0?-n:0):t}function bt(t){var e=parseFloat(t);return e==t&&(0!==e||!z(t)||t.indexOf("x")<=0)?e:NaN}function xt(){return Math.round(9*Math.random())}function wt(t,e){return 0===e?t:wt(e,t%e)}function St(t,e){return null==t?e:null==e?t:t*e/wt(t,e)}function Ct(t,e,n){return(e-t)*n+t}var Tt="series\0",kt="\0_ec_\0";function It(t){return t instanceof Array?t:null==t?[]:[t]}function Mt(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}var Dt=["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"];function Et(t){return!B(t)||R(t)||t instanceof Date?t:t.value}function Ot(t){return B(t)&&!(t instanceof Array)}function At(t,e,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;t=t||[],e=(e||[]).slice();var a=rt();M(e,function(t,n){B(t)||(e[n]=null)});var s,l,u=function(t,e,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<t.length;i++){var o=t[i];o&&null!=o.id&&e.set(o.id,i),r.push({existing:"replaceMerge"===n||zt(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(t,a,n);return(r||i)&&function(t,e,n,r){M(r,function(i,o){if(i&&null!=i.id){var a=Lt(i.id),s=n.get(a);if(null!=s){var l=t[s];X(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=e[s],r[o]=null}}})}(u,t,a,e),r&&function(t,e){M(e,function(n,r){if(n&&null!=n.name)for(var i=0;i<t.length;i++){var o=t[i].existing;if(!t[i].newOption&&o&&(null==o.id||null==n.id)&&!zt(n)&&!zt(o)&&Pt("name",o,n))return t[i].newOption=n,void(e[r]=null)}})}(u,e),r||i?function(t,e,n){M(e,function(e){if(e){for(var r,i=0;(r=t[i])&&(r.newOption||zt(r.existing)||r.existing&&null!=e.id&&!Pt("id",e,r.existing));)i++;r?(r.newOption=e,r.brandNew=n):t.push({newOption:e,brandNew:n,existing:null,keyInfo:null}),i++}})}(u,e,i):o&&function(t,e){M(e,function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}(u,e),s=u,l=rt(),M(s,function(t){var e=t.existing;e&&l.set(e.id,t)}),M(s,function(t){var e=t.newOption;X(!e||null==e.id||!l.get(e.id)||l.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&l.set(e.id,t),!t.keyInfo&&(t.keyInfo={})}),M(s,function(t,e){var n=t.existing,r=t.newOption,i=t.keyInfo;if(B(r)){if(i.name=null!=r.name?Lt(r.name):n?n.name:Tt+e,n)i.id=Lt(n.id);else if(null!=r.id)i.id=Lt(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,t)}}),u}function Pt(t,e,n){var r=Rt(e[t],null),i=Rt(n[t],null);return null!=r&&null!=i&&r===i}function Lt(t){return Rt(t,"")}function Rt(t,e){return null==t?e:z(t)?t:F(t)||(n=t,"[object String]"===u.call(n))?t+"":e;var n}function Nt(t){var e=t.name;return!(!e||!e.indexOf(Tt))}function zt(t){return t&&null!=t.id&&0===Lt(t.id).indexOf(kt)}function Ft(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?R(e.dataIndex)?D(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?R(e.name)?D(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Bt(){var t="__ec_inner_"+Ht++;return function(e){return e[t]||(e[t]={})}}var Ht=xt();function jt(t,e,n){var r=Vt(e,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each(function(e,r){var i=Ut(t,r,e,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]}),a}function Vt(t,e){var n;if(z(t)){var r={};r[t+"Index"]=0,n=r}else n=t;var i=rt(),o={},a=!1;return M(n,function(t,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(e&&e.includeMainTypes&&T(e.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=t}else o[n]=t}),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var Wt={useDefault:!0,enableAll:!1,enableNone:!1};function Ut(t,e,n,r){r=r||Wt;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=t.getComponent(e))?[l]:[],s}return"none"===i||!1===i?(X(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(X(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=t.queryComponents({mainType:e,index:i,id:o,name:a}),s)}function Gt(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}var Yt="___EC__COMPONENT__CONTAINER___",Zt="___EC__EXTENDED_CLASS___";function qt(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function Xt(t,n){t.$constructor=t,t.extend=function(t){var n,r,i=this;return N(r=i)&&/^class\s/.test(Function.prototype.toString.call(r))?n=function(t){function n(){return t.apply(this,arguments)||this}return e(n,t),n}(i):(n=function(){(t.$constructor||i).apply(this,arguments)},function(t,e){var n=t.prototype;function r(){}for(var i in r.prototype=e.prototype,t.prototype=new r,n)n.hasOwnProperty(i)&&(t.prototype[i]=n[i]);t.prototype.constructor=t,t.superClass=e}(n,this)),S(n.prototype,t),n[Zt]=!0,n.extend=this.extend,n.superCall=Jt,n.superApply=$t,n.superClass=i,n}}function Kt(t,e){t.extend=e.extend}var Qt=Math.round(10*Math.random());function Jt(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[e].apply(t,n)}function $t(t,e,n){return this.superClass.prototype[e].apply(t,n)}function te(t){var e={};t.registerClass=function(t){var n,r=t.type||t.prototype.type;if(r){X(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),t.prototype.type=r;var i=qt(r);if(i.sub){if(i.sub!==Yt){var o=function(t){var n=e[t.main];n&&n[Yt]||((n=e[t.main]={})[Yt]=!0);return n}(i);o[i.sub]=t}}else e[i.main]=t}return t},t.getClass=function(t,n,r){var i=e[t];if(i&&i[Yt]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+t+"."+(n||"")+" is used but not imported.":t+".type should be specified.");return i},t.getClassesByMainType=function(t){var n=qt(t),r=[],i=e[n.main];return i&&i[Yt]?M(i,function(t,e){e!==Yt&&r.push(t)}):r.push(i),r},t.hasClass=function(t){var n=qt(t);return!!e[n.main]},t.getAllClassMainTypes=function(){var t=[];return M(e,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){var n=qt(t),r=e[n.main];return r&&r[Yt]}}function ee(t,e){for(var n=0;n<t.length;n++)t[n][1]||(t[n][1]=t[n][0]);return e=e||!1,function(n,r,i){for(var o={},a=0;a<t.length;a++){var s=t[a][1];if(!(r&&T(r,s)>=0||i&&T(i,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var ne=ee([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),re=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return ne(this,t,e)},t}(),ie=function(t){this.value=t},oe=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new ie(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ae=function(){function t(t){this._list=new oe,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,i=null;if(null==r[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new ie(e),a.key=t,n.insertEntry(a),r[t]=a}return i},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();const se=ae;var le=Bt(),ue={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 ce(t){return(t=Math.round(t))<0?0:t>255?255:t}function he(t){return t<0?0:t>1?1:t}function de(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?ce(parseFloat(e)/100*255):ce(parseInt(e,10))}function pe(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?he(parseFloat(e)/100):he(parseFloat(e))}function fe(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function ve(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function ge(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ye=new se(20),me=null;function _e(t,e){me&&ge(me,e),me=ye.put(t,me||e.slice())}function be(t,e){if(t){e=e||[];var n=ye.get(t);if(n)return ge(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in ue)return ge(e,ue[r]),_e(t,e),e;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(ve(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),_e(t,e),e):void ve(e,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(ve(e,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),_e(t,e),e):void ve(e,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?ve(e,+u[0],+u[1],+u[2],1):ve(e,0,0,0,1);c=pe(u.pop());case"rgb":return u.length>=3?(ve(e,de(u[0]),de(u[1]),de(u[2]),3===u.length?c:pe(u[3])),_e(t,e),e):void ve(e,0,0,0,1);case"hsla":return 4!==u.length?void ve(e,0,0,0,1):(u[3]=pe(u[3]),xe(u,e),_e(t,e),e);case"hsl":return 3!==u.length?void ve(e,0,0,0,1):(xe(u,e),_e(t,e),e);default:return}}ve(e,0,0,0,1)}}function xe(t,e){var n=(parseFloat(t[0])%360+360)%360/360,r=pe(t[1]),i=pe(t[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return ve(e=e||[],ce(255*fe(a,o,n+1/3)),ce(255*fe(a,o,n)),ce(255*fe(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function we(t,e){var n=be(t);if(n){for(var r=0;r<3;r++)n[r]=e<0?n[r]*(1-e)|0:(255-n[r])*e+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Se(n,4===n.length?"rgba":"rgb")}}function Se(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Ce(t,e){var n=be(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}new se(100);function Te(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ke(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ie(t,e,n){var r=e[0]*n[0]+e[2]*n[1],i=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function Me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function De(t,e){var n=e[0],r=e[2],i=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*r;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-r*l,t[3]=n*l,t[4]=(r*s-a*i)*l,t[5]=(o*i-n*s)*l,t):null}function Ee(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function Oe(t){return[t[0],t[1]]}function Ae(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Pe(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Le(t){return Math.sqrt(Re(t))}function Re(t){return t[0]*t[0]+t[1]*t[1]}function Ne(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ze(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Fe=ze;var Be=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function He(t,e,n,r){return t[0]=e[0]+r*(n[0]-e[0]),t[1]=e[1]+r*(n[1]-e[1]),t}function je(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function Ve(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function We(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var Ue=Te,Ge=5e-5;function Ye(t){return t>Ge||t<-5e-5}var Ze=[],qe=[],Xe=[1,0,0,1,0,0],Ke=Math.abs,Qe=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Ye(this.rotation)||Ye(this.x)||Ye(this.y)||Ye(this.scaleX-1)||Ye(this.scaleY-1)||Ye(this.skewX)||Ye(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):Ue(n),t&&(e?Ie(n,t,n):ke(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Ue(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ze);var n=Ze[0]<0?-1:1,r=Ze[1]<0?-1:1,i=((Ze[0]-n)*e+n)/Ze[0]||0,o=((Ze[1]-r)*e+r)/Ze[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],De(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),i=Math.PI/2+r-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],Ie(qe,t.invTransform,e),e=qe);var n=this.originX,r=this.originY;(n||r)&&(Xe[4]=n,Xe[5]=r,Ie(qe,e,Xe),qe[4]-=n,qe[5]-=r,e=qe),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],r=this.invTransform;return r&&je(n,n,r),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],r=this.transform;return r&&je(n,n,r),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Ke(t[0]-1)>1e-10&&Ke(t[3]-1)>1e-10?Math.sqrt(Ke(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){!function(t,e){for(var n=0;n<Je.length;n++){var r=Je[n];t[r]=e[r]}}(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,i=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,c=t.y,h=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||r||a||s){var p=n+a,f=r+s;e[4]=-p*i-h*f*o,e[5]=-f*o-d*p*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=d*i,e[2]=h*o,l&&function(t,e,n,r){void 0===r&&(r=[0,0]);var i=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(n),h=Math.cos(n);t[0]=i*h+s*c,t[1]=-i*c+s*h,t[2]=o*h+l*c,t[3]=-o*c+h*l,t[4]=h*(a-r[0])+c*(u-r[1])+r[0],t[5]=h*(u-r[1])-c*(a-r[0])+r[1]}(e,e,l),e[4]+=n+u,e[5]+=r+c,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Je=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];const $e=Qe;var tn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=r*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-tn.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*tn.bounceIn(2*t):.5*tn.bounceOut(2*t-1)+.5}};const en=tn;var nn=Math.pow,rn=Math.sqrt,on=1e-8,an=1e-4,sn=rn(3),ln=1/3,un=Ee(),cn=Ee(),hn=Ee();function dn(t){return t>-1e-8&&t<on}function pn(t){return t>on||t<-1e-8}function fn(t,e,n,r,i){var o=1-i;return o*o*(o*t+3*i*e)+i*i*(i*r+3*o*n)}function vn(t,e,n,r,i){var o=1-i;return 3*(((e-t)*o+2*(n-e)*i)*o+(r-n)*i*i)}function gn(t,e,n,r,i,o){var a=r+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-i,c=s*s-3*a*l,h=s*l-9*a*u,d=l*l-3*s*u,p=0;if(dn(c)&&dn(h)){if(dn(s))o[0]=0;else(C=-l/s)>=0&&C<=1&&(o[p++]=C)}else{var f=h*h-4*c*d;if(dn(f)){var v=h/c,g=-v/2;(C=-s/a+v)>=0&&C<=1&&(o[p++]=C),g>=0&&g<=1&&(o[p++]=g)}else if(f>0){var y=rn(f),m=c*s+1.5*a*(-h+y),_=c*s+1.5*a*(-h-y);(C=(-s-((m=m<0?-nn(-m,ln):nn(m,ln))+(_=_<0?-nn(-_,ln):nn(_,ln))))/(3*a))>=0&&C<=1&&(o[p++]=C)}else{var b=(2*c*s-3*a*h)/(2*rn(c*c*c)),x=Math.acos(b)/3,w=rn(c),S=Math.cos(x),C=(-s-2*w*S)/(3*a),T=(g=(-s+w*(S+sn*Math.sin(x)))/(3*a),(-s+w*(S-sn*Math.sin(x)))/(3*a));C>=0&&C<=1&&(o[p++]=C),g>=0&&g<=1&&(o[p++]=g),T>=0&&T<=1&&(o[p++]=T)}}return p}function yn(t,e,n,r,i){var o=6*n-12*e+6*t,a=9*e+3*r-3*t-9*n,s=3*e-3*t,l=0;if(dn(a)){if(pn(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(dn(u))i[0]=-o/(2*a);else if(u>0){var c,h=rn(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(i[l++]=c),d>=0&&d<=1&&(i[l++]=d)}}return l}function mn(t,e,n,r,i,o){var a=(e-t)*i+t,s=(n-e)*i+e,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,h=(c-u)*i+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=r}function _n(t,e,n,r,i,o,a,s,l,u,c){var h,d,p,f,v,g=.005,y=1/0;un[0]=l,un[1]=u;for(var m=0;m<1;m+=.05)cn[0]=fn(t,n,i,a,m),cn[1]=fn(e,r,o,s,m),(f=Be(un,cn))<y&&(h=m,y=f);y=1/0;for(var _=0;_<32&&!(g<an);_++)d=h-g,p=h+g,cn[0]=fn(t,n,i,a,d),cn[1]=fn(e,r,o,s,d),f=Be(cn,un),d>=0&&f<y?(h=d,y=f):(hn[0]=fn(t,n,i,a,p),hn[1]=fn(e,r,o,s,p),v=Be(hn,un),p<=1&&v<y?(h=p,y=v):g*=.5);return c&&(c[0]=fn(t,n,i,a,h),c[1]=fn(e,r,o,s,h)),rn(y)}function bn(t,e,n,r,i,o,a,s,l){for(var u=t,c=e,h=0,d=1/l,p=1;p<=l;p++){var f=p*d,v=fn(t,n,i,a,f),g=fn(e,r,o,s,f),y=v-u,m=g-c;h+=Math.sqrt(y*y+m*m),u=v,c=g}return h}function xn(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function wn(t,e,n,r){return 2*((1-r)*(e-t)+r*(n-e))}function Sn(t,e,n){var r=t+n-2*e;return 0===r?.5:(t-e)/r}function Cn(t,e,n,r,i){var o=(e-t)*r+t,a=(n-e)*r+e,s=(a-o)*r+o;i[0]=t,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function Tn(t,e,n,r,i,o,a,s,l){var u,c=.005,h=1/0;un[0]=a,un[1]=s;for(var d=0;d<1;d+=.05){cn[0]=xn(t,n,i,d),cn[1]=xn(e,r,o,d),(g=Be(un,cn))<h&&(u=d,h=g)}h=1/0;for(var p=0;p<32&&!(c<an);p++){var f=u-c,v=u+c;cn[0]=xn(t,n,i,f),cn[1]=xn(e,r,o,f);var g=Be(cn,un);if(f>=0&&g<h)u=f,h=g;else{hn[0]=xn(t,n,i,v),hn[1]=xn(e,r,o,v);var y=Be(hn,un);v<=1&&y<h?(u=v,h=y):c*=.5}}return l&&(l[0]=xn(t,n,i,u),l[1]=xn(e,r,o,u)),rn(h)}function kn(t,e,n,r,i,o,a){for(var s=t,l=e,u=0,c=1/a,h=1;h<=a;h++){var d=h*c,p=xn(t,n,i,d),f=xn(e,r,o,d),v=p-s,g=f-l;u+=Math.sqrt(v*v+g*g),s=p,l=f}return u}var In=/cubic-bezier\(([0-9,\.e ]+)\)/;function Mn(t){var e=t&&In.exec(t);if(e){var n=e[1].split(","),r=+K(n[0]),i=+K(n[1]),o=+K(n[2]),a=+K(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:gn(0,r,o,1,t,s)&&fn(0,i,a,1,s[0])}}}var Dn=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||st,this.ondestroy=t.ondestroy||st,this.onrestart=t.onrestart||st,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,r=t-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=N(t)?t:en[t]||Mn(t)},t}();const En=Dn;Math.round;ht.hasGlobalWindow&&N(window.btoa);var On=Array.prototype.slice;function An(t,e,n){return(e-t)*n+t}function Pn(t,e,n,r){for(var i=e.length,o=0;o<i;o++)t[o]=An(e[o],n[o],r);return t}function Ln(t,e,n,r){for(var i=e.length,o=0;o<i;o++)t[o]=e[o]+n[o]*r;return t}function Rn(t,e,n,r){for(var i=e.length,o=i&&e[0].length,a=0;a<i;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+n[a][s]*r}return t}function Nn(t,e){for(var n=t.length,r=e.length,i=n>r?e:t,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}function zn(t,e,n){var r=t,i=e;if(r.push&&i.push){var o=r.length,a=i.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===n?i[s]:On.call(i[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=i[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=i[s][u])}}function Fn(t){if(I(t)){var e=t.length;if(I(t[0])){for(var n=[],r=0;r<e;r++)n.push(On.call(t[r]));return n}return On.call(t)}return t}function Bn(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function Hn(t){return 4===t||5===t}function jn(t){return 1===t||2===t}var Vn=[0,0,0,0],Wn=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=e;if(I(e)){var l=function(t){return I(t&&t[0])?2:1}(e);a=l,(1===l&&!F(e[0])||2===l&&!F(e[0][0]))&&(o=!0)}else if(F(e)&&!U(e))a=0;else if(z(e))if(isNaN(+e)){var u=be(e);u&&(s=u,a=3)}else a=0;else if(W(e)){var c=S({},s);c.colorStops=D(e.colorStops,function(t){return{offset:t.offset,color:be(t.color)}}),"linear"===e.type?a=4:function(t){return"radial"===t.type}(e)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var h={time:t,value:s,rawValue:e,percent:0};return n&&(h.easing=n,h.easingFunc=N(n)?n:en[n]||Mn(n)),r.push(h),h},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(t,e){return t.time-e.time});for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=jn(r),l=Hn(r),u=0;u<i;u++){var c=n[u],h=c.value,d=o.value;c.percent=c.time/t,a||(s&&u!==i-1?zn(h,d,r):l&&Nn(h.colorStops,d.colorStops))}if(!a&&5!==r&&e&&this.needsAnimate()&&e.needsAnimate()&&r===e.valType&&!e._finished){this._additiveTrack=e;var p=n[0].value;for(u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-p:3===r?n[u].additiveValue=Ln([],n[u].value,p,-1):jn(r)&&(n[u].additiveValue=1===r?Ln([],n[u].value,p,-1):Rn([],n[u].value,p,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,h=3===s,d=this._lastFr,p=Math.min;if(1===u)r=i=l[0];else{if(e<0)n=0;else if(e<this._lastFrP){for(n=p(d+1,u-1);n>=0&&!(l[n].percent<=e);n--);n=p(n,u-2)}else{for(n=d;n<u&&!(l[n].percent>e);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=e;var f=i.percent-r.percent,v=0===f?1:p((e-r.percent)/f,1);i.easingFunc&&(v=i.easingFunc(v));var g=o?this._additiveValue:h?Vn:t[c];if(!jn(s)&&!h||g||(g=this._additiveValue=[]),this.discrete)t[c]=v<1?r.rawValue:i.rawValue;else if(jn(s))1===s?Pn(g,r[a],i[a],v):function(t,e,n,r){for(var i=e.length,o=i&&e[0].length,a=0;a<i;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=An(e[a][s],n[a][s],r)}}(g,r[a],i[a],v);else if(Hn(s)){var y=r[a],m=i[a],_=4===s;t[c]={type:_?"linear":"radial",x:An(y.x,m.x,v),y:An(y.y,m.y,v),colorStops:D(y.colorStops,function(t,e){var n=m.colorStops[e];return{offset:An(t.offset,n.offset,v),color:Bn(Pn([],t.color,n.color,v))}}),global:m.global},_?(t[c].x2=An(y.x2,m.x2,v),t[c].y2=An(y.y2,m.y2,v)):t[c].r=An(y.r,m.r,v)}else if(h)Pn(g,r[a],i[a],v),o||(t[c]=Bn(g));else{var b=An(r[a],i[a],v);o?this._additiveValue=b:t[c]=b}o&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,r=this._additiveValue;0===e?t[n]=t[n]+r:3===e?(be(t[n],Vn),Ln(Vn,Vn,r,1),t[n]=Bn(Vn)):1===e?Ln(t[n],t[n],r,1):2===e&&Rn(t[n],t[n],r,1)},t}(),Un=function(){function t(t,e,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&r?b("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,A(e),n)},t.prototype.whenWithKeys=function(t,e,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new Wn(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,h=c[c.length-1];l=h&&h.value,3===u.valType&&l&&(l=Bn(l))}else l=this._target[a];if(null==l)continue;t>0&&s.addKeyframe(0,Fn(l),r),this._trackKeys.push(a)}s.addKeyframe(t,Fn(e[a]),r)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},t.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(t);i&&(e=i)}return e},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(e._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var h=new En({life:r,loop:this._loop,delay:this._delay||0,onframe:function(t){e._started=2;var r=e._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(e._additiveAnimators=null)}for(o=0;o<n.length;o++)n[o].step(e._target,t);var a=e._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](e._target,t)},ondestroy:function(){e._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&h.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return D(this._trackKeys,function(e){return t._tracks[e]})},t.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<t.length;i++){var o=n[t[i]];o&&!o.isFinished()&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(t,e,n){if(t){e=e||this._trackKeys;for(var r=0;r<e.length;r++){var i=e[r],o=this._tracks[i];if(o&&!o.isFinished()){var a=o.keyframes,s=a[n?0:a.length-1];s&&(t[i]=Fn(s.rawValue))}}}},t.prototype.__changeFinalValue=function(t,e){e=e||A(t);for(var n=0;n<e.length;n++){var r=e[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,t[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},t}();const Gn=Un;var Yn=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,r){t.x=e.x+n.x*r,t.y=e.y+n.y*r},t.lerp=function(t,e,n,r){var i=1-r;t.x=i*e.x+r*n.x,t.y=i*e.y+r*n.y},t}();const Zn=Yn;var qn=Math.min,Xn=Math.max,Kn=Math.abs,Qn=["x","y"],Jn=["width","height"],$n=new Zn,tr=new Zn,er=new Zn,nr=new Zn,rr=hr(),ir=rr.minTv,or=rr.maxTv,ar=[0,0],sr=function(){function t(e,n,r,i){t.set(this,e,n,r,i)}return t.set=function(t,e,n,r,i){return r<0&&(e+=r,r=-r),i<0&&(n+=i,i=-i),t.x=e,t.y=n,t.width=r,t.height=i,t},t.prototype.union=function(t){var e=qn(t.x,this.x),n=qn(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Xn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Xn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,i=[1,0,0,1,0,0];return Me(i,i,[-e.x,-e.y]),function(t,e,n){var r=n[0],i=n[1];t[0]=e[0]*r,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*i}(i,i,[n,r]),Me(i,i,[t.x,t.y]),i},t.prototype.intersect=function(e,n,r){return t.intersect(this,e,n,r)},t.intersect=function(e,n,r,i){r&&Zn.set(r,0,0);var o=i&&i.outIntersectRect||null,a=i&&i.clamp;if(o&&(o.x=o.y=o.width=o.height=NaN),!e||!n)return!1;e instanceof t||(e=t.set(lr,e.x,e.y,e.width,e.height)),n instanceof t||(n=t.set(ur,n.x,n.y,n.width,n.height));var s=!!r;rr.reset(i,s);var l=rr.touchThreshold,u=e.x+l,c=e.x+e.width-l,h=e.y+l,d=e.y+e.height-l,p=n.x+l,f=n.x+n.width-l,v=n.y+l,g=n.y+n.height-l;if(u>c||h>d||p>f||v>g)return!1;var y=!(c<p||f<u||d<v||g<h);return(s||o)&&(ar[0]=1/0,ar[1]=0,cr(u,c,p,f,0,s,o,a),cr(h,d,v,g,1,s,o,a),s&&Zn.copy(r,y?rr.useDir?rr.dirMinTv:ir:or)),y},t.contain=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},t.prototype.contain=function(e,n){return t.contain(this,e,n)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},t.applyTransform=function(e,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return e.x=n.x*i+a,e.y=n.y*o+s,e.width=n.width*i,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}$n.x=er.x=n.x,$n.y=nr.y=n.y,tr.x=nr.x=n.x+n.width,tr.y=er.y=n.y+n.height,$n.transform(r),nr.transform(r),tr.transform(r),er.transform(r),e.x=qn($n.x,tr.x,er.x,nr.x),e.y=qn($n.y,tr.y,er.y,nr.y);var l=Xn($n.x,tr.x,er.x,nr.x),u=Xn($n.y,tr.y,er.y,nr.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),lr=new sr(0,0,0,0),ur=new sr(0,0,0,0);function cr(t,e,n,r,i,o,a,s){var l=Kn(e-n),u=Kn(r-t),c=qn(l,u),h=Qn[i],d=Qn[1-i],p=Jn[i];e<n||r<t?l<u?(o&&(or[h]=-l),s&&(a[h]=e,a[p]=0)):(o&&(or[h]=u),s&&(a[h]=t,a[p]=0)):(a&&(a[h]=Xn(t,n),a[p]=qn(e,r)-a[h]),o&&(c<ar[0]||rr.useDir)&&(ar[0]=qn(c,ar[0]),(l<u||!rr.bidirectional)&&(ir[h]=l,ir[d]=0,rr.useDir&&rr.calcDirMTV()),(l>=u||!rr.bidirectional)&&(ir[h]=-u,ir[d]=0,rr.useDir&&rr.calcDirMTV())))}function hr(){var t=0,e=new Zn,n=new Zn,r={minTv:new Zn,maxTv:new Zn,useDir:!1,dirMinTv:new Zn,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){r.touchThreshold=0,i&&null!=i.touchThreshold&&(r.touchThreshold=Xn(0,i.touchThreshold)),r.negativeSize=!1,o&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&null!=i.direction&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),t=i.direction,r.bidirectional=null==i.bidirectional||!!i.bidirectional,r.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var o=r.minTv,a=r.dirMinTv,s=o.y*o.y+o.x*o.x,l=Math.sin(t),u=Math.cos(t),c=l*o.y+u*o.x;i(c)?i(o.x)&&i(o.y)&&a.set(0,0):(n.x=s*u/c,n.y=s*l/c,i(n.x)&&i(n.y)?a.set(0,0):(r.bidirectional||e.dot(n)>0)&&n.len()<a.len()&&a.copy(n))}};function i(t){return Kn(t)<1e-10}return r}const dr=sr;var pr=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof e&&(r=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),i[t]||(i[t]=[]);for(var a=0;a<i[t].length;a++)if(i[t][a].h===n)return this;var s={h:n,query:e,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[t].length-1,u=i[t][l];return u&&u.callAtLast?i[t].splice(l,0,s):i[t].push(s),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var r=[],i=0,o=n[t].length;i<o;i++)n[t][i].h!==e&&r.push(n[t][i]);n[t]=r}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[t],i=this._$eventProcessor;if(r)for(var o=e.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return i&&i.afterTrigger&&i.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[t],i=this._$eventProcessor;if(r)for(var o=e.length,a=e[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(t,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(t),this},t}();const fr=pr;var vr;function gr(t){vr||(vr=new se(100)),t=t||n;var e=vr.get(t);return e||(e={font:t,strWidthCache:new se(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:a.measureText("国",t).width,asciiCharWidth:a.measureText("a",t).width},vr.put(t,e)),e}var yr=0,mr=5;function _r(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=function(t){if(!(yr>=mr)){t=t||n;for(var e=[],r=+new Date,i=0;i<=127;i++)e[i]=a.measureText(String.fromCharCode(i),t).width;var o=+new Date-r;return o>16?yr=mr:o>2&&yr++,e}}(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?null!=t.asciiWidthMap?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function br(t,e){var n=t.strWidthCache,r=n.get(e);return null==r&&(r=a.measureText(e,t.font).width,n.put(e,r)),r}function xr(t,e,n,r){return"right"===n?r?t+=e:t-=e:"center"===n&&(r?t+=e/2:t-=e/2),t}function wr(t,e,n,r){return"middle"===n?r?t+=e/2:t-=e/2:"bottom"===n&&(r?t+=e:t-=e),t}function Sr(t){return gr(t).stWideCharWidth}function Cr(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Tr(t,e,n){var r=e.position||"inside",i=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(r instanceof Array)l+=Cr(r[0],n.width),u+=Cr(r[1],n.height),c=null,h=null;else switch(r){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+a,u+=s,h="middle";break;case"top":l+=a/2,u-=i,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=a-i,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,h="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var kr=1;ht.hasGlobalWindow&&(kr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ir=kr,Mr="#333",Dr="#ccc",Er="__zr_normal__",Or=Je.concat(["ignore"]),Ar=E(Je,function(t,e){return t[e]=!0,t},{ignore:!1}),Pr={},Lr=new dr(0,0,0,0),Rr=[],Nr=function(){function t(t){this.id=_(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=e.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;i.copyTransform(e);var u=null!=n.position,c=n.autoOverflowArea,h=void 0;if((c||u)&&(h=Lr,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),r||h.applyTransform(this.transform)),u){this.calculateTextPosition?this.calculateTextPosition(Pr,n,h):Tr(Pr,n,h),i.x=Pr.x,i.y=Pr.y,o=Pr.align,a=Pr.verticalAlign;var d=n.origin;if(d&&null!=n.rotation){var p=void 0,f=void 0;"center"===d?(p=.5*h.width,f=.5*h.height):(p=Cr(d[0],h.width),f=Cr(d[1],h.height)),l=!0,i.originX=-i.x+p+(r?0:h.x),i.originY=-i.y+f+(r?0:h.y)}}null!=n.rotation&&(i.rotation=n.rotation);var v=n.offset;v&&(i.x+=v[0],i.y+=v[1],l||(i.originX=-v[0],i.originY=-v[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var y=g.overflowRect=g.overflowRect||new dr(0,0,0,0);i.getLocalTransform(Rr),De(Rr,Rr),dr.copy(y,h),y.applyTransform(Rr)}else g.overflowRect=null;var m=void 0,_=void 0,b=void 0;(null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside)&&this.canBeInsideText()?(m=n.insideFill,_=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=_&&"auto"!==_||(_=this.getInsideTextStroke(m),b=!0)):(m=n.outsideFill,_=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=_&&"auto"!==_||(_=this.getOutsideStroke(m),b=!0)),(m=m||"#000")===g.fill&&_===g.stroke&&b===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=_,g.autoStroke=b,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Dr:Mr},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&be(e);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,Se(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},S(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(B(t))for(var n=A(t),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,t[i])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==Er)){var o=r.targetName,a=o?e[o]:e;r.saveTo(a)}}},t.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Or)},t.prototype._savePrimaryToNormal=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];null==t[i]||i in e||(e[i]=this[i])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Er,!1,t)},t.prototype.useState=function(t,e,n,r){var i=t===Er;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(T(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||i){i||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(t,e,n,l),c&&c.useState(t,e,n,l),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}b("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var r=[],i=this.currentStates,o=t.length,a=o===i.length;if(a)for(var s=0;s<o;s++)if(t[s]!==i[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=t[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,t)),u||(u=this.states[l]),u&&r.push(u)}var c=r[o-1],h=!!(c&&c.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,v=this._textGuide;f&&f.useStates(t,e,h),v&&v.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},t.prototype.removeState=function(t){var e=T(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var r=this.currentStates.slice(),i=T(r,t),o=T(r,e)>=0;i>=0?o?r.splice(i,1):r[i]=e:n&&!o&&r.push(e),this.useStates(r)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},r=0;r<t.length;r++){var i=t[r];S(n,i),i.textConfig&&S(e=e||{},i.textConfig)}return e&&(n.textConfig=e),n},t.prototype._applyStateObj=function(t,e,n,r,i,o){var a=!(e&&r);e&&e.textConfig?(this.textConfig=S({},r?this.textConfig:n.textConfig),S(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Or.length;u++){var c=Or[u],h=i&&Ar[c];e&&null!=e[c]?h?(l=!0,s[c]=e[c]):this[c]=e[c]:a&&null!=n[c]&&(h?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var d=this.animators[u],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(e||n)[p]:e||n)}l&&this._transitionState(t,s,o)},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new $e,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),S(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,e,n){var r=t?this[t]:this;var i=new Gn(r,e,n);return t&&(i.targetName=t),this.addAnimator(i,t),i},t.prototype.addAnimator=function(t,e){var n=this.__zr,r=this;t.during(function(){r.updateDuringAnimation(e)}).done(function(){var e=r.animators,n=T(e,t);n>=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];t&&t!==a.scope?i.push(a):a.stop(e)}return this.animators=i,this},t.prototype.animateTo=function(t,e,n){zr(this,t,e,n)},t.prototype.animateFrom=function(t,e,n){zr(this,t,e,n,!0)},t.prototype._transitionState=function(t,e,n,r){for(var i=zr(this,e,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=1;function n(t,n,r,i){function o(t,e){Object.defineProperty(e,0,{get:function(){return t[r]},set:function(e){t[r]=e}}),Object.defineProperty(e,1,{get:function(){return t[i]},set:function(e){t[i]=e}})}Object.defineProperty(e,t,{get:function(){this[n]||o(this,this[n]=[]);return this[n]},set:function(t){this[r]=t[0],this[i]=t[1],this[n]=t,o(this,t)}})}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),t}();function zr(t,e,n,r,i){var o=[];Hr(t,"",t,e,n=n||{},r,o,i);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},h=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var d=0;d<o.length;d++){var p=o[d];c&&p.done(c),h&&p.aborted(h),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function Fr(t,e,n){for(var r=0;r<n;r++)t[r]=e[r]}function Br(t,e,n){if(I(e[n]))if(I(t[n])||(t[n]=[]),j(e[n])){var r=e[n].length;t[n].length!==r&&(t[n]=new e[n].constructor(r),Fr(t[n],e[n],r))}else{var i=e[n],o=t[n],a=i.length;if(I(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?Fr(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else Fr(o,i,a);o.length=i.length}else t[n]=e[n]}function Hr(t,e,n,r,i,o,a,s){for(var l=A(r),u=i.duration,c=i.delay,h=i.additive,d=i.setToFinal,p=!B(o),f=t.animators,v=[],g=0;g<l.length;g++){var y=l[g],m=r[y];if(null!=m&&null!=n[y]&&(p||o[y]))if(!B(m)||I(m)||W(m))v.push(y);else{if(e){s||(n[y]=m,t.updateDuringAnimation(e));continue}Hr(t,y,n[y],m,i,o&&o[y],a,s)}else s||(n[y]=m,t.updateDuringAnimation(e),v.push(y))}var _=v.length;if(!h&&_)for(var b=0;b<f.length;b++){if((w=f[b]).targetName===e)if(w.stopTracks(v)){var x=T(f,w);f.splice(x,1)}}if(i.force||(v=O(v,function(t){return e=r[t],i=n[t],!(e===i||I(e)&&I(i)&&function(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}(e,i));var e,i}),_=v.length),_>0||i.force&&!a.length){var w,S=void 0,C=void 0,k=void 0;if(s){C={},d&&(S={});for(b=0;b<_;b++){C[y=v[b]]=n[y],d?S[y]=r[y]:n[y]=r[y]}}else if(d){k={};for(b=0;b<_;b++){k[y=v[b]]=Fn(n[y]),Br(n,r,y)}}(w=new Gn(n,!1,!1,h?O(f,function(t){return t.targetName===e}):null)).targetName=e,i.scope&&(w.scope=i.scope),d&&S&&w.whenWithKeys(0,S,v),k&&w.whenWithKeys(0,k,v),w.whenWithKeys(u??500,s?C:r,v).delay(c||0),t.addAnimator(w,e),a.push(w)}}k(Nr,fr),k(Nr,$e);const jr=Nr;var Vr="__zr_style_"+Math.round(10*Math.random()),Wr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ur={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Wr[Vr]=!0;var Gr=["z","z2","invisible"],Yr=["invisible"],Zr=function(t){function n(e){return t.call(this,e)||this}var r;return e(n,t),n.prototype._init=function(e){for(var n=A(e),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(e[i]):t.prototype.attrKV.call(this,i,e[i])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(t,e,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(t,e,n){qr.copy(t.getBoundingRect()),t.transform&&qr.applyTransform(t.transform);return Xr.width=e,Xr.height=n,!qr.intersect(Xr)}(this,t,e)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},n.prototype.contain=function(t,e){return this.rectContain(t,e)},n.prototype.traverse=function(t,e){t.call(e,this)},n.prototype.rectContain=function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},n.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var e=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new dr(0,0,0,0)),e?dr.applyTransform(t,n,e):t.copy(n),(i||o||a)&&(t.width+=2*i+Math.abs(o),t.height+=2*i+Math.abs(a),t.x=Math.min(t.x,t.x+o-i),t.y=Math.min(t.y,t.y+a-i));var s=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-s),t.y=Math.floor(t.y-s),t.width=Math.ceil(t.width+1+2*s),t.height=Math.ceil(t.height+1+2*s))}return t},n.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new dr(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(t){return this.animate("style",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(e,n){"style"!==e?t.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:S(this.style,t),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(t){return it(Wr,t)},n.prototype.useStyle=function(t){t[Vr]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},n.prototype.isStyleObject=function(t){return t[Vr]},n.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,Gr)},n.prototype._applyStateObj=function(e,n,r,i,o,a){t.prototype._applyStateObj.call(this,e,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=A(u),h=0;h<c.length;h++){(p=c[h])in s&&(s[p]=s[p],this.style[p]=u[p])}var d=A(s);for(h=0;h<d.length;h++){var p=d[h];this.style[p]=this.style[p]}this._transitionState(e,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Yr:Gr;for(h=0;h<f.length;h++){p=f[h];n&&null!=n[p]?this[p]=n[p]:l&&null!=r[p]&&(this[p]=r[p])}},n.prototype._mergeStates=function(e){for(var n,r=t.prototype._mergeStates.call(this,e),i=0;i<e.length;i++){var o=e[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},n.prototype._mergeStyle=function(t,e){return S(t,e),t},n.prototype.getAnimationStyleProps=function(){return Ur},n.initDefaultProps=((r=n.prototype).type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,void(r.__dirty=3)),n}(jr),qr=new dr(0,0,0,0),Xr=new dr(0,0,0,0);const Kr=Zr;var Qr=Math.min,Jr=Math.max,$r=Math.sin,ti=Math.cos,ei=2*Math.PI,ni=Ee(),ri=Ee(),ii=Ee();function oi(t,e,n,r,i,o){i[0]=Qr(t,n),i[1]=Qr(e,r),o[0]=Jr(t,n),o[1]=Jr(e,r)}var ai=[],si=[];function li(t,e,n,r,i,o,a,s,l,u){var c=yn,h=fn,d=c(t,n,i,a,ai);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<d;p++){var f=h(t,n,i,a,ai[p]);l[0]=Qr(f,l[0]),u[0]=Jr(f,u[0])}d=c(e,r,o,s,si);for(p=0;p<d;p++){var v=h(e,r,o,s,si[p]);l[1]=Qr(v,l[1]),u[1]=Jr(v,u[1])}l[0]=Qr(t,l[0]),u[0]=Jr(t,u[0]),l[0]=Qr(a,l[0]),u[0]=Jr(a,u[0]),l[1]=Qr(e,l[1]),u[1]=Jr(e,u[1]),l[1]=Qr(s,l[1]),u[1]=Jr(s,u[1])}function ui(t,e,n,r,i,o,a,s){var l=Sn,u=xn,c=Jr(Qr(l(t,n,i),1),0),h=Jr(Qr(l(e,r,o),1),0),d=u(t,n,i,c),p=u(e,r,o,h);a[0]=Qr(t,i,d),a[1]=Qr(e,o,p),s[0]=Jr(t,i,d),s[1]=Jr(e,o,p)}function ci(t,e,n,r,i,o,a,s,l){var u=Ve,c=We,h=Math.abs(i-o);if(h%ei<1e-4&&h>1e-4)return s[0]=t-n,s[1]=e-r,l[0]=t+n,void(l[1]=e+r);if(ni[0]=ti(i)*n+t,ni[1]=$r(i)*r+e,ri[0]=ti(o)*n+t,ri[1]=$r(o)*r+e,u(s,ni,ri),c(l,ni,ri),(i%=ei)<0&&(i+=ei),(o%=ei)<0&&(o+=ei),i>o&&!a?o+=ei:i<o&&a&&(i+=ei),a){var d=o;o=i,i=d}for(var p=0;p<o;p+=Math.PI/2)p>i&&(ii[0]=ti(p)*n+t,ii[1]=$r(p)*r+e,u(s,ii,s),c(l,ii,l))}var hi={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},di=[],pi=[],fi=[],vi=[],gi=[],yi=[],mi=Math.min,_i=Math.max,bi=Math.cos,xi=Math.sin,wi=Math.abs,Si=Math.PI,Ci=2*Si,Ti="undefined"!=typeof Float32Array,ki=[];function Ii(t){return Math.round(t/Si*1e8)/1e8%2*Si}var Mi=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,n){(n=n||0)>0&&(this._ux=wi(n/Ir/t)||0,this._uy=wi(n/Ir/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(hi.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=wi(t-this._xi),r=wi(e-this._yi),i=n>this._ux||r>this._uy;if(this.addData(hi.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._drawPendingPt(),this.addData(hi.C,t,e,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,r,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,r){return this._drawPendingPt(),this.addData(hi.Q,t,e,n,r),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(t,e,n,r,i,o){this._drawPendingPt(),ki[0]=r,ki[1]=i,function(t,e){var n=Ii(t[0]);n<0&&(n+=Ci);var r=n-t[0],i=t[1];i+=r,!e&&i-n>=Ci?i=n+Ci:e&&n-i>=Ci?i=n-Ci:!e&&n>i?i=n+(Ci-Ii(n-i)):e&&n<i&&(i=n-(Ci-Ii(i-n))),t[0]=n,t[1]=i}(ki,o),r=ki[0];var a=(i=ki[1])-r;return this.addData(hi.A,t,e,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,r,i,o),this._xi=bi(i)*n+t,this._yi=xi(i)*n+e,this},t.prototype.arcTo=function(t,e,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,r,i),this},t.prototype.rect=function(t,e,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,r),this.addData(hi.R,t,e,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(hi.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){if(this._saveData){var e=t.length;this.data&&this.data.length===e||!Ti||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e}},t.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,n=0,r=this._len,i=0;i<e;i++)n+=t[i].len();var o=this.data;if(Ti&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(r+n),r>0&&o))for(var a=0;a<r;a++)this.data[a]=o[a];for(i=0;i<e;i++){var s=t[i].data;for(a=0;a<s.length;a++)this.data[r++]=s[a]}this._len=r}},t.prototype.addData=function(t,e,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Ti&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){fi[0]=fi[1]=gi[0]=gi[1]=Number.MAX_VALUE,vi[0]=vi[1]=yi[0]=yi[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,r=0,i=0,o=0;for(t=0;t<this._len;){var a=e[t++],s=1===t;switch(s&&(i=n=e[t],o=r=e[t+1]),a){case hi.M:n=i=e[t++],r=o=e[t++],gi[0]=i,gi[1]=o,yi[0]=i,yi[1]=o;break;case hi.L:oi(n,r,e[t],e[t+1],gi,yi),n=e[t++],r=e[t++];break;case hi.C:li(n,r,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],gi,yi),n=e[t++],r=e[t++];break;case hi.Q:ui(n,r,e[t++],e[t++],e[t],e[t+1],gi,yi),n=e[t++],r=e[t++];break;case hi.A:var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],p=e[t++]+d;t+=1;var f=!e[t++];s&&(i=bi(d)*c+l,o=xi(d)*h+u),ci(l,u,c,h,d,p,f,gi,yi),n=bi(p)*c+l,r=xi(p)*h+u;break;case hi.R:oi(i=n=e[t++],o=r=e[t++],i+e[t++],o+e[t++],gi,yi);break;case hi.Z:n=i,r=o}Ve(fi,fi,gi),We(vi,vi,yi)}return 0===t&&(fi[0]=fi[1]=vi[0]=vi[1]=0),new dr(fi[0],fi[1],vi[0]-fi[0],vi[1]-fi[1])},t.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,h=0;h<e;){var d=t[h++],p=1===h;p&&(a=i=t[h],s=o=t[h+1]);var f=-1;switch(d){case hi.M:i=a=t[h++],o=s=t[h++];break;case hi.L:var v=t[h++],g=(_=t[h++])-o;(wi(D=v-i)>n||wi(g)>r||h===e-1)&&(f=Math.sqrt(D*D+g*g),i=v,o=_);break;case hi.C:var y=t[h++],m=t[h++],_=(v=t[h++],t[h++]),b=t[h++],x=t[h++];f=bn(i,o,y,m,v,_,b,x,10),i=b,o=x;break;case hi.Q:f=kn(i,o,y=t[h++],m=t[h++],v=t[h++],_=t[h++],10),i=v,o=_;break;case hi.A:var w=t[h++],S=t[h++],C=t[h++],T=t[h++],k=t[h++],I=t[h++],M=I+k;h+=1,p&&(a=bi(k)*C+w,s=xi(k)*T+S),f=_i(C,T)*mi(Ci,Math.abs(I)),i=bi(M)*C+w,o=xi(M)*T+S;break;case hi.R:a=i=t[h++],s=o=t[h++],f=2*t[h++]+2*t[h++];break;case hi.Z:var D=a-i;g=s-o;f=Math.sqrt(D*D+g*g),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,r,i,o,a,s,l,u,c,h,d=this.data,p=this._ux,f=this._uy,v=this._len,g=e<1,y=0,m=0,_=0;if(!g||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var b=0;b<v;){var x=d[b++],w=1===b;switch(w&&(n=i=d[b],r=o=d[b+1]),x!==hi.L&&_>0&&(t.lineTo(c,h),_=0),x){case hi.M:n=i=d[b++],r=o=d[b++],t.moveTo(i,o);break;case hi.L:a=d[b++],s=d[b++];var S=wi(a-i),C=wi(s-o);if(S>p||C>f){if(g){if(y+(q=l[m++])>u){var T=(u-y)/q;t.lineTo(i*(1-T)+a*T,o*(1-T)+s*T);break t}y+=q}t.lineTo(a,s),i=a,o=s,_=0}else{var k=S*S+C*C;k>_&&(c=a,h=s,_=k)}break;case hi.C:var I=d[b++],M=d[b++],D=d[b++],E=d[b++],O=d[b++],A=d[b++];if(g){if(y+(q=l[m++])>u){mn(i,I,D,O,T=(u-y)/q,di),mn(o,M,E,A,T,pi),t.bezierCurveTo(di[1],pi[1],di[2],pi[2],di[3],pi[3]);break t}y+=q}t.bezierCurveTo(I,M,D,E,O,A),i=O,o=A;break;case hi.Q:I=d[b++],M=d[b++],D=d[b++],E=d[b++];if(g){if(y+(q=l[m++])>u){Cn(i,I,D,T=(u-y)/q,di),Cn(o,M,E,T,pi),t.quadraticCurveTo(di[1],pi[1],di[2],pi[2]);break t}y+=q}t.quadraticCurveTo(I,M,D,E),i=D,o=E;break;case hi.A:var P=d[b++],L=d[b++],R=d[b++],N=d[b++],z=d[b++],F=d[b++],B=d[b++],H=!d[b++],j=R>N?R:N,V=wi(R-N)>.001,W=z+F,U=!1;if(g)y+(q=l[m++])>u&&(W=z+F*(u-y)/q,U=!0),y+=q;if(V&&t.ellipse?t.ellipse(P,L,R,N,B,z,W,H):t.arc(P,L,j,z,W,H),U)break t;w&&(n=bi(z)*R+P,r=xi(z)*N+L),i=bi(W)*R+P,o=xi(W)*N+L;break;case hi.R:n=i=d[b],r=o=d[b+1],a=d[b++],s=d[b++];var G=d[b++],Y=d[b++];if(g){if(y+(q=l[m++])>u){var Z=u-y;t.moveTo(a,s),t.lineTo(a+mi(Z,G),s),(Z-=G)>0&&t.lineTo(a+G,s+mi(Z,Y)),(Z-=Y)>0&&t.lineTo(a+_i(G-Z,0),s+Y),(Z-=G)>0&&t.lineTo(a,s+_i(Y-Z,0));break t}y+=q}t.rect(a,s,G,Y);break;case hi.Z:if(g){var q;if(y+(q=l[m++])>u){T=(u-y)/q;t.lineTo(i*(1-T)+n*T,o*(1-T)+r*T);break t}y+=q}t.closePath(),i=n,o=r}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=hi,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();const Di=Mi;function Ei(t,e,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>e+s&&a>r+s||a<e-s&&a<r-s||o>t+s&&o>n+s||o<t-s&&o<n-s)return!1;if(t===n)return Math.abs(o-t)<=s/2;var u=(l=(e-r)/(t-n))*o-a+(t*r-n*e)/(t-n);return u*u/(l*l+1)<=s/2*s/2}function Oi(t,e,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var h=l;return!(c>e+h&&c>r+h&&c>o+h&&c>s+h||c<e-h&&c<r-h&&c<o-h&&c<s-h||u>t+h&&u>n+h&&u>i+h&&u>a+h||u<t-h&&u<n-h&&u<i-h&&u<a-h)&&_n(t,e,n,r,i,o,a,s,u,c,null)<=h/2}function Ai(t,e,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;return!(l>e+u&&l>r+u&&l>o+u||l<e-u&&l<r-u&&l<o-u||s>t+u&&s>n+u&&s>i+u||s<t-u&&s<n-u&&s<i-u)&&Tn(t,e,n,r,i,o,s,l,null)<=u/2}var Pi=2*Math.PI;function Li(t){return(t%=Pi)<0&&(t+=Pi),t}var Ri=2*Math.PI;function Ni(t,e,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%Ri<1e-4)return!0;if(o){var h=r;r=Li(i),i=Li(h)}else r=Li(r),i=Li(i);r>i&&(i+=Ri);var d=Math.atan2(l,s);return d<0&&(d+=Ri),d>=r&&d<=i||d+Ri>=r&&d+Ri<=i}function zi(t,e,n,r,i,o){if(o>e&&o>r||o<e&&o<r)return 0;if(r===e)return 0;var a=(o-e)/(r-e),s=r<e?1:-1;1!==a&&0!==a||(s=r<e?.5:-.5);var l=a*(n-t)+t;return l===i?1/0:l>i?s:0}var Fi=Di.CMD,Bi=2*Math.PI;var Hi=[-1,-1,-1],ji=[-1,-1];function Vi(){var t=ji[0];ji[0]=ji[1],ji[1]=t}function Wi(t,e,n,r,i,o,a,s,l,u){if(u>e&&u>r&&u>o&&u>s||u<e&&u<r&&u<o&&u<s)return 0;var c=gn(e,r,o,s,u,Hi);if(0===c)return 0;for(var h=0,d=-1,p=void 0,f=void 0,v=0;v<c;v++){var g=Hi[v],y=0===g||1===g?.5:1;fn(t,n,i,a,g)<l||(d<0&&(d=yn(e,r,o,s,ji),ji[1]<ji[0]&&d>1&&Vi(),p=fn(e,r,o,s,ji[0]),d>1&&(f=fn(e,r,o,s,ji[1]))),2===d?g<ji[0]?h+=p<e?y:-y:g<ji[1]?h+=f<p?y:-y:h+=s<f?y:-y:g<ji[0]?h+=p<e?y:-y:h+=s<p?y:-y)}return h}function Ui(t,e,n,r,i,o,a,s){if(s>e&&s>r&&s>o||s<e&&s<r&&s<o)return 0;var l=function(t,e,n,r,i){var o=t-2*e+n,a=2*(e-t),s=t-r,l=0;if(dn(o))pn(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(dn(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,h=rn(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(i[l++]=c),d>=0&&d<=1&&(i[l++]=d)}}return l}(e,r,o,s,Hi);if(0===l)return 0;var u=Sn(e,r,o);if(u>=0&&u<=1){for(var c=0,h=xn(e,r,o,u),d=0;d<l;d++){var p=0===Hi[d]||1===Hi[d]?.5:1;xn(t,n,i,Hi[d])<a||(Hi[d]<u?c+=h<e?p:-p:c+=o<h?p:-p)}return c}p=0===Hi[0]||1===Hi[0]?.5:1;return xn(t,n,i,Hi[0])<a?0:o<e?p:-p}function Gi(t,e,n,r,i,o,a,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Hi[0]=-l,Hi[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=Bi-1e-4){r=0,i=Bi;var c=o?1:-1;return a>=Hi[0]+t&&a<=Hi[1]+t?c:0}if(r>i){var h=r;r=i,i=h}r<0&&(r+=Bi,i+=Bi);for(var d=0,p=0;p<2;p++){var f=Hi[p];if(f+t>a){var v=Math.atan2(s,f);c=o?1:-1;v<0&&(v=Bi+v),(v>=r&&v<=i||v+Bi>=r&&v+Bi<=i)&&(v>Math.PI/2&&v<1.5*Math.PI&&(c=-c),d+=c)}}return d}function Yi(t,e,n,r,i){for(var o,a,s,l,u=t.data,c=t.len(),h=0,d=0,p=0,f=0,v=0,g=0;g<c;){var y=u[g++],m=1===g;switch(y===Fi.M&&g>1&&(n||(h+=zi(d,p,f,v,r,i))),m&&(f=d=u[g],v=p=u[g+1]),y){case Fi.M:d=f=u[g++],p=v=u[g++];break;case Fi.L:if(n){if(Ei(d,p,u[g],u[g+1],e,r,i))return!0}else h+=zi(d,p,u[g],u[g+1],r,i)||0;d=u[g++],p=u[g++];break;case Fi.C:if(n){if(Oi(d,p,u[g++],u[g++],u[g++],u[g++],u[g],u[g+1],e,r,i))return!0}else h+=Wi(d,p,u[g++],u[g++],u[g++],u[g++],u[g],u[g+1],r,i)||0;d=u[g++],p=u[g++];break;case Fi.Q:if(n){if(Ai(d,p,u[g++],u[g++],u[g],u[g+1],e,r,i))return!0}else h+=Ui(d,p,u[g++],u[g++],u[g],u[g+1],r,i)||0;d=u[g++],p=u[g++];break;case Fi.A:var _=u[g++],b=u[g++],x=u[g++],w=u[g++],S=u[g++],C=u[g++];g+=1;var T=!!(1-u[g++]);o=Math.cos(S)*x+_,a=Math.sin(S)*w+b,m?(f=o,v=a):h+=zi(d,p,o,a,r,i);var k=(r-_)*w/x+_;if(n){if(Ni(_,b,w,S,S+C,T,e,k,i))return!0}else h+=Gi(_,b,w,S,S+C,T,k,i);d=Math.cos(S+C)*x+_,p=Math.sin(S+C)*w+b;break;case Fi.R:if(f=d=u[g++],v=p=u[g++],o=f+u[g++],a=v+u[g++],n){if(Ei(f,v,o,v,e,r,i)||Ei(o,v,o,a,e,r,i)||Ei(o,a,f,a,e,r,i)||Ei(f,a,f,v,e,r,i))return!0}else h+=zi(o,v,o,a,r,i),h+=zi(f,a,f,v,r,i);break;case Fi.Z:if(n){if(Ei(d,p,f,v,e,r,i))return!0}else h+=zi(d,p,f,v,r,i);d=f,p=v}}return n||(s=p,l=v,Math.abs(s-l)<1e-4)||(h+=zi(d,p,f,v,r,i)||0),0!==h}var Zi=C({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Wr),qi={style:C({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ur.style)},Xi=Je.concat(["invisible","culling","z","z2","zlevel","parent"]),Ki=function(t){function n(e){return t.call(this,e)||this}var r;return e(n,t),n.prototype.update=function(){var e=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new n;i.buildPath===n.prototype.buildPath&&(i.buildPath=function(t){e.buildPath(t,e.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<Xi.length;++s)i[Xi[s]]=this[Xi[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(e){var n=A(e);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=e[o];"style"===o?this.style?S(this.style,a):this.useStyle(a):"shape"===o?S(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(z(t)){var e=Ce(t,0);return e>.5?Mr:e>.2?"#eee":Dr}if(t)return Dr}return Mr},n.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(z(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Ce(t,0)<.4)return e}},n.prototype.buildPath=function(t,e,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new Di(!1)},n.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),t=i.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,l??4)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),i=this.style;if(t=n[0],e=n[1],r.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,r){return Yi(t,e,!0,n,r)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Yi(t,0,!1,e,n)}(o,t,e)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},n.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:S(n,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return it(Zi,t)},n.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=S({},this.shape))},n.prototype._applyStateObj=function(e,n,r,i,o,a){t.prototype._applyStateObj.call(this,e,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=S({},r.shape),S(s,n.shape)):(s=S({},i?this.shape:r.shape),S(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=S({},this.shape);for(var u={},c=A(s),h=0;h<c.length;h++){var d=c[h];"object"==typeof s[d]?this.shape[d]=s[d]:u[d]=s[d]}this._transitionState(e,{shape:u},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(e){for(var n,r=t.prototype._mergeStates.call(this,e),i=0;i<e.length;i++){var o=e[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},n.prototype.getAnimationStyleProps=function(){return qi},n.prototype.isZeroArea=function(){return!1},n.extend=function(t){var r=function(n){function r(e){var r=n.call(this,e)||this;return t.init&&t.init.call(r,e),r}return e(r,n),r.prototype.getDefaultStyle=function(){return x(t.style)},r.prototype.getDefaultShape=function(){return x(t.shape)},r}(n);for(var i in t)"function"==typeof t[i]&&(r.prototype[i]=t[i]);return r},n.initDefaultProps=((r=n.prototype).type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,void(r.__dirty=7)),n}(Kr);const Qi=Ki;var Ji=1,$i={},to=Bt(),eo=Bt(),no=["emphasis","blur","select"],ro=["normal","emphasis","blur","select"],io="highlight",oo="downplay",ao="select",so="unselect",lo="toggleSelect";function uo(t){return null!=t&&"none"!==t}var co=new se(100);function ho(t){if(z(t)){var e=co.get(t);return e||(e=we(t,-.1),co.put(t,e)),e}if(W(t)){var n=S({},t);return n.colorStops=D(t.colorStops,function(t){return{offset:t.offset,color:we(t.color,-.1)}}),n}return t}function po(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function fo(t){po(t,"emphasis",2)}function vo(t){2===t.hoverState&&po(t,"normal",0)}function go(t){po(t,"blur",1)}function yo(t){1===t.hoverState&&po(t,"normal",0)}function mo(t){t.selected=!0}function _o(t){t.selected=!1}function bo(t,e,n){e(t,n)}function xo(t,e,n){bo(t,e,n),t.isGroup&&t.traverse(function(t){bo(t,e,n)})}function wo(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,r){var i=n&&T(n,"select")>=0,o=!1;if(t instanceof Qi){var a=to(t),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(uo(s)||uo(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=S({},r),(u=S({},u)).fill=s):!uo(u.fill)&&uo(s)?(o=!0,r=S({},r),(u=S({},u)).fill=ho(s)):!uo(u.stroke)&&uo(l)&&(o||(r=S({},r),u=S({},u)),u.stroke=ho(l)),r.style=u}}if(r&&null==r.z2){o||(r=S({},r));var c=t.z2EmphasisLift;r.z2=t.z2+(null!=c?c:10)}return r}(this,0,e,n);if("blur"===t)return function(t,e,n){var r=T(t.currentStates,e)>=0,i=t.style.opacity,o=r?null:function(t,e,n,r){for(var i=t.style,o={},a=0;a<e.length;a++){var s=e[a],l=i[s];o[s]=l??(r&&r[s])}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,e)}return o}(t,["opacity"],e,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=S({},n),a=S({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,t,n);if("select"===t)return function(t,e,n){if(n&&null==n.z2){n=S({},n);var r=t.z2SelectLift;n.z2=t.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function So(t){t.stateProxy=wo;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=wo),n&&(n.stateProxy=wo)}function Co(t,e){!Oo(t,e)&&!t.__highByOuter&&xo(t,fo)}function To(t,e){!Oo(t,e)&&!t.__highByOuter&&xo(t,vo)}function ko(t,e){t.__highByOuter|=1<<(e||0),xo(t,fo)}function Io(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&xo(t,vo)}function Mo(t){xo(t,yo)}function Do(t){xo(t,mo)}function Eo(t){xo(t,_o)}function Oo(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ao(t){var e=t.getModel(),n=[],r=[];e.eachComponent(function(e,i){var o=eo(i),a="series"===e,s=a?t.getViewOfSeriesModel(i):t.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse(function(t){yo(t)}),a&&n.push(i)),o.isBlured=!1}),M(r,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(n,!1,e)})}function Po(t,e,n,r){var i=r.getModel();function o(t,e){for(var n=0;n<e.length;n++){var r=t.getItemGraphicEl(e[n]);r&&Mo(r)}}if(n=n||"coordinateSystem",null!=t&&e&&"none"!==e){var a=i.getSeriesByIndex(t),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(t){var i=a===t,u=t.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===e&&i)){if(r.getViewOfSeriesModel(t).group.traverse(function(t){t.__highByOuter&&i&&"self"===e||go(t)}),I(e))o(t.getData(),e);else if(B(e))for(var c=A(e),h=0;h<c.length;h++)o(t.getData(c[h]),e[c[h]]);l.push(t),eo(t).isBlured=!0}}),i.eachComponent(function(t,e){if("series"!==t){var n=r.getViewOfComponentModel(e);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}})}}function Lo(t,e,n){if(null!=t&&null!=e){var r=n.getModel().getComponent(t,e);if(r){eo(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(t){go(t)})}}}function Ro(t,e,n,r){var i={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return i;var o=r.getModel().getComponent(t,e);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===le(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function No(t){M(t.getAllData(),function(e){var n=e.data,r=e.type;n.eachItemGraphicEl(function(e,n){t.isSelected(n,r)?Do(e):Eo(e)})})}function zo(t){var e=[];return t.eachSeries(function(t){M(t.getAllData(),function(n){n.data;var r=n.type,i=t.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:t.seriesIndex};null!=r&&(o.dataType=r),e.push(o)}})}),e}function Fo(t,e,n){Bo(t,!0),xo(t,So),function(t,e,n){var r=le(t);null!=e?(r.focus=e,r.blurScope=n):r.focus&&(r.focus=null)}(t,e,n)}function Bo(t,e){var n=!1===e,r=t;t.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=t.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function Ho(t){return!(!t||!t.__highDownDispatcher)}function jo(t){var e=t.type;return e===ao||e===so||e===lo}function Vo(t){var e=t.type;return e===io||e===oo}Bt();function Wo(t,e,n,r,i,o,a){var s,l=!1;N(i)?(a=o,o=i,i=null):B(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===t;u||e.stopAnimation("leave");var c=function(t,e,n,r,i){var o;if(e&&e.ecModel){var a=e.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===t;if(e&&e.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=G(r.duration,200),u=G(r.easing,"cubicOut"),c=0):(l=e.getShallow(s?"animationDurationUpdate":"animationDuration"),u=e.getShallow(s?"animationEasingUpdate":"animationEasing"),c=e.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),N(c)&&(c=c(n,i)),N(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(t,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var h={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Uo(t,e,n,r,i,o){Wo("update",t,e,n,r,i,o)}function Go(t,e,n,r,i,o){Wo("enter",t,e,n,r,i,o)}function Yo(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){if("leave"===t.animators[e].scope)return!0}return!1}var Zo={};function qo(t,e){for(var n=0;n<no.length;n++){var r=no[n],i=e[r],o=t.ensureState(r);o.style=o.style||{},o.style.text=i}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(a,!0)}function Xo(t,e,n){var r,i=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=N(t.defaultText)?t.defaultText(o,t,n):t.defaultText);for(var l={normal:r},u=0;u<no.length;u++){var c=no[u],h=e[c];l[c]=G(i?i.getFormattedLabel(o,c,null,a,h&&h.get("formatter")):null,r)}return l}function Ko(t,e,n,r,i){var o={};return function(t,e,n,r,i){n=n||Zo;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||Zo).rich;if(n){e=e||{};for(var r=A(n),i=0;i<r.length;i++){e[r[i]]=1}}t=t.parentModel}return e}(e);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=e.getModel(["rich",u]);ta(o[u]={},c,s,n,r,i,!1,!0)}o&&(t.rich=o);var h=e.get("overflow");h&&(t.overflow=h);var d=e.get("minMargin");null!=d&&(t.margin=d);ta(t,e,s,n,r,i,!0,!1)}(o,t,n,r,i),e&&S(o,e),o}var Qo=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Jo=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],$o=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function ta(t,e,n,r,i,o,a,s){n=!i&&n||Zo;var l=r&&r.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),h=G(e.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(t.fill=u),null!=c&&(t.stroke=c);var d=G(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=d&&(t.lineWidth=d);var p=G(e.getShallow("textBorderType"),n.textBorderType);null!=p&&(t.lineDash=p);var f=G(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(t.lineDashOffset=f),i||null!=h||s||(h=r&&r.defaultOpacity),null!=h&&(t.opacity=h),i||o||null==t.fill&&r.inheritColor&&(t.fill=r.inheritColor);for(var v=0;v<Qo.length;v++){var g=Qo[v];null!=(m=G(e.getShallow(g),n[g]))&&(t[g]=m)}for(v=0;v<Jo.length;v++){g=Jo[v];null!=(m=e.getShallow(g))&&(t[g]=m)}if(null==t.verticalAlign){var y=e.getShallow("baseline");null!=y&&(t.verticalAlign=y)}if(!a||!r.disableBox){for(v=0;v<$o.length;v++){var m;g=$o[v];null!=(m=e.getShallow(g))&&(t[g]=m)}var _=e.getShallow("borderType");null!=_&&(t.borderDash=_),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}var ea=Bt();function na(t,e,n,r,i){var o=ea(t);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=G(o.interpolatedValue,o.prevValue),l=o.value;t.percent=0,(null==o.prevValue?Go:Uo)(t,{percent:1},r,e,null,function(r){var u=function(t,e,n,r,i){var o=null==e||"auto"===e;if(null==r)return r;if(F(r))return pt(f=Ct(n||0,r,i),o?Math.max(ft(n||0),ft(r)):e);if(z(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var h=t.getDimensionInfo(c);if(h&&"ordinal"===h.type)a[c]=(i<1&&s?s:l)[c];else{var d=s&&s[c]?s[c]:0,p=l[c],f=Ct(d,p,i);a[c]=pt(f,o?Math.max(ft(d),ft(p)):e)}}return a}(n,o.precision,s,l,r);o.interpolatedValue=1===r?null:u;var c=Xo({labelDataIndex:e,labelFetcher:i,defaultText:a?a(u):u+""},o.statesModels,u);qo(t,c)})}}var ra=new se(50);function ia(t){if("string"==typeof t){var e=ra.get(t);return e&&e.image}return t}function oa(t,e,n,r,i){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=ra.get(t),s={hostEl:n,cb:r,cbPayload:i};return o?!sa(e=o.image)&&o.pending.push(s):((e=a.loadImage(t,aa,aa)).__zrImageSrc=t,ra.put(t,e.__cachedImgObj={image:e,pending:[s]})),e}return t}return e}function aa(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function sa(t){return t&&t.width&&t.height}var la=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function ua(t,e,n,r,i,o){if(!n)return t.text="",void(t.isTruncated=!1);var a=(e+"").split("\n");o=ca(n,r,i,o);for(var s=!1,l={},u=0,c=a.length;u<c;u++)ha(l,a[u],o),a[u]=l.textLine,s=s||l.isTruncated;t.text=a.join("\n"),t.isTruncated=s}function ca(t,e,n,r){var i=S({},r=r||{});n=G(n,"..."),i.maxIterations=G(r.maxIterations,2);var o=i.minChar=G(r.minChar,0),a=i.fontMeasureInfo=gr(e),s=a.asciiCharWidth;i.placeholder=G(r.placeholder,"");for(var l=t=Math.max(0,t-1),u=0;u<o&&l>=s;u++)l-=s;var c=br(a,n);return c>l&&(n="",c=0),l=t-c,i.ellipsis=n,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function ha(t,e,n){var r=n.containerWidth,i=n.contentWidth,o=n.fontMeasureInfo;if(!r)return t.textLine="",void(t.isTruncated=!1);var a=br(o,e);if(a<=r)return t.textLine=e,void(t.isTruncated=!1);for(var s=0;;s++){if(a<=i||s>=n.maxIterations){e+=n.ellipsis;break}var l=0===s?da(e,i,o):a>0?Math.floor(e.length*i/a):0;a=br(o,e=e.substr(0,l))}""===e&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}function da(t,e,n){for(var r=0,i=0,o=t.length;i<o&&r<e;i++)r+=_r(n,t.charCodeAt(i));return i}var pa=function(){},fa=function(t){this.tokens=[],t&&(this.tokens=t)},va=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function ga(t,e,n,r,i){var o,a,s=""===e,l=i&&n.rich[i]||{},u=t.lines,c=l.font||n.font,h=!1;if(r){var d=l.padding,p=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Cr(l.width,r.width)+p;u.length>0&&f+r.accumWidth>r.width&&(o=e.split("\n"),h=!0),r.accumWidth=f}else{var v=_a(e,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=v.accumWidth+p,a=v.linesWidths,o=v.lines}}o||(o=e.split("\n"));for(var g=gr(c),y=0;y<o.length;y++){var m=o[y],_=new pa;if(_.styleName=i,_.text=m,_.isLineHolder=!m&&!s,"number"==typeof l.width?_.width=l.width:_.width=a?a[y]:br(g,m),y||h)u.push(new fa([_]));else{var b=(u[u.length-1]||(u[0]=new fa)).tokens,x=b.length;1===x&&b[0].isLineHolder?b[0]=_:(m||!x||s)&&b.push(_)}}}var ya=E(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function ma(t){return!function(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!ya[t]}function _a(t,e,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,h=gr(e),d=0;d<t.length;d++){var p=t.charAt(d);if("\n"!==p){var f=_r(h,p.charCodeAt(0)),v=!r&&!ma(p);(o.length?c+f>n:i+c+f>n)?c?(s||l)&&(v?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=f):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=f)):v?(o.push(l),a.push(u),l=p,u=f):(o.push(p),a.push(f)):(c+=f,v?(l+=p,u+=f):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}function ba(t,e,n,r,i,o){if(t.baseX=n,t.baseY=r,t.outerWidth=t.outerHeight=null,e){var a=2*e.width,s=2*e.height;dr.set(xa,xr(n,a,i),wr(r,s,o),a,s),dr.intersect(e,xa,null,wa);var l=wa.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=xr(l.x,l.width,i,!0),t.baseY=wr(l.y,l.height,o,!0)}}var xa=new dr(0,0,0,0),wa={outIntersectRect:{},clamp:!0};function Sa(t){return null!=t?t+="":t=""}function Ca(t,e,n,r){var i=new dr(xr(t.x||0,e,t.textAlign),wr(t.y||0,n,t.textBaseline),e,n),o=null!=r?r:Ta(t)?t.lineWidth:0;return o>0&&(i.x-=o/2,i.y-=o/2,i.width+=o,i.height+=o),i}function Ta(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}var ka=C({strokeFirst:!0,font:n,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Zi),Ia=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.hasStroke=function(){return Ta(this.style)},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.createStyle=function(t){return it(ka,t)},n.prototype.setBoundingRect=function(t){this._rect=t},n.prototype.getBoundingRect=function(){var t,e,n;return this._rect||(this._rect=(t=this.style,e=Sa(t.text),n=t.font,Ca(t,br(gr(n),e),Sr(n),null))),this._rect},n.initDefaultProps=void(n.prototype.dirtyRectTolerance=10),n}(Kr);Ia.prototype.type="tspan";const Ma=Ia;var Da=C({x:0,y:0},Wr),Ea={style:C({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ur.style)};var Oa=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.createStyle=function(t){return it(Da,t)},n.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var r,i=(r=e.image)&&"string"!=typeof r&&r.width&&r.height?e.image:this.__image;if(!i)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?i[t]:i[t]/i[o]*a},n.prototype.getWidth=function(){return this._getSize("width")},n.prototype.getHeight=function(){return this._getSize("height")},n.prototype.getAnimationStyleProps=function(){return Ea},n.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new dr(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},n}(Kr);Oa.prototype.type="image";const Aa=Oa;var Pa=Math.round;function La(t,e,n){if(!e)return t;var r=Pa(2*t);return(r+Pa(e))%2==0?r/2:(r+(n?1:-1))/2}var Ra=function(){this.x=0,this.y=0,this.width=0,this.height=0},Na={},za=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new Ra},n.prototype.buildPath=function(t,e){var n,r,i,o;if(this.subPixelOptimize){var a=function(t,e,n){if(e){var r=e.x,i=e.y,o=e.width,a=e.height;t.x=r,t.y=i,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=La(r,s,!0),t.y=La(i,s,!0),t.width=Math.max(La(r+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(La(i+a,s,!1)-t.y,0===a?0:1),t):t}}(Na,e,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,r=e.y,i=e.width,o=e.height;e.r?function(t,e){var n,r,i,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=r=i=o=h:h instanceof Array?1===h.length?n=r=i=o=h[0]:2===h.length?(n=i=h[0],r=o=h[1]):3===h.length?(n=h[0],r=o=h[1],i=h[2]):(n=h[0],r=h[1],i=h[2],o=h[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-r,l),0!==r&&t.arc(s+u-r,l+r,r,-Math.PI/2,0),t.lineTo(s+u,l+c-i),0!==i&&t.arc(s+u-i,l+c-i,i,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,r,i,o)},n.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},n}(Qi);za.prototype.type="rect";const Fa=za;var Ba={fill:"#000"},Ha={},ja={style:C({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},Ur.style)},Va=function(t){function r(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ba,n.attr(e),n}return e(r,t),r.prototype.childrenRef=function(){return this._children},r.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},r.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):t.prototype.updateTransform.call(this)},r.prototype.getLocalTransform=function(e){var n=this.innerTransformable;return n?n.getLocalTransform(e):t.prototype.getLocalTransform.call(this,e)},r.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},r.prototype._updateSubTexts=function(){var t;this._childCursor=0,qa(t=this.style),M(t.rich,qa),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},r.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},r.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},r.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new dr(0,0,0,0),e=this._children,n=[],r=null,i=0;i<e.length;i++){var o=e[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(t.copy(a),t.applyTransform(s),(r=r||t.clone()).union(t)):(r=r||a.clone()).union(a)}this._rect=r||t}return this._rect},r.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Ba},r.prototype.setTextContent=function(t){0},r.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,r=t.rich||n&&{};return S(t,e),n&&r?(this._mergeRich(r,n),t.rich=r):r&&(t.rich=r),t},r.prototype._mergeRich=function(t,e){for(var n=A(e),r=0;r<n.length;r++){var i=n[r];t[i]=t[i]||{},S(t[i],e[i])}},r.prototype.getAnimationStyleProps=function(){return ja},r.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),this._children[this._childCursor++]=e,e.__zr=this.__zr,e.parent=this,e},r.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||n,r=t.padding,i=this._defaultStyle,o=t.x||0,a=t.y||0,s=t.align||i.align||"left",l=t.verticalAlign||i.verticalAlign||"top";ba(Ha,i.overflowRect,o,a,s,l),o=Ha.baseX,a=Ha.baseY;var u=function(t,e,n,r){var i=Sa(t),o=e.overflow,a=e.padding,s=a?a[1]+a[3]:0,l=a?a[0]+a[2]:0,u=e.font,c="truncate"===o,h=Sr(u),d=G(e.lineHeight,h),p="truncate"===e.lineOverflow,f=!1,v=e.width;null==v&&null!=n&&(v=n-s);var g,y=e.height;null==y&&null!=r&&(y=r-l);var m=(g=null==v||"break"!==o&&"breakAll"!==o?i?i.split("\n"):[]:i?_a(i,e.font,v,"breakAll"===o,0).lines:[]).length*d;if(null==y&&(y=m),m>y&&p){var _=Math.floor(y/d);f=f||g.length>_,m=(g=g.slice(0,_)).length*d}if(i&&c&&null!=v)for(var b=ca(v,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),x={},w=0;w<g.length;w++)ha(x,g[w],b),g[w]=x.textLine,f=f||x.isTruncated;var S=y,C=0,T=gr(u);for(w=0;w<g.length;w++)C=Math.max(br(T,g[w]),C);null==v&&(v=C);var k=v;return{lines:g,height:y,outerWidth:k+=s,outerHeight:S+=l,lineHeight:d,calculatedLineHeight:h,contentWidth:C,contentHeight:m,width:v,isTruncated:f}}(Ja(t),t,Ha.outerWidth,Ha.outerHeight),c=$a(t),h=!!t.backgroundColor,d=u.outerHeight,p=u.outerWidth,f=u.lines,v=u.lineHeight;this.isTruncated=!!u.isTruncated;var g=o,y=wr(a,u.contentHeight,l);if(c||r){var m=xr(o,p,s),_=wr(a,d,l);c&&this._renderBackground(t,t,m,_,p,d)}y+=v/2,r&&(g=Qa(o,s,r),"top"===l?y+=r[0]:"bottom"===l&&(y-=r[2]));for(var b=0,x=!1,w=!1,S=(Ka("fill"in t?t.fill:(w=!0,i.fill))),C=(Xa("stroke"in t?t.stroke:h||i.autoStroke&&!w?null:(b=2,x=!0,i.stroke))),T=t.textShadowBlur>0,k=0;k<f.length;k++){var I=this._getOrCreateChild(Ma),M=I.createStyle();I.useStyle(M),M.text=f[k],M.x=g,M.y=y,s&&(M.textAlign=s),M.textBaseline="middle",M.opacity=t.opacity,M.strokeFirst=!0,T&&(M.shadowBlur=t.textShadowBlur||0,M.shadowColor=t.textShadowColor||"transparent",M.shadowOffsetX=t.textShadowOffsetX||0,M.shadowOffsetY=t.textShadowOffsetY||0),M.stroke=C,M.fill=S,C&&(M.lineWidth=t.lineWidth||b,M.lineDash=t.lineDash,M.lineDashOffset=t.lineDashOffset||0),M.font=e,Za(M,t),y+=v,I.setBoundingRect(Ca(M,u.contentWidth,u.calculatedLineHeight,x?0:null))}},r.prototype._updateRichTexts=function(){var t=this.style,e=this._defaultStyle,n=t.align||e.align,r=t.verticalAlign||e.verticalAlign,i=t.x||0,o=t.y||0;ba(Ha,e.overflowRect,i,o,n,r),i=Ha.baseX,o=Ha.baseY;var a=function(t,e,n,r,i){var o=new va,a=Sa(t);if(!a)return o;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;null==c&&null!=n&&(c=n-l);var h=e.height;null==h&&null!=r&&(h=r-u);for(var d,p=e.overflow,f="break"!==p&&"breakAll"!==p||null==c?null:{width:c,accumWidth:0,breakAll:"breakAll"===p},v=la.lastIndex=0;null!=(d=la.exec(a));){var g=d.index;g>v&&ga(o,a.substring(v,g),e,f),ga(o,d[2],e,f,d[1]),v=la.lastIndex}v<a.length&&ga(o,a.substring(v,a.length),e,f);var y=[],m=0,_=0,b="truncate"===p,x="truncate"===e.lineOverflow,w={};function S(t,e,n){t.width=e,t.lineHeight=n,m+=n,_=Math.max(_,e)}t:for(var C=0;C<o.lines.length;C++){for(var T=o.lines[C],k=0,I=0,M=0;M<T.tokens.length;M++){var D=(H=T.tokens[M]).styleName&&e.rich[H.styleName]||{},E=H.textPadding=D.padding,O=E?E[1]+E[3]:0,A=H.font=D.font||e.font;H.contentHeight=Sr(A);var P=G(D.height,H.contentHeight);if(H.innerHeight=P,E&&(P+=E[0]+E[2]),H.height=P,H.lineHeight=Y(D.lineHeight,e.lineHeight,P),H.align=D&&D.align||i,H.verticalAlign=D&&D.verticalAlign||"middle",x&&null!=h&&m+H.lineHeight>h){var L=o.lines.length;M>0?(T.tokens=T.tokens.slice(0,M),S(T,I,k),o.lines=o.lines.slice(0,C+1)):o.lines=o.lines.slice(0,C),o.isTruncated=o.isTruncated||o.lines.length<L;break t}var R=D.width,N=null==R||"auto"===R;if("string"==typeof R&&"%"===R.charAt(R.length-1))H.percentWidth=R,y.push(H),H.contentWidth=br(gr(A),H.text);else{if(N){var z=D.backgroundColor,F=z&&z.image;F&&sa(F=ia(F))&&(H.width=Math.max(H.width,F.width*P/F.height))}var B=b&&null!=c?c-I:null;null!=B&&B<H.width?!N||B<O?(H.text="",H.width=H.contentWidth=0):(ua(w,H.text,B-O,A,e.ellipsis,{minChar:e.truncateMinChar}),H.text=w.text,o.isTruncated=o.isTruncated||w.isTruncated,H.width=H.contentWidth=br(gr(A),H.text)):H.contentWidth=br(gr(A),H.text)}H.width+=O,I+=H.width,D&&(k=Math.max(k,H.lineHeight))}S(T,I,k)}for(o.outerWidth=o.width=G(c,_),o.outerHeight=o.height=G(h,m),o.contentHeight=m,o.contentWidth=_,o.outerWidth+=l,o.outerHeight+=u,C=0;C<y.length;C++){var H,j=(H=y[C]).percentWidth;H.width=parseInt(j,10)/100*o.width}return o}(Ja(t),t,Ha.outerWidth,Ha.outerHeight,n),s=a.width,l=a.outerWidth,u=a.outerHeight,c=t.padding;this.isTruncated=!!a.isTruncated;var h=xr(i,l,n),d=wr(o,u,r),p=h,f=d;c&&(p+=c[3],f+=c[0]);var v=p+s;$a(t)&&this._renderBackground(t,t,h,d,l,u);for(var g=!!t.backgroundColor,y=0;y<a.lines.length;y++){for(var m=a.lines[y],_=m.tokens,b=_.length,x=m.lineHeight,w=m.width,S=0,C=p,T=v,k=b-1,I=void 0;S<b&&(!(I=_[S]).align||"left"===I.align);)this._placeToken(I,t,x,f,C,"left",g),w-=I.width,C+=I.width,S++;for(;k>=0&&"right"===(I=_[k]).align;)this._placeToken(I,t,x,f,T,"right",g),w-=I.width,T-=I.width,k--;for(C+=(s-(C-p)-(v-T)-w)/2;S<=k;)I=_[S],this._placeToken(I,t,x,f,C+I.width/2,"center",g),C+=I.width,S++;f+=x}},r.prototype._placeToken=function(t,e,r,i,o,a,s){var l=e.rich[t.styleName]||{};l.text=t.text;var u=t.verticalAlign,c=i+r/2;"top"===u?c=i+t.height/2:"bottom"===u&&(c=i+r-t.height/2),!t.isLineHolder&&$a(l)&&this._renderBackground(l,e,"right"===a?o-t.width:"center"===a?o-t.width/2:o,c-t.height/2,t.width,t.height);var h=!!l.backgroundColor,d=t.textPadding;d&&(o=Qa(o,a,d),c-=t.height/2-d[0]-t.innerHeight/2);var p=this._getOrCreateChild(Ma),f=p.createStyle();p.useStyle(f);var v=this._defaultStyle,g=!1,y=0,m=!1,_=Ka("fill"in l?l.fill:"fill"in e?e.fill:(g=!0,v.fill)),b=Xa("stroke"in l?l.stroke:"stroke"in e?e.stroke:h||s||v.autoStroke&&!g?null:(y=2,m=!0,v.stroke)),x=l.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=o,f.y=c,x&&(f.shadowBlur=l.textShadowBlur||e.textShadowBlur||0,f.shadowColor=l.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=l.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=l.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=a,f.textBaseline="middle",f.font=t.font||n,f.opacity=Y(l.opacity,e.opacity,1),Za(f,l),b&&(f.lineWidth=Y(l.lineWidth,e.lineWidth,y),f.lineDash=G(l.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=b),_&&(f.fill=_),p.setBoundingRect(Ca(f,t.contentWidth,t.contentHeight,m?0:null))},r.prototype._renderBackground=function(t,e,n,r,i,o){var a,s,l,u=t.backgroundColor,c=t.borderWidth,h=t.borderColor,d=u&&u.image,p=u&&!d,f=t.borderRadius,v=this;if(p||t.lineHeight||c&&h){(a=this._getOrCreateChild(Fa)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=i,g.height=o,g.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=G(t.fillOpacity,1);else if(d){(s=this._getOrCreateChild(Aa)).onload=function(){v.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=r,y.width=i,y.height=o}c&&h&&((l=a.style).lineWidth=c,l.stroke=h,l.strokeOpacity=G(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=Y(t.opacity,e.opacity,1)},r.makeFont=function(t){var e="";return function(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}(t)&&(e=[t.fontStyle,t.fontWeight,Ya(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&K(e)||t.textFont||t.font},r}(Kr),Wa={left:!0,right:1,center:1},Ua={top:1,bottom:1,middle:1},Ga=["fontStyle","fontWeight","fontSize","fontFamily"];function Ya(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function Za(t,e){for(var n=0;n<Ga.length;n++){var r=Ga[n],i=e[r];null!=i&&(t[r]=i)}}function qa(t){if(t){t.font=Va.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||Wa[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||Ua[n]?n:"top",t.padding&&(t.padding=q(t.padding))}}function Xa(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ka(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Qa(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ja(t){var e=t.text;return null!=e&&(e+=""),e}function $a(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}const ts=Va;var es=["textStyle","color"],ns=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],rs=new ts;const is=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(es):null)},t.prototype.getFont=function(){return t={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},e=this.ecModel,n=e&&e.getModel("textStyle"),K([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var t,e,n},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<ns.length;n++)e[ns[n]]=this.getShallow(ns[n]);return rs.useStyle(e),rs.update(),rs.getBoundingRect()},t}();var os,as,ss=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],ls=ee(ss),us=function(){function t(){}return t.prototype.getLineStyle=function(t){return ls(this,t)},t}(),cs=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],hs=ee(cs),ds=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return hs(this,t,e)},t}(),ps=function(){function t(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return t.prototype.init=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},t.prototype.mergeOption=function(t,e){w(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var n=this.option,r=null==n?n:n[t];if(null==r&&!e){var i=this.parentModel;i&&(r=i.getShallow(t))}return r},t.prototype.getModel=function(e,n){var r=null!=e,i=r?this.parsePath(e):null;return new t(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(x(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!ht.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var r=0;r<t.length&&(!t[r]||null!=(n=n&&"object"==typeof n?n[t[r]]:null));r++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},t}();Xt(ps),os=ps,as=["__\0is_clz",Qt++].join("_"),os.prototype[as]=!0,os.isInstance=function(t){return!(!t||!t[as])},k(ps,us),k(ps,ds),k(ps,re),k(ps,is);const fs=ps;var vs=Math.round(10*Math.random());function gs(t){return[t||"",vs++].join("_")}var ys=Math.log(2);function ms(t,e,n,r,i,o){var a=r+"-"+i,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~i)/ys);return t[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var h=0,d=0,p=0;d<s;d++){var f=1<<d;f&i||(h+=(p%2?-1:1)*t[n][d]*ms(t,e-1,c,u,i|f,o),p++)}return o[a]=h,h}function _s(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],r={},i=ms(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*ms(n,7,0===a?1:0,1<<a,1<<s,r)/i*e[a];return function(t,e,n){var r=e*o[6]+n*o[7]+1;t[0]=(e*o[0]+n*o[1]+o[2])/r,t[1]=(e*o[3]+n*o[4]+o[5])/r}}}var bs="___zrEVENTSAVED";function xs(t,e,n,r,i){if(e.getBoundingClientRect&&ht.domSupported&&!ws(e)){var o=e[bs]||(e[bs]={}),a=function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return e.clearMarkers=function(){M(n,function(t){t.parentNode&&t.parentNode.removeChild(t)})},n}(e,o),s=function(t,e,n){for(var r=n?"invTrans":"trans",i=e[r],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,d=c.left,p=c.top;a.push(d,p),l=l&&o&&d===o[h]&&p===o[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=a,e[r]=n?_s(s,a):_s(a,s))}(a,o,i);if(s)return s(t,n,r),!0}return!1}function ws(t){return"CANVAS"===t.nodeName.toUpperCase()}var Ss=/([&<>"'])/g,Cs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ts(t){return null==t?"":(t+"").replace(Ss,function(t,e){return Cs[e]})}function ks(t){if(isNaN(bt(t)))return z(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}var Is=["a","b","c","d","e","f","g"],Ms=function(t,e){return"{"+t+(e??"")+"}"};var Ds=M,Es=["left","right","top","bottom","width","height"],Os=[["width","left","right"],["height","top","bottom"]];function As(t,e,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;e.eachChild(function(l,u){var c,h,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var v=d.width+(f?-f.x+d.x:0);(c=o+v)>r||l.newline?(o=0,c=v,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var g=d.height+(f?-f.y+d.y:0);(h=a+g)>i||l.newline?(o+=s+n,a=0,h=g,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)})}L(As,"vertical"),L(As,"horizontal");function Ps(t){var e=t.layoutMode||t.constructor.layoutMode;return B(e)?e:e?{type:e}:null}function Ls(t,e,n){var r=n&&n.ignoreSize;!R(r)&&(r=[r,r]);var i=a(Os[0],0),o=a(Os[1],1);function a(n,i){var o={},a=0,u={},c=0;if(Ds(n,function(e){u[e]=t[e]}),Ds(n,function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&c++}),r[i])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var h=0;h<n.length;h++){var d=n[h];if(!s(o,d)&&s(t,d)){o[d]=t[d];break}}return o}return u}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function u(t,e,n){Ds(t,function(t){e[t]=n[t]})}u(Os[0],t,i),u(Os[1],t,o)}function Rs(t){return function(t,e){return e&&t&&Ds(Es,function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}({},t)}var Ns=Bt(),zs=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.uid=gs("ec_cpt_model"),i}return e(n,t),n.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=Ps(this),r=n?Rs(t):{};w(t,e.getTheme().get(this.mainType)),w(t,this.getDefaultOption()),n&&Ls(t,r,n)},n.prototype.mergeOption=function(t,e){w(this.option,t,!0);var n=Ps(this);n&&Ls(this.option,t,n)},n.prototype.optionUpdated=function(t,e){},n.prototype.getDefaultOption=function(){var t=this.constructor;if(!function(t){return!(!t||!t[Zt])}(t))return t.defaultOption;var e=Ns(this);if(!e.defaultOption){for(var n=[],r=t;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=w(o,n[a],!0);e.defaultOption=o}return e.defaultOption},n.prototype.getReferringComponents=function(t,e){var n=t+"Index",r=t+"Id";return Ut(this.ecModel,t,{index:this.get(n,!0),id:this.get(r,!0)},e)},n.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=function(){var t=n.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),n}(fs);Kt(zs,fs),te(zs),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var r=qt(t);e[r.main]=n},t.determineSubType=function(n,r){var i=r.type;if(!i){var o=qt(n).main;t.hasSubTypes(n)&&e[o]&&(i=e[o](r))}return i}}(zs),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,i,o){if(t.length){var a=function(t){var r={},i=[];return M(t,function(o){var a=n(r,o),s=function(t,e){var n=[];return M(t,function(t){T(e,t)>=0&&n.push(t)}),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&i.push(o),M(s,function(t){T(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(r,t);T(e.successor,t)<0&&e.successor.push(o)})}),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(M(t,function(t){u[t]=!0});l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(i.call(o,c,h.originalDeps.slice()),delete u[c]),M(h.successor,d?f:p)}M(u,function(){throw new Error("")})}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,p(t)}}}(zs,function(t){var e=[];M(zs.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=D(e,function(t){return qt(t).main}),"dataset"!==t&&T(e,"dataset")<=0&&e.unshift("dataset");return e});const Fs=zs;var Bs=Bt(),Hs=(Bt(),function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var r=It(this.get("color",!0)),i=this.get("colorLayer",!0);return js(this,Bs,r,i,t,e,n)},t.prototype.clearColorPalette=function(){!function(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}(this,Bs)},t}());function js(t,e,n,r,i,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(t,e){for(var n=t.length,r=0;r<n;r++)if(t[r].length>e)return t[r];return t[n-1]}(r,a):n;if((c=c||n)&&c.length){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}var Vs=rt(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Ws="original",Us="arrayRows",Gs="objectRows",Ys="keyedColumns",Zs="typedArray",qs="unknown",Xs="column",Ks="row",Qs=1,Js=2,$s=3,tl=Bt();function el(t){if(!t.get("data",!0))return Ut(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Wt).models[0]}function nl(t,e){return rl(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function rl(t,e,n,r,i,o){var a,s,l;if(j(t))return $s;if(r){var u=r[o];B(u)?(s=u.name,l=u.type):z(u)&&(s=u)}if(null!=l)return"ordinal"===l?Qs:$s;if(e===Us){var c=t;if(n===Ks){for(var h=c[o],d=0;d<(h||[]).length&&d<5;d++)if(null!=(a=m(h[i+d])))return a}else for(d=0;d<c.length&&d<5;d++){var p=c[i+d];if(p&&null!=(a=m(p[o])))return a}}else if(e===Gs){var f=t;if(!s)return $s;for(d=0;d<f.length&&d<5;d++){if((g=f[d])&&null!=(a=m(g[s])))return a}}else if(e===Ys){if(!s)return $s;if(!(h=t[s])||j(h))return $s;for(d=0;d<h.length&&d<5;d++)if(null!=(a=m(h[d])))return a}else if(e===Ws){var v=t;for(d=0;d<v.length&&d<5;d++){var g,y=Et(g=v[d]);if(!R(y))return $s;if(null!=(a=m(y[o])))return a}}function m(t){var e=z(t);return null!=t&&isFinite(t)&&""!==t?e?Js:$s:e&&"-"!==t?Qs:void 0}return $s}var il,ol,al,sl,ll,ul=function(t){this.data=t.data||(t.sourceFormat===Ys?{}:[]),this.sourceFormat=t.sourceFormat||qs,this.seriesLayoutBy=t.seriesLayoutBy||Xs,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var r=e[n];null==r.type&&nl(this,n)===Qs&&(r.type="ordinal")}};function cl(t){return t instanceof ul}function hl(t,e,n){n=n||pl(t);var r=e.seriesLayoutBy,i=function(t,e,n,r,i){var o,a;if(!t)return{dimensionsDefine:fl(i),startIndex:a,dimensionsDetectedCount:o};if(e===Us){var s=t;"auto"===r||null==r?vl(function(t){null!=t&&"-"!==t&&(z(t)?null==a&&(a=1):a=0)},n,s,10):a=F(r)?r:r?1:0,i||1!==a||(i=[],vl(function(t,e){i[e]=null!=t?t+"":""},n,s,1/0)),o=i?i.length:n===Ks?s.length:s[0]?s[0].length:null}else if(e===Gs)i||(i=function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e)return A(e)}(t));else if(e===Ys)i||(i=[],M(t,function(t,e){i.push(e)}));else if(e===Ws){var l=Et(t[0]);o=R(l)&&l.length||1}return{startIndex:a,dimensionsDefine:fl(i),dimensionsDetectedCount:o}}(t,n,r,e.sourceHeader,e.dimensions);return new ul({data:t,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:x(e)})}function dl(t){return new ul({data:t,sourceFormat:j(t)?Zs:Ws})}function pl(t){var e=qs;if(j(t))e=Zs;else if(R(t)){0===t.length&&(e=Us);for(var n=0,r=t.length;n<r;n++){var i=t[n];if(null!=i){if(R(i)){e=Us;break}if(B(i)){e=Gs;break}}}}else if(B(t))for(var o in t)if(at(t,o)&&I(t[o])){e=Ys;break}return e}function fl(t){if(t){var e=rt();return D(t,function(t,n){var r={name:(t=B(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=e.get(r.name);return i?r.name+="-"+i.count++:e.set(r.name,{count:1}),r})}}function vl(t,e,n,r){if(e===Ks)for(var i=0;i<n.length&&i<r;i++)t(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)t(o[i],i)}}function gl(t){var e=t.sourceFormat;return e===Gs||e===Ys}var yl=function(){function t(t,e){var n=cl(t)?t:dl(t);this._source=n;var r=this._data=n.data;n.sourceFormat===Zs&&(this._offset=0,this._dimSize=e,this._data=r),ll(this,r,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var t;ll=function(t,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(S(t,sl[Il(a,s)]),a===Zs)t.getItem=e,t.count=r,t.fillStorage=n;else{var c=bl(a,s);t.getItem=P(c,null,i,l,u);var h=Sl(a,s);t.count=P(h,null,i,l,u)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,r=this._dimSize,i=r*t,o=0;o<r;o++)e[o]=n[i+o];return e},n=function(t,e,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=e-t,h=n[a],d=0;d<c;d++){var p=i[d*o+a];h[t+d]=p,p<l&&(l=p),p>u&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[Us+"_"+Xs]={pure:!0,appendData:i},t[Us+"_"+Ks]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Gs]={pure:!0,appendData:i},t[Ys]={pure:!0,appendData:function(t){var e=this._data;M(t,function(t,n){for(var r=e[n]||(e[n]=[]),i=0;i<(t||[]).length;i++)r.push(t[i])})}},t[Ws]={appendData:i},t[Zs]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},sl=t}(),t}(),ml=function(t,e,n,r){return t[r]},_l=((il={})[Us+"_"+Xs]=function(t,e,n,r){return t[r+e]},il[Us+"_"+Ks]=function(t,e,n,r,i){r+=e;for(var o=i||[],a=t,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},il[Gs]=ml,il[Ys]=function(t,e,n,r,i){for(var o=i||[],a=0;a<n.length;a++){0;var s=t[n[a].name];o[a]=s?s[r]:null}return o},il[Ws]=ml,il);function bl(t,e){return _l[Il(t,e)]}var xl=function(t,e,n){return t.length},wl=((ol={})[Us+"_"+Xs]=function(t,e,n){return Math.max(0,t.length-e)},ol[Us+"_"+Ks]=function(t,e,n){var r=t[0];return r?Math.max(0,r.length-e):0},ol[Gs]=xl,ol[Ys]=function(t,e,n){var r=t[n[0].name];return r?r.length:0},ol[Ws]=xl,ol);function Sl(t,e){return wl[Il(t,e)]}var Cl=function(t,e,n){return t[e]},Tl=((al={})[Us]=Cl,al[Gs]=function(t,e,n){return t[n]},al[Ys]=Cl,al[Ws]=function(t,e,n){var r=Et(t);return r instanceof Array?r[e]:r},al[Zs]=Cl,al);function kl(t){return Tl[t]}function Il(t,e){return t===Us?t+"_"+e:t}function Ml(t,e,n){if(t){var r=t.getRawDataItem(e);if(null!=r){var i=t.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=t.getDimensionIndex(n),s=i.getDimensionProperty(a);return kl(o)(r,a,s)}var l=r;return o===Ws&&(l=Et(r)),l}}}var Dl=/\{@(.+?)\}/g,El=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),r=this.getRawValue(t,e),i=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,h="series"===c,d=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:a,dataType:e,value:r,color:l,borderColor:u,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,r,i,o){e=e||"normal";var a=this.getData(n),s=this.getDataParams(t,n);(o&&(s.value=o.interpolatedValue),null!=r&&R(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"]));return N(i)?(s.status=e,s.dimensionIndex=r,i(s)):z(i)?function(t,e,n){R(e)||(e=[e]);var r=e.length;if(!r)return"";for(var i=e[0].$vars||[],o=0;o<i.length;o++){var a=Is[o];t=t.replace(Ms(a),Ms(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(Ms(Is[l],s),n?Ts(u):u)}return t}(i,s).replace(Dl,function(e,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=Ml(a,t,i);if(o&&R(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},t.prototype.getRawValue=function(t,e){return Ml(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function Ol(t){return new Al(t)}var Al=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!r&&(o||d<p)){var f=this._progress;if(R(f))for(var v=0;v<f.length;v++)this._doProgress(f[v],d,p,l,u);else this._doProgress(f,d,p,l,u)}this._dueIndex=p;var g=null!=this._settedOutputEnd?this._settedOutputEnd:p;0,this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,n,r,i){Pl.reset(e,n,r,i),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:Pl.next},this.context)},t.prototype._doReset=function(t){var e,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),R(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),Pl=function(){var t,e,n,r,i,o={reset:function(l,u,c,h){e=l,t=u,n=c,r=h,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return e<t?e++:null}function s(){var o=e%i*n+Math.ceil(e/i),a=e>=t?null:o<r?o:e;return e++,a}}();"undefined"!=typeof console&&console.warn&&console.log;function Ll(t){0}function Rl(t){throw new Error(t)}function Nl(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||F(t)||null==t||"-"===t||(t=+yt(t)),null==t||""===t?NaN:+t)}rt({number:function(t){return parseFloat(t)},time:function(t){return+yt(t)},trim:function(t){return z(t)?K(t):t}});var zl={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}};(function(){function t(t,e){if(!F(e)){0,Rl("")}this._opFn=zl[t],this._rvalFloat=bt(e)}t.prototype.evaluate=function(t){return F(t)?this._opFn(t,this._rvalFloat):this._opFn(bt(t),this._rvalFloat)}})(),function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}t.prototype.evaluate=function(t,e){var n=F(t)?t:bt(t),r=F(e)?e:bt(e),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=z(t),s=z(e);a&&(n=s?t:0),s&&(r=a?e:0)}return n<r?this._resultLT:n>r?-this._resultLT:0}}(),function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=bt(e)}t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=bt(t)===this._rvalFloat)}return this._isEQ?e:!e}}();var Fl=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Nl(t,e)},t}();function Bl(t){if(!Gl(t.sourceFormat)){0,Rl("")}return t.data}function Hl(t){var e=t.sourceFormat,n=t.data;if(!Gl(e)){0,Rl("")}if(e===Us){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(e===Gs){for(r=[],i=0,o=n.length;i<o;i++)r.push(S({},n[i]));return r}}function jl(t,e,n){if(null!=n)return F(n)||!isNaN(n)&&!at(e,n)?t[n]:at(e,n)?e[n]:void 0}function Vl(t){return x(t)}var Wl=rt();function Ul(t,e,n,r){e.length||Rl(""),B(t)||Rl("");var i=t.type,o=Wl.get(i);o||Rl("");var a=D(e,function(t){return function(t,e){var n=new Fl,r=t.data,i=n.sourceFormat=t.sourceFormat,o=t.startIndex;t.seriesLayoutBy!==Xs&&Rl("");var a=[],s={},l=t.dimensionsDefine;if(l)M(l,function(t,e){var n=t.name,r={index:e,name:n,displayName:t.displayName};a.push(r),null!=n&&(at(s,n)&&Rl(""),s[n]=r)});else for(var u=0;u<t.dimensionsDetectedCount;u++)a.push({index:u});var c=bl(i,Xs);e.__isBuiltIn&&(n.getRawDataItem=function(t){return c(r,o,a,t)},n.getRawData=P(Bl,null,t)),n.cloneRawData=P(Hl,null,t);var h=Sl(i,Xs);n.count=P(h,null,r,o,a);var d=kl(i);n.retrieveValue=function(t,e){var n=c(r,o,a,t);return p(n,e)};var p=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=a[e];return n?d(t,e,n.name):void 0}};return n.getDimensionInfo=P(jl,null,a,s),n.cloneAllDimensionInfo=P(Vl,null,a),n}(t,o)});return D(It(o.transform({upstream:a[0],upstreamList:a,config:x(t.config)})),function(t,n){var r;B(t)||Rl(""),t.data||Rl(""),Gl(pl(t.data))||Rl("");var i=e[0];if(i&&0===n&&!t.dimensions){var o=i.startIndex;o&&(t.data=i.data.slice(0,o).concat(t.data)),r={seriesLayoutBy:Xs,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:Xs,sourceHeader:0,dimensions:t.dimensions};return hl(t.data,r,null)})}function Gl(t){return t===Us||t===Gs}var Yl,Zl="undefined",ql=typeof Uint32Array===Zl?Array:Uint32Array,Xl=typeof Uint16Array===Zl?Array:Uint16Array,Kl=typeof Int32Array===Zl?Array:Int32Array,Ql=typeof Float64Array===Zl?Array:Float64Array,Jl={float:Ql,int:Kl,ordinal:Array,number:Array,time:Ql};function $l(t){return t>65535?ql:Xl}function tu(){return[1/0,-1/0]}function eu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function nu(t,e,n,r,i){var o=Jl[n||"float"];if(i){var a=t[e],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];t[e]=l}}else t[e]=new o(r)}var ru=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=rt()}return t.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=t.getSource(),i=this.defaultDimValueGetter=Yl[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];gl(r);this._dimensions=D(e,function(t){return{type:t.type,property:t.property}}),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(t);if(null!=i){if(r[i].type===e)return i}else i=r.length;return r[i]={type:e},n.set(t,i),this._chunks[i]=new Jl[e||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},t.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],r=this._dimensions[t],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[t]=[1/0,-1/0]);for(var s=i[t],l=o;l<a;l++){var u=n[l]=e.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=e,r.ordinalOffset=a,r.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var r=e.count();return e.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},t.prototype.appendValues=function(t,e){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;l<i;l++){nu(n,l,(p=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var h=c-a,d=0;d<i;d++){var p=r[d],f=Yl.arrayRows.call(this,t[h]||u,p.property,h,d);n[d][c]=f;var v=o[d];f<v[0]&&(v[0]=f),f>v[1]&&(v[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=D(o,function(t){return t.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=tu()),nu(i,u,c.type,e,n)}if(r.fillStorage)r.fillStorage(t,e,i,s);else for(var h=[],d=t;d<e;d++){h=r.getItem(d,h);for(var p=0;p<a;p++){var f=i[p],v=this._dimValueGetter(h,l[p],d,p);f[d]=v;var g=s[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.getValues=function(t,e){var n=[],r=[];if(null==e){e=t,t=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=t;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],e));return n},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},t.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var n=0,r=this.count();n<r;n++){var i=this.get(t,n);isNaN(i)||(e+=i)}return e},t.prototype.getMedian=function(t){var e=[];this.each([t],function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(e[o]<t)r=o+1;else{if(!(e[o]>t))return o;i=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var r=this._chunks[t],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=e-r[this.getRawIndex(l)],h=Math.abs(c);h<=n&&((h<o||h===o&&c>=0&&a<0)&&(o=h,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,r=this._count;if(n===Array){t=new n(r);for(var i=0;i<r;i++)t[i]=e[i]}else t=new n(e.buffer,0,r)}else{t=new(n=$l(this._rawCount))(this.count());for(i=0;i<t.length;i++)t[i]=i}return t},t.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new($l(n._rawCount))(r),o=[],a=t.length,s=0,l=t[0],u=n._chunks,c=0;c<r;c++){var h=void 0,d=n.getRawIndex(c);if(0===a)h=e(c);else if(1===a){h=e(u[l][d],c)}else{for(var p=0;p<a;p++)o[p]=u[t[p]][d];o[p]=c,h=e.apply(null,o)}h&&(i[s++]=d)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var r=A(t),i=r.length;if(!i)return this;var o=e.count(),a=new($l(e._rawCount))(o),s=0,l=r[0],u=t[l][0],c=t[l][1],h=e._chunks,d=!1;if(!e._indices){var p=0;if(1===i){for(var f=h[r[0]],v=0;v<n;v++){((_=f[v])>=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}d=!0}else if(2===i){f=h[r[0]];var g=h[r[1]],y=t[r[1]][0],m=t[r[1]][1];for(v=0;v<n;v++){var _=f[v],b=g[v];(_>=u&&_<=c||isNaN(_))&&(b>=y&&b<=m||isNaN(b))&&(a[s++]=p),p++}d=!0}}if(!d)if(1===i)for(v=0;v<o;v++){var x=e.getRawIndex(v);((_=h[r[0]][x])>=u&&_<=c||isNaN(_))&&(a[s++]=x)}else for(v=0;v<o;v++){for(var w=!0,S=(x=e.getRawIndex(v),0);S<i;S++){var C=r[S];((_=h[C][x])<t[C][0]||_>t[C][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(v))}return s<o&&(e._indices=a),e._count=s,e._extent=[],e._updateGetRawIdx(),e},t.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},t.prototype.modify=function(t,e){this._updateDims(this,t,e)},t.prototype._updateDims=function(t,e,n){for(var r=t._chunks,i=[],o=e.length,a=t.count(),s=[],l=t._rawExtent,u=0;u<e.length;u++)l[e[u]]=tu();for(var c=0;c<a;c++){for(var h=t.getRawIndex(c),d=0;d<o;d++)s[d]=r[e[d]][h];s[o]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(i[0]=p,p=i);for(u=0;u<p.length;u++){var f=e[u],v=p[u],g=l[f],y=r[f];y&&(y[h]=v),v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}}}},t.prototype.lttbDownSample=function(t,e){var n,r,i,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),c=this.getRawIndex(0),h=new($l(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));h[l++]=c;for(var d=1;d<s-1;d+=u){for(var p=Math.min(d+u,s-1),f=Math.min(d+2*u,s),v=(f+p)/2,g=0,y=p;y<f;y++){var m=a[T=this.getRawIndex(y)];isNaN(m)||(g+=m)}g/=f-p;var _=d,b=Math.min(d+u,s),x=d-1,w=a[c];n=-1,i=_;var S=-1,C=0;for(y=_;y<b;y++){var T;m=a[T=this.getRawIndex(y)];isNaN(m)?(C++,S<0&&(S=T)):(r=Math.abs((x-v)*(m-w)-(x-y)*(g-w)))>n&&(n=r,i=T)}C>0&&C<b-_&&(h[l++]=Math.min(S,i),i=Math.max(S,i)),h[l++]=i,c=i}return h[l++]=this.getRawIndex(s-1),o._count=l,o._indices=h,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,e,n,r){for(var i=this.clone([t],!0),o=i._chunks,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),c=i._rawExtent[t]=[1/0,-1/0],h=new($l(this._rawCount))(Math.ceil(u/s)),d=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,a.length=s);for(var f=0;f<s;f++){var v=this.getRawIndex(p+f);a[f]=l[v]}var g=n(a),y=this.getRawIndex(Math.min(p+r(a,g)||0,u-1));l[y]=g,g<c[0]&&(c[0]=g),g>c[1]&&(c[1]=g),h[d++]=y}return i._count=d,i._indices=h,i._updateGetRawIdx(),i},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:e(i);break;case 1:e(r[t[0]][a],i);break;case 2:e(r[t[0]][a],r[t[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[t[s]][a];l[s]=i,e.apply(null,l)}}},t.prototype.getDataExtent=function(t){var e=this._chunks[t],n=[1/0,-1/0];if(!e)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(r=this._extent[t])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=e[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[t]=r,r},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][e]);return n},t.prototype.clone=function(e,n){var r=new t,i=this._chunks,o=e&&E(e,function(t,e){return t[e]=!0,t},{});if(o)for(var a=0;a<i.length;a++)r._chunks[a]=o[a]?eu(i[a]):i[a];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=x(this._extent),t._rawExtent=x(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var r=0;r<n;r++)e[r]=this._indices[r]}else e=new t(this._indices);return e}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,r){return Nl(t[r],this._dimensions[r])}Yl={arrayRows:t,objectRows:function(t,e,n,r){return Nl(t[e],this._dimensions[r])},keyedColumns:t,original:function(t,e,n,r){var i=t&&(null==t.value?t:t.value);return Nl(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(t,e,n,r){return t[r]}}}(),t}();const iu=ru;var ou=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(su(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=j(a=o.get("data",!0))?Zs:Ws,e=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=G(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=G(c.sourceHeader,h.sourceHeader),f=G(c.dimensions,h.dimensions);t=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||f?[hl(a,{seriesLayoutBy:d,sourceHeader:p,dimensions:f},s)]:[]}else{var v=n;if(i){var g=this._applyTransform(r);t=g.sourceList,e=g.upstreamSignList}else{t=[hl(v.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==t.length&&lu("")}var o,a=[],s=[];return M(t,function(t){t.prepareSource();var e=t.getSource(i||0);null==i||e||lu(""),a.push(e),s.push(t._getVersionSign())}),r?e=function(t,e){var n=It(t),r=n.length;r||Rl("");for(var i=0,o=r;i<o;i++)e=Ul(n[i],e),i!==o-1&&(e.length=Math.max(e.length,1));return e}(r,a,n.componentIndex):null!=i&&(e=[(o=a[0],new ul({data:o.data,sourceFormat:o.sourceFormat,seriesLayoutBy:o.seriesLayoutBy,dimensionsDefine:x(o.dimensionsDefine),startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount}))]),{sourceList:e,upstreamSignList:s}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},t.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},t.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},t.prototype._innerGetDataStore=function(t,e,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];su(this._sourceHost)&&a?o=a._innerGetDataStore(t,e,n):(o=new iu).initData(new yl(e,t.length),t),i[n]=o}return o},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(su(t)){var e=el(t);return e?[e.getSourceManager()]:[]}return D(function(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?Ut(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Wt).models:[]}(t),function(t){return t.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var t,e,n,r=this._sourceHost;if(su(r))t=r.get("seriesLayoutBy",!0),e=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},t}();function au(t){t.option.transform&&J(t.option.transform)}function su(t){return"series"===t.mainType}function lu(t){throw new Error(t)}function uu(t,e){return e.type=t,e}function cu(t,e){return function(t,e){return e=e||"transparent",z(t)?t:B(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}(t.getData().getItemVisual(e,"style")[t.visualDrawType])}!function(){function t(){this.richTextStyles={},this._nextStyleNameId=xt()}t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var r="richText"===n?this._generateStyleName():null,i=function(t,e){var n=z(t)?{color:t,extraCssText:e}:t||{},r=n.color,i=n.type;e=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Ts(r)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Ts(r)+";"+(e||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:e,type:t,renderMode:n,markerId:r});return z(i)?i:(this.richTextStyles[r]=i.style,i.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};R(e)?M(e,function(t){return S(n,t)}):S(n,e);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+t+"}"}}();function hu(t){var e,n,r,i,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),d=R(h),p=cu(o,a);if(c>1||d&&!c){var f=function(t,e,n,r,i){var o=e.getData(),a=E(t,function(t,e,n){var r=o.getDimensionInfo(n);return t||r&&!1!==r.tooltip&&null!=r.displayName},!1),s=[],l=[],u=[];function c(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(uu("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return r.length?M(r,function(t){c(Ml(o,n,t),t)}):M(t,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,p);e=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var v=l.getDimensionInfo(u[0]);i=e=Ml(l,a,u[0]),n=v.type}else i=e=d?h[0]:h;var g=Nt(o),y=g&&o.name||"",m=l.getName(a),_=s?y:m;return uu("section",{header:y,noHeader:s||!g,sortParam:i,blocks:[uu("nameValue",{markerType:"item",markerColor:p,name:_,noName:!K(_),value:e,valueType:n})].concat(r||[])})}var du=Bt();function pu(t,e){return t.getName(e)||t.getId(e)}var fu=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return e(n,t),n.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Ol({count:gu,reset:yu}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(du(this).sourceManager=new ou(this)).prepareSource();var r=this.getInitialData(t,n);_u(r,this),this.dataTask.context.data=r,du(this).dataBeforeProcessed=r,vu(this),this._initSelectedMapFromData(r)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=Ps(this),r=n?Rs(t):{},i=this.subType;Fs.hasClass(i)&&(i+="Series"),w(t,e.getTheme().get(this.subType)),w(t,this.getDefaultOption()),Mt(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Ls(t,r,n)},n.prototype.mergeOption=function(t,e){t=w(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Ps(this);n&&Ls(this.option,t,n);var r=du(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(t,e);_u(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,du(this).dataBeforeProcessed=i,vu(this),this._initSelectedMapFromData(i)},n.prototype.fillDataTextStyle=function(t){if(t&&!j(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Mt(t[n],"label",e)},n.prototype.getInitialData=function(t,e){},n.prototype.appendData=function(t){this.getRawData().appendData(t.data)},n.prototype.getData=function(t){var e=xu(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return du(this).data},n.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},n.prototype.setData=function(t){var e=xu(this);if(e){var n=e.context;n.outputData=t,e!==this.dataTask&&(n.data=t)}du(this).data=t},n.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return rt(t)},n.prototype.getSourceManager=function(){return du(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return du(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},n.prototype.formatTooltip=function(t,e,n){return hu({series:this,dataIndex:t,multipleSeries:e})},n.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(ht.node&&(!t||!t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,e,n){var r=this.ecModel,i=Hs.prototype.getColorFromPalette.call(this,t,e,n);return i||(i=r.getColorFromPalette(t,e,n)),i},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},n.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(e);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<t.length;o++){var a=pu(i,t[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(t,e){for(var n=[],r=0;r<t.length;r++)n[0]=t[r],this.isSelected(t[r],e)?this.unselect(n,e):this.select(n,e)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,e=A(t),n=[],r=0;r<e.length;r++){var i=t[e[r]];i>=0&&n.push(i)}return n},n.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(e);return("all"===n||n[pu(r,t)])&&!r.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,e){var n,r,i=this.option,o=i.selectedMode,a=e.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){B(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=e[l];s[h=pu(t,u)]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(u)}}else if("single"===o||!0===o){var c=e[a-1],h=pu(t,c);i.selectedMap=((n={})[h]=!0,n),this._selectedDataIndicesMap=((r={})[h]=t.getRawIndex(c),r)}},n.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each(function(n){var r=t.getRawDataItem(n);r&&r.selected&&e.push(n)}),e.length>0&&this._innerSelect(t,e)}},n.registerClass=function(t){return Fs.registerClass(t)},n.protoInitialize=function(){var t=n.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),n}(Fs);function vu(t){var e=t.name;Nt(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),r=[];return M(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&r.push(n.displayName)}),r.join(" ")}(t)||e)}function gu(t){return t.model.getRawData().count()}function yu(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),mu}function mu(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function _u(t,e){M(function(t,e){for(var n=new t.constructor(t.length+e.length),r=0;r<t.length;r++)n[r]=t[r];var i=t.length;for(r=0;r<e.length;r++)n[r+i]=e[r];return n}(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,L(bu,e))})}function bu(t,e){var n=xu(t);return n&&n.setOutputEnd((e||this).count()),e}function xu(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(t.uid))}return r}}k(fu,El),k(fu,Hs),Kt(fu,Fs);const wu=fu;var Su=function(t){function n(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return e(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.children=function(){return this._children.slice()},n.prototype.childAt=function(t){return this._children[t]},n.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},n.prototype.childCount=function(){return this._children.length},n.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},n.prototype.addBefore=function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,r=n.indexOf(e);r>=0&&(n.splice(r,0,t),this._doAdd(t))}return this},n.prototype.replace=function(t,e){var n=T(this._children,t);return n>=0&&this.replaceAt(e,n),this},n.prototype.replaceAt=function(t,e){var n=this._children,r=n[e];if(t&&t!==this&&t.parent!==this&&t!==r){n[e]=t,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(t)}return this},n.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},n.prototype.remove=function(t){var e=this.__zr,n=this._children,r=T(n,t);return r<0||(n.splice(r,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},n.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var r=t[n];e&&r.removeSelfFromZr(e),r.parent=null}return t.length=0,this},n.prototype.eachChild=function(t,e){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];t.call(e,i,r)}return this},n.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=t.call(e,r);r.isGroup&&!i&&r.traverse(t,e)}return this},n.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(e)}},n.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(e)}},n.prototype.getBoundingRect=function(t){for(var e=new dr(0,0,0,0),n=t||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(dr.applyTransform(e,s,l),(i=i||e.clone()).union(e)):(i=i||s.clone()).union(s)}}return i||e},n}(jr);Su.prototype.type="group";const Cu=Su;var Tu=Di.CMD,ku=[[],[],[]],Iu=Math.sqrt,Mu=Math.atan2;var Du=Math.sqrt,Eu=Math.sin,Ou=Math.cos,Au=Math.PI;function Pu(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Lu(t,e){return(t[0]*e[0]+t[1]*e[1])/(Pu(t)*Pu(e))}function Ru(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Lu(t,e))}function Nu(t,e,n,r,i,o,a,s,l,u,c){var h=l*(Au/180),d=Ou(h)*(t-n)/2+Eu(h)*(e-r)/2,p=-1*Eu(h)*(t-n)/2+Ou(h)*(e-r)/2,f=d*d/(a*a)+p*p/(s*s);f>1&&(a*=Du(f),s*=Du(f));var v=(i===o?-1:1)*Du((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,g=v*a*p/s,y=v*-s*d/a,m=(t+n)/2+Ou(h)*g-Eu(h)*y,_=(e+r)/2+Eu(h)*g+Ou(h)*y,b=Ru([1,0],[(d-g)/a,(p-y)/s]),x=[(d-g)/a,(p-y)/s],w=[(-1*d-g)/a,(-1*p-y)/s],S=Ru(x,w);if(Lu(x,w)<=-1&&(S=Au),Lu(x,w)>=1&&(S=0),S<0){var C=Math.round(S/Au*1e6)/1e6;S=2*Au+C%2*Au}c.addData(u,m,_,a,s,b,S,h,o)}var zu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Fu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Bu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.applyTransform=function(t){},n}(Qi);function Hu(t){return null!=t.setData}function ju(t,e){var n=function(t){var e=new Di;if(!t)return e;var n,r=0,i=0,o=r,a=i,s=Di.CMD,l=t.match(zu);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),d=void 0,p=c.match(Fu)||[],f=p.length,v=0;v<f;v++)p[v]=parseFloat(p[v]);for(var g=0;g<f;){var y=void 0,m=void 0,_=void 0,b=void 0,x=void 0,w=void 0,S=void 0,C=r,T=i,k=void 0,I=void 0;switch(h){case"l":r+=p[g++],i+=p[g++],d=s.L,e.addData(d,r,i);break;case"L":r=p[g++],i=p[g++],d=s.L,e.addData(d,r,i);break;case"m":r+=p[g++],i+=p[g++],d=s.M,e.addData(d,r,i),o=r,a=i,h="l";break;case"M":r=p[g++],i=p[g++],d=s.M,e.addData(d,r,i),o=r,a=i,h="L";break;case"h":r+=p[g++],d=s.L,e.addData(d,r,i);break;case"H":r=p[g++],d=s.L,e.addData(d,r,i);break;case"v":i+=p[g++],d=s.L,e.addData(d,r,i);break;case"V":i=p[g++],d=s.L,e.addData(d,r,i);break;case"C":d=s.C,e.addData(d,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),r=p[g-2],i=p[g-1];break;case"c":d=s.C,e.addData(d,p[g++]+r,p[g++]+i,p[g++]+r,p[g++]+i,p[g++]+r,p[g++]+i),r+=p[g-2],i+=p[g-1];break;case"S":y=r,m=i,k=e.len(),I=e.data,n===s.C&&(y+=r-I[k-4],m+=i-I[k-3]),d=s.C,C=p[g++],T=p[g++],r=p[g++],i=p[g++],e.addData(d,y,m,C,T,r,i);break;case"s":y=r,m=i,k=e.len(),I=e.data,n===s.C&&(y+=r-I[k-4],m+=i-I[k-3]),d=s.C,C=r+p[g++],T=i+p[g++],r+=p[g++],i+=p[g++],e.addData(d,y,m,C,T,r,i);break;case"Q":C=p[g++],T=p[g++],r=p[g++],i=p[g++],d=s.Q,e.addData(d,C,T,r,i);break;case"q":C=p[g++]+r,T=p[g++]+i,r+=p[g++],i+=p[g++],d=s.Q,e.addData(d,C,T,r,i);break;case"T":y=r,m=i,k=e.len(),I=e.data,n===s.Q&&(y+=r-I[k-4],m+=i-I[k-3]),r=p[g++],i=p[g++],d=s.Q,e.addData(d,y,m,r,i);break;case"t":y=r,m=i,k=e.len(),I=e.data,n===s.Q&&(y+=r-I[k-4],m+=i-I[k-3]),r+=p[g++],i+=p[g++],d=s.Q,e.addData(d,y,m,r,i);break;case"A":_=p[g++],b=p[g++],x=p[g++],w=p[g++],S=p[g++],Nu(C=r,T=i,r=p[g++],i=p[g++],w,S,_,b,x,d=s.A,e);break;case"a":_=p[g++],b=p[g++],x=p[g++],w=p[g++],S=p[g++],Nu(C=r,T=i,r+=p[g++],i+=p[g++],w,S,_,b,x,d=s.A,e)}}"z"!==h&&"Z"!==h||(d=s.Z,e.addData(d),r=o,i=a),n=d}return e.toStatic(),e}(t),r=S({},e);return r.buildPath=function(t){var e,r=Hu(t);r&&t.canSave()?(t.appendPath(n),(e=t.getContext())&&t.rebuildPath(e,1)):(e=r?t.getContext():t)&&n.rebuildPath(e,1)},r.applyTransform=function(t){!function(t,e){if(e){var n,r,i,o,a,s,l=t.data,u=t.len(),c=Tu.M,h=Tu.C,d=Tu.L,p=Tu.R,f=Tu.A,v=Tu.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case d:r=1;break;case h:r=3;break;case v:r=2;break;case f:var g=e[4],y=e[5],m=Iu(e[0]*e[0]+e[1]*e[1]),_=Iu(e[2]*e[2]+e[3]*e[3]),b=Mu(-e[1]/_,e[0]/m);l[i]*=m,l[i++]+=g,l[i]*=_,l[i++]+=y,l[i++]*=m,l[i++]*=_,l[i++]+=b,l[i++]+=b,o=i+=2;break;case p:s[0]=l[i++],s[1]=l[i++],je(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],je(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var x=ku[a];x[0]=l[i++],x[1]=l[i++],je(x,x,e),l[o++]=x[0],l[o++]=x[1]}}t.increaseVersion()}}(n,t),this.dirtyShape()},r}var Vu=function(){this.cx=0,this.cy=0,this.r=0},Wu=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new Vu},n.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},n}(Qi);Wu.prototype.type="circle";const Uu=Wu;var Gu=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Yu=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new Gu},n.prototype.buildPath=function(t,e){var n=.5522848,r=e.cx,i=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(r-o,i),t.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),t.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),t.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),t.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),t.closePath()},n}(Qi);Yu.prototype.type="ellipse";const Zu=Yu;var qu=Math.PI,Xu=2*qu,Ku=Math.sin,Qu=Math.cos,Ju=Math.acos,$u=Math.atan2,tc=Math.abs,ec=Math.sqrt,nc=Math.max,rc=Math.min,ic=1e-4;function oc(t,e,n,r,i,o,a){var s=t-n,l=e-r,u=(a?o:-o)/ec(s*s+l*l),c=u*l,h=-u*s,d=t+c,p=e+h,f=n+c,v=r+h,g=(d+f)/2,y=(p+v)/2,m=f-d,_=v-p,b=m*m+_*_,x=i-o,w=d*v-f*p,S=(_<0?-1:1)*ec(nc(0,x*x*b-w*w)),C=(w*_-m*S)/b,T=(-w*m-_*S)/b,k=(w*_+m*S)/b,I=(-w*m+_*S)/b,M=C-g,D=T-y,E=k-g,O=I-y;return M*M+D*D>E*E+O*O&&(C=k,T=I),{cx:C,cy:T,x0:-c,y0:-h,x1:C*(i/x-1),y1:T*(i/x-1)}}function ac(t,e){var n,r=nc(e.r,0),i=nc(e.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,c=e.cy,h=!!e.clockwise,d=tc(l-s),p=d>Xu&&d%Xu;if(p>ic&&(d=p),r>ic)if(d>Xu-ic)t.moveTo(u+r*Qu(s),c+r*Ku(s)),t.arc(u,c,r,s,l,!h),i>ic&&(t.moveTo(u+i*Qu(l),c+i*Ku(l)),t.arc(u,c,i,l,s,h));else{var f=void 0,v=void 0,g=void 0,y=void 0,m=void 0,_=void 0,b=void 0,x=void 0,w=void 0,S=void 0,C=void 0,T=void 0,k=void 0,I=void 0,M=void 0,D=void 0,E=r*Qu(s),O=r*Ku(s),A=i*Qu(l),P=i*Ku(l),L=d>ic;if(L){var N=e.cornerRadius;N&&(n=function(t){var e;if(R(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N),f=n[0],v=n[1],g=n[2],y=n[3]);var z=tc(r-i)/2;if(m=rc(z,g),_=rc(z,y),b=rc(z,f),x=rc(z,v),C=w=nc(m,_),T=S=nc(b,x),(w>ic||S>ic)&&(k=r*Qu(l),I=r*Ku(l),M=i*Qu(s),D=i*Ku(s),d<qu)){var F=function(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,h=s-o,d=h*l-c*u;if(!(d*d<ic))return[t+(d=(c*(e-o)-h*(t-i))/d)*l,e+d*u]}(E,O,M,D,k,I,A,P);if(F){var B=E-F[0],H=O-F[1],j=k-F[0],V=I-F[1],W=1/Ku(Ju((B*j+H*V)/(ec(B*B+H*H)*ec(j*j+V*V)))/2),U=ec(F[0]*F[0]+F[1]*F[1]);C=rc(w,(r-U)/(W+1)),T=rc(S,(i-U)/(W-1))}}}if(L)if(C>ic){var G=rc(g,C),Y=rc(y,C),Z=oc(M,D,E,O,r,G,h),q=oc(k,I,A,P,r,Y,h);t.moveTo(u+Z.cx+Z.x0,c+Z.cy+Z.y0),C<w&&G===Y?t.arc(u+Z.cx,c+Z.cy,C,$u(Z.y0,Z.x0),$u(q.y0,q.x0),!h):(G>0&&t.arc(u+Z.cx,c+Z.cy,G,$u(Z.y0,Z.x0),$u(Z.y1,Z.x1),!h),t.arc(u,c,r,$u(Z.cy+Z.y1,Z.cx+Z.x1),$u(q.cy+q.y1,q.cx+q.x1),!h),Y>0&&t.arc(u+q.cx,c+q.cy,Y,$u(q.y1,q.x1),$u(q.y0,q.x0),!h))}else t.moveTo(u+E,c+O),t.arc(u,c,r,s,l,!h);else t.moveTo(u+E,c+O);if(i>ic&&L)if(T>ic){G=rc(f,T),Z=oc(A,P,k,I,i,-(Y=rc(v,T)),h),q=oc(E,O,M,D,i,-G,h);t.lineTo(u+Z.cx+Z.x0,c+Z.cy+Z.y0),T<S&&G===Y?t.arc(u+Z.cx,c+Z.cy,T,$u(Z.y0,Z.x0),$u(q.y0,q.x0),!h):(Y>0&&t.arc(u+Z.cx,c+Z.cy,Y,$u(Z.y0,Z.x0),$u(Z.y1,Z.x1),!h),t.arc(u,c,i,$u(Z.cy+Z.y1,Z.cx+Z.x1),$u(q.cy+q.y1,q.cx+q.x1),h),G>0&&t.arc(u+q.cx,c+q.cy,G,$u(q.y1,q.x1),$u(q.y0,q.x0),!h))}else t.lineTo(u+A,c+P),t.arc(u,c,i,l,s,h);else t.lineTo(u+A,c+P)}else t.moveTo(u,c);t.closePath()}}}var sc=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},lc=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new sc},n.prototype.buildPath=function(t,e){ac(t,e)},n.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},n}(Qi);lc.prototype.type="sector";const uc=lc;var cc=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},hc=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new cc},n.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,i=2*Math.PI;t.moveTo(n+e.r,r),t.arc(n,r,e.r,0,i,!1),t.moveTo(n+e.r0,r),t.arc(n,r,e.r0,0,i,!0)},n}(Qi);hc.prototype.type="ring";const dc=hc;function pc(t,e,n){var r=e.smooth,i=e.points;if(i&&i.length>=2){if(r){var o=function(t,e,n,r){var i,o,a,s,l=[],u=[],c=[],h=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)Ve(a,a,t[d]),We(s,s,t[d]);Ve(a,a,r[0]),We(s,s,r[1])}for(d=0,p=t.length;d<p;d++){var f=t[d];if(n)i=t[d?d-1:p-1],o=t[(d+1)%p];else{if(0===d||d===p-1){l.push(Oe(t[d]));continue}i=t[d-1],o=t[d+1]}Pe(u,o,i),Ne(u,u,e);var v=ze(f,i),g=ze(f,o),y=v+g;0!==y&&(v/=y,g/=y),Ne(c,u,-v),Ne(h,u,g);var m=Ae([],f,c),_=Ae([],f,h);r&&(We(m,m,a),Ve(m,m,s),We(_,_,a),Ve(_,_,s)),l.push(m),l.push(_)}return n&&l.push(l.shift()),l}(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);s=1;for(var h=i.length;s<h;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}var fc=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},vc=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new fc},n.prototype.buildPath=function(t,e){pc(t,e,!0)},n}(Qi);vc.prototype.type="polygon";const gc=vc;var yc=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},mc=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new yc},n.prototype.buildPath=function(t,e){pc(t,e,!1)},n}(Qi);mc.prototype.type="polyline";const _c=mc;var bc={},xc=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},wc=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new xc},n.prototype.buildPath=function(t,e){var n,r,i,o;if(this.subPixelOptimize){var a=function(t,e,n){if(e){var r=e.x1,i=e.x2,o=e.y1,a=e.y2;t.x1=r,t.x2=i,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Pa(2*r)===Pa(2*i)&&(t.x1=t.x2=La(r,s,!0)),Pa(2*o)===Pa(2*a)&&(t.y1=t.y2=La(o,s,!0)),t):t}}(bc,e,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=e.x1,r=e.y1,i=e.x2,o=e.y2;var s=e.percent;0!==s&&(t.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),t.lineTo(i,o))},n.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},n}(Qi);wc.prototype.type="line";const Sc=wc;var Cc=[],Tc=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function kc(t,e,n){var r=t.cpx2,i=t.cpy2;return null!=r||null!=i?[(n?vn:fn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?vn:fn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?wn:xn)(t.x1,t.cpx1,t.x2,e),(n?wn:xn)(t.y1,t.cpy1,t.y2,e)]}var Ic=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Tc},n.prototype.buildPath=function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,c=e.percent;0!==c&&(t.moveTo(n,r),null==l||null==u?(c<1&&(Cn(n,a,i,c,Cc),a=Cc[1],i=Cc[2],Cn(r,s,o,c,Cc),s=Cc[1],o=Cc[2]),t.quadraticCurveTo(a,s,i,o)):(c<1&&(mn(n,a,l,i,c,Cc),a=Cc[1],l=Cc[2],i=Cc[3],mn(r,s,u,o,c,Cc),s=Cc[1],u=Cc[2],o=Cc[3]),t.bezierCurveTo(a,s,l,u,i,o)))},n.prototype.pointAt=function(t){return kc(this.shape,t,!1)},n.prototype.tangentAt=function(t){var e=kc(this.shape,t,!0);return function(t,e){var n=Le(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}(e,e)},n}(Qi);Ic.prototype.type="bezier-curve";const Mc=Ic;var Dc=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Ec=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Dc},n.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,i=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*i+n,u*i+r),t.arc(n,r,i,o,a,!s)},n}(Qi);Ec.prototype.type="arc";const Oc=Ec;Math.max,Math.min;var Ac={};function Pc(t,e){Ac[t]=e}function Lc(t,e,n,r){var i=function(t,e){return new Bu(ju(t,e))}(t,e);return n&&("center"===r&&(n=Rc(n,i.getBoundingRect())),function(t,e){if(!t.applyTransform)return;var n=t.getBoundingRect(),r=n.calculateTransform(e);t.applyTransform(r)}(i,n)),i}function Rc(t,e){var n,r=e.width/e.height,i=t.height*r;return n=i<=t.width?t.height:(i=t.width)/r,{x:t.x+t.width/2-i/2,y:t.y+t.height/2-n/2,width:i,height:n}}function Nc(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}Pc("circle",Uu),Pc("ellipse",Zu),Pc("sector",uc),Pc("ring",dc),Pc("polygon",gc),Pc("polyline",_c),Pc("rect",Fa),Pc("line",Sc),Pc("bezierCurve",Mc),Pc("arc",Oc);var zc=Bt(),Fc=function(){var t=Bt();return function(e){var n=t(e),r=e.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}(),Bc=function(){function t(){this.group=new Cu,this.uid=gs("viewChart"),this.renderTask=Ol({plan:Vc,reset:Wc}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){0},t.prototype.highlight=function(t,e,n,r){var i=t.getData(r&&r.dataType);i&&jc(i,r,"emphasis")},t.prototype.downplay=function(t,e,n,r){var i=t.getData(r&&r.dataType);i&&jc(i,r,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.updateLayout=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.updateVisual=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.eachRendered=function(t){!function(t,e){if(t)if(R(t))for(var n=0;n<t.length;n++)Nc(t[n],e);else Nc(t,e)}(this.group,t)},t.markUpdateMethod=function(t,e){zc(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Hc(t,e,n){t&&Ho(t)&&("emphasis"===e?ko:Io)(t,n)}function jc(t,e,n){var r=Ft(t,e),i=e&&null!=e.highlightKey?function(t){var e=$i[t];return null==e&&Ji<=32&&(e=$i[t]=Ji++),e}(e.highlightKey):null;null!=r?M(It(r),function(e){Hc(t.getItemGraphicEl(e),n,i)}):t.eachItemGraphicEl(function(t){Hc(t,n,i)})}function Vc(t){return Fc(t.model)}function Wc(t){var e=t.model,n=t.ecModel,r=t.api,i=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=i&&zc(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,r,i),Uc[l]}Xt(Bc),te(Bc);var Uc={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Gc=Bc;function Yc(t){return null==t?0:t.length||1}function Zc(t){return t}var qc=function(){function t(t,e,n,r,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Zc,this._newKeyGetter=r||Zc,this.context=i,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_newKeyGetter");for(var o=0;o<t.length;o++){var a=r[o],s=n[a],l=Yc(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=Yc(l),h=Yc(u);if(c>1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),r[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},t.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[r],o=Yc(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);e[r]=null}},t.prototype._initIndexMap=function(t,e,n,r){for(var i=this._diffModeMultiple,o=0;o<t.length;o++){var a="_ec_"+this[r](t[o],o);if(i||(n[o]=a),e){var s=e[a],l=Yc(s);0===l?(e[a]=o,i&&n.push(a)):1===l?e[a]=[s,o]:s.push(o)}}},t}();const Xc=qc;var Kc=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function Qc(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}const Jc=function(t){this.otherDims={},null!=t&&S(this,t)};var $c=Bt(),th={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},eh=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=ih(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return G(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=gl(this.source),n=!oh(t),r="",i=[],o=0,a=0;o<t;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=e?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var h=this.getSourceDimension(o);h&&(s=e?h.name:null,l=h.type)}i.push({property:s,type:l,ordinalMeta:u}),!e||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=th[l]||"f",u&&(r+=u.uid),r+="$"}var d=this.source;return{dimensions:i,hash:[d.seriesLayoutBy,d.startIndex,r].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===e)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(e);o&&(r=o.name)}t.push(r)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function nh(t){return t instanceof eh}function rh(t){for(var e=rt(),n=0;n<(t||[]).length;n++){var r=t[n],i=B(r)?r.name:r;null!=i&&null==e.get(i)&&e.set(i,n)}return e}function ih(t){var e=$c(t);return e.dimNameMap||(e.dimNameMap=rh(t.dimensionsDefine))}function oh(t){return t>30}var ah,sh,lh,uh,ch,hh,dh,ph=B,fh=D,vh="undefined"==typeof Int32Array?Array:Int32Array,gh=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],yh=["_approximateExtent"],mh=function(){function t(t,e){var n;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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;nh(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,n=t),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],h=z(c)?new Jc({name:c}):c instanceof Jc?c:new Jc(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),i[d]=h,null!=l[d]&&(s=!0),h.createInvertedIndices&&(a[d]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.itemId&&(this._idDimIdx=u),r&&(h.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=e,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=rt();M(o,function(t){f.set(i[t].storeDimIndex,t)})}}return t.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(null==e)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(null!=n)return n;var r=this._schema.getSourceDimension(e);return r?r.name:void 0},t.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(null!=e)return e;if(null==t)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(F(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var r=n.encode[t];return r?r[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,e,n){var r,i=this;if(t instanceof iu&&(r=t),!r){var o=this.dimensions,a=cl(t)||I(t)?new yl(t,o.length):t;r=new iu;var s=fh(o,function(t){return{type:i._dimInfos[t].type,property:t}});r.initData(a,s,n)}this._store=r,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(t,e){var n={},r=n.encode={},i=rt(),o=[],a=[],s={};M(t.dimensions,function(e){var n,l=t.getDimensionInfo(e),u=l.coordDim;if(u){var c=l.coordDimIndex;Qc(r,u)[c]=e,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=e),Qc(s,u)[c]=t.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(e)}Vs.each(function(t,e){var n=Qc(r,e),i=l.otherDims[e];null!=i&&!1!==i&&(n[i]=l.name)})});var l=[],u={};i.each(function(t,e){var n=r[e];u[e]=n[0],l=l.concat(n)}),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=D(l,function(e){return t.getDimensionInfo(e).storeDimIndex}),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var h=r.tooltip;return h&&h.length?a=h.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new Kc(s,e),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},t.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=e[s],o&&dh(this,a)}},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var r=this._dimInfos[e[n]];r.ordinalMeta&&t.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==Zs&&!t.fillStorage},t.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===Ws&&!n.pure)for(var o=[],a=t;a<e;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Ot(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Rt(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=Rt(u,null))}}if(this._shouldMakeIdFromName())for(a=t;a<e;a++)dh(this,a);ah(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){ph(t)?S(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return null==n&&null!=this._nameDimIdx&&(n=lh(this,this._nameDimIdx,e)),null==n&&(n=""),n},t.prototype._getCategory=function(t,e){var n=this._store.get(t,e),r=this._store.getOrdinalMeta(t);return r?r.categories[n]:n},t.prototype.getId=function(t){return sh(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,e){var n=this._store,r=this._dimInfos[t];if(r)return n.get(r.storeDimIndex,e)},t.prototype.getByRawIndex=function(t,e){var n=this._store,r=this._dimInfos[t];if(r)return n.getByRawIndex(r.storeDimIndex,e)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,e){var n=this,r=this._store;return R(t)?r.getValues(fh(t,function(t){return n._getStoreDimIndex(t)}),e):r.getValues(t)},t.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,r=e.length;n<r;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},t.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},t.prototype.each=function(t,e,n){N(t)&&(n=e,e=t,t=[]);var r=n||this,i=fh(uh(t),this._getStoreDimIndex,this);this._store.each(i,r?P(e,r):e)},t.prototype.filterSelf=function(t,e,n){N(t)&&(n=e,e=t,t=[]);var r=n||this,i=fh(uh(t),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?P(e,r):e),this},t.prototype.selectRange=function(t){var e=this,n={},r=A(t),i=[];return M(r,function(r){var o=e._getStoreDimIndex(r);n[o]=t[r],i.push(o)}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(t,e,n){N(t)&&(n=e,e=t,t=[]),n=n||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},t.prototype.map=function(t,e,n,r){var i=n||r||this,o=fh(uh(t),this._getStoreDimIndex,this),a=hh(this);return a._store=this._store.map(o,i?P(e,i):e),a},t.prototype.modify=function(t,e,n,r){var i=n||r||this;var o=fh(uh(t),this._getStoreDimIndex,this);this._store.modify(o,i?P(e,i):e)},t.prototype.downSample=function(t,e,n,r){var i=hh(this);return i._store=this._store.downSample(this._getStoreDimIndex(t),e,n,r),i},t.prototype.lttbDownSample=function(t,e){var n=hh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new fs(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new Xc(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(e){return sh(t,e)},function(t){return sh(e,t)})},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},ph(t)?S(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],r=n&&n[e];return r??this.getVisual(e)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var i=r[e];return null==i&&(R(i=this.getVisual(e))?i=i.slice():ph(i)&&(i=S({},i)),r[e]=i),i},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,ph(e)?S(r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){ph(t)?S(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?S(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){!function(t,e,n,r){if(r){var i=le(r);i.dataIndex=n,i.dataType=e,i.seriesIndex=t,"group"===r.type&&r.traverse(function(r){var i=le(r);i.seriesIndex=t,i.dataIndex=n,i.dataType=e})}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(n,r){n&&t&&t.call(e,n,r)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:fh(this.dimensions,this._getDimInfo,this),this.hostModel)),ch(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];N(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(Z(arguments)))})},t.internalField=(ah=function(t){var e=t._invertedIndicesMap;M(e,function(n,r){var i=t._dimInfos[r],o=i.ordinalMeta,a=t._store;if(o){n=e[r]=new vh(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}})},lh=function(t,e,n){return Rt(t._getCategory(e,n),null)},sh=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=lh(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n},uh=function(t){return R(t)||(t=null!=t?[t]:[]),t},hh=function(e){var n=new t(e._schema?e._schema:fh(e.dimensions,e._getDimInfo,e),e.hostModel);return ch(n,e),n},ch=function(t,e){M(gh.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,M(yh,function(n){t[n]=x(e[n])}),t._calculationInfo=S({},e._calculationInfo)},void(dh=function(t,e){var n=t._nameList,r=t._idList,i=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=r[e];if(null==a&&null!=i&&(n[e]=a=lh(t,i,e)),null==s&&null!=o&&(r[e]=s=lh(t,o,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[e]=s}})),t}();const _h=mh;function bh(t,e){cl(t)||(t=dl(t));var n=(e=e||{}).coordDimensions||[],r=e.dimensionsDefine||t.dimensionsDefine||[],i=rt(),o=[],a=function(t,e,n,r){var i=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,r||0);return M(e,function(t){var e;B(t)&&(e=t.dimsDef)&&(i=Math.max(i,e.length))}),i}(t,n,r,e.dimensionsCount),s=e.canOmitUnusedDimensions&&oh(a),l=r===t.dimensionsDefine,u=l?ih(t):rh(r),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,a));for(var h=rt(c),d=new Kl(a),p=0;p<d.length;p++)d[p]=-1;function f(t){var e=d[t];if(e<0){var n=r[t],i=B(n)?n:{name:n},a=new Jc,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return d[t]=l,a.storeDimIndex=t,o.push(a),a}return o[e]}if(!s)for(p=0;p<a;p++)f(p);h.each(function(t,e){var n=It(t).slice();if(1===n.length&&!z(n[0])&&n[0]<0)h.set(e,!1);else{var r=h.set(e,[]);M(n,function(t,n){var i=z(t)?u.get(t):t;null!=i&&i<a&&(r[n]=i,g(f(i),e,n))})}});var v=0;function g(t,e,n){null!=Vs.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,i.set(e,!0))}M(n,function(t){var e,n,r,i;if(z(t))e=t,i={};else{e=(i=t).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=S({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=h.get(e);if(!1!==s){if(!(s=It(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;v<a&&null!=f(v).coordDim;)v++;v<a&&s.push(v++)}M(s,function(t,o){var a=f(t);if(l&&null!=i.type&&(a.type=i.type),g(C(a,i),e,o),null==a.name&&n){var s=n[o];!B(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&C(a.otherDims,r)})}});var y=e.generateCoord,m=e.generateCoordCount,_=null!=m;m=y?m||1:0;var b=y||"value";function x(t){null==t.name&&(t.name=t.coordDim)}if(s)M(o,function(t){x(t)}),o.sort(function(t,e){return t.storeDimIndex-e.storeDimIndex});else for(var w=0;w<a;w++){var T=f(w);null==T.coordDim&&(T.coordDim=xh(b,i,_),T.coordDimIndex=0,(!y||m<=0)&&(T.isExtraCoord=!0),m--),x(T),null!=T.type||nl(t,w)!==Qs&&(!T.isExtraCoord||null==T.otherDims.itemName&&null==T.otherDims.seriesName)||(T.type="ordinal")}return function(t){for(var e=rt(),n=0;n<t.length;n++){var r=t[n],i=r.name,o=e.get(i)||0;o>0&&(r.name=i+(o-1)),o++,e.set(i,o)}}(o),new eh({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function xh(t,e,n){if(n||e.hasKey(t)){for(var r=0;e.hasKey(t+r);)r++;t+=r}return e.set(t,!0),t}var wh={};const Sh=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];M(wh,function(r,i){var o=r.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},t.prototype.update=function(t,e){M(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){wh[t]=e},t.get=function(t){return wh[t]},t}();var Ch=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();te(Ch);const Th=Ch;var kh=0;function Ih(t){return B(t)&&null!=t.value?t.value:t+""}const Mh=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++kh}return t.createByAxisModel=function(e){var n=e.option,r=n.data,i=r&&D(r,Ih);return new t({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!z(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=rt(this.categories))},t}();function Dh(t,e,n,r){var i={},o=t[1]-t[0],a=i.interval=_t(o/e,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=Eh(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Oh(t,0,e),Oh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(i.niceTickExtent=[pt(Math.ceil(t[0]/a)*a,s),pt(Math.floor(t[1]/a)*a,s)],t),i}function Eh(t){return ft(t)+2}function Oh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Ah(t,e){return t>=e[0]&&t<=e[1]}function Ph(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Lh(t,e){return t*(e[1]-e[0])+e[0]}var Rh=function(t){function n(e){var n=t.call(this,e)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new Mh({})),R(r)&&(r=new Mh({categories:D(r,function(t){return B(t)?t.value:t})})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return e(n,t),n.prototype.parse=function(t){return null==t?NaN:z(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},n.prototype.contain=function(t){return Ah(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},n.prototype.normalize=function(t){return Ph(t=this._getTickNumber(this.parse(t)),this._extent)},n.prototype.scale=function(t){return t=Math.round(Lh(t,this._extent)),this.getRawOrdinalNumber(t)},n.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},n.prototype.getMinorTicks=function(t){},n.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);i<a;++i){var s=e[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},n.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&t>=0&&t<e.length?e[t]:t},n.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&t>=0&&t<e.length?e[t]:t},n.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[e];return null==n?"":n+""}},n.prototype.count=function(){return this._extent[1]-this._extent[0]+1},n.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},n.prototype.getOrdinalMeta=function(){return this._ordinalMeta},n.prototype.calcNiceTicks=function(){},n.prototype.calcNiceExtent=function(){},n.type="ordinal",n}(Th);Th.registerClass(Rh);var Nh=pt,zh=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return e(n,t),n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return Ah(t,this._extent)},n.prototype.normalize=function(t){return Ph(t,this._extent)},n.prototype.scale=function(t){return Lh(t,this._extent)},n.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},n.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},n.prototype.getInterval=function(){return this._interval},n.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Eh(t)},n.prototype.getTicks=function(t){var e=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!e)return o;n[0]<r[0]&&(t?o.push({value:Nh(r[0]-e,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=Nh(a+e,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(t?o.push({value:Nh(s+e,i)}):o.push({value:n[1]})),o},n.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<e.length;i++){for(var o=e[i],a=e[i-1],s=0,l=[],u=(o.value-a.value)/t;s<t-1;){var c=Nh(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},n.prototype.getLabel=function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=ft(t.value)||0:"auto"===n&&(n=this._intervalPrecision),ks(Nh(t.value,n,!0))},n.prototype.calcNiceTicks=function(t,e,n){t=t||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=Dh(r,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},n.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=Math.abs(e[0]);t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var r=e[1]-e[0];isFinite(r)||(e[0]=0,e[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Nh(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=Nh(Math.ceil(e[1]/i)*i))},n.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},n.type="interval",n}(Th);Th.registerClass(zh);const Fh=zh;var Bh="ZH",Hh="EN",jh=Hh,Vh={},Wh={},Uh=ht.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(Bh)>-1?Bh:jh;function Gh(t,e){t=t.toUpperCase(),Wh[t]=new fs(e),Vh[t]=e}Gh(Hh,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},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(Bh,{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:"旭日图"}},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:""}}}});var Yh=1e3,Zh=6e4,qh=36e5,Xh=864e5,Kh=31536e6,Qh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Jh="{yyyy}-{MM}-{dd}",$h={year:"{yyyy}",month:"{yyyy}-{MM}",day:Jh,hour:Jh+" "+Qh.hour,minute:Jh+" "+Qh.minute,second:Jh+" "+Qh.second,millisecond:Qh.none},td=["year","month","day","hour","minute","second","millisecond"],ed=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function nd(t,e){return"0000".substr(0,e-(t+="").length)+t}function rd(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function id(t){return t===rd(t)}function od(t,e,n,r){var i=yt(t),o=i[ld(n)](),a=i[ud(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[cd(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[hd(n)](),h=(c-1)%12+1,d=i[dd(n)](),p=i[pd(n)](),f=i[fd(n)](),v=r instanceof fs?r:function(t){return Wh[t]}(r||Uh)||Wh[jh],g=v.getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),_=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,nd(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,m[a-1]).replace(/{MM}/g,nd(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,nd(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,nd(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,nd(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,nd(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,nd(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,nd(f,3)).replace(/{S}/g,f+"")}function ad(t,e){var n=yt(t),r=n[ud(e)]()+1,i=n[cd(e)](),o=n[hd(e)](),a=n[dd(e)](),s=n[pd(e)](),l=0===n[fd(e)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===i;return d&&1===r?"year":d?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function sd(t,e,n){var r=F(t)?yt(t):t;switch(e=e||ad(t,n)){case"year":return r[ld(n)]();case"half-year":return r[ud(n)]()>=6?1:0;case"quarter":return Math.floor((r[ud(n)]()+1)/4);case"month":return r[ud(n)]();case"day":return r[cd(n)]();case"half-day":return r[hd(n)]()/24;case"hour":return r[hd(n)]();case"minute":return r[dd(n)]();case"second":return r[pd(n)]();case"millisecond":return r[fd(n)]()}}function ld(t){return t?"getUTCFullYear":"getFullYear"}function ud(t){return t?"getUTCMonth":"getMonth"}function cd(t){return t?"getUTCDate":"getDate"}function hd(t){return t?"getUTCHours":"getHours"}function dd(t){return t?"getUTCMinutes":"getMinutes"}function pd(t){return t?"getUTCSeconds":"getSeconds"}function fd(t){return t?"getUTCMilliseconds":"getMilliseconds"}function vd(t){return t?"setUTCFullYear":"setFullYear"}function gd(t){return t?"setUTCMonth":"setMonth"}function yd(t){return t?"setUTCDate":"setDate"}function md(t){return t?"setUTCHours":"setHours"}function _d(t){return t?"setUTCMinutes":"setMinutes"}function bd(t){return t?"setUTCSeconds":"setSeconds"}function xd(t){return t?"setUTCMilliseconds":"setMilliseconds"}var wd=function(t){function n(e){var n=t.call(this,e)||this;return n.type="time",n}return e(n,t),n.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return od(t.value,$h[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(rd(this._minLevelUnit))]||$h.second,e,this.getSetting("locale"))},n.prototype.getFormattedLabel=function(t,e,n){var r=this.getSetting("useUTC");return function(t,e,n,r,i){var o=null;if(z(n))o=n;else if(N(n))o=n(t.value,e,{level:t.level});else{var a=S({},Qh);if(t.level>0)for(var s=0;s<td.length;++s)a[td[s]]="{primary|"+a[td[s]]+"}";var l=n?!1===n.inherit?n:C(n,a):a,u=ad(t.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=ed.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(R(o)){var c=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[c=Math.min(c,o.length-1)]}}return od(new Date(t.value),o,i,r)}(t,e,n,this.getSetting("locale"),r)},n.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var r=this.getSetting("useUTC"),i=function(t,e,n,r){var i=1e4,o=ed,a=0;function s(t,e,n,i,o,a,s){for(var l=new Date(e),u=e,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=t,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(t,i,o){var a=[],l=!i.length;if(!function(t,e,n,r){var i=yt(e),o=yt(n),a=function(t){return sd(i,t,r)===sd(o,t,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},h=function(){return c()&&a("minute")},d=function(){return h()&&a("second")},p=function(){return d()&&a("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return d();case"millisecond":return p()}}(rd(t),r[0],r[1],n)){l&&(i=[{value:Dd(new Date(r[0]),t,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,h=i[u+1].value;if(c!==h){var d=void 0,p=void 0,f=void 0,v=!1;switch(t){case"year":d=Math.max(1,Math.round(e/Xh/365)),p=ld(n),f=vd(n);break;case"half-year":case"quarter":case"month":d=Td(e),p=ud(n),f=gd(n);break;case"week":case"half-week":case"day":d=Cd(e,31),p=cd(n),f=yd(n),v=!0;break;case"half-day":case"quarter-day":case"hour":d=kd(e),p=hd(n),f=md(n);break;case"minute":d=Id(e,!0),p=dd(n),f=_d(n);break;case"second":d=Id(e,!1),p=pd(n),f=bd(n);break;case"millisecond":d=Md(e),p=fd(n),f=xd(n)}s(d,c,h,p,f,v,a),"year"===t&&o.length>1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],h=0,d=0,p=0;p<o.length&&a++<i;++p){var f=rd(o[p]);if(id(o[p]))if(l(o[p],u[u.length-1]||[],c),f!==(o[p+1]?rd(o[p+1]):null)){if(c.length){d=h,c.sort(function(t,e){return t.value-e.value});for(var v=[],g=0;g<c.length;++g){var y=c[g].value;0!==g&&c[g-1].value===y||(v.push(c[g]),y>=r[0]&&y<=r[1]&&h++)}var m=(r[1]-r[0])/e;if(h>1.5*m&&d>m/1.5)break;if(u.push(v),h>m||t===o[p])break}c=[]}}0;var _=O(D(u,function(t){return O(t,function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd})}),function(t){return t.length>0}),b=[],x=_.length-1;for(p=0;p<_.length;++p)for(var w=_[p],S=0;S<w.length;++S)b.push({value:w[S].value,level:x-p});b.sort(function(t,e){return t.value-e.value});var C=[];for(p=0;p<b.length;++p)0!==p&&b[p].value===b[p-1].value||C.push(b[p]);return C}(this._minLevelUnit,this._approxInterval,r,e);return(n=n.concat(i)).push({value:e[1],level:0}),n},n.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Xh,e[1]+=Xh),e[1]===-1/0&&e[0]===1/0){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-Xh}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},n.prototype.calcNiceTicks=function(t,e,n){t=t||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=Sd.length,a=Math.min(function(t,e,n,r){for(;n<r;){var i=n+r>>>1;t[i][1]<e?n=i+1:r=i}return n}(Sd,this._approxInterval,0,o),o-1);this._interval=Sd[a][1],this._minLevelUnit=Sd[Math.max(a-1,0)][0]},n.prototype.parse=function(t){return F(t)?t:+yt(t)},n.prototype.contain=function(t){return Ah(this.parse(t),this._extent)},n.prototype.normalize=function(t){return Ph(this.parse(t),this._extent)},n.prototype.scale=function(t){return Lh(t,this._extent)},n.type="time",n}(Fh),Sd=[["second",Yh],["minute",Zh],["hour",qh],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",Kh/2],["year",Kh]];function Cd(t,e){return(t/=Xh)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Td(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function kd(t){return(t/=qh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Id(t,e){return(t/=e?Zh:Yh)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Md(t){return _t(t,!0)}function Dd(t,e,n){var r=new Date(t);switch(rd(e)){case"year":case"month":r[gd(n)](0);case"day":r[yd(n)](1);case"hour":r[md(n)](0);case"minute":r[_d(n)](0);case"second":r[bd(n)](0),r[xd(n)](0)}return r.getTime()}Th.registerClass(wd);var Ed=Th.prototype,Od=Fh.prototype,Ad=pt,Pd=Math.floor,Ld=Math.ceil,Rd=Math.pow,Nd=Math.log,zd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Fh,e._interval=0,e}return e(n,t),n.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent();return D(Od.getTicks.call(this,t),function(t){var e=t.value,i=pt(Rd(this.base,e));return i=e===n[0]&&this._fixMin?Bd(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?Bd(i,r[1]):i}},this)},n.prototype.setExtent=function(t,e){var n=Nd(this.base);t=Nd(Math.max(0,t))/n,e=Nd(Math.max(0,e))/n,Od.setExtent.call(this,t,e)},n.prototype.getExtent=function(){var t=this.base,e=Ed.getExtent.call(this);e[0]=Rd(t,e[0]),e[1]=Rd(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=Bd(e[0],n[0])),this._fixMax&&(e[1]=Bd(e[1],n[1])),e},n.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Nd(t[0])/Nd(e),t[1]=Nd(t[1])/Nd(e),Ed.unionExtent.call(this,t)},n.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,mt(r)));for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[pt(Ld(e[0]/i)*i),pt(Pd(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},n.prototype.calcNiceExtent=function(t){Od.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return Ah(t=Nd(t)/Nd(this.base),this._extent)},n.prototype.normalize=function(t){return Ph(t=Nd(t)/Nd(this.base),this._extent)},n.prototype.scale=function(t){return t=Lh(t,this._extent),Rd(this.base,t)},n.type="log",n}(Th),Fd=zd.prototype;function Bd(t,e){return Ad(t,ft(e))}Fd.getMinorTicks=Od.getMinorTicks,Fd.getLabel=Od.getLabel,Th.registerClass(zd);!function(){function t(t,e,n){this._prepareParams(t,e,n)}t.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===t.type;this._needCrossZero="interval"===t.type&&e.getNeedCrossZero&&e.getNeedCrossZero();var i=this._modelMinRaw=e.get("min",!0);N(i)?this._modelMinNum=Vd(t,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=Vd(t,i));var o=this._modelMaxRaw=e.get("max",!0);if(N(o)?this._modelMaxNum=Vd(t,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=Vd(t,o)),r)this._axisDataLen=e.getCategories().length;else{var a=e.get("boundaryGap"),s=R(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Cr(s[0],1),Cr(s[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=t?r?0:NaN:e-i[0]*o),null==s&&(s=t?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=U(a)||U(s)||t&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,d=this._determinedMax;return null!=h&&(a=h,l=!0),null!=d&&(s=d,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[jd[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[Hd[t]]=e},t.prototype.freeze=function(){this.frozen=!0}}();var Hd={min:"_determinedMin",max:"_determinedMax"},jd={min:"_dataMin",max:"_dataMax"};function Vd(t,e){return null==e?null:U(e)?NaN:t.parse(e)}!function(){function t(){}t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){}}();var Wd=Qi.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=e.width/2,o=e.height/2;t.moveTo(n,r-o),t.lineTo(n+i,r+o),t.lineTo(n-i,r+o),t.closePath()}}),Ud=Qi.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=e.width/2,o=e.height/2;t.moveTo(n,r-o),t.lineTo(n+i,r),t.lineTo(n,r+o),t.lineTo(n-i,r),t.closePath()}}),Gd=Qi.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,r=e.y,i=e.width/5*3,o=Math.max(i,e.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,h=Math.sin(u),d=Math.cos(u),p=.6*a,f=.7*a;t.moveTo(n-c,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+c-h*p,l+s+d*p,n,r-f,n,r),t.bezierCurveTo(n,r-f,n-c+h*p,l+s+d*p,n-c,l+s),t.closePath()}}),Yd=Qi.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,r=e.width,i=e.x,o=e.y,a=r/3*2;t.moveTo(i,o),t.lineTo(i+a,o+n),t.lineTo(i,o+n/4*3),t.lineTo(i-a,o+n),t.lineTo(i,o),t.closePath()}}),Zd={line:function(t,e,n,r,i){i.x1=t,i.y1=e+r/2,i.x2=t+n,i.y2=e+r/2},rect:function(t,e,n,r,i){i.x=t,i.y=e,i.width=n,i.height=r},roundRect:function(t,e,n,r,i){i.x=t,i.y=e,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(t,e,n,r,i){var o=Math.min(n,r);i.x=t,i.y=e,i.width=o,i.height=o},circle:function(t,e,n,r,i){i.cx=t+n/2,i.cy=e+r/2,i.r=Math.min(n,r)/2},diamond:function(t,e,n,r,i){i.cx=t+n/2,i.cy=e+r/2,i.width=n,i.height=r},pin:function(t,e,n,r,i){i.x=t+n/2,i.y=e+r/2,i.width=n,i.height=r},arrow:function(t,e,n,r,i){i.x=t+n/2,i.y=e+r/2,i.width=n,i.height=r},triangle:function(t,e,n,r,i){i.cx=t+n/2,i.cy=e+r/2,i.width=n,i.height=r}},qd={};M({line:Sc,rect:Fa,roundRect:Fa,square:Fa,circle:Uu,diamond:Ud,pin:Gd,arrow:Yd,triangle:Wd},function(t,e){qd[e]=new t});var Xd=Qi.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var r=Tr(t,e,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===e.position&&(r.y=n.y+.4*n.height),r},buildPath:function(t,e,n){var r=e.symbolType;if("none"!==r){var i=qd[r];i||(i=qd[r="rect"]),Zd[r](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n)}}});function Kd(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function Qd(t,e,n,r,i,o,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),s=0===t.indexOf("image://")?function(t,e,n){var r=new Aa({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var i={width:t.width,height:t.height};r.setStyle(Rc(e,i))}}});return r}(t.slice(8),new dr(e,n,r,i),a?"center":"cover"):0===t.indexOf("path://")?Lc(t.slice(7),{},new dr(e,n,r,i),a?"center":"cover"):new Xd({shape:{symbolType:t,x:e,y:n,width:r,height:i}}),s.__isEmptyBrush=l,s.setColor=Kd,o&&s.setColor(o),s}var Jd=[];!function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}e(n,t),n.prototype.traverse=function(t,e){t.call(e,this)},n.prototype.useStyle=function(){this.style={}},n.prototype.getCursor=function(){return this._cursor},n.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},n.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},n.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},n.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},n.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},n.prototype.getDisplayables=function(){return this._displayables},n.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},n.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},n.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},n.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new dr(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Jd)),t.union(r)}this._rect=t}return this._rect},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(t,e))return!0}return!1}}(Kr);var $d=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return e(n,t),n.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},n.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},n.prototype.buildPath=function(t,e){for(var n=e.paths||[],r=0;r<n.length;r++)n[r].buildPath(t,n[r].shape,!0)},n.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},n.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Qi.prototype.getBoundingRect.call(this)},n}(Qi);const tp=$d;const ep=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}();!function(t){function n(e,n,r,i,o,a){var s=t.call(this,o)||this;return s.x=e??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type="linear",s.global=a||!1,s}e(n,t)}(ep);!function(t){function n(e,n,r,i,o){var a=t.call(this,i)||this;return a.x=e??.5,a.y=n??.5,a.r=r??.5,a.type="radial",a.global=o||!1,a}e(n,t)}(ep);var np=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},rp=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new np(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,r=t.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,e.drift(i,o,t),this.handler.dispatchToElement(new np(e,t),"drag",t.event);var a=this.handler.findHover(n,r,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.handler.dispatchToElement(new np(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new np(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new np(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new np(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();const ip=rp;var op=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ap=[],sp=ht.browser.firefox&&+ht.browser.version.split(".")[0]<39;function lp(t,e,n,r){return n=n||{},r?up(t,e,n):sp&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):up(t,e,n),n}function up(t,e,n){if(ht.domSupported&&t.getBoundingClientRect){var r=e.clientX,i=e.clientY;if(ws(t)){var o=t.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(xs(ap,t,r,i))return n.zrX=ap[0],void(n.zrY=ap[1])}n.zrX=n.zrY=0}function cp(t){return t||window.event}function hp(t,e,n){if(null!=(e=cp(e)).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];i&&lp(t,i,e,n)}else{lp(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,r=t.deltaY;if(null==n||null==r)return e;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&op.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function dp(t,e,n,r){t.removeEventListener(e,n,r)}var pp=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var r=t.touches;if(r){for(var i={points:[],touches:[],target:e,event:t},o=0,a=r.length;o<a;o++){var s=r[o],l=lp(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},t.prototype._recognize=function(t){for(var e in vp)if(vp.hasOwnProperty(e)){var n=vp[e](this._track,t);if(n)return n}},t}();function fp(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}var vp={pinch:function(t,e){var n=t.length;if(n){var r,i=(t[n-1]||{}).points,o=(t[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var a=fp(i)/fp(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},gp="silent";function yp(){!function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}(this.event)}var mp=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return e(n,t),n.prototype.dispose=function(){},n.prototype.setCursor=function(){},n}(fr),_p=function(t,e){this.x=t,this.y=e},bp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],xp=new dr(0,0,0,0),wp=function(t){function n(e,n,r,i,o){var a=t.call(this)||this;return a._hovered=new _p(0,0),a.storage=e,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new mp,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new ip(a),a}return e(n,t),n.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(M(bp,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,r=Tp(this,e,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new _p(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},n.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new _p(0,0)},n.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},n.prototype.dispatchToElement=function(t,e,n){var r=(t=t||{}).target;if(!r||!r.silent){for(var i="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.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:yp}}(e,t,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(e,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[i]&&t[i].call(t,o),t.trigger&&t.trigger(e,o)}))}},n.prototype.findHover=function(t,e,n){var r=this.storage.getDisplayList(),i=new _p(t,e);if(Cp(r,i,t,e,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new dr(t-s,e-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(xp.copy(c.getBoundingRect()),c.transform&&xp.applyTransform(c.transform),xp.intersect(l)&&o.push(c))}if(o.length)for(var h=Math.PI/12,d=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<d;f+=h){if(Cp(o,i,t+p*Math.cos(f),e+p*Math.sin(f),n),i.target)return i}}return i},n.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new pp);var n=this._gestureMgr;"start"===e&&n.clear();var r=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),r){var i=r.type;t.gestureEvent=i;var o=new _p;o.target=r.target,this.dispatchToElement(o,i,r.event)}},n}(fr);function Sp(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var r=t,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(e,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||gp}return!1}function Cp(t,e,n,r,i){for(var o=t.length-1;o>=0;o--){var a=t[o],s=void 0;if(a!==i&&!a.ignore&&(s=Sp(a,n,r))&&(!e.topTarget&&(e.topTarget=a),s!==gp)){e.target=a;break}}}function Tp(t,e,n){var r=t.painter;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){wp.prototype[t]=function(e){var n,r,i=e.zrX,o=e.zrY,a=Tp(this,i,o);if("mouseup"===t&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Fe(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});const kp=wp;function Ip(t,e,n,r){var i=e+1;if(i===n)return 1;if(r(t[i++],t[e])<0){for(;i<n&&r(t[i],t[i-1])<0;)i++;!function(t,e,n){n--;for(;e<n;){var r=t[e];t[e++]=t[n],t[n--]=r}}(t,e,i)}else for(;i<n&&r(t[i],t[i-1])>=0;)i++;return i-e}function Mp(t,e,n,r,i){for(r===e&&r++;r<n;r++){for(var o,a=t[r],s=e,l=r;s<l;)i(a,t[o=s+l>>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Dp(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])>0){for(s=r-i;l<s&&o(t,e[n+i+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&o(t,e[n+i-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function Ep(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])<0){for(s=i+1;l<s&&o(t,e[n+i-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(t,e[n+i+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function Op(t,e){var n,r,i=7,o=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],h=r[s+1];r[s]=u+h,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var d=Ep(t[c],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(h=Dp(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,r,o,s){var l=0;for(l=0;l<r;l++)a[l]=t[n+l];var u=0,c=o,h=n;if(t[h++]=t[c++],0===--s){for(l=0;l<r;l++)t[h+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)t[h+l]=t[c+l];return void(t[h+s]=a[u])}var d,p,f,v=i;for(;;){d=0,p=0,f=!1;do{if(e(t[c],a[u])<0){if(t[h++]=t[c++],p++,d=0,0===--s){f=!0;break}}else if(t[h++]=a[u++],d++,p=0,1===--r){f=!0;break}}while((d|p)<v);if(f)break;do{if(0!==(d=Ep(t[c],a,u,r,0,e))){for(l=0;l<d;l++)t[h+l]=a[u+l];if(h+=d,u+=d,(r-=d)<=1){f=!0;break}}if(t[h++]=t[c++],0===--s){f=!0;break}if(0!==(p=Dp(a[u],t,c,s,0,e))){for(l=0;l<p;l++)t[h+l]=t[c+l];if(h+=p,c+=p,0===(s-=p)){f=!0;break}}if(t[h++]=a[u++],1===--r){f=!0;break}v--}while(d>=7||p>=7);if(f)break;v<0&&(v=0),v+=2}if((i=v)<1&&(i=1),1===r){for(l=0;l<s;l++)t[h+l]=t[c+l];t[h+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)t[h+l]=a[u+l]}}(l,u,c,h):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=t[o+l];var u=n+r-1,c=s-1,h=o+s-1,d=0,p=0;if(t[h--]=t[u--],0===--r){for(d=h-(s-1),l=0;l<s;l++)t[d+l]=a[l];return}if(1===s){for(p=(h-=r)+1,d=(u-=r)+1,l=r-1;l>=0;l--)t[p+l]=t[d+l];return void(t[h]=a[c])}var f=i;for(;;){var v=0,g=0,y=!1;do{if(e(a[c],t[u])<0){if(t[h--]=t[u--],v++,g=0,0===--r){y=!0;break}}else if(t[h--]=a[c--],g++,v=0,1===--s){y=!0;break}}while((v|g)<f);if(y)break;do{if(0!==(v=r-Ep(a[c],t,n,r,r-1,e))){for(r-=v,p=(h-=v)+1,d=(u-=v)+1,l=v-1;l>=0;l--)t[p+l]=t[d+l];if(0===r){y=!0;break}}if(t[h--]=a[c--],1===--s){y=!0;break}if(0!==(g=s-Dp(t[u],a,0,s,s-1,e))){for(s-=g,p=(h-=g)+1,d=(c-=g)+1,l=0;l<g;l++)t[p+l]=a[d+l];if(s<=1){y=!0;break}}if(t[h--]=t[u--],0===--r){y=!0;break}f--}while(v>=7||g>=7);if(y)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(p=(h-=r)+1,d=(u-=r)+1,l=r-1;l>=0;l--)t[p+l]=t[d+l];t[h]=a[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l<s;l++)t[d+l]=a[l]}}(l,u,c,h))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]<r[t+1]&&t--,s(t)}},pushRun:function(t,e){n[o]=t,r[o]=e,o+=1}}}function Ap(t,e,n,r){n||(n=0),r||(r=t.length);var i=r-n;if(!(i<2)){var o=0;if(i<32)Mp(t,n,r,n+(o=Ip(t,n,r,e)),e);else{var a=Op(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(i);do{if((o=Ip(t,n,r,e))<s){var l=i;l>s&&(l=s),Mp(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var Pp=!1;function Lp(){Pp||(Pp=!0)}function Rp(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Np=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Rp}return t.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,r=0,i=e.length;r<i;r++)this._updateAndAddDisplayable(e[r],null,t);n.length=this._displayListLen,Ap(n,Rp)},t.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath(),i=e&&e.length,o=0,a=t.__clipPaths;if(!t.ignoreClip&&(i||r)){if(a||(a=t.__clipPaths=[]),i)for(var s=0;s<e.length;s++)a[o++]=e[s];for(var l=r,u=t;l;)l.parent=u,l.updateTransform(),a[o++]=l,u=l,l=l.getClipPath()}if(a&&(a.length=o),t.childrenRef){for(var c=t.childrenRef(),h=0;h<c.length;h++){var d=c[h];t.__dirty&&(d.__dirty|=1),this._updateAndAddDisplayable(d,a,n)}t.__dirty=0}else{var p=t;isNaN(p.z)&&(Lp(),p.z=0),isNaN(p.z2)&&(Lp(),p.z2=0),isNaN(p.zlevel)&&(Lp(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,a,n);var v=t.getTextGuideLine();v&&this._updateAndAddDisplayable(v,a,n);var g=t.getTextContent();g&&this._updateAndAddDisplayable(g,a,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var r=T(this._roots,t);r>=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();const zp=Np;const Fp=ht.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};function Bp(){return(new Date).getTime()}var Hp=function(t){function n(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return e(n,t),n.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},n.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},n.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},n.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},n.prototype.update=function(t){for(var e=Bp()-this._pausedTime,n=e-this._time,r=this._head;r;){var i=r.next;r.step(e,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},n.prototype._startLoop=function(){var t=this;this._running=!0,Fp(function e(){t._running&&(Fp(e),!t._paused&&t.update())})},n.prototype.start=function(){this._running||(this._time=Bp(),this._pausedTime=0,this._startLoop())},n.prototype.stop=function(){this._running=!1},n.prototype.pause=function(){this._paused||(this._pauseStart=Bp(),this._paused=!0)},n.prototype.resume=function(){this._paused&&(this._pausedTime+=Bp()-this._pauseStart,this._paused=!1)},n.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},n.prototype.isFinished=function(){return null==this._head},n.prototype.animate=function(t,e){e=e||{},this.start();var n=new Gn(t,e.loop);return this.addAnimator(n),n},n}(fr);const jp=Hp;var Vp,Wp,Up=ht.domSupported,Gp=(Wp={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Vp=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:D(Vp,function(t){var e=t.replace("mouse","pointer");return Wp.hasOwnProperty(e)?e:t})}),Yp=["mousemove","mouseup"],Zp=["pointermove","pointerup"],qp=!1;function Xp(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Kp(t){t&&(t.zrByTouch=!0)}function Qp(t,e){for(var n=e,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return r}var Jp=function(t,e){this.stopPropagation=st,this.stopImmediatePropagation=st,this.preventDefault=st,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},$p={mousedown:function(t){t=hp(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=hp(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=hp(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Qp(this,(t=hp(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){qp=!0,t=hp(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){qp||(t=hp(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Kp(t=hp(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),$p.mousemove.call(this,t),$p.mousedown.call(this,t)},touchmove:function(t){Kp(t=hp(this.dom,t)),this.handler.processGesture(t,"change"),$p.mousemove.call(this,t)},touchend:function(t){Kp(t=hp(this.dom,t)),this.handler.processGesture(t,"end"),$p.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&$p.click.call(this,t)},pointerdown:function(t){$p.mousedown.call(this,t)},pointermove:function(t){Xp(t)||$p.mousemove.call(this,t)},pointerup:function(t){$p.mouseup.call(this,t)},pointerout:function(t){Xp(t)||$p.mouseout.call(this,t)}};M(["click","dblclick","contextmenu"],function(t){$p[t]=function(e){e=hp(this.dom,e),this.trigger(t,e)}});var tf={pointermove:function(t){Xp(t)||tf.mousemove.call(this,t)},pointerup:function(t){tf.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function ef(t,e){var n=e.domHandlers;ht.pointerEventsSupported?M(Gp.pointer,function(r){rf(e,r,function(e){n[r].call(t,e)})}):(ht.touchEventsSupported&&M(Gp.touch,function(r){rf(e,r,function(i){n[r].call(t,i),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}(e)})}),M(Gp.mouse,function(r){rf(e,r,function(i){i=cp(i),e.touching||n[r].call(t,i)})}))}function nf(t,e){function n(n){rf(e,n,function(r){r=cp(r),Qp(t,r.target)||(r=function(t,e){return hp(t.dom,new Jp(t,e),!0)}(t,r),e.domHandlers[n].call(t,r))},{capture:!0})}ht.pointerEventsSupported?M(Zp,n):ht.touchEventsSupported||M(Yp,n)}function rf(t,e,n,r){t.mounted[e]=n,t.listenerOpts[e]=r,function(t,e,n,r){t.addEventListener(e,n,r)}(t.domTarget,e,n,r)}function of(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&dp(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var af=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const sf=function(t){function n(e,n){var r=t.call(this)||this;return r.__pointerCapturing=!1,r.dom=e,r.painterRoot=n,r._localHandlerScope=new af(e,$p),Up&&(r._globalHandlerScope=new af(document,tf)),ef(r,r._localHandlerScope),r}return e(n,t),n.prototype.dispose=function(){of(this._localHandlerScope),Up&&of(this._globalHandlerScope)},n.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},n.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Up&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?nf(this,e):of(e)}},n}(fr);var lf={},uf={};var cf=function(){function t(t,e,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var i=new zp,o=n.renderer||"canvas";lf[o]||(o=A(lf)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new lf[o](e,i,n,t),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=ht.node||ht.worker||s?null:new sf(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?ht.touchEventsSupported:!!c)&&(l=G(n.pointerSize,44)),this.handler=new kp(i,a,u,a.root,l),this.animation=new jp({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return t.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},t.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return Ce(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,n=0,r=e.length,i=0;i<r;i++)n+=Ce(e[i].color,1);return(n/=r)<.4}return!1}(t))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(t){var e,n=Bp();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var r=Bp();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Cu&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){var t;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,t=this.id,delete uf[t])},t}();function hf(t,e){var n=new cf(_(),t,e);return uf[n.id]=n,n}var df="";"undefined"!=typeof navigator&&(df=navigator.platform||"");var pf="rgba(0, 0, 0, 0.2)";const ff={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:pf,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:pf,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:pf,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:pf,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:pf,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:pf,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:df.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};var vf,gf,yf,mf=rt();var _f="\0_ec_inner";var bf=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(t,e,n,r,i,o){r=r||{},this.option=null,this._theme=new fs(r),this._locale=new fs(i),this._optionManager=o},n.prototype.setOption=function(t,e,n){var r=Sf(e);this._optionManager.setOption(t,n,r),this._resetOption(null,r)},n.prototype.resetOption=function(t,e){return this._resetOption(t,Sf(e))},n.prototype._resetOption=function(t,e){var n=!1,r=this._optionManager;if(!t||"recreate"===t){var i=r.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(i,e)):yf(this,i),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=r.getMediaOption(this);a.length&&M(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,e){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=rt(),s=e&&e.replaceMergeMainTypeMap;tl(this).datasetMap=rt(),M(t,function(t,e){null!=t&&(Fs.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?x(t):w(n[e],t,!0))}),s&&s.each(function(t,e){Fs.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))}),Fs.topologicalTravel(o,Fs.getAllClassMainTypes(),function(e){var o=function(t,e,n){var r=mf.get(e);if(!r)return n;var i=r(t);return i?n.concat(i):n}(this,e,It(t[e])),a=r.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=At(a,o,l);(function(t,e,n){M(t,function(t){var r=t.newOption;B(r)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,r){return e.type?e.type:n?n.subType:r.determineSubType(t,e)}(e,r,t.existing,n))})})(u,e,Fs),n[e]=null,r.set(e,null),i.set(e,0);var c,h=[],d=[],p=0;M(u,function(t,n){var r=t.existing,i=t.newOption;if(i){var o="series"===e,a=Fs.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(c)return void 0;c=!0}if(r&&r.constructor===a)r.name=t.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=S({componentIndex:n},t.keyInfo);S(r=new a(i,this,this,s),s),t.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(h.push(r.option),d.push(r),p++):(h.push(void 0),d.push(void 0))},this),n[e]=h,r.set(e,d),i.set(e,p),"series"===e&&vf(this)},this),this._seriesIndices||vf(this)},n.prototype.getOption=function(){var t=x(this.option);return M(t,function(e,n){if(Fs.hasClass(n)){for(var r=It(e),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!zt(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,t[n]=r}}),delete t[_f],t},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var r=n[e||0];if(r)return r;if(null==e)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},n.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,r=t.index,i=t.id,o=t.name,a=this._componentsMap.get(e);return a&&a.length?(null!=r?(n=[],M(It(r),function(t){a[t]&&n.push(a[t])})):n=null!=i?xf("id",i,a):null!=o?xf("name",o,a):O(a,function(t){return!!t}),wf(n,t)):[]},n.prototype.findComponents=function(t){var e,n,r,i,o,a=t.query,s=t.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(e=a)||null==e[n]&&null==e[r]&&null==e[i]?null:{mainType:s,index:e[n],id:e[r],name:e[i]}),u=l?this.queryComponents(l):O(this._componentsMap.get(s),function(t){return!!t});return o=wf(u,t),t.filter?O(o,t.filter):o},n.prototype.eachComponent=function(t,e,n){var r=this._componentsMap;if(N(t)){var i=e,o=t;r.each(function(t,e){for(var n=0;t&&n<t.length;n++){var r=t[n];r&&o.call(i,e,r,r.componentIndex)}})}else for(var a=z(t)?r.get(t):B(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(n,l,l.componentIndex)}},n.prototype.getSeriesByName=function(t){var e=Rt(t,null);return O(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},n.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},n.prototype.getSeriesByType=function(t){return O(this._componentsMap.get("series"),function(e){return!!e&&e.subType===t})},n.prototype.getSeries=function(){return O(this._componentsMap.get("series"),function(t){return!!t})},n.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},n.prototype.eachSeries=function(t,e){gf(this),M(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];t.call(e,r,n)},this)},n.prototype.eachRawSeries=function(t,e){M(this._componentsMap.get("series"),function(n){n&&t.call(e,n,n.componentIndex)})},n.prototype.eachSeriesByType=function(t,e,n){gf(this),M(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];i.subType===t&&e.call(n,i,r)},this)},n.prototype.eachRawSeriesByType=function(t,e,n){return M(this.getSeriesByType(t),e,n)},n.prototype.isSeriesFiltered=function(t){return gf(this),null==this._seriesIndicesMap.get(t.componentIndex)},n.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},n.prototype.filterSeries=function(t,e){gf(this);var n=[];M(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];t.call(e,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=rt(n)},n.prototype.restoreData=function(t){vf(this);var e=this._componentsMap,n=[];e.each(function(t,e){Fs.hasClass(e)&&n.push(e)}),Fs.topologicalTravel(n,Fs.getAllClassMainTypes(),function(n){M(e.get(n),function(e){!e||"series"===n&&function(t,e){if(e){var n=e.seriesIndex,r=e.seriesId,i=e.seriesName;return null!=n&&t.componentIndex!==n||null!=r&&t.id!==r||null!=i&&t.name!==i}}(e,t)||e.restoreData()})})},n.internalField=(vf=function(t){var e=t._seriesIndices=[];M(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=rt(e)},gf=function(t){},void(yf=function(t,e){t.option={},t.option[_f]=1,t._componentsMap=rt({series:[]}),t._componentsCount=rt();var n=e.aria;B(n)&&null==n.enabled&&(n.enabled=!0),function(t,e){var n=t.color&&!t.colorLayer;M(e,function(e,r){"colorLayer"===r&&n||Fs.hasClass(r)||("object"==typeof e?t[r]=t[r]?w(t[r],e,!1):x(e):null==t[r]&&(t[r]=e))})}(e,t._theme.option),w(e,ff,!1),t._mergeOption(e,null)})),n}(fs);function xf(t,e,n){if(R(e)){var r=rt();return M(e,function(t){null!=t&&(null!=Rt(t,null)&&r.set(t,!0))}),O(n,function(e){return e&&r.get(e[t])})}var i=Rt(e,null);return O(n,function(e){return e&&null!=i&&e[t]===i})}function wf(t,e){return e.hasOwnProperty("subType")?O(t,function(t){return t&&t.subType===e.subType}):t}function Sf(t){var e=rt();return t&&M(It(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}k(bf,Hs);const Cf=bf;var Tf=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];const kf=function(t){M(Tf,function(e){this[e]=P(t[e],t)},this)};var If=/^(min|max)?(.+)$/,Mf=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&(M(It(t.series),function(t){t&&t.data&&j(t.data)&&J(t.data)}),M(It(t.dataset),function(t){t&&t.source&&j(t.source)&&J(t.source)})),t=x(t);var r=this._optionBackup,i=function(t,e,n){var r,i,o=[],a=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,h=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((h||c)&&(t.options=t.media=null),i=t);c&&R(u)&&M(u,function(t){t&&t.option&&(t.query?o.push(t):r||(r=t))});function d(t){M(e,function(e){e(t,n)})}return d(i),M(l,function(t){return d(t)}),M(o,function(t){return d(t.option)}),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(t,e,!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},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],x(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var r=t.getComponent("timeline");r&&(e=x(n[r.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)Df(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=D(s,function(t){return x(-1===t?a.option:o[t].option)})),this._currentMediaIndices=s,l},t}();function Df(t,e,n){var r={width:e,height:n,aspectratio:e/n},i=!0;return M(t,function(t,e){var n=e.match(If);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e})(r[a],t,o)||(i=!1)}}),i}const Ef=Mf;var Of=M,Af=B,Pf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Lf(t){var e=t&&t.itemStyle;if(e)for(var n=0,r=Pf.length;n<r;n++){var i=Pf[n],o=e.normal,a=e.emphasis;o&&o[i]&&(t[i]=t[i]||{},t[i].normal?w(t[i].normal,o[i]):t[i].normal=o[i],o[i]=null),a&&a[i]&&(t[i]=t[i]||{},t[i].emphasis?w(t[i].emphasis,a[i]):t[i].emphasis=a[i],a[i]=null)}}function Rf(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var r=t[e].normal,i=t[e].emphasis;r&&(n?(t[e].normal=t[e].emphasis=null,C(t[e],r)):t[e]=r),i&&(t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function Nf(t){Rf(t,"itemStyle"),Rf(t,"lineStyle"),Rf(t,"areaStyle"),Rf(t,"label"),Rf(t,"labelLine"),Rf(t,"upperLabel"),Rf(t,"edgeLabel")}function zf(t,e){var n=Af(t)&&t[e],r=Af(n)&&n.textStyle;if(r){0;for(var i=0,o=Dt.length;i<o;i++){var a=Dt[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}}function Ff(t){t&&(Nf(t),zf(t,"label"),t.emphasis&&zf(t.emphasis,"label"))}function Bf(t){return R(t)?t:t?[t]:[]}function Hf(t){return(R(t)?t[0]:t)||{}}function jf(t,e){Of(Bf(t.series),function(t){Af(t)&&function(t){if(Af(t)){Lf(t),Nf(t),zf(t,"label"),zf(t,"upperLabel"),zf(t,"edgeLabel"),t.emphasis&&(zf(t.emphasis,"label"),zf(t.emphasis,"upperLabel"),zf(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Lf(e),Ff(e));var n=t.markLine;n&&(Lf(n),Ff(n));var r=t.markArea;r&&Ff(r);var i=t.data;if("graph"===t.type){i=i||t.nodes;var o=t.links||t.edges;if(o&&!j(o))for(var a=0;a<o.length;a++)Ff(o[a]);M(t.categories,function(t){Nf(t)})}if(i&&!j(i))for(a=0;a<i.length;a++)Ff(i[a]);if((e=t.markPoint)&&e.data){var s=e.data;for(a=0;a<s.length;a++)Ff(s[a])}if((n=t.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)R(l[a])?(Ff(l[a][0]),Ff(l[a][1])):Ff(l[a])}"gauge"===t.type?(zf(t,"axisLabel"),zf(t,"title"),zf(t,"detail")):"treemap"===t.type?(Rf(t.breadcrumb,"itemStyle"),M(t.levels,function(t){Nf(t)})):"tree"===t.type&&Nf(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Of(n,function(e){Of(Bf(t[e]),function(t){t&&(zf(t,"axisLabel"),zf(t.axisPointer,"label"))})}),Of(Bf(t.parallel),function(t){var e=t&&t.parallelAxisDefault;zf(e,"axisLabel"),zf(e&&e.axisPointer,"label")}),Of(Bf(t.calendar),function(t){Rf(t,"itemStyle"),zf(t,"dayLabel"),zf(t,"monthLabel"),zf(t,"yearLabel")}),Of(Bf(t.radar),function(t){zf(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),Of(Bf(t.geo),function(t){Af(t)&&(Ff(t),Of(Bf(t.regions),function(t){Ff(t)}))}),Of(Bf(t.timeline),function(t){Ff(t),Rf(t,"label"),Rf(t,"itemStyle"),Rf(t,"controlStyle",!0);var e=t.data;R(e)&&M(e,function(t){B(t)&&(Rf(t,"label"),Rf(t,"itemStyle"))})}),Of(Bf(t.toolbox),function(t){Rf(t,"iconStyle"),Of(t.feature,function(t){Rf(t,"iconStyle")})}),zf(Hf(t.axisPointer),"label"),zf(Hf(t.tooltip).axisPointer,"label")}function Vf(t){t&&M(Wf,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var Wf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Uf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Gf=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Yf(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<Gf.length;n++){var r=Gf[n][1],i=Gf[n][0];null!=e[r]&&(e[i]=e[r])}}function Zf(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function qf(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function Xf(t,e){if(t)for(var n=0;n<t.length;n++)e(t[n]),t[n]&&Xf(t[n].children,e)}function Kf(t,e){jf(t,e),t.series=It(t.series),M(t.series,function(t){if(B(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Zf(t.label),(i=t.data)&&!j(i))for(var n=0;n<i.length;n++)Zf(i[n]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===e){var r=function(t,e){for(var n=e.split(","),r=t,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(t,"pointer.color");null!=r&&function(t,e,n,r){for(var i,o=e.split(","),a=t,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(t,"itemStyle.color",r)}else if("bar"===e){var i;if(Yf(t),Yf(t.backgroundStyle),Yf(t.emphasis),(i=t.data)&&!j(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(Yf(i[n]),Yf(i[n]&&i[n].emphasis))}else if("sunburst"===e){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),qf(t),Xf(t.data,qf)}else"graph"===e||"sankey"===e?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&C(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),Vf(t)}}),t.dataRange&&(t.visualMap=t.dataRange),M(Uf,function(e){var n=t[e];n&&(R(n)||(n=[n]),M(n,function(t){Vf(t)}))})}function Qf(t){M(t,function(e,n){var r=[],i=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(o,u,c){var h,d,p=a.get(e.stackedDimension,c);if(isNaN(p))return i;s?d=a.getRawIndex(c):h=a.get(e.stackedByDimension,c);for(var f=NaN,v=n-1;v>=0;v--){var g=t[v];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,h)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&p>=0&&y>0||"samesign"===l&&p<=0&&y<0){p=vt(p,y),f=y;break}}}return r[0]=p,r[1]=f,r})})}var Jf=function(){function t(){this.group=new Cu,this.uid=gs("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){},t.prototype.updateLayout=function(t,e,n,r){},t.prototype.updateVisual=function(t,e,n,r){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();Xt(Jf),te(Jf);const $f=Jf;function tv(t,e,n){var r,i,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d<arguments.length;d++)t[d]=arguments[d];r=(new Date).getTime(),o=this,a=t;var p=s||e,f=s||n;s=null,i=r-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(h,p):i>=0?h():c=setTimeout(h,-i),l=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}var ev=Bt(),nv={itemStyle:ee(cs,!0),lineStyle:ee(ss,!0)},rv={lineStyle:"stroke",itemStyle:"fill"};function iv(t,e){var n=t.visualStyleMapper||nv[e];return n||nv.itemStyle}function ov(t,e){var n=t.visualDrawType||rv[e];return n||"fill"}var av={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=t.getModel(r),o=iv(t,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=ov(t,r),l=o[s],u=N(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=h,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||N(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||N(o.stroke)?h:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var r=t.getDataParams(n),i=S({},o);i[s]=u(r),e.setItemVisual(n,"style",i)}}}},sv=new fs,lv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=iv(t,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[r]){sv.option=n[r];var a=i(sv);S(t.ensureUniqueItemVisual(e,"style"),a),sv.option.decal&&(t.setItemVisual(e,"decal",sv.option.decal),sv.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},uv={performRawSeries:!0,overallReset:function(t){var e=rt();t.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+n,i=e.get(r);i||(i={},e.set(r,i)),ev(t).scope=i}}),t.eachSeries(function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),r={},i=e.getData(),o=ev(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=ov(e,a);i.each(function(t){var e=i.getRawIndex(t);r[e]=t}),n.each(function(t){var a=r[t];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,o,c)}})}})}},cv=Math.PI;var hv=function(){function t(t,e,n,r){this._stageTaskMap=rt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),r=n.context,i=!e&&n.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),r=t.getData().count(),i=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=rt();t.eachSeries(function(t){var r=t.getProgressive(),i=t.uid;n.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;M(this._allHandlers,function(r){var i=t.get(r.uid)||t.set(r.uid,{});X(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,e,n),r.overallReset&&this._createOverallStageTask(r,i,e,n)},this)},t.prototype.prepareView=function(t,e,n,r){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=r,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,r){r=r||{};var i=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}M(t,function(t,s){if(!r.visualType||r.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each(function(t){a(r,t)&&(t.dirty(),h=!0)}),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,r.block);d.each(function(t){t.perform(p)}),c.perform(p)&&(i=!0)}else u&&u.each(function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)})}}),this.unfinished=i||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,r){var i=this,o=e.seriesTaskMap,a=e.seriesTaskMap=rt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Ol({plan:gv,reset:yv,count:bv}));l.context={model:e,ecModel:n,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},t.prototype._createOverallStageTask=function(t,e,n,r){var i=this,o=e.overallTask=e.overallTask||Ol({reset:dv});o.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=rt(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,Ol({reset:pv,onDirty:vv})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,i._pipe(t,n)}X(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,r).each(d):(c=!1,M(n.getSeries(),d)),h&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=e),r.tail&&r.tail.pipe(e),r.tail=e,e.__idxInPipeline=r.count++,e.__pipeline=r},t.wrapStageHandler=function(t,e){return N(t)&&(t={overallReset:t,seriesType:xv(t)}),t.uid=gs("stageHandler"),e&&(t.visualType=e),t},t}();function dv(t){t.overallReset(t.ecModel,t.api,t.payload)}function pv(t){return t.overallProgress&&fv}function fv(){this.agent.dirty(),this.getDownstream().dirty()}function vv(){this.agent&&this.agent.dirty()}function gv(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function yv(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=It(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?D(e,function(t,e){return _v(e)}):mv}var mv=_v(0);function _v(t){return function(e,n){var r=n.data,i=n.resetDefines[t];if(i&&i.dataEach)for(var o=e.start;o<e.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(e,r)}}function bv(t){return t.data.count()}function xv(t){wv=null;try{t(Sv,Cv)}catch(t){}return wv}var wv,Sv={},Cv={};function Tv(t,e){for(var n in e.prototype)t[n]=st}Tv(Sv,Cf),Tv(Cv,kf),Sv.eachSeriesByType=Sv.eachRawSeriesByType=function(t){wv=t},Sv.eachComponent=function(t){"series"===t.mainType&&t.subType&&(wv=t.subType)};const kv=hv;var Iv=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Mv={color:Iv,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Iv]};var Dv="#B9B8CE",Ev="#100C2A",Ov=function(){return{axisLine:{lineStyle:{color:Dv}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Av=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Pv={darkMode:!0,color:Av,backgroundColor:Ev,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Dv}},textStyle:{color:Dv},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Dv}},dataZoom:{borderColor:"#71708A",textStyle:{color:Dv},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Dv}},timeline:{lineStyle:{color:Dv},label:{color:Dv},controlStyle:{color:Dv,borderColor:Dv}},calendar:{itemStyle:{color:Ev},dayLabel:{color:Dv},monthLabel:{color:Dv},yearLabel:{color:Dv}},timeAxis:Ov(),logAxis:Ov(),valueAxis:Ov(),categoryAxis:Ov(),line:{symbol:"circle"},graph:{color:Av},gauge:{title:{color:Dv},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Dv},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Pv.categoryAxis.splitLine.show=!1;const Lv=Pv;var Rv=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},n={},r={};if(z(t)){var i=qt(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};M(t,function(t,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var h=i.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(i)&&(n[i]=t,s=!0),s||(r[i]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:r}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,r,i));function u(t,e,n,r){return null==t[n]||e[r||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Nv=["symbol","symbolSize","symbolRotate","symbolOffset"],zv=Nv.concat(["symbolKeepAspect"]),Fv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<Nv.length;a++){var s=Nv[a],l=t.get(s);N(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||t.defaultSymbol,n.setVisual(S({legendIcon:t.legendIcon||r.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},r)),!e.isSeriesFiltered(t)){var u=A(i);return{dataEach:o?function(e,n){for(var r=t.getRawValue(n),o=t.getDataParams(n),a=0;a<u.length;a++){var s=u[a];e.setItemVisual(n,s,i[s](r,o))}}:null}}}}},Bv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){for(var n=t.getItemModel(e),r=0;r<zv.length;r++){var i=zv[r],o=n.getShallow(i,!0);null!=o&&t.setItemVisual(e,i,o)}}:null}}};function Hv(t,e,n,r,i){var o=t+e;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e=t.seriesIndex,r=t.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===e){var l=t.getData(),u=Ft(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:t.id,name:R(u)?l.getName(u[0]):l.getName(u),selected:z(r)?r:S({},r)})}})}function jv(t,e,n){for(var r;t&&(!e(t)||(r=t,!n));)t=t.__hostTarget||t.parent;return r}var Vv=Math.round(9*Math.random()),Wv="function"==typeof Object.defineProperty,Uv=function(){function t(){this._id="__ec_inner_"+Vv++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return Wv?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();const Gv=Uv;function Yv(t){return isFinite(t)}function Zv(t,e,n){for(var r="radial"===e.type?function(t,e,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=Yv(a)?a:.5,s=Yv(s)?s:.5,l=l>=0&&Yv(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,i=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=Yv(r)?r:0,i=Yv(i)?i:1,o=Yv(o)?o:0,a=Yv(a)?a:0,t.createLinearGradient(r,o,i,a)}(t,e,n),i=e.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function qv(t){return parseInt(t,10)}function Xv(t,e,n){var r=["width","height"][e],i=["clientWidth","clientHeight"][e],o=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(t);return(t[i]||qv(s[r])||qv(t.style[r]))-(qv(s[o])||0)-(qv(s[a])||0)|0}function Kv(t){var e,n,r=t.style,i=r.lineDash&&r.lineWidth>0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:F(e)?[e]:R(e)?e:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(i=D(i,function(t){return t/a}),o/=a)}return[i,o]}var Qv=new Di(!0);function Jv(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function $v(t){return"string"==typeof t&&"none"!==t}function tg(t){var e=t.fill;return null!=e&&"none"!==e}function eg(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function ng(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function rg(t,e,n){var r=oa(e.image,e.__image,n);if(sa(r)){var i=t.createPattern(r,e.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*lt),o.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(o)}return i}}var ig=["shadowBlur","shadowOffsetX","shadowOffsetY"],og=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function ag(t,e,n,r,i){var o=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){ug(t,i),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Wr.opacity:a}(r||e.blend!==n.blend)&&(o||(ug(t,i),o=!0),t.globalCompositeOperation=e.blend||Wr.blend);for(var s=0;s<ig.length;s++){var l=ig[s];(r||e[l]!==n[l])&&(o||(ug(t,i),o=!0),t[l]=t.dpr*(e[l]||0))}return(r||e.shadowColor!==n.shadowColor)&&(o||(ug(t,i),o=!0),t.shadowColor=e.shadowColor||Wr.shadowColor),o}function sg(t,e,n,r,i){var o=cg(e,i.inHover),a=r?null:n&&cg(n,i.inHover)||{};if(o===a)return!1;var s=ag(t,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(ug(t,i),s=!0),$v(o.fill)&&(t.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(ug(t,i),s=!0),$v(o.stroke)&&(t.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(ug(t,i),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(ug(t,i),s=!0),t.lineWidth=l)}for(var u=0;u<og.length;u++){var c=og[u],h=c[0];(r||o[h]!==a[h])&&(s||(ug(t,i),s=!0),t[h]=o[h]||c[1])}return s}function lg(t,e){var n=e.transform,r=t.dpr||1;n?t.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):t.setTransform(r,0,0,r,0,0)}function ug(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function cg(t,e){return e&&t.__hoverStyle||t.style}function hg(t,e){dg(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function dg(t,e,r,i){var o=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1))return e.__dirty&=-2,void(e.__isRendered=!1);var a=e.__clipPaths,s=r.prevElClipPaths,l=!1,u=!1;if(s&&!function(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}(a,s)||(s&&s.length&&(ug(t,r),t.restore(),u=l=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(ug(t,r),t.save(),function(t,e,n){for(var r=!1,i=0;i<t.length;i++){var o=t[i];r=r||o.isZeroArea(),lg(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}n.allClipped=r}(a,t,r),l=!0),r.prevElClipPaths=a),r.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var c=r.prevEl;c||(u=l=!0);var h,d,p=e instanceof Qi&&e.autoBatch&&function(t){var e=tg(t),n=Jv(t);return!(t.lineDash||!(+e^+n)||e&&"string"!=typeof t.fill||n&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(e.style);l||(h=o,d=c.transform,h&&d?h[0]!==d[0]||h[1]!==d[1]||h[2]!==d[2]||h[3]!==d[3]||h[4]!==d[4]||h[5]!==d[5]:h||d)?(ug(t,r),lg(t,e)):p||ug(t,r);var f=cg(e,r.inHover);e instanceof Qi?(1!==r.lastDrawType&&(u=!0,r.lastDrawType=1),sg(t,e,c,u,r),p&&(r.batchFill||r.batchStroke)||t.beginPath(),function(t,e,n,r){var i,o=Jv(n),a=tg(n),s=n.strokePercent,l=s<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c=e.path||Qv,h=e.__dirty;if(!r){var d=n.fill,p=n.stroke,f=a&&!!d.colorStops,v=o&&!!p.colorStops,g=a&&!!d.image,y=o&&!!p.image,m=void 0,_=void 0,b=void 0,x=void 0,w=void 0;(f||v)&&(w=e.getBoundingRect()),f&&(m=h?Zv(t,d,w):e.__canvasFillGradient,e.__canvasFillGradient=m),v&&(_=h?Zv(t,p,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=h||!e.__canvasFillPattern?rg(t,d,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(x=h||!e.__canvasStrokePattern?rg(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),f?t.fillStyle=m:g&&(b?t.fillStyle=b:a=!1),v?t.strokeStyle=_:y&&(x?t.strokeStyle=x:o=!1)}var S,C,T=e.getGlobalScale();c.setScale(T[0],T[1],e.segmentIgnoreThreshold),t.setLineDash&&n.lineDash&&(S=(i=Kv(e))[0],C=i[1]);var k=!0;(u||4&h)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,r),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),S&&(t.setLineDash(S),t.lineDashOffset=C),r||(n.strokeFirst?(o&&ng(t,n),a&&eg(t,n)):(a&&eg(t,n),o&&ng(t,n))),S&&t.setLineDash([])}(t,e,f,p),p&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):e instanceof Ma?(3!==r.lastDrawType&&(u=!0,r.lastDrawType=3),sg(t,e,c,u,r),function(t,e,r){var i,o=r.text;if(null!=o&&(o+=""),o){t.font=r.font||n,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,s=void 0;t.setLineDash&&r.lineDash&&(a=(i=Kv(e))[0],s=i[1]),a&&(t.setLineDash(a),t.lineDashOffset=s),r.strokeFirst?(Jv(r)&&t.strokeText(o,r.x,r.y),tg(r)&&t.fillText(o,r.x,r.y)):(tg(r)&&t.fillText(o,r.x,r.y),Jv(r)&&t.strokeText(o,r.x,r.y)),a&&t.setLineDash([])}}(t,e,f)):e instanceof Aa?(2!==r.lastDrawType&&(u=!0,r.lastDrawType=2),function(t,e,n,r,i){ag(t,cg(e,i.inHover),n&&cg(n,i.inHover),r,i)}(t,e,c,u,r),function(t,e,n){var r=e.__image=oa(n.image,e.__image,e,e.onload);if(r&&sa(r)){var i=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var h=a-(u=n.sx),d=s-(c=n.sy);t.drawImage(r,u,c,h,d,i,o,a,s)}else t.drawImage(r,i,o,a,s)}}(t,e,f)):e.getTemporalDisplayables&&(4!==r.lastDrawType&&(u=!0,r.lastDrawType=4),function(t,e,n){var r=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),dg(t,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),dg(t,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,r)),p&&i&&ug(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}}var pg=new Gv,fg=new se(100),vg=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function gg(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),r=e.getZr(),i="svg"===r.painter.type;t.dirty&&pg.delete(t);var o=pg.get(t);if(o)return o;var s=C(t,{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});"none"===s.backgroundColor&&(s.backgroundColor=null);var l={repeat:"repeat"};return function(t){for(var e,o=[n],l=!0,u=0;u<vg.length;++u){var c=s[vg[u]];if(null!=c&&!R(c)&&!z(c)&&!F(c)&&"boolean"!=typeof c){l=!1;break}o.push(c)}if(l){e=o.join(",")+(i?"-svg":"");var h=fg.get(e);h&&(i?t.svgElement=h:t.image=h)}var d,p=mg(s.dashArrayX),f=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(F(t)){var e=Math.ceil(t);return[e,e]}var n=D(t,function(t){return Math.ceil(t)});return t.length%2?n.concat(n):n}(s.dashArrayY),v=yg(s.symbol),g=(x=p,D(x,function(t){return _g(t)})),y=_g(f),m=!i&&a.createCanvas(),_=i&&{tag:"g",attrs:{},key:"dcl",children:[]},b=function(){for(var t=1,e=0,n=g.length;e<n;++e)t=St(t,g[e]);var r=1;for(e=0,n=v.length;e<n;++e)r=St(r,v[e].length);t*=r;var i=y*g.length*v.length;0;return{width:Math.max(1,Math.min(t,s.maxTileWidth)),height:Math.max(1,Math.min(i,s.maxTileHeight))}}();var x;m&&(m.width=b.width*n,m.height=b.height*n,d=m.getContext("2d"));(function(){d&&(d.clearRect(0,0,m.width,m.height),s.backgroundColor&&(d.fillStyle=s.backgroundColor,d.fillRect(0,0,m.width,m.height)));for(var t=0,e=0;e<f.length;++e)t+=f[e];if(t<=0)return;var o=-y,a=0,l=0,u=0;for(;o<b.height;){if(a%2==0){for(var c=l/2%v.length,h=0,g=0,x=0;h<2*b.width;){var w=0;for(e=0;e<p[u].length;++e)w+=p[u][e];if(w<=0)break;if(g%2==0){var S=.5*(1-s.symbolSize),C=h+p[u][g]*S,T=o+f[a]*S,k=p[u][g]*s.symbolSize,I=f[a]*s.symbolSize,M=x/2%v[c].length;D(C,T,k,I,v[c][M])}h+=p[u][g],++x,++g===p[u].length&&(g=0)}++u===p.length&&(u=0)}o+=f[a],++l,++a===f.length&&(a=0)}function D(t,e,o,a,l){var u=i?1:n,c=Qd(l,t*u,e*u,o*u,a*u,s.color,s.symbolKeepAspect);if(i){var h=r.painter.renderOneToVNode(c);h&&_.children.push(h)}else hg(d,c)}})(),l&&fg.put(e,m||_);t.image=m,t.svgElement=_,t.svgWidth=b.width,t.svgHeight=b.height}(l),l.rotation=s.rotation,l.scaleX=l.scaleY=i?1:1/n,pg.set(t,l),t.dirty=!1,l}function yg(t){if(!t||0===t.length)return[["rect"]];if(z(t))return[[t]];for(var e=!0,n=0;n<t.length;++n)if(!z(t[n])){e=!1;break}if(e)return yg([t]);var r=[];for(n=0;n<t.length;++n)z(t[n])?r.push([t[n]]):r.push(t[n]);return r}function mg(t){if(!t||0===t.length)return[[0,0]];if(F(t))return[[i=Math.ceil(t),i]];for(var e=!0,n=0;n<t.length;++n)if(!F(t[n])){e=!1;break}if(e)return mg([t]);var r=[];for(n=0;n<t.length;++n)if(F(t[n])){var i=Math.ceil(t[n]);r.push([i,i])}else{(i=D(t[n],function(t){return Math.ceil(t)})).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function _g(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}const bg=new fr;var xg={};var wg=2e3,Sg=4500,Cg={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:wg,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:Sg,ARIA:6e3,DECAL:7e3}},Tg="__flagInMainProcess",kg="__pendingUpdate",Ig="__needsUpdateStatus",Mg=/^[a-zA-Z0-9_]+$/,Dg="__connectUpdateStatus";function Eg(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!this.isDisposed())return Ag(this,t,e);ey(this.id)}}function Og(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Ag(this,t,e)}}function Ag(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),fr.prototype[e].apply(t,n)}var Pg,Lg,Rg,Ng,zg,Fg,Bg,Hg,jg,Vg,Wg,Ug,Gg,Yg,Zg,qg,Xg,Kg=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(fr),Qg=Kg.prototype;Qg.on=Og("on"),Qg.off=Og("off");var Jg=function(t){function n(e,n,r){var i=t.call(this,new Rv)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},z(n)&&(n=sy[n]),i._dom=e;var o=i._zr=hf(e,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:G(r.useDirtyRect,!1),useCoarsePointer:G(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=tv(P(o.flush,o),17),(n=x(n))&&Kf(n,!0),i._theme=n,i._locale=function(t){if(z(t)){var e=Vh[t.toUpperCase()]||{};return t===Bh||t===Hh?x(e):w(x(e),x(Vh[jh]),!1)}return w(x(t),x(Vh[jh]),!1)}(r.locale||Uh),i._coordSysMgr=new Sh;var a=i._api=Zg(i);function s(t,e){return t.__prio-e.__prio}return Ap(ay,s),Ap(iy,s),i._scheduler=new kv(i,a,iy,ay),i._messageCenter=new Kg,i._initEvents(),i.resize=P(i.resize,i),o.animation.on("frame",i._onframe,i),Vg(o,i),Wg(o,i),J(i),i}return e(n,t),n.prototype._onframe=function(){if(!this._disposed){Xg(this);var t=this._scheduler;if(this[kg]){var e=this[kg].silent;this[Tg]=!0;try{Pg(this),Ng.update.call(this,null,this[kg].updateParams)}catch(t){throw this[Tg]=!1,this[kg]=null,t}this._zr.flush(),this[Tg]=!1,this[kg]=null,Hg.call(this,e),jg.call(this,e)}else if(t.unfinished){var n=1,r=this._model,i=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(r),t.performDataProcessorTasks(r),Fg(this,r),t.performVisualTasks(r),Yg(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getDom=function(){return this._dom},n.prototype.getId=function(){return this.id},n.prototype.getZr=function(){return this._zr},n.prototype.isSSR=function(){return this._ssr},n.prototype.setOption=function(t,e,n){if(!this[Tg])if(this._disposed)ey(this.id);else{var r,i,o;if(B(e)&&(n=e.lazyUpdate,r=e.silent,i=e.replaceMerge,o=e.transition,e=e.notMerge),this[Tg]=!0,!this._model||e){var a=new Ef(this._api),s=this._theme,l=this._model=new Cf;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:i},oy);var u={seriesTransition:o,optionChanged:!0};if(n)this[kg]={silent:r,updateParams:u},this[Tg]=!1,this.getZr().wakeUp();else{try{Pg(this),Ng.update.call(this,null,u)}catch(t){throw this[kg]=null,this[Tg]=!1,t}this._ssr||this._zr.flush(),this[kg]=null,this[Tg]=!1,Hg.call(this,r),jg.call(this,r)}}},n.prototype.setTheme=function(){Ll()},n.prototype.getModel=function(){return this._model},n.prototype.getOption=function(){return this._model&&this._model.getOption()},n.prototype.getWidth=function(){return this._zr.getWidth()},n.prototype.getHeight=function(){return this._zr.getHeight()},n.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ht.hasGlobalWindow&&window.devicePixelRatio||1},n.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},n.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},n.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},n.prototype.getSvgDataURL=function(){if(ht.svgSupported){var t=this._zr;return M(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},n.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,r=[],i=this;M(e,function(t){n.eachComponent({mainType:t},function(t){var e=i._componentsMap[t.__viewId];e.group.ignore||(r.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return M(r,function(t){t.group.ignore=!1}),o}ey(this.id)},n.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(cy[n]){var s=o,l=o,u=-1/0,c=-1/0,h=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();M(uy,function(o,a){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(x(t)),p=o.getDom().getBoundingClientRect();s=r(p.left,s),l=r(p.top,l),u=i(p.right,u),c=i(p.bottom,c),h.push({dom:d,left:p.left,top:p.top})}});var p=(u*=d)-(s*=d),f=(c*=d)-(l*=d),v=a.createCanvas(),g=hf(v,{renderer:e?"svg":"canvas"});if(g.resize({width:p,height:f}),e){var y="";return M(h,function(t){var e=t.left-s,n=t.top-l;y+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new Fa({shape:{x:0,y:0,width:p,height:f},style:{fill:t.connectedBackgroundColor}})),M(h,function(t){var e=new Aa({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});g.add(e)}),g.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}ey(this.id)},n.prototype.convertToPixel=function(t,e){return zg(this,"convertToPixel",t,e)},n.prototype.convertFromPixel=function(t,e){return zg(this,"convertFromPixel",t,e)},n.prototype.containPixel=function(t,e){var n;if(!this._disposed)return M(jt(this._model,t),function(t,r){r.indexOf("Models")>=0&&M(t,function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(e);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0},this)},this),!!n;ey(this.id)},n.prototype.getVisual=function(t,e){var n=jt(this._model,t,{defaultMainType:"series"});var r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(r,i,e):function(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}(r,e)},n.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},n.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},n.prototype._initEvents=function(){var t,e,n,r=this;M(ty,function(t){var e=function(e){var n,i=r.getModel(),o=e.target;if("globalout"===t?n={}:o&&jv(o,function(t){var e=le(t);if(e&&null!=e.dataIndex){var r=e.dataModel||i.getSeriesByIndex(e.seriesIndex);return n=r&&r.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return n=S({},e.eventData),!0},!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];0,n.event=e,n.type=t,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(t,n)}};e.zrEventfulCallAtLast=!0,r._zr.on(t,e,r)}),M(ry,function(t,e){r._messageCenter.on(e,function(t){this.trigger(e,t)},r)}),M(["selectchanged"],function(t){r._messageCenter.on(t,function(e){this.trigger(t,e)},r)}),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",function(t){var r=n.getModel();t.isFromClick?(Hv("map","selectchanged",e,r,t),Hv("pie","selectchanged",e,r,t)):"select"===t.fromAction?(Hv("map","selected",e,r,t),Hv("pie","selected",e,r,t)):"unselect"===t.fromAction&&(Hv("map","unselected",e,r,t),Hv("pie","unselected",e,r,t))})},n.prototype.isDisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed?ey(this.id):this.setOption({series:[]},!0)},n.prototype.dispose=function(){if(this._disposed)ey(this.id);else{this._disposed=!0,this.getDom()&&Gt(this.getDom(),hy,"");var t=this,e=t._api,n=t._model;M(t._componentsViews,function(t){t.dispose(n,e)}),M(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete uy[t.id]}},n.prototype.resize=function(t){if(!this[Tg])if(this._disposed)ey(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),r=t&&t.silent;this[kg]&&(null==r&&(r=this[kg].silent),n=!0,this[kg]=null),this[Tg]=!0;try{n&&Pg(this),Ng.update.call(this,{type:"resize",animation:S({duration:0},t&&t.animation)})}catch(t){throw this[Tg]=!1,t}this[Tg]=!1,Hg.call(this,r),jg.call(this,r)}}},n.prototype.showLoading=function(t,e){if(this._disposed)ey(this.id);else if(B(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ly[t]){var n=ly[t](this._api,e),r=this._zr;this._loadingFX=n,r.add(n)}},n.prototype.hideLoading=function(){this._disposed?ey(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},n.prototype.makeActionFromEvent=function(t){var e=S({},t);return e.type=ry[t.type],e},n.prototype.dispatchAction=function(t,e){if(this._disposed)ey(this.id);else if(B(e)||(e={silent:!!e}),ny[t.type]&&this._model)if(this[Tg])this._pendingActions.push(t);else{var n=e.silent;Bg.call(this,t,n);var r=e.flush;r?this._zr.flush():!1!==r&&ht.browser.weChat&&this._throttledZrFlush(),Hg.call(this,n),jg.call(this,n)}},n.prototype.updateLabelLayout=function(){bg.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},n.prototype.appendData=function(t){if(this._disposed)ey(this.id);else{var e=t.seriesIndex;0,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},n.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function n(t){for(var e=[],n=t.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&e.push(i)}t.selected&&t.states.select&&e.push("select"),2===t.hoverState&&t.states.emphasis?e.push("emphasis"):1===t.hoverState&&t.states.blur&&e.push("blur"),t.useStates(e)}function r(t,e){if(!t.preventAutoZ){var n=t.get("z")||0,r=t.get("zlevel")||0;e.eachRendered(function(t){return i(t,n,r,-1/0),!0})}}function i(t,e,n,r){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)r=Math.max(i(s[l],e,n,r),r);else t.z=e,t.zlevel=n,r=Math.max(t.z2,r);if(o&&(o.z=e,o.zlevel=n,isFinite(r)&&(o.z2=r+2)),a){var u=t.textGuideLineConfig;a.z=e,a.zlevel=n,isFinite(r)&&(a.z2=r+(u&&u.showAbove?1:-1))}return r}function o(t,e){e.eachRendered(function(t){if(!Yo(t)){var e=t.getTextContent(),n=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}})}function a(t,e){var r=t.getModel("stateAnimation"),i=t.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;e.eachRendered(function(t){if(t.states&&t.states.emphasis){if(Yo(t))return;if(t instanceof Qi&&function(t){var e=to(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var e=t.prevStates;e&&t.useStates(e)}if(i){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&n(t)}})}Pg=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Lg(t,!0),Lg(t,!1),e.plan()},Lg=function(t,e){for(var n=t._model,r=t._scheduler,i=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(t){var l=t.__requireNewView;t.__requireNewView=!1;var u="_ec_"+t.id+"_"+t.type,c=!l&&o[u];if(!c){var h=qt(t.type);0,(c=new(e?$f.getClass(h.main,h.sub):Gc.getClass(h.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}t.__viewId=c.__id=u,c.__alive=!0,c.__model=t,c.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&r.prepareView(c,t,n,s)}e?n.eachComponent(function(t,e){"series"!==t&&u(e)}):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!e&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},Rg=function(t,e,n,r,i){var o=t._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=rt(),M(It(u),function(t){var e=Rt(t,null);null!=e&&l.set(e,!0)})),o&&o.eachComponent(s,function(e){if(!(l&&null!=l.get(e.id)))if(Vo(n))if(e instanceof wu)n.type!==io||n.notBlur||e.get(["emphasis","disabled"])||function(t,e,n){var r=t.seriesIndex,i=t.getData(e.dataType);if(i){var o=Ft(i,e);o=(R(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=le(a);Po(r,u.focus,u.blurScope,n)}else{var c=t.get(["emphasis","focus"]),h=t.get(["emphasis","blurScope"]);null!=c&&Po(r,c,h,n)}}}(e,n,t._api);else{var r=Ro(e.mainType,e.componentIndex,n.name,t._api),i=r.focusSelf,o=r.dispatchers;n.type===io&&i&&!n.notBlur&&Lo(e.mainType,e.componentIndex,t._api),o&&M(o,function(t){n.type===io?ko(t):Io(t)})}else jo(n)&&e instanceof wu&&(!function(t,e){if(jo(e)){var n=e.dataType,r=Ft(t.getData(n),e);R(r)||(r=[r]),t[e.type===lo?"toggleSelect":e.type===ao?"select":"unselect"](r,n)}}(e,n,t._api),No(e),qg(t))},t),o&&o.eachComponent(s,function(e){l&&null!=l.get(e.id)||c(t["series"===r?"_chartsMap":"_componentsMap"][e.__viewId])},t)}else M([].concat(t._componentsViews).concat(t._chartsViews),c);function c(r){r&&r.__alive&&r[e]&&r[e](r.__model,o,t._api,n)}},Ng={prepareAndUpdate:function(t){Pg(this),Ng.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(e,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,e),Fg(this,r),a.update(r,i),t(r),s.performVisualTasks(r,e),Ug(this,r,i,e,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),bg.trigger("afterupdate",r,i)}},updateTransform:function(e){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(e);var o=[];r.eachComponent(function(t,a){if("series"!==t){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,e);l&&l.update&&o.push(s)}else o.push(s)}});var a=rt();r.eachSeries(function(t){var o=n._chartsMap[t.__viewId];if(o.updateTransform){var s=o.updateTransform(t,r,i,e);s&&s.update&&a.set(t.uid,1)}else a.set(t.uid,1)}),t(r),this._scheduler.performVisualTasks(r,e,{setDirty:!0,dirtyMap:a}),Yg(this,r,i,e,{},a),bg.trigger("afterupdate",r,i)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),Gc.markUpdateMethod(e,"updateView"),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),Ug(this,n,this._api,e,{}),bg.trigger("afterupdate",n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(t){t.getData().clearAllVisual()}),Gc.markUpdateMethod(e,"updateVisual"),t(r),this._scheduler.performVisualTasks(r,e,{visualType:"visual",setDirty:!0}),r.eachComponent(function(t,i){if("series"!==t){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),bg.trigger("afterupdate",r,this._api))},updateLayout:function(t){Ng.update.call(this,t)}},zg=function(t,e,n,r){if(t._disposed)ey(t.id);else{for(var i,o=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=jt(o,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(i=u[e](o,s,r)))return i}0}},Fg=function(t,e){var n=t._chartsMap,r=t._scheduler;e.eachSeries(function(t){r.updateStreamModes(t,n[t.__viewId])})},Bg=function(t,e){var n=this,r=this.getModel(),i=t.type,o=t.escapeConnect,a=ny[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&qt(l[0]);this[Tg]=!0;var h=[t],d=!1;t.batch&&(d=!0,h=D(t.batch,function(e){return(e=C(S({},e),t)).batch=null,e}));var p,f=[],v=jo(t),g=Vo(t);if(g&&Ao(this._api),M(h,function(e){if((p=(p=a.action(e,n._model,n._api))||S({},e)).type=s.event||p.type,f.push(p),g){var r=Vt(t),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";Rg(n,u,e,o),qg(n)}else v?(Rg(n,u,e,"series"),qg(n)):c&&Rg(n,u,e,c.main,c.sub)}),"none"!==u&&!g&&!v&&!c)try{this[kg]?(Pg(this),Ng.update.call(this,t),this[kg]=null):Ng[u].call(this,t)}catch(t){throw this[Tg]=!1,t}if(p=d?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[Tg]=!1,!e){var y=this._messageCenter;if(y.trigger(p.type,p),v){var m={type:"selectchanged",escapeConnect:o,selected:zo(r),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};y.trigger(m.type,m)}}},Hg=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Bg.call(this,n,t)}},jg=function(t){!t&&this.trigger("updated")},Vg=function(t,e){t.on("rendered",function(n){e.trigger("rendered",n),!t.animation.isFinished()||e[kg]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})},Wg=function(t,e){t.on("mouseover",function(t){var n=jv(t.target,Ho);n&&(!function(t,e,n){var r=le(t),i=Ro(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&Lo(r.componentMainType,r.componentIndex,n),M(o,function(t){return Co(t,e)})):(Po(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Lo(r.componentMainType,r.componentIndex,n),Co(t,e))}(n,t,e._api),qg(e))}).on("mouseout",function(t){var n=jv(t.target,Ho);n&&(!function(t,e,n){Ao(n);var r=le(t),i=Ro(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?M(i,function(t){return To(t,e)}):To(t,e)}(n,t,e._api),qg(e))}).on("click",function(t){var n=jv(t.target,function(t){return null!=le(t).dataIndex},!0);if(n){var r=n.selected?"unselect":"select",i=le(n);e._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}})},Ug=function(t,e,n,r,i){!function(t){var e=[],n=[],r=!1;if(t.eachComponent(function(t,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===t?n:e).push({zlevel:o,z:a,idx:i.componentIndex,type:t,key:s})}),r){var i,o,a=e.concat(n);Ap(a,function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel}),M(a,function(e){var n=t.getComponent(e.type,e.idx),r=e.zlevel,a=e.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)})}}(e),Gg(t,e,n,r,i),M(t._chartsViews,function(t){t.__alive=!1}),Yg(t,e,n,r,i),M(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},Gg=function(t,e,n,i,s,l){M(l||t._componentsViews,function(t){var s=t.__model;o(s,t),t.render(s,e,n,i),r(s,t),a(s,t)})},Yg=function(t,e,n,i,s,l){var u=t._scheduler;s=S(s||{},{updatedSeries:e.getSeries()}),bg.trigger("series:beforeupdate",e,n,s);var c=!1;e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,i),o(e,n),l&&l.get(e.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!e.get("silent"),function(t,e){var n=t.get("blendMode")||null;e.eachRendered(function(t){t.isGroup||(t.style.blend=n)})}(e,n),No(e)}),u.unfinished=c||u.unfinished,bg.trigger("series:layoutlabels",e,n,s),bg.trigger("series:transition",e,n,s),e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];r(e,n),a(e,n)}),function(t,e){var n=t._zr,r=n.storage,i=0;r.traverse(function(t){t.isGroup||i++}),i>e.get("hoverLayerThreshold")&&!ht.node&&!ht.worker&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}})}(t,e),bg.trigger("series:afterupdate",e,n,s)},qg=function(t){t[Ig]=!0,t.getZr().wakeUp()},Xg=function(t){t[Ig]&&(t.getZr().storage.traverse(function(t){Yo(t)||n(t)}),t[Ig]=!1)},Zg=function(t){return new(function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return e(r,n),r.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},r.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},r.prototype.enterEmphasis=function(e,n){ko(e,n),qg(t)},r.prototype.leaveEmphasis=function(e,n){Io(e,n),qg(t)},r.prototype.enterBlur=function(e){!function(t){xo(t,go)}(e),qg(t)},r.prototype.leaveBlur=function(e){Mo(e),qg(t)},r.prototype.enterSelect=function(e){Do(e),qg(t)},r.prototype.leaveSelect=function(e){Eo(e),qg(t)},r.prototype.getModel=function(){return t.getModel()},r.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},r.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},r}(kf))(t)}}(),n}(fr),$g=Jg.prototype;$g.on=Eg("on"),$g.off=Eg("off"),$g.one=function(t,e,n){var r=this;Ll(),this.on.call(this,t,function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),r.off(t,n)},n)};var ty=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function ey(t){0}var ny={},ry={},iy=[],oy=[],ay=[],sy={},ly={},uy={},cy={},hy=(new Date,new Date,"_echarts_instance_");function dy(t,e){sy[t]=e}function py(t){T(oy,t)<0&&oy.push(t)}function fy(t,e){_y(iy,t,e,2e3)}function vy(t,e){bg.on(t,e)}function gy(t,e,n){N(e)&&(n=e,e="");var r=B(t)?t.type:[t,t={event:e}][0];t.event=(t.event||r).toLowerCase(),e=t.event,ry[e]||(X(Mg.test(r)&&Mg.test(e)),ny[r]||(ny[r]={action:n,actionInfo:t}),ry[e]=r)}function yy(t,e){_y(ay,t,e,3e3,"visual")}var my=[];function _y(t,e,n,r,i){if((N(e)||B(e))&&(n=e,e=r),!(T(my,n)>=0)){my.push(n);var o=kv.wrapStageHandler(n,i);o.__prio=e,o.__raw=n,t.push(o)}}function by(t,e){ly[t]=e}var xy=function(t){var e=(t=x(t)).type;e||Rl("");var n=e.split(":");2!==n.length&&Rl("");var r=!1;"echarts"===n[0]&&(e=n[1],r=!0),t.__isBuiltIn=r,Wl.set(e,t)};yy(wg,av),yy(Sg,lv),yy(Sg,uv),yy(wg,Fv),yy(Sg,Bv),yy(7e3,function(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(t){var n=r.getItemVisual(t,"decal");n&&(r.ensureUniqueItemVisual(t,"style").decal=gg(n,e))});var i=r.getVisual("decal");if(i)r.getVisual("style").decal=gg(i,e)}})}),py(Kf),fy(900,function(t){var e=rt();t.eachSeries(function(t){var n=t.get("stack");if(n){var r=e.get(n)||e.set(n,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}}),e.each(Qf)}),by("default",function(t,e){C(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Cu,r=new Fa({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(r);var i,o=new ts({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Fa({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((i=new Oc({shape:{startAngle:-cv/2,endAngle:-cv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*cv/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*cv/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}),gy({type:io,event:io,update:io},st),gy({type:oo,event:oo,update:oo},st),gy({type:ao,event:ao,update:ao},st),gy({type:so,event:so,update:so},st),gy({type:lo,event:lo,update:lo},st),dy("light",Mv),dy("dark",Lv);var wy=[],Sy={registerPreprocessor:py,registerProcessor:fy,registerPostInit:function(t){vy("afterinit",t)},registerPostUpdate:function(t){vy("afterupdate",t)},registerUpdateLifecycle:vy,registerAction:gy,registerCoordinateSystem:function(t,e){Sh.register(t,e)},registerLayout:function(t,e){_y(ay,t,e,1e3,"layout")},registerVisual:yy,registerTransform:xy,registerLoading:by,registerMap:function(t,e,n){var r=xg["registerMap"];r&&r(t,e,n)},registerImpl:function(t,e){xg[t]=e},PRIORITY:Cg,ComponentModel:Fs,ComponentView:$f,SeriesModel:wu,ChartView:Gc,registerComponentModel:function(t){Fs.registerClass(t)},registerComponentView:function(t){$f.registerClass(t)},registerSeriesModel:function(t){wu.registerClass(t)},registerChartView:function(t){Gc.registerClass(t)},registerSubTypeDefaulter:function(t,e){Fs.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){var n;n=e,lf[t]=n}};function Cy(t){R(t)?M(t,function(t){Cy(t)}):T(wy,t)>=0||(wy.push(t),N(t)&&(t={install:t}),t.install(Sy))}var Ty=2*Math.PI,ky=Di.CMD,Iy=["top","right","bottom","left"];function My(t,e,n,r,i){var o=n.width,a=n.height;switch(t){case"top":r.set(n.x+o/2,n.y-e),i.set(0,-1);break;case"bottom":r.set(n.x+o/2,n.y+a+e),i.set(0,1);break;case"left":r.set(n.x-e,n.y+a/2),i.set(-1,0);break;case"right":r.set(n.x+o+e,n.y+a/2),i.set(1,0)}}function Dy(t,e,n,r,i,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(r-i)%Ty<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var d=r;r=Li(i),i=Li(d)}else r=Li(r),i=Li(i);r>i&&(i+=Ty);var p=Math.atan2(s,a);if(p<0&&(p+=Ty),p>=r&&p<=i||p+Ty>=r&&p+Ty<=i)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(r)+t,v=n*Math.sin(r)+e,g=n*Math.cos(i)+t,y=n*Math.sin(i)+e,m=(f-a)*(f-a)+(v-s)*(v-s),_=(g-a)*(g-a)+(y-s)*(y-s);return m<_?(l[0]=f,l[1]=v,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Ey(t,e,n,r,i,o,a,s){var l=i-t,u=o-e,c=n-t,h=r-e,d=Math.sqrt(c*c+h*h),p=(l*(c/=d)+u*(h/=d))/d;s&&(p=Math.min(Math.max(p,0),1)),p*=d;var f=a[0]=t+p*c,v=a[1]=e+p*h;return Math.sqrt((f-i)*(f-i)+(v-o)*(v-o))}function Oy(t,e,n,r,i,o,a){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r);var s=t+n,l=e+r,u=a[0]=Math.min(Math.max(i,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-i)*(u-i)+(c-o)*(c-o))}var Ay=[];function Py(t,e,n){var r=Oy(e.x,e.y,e.width,e.height,t.x,t.y,Ay);return n.set(Ay[0],Ay[1]),r}function Ly(t,e,n){for(var r,i,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,d=t.y,p=0;p<c.length;){var f=c[p++];1===p&&(s=o=c[p],l=a=c[p+1]);var v=u;switch(f){case ky.M:o=s=c[p++],a=l=c[p++];break;case ky.L:v=Ey(o,a,c[p],c[p+1],h,d,Ay,!0),o=c[p++],a=c[p++];break;case ky.C:v=_n(o,a,c[p++],c[p++],c[p++],c[p++],c[p],c[p+1],h,d,Ay),o=c[p++],a=c[p++];break;case ky.Q:v=Tn(o,a,c[p++],c[p++],c[p],c[p+1],h,d,Ay),o=c[p++],a=c[p++];break;case ky.A:var g=c[p++],y=c[p++],m=c[p++],_=c[p++],b=c[p++],x=c[p++];p+=1;var w=!!(1-c[p++]);r=Math.cos(b)*m+g,i=Math.sin(b)*_+y,p<=1&&(s=r,l=i),v=Dy(g,y,_,b,b+x,w,(h-g)*_/m+g,d,Ay),o=Math.cos(b+x)*m+g,a=Math.sin(b+x)*_+y;break;case ky.R:v=Oy(s=o=c[p++],l=a=c[p++],c[p++],c[p++],h,d,Ay);break;case ky.Z:v=Ey(o,a,s,l,h,d,Ay,!0),o=s,a=l}v<u&&(u=v,n.set(Ay[0],Ay[1]))}return u}var Ry=new Zn,Ny=new Zn,zy=new Zn,Fy=new Zn,By=new Zn;function Hy(t,e){if(t){var n=t.getTextGuideLine(),r=t.getTextContent();if(r&&n){var i=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=i.candidates||Iy,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var l=1/0,u=i.anchor,c=t.getComputedTransform(),h=c&&De([],c),d=e.get("length2")||0;u&&zy.copy(u);for(var p=0;p<a.length;p++){My(a[p],0,s,Ry,Fy),Zn.scaleAndAdd(Ny,Ry,Fy,d),Ny.transform(h);var f=t.getBoundingRect(),v=u?u.distance(Ny):t instanceof Qi?Ly(Ny,t.path,zy):Py(Ny,f,zy);v<l&&(l=v,Ny.transform(c),zy.transform(c),zy.toArray(o[0]),Ny.toArray(o[1]),Ry.toArray(o[2]))}!function(t,e){if(!(e<=180&&e>0))return;e=e/180*Math.PI,Ry.fromArray(t[0]),Ny.fromArray(t[1]),zy.fromArray(t[2]),Zn.sub(Fy,Ry,Ny),Zn.sub(By,zy,Ny);var n=Fy.len(),r=By.len();if(n<.001||r<.001)return;Fy.scale(1/n),By.scale(1/r);var i=Fy.dot(By);if(Math.cos(e)<i){var o=Ey(Ny.x,Ny.y,zy.x,zy.y,Ry.x,Ry.y,jy,!1);Vy.fromArray(jy),Vy.scaleAndAdd(By,o/Math.tan(Math.PI-e));var a=zy.x!==Ny.x?(Vy.x-Ny.x)/(zy.x-Ny.x):(Vy.y-Ny.y)/(zy.y-Ny.y);if(isNaN(a))return;a<0?Zn.copy(Vy,Ny):a>1&&Zn.copy(Vy,zy),Vy.toArray(t[1])}}(o,e.get("minTurnAngle")),n.setShape({points:o})}}}var jy=[],Vy=new Zn;function Wy(t,e,n,r){var i="normal"===n,o=i?t:t.ensureState(n);o.ignore=e;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?t.useStyle(s):o.style=s}function Uy(t,e){var n=e.smooth,r=e.points;if(r)if(t.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Fe(r[0],r[1]),o=Fe(r[1],r[2]);if(!i||!o)return t.lineTo(r[1][0],r[1][1]),void t.lineTo(r[2][0],r[2][1]);var a=Math.min(i,o)*n,s=He([],r[1],r[0],a/i),l=He([],r[1],r[2],a/o),u=He([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c<r.length;c++)t.lineTo(r[c][0],r[c][1])}var Gy=Math.min,Yy=Math.max,Zy=Math.abs,qy=[0,0],Xy=[0,0],Ky=hr(),Qy=Ky.minTv,Jy=Ky.maxTv,$y=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Zn;for(n=0;n<2;n++)this._axes[n]=new Zn;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,i=t.x,o=t.y,a=i+t.width,s=o+t.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),e)for(var l=0;l<4;l++)n[l].transform(e);Zn.sub(r[0],n[1],n[0]),Zn.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},t.prototype.intersect=function(t,e,n){var r=!0,i=!e;return e&&Zn.set(e,0,0),Ky.reset(n,!i),!this._intersectCheckOneSide(this,t,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(t,this,i,-1)&&(r=!1,i)||i||Ky.negativeSize||Zn.copy(e,r?Ky.useDir?Ky.dirMinTv:Qy:Jy),r},t.prototype._intersectCheckOneSide=function(t,e,n,r){for(var i=!0,o=0;o<2;o++){var a=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,qy),t._getProjMinMaxOnAxis(o,e._corners,Xy),Ky.negativeSize||qy[1]<Xy[0]||qy[0]>Xy[1]){if(i=!1,Ky.negativeSize||n)return i;var s=Zy(Xy[0]-qy[1]),l=Zy(qy[0]-Xy[1]);Gy(s,l)>Jy.len()&&(s<l?Zn.scale(Jy,a,-s*r):Zn.scale(Jy,a,l*r))}else if(!n){s=Zy(Xy[0]-qy[1]),l=Zy(qy[0]-Xy[1]);(Ky.useDir||Gy(s,l)<Qy.len())&&((s<l||!Ky.bidirectional)&&(Zn.scale(Qy,a,s*r),Ky.useDir&&Ky.calcDirMTV()),(s>=l||!Ky.bidirectional)&&(Zn.scale(Qy,a,-l*r),Ky.useDir&&Ky.calcDirMTV()))}}return i},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var r=this._axes[t],i=this._origin,o=e[0].dot(r)+i[t],a=o,s=o,l=1;l<e.length;l++){var u=e[l].dot(r)+i[t];a=Gy(u,a),s=Yy(u,s)}n[0]=a+Ky.touchThreshold,n[1]=s-Ky.touchThreshold,Ky.negativeSize=n[1]<n[0]},t}();const tm=$y;function em(t,e,n,r,i,o){var a=t.length;if(!(a<2)){t.sort(function(t,n){return t.rect[e]-n.rect[e]});for(var s,l=0,u=!1,c=[],h=0,d=0;d<a;d++){var p=t[d],f=p.rect;(s=f[e]-l)<0&&(f[e]-=s,p.label[e]-=s,u=!0);var v=Math.max(-s,0);c.push(v),h+=v,l=f[e]+f[n]}h>0&&o&&w(-h/a,0,a);var g,y,m=t[0],_=t[a-1];return b(),g<0&&S(-g,.8),y<0&&S(y,.8),b(),x(g,y,1),x(y,g,-1),b(),g<0&&C(-g),y<0&&C(y),u}function b(){g=m.rect[e]-r,y=i-_.rect[e]-_.rect[n]}function x(t,e,n){if(t<0){var r=Math.min(e,-t);if(r>0){w(r*n,0,a);var i=r+t;i<0&&S(-i*n,1)}else S(-t*n,1)}}function w(n,r,i){0!==n&&(u=!0);for(var o=r;o<i;o++){var a=t[o];a.rect[e]+=n,a.label[e]+=n}}function S(r,i){for(var o=[],s=0,l=1;l<a;l++){var u=t[l-1].rect,c=Math.max(t[l].rect[e]-u[e]-u[n],0);o.push(c),s+=c}if(s){var h=Math.min(Math.abs(r)/s,i);if(r>0)for(l=0;l<a-1;l++){w(o[l]*h,0,l+1)}else for(l=a-1;l>0;l--){w(-(o[l-1]*h),l,a)}}}function C(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),r=0;r<a-1;r++)if(e>0?w(n,0,r+1):w(-n,a-r-1,a),(t-=n)<=0)return}}function nm(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}function rm(t,e){var n=t.label,r=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:nm(r&&r.shape.points)}}var im=["align","verticalAlign","width","height","fontSize"],om=new $e,am=Bt(),sm=Bt();function lm(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];null!=e[i]&&(t[i]=e[i])}}var um=["x","y","rotation"];const cm=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,r,i){var o=r.style,a=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),l=r.getBoundingRect().plain();dr.applyTransform(l,l,s),s?om.setLocalTransform(s):(om.x=om.y=om.rotation=om.originX=om.originY=0,om.scaleX=om.scaleY=1),om.rotation=Li(om.rotation);var u,c=r.__hostTarget;if(c){u=c.getBoundingRect().plain();var h=c.getComputedTransform();dr.applyTransform(u,u,h)}var d=u&&c.getTextGuideLine();this._labelList.push({label:r,labelLine:d,seriesModel:n,dataIndex:t,dataType:e,layoutOption:i,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:d&&d.ignore,x:om.x,y:om.y,scaleX:om.scaleX,scaleY:om.scaleY,rotation:om.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:r.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,r=n.get("labelLayout");(N(r)||A(r).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var i=t.getTextContent(),o=le(t);i&&!i.disableLabelLayout&&e._addLabel(o.dataIndex,o.dataType,n,i,r)})},t.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function r(t,e){return function(){Hy(t,e)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],a=o.label,s=a.__hostTarget,l=o.defaultAttr,u=void 0;u=(u=N(o.layoutOption)?o.layoutOption(rm(o,s)):o.layoutOption)||{},o.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:l.attachedPos,rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var h=!1;if(null!=u.x?(a.x=dt(u.x,e),a.setStyle("x",0),h=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=dt(u.y,n),a.setStyle("y",0),h=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var d=s.getTextGuideLine();d&&(d.setShape({points:u.labelLinePoints}),h=!1)}am(a).needsUpdateLabelLine=h,a.rotation=null!=u.rotate?u.rotate*c:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var p=0;p<im.length;p++){var f=im[p];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var v=o.seriesModel;if(null!=o.dataIndex)v=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);a.on("drag",r(s,v.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},t.prototype.layout=function(t){var e,n=t.getWidth(),r=t.getHeight(),i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new tm(a,o):null;e.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return e}(this._labelList),o=O(i,function(t){return"shiftX"===t.layoutOption.moveOverlap}),a=O(i,function(t){return"shiftY"===t.layoutOption.moveOverlap});em(o,"x","width",0,n,e),function(t,e,n,r){em(t,"y","height",e,n,r)}(a,0,r),function(t){var e=[];t.sort(function(t,e){return e.priority-t.priority});var n=new dr(0,0,0,0);function r(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var i=0;i<t.length;i++){var o=t[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var h=o.obb,d=!1,p=0;p<e.length;p++){var f=e[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){d=!0;break}if(f.obb||(f.obb=new tm(f.localRect,f.transform)),h||(h=new tm(s,l)),h.intersect(f.obb)){d=!0;break}}}d?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),e.push(o))}}(O(i,function(t){return t.layoutOption.hideOverlap}))},t.prototype.processLabelsOverall=function(){var t=this;M(this._chartViewList,function(e){var n=e.__model,r=e.ignoreLabelLineUpdate,i=n.isAnimationEnabled();e.group.traverse(function(e){if(e.ignore&&!e.forceLabelAnimation)return!0;var o=!r,a=e.getTextContent();!o&&a&&(o=am(a).needsUpdateLabelLine),o&&t._updateLabelLine(e,n),i&&t._animateLabels(e,n)})})},t.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),r=le(t),i=r.dataIndex;if(n&&null!=i){var o=e.getData(r.dataType),a=o.getItemModel(i),s={},l=o.getItemVisual(i,"style");if(l){var u=o.getVisual("drawType");s.stroke=l[u]}var c=a.getModel("labelLine");!function(t,e,n){var r=t.getTextGuideLine(),i=t.getTextContent();if(i){for(var o=e.normal,a=o.get("show"),s=i.ignore,l=0;l<ro.length;l++){var u=ro[l],c=e[u],h="normal"===u;if(c){var d=c.get("show");if((h?s:G(i.states[u]&&i.states[u].ignore,s))||!G(d,a)){var p=h?r:r&&r.states[u];p&&(p.ignore=!0);continue}r||(r=new _c,t.setTextGuideLine(r),h||!s&&a||Wy(r,!0,"normal",e.normal),t.stateProxy&&(r.stateProxy=t.stateProxy)),Wy(r,!1,u,c)}}if(r){C(r.style,n),r.style.fill=null;var f=o.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=f||!1,r.buildPath=Uy}}else r&&t.removeTextGuideLine()}(t,function(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},r=0;r<no.length;r++){var i=no[r];n[i]=t.getModel([i,e])}return n}(a),s),Hy(t,c)}},t.prototype._animateLabels=function(t,e){var n=t.getTextContent(),r=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!Yo(t))){var i=(p=am(n)).oldLayout,o=le(t),a=o.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},l=e.getData(o.dataType);if(i){n.attr(i);var u=t.prevStates;u&&(T(u,"select")>=0&&n.attr(p.oldLayoutSelect),T(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),Uo(n,s,e,a)}else if(n.attr(s),!ea(n).valueAnimation){var c=G(n.style.opacity,1);n.style.opacity=0,Go(n,{style:{opacity:c}},e,a)}if(p.oldLayout=s,n.states.select){var h=p.oldLayoutSelect={};lm(h,s,um),lm(h,n.states.select,um)}if(n.states.emphasis){var d=p.oldLayoutEmphasis={};lm(d,s,um),lm(d,n.states.emphasis,um)}na(n,a,l,e,e)}if(r&&!r.ignore&&!r.invisible){i=(p=sm(r)).oldLayout;var p,f={points:r.shape.points};i?(r.attr({shape:i}),Uo(r,{shape:f},e)):(r.setShape(f),r.style.strokePercent=0,Go(r,{style:{strokePercent:1}},e)),p.oldLayout=f}},t}();var hm=Bt();function dm(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var r=hm(e).labelManager;r||(r=hm(e).labelManager=new cm),r.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var r=hm(e).labelManager;n.updatedSeries.forEach(function(t){r.addLabelsOfSeries(e.getViewOfSeriesModel(t))}),r.updateLayoutConfig(e),r.layout(e),r.processLabelsOverall()})}function pm(t,e,n){var r=a.createCanvas(),i=e.getWidth(),o=e.getHeight(),s=r.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=i+"px",s.height=o+"px",r.setAttribute("data-zr-dom-id",t)),r.width=i*n,r.height=o*n,r}Cy(dm);var fm=function(t){function n(e,n,r){var i,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||Ir,"string"==typeof e?i=pm(e,n,r):B(e)&&(e=(i=e).id),o.id=e,o.dom=i;var a=i.style;return a&&(ot(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return e(n,t),n.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},n.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},n.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},n.prototype.setUnpainted=function(){this.__firstTimePaint=!0},n.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=pm("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},n.prototype.createRepaintRects=function(t,e,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new dr(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new dr(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(t)){var h=new dr(0,0,0,0);h.copy(c),h.union(t),o[u]=h,n=!0;break}if(s){l.copy(t),l.union(c);var d=t.width*t.height,p=c.width*c.height,f=l.width*l.height-d-p;f<r&&(r=f,i=u)}}if(s&&(o[i].union(t),n=!0),!n)(e=new dr(0,0,0,0)).copy(t),o.push(e);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(p=t[c]){var h=p.shouldBePainted(n,r,!0,!0);(f=p.__isRendered&&(1&p.__dirty||!h)?p.getPrevPaintRect():null)&&u(f);var d=h&&(1&p.__dirty||!p.__isRendered)?p.getPaintRect():null;d&&u(d)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p,f;h=(p=e[c])&&p.shouldBePainted(n,r,!0,!0);if(p&&(!h||!p.__zr)&&p.__isRendered)(f=p.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var v=c+1;v<o.length;)o[c].intersect(o[v])?(i=!0,o[c].union(o[v]),o.splice(v,1)):v++;c++}}while(i);return this._paintRects=o,o},n.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},n.prototype.resize=function(t,e){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=t+"px",i.height=e+"px"),r.width=t*n,r.height=e*n,o&&(o.width=t*n,o.height=e*n,1!==n&&this.ctxBack.scale(n,n))},n.prototype.clear=function(t,e,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;e=e||this.clearColor;var s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var h=this.domBack;function d(t,n,r,o){if(i.clearRect(t,n,r,o),e&&"transparent"!==e){var a=void 0;if(W(e))a=(e.global||e.__width===r&&e.__height===o)&&e.__canvasGradient||Zv(i,e,{x:0,y:0,width:r,height:o}),e.__canvasGradient=a,e.__width=r,e.__height=o;else null!=e.image&&(e.scaleX=e.scaleX||u,e.scaleY=e.scaleY||u,a=rg(i,e,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));i.save(),i.fillStyle=a||e,i.fillRect(t,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(h,t,n,r,o),i.restore())}!n||s?d(0,0,o,a):n.length&&M(n,function(t){d(t.x*u,t.y*u,t.width*u,t.height*u)})},n}(fr);const vm=fm;var gm=1e5,ym=314159,mm=.01;var _m=function(){function t(t,e,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=S({},n||{}),this.dpr=n.devicePixelRatio||Ir,this._singleCanvas=i,this.root=t,t.style&&(ot(t),t.innerHTML=""),this.storage=e;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=t,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new vm(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=ym,o.push(ym),this._domRoot=t}else{this._width=Xv(t,0,n),this._height=Xv(t,1,n);var h=this._domRoot=function(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);t.appendChild(h)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<e;o++){var a=t[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(gm)),r||(r=n.ctx).save(),dg(r,a,i,o===e-1))}r&&r.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(gm)},t.prototype.paintOne=function(t,e){hg(t,e)},t.prototype._paintList=function(t,e,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer(function(t){t.afterBrush&&t.afterBrush()});else{var s=this;Fp(function(){s._paintList(t,e,n,r)})}}},t.prototype._compositeManually=function(){var t=this.getLayer(ym).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(r){r.virtual&&t.drawImage(r.dom,0,0,e,n)})},t.prototype._doPaintList=function(t,e,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,h=function(a){var s,l=i[a],h=l.ctx,p=o&&l.createRepaintRects(t,e,d._width,d._height),f=n?l.__startIndex:l.__drawIndex,v=!n&&l.incremental&&Date.now,g=v&&Date.now(),y=l.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,y,p);else if(f===l.__startIndex){var m=t[f];m.incremental&&m.notClear&&!n||l.clear(!1,y,p)}-1===f&&(f=l.__startIndex);var _=function(e){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=t[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,e,n,s===l.__endIndex-1),v)if(Date.now()-g>15)break}n.prevElClipPaths&&h.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var b=d.dpr,x=0;x<p.length;++x){var w=p[x];h.save(),h.beginPath(),h.rect(w.x*b,w.y*b,w.width*b,w.height*b),h.clip(),_(w),h.restore()}else h.save(),_(),h.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},d=this,p=0;p<i.length;p++)h(p);return ht.wxa&&M(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:u,needsRefreshHover:c}},t.prototype._doPaintEl=function(t,e,n,r,i,o){var a=e.ctx;if(n){var s=t.getPaintRect();(!r||s&&s.intersect(r))&&(dg(a,t,i,o),t.setPrevPaintRect(s))}else dg(a,t,i,o)},t.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ym);var n=this._layers[t];return n||((n=new vm("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?w(n,this._layerConfig[t],!0):this._layerConfig[t-mm]&&w(n,this._layerConfig[t-mm],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},t.prototype.insertLayer=function(t,e){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(i>0&&t>r[0]){for(s=0;s<i-1&&!(r[s]<t&&r[s+1]>t);s++);a=n[r[s]]}if(r.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];t.call(e,this._layers[i],i)}},t.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&t.call(e,o,i)}},t.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||t.call(e,o,i)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((s=t[n]).zlevel!==t[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<t.length;i++){var s,l=(s=t[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?mm:0),this._needsManuallyCompositing),u.__builtin__||b("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,e(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,M(this._layers,function(t){t.setUnpainted()})},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?w(n[t],e,!0):n[t]=e;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===t||i===t+mm)w(this._layers[i],n[t],!0)}}},t.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,r=e[t];r&&(r.dom.parentNode.removeChild(r.dom),delete e[t],n.splice(T(n,t),1))},t.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=Xv(i,0,r),e=Xv(i,1,r),n.style.display="",this._width!==t||e!==this._height){for(var o in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(ym).resize(t,e)}return this},t.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new vm("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,i=e.dom.height;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,r,i):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];dg(n,u,o,s===l-1)}return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();const bm=_m;var xm=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return e(n,t),n.prototype.init=function(e,n,r){t.prototype.init.call(this,e,n,r),this._sourceManager=new ou(this),au(this)},n.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),au(this)},n.prototype.optionUpdated=function(){this._sourceManager.dirty()},n.prototype.getSourceManager=function(){return this._sourceManager},n.type="dataset",n.defaultOption={seriesLayoutBy:Xs},n}(Fs),wm=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return e(n,t),n.type="dataset",n}($f);Cy([function(t){t.registerPainter("canvas",bm)},function(t){t.registerComponentModel(xm),t.registerComponentView(wm)}]);Cy(dm),function(t){var e=wu.extend(t);wu.registerClass(e)}({type:"series.liquidFill",optionUpdated:function(){var t=this.option;t.gridSize=Math.max(Math.floor(t.gridSize),4)},getInitialData:function(t,e){var n=bh(t.data,{coordDimensions:["value"]}).dimensions,r=new _h(n,this);return r.initData(t.data),r},defaultOption:{color:["#294D99","#156ACF","#1598ED","#45BDFF"],center:["50%","50%"],radius:"50%",amplitude:"8%",waveLength:"80%",phase:"auto",period:"auto",direction:"right",shape:"circle",waveAnimation:!0,animationEasing:"linear",animationEasingUpdate:"linear",animationDuration:2e3,animationDurationUpdate:1e3,outline:{show:!0,borderDistance:8,itemStyle:{color:"none",borderColor:"#294D99",borderWidth:8,shadowBlur:20,shadowColor:"rgba(0, 0, 0, 0.25)"}},backgroundStyle:{color:"#E3F7FF"},itemStyle:{opacity:.95,shadowBlur:50,shadowColor:"rgba(0, 0, 0, 0.4)"},label:{show:!0,color:"#294D99",insideColor:"#fff",fontSize:50,fontWeight:"bold",align:"center",baseline:"middle",position:"inside"},emphasis:{itemStyle:{opacity:.8}}}});const Sm=(Cm={type:"ec-liquid-fill",shape:{waveLength:0,radius:0,radiusY:0,cx:0,cy:0,waterLevel:0,amplitude:0,phase:0,inverse:!1},buildPath:function(t,e){null==e.radiusY&&(e.radiusY=e.radius);for(var n=Math.max(2*Math.ceil(2*e.radius/e.waveLength*4),8);e.phase<2*-Math.PI;)e.phase+=2*Math.PI;for(;e.phase>0;)e.phase-=2*Math.PI;var r=e.phase/Math.PI/2*e.waveLength,i=e.cx-e.radius+r-2*e.radius;t.moveTo(i,e.waterLevel);for(var o=0,a=0;a<n;++a){var s=a%4,l=Tm(a*e.waveLength/4,s,e.waveLength,e.amplitude);t.bezierCurveTo(l[0][0]+i,-l[0][1]+e.waterLevel,l[1][0]+i,-l[1][1]+e.waterLevel,l[2][0]+i,-l[2][1]+e.waterLevel),a===n-1&&(o=l[2][0])}e.inverse?(t.lineTo(o+i,e.cy-e.radiusY),t.lineTo(i,e.cy-e.radiusY),t.lineTo(i,e.waterLevel)):(t.lineTo(o+i,e.cy+e.radiusY),t.lineTo(i,e.cy+e.radiusY),t.lineTo(i,e.waterLevel)),t.closePath()}},Qi.extend(Cm));var Cm;function Tm(t,e,n,r){return 0===e?[[t+.5*n/Math.PI/2,r/2],[t+.5*n/Math.PI,r],[t+n/4,r]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),r],[t+.5*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-r/2],[t+.5*n/Math.PI,-r],[t+n/4,-r]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-r],[t+.5*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]}var km=dt;function Im(t){return t&&0===t.indexOf("path://")}!function(t){var e=Gc.extend(t);Gc.registerClass(e)}({type:"liquidFill",render:function(t,e,n){var r=this,i=this.group;i.removeAll();var o=t.getData(),a=o.getItemModel(0),s=a.get("center"),l=a.get("radius"),u=n.getWidth(),c=n.getHeight(),h=Math.min(u,c),d=0,p=0,f=t.get("outline.show");f&&(d=t.get("outline.borderDistance"),p=km(t.get("outline.itemStyle.borderWidth"),h));var v,g,y,m=km(s[0],u),_=km(s[1],c),b=!1,x=t.get("shape");("container"===x?(b=!0,g=[(v=[u/2,c/2])[0]-p/2,v[1]-p/2],y=[km(d,u),km(d,c)],l=[Math.max(g[0]-y[0],0),Math.max(g[1]-y[1],0)]):(g=(v=km(l,h)/2)-p/2,y=km(d,h),l=Math.max(g-y,0)),f)&&(M().style.lineWidth=p,i.add(M()));var w=b?0:m-l,S=b?0:_-l,C=null;i.add(function(){var e=I(l);e.setStyle(t.getModel("backgroundStyle").getItemStyle()),e.style.fill=null,e.z2=5;var n=I(l);n.setStyle(t.getModel("backgroundStyle").getItemStyle()),n.style.stroke=null;var r=new Cu;return r.add(e),r.add(n),r}());var T=this._data,k=[];function I(t,e){if(x){if(Im(x)){var n=Lc(x.slice(7),{}),r=n.getBoundingRect(),i=r.width,o=r.height;i>o?(o*=2*t/i,i=2*t):(i*=2*t/o,o=2*t);var a=e?0:m-i/2,s=e?0:_-o/2;return n=Lc(x.slice(7),{},new dr(a,s,i,o)),e&&(n.x=-i/2,n.y=-o/2),n}if(b)return Qd("rect",e?-t[0]:m-t[0],l=e?-t[1]:_-t[1],2*t[0],2*t[1]);var l=e?-t:_-t;return"pin"===x?l+=t:"arrow"===x&&(l-=t),Qd(x,e?-t:m-t,l,2*t,2*t)}return new Uu({shape:{cx:e?0:m,cy:e?0:_,r:t}})}function M(){var e=I(v);return e.style.fill=null,e.setStyle(t.getModel("outline.itemStyle").getItemStyle()),e}function D(e,n,r){var i=b?l[0]:l,a=b?c/2:l,s=o.getItemModel(e),u=s.getModel("itemStyle"),h=s.get("phase"),d=km(s.get("amplitude"),2*a),p=km(s.get("waveLength"),2*i),f=a-o.get("value",e)*a*2;h=r?r.shape.phase:"auto"===h?e*Math.PI/4:h;var v=u.getItemStyle();if(!v.fill){var g=t.get("color"),y=e%g.length;v.fill=g[y]}var x=new Sm({shape:{waveLength:p,radius:i,radiusY:a,cx:2*i,cy:0,waterLevel:f,amplitude:d,phase:h,inverse:n},style:v,x:m,y:_});x.shape._waterLevel=f;var w=s.getModel("emphasis.itemStyle").getItemStyle();w.lineWidth=0,x.ensureState("emphasis").style=w,Fo(x);var S=I(l,!0);return S.setStyle({fill:"white"}),x.setClipPath(S),x}function E(t,e,n){var r=o.getItemModel(t),i=r.get("period"),a=r.get("direction"),s=o.get("value",t),l=r.get("phase");l=n?n.shape.phase:"auto"===l?t*Math.PI/4:l;var u=0;u="auto"===i?function(e){var n=o.count();return 0===n?e:e*(.2+(n-t)/n*.8)}(5e3):"function"==typeof i?i(s,t):i;var c=0;"right"===a||null==a?c=Math.PI:"left"===a?c=-Math.PI:"none"===a&&(c=0),"none"!==a&&r.get("waveAnimation")&&e.animate("shape",!0).when(0,{phase:l}).when(u/2,{phase:c+l}).when(u,{phase:2*c+l}).during(function(){C&&C.dirty(!0)}).start()}o.diff(T).add(function(e){var n=D(e,!1),r=n.shape.waterLevel;n.shape.waterLevel=b?c/2:l,Go(n,{shape:{waterLevel:r}},t),n.z2=2,E(e,n,null),i.add(n),o.setItemGraphicEl(e,n),k.push(n)}).update(function(e,n){for(var a=T.getItemGraphicEl(n),s=D(e,!1,a),l={},u=["amplitude","cx","cy","phase","radius","radiusY","waterLevel","waveLength"],h=0;h<u.length;++h){var d=u[h];s.shape.hasOwnProperty(d)&&(l[d]=s.shape[d])}var p={},f=["fill","opacity","shadowBlur","shadowColor"];for(h=0;h<f.length;++h){d=f[h];s.style.hasOwnProperty(d)&&(p[d]=s.style[d])}b&&(l.radiusY=c/2),Uo(a,{shape:l,x:s.x,y:s.y},t),t.isUniversalTransitionEnabled&&t.isUniversalTransitionEnabled()?Uo(a,{style:p},t):a.useStyle(p);var v=a.getClipPath(),g=s.getClipPath();a.setClipPath(s.getClipPath()),a.shape.inverse=s.inverse,v&&g&&r._shape===x&&!Im(x)&&Uo(g,{shape:v.shape},t,{isFrom:!0}),E(e,a,a),i.add(a),o.setItemGraphicEl(e,a),k.push(a)}).remove(function(t){var e=T.getItemGraphicEl(t);i.remove(e)}).execute(),a.get("label.show")&&i.add(function(e){var n=a.getModel("label");function r(){var e=t.getFormattedLabel(0,"normal"),n=100*o.get("value",0),r=o.getName(0)||t.name;return isNaN(n)||(r=n.toFixed(0)+"%"),e??r}var i={z2:10,shape:{x:w,y:S,width:2*(b?l[0]:l),height:2*(b?l[1]:l)},style:{fill:"transparent"},textConfig:{position:n.get("position")||"inside"},silent:!0},s={style:{text:r(),textAlign:n.get("align"),textVerticalAlign:n.get("baseline")}};Object.assign(s.style,function(t,e){return Ko(t,null,null,"normal"!==(e=e||{}).state)}(n));var u=new Fa(i),c=new Fa(i);c.disableLabelAnimation=!0,u.disableLabelAnimation=!0;var h=new ts(s),d=new ts(s);u.setTextContent(h),c.setTextContent(d);var p=n.get("insideColor");d.style.fill=p;var f=new Cu;f.add(u),f.add(c);var v=I(l,!0);return C=new tp({shape:{paths:e},x:m,y:_}),C.setClipPath(v),c.setClipPath(C),f}(k)),this._shape=x,this._data=o},dispose:function(){}})},163(t){t.exports=require("echarts/components")},348(t){t.exports=require("echarts/core")},613(t){t.exports=require("echarts/renderers")},15(t){t.exports=require("react")}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{AnnotationPresets:()=>Fe,BarChart:()=>M.default,BaseChart:()=>T,BoxplotChart:()=>X,CandlestickChart:()=>W,DataFilter:()=>ut,EnhancedThemeEditor:()=>se,ErrorBoundary:()=>he,FunnelChart:()=>L.default,GaugeChart:()=>P.default,GraphChart:()=>H,H5Adapter:()=>Dt.default,HeatmapChart:()=>A.default,LazyChartRegistry:()=>Pe,LineChart:()=>I.default,LiquidChart:()=>Ct,PRESET_THEMES:()=>$t,ParallelChart:()=>J,PieChart:()=>D.default,RadarChart:()=>O.default,SankeyChart:()=>z.default,ScatterChart:()=>E.default,SunburstChart:()=>N.default,ThemeEditor:()=>re,TreeChart:()=>Mt,TreeMapChart:()=>R.default,WeappAdapter:()=>Et.default,WordCloudChart:()=>Y,buildHierarchy:()=>vt,canDrillDown:()=>ft,convertAnnotationToMarkArea:()=>Re,convertAnnotationToMarkLine:()=>Le,convertAnnotationToScatter:()=>Ne,createCategoryDrillDown:()=>yt,createCompositeAnnotation:()=>Be,createDrillDown:()=>pt,createLazyChart:()=>Ae,createRegionDrillDown:()=>gt,darkTheme:()=>Lt,debounce:()=>k.sg,deepMerge:()=>k.$N,defaultTheme:()=>Pt,detectPlatform:()=>mt.li,events:()=>k.AZ,exportChart:()=>Ye,formatNumber:()=>k.ZV,getAdapter:()=>mt.cK,getContrastColor:()=>k.w5,getDarkThemes:()=>Kt,getEnv:()=>mt._$,getEnvironment:()=>k.uc,getLightThemes:()=>Xt,getRegisteredThemes:()=>Gt,getTheme:()=>Wt,getThemeByName:()=>Yt,getThemesByTag:()=>qt,name:()=>kn,prefixedId:()=>k.t2,preloadAllCharts:()=>Oe,preloadChart:()=>Ee,registerTheme:()=>Ut,shortId:()=>k.m_,switchTheme:()=>Zt,themeManager:()=>te,throttle:()=>k.nF,useAnnotation:()=>ze,useChart:()=>pn,useChartConnect:()=>qe,useChartData:()=>_n,useChartDownload:()=>nn,useChartTheme:()=>mn,useChartTools:()=>Tn,useDataPolling:()=>wn,useDataTransform:()=>an,useDataZoom:()=>Ze,useEvents:()=>gn,useExport:()=>Cn,useFullscreen:()=>Sn,useLoading:()=>yn,useOption:()=>fn,useResize:()=>vn,useResponsive:()=>bn,useTableTransform:()=>sn,useThemeSwitcher:()=>xn,useTimeSeriesTransform:()=>ln,uuid:()=>k.uR,version:()=>In,withErrorBoundary:()=>de,withLazyLoad:()=>De});var i,o=n(15),a=n.n(o),s=n(251),l={};function u(t){return l[t]}!function(t){t.PANEL_SHOW="debugPanelShow",t.PANEL_HIDE="debugPanelHide",t.TAB_CHANGE="debugPanelTabChange",t.INFO_UPDATE="debugPanelInfoUpdate"}(i||(i={}));var c=function(){return c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},c.apply(this,arguments)},h=function(t){var e=t.debugInfo,n=t.options,r=void 0===n?{}:n,s=t.onEvent,l=(0,o.useState)(r.autoExpand||!1),u=l[0],h=l[1],p=(0,o.useState)(r.defaultTab||"instance"),f=p[0],v=p[1],g=(0,o.useRef)(null),y=r.position,m=void 0===y?"bottom-right":y,_=r.width,b=void 0===_?400:_,x=r.height,w=void 0===x?300:x,S=function(t){v(t),null==s||s({type:i.TAB_CHANGE,data:{tab:t}})},C=function(){var t=e.instance;return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"图表实例信息"),a().createElement("div",{style:d.debugInfoGrid},a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"ID:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.id)||"N/A")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"类型:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.type)||"N/A")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"版本:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.version)||"N/A")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"渲染器:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.renderer)||"N/A")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"宽度:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.width)||"N/A","px")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"高度:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.height)||"N/A","px")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"平台:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.platform)||"N/A"))))},T=function(){var t=e.config;return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"配置信息"),a().createElement("div",{style:d.debugConfig},a().createElement("pre",{style:d.pre},JSON.stringify(t,null,2))))},k=function(){var t,n,r=e.data;return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"数据信息"),a().createElement("div",{style:d.debugInfoGrid},a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"系列数量:"),a().createElement("span",{style:d.debugInfoValue},(null===(t=null==r?void 0:r.series)||void 0===t?void 0:t.length)||0)),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"总数据量:"),a().createElement("span",{style:d.debugInfoValue},(null==r?void 0:r.totalDataCount)||0)),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"当前数据量:"),a().createElement("span",{style:d.debugInfoValue},(null==r?void 0:r.currentDataCount)||0))),a().createElement("div",{style:d.debugDataSeries},a().createElement("h4",{style:d.h4},"系列数据"),null===(n=null==r?void 0:r.series)||void 0===n?void 0:n.map(function(t,e){var n,r;return a().createElement("div",{key:e,style:d.debugDataSeriesItem},a().createElement("h5",{style:d.h5},"系列 ",e+1,": ",t.name||"未命名"),a().createElement("pre",{style:d.pre},JSON.stringify(null===(n=t.data)||void 0===n?void 0:n.slice(0,5),null,2),"..."),a().createElement("div",{style:d.debugSeriesInfo},a().createElement("span",null,"数据量: ",(null===(r=t.data)||void 0===r?void 0:r.length)||0)))})))},I=function(){var t=e.performance;return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"性能信息"),a().createElement("div",{style:d.debugInfoGrid},a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"初始化时间:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.initTime)||0,"ms")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"渲染时间:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.renderTime)||0,"ms")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"更新时间:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.updateTime)||0,"ms")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"数据大小:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.dataSize)||0," bytes")),a().createElement("div",{style:d.debugInfoItem},a().createElement("span",{style:d.debugInfoLabel},"帧率:"),a().createElement("span",{style:d.debugInfoValue},(null==t?void 0:t.frameRate)||0," FPS"))),a().createElement("div",{style:d.debugPerformanceChart}))},M=function(){var t=e.events;return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"事件信息"),a().createElement("div",{style:d.debugEventsList},null==t?void 0:t.slice().reverse().map(function(t,e){return a().createElement("div",{key:e,style:d.debugEventItem},a().createElement("div",{style:d.debugEventHeader},a().createElement("span",{style:d.debugEventType},t.type),a().createElement("span",{style:d.debugEventTime},new Date(t.timestamp).toLocaleTimeString())),a().createElement("div",{style:d.debugEventParams},a().createElement("pre",{style:d.pre},JSON.stringify(t.params,null,2))))}),(!t||0===t.length)&&a().createElement("div",{style:d.debugEmptyState},"暂无事件记录")))},D=function(){var t=e.errors;return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"错误信息"),a().createElement("div",{style:d.debugErrorsList},null==t?void 0:t.slice().reverse().map(function(t,e){return a().createElement("div",{key:e,style:d.debugErrorItem},a().createElement("div",{style:d.debugErrorHeader},a().createElement("span",{style:d.debugErrorType},t.type),a().createElement("span",{style:d.debugErrorTime},new Date(t.timestamp).toLocaleTimeString())),a().createElement("div",{style:d.debugErrorMessage},t.message),t.stack&&a().createElement("div",{style:d.debugErrorStack},a().createElement("pre",{style:d.pre},t.stack)))}),(!t||0===t.length)&&a().createElement("div",{style:d.debugEmptyState},"暂无错误记录")))},E=function(){return a().createElement("div",{style:d.debugPanelContent},a().createElement("h3",{style:d.h3},"调试工具"),a().createElement("div",{style:d.debugToolsGrid},a().createElement("button",{style:d.debugToolButton},"导出配置"),a().createElement("button",{style:d.debugToolButton},"导出数据"),a().createElement("button",{style:d.debugToolButton},"刷新图表"),a().createElement("button",{style:d.debugToolButton},"清空数据"),a().createElement("button",{style:d.debugToolButton},"性能分析"),a().createElement("button",{style:d.debugToolButton},"重置图表")))},O=c(c(c(c(c(c({position:"fixed",zIndex:9999,backgroundColor:"rgba(255, 255, 255, 0.95)",border:"1px solid #e0e0e0",borderRadius:"4px",boxShadow:"0 2px 12px 0 rgba(0, 0, 0, 0.1)",fontFamily:"monospace",fontSize:"12px",overflow:"hidden"},"top-left"===m&&{top:"10px",left:"10px"}),"top-right"===m&&{top:"10px",right:"10px"}),"bottom-left"===m&&{bottom:"10px",left:"10px"}),"bottom-right"===m&&{bottom:"10px",right:"10px"}),u&&{width:b,height:w}),d.tarovizDebugPanel);return a().createElement("div",{ref:g,style:O},a().createElement("div",{style:d.debugPanelHeader},a().createElement("div",{style:d.debugPanelTitle},a().createElement("span",{style:d.debugPanelLogo},"🐛"),a().createElement("span",null,"TaroViz Debug Panel")),a().createElement("button",{style:d.debugPanelToggle,onClick:function(){var t=!u;h(t),null==s||s({type:t?i.PANEL_SHOW:i.PANEL_HIDE})},title:u?"收起":"展开"},u?"▼":"▶")),u&&a().createElement(a().Fragment,null,a().createElement("div",{style:d.debugPanelTabs},a().createElement("button",{style:c(c({},d.debugTab),"instance"===f&&d.debugTabActive),onClick:function(){return S("instance")},title:"实例信息"},"实例"),a().createElement("button",{style:c(c({},d.debugTab),"config"===f&&d.debugTabActive),onClick:function(){return S("config")},title:"配置信息"},"配置"),a().createElement("button",{style:c(c({},d.debugTab),"data"===f&&d.debugTabActive),onClick:function(){return S("data")},title:"数据信息"},"数据"),a().createElement("button",{style:c(c({},d.debugTab),"performance"===f&&d.debugTabActive),onClick:function(){return S("performance")},title:"性能信息"},"性能"),a().createElement("button",{style:c(c({},d.debugTab),"events"===f&&d.debugTabActive),onClick:function(){return S("events")},title:"事件信息"},"事件"),a().createElement("button",{style:c(c({},d.debugTab),"errors"===f&&d.debugTabActive),onClick:function(){return S("errors")},title:"错误信息"},"错误"),a().createElement("button",{style:c(c({},d.debugTab),"tools"===f&&d.debugTabActive),onClick:function(){return S("tools")},title:"调试工具"},"工具")),a().createElement("div",{style:d.debugPanelBody},function(){switch(f){case"instance":return C();case"config":return T();case"data":return k();case"performance":return I();case"events":return M();case"errors":return D();case"tools":return E();default:return a().createElement("div",null,"未知标签页")}}())))},d={tarovizDebugPanel:{transition:"all 0.3s ease"},debugPanelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 12px",backgroundColor:"#f5f5f5",borderBottom:"1px solid #e0e0e0",cursor:"pointer"},debugPanelTitle:{display:"flex",alignItems:"center",gap:"8px",fontWeight:"bold",color:"#333"},debugPanelLogo:{fontSize:"14px"},debugPanelToggle:{background:"none",border:"none",fontSize:"12px",cursor:"pointer",color:"#666",padding:"4px"},debugPanelTabs:{display:"flex",borderBottom:"1px solid #e0e0e0",overflowX:"auto",whiteSpace:"nowrap"},debugTab:{padding:"8px 12px",background:"none",border:"none",borderBottom:"2px solid transparent",cursor:"pointer",fontSize:"12px",color:"#666",transition:"all 0.2s ease"},debugTabActive:{color:"#1890ff",borderBottomColor:"#1890ff",fontWeight:"bold"},debugPanelBody:{height:"calc(100% - 70px)",overflow:"auto"},debugPanelContent:{padding:"12px"},h3:{margin:"0 0 12px 0",fontSize:"14px",color:"#333"},h4:{margin:"12px 0 8px 0",fontSize:"13px",color:"#666"},h5:{margin:"8px 0 4px 0",fontSize:"12px",color:"#666"},debugInfoGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px",marginBottom:"12px"},debugInfoItem:{display:"flex",justifyContent:"space-between",padding:"4px 8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugInfoLabel:{fontWeight:"bold",color:"#666"},debugInfoValue:{color:"#333"},debugConfig:{backgroundColor:"#f5f5f5",padding:"8px",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},pre:{margin:"0",fontSize:"11px",overflow:"auto"},debugDataSeries:{marginTop:"12px"},debugDataSeriesItem:{marginBottom:"12px",padding:"8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugSeriesInfo:{marginTop:"4px",fontSize:"11px",color:"#666"},debugPerformanceChart:{marginTop:"12px",height:"120px",backgroundColor:"#f9f9f9",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"},debugEventsList:{maxHeight:"200px",overflow:"auto"},debugEventItem:{marginBottom:"8px",padding:"8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugEventHeader:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},debugEventType:{fontWeight:"bold",color:"#333"},debugEventTime:{fontSize:"10px",color:"#999"},debugEventParams:{fontSize:"11px",overflow:"auto",maxHeight:"80px"},debugErrorsList:{maxHeight:"200px",overflow:"auto"},debugErrorItem:{marginBottom:"8px",padding:"8px",backgroundColor:"#fff1f0",border:"1px solid #ffccc7",borderRadius:"4px"},debugErrorHeader:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},debugErrorType:{fontWeight:"bold",color:"#f5222d"},debugErrorTime:{fontSize:"10px",color:"#999"},debugErrorMessage:{color:"#f5222d",marginBottom:"4px"},debugErrorStack:{fontSize:"10px",maxHeight:"100px",overflow:"auto"},debugToolsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},debugToolButton:{padding:"8px 12px",backgroundColor:"#f0f0f0",border:"1px solid #e0e0e0",borderRadius:"4px",cursor:"pointer",fontSize:"12px",transition:"all 0.2s ease"},debugEmptyState:{textAlign:"center",color:"#999",padding:"16px"}};var p,f=function(){return f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},f.apply(this,arguments)},v=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},g=function(){function t(){this.debugInfo={},this.isEnabled=!1,this.eventHandlers=new Map,this.maxEvents=100,this.maxErrors=50,this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]}}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.init=function(){this.isEnabled=!0},t.prototype.enable=function(){this.isEnabled=!0},t.prototype.disable=function(){this.isEnabled=!1},t.prototype.getStatus=function(){return this.isEnabled},t.prototype.getDebugInfo=function(){return this.debugInfo},t.prototype.updateDebugInfo=function(t){this.isEnabled&&(this.debugInfo=f(f({},this.debugInfo),t),this.emitEvent(i.INFO_UPDATE,{info:t}))},t.prototype.updateInstanceInfo=function(t){this.updateDebugInfo({instance:t})},t.prototype.updateConfig=function(t){this.updateDebugInfo({config:t})},t.prototype.updateData=function(t){this.updateDebugInfo({data:t})},t.prototype.updatePerformance=function(t){this.updateDebugInfo({performance:t})},t.prototype.addEvent=function(t,e){if(this.isEnabled){var n={type:t,timestamp:Date.now(),params:e};this.debugInfo.events&&this.debugInfo.events.length>=this.maxEvents&&this.debugInfo.events.shift(),this.debugInfo.events=v(v([],this.debugInfo.events||[],!0),[n],!1),this.emitEvent(i.INFO_UPDATE,{info:this.debugInfo})}},t.prototype.addError=function(t,e,n){if(this.isEnabled){var r={type:t,message:e,stack:n,timestamp:Date.now()};this.debugInfo.errors&&this.debugInfo.errors.length>=this.maxErrors&&this.debugInfo.errors.shift(),this.debugInfo.errors=v(v([],this.debugInfo.errors||[],!0),[r],!1),this.emitEvent(i.INFO_UPDATE,{info:this.debugInfo})}},t.prototype.clear=function(){this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]},this.emitEvent(i.INFO_UPDATE,{info:this.debugInfo})},t.prototype.on=function(t,e){var n;this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set),null===(n=this.eventHandlers.get(t))||void 0===n||n.add(e)},t.prototype.off=function(t,e){var n;e?null===(n=this.eventHandlers.get(t))||void 0===n||n.delete(e):this.eventHandlers.delete(t)},t.prototype.emitEvent=function(t,e){var n=this.eventHandlers.get(t);n&&n.forEach(function(t){try{t(e)}catch(t){}})},t.prototype.setMaxEvents=function(t){this.maxEvents=t},t.prototype.setMaxErrors=function(t){this.maxErrors=t},t}().getInstance();!function(t){t.MONITORING_START="performanceMonitoringStart",t.MONITORING_END="performanceMonitoringEnd",t.METRIC_UPDATE="performanceMetricUpdate",t.ANALYSIS_COMPLETE="performanceAnalysisComplete"}(p||(p={}));var y=function(){return y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},y.apply(this,arguments)},m=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},_=function(){function t(t){void 0===t&&(t={});var e,n=this;this.metrics=new Map,this.eventHandlers=new Map,this.isMonitoring=!1,this.startTime=0,this.sampleIntervalId=null,this.frameRateHistory=[],this.lastFrameTime=0,this.rafId=null,this.config=y({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!1},t),null===(e=this.config.metrics)||void 0===e||e.forEach(function(t){n.metrics.set(t,[])}),this.config.autoStart&&this.start()}return t.getInstance=function(e){return(null==e?void 0:e.chartId)?(t.instances.has(e.chartId)||t.instances.set(e.chartId,new t(e)),t.instances.get(e.chartId)):(t.instance||(t.instance=new t(e)),t.instance)},t.resetInstance=function(){t.instance&&(t.instance.stop(),t.instance=null)},t.resetAllInstances=function(){t.resetInstance(),t.instances.forEach(function(t){return t.stop()}),t.instances.clear()},t.prototype.on=function(t,e){var n;this.eventHandlers.has(t)||this.eventHandlers.set(t,[]),null===(n=this.eventHandlers.get(t))||void 0===n||n.push(e)},t.prototype.off=function(t,e){var n=this.eventHandlers.get(t);if(n){var r=n.indexOf(e);r>-1&&n.splice(r,1)}},t.prototype.emit=function(t,e){var n=this.eventHandlers.get(t);null==n||n.forEach(function(n){try{n({type:t,data:e})}catch(t){}})},t.prototype.start=function(){var t=this;!this.isMonitoring&&this.config.enabled&&(this.isMonitoring=!0,this.startTime=Date.now(),this.lastFrameTime=performance.now(),this.config.sampleInterval&&this.config.realTime&&(this.sampleIntervalId=setInterval(function(){t.sampleMetrics()},this.config.sampleInterval)),this.startFrameRateMonitoring(),this.emit(p.MONITORING_START))},t.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(p.MONITORING_END))},t.prototype.dispose=function(){this.stop(),this.metrics.clear(),this.eventHandlers.clear(),this.frameRateHistory=[],t.instance===this&&(t.instance=null)},t.prototype.startFrameRateMonitoring=function(){var t=this,e=function(){var n;if(t.isMonitoring){var r=performance.now(),i=r-t.lastFrameTime,o=i>0?Math.round(1e3/i):0,a=null!==(n=t.config.maxSamples)&&void 0!==n?n:100;t.frameRateHistory.length>=a&&t.frameRateHistory.shift(),t.frameRateHistory.push(o),t.lastFrameTime=r,t.rafId=requestAnimationFrame(e)}};this.rafId=requestAnimationFrame(e)},t.prototype.stopFrameRateMonitoring=function(){null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.frameRateHistory=[]},t.prototype.sampleMetrics=function(){var t,e;if(this.isMonitoring){if((null===(t=this.config.metrics)||void 0===t?void 0:t.includes("frameRate"))&&this.frameRateHistory.length>0){var n=this.frameRateHistory.reduce(function(t,e){return t+e},0)/this.frameRateHistory.length;this.recordMetric("frameRate",n,"FPS")}if((null===(e=this.config.metrics)||void 0===e?void 0:e.includes("memoryUsage"))&&void 0!==performance.memory){var r=(performance.memory.usedJSHeapSize/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(r),"MB")}}},t.prototype.recordMetric=function(t,e,n,r){var i;if(this.config.enabled&&(null===(i=this.config.metrics)||void 0===i?void 0:i.includes(t))){var o={type:t,value:e,unit:n,timestamp:Date.now(),description:r},a=this.metrics.get(t)||[];a.push(o),this.config.maxSamples&&a.length>this.config.maxSamples&&a.shift(),this.metrics.set(t,a),this.emit(p.METRIC_UPDATE,o)}},t.prototype.recordInitTime=function(t){this.recordMetric("initTime",t,"ms","图表初始化耗时")},t.prototype.recordRenderTime=function(t){this.recordMetric("renderTime",t,"ms","图表渲染耗时")},t.prototype.recordUpdateTime=function(t){this.recordMetric("updateTime",t,"ms","图表更新耗时")},t.prototype.recordDataSize=function(t){try{var e=new Blob([JSON.stringify(t)]).size/1024;this.recordMetric("dataSize",e,"KB","图表数据大小")}catch(t){}},t.prototype.analyze=function(){var t={},e={},n={},r={},i=0,o=100,a=[];this.metrics.forEach(function(o,a){if(0!==o.length){i+=o.length,r[a]=m([],o,!0);var s=o.reduce(function(t,e){return t+e.value},0);t[a]=parseFloat((s/o.length).toFixed(2)),e[a]=Math.max.apply(Math,o.map(function(t){return t.value})),n[a]=Math.min.apply(Math,o.map(function(t){return t.value}))}}),t.renderTime>100&&(o-=20,a.push("渲染时间过长,建议优化数据处理或减少图表复杂度")),t.updateTime>50&&(o-=15,a.push("更新时间过长,建议优化数据更新逻辑")),t.frameRate<30&&(o-=25,a.push("帧率过低,建议减少动画效果或优化渲染逻辑")),t.dataSize>100&&(o-=10,a.push("数据量过大,建议进行数据压缩或分页处理")),o=Math.max(0,Math.min(100,o));var s={averages:t,maxValues:e,minValues:n,trends:r,score:o,suggestions:a,totalSamples:i,duration:Date.now()-this.startTime};return this.emit(p.ANALYSIS_COMPLETE,s),s},t.prototype.generateReport=function(t){void 0===t&&(t={});var e=this.analyze(),n=y({format:"json",includeCharts:!1,includeSuggestions:!0,includeDetailedData:!1},t);switch(n.format){case"json":default:return this.generateJsonReport(e,n);case"csv":return this.generateCsvReport(e,n);case"html":return this.generateHtmlReport(e,n)}},t.prototype.generateJsonReport=function(t,e){var n={timestamp:(new Date).toISOString(),duration:t.duration,score:t.score,totalSamples:t.totalSamples};return e.includeSuggestions&&(n.suggestions=t.suggestions),e.includeDetailedData&&(n.averages=t.averages,n.maxValues=t.maxValues,n.minValues=t.minValues,n.trends=t.trends),n},t.prototype.generateCsvReport=function(t,e){var n="Metric,Type,Value,Unit\n";return Object.entries(t.averages).forEach(function(t){var e=t[0],r=t[1];n+="".concat(e,",Average,").concat(r,",ms\n")}),Object.entries(t.maxValues).forEach(function(t){var e=t[0],r=t[1];n+="".concat(e,",Max,").concat(r,",ms\n")}),Object.entries(t.minValues).forEach(function(t){var e=t[0],r=t[1];n+="".concat(e,",Min,").concat(r,",ms\n")}),n},t.prototype.generateHtmlReport=function(t,e){var n='\n <!DOCTYPE html>\n <html>\n <head>\n <title>TaroViz 性能报告</title>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; }\n .report-header { background: #f0f0f0; padding: 20px; border-radius: 8px; }\n .score { font-size: 48px; font-weight: bold; color: #4CAF50; }\n .metric-section { margin: 20px 0; }\n .metric-table { border-collapse: collapse; width: 100%; }\n .metric-table th, .metric-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }\n .metric-table th { background-color: #f2f2f2; }\n .suggestions { background: #fff3cd; padding: 15px; border-radius: 8px; margin: 20px 0; }\n </style>\n </head>\n <body>\n <div class="report-header">\n <h1>TaroViz 性能报告</h1>\n <p>生成时间: '.concat((new Date).toISOString(),"</p>\n <p>监控时长: ").concat(Math.round(t.duration/1e3),' 秒</p>\n <div class="score">').concat(t.score," / 100</div>\n </div>\n ");return n+='\n <div class="metric-section">\n <h2>性能指标</h2>\n <table class="metric-table">\n <tr>\n <th>指标</th>\n <th>平均值</th>\n <th>最大值</th>\n <th>最小值</th>\n </tr>',Object.entries(t.averages).forEach(function(e){var r=e[0],i=e[1],o=t.maxValues[r],a=t.minValues[r];n+="\n <tr>\n <td>".concat(r,"</td>\n <td>").concat(i," ms</td>\n <td>").concat(o," ms</td>\n <td>").concat(a," ms</td>\n </tr>")}),n+="\n </table>\n </div>",e.includeSuggestions&&t.suggestions.length>0&&(n+='\n <div class="suggestions">\n <h2>性能建议</h2>\n <ul>',t.suggestions.forEach(function(t){n+="\n <li>".concat(t,"</li>")}),n+="\n </ul>\n </div>"),n+="\n </body>\n </html>"},t.prototype.getIsMonitoring=function(){return this.isMonitoring},t.prototype.getConfig=function(){return y({},this.config)},t.prototype.updateConfig=function(t){this.config=y(y({},this.config),t)},t.prototype.getAllMetrics=function(){return new Map(this.metrics)},t.prototype.getMetricsByType=function(t){return this.metrics.get(t)||[]},t.prototype.clearMetrics=function(){this.metrics.clear(),this.frameRateHistory=[],this.startTime=Date.now()},t.prototype.getScore=function(){return this.analyze().score},t.instance=null,t.instances=new Map,t}();_.getInstance();function b(t,e){return void 0===t?e:"number"==typeof t?"".concat(t,"px"):t}function x(t){if(!t)return 0;var e=0;if(t.series)for(var n=0,r=Array.isArray(t.series)?t.series:[t.series];n<r.length;n++){var i=r[n];i.data&&(Array.isArray(i.data)?e+=i.data.length:"object"==typeof i.data&&(e+=Object.keys(i.data).length))}return e}var w=n(698),S=function(){return S=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},S.apply(this,arguments)},C=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};const T=function(t){var e=t.chartId,n=t.option,r=t.animation,i=t.debug,c=t.width,d=void 0===c?"100%":c,p=t.height,f=void 0===p?"300px":p,v=t.theme,y=t.autoResize,m=void 0===y||y,T=t.direction,k=void 0===T?"ltr":T,I=t.onInit,M=(t.onClick,t.onDataZoom,t.style),D=t.className,E=(t.children,t.virtualScroll),O=void 0!==E&&E,A=t.virtualScrollPageSize,P=void 0===A?100:A,L=t.virtualScrollPreloadSize,R=void 0===L?50:L,N=t.enablePerformanceMonitoring,z=void 0!==N&&N,F=t.onPerformance,B=t.enableZoom,H=void 0!==B&&B,j=t.onZoom,V=t.enableDataFiltering,W=void 0!==V&&V,U=t.filters,G=void 0===U?{}:U,Y=t.onDataFiltered,Z=t.enableLegendInteraction,q=void 0!==Z&&Z,X=t.legendInteractionMode,K=void 0===X?"single":X,Q=t.onLegendSelect,J=t.onLegendUnselect,$=(t.onLegendSelectAll,t.onLegendInverseSelect,t.enableCustomTooltip),tt=void 0!==$&&$,et=t.customTooltipContent,nt=t.customTooltipStyle,rt=t.onTooltipShow,it=t.onTooltipHide,ot=(t.onExport,t.linkageConfig),at=void 0===ot?{}:ot,st=t.onDataUpdate,lt=t.dataUpdateOptions,ut=void 0===lt?{}:lt,ct=(0,o.useRef)(null),ht=(0,o.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0}),dt=(0,o.useRef)({currentPage:0,totalPages:1,totalDataCount:0,isScrolling:!1}),pt=(0,o.useRef)(n),ft=(0,o.useRef)(null),vt=(0,o.useRef)(null),gt=(0,o.useRef)(null),yt=(0,o.useMemo)(function(){return i?"boolean"==typeof i?{enabled:i,autoExpand:!1}:S({enabled:!0},i):null},[i]),mt=(0,o.useMemo)(function(){if(n){var t=S({},n);if(W&&G&&Object.keys(G).length>0&&(t=JSON.parse(JSON.stringify(t))).series&&Array.isArray(t.series)&&(t.series=t.series.map(function(t){if(t.data&&Array.isArray(t.data)){var e=function(t,e){return e&&0!==Object.keys(e).length?t.filter(function(t){for(var n,r,i=0,o=Object.entries(e);i<o.length;i++){var a=o[i],s=a[0],l=a[1];if(t[s]!==l&&!(null===(r=null===(n=t[s])||void 0===n?void 0:n.includes)||void 0===r?void 0:r.call(n,l)))return!1}return!0}):t}(t.data,G);if(Y&&Y(e,G),O){dt.current.totalDataCount=e.length,dt.current.totalPages=Math.ceil(e.length/P);var n=dt.current.currentPage*P,r=Math.min(n+P+R,e.length);return S(S({},t),{data:e.slice(n,r)})}return S(S({},t),{data:e})}return t})),H){t=JSON.parse(JSON.stringify(t));var e=Array.isArray(t.dataZoom)?t.dataZoom:t.dataZoom?[t.dataZoom]:[];e.some(function(t){return"inside"===(null==t?void 0:t.type)})||(t.dataZoom=C(C([],e||[],!0),[{type:"inside",start:0,end:100,zoomOnMouseWheel:!0,moveOnMouseMove:!1}],!1))}var i=x(t),o=(0,s.ek)(r,i);return S(S({},t),o)}},[n,r,H,W,G,O,P,R,Y]),_t=(0,o.useCallback)(function(t){var n,r;ct.current=t,ft.current=t,z&&(gt.current=_.getInstance({chartId:e,enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),ht.current.initStartTime=Date.now(),e&&function(t,e){if(l[t])try{l[t].dispose()}catch(t){}l[t]=e}(e,t),t&&(at.enableClickLinkage&&e&&at.linkedChartIds&&t.on("click",function(t){at.linkedChartIds.forEach(function(e){var n=u(e);n&&n.dispatchAction({type:"highlight",name:t.name})})}),t.on("datazoom",function(t){if(j&&j({start:t.start||0,end:t.end||100,dataZoomIndex:t.dataZoomIndex||0}),O&&!dt.current.isScrolling){dt.current.isScrolling=!0;var n=Math.floor((t.start||0)/100*dt.current.totalPages);n!==dt.current.currentPage&&(dt.current.currentPage=n),setTimeout(function(){dt.current.isScrolling=!1},100)}at.enableZoomLinkage&&e&&at.linkedChartIds&&at.linkedChartIds.forEach(function(e){var n=u(e);n&&n.dispatchAction({type:"dataZoom",start:t.start,end:t.end,dataZoomIndex:t.dataZoomIndex})})}),q&&t.on("legendselectchanged",function(n){var r=n.name,i=n.selected;if(at.enableLegendLinkage&&e&&at.linkedChartIds&&at.linkedChartIds.forEach(function(t){var e=u(t);e&&e.setOption({legend:{selected:i}})}),"single"===K){var o={};Object.keys(i).forEach(function(t){o[t]=t===r}),t.setOption({legend:{selected:o}}),null==Q||Q({name:r,selected:o})}else i[r]?null==Q||Q({name:r,selected:i}):null==J||J({name:r,selected:i})}),tt&&et&&(t.on("tooltipshow",function(t){return null==rt?void 0:rt(t)}),t.on("tooltiphide",function(t){return null==it?void 0:it(t)}),t.setOption({tooltip:S({formatter:function(t){return String(et(t))}},nt&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})}))),(null===(n=vt.current)||void 0===n?void 0:n.enabled)&&(r={instance:{id:e,type:"ECharts",renderer:"canvas",width:"number"==typeof d?d:void 0,height:"number"==typeof f?f:void 0,platform:"web"},config:mt,data:{series:Array.isArray(null==mt?void 0:mt.series)?mt.series:[],totalDataCount:x(mt),currentDataCount:x(mt)},performance:{initTime:0,renderTime:0,dataSize:JSON.stringify(mt).length}},g.updateDebugInfo(r)),null==I||I(t),ht.current.initEndTime=Date.now()},[e,z,I,at,O,j,q,K,Q,J,tt,et,nt,rt,it,mt,d,f]);(0,o.useEffect)(function(){if(ct.current&&F){var t=ht.current;F({renderTime:t.renderEndTime-t.renderStartTime,initTime:t.initEndTime-t.initStartTime,updateTime:t.updateEndTime-t.updateStartTime,dataSize:JSON.stringify(n).length})}},[n,F]);var bt=(0,o.useRef)(null);(0,o.useEffect)(function(){var t;if(st&&!1!==(null==ut?void 0:ut.enabled)){var e=null!==(t=null==ut?void 0:ut.debounceDelay)&&void 0!==t?t:0;if(bt.current&&clearTimeout(bt.current),e>0)bt.current=setTimeout(function(){var t=pt.current;t!==n&&(st(t,n),pt.current=n)},e);else{var r=pt.current;r!==n&&(st(r,n),pt.current=n)}return function(){bt.current&&(clearTimeout(bt.current),bt.current=null)}}},[n,st,ut]),(0,o.useEffect)(function(){return function(){e&&function(t){if(l[t]){try{l[t].dispose()}catch(t){}delete l[t]}}(e),gt.current&&(gt.current.dispose(),gt.current=null),ft.current&&ft.current.dispose()}},[e]);var xt=S({},function(t,e,n,r){return S({width:b(t,"100%"),height:b(e,"300px"),direction:n},r)}(d,f,k,M)),wt={option:mt,width:d,height:f,theme:v,autoResize:m,loading:!1,onChartInit:_t,renderer:"canvas",onEvents:{},chartType:"base",style:xt,className:D};return a().createElement(a().Fragment,null,a().createElement(w.A,S({},wt)),(null==yt?void 0:yt.enabled)&&a().createElement(h,{options:yt,debugInfo:{instance:{id:e,type:"ECharts",renderer:"canvas",width:"number"==typeof d?d:void 0,height:"number"==typeof f?f:void 0,platform:"web"},config:n,data:{series:Array.isArray(null==n?void 0:n.series)?n.series:[],totalDataCount:x(n),currentDataCount:x(n)},performance:{initTime:ht.current.initEndTime-ht.current.initStartTime,renderTime:ht.current.renderEndTime-ht.current.renderStartTime,updateTime:0,dataSize:JSON.stringify(n).length}}}))};var k=n(524),I=n(127),M=n(188),D=n(481),E=n(589),O=n(443),A=n(835),P=n(334),L=n(133),R=n(37),N=n(673),z=n(490),F=function(){return F=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},F.apply(this,arguments)},B=(0,o.memo)(function(t){return a().createElement(w.A,F({},t,{chartType:"graph-chart"}))});B.displayName="GraphChart";const H=B;var j=function(){return j=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},j.apply(this,arguments)},V=(0,o.memo)(function(t){return a().createElement(w.A,j({},t,{chartType:"candlestick-chart"}))});V.displayName="CandlestickChart";const W=V;var U=function(){return U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},U.apply(this,arguments)},G=(0,o.memo)(function(t){return a().createElement(w.A,U({},t,{chartType:"wordcloud-chart"}))});G.displayName="WordCloudChart";const Y=G;var Z=function(){return Z=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Z.apply(this,arguments)},q=(0,o.memo)(function(t){return a().createElement(w.A,Z({},t,{chartType:"boxplot"}))});q.displayName="BoxplotChart";const X=q;var K=function(){return K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},K.apply(this,arguments)},Q=(0,o.memo)(function(t){return a().createElement(w.A,K({},t,{chartType:"parallel"}))});Q.displayName="ParallelChart";const J=Q;var $=function(){return $=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},$.apply(this,arguments)},tt={fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontSize:"14px",color:"#333"},et={display:"flex",flexDirection:"column",gap:"4px"},nt={fontSize:"12px",fontWeight:500,color:"#666"},rt={padding:"6px 10px",border:"1px solid #d9d9d9",borderRadius:"4px",fontSize:"13px",outline:"none",transition:"border-color 0.2s, box-shadow 0.2s",backgroundColor:"#fff"},it={padding:"6px 16px",borderRadius:"4px",fontSize:"13px",cursor:"pointer",border:"none",transition:"all 0.2s"},ot=function(t){var e,n,r=t.field,i=t.value,s=t.onChange,l=t.disabled,u=t.compact,c=(0,o.useCallback)(function(t){var e=t.target.value;s(r.key,""===e?void 0:e)},[r.key,s]);return a().createElement("div",{style:et},a().createElement("label",{style:nt},r.label),a().createElement("select",{value:null!==(e=i)&&void 0!==e?e:"",onChange:c,disabled:l,style:$($({},rt),{minWidth:u?"100px":"140px",width:"100%",cursor:l?"not-allowed":"pointer",opacity:l?.6:1})},a().createElement("option",{value:""},r.placeholder||"请选择"),null===(n=r.options)||void 0===n?void 0:n.map(function(t){return a().createElement("option",{key:String(t.value),value:String(t.value)},t.label)})))},at=function(t){var e,n,r,i,s,l=t.field,u=t.value,c=t.onChange,h=t.disabled,d=t.compact,p=null!==(e=u)&&void 0!==e?e:[null!==(n=l.min)&&void 0!==n?n:0,null!==(r=l.max)&&void 0!==r?r:100],f=(0,o.useCallback)(function(t){var e=Number(t.target.value);c(l.key,[e,p[1]])},[l.key,p,c]),v=(0,o.useCallback)(function(t){var e=Number(t.target.value);c(l.key,[p[0],e])},[l.key,p,c]);return a().createElement("div",{style:et},a().createElement("label",{style:nt},l.label),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},a().createElement("input",{type:"number",value:p[0],min:l.min,max:p[1],onChange:f,disabled:h,placeholder:String(null!==(i=l.min)&&void 0!==i?i:"最小"),style:$($({},rt),{width:d?"60px":"80px",cursor:h?"not-allowed":"text",opacity:h?.6:1})}),a().createElement("span",{style:{color:"#999",fontSize:"12px"}},"~"),a().createElement("input",{type:"number",value:p[1],min:p[0],max:l.max,onChange:v,disabled:h,placeholder:String(null!==(s=l.max)&&void 0!==s?s:"最大"),style:$($({},rt),{width:d?"60px":"80px",cursor:h?"not-allowed":"text",opacity:h?.6:1})})))},st=function(t){var e,n=t.field,r=t.value,i=t.onChange,s=t.disabled,l=t.compact,u=(0,o.useMemo)(function(){return Array.isArray(r)?new Set(r.map(String)):new Set},[r]),c=(0,o.useCallback)(function(t){var e=String(t),r=new Set(u);r.has(e)?r.delete(e):r.add(e),i(n.key,Array.from(r))},[n.key,u,i]);return a().createElement("div",{style:et},a().createElement("label",{style:nt},n.label),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:l?"4px":"8px",maxWidth:l?"200px":"300px"}},null===(e=n.options)||void 0===e?void 0:e.map(function(t){var e=u.has(String(t.value));return a().createElement("label",{key:String(t.value),style:{display:"flex",alignItems:"center",gap:"4px",cursor:s?"not-allowed":"pointer",fontSize:"13px",opacity:s?.6:1,userSelect:"none"}},a().createElement("input",{type:"checkbox",checked:e,onChange:function(){return c(t.value)},disabled:s,style:{cursor:s?"not-allowed":"pointer"}}),a().createElement("span",null,t.label))})))},lt=function(t){var e,n=t.field,r=t.value,i=t.onChange,s=t.disabled,l=t.compact,u=null!==(e=r)&&void 0!==e?e:["",""],c=(n.dateFormat,(0,o.useCallback)(function(t){i(n.key,[t.target.value,u[1]])},[n.key,u,i])),h=(0,o.useCallback)(function(t){i(n.key,[u[0],t.target.value])},[n.key,u,i]);return a().createElement("div",{style:et},a().createElement("label",{style:nt},n.label),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},a().createElement("input",{type:"date",value:u[0],onChange:c,disabled:s,style:$($({},rt),{width:l?"120px":"150px",cursor:s?"not-allowed":"text",opacity:s?.6:1})}),a().createElement("span",{style:{color:"#999",fontSize:"12px"}},"~"),a().createElement("input",{type:"date",value:u[1],onChange:h,disabled:s,style:$($({},rt),{width:l?"120px":"150px",cursor:s?"not-allowed":"text",opacity:s?.6:1})})))},ut=function(t){var e=t.fields,n=t.value,r=void 0===n?{}:n,i=t.onChange,s=t.layout,l=void 0===s?"vertical":s,u=t.showReset,c=void 0!==u&&u,h=t.className,d=void 0===h?"":h,p=t.style,f=t.compact,v=void 0!==f&&f,g=t.disabled,y=void 0!==g&&g,m=t.resetText,_=void 0===m?"重置":m,b=t.submitText,x=void 0===b?"筛选":b,w=t.showSubmit,S=void 0!==w&&w,C=t.liveUpdate,T=void 0===C||C,k=(0,o.useState)(r),I=k[0],M=k[1];a().useEffect(function(){M(r)},[r]);var D=(0,o.useMemo)(function(){return Object.values(I).some(function(t){return null!=t&&""!==t&&(!Array.isArray(t)||0!==t.length)})},[I]),E=(0,o.useCallback)(function(t,e){var n,r=$($({},I),((n={})[t]=e,n));M(r),T&&(null==i||i(r))},[I,T,i]),O=(0,o.useCallback)(function(){null==i||i(I)},[I,i]),A=(0,o.useCallback)(function(){var t={};e.forEach(function(e){var n,r;"range"===e.type?t[e.key]=[null!==(n=e.min)&&void 0!==n?n:0,null!==(r=e.max)&&void 0!==r?r:100]:"checkbox"===e.type?t[e.key]=[]:"date"===e.type?t[e.key]=["",""]:t[e.key]=void 0}),M(t),null==i||i(t)},[e,i]),P=(0,o.useCallback)(function(t){var e=I[t.key];switch(t.type){case"select":return a().createElement(ot,{key:t.key,field:t,value:e,onChange:E,disabled:y,compact:v});case"range":return a().createElement(at,{key:t.key,field:t,value:e,onChange:E,disabled:y,compact:v});case"checkbox":return a().createElement(st,{key:t.key,field:t,value:e,onChange:E,disabled:y,compact:v});case"date":return a().createElement(lt,{key:t.key,field:t,value:e,onChange:E,disabled:y,compact:v});default:return null}},[I,E,y,v]),L="horizontal"===l,R=$($($({},tt),{display:"flex",flexDirection:L?"row":"column",flexWrap:"wrap",gap:L?"16px":"12px",alignItems:L?"flex-end":"flex-start",padding:"12px",backgroundColor:"#fafafa",borderRadius:"6px",border:"1px solid #f0f0f0"}),p);return a().createElement("div",{className:"taroviz-datafilter ".concat(d),style:R},e.map(P),a().createElement("div",{style:{display:"flex",gap:"8px",alignItems:"flex-end",marginLeft:L?"8px":"0",paddingTop:L?"0":"4px"}},S&&!T&&a().createElement("button",{type:"button",onClick:O,disabled:y,style:$($({},it),{backgroundColor:"#1890ff",color:"#fff",cursor:y?"not-allowed":"pointer",opacity:y?.6:1})},x),c&&D&&a().createElement("button",{type:"button",onClick:A,disabled:y,style:$($({},it),{backgroundColor:"#fff",color:"#666",border:"1px solid #d9d9d9",cursor:y?"not-allowed":"pointer",opacity:y?.6:1})},_)))};var ct=function(){return ct=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ct.apply(this,arguments)},ht=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},dt={autoBind:!0,currentLevel:0};function pt(t){var e={chartInstance:null,config:ct(ct({},dt),t),currentLevel:0,history:[],currentOption:{},initialOption:{},initialized:!1,clickHandler:null},n=function(t,n,i){var o,a=e.config,s=[],l={};if("reset"===i||0===t)a.initialSources?(s=a.initialSources,l=r(s)):l={};else if("up"===i){var u=e.history[t-1];u&&u.dataItem.chartOption?l=u.dataItem.chartOption:(s=null!==(o=null==u?void 0:u.dataItem.children)&&void 0!==o?o:[],l=r(s))}else"down"===i&&n&&(n.chartOption?l=n.chartOption:n.children&&n.children.length>0&&(s=n.children,l=r(s)));return l},r=function(t){return t&&0!==t.length?{xAxis:{type:"category",data:t.map(function(t){return t.name})},yAxis:{type:"value"},series:[{type:"bar",data:t.map(function(t){return t.value})}]}:{}},i=function(){var t=e.config;if(0===e.currentLevel)return t.initialSources?t.initialSources:[];var n=e.history[e.history.length-1];return n&&n.dataItem.children?n.dataItem.children:[]},o=function(t){var r=t||e.chartInstance;r&&(e.clickHandler&&a(r),e.clickHandler=function(t){!function(t){var r,o,a,s,l=e.config,u=e.chartInstance;if(u){var c,h=t.name,d=t.value;if(!(c=i().find(function(t){return String(t.name)===String(h)||t.value===d}))&&0===e.currentLevel&&l.initialSources&&(c=l.initialSources.find(function(t){return String(t.name)===String(h)||t.value===d})),(p=c)&&(p.children&&p.children.length>0||p.chartOption)){var p;c&&e.history.push({level:e.currentLevel,dataItem:c}),e.currentLevel+=1;var f=n(e.currentLevel,c,"down");f&&Object.keys(f).length>0&&(u.setOption(f,!0),e.currentOption=f),null===(r=l.onDrillDown)||void 0===r||r.call(l,{level:e.currentLevel,name:null!==(o=null==c?void 0:c.name)&&void 0!==o?o:h,value:null!==(a=null==c?void 0:c.value)&&void 0!==a?a:d,sources:null!==(s=null==c?void 0:c.children)&&void 0!==s?s:[],chartOption:f,rawParams:t})}}}(t)},r.on("click",e.clickHandler))},a=function(t){var n=t||e.chartInstance;n&&e.clickHandler&&(n.off("click",e.clickHandler),e.clickHandler=null)};return{init:function(t,n){var r;if(t){e.chartInstance=t,e.config=ct(ct({},dt),n),e.currentLevel=null!==(r=n.currentLevel)&&void 0!==r?r:0,e.initialized=!0;try{e.initialOption=t.getOption()||{}}catch(t){e.initialOption={}}e.config.autoBind&&o(t)}},drillUp:function(){var t,r=e.config,i=e.chartInstance;if(i&&!(e.currentLevel<=0)){var o=e.currentLevel;e.history.pop(),e.currentLevel-=1;var a=n(e.currentLevel,void 0,"up");a&&Object.keys(a).length>0?(i.setOption(a,!0),e.currentOption=a):0===e.currentLevel&&e.initialOption&&(i.setOption(e.initialOption,!0),e.currentOption=e.initialOption),null===(t=r.onDrillUp)||void 0===t||t.call(r,{previousLevel:o,currentLevel:e.currentLevel,chartOption:a})}},reset:function(){var t,r=e.config,i=e.chartInstance;if(i){e.currentLevel;e.history=[],e.currentLevel=0;var o=n(0,void 0,"reset");o&&Object.keys(o).length>0?(i.setOption(o,!0),e.currentOption=o):e.initialOption&&Object.keys(e.initialOption).length>0&&(i.setOption(e.initialOption,!0),e.currentOption=e.initialOption),null===(t=r.onReset)||void 0===t||t.call(r,{level:0})}},getCurrentLevel:function(){return e.currentLevel},bindClick:o,unbindClick:a,drillTo:function(t,r){var i,o,a,s,l,u,c=e.chartInstance,h=e.config;if(c&&!(t<0||t>e.history.length)){var d=e.currentLevel;e.currentLevel=t,t===e.history.length?r&&e.history.push({level:t-1,dataItem:r}):t<e.history.length?e.history=e.history.slice(0,t):e.history=[];var p=n(t,r,0===t?"reset":"down");p&&Object.keys(p).length>0&&(c.setOption(p,!0),e.currentOption=p),t>d?null===(i=h.onDrillDown)||void 0===i||i.call(h,{level:t,name:null!==(o=null==r?void 0:r.name)&&void 0!==o?o:"",value:null!==(a=null==r?void 0:r.value)&&void 0!==a?a:0,sources:null!==(s=null==r?void 0:r.children)&&void 0!==s?s:[],chartOption:p,rawParams:{}}):t<d?null===(l=h.onDrillUp)||void 0===l||l.call(h,{previousLevel:d,currentLevel:t,chartOption:p}):null===(u=h.onReset)||void 0===u||u.call(h,{level:0})}},getHistory:function(){return ht([],e.history,!0)},canDrillUp:function(){return e.currentLevel>0},dispose:function(){e.chartInstance&&e.clickHandler&&a(e.chartInstance),e.chartInstance=null,e.config={},e.history=[],e.currentLevel=0,e.initialized=!1}}}function ft(t){return!!(t.children&&t.children.length>0)||!!t.chartOption}function vt(t,e,n,r){void 0===r&&(r="children");var i={};return t.forEach(function(t){var o=String(t[e]);i[o]||(i[o]=[]),i[o].push({name:t[e],value:t[n],children:t[r]?vt(t[r],e,n,r):void 0})}),Object.values(i).flat()}function gt(t){return{dimension:"region",sources:t}}function yt(t){return{dimension:"category",sources:t}}var mt=n(574),_t=n(855),bt=function(){return bt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},bt.apply(this,arguments)},xt=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},wt=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},St=(0,o.memo)(function(t){var e=t.option,r=t.width,i=void 0===r?"100%":r,s=t.height,l=void 0===s?"300px":s,u=t.theme,c=t.style,h=void 0===c?{}:c,d=t.className,p=void 0===d?"":d,f=t.autoResize,v=void 0===f||f,g=t.loading,y=void 0!==g&&g,m=t.loadingOption,_=t.onChartInit,b=t.onChartReady,x=t.renderer,w=void 0===x?"canvas":x,S=t.onEvents,C=void 0===S?{}:S,T=t.waveData,I=void 0===T?[.6]:T,M=t.shape,D=void 0===M?"circle":M,E=t.amplitude,O=t.waveLength,A=t.phase,P=t.period,L=t.backgroundColor,R=void 0===L?"transparent":L,N=t.color,z=t.showLabel,F=void 0===z||z,B=t.labelFormatter,H=(0,o.useRef)("liquid-".concat((0,k.uR)())),j=(0,o.useRef)(null),V=(0,o.useRef)(null),W=(0,o.useRef)(!1),U=(0,o.useMemo)(function(){var t=e||{};if(t.series&&t.series.length>0)return t;I.map(function(t){var e={value:t};return F&&B&&(e.label={formatter:B(t)}),e});var n={type:"liquidFill",data:I,shape:D,backgroundColor:R,color:N||["#4cabce","#4cabce"],label:F?{show:!0,formatter:B?function(t){return B(t.value)}:"{d}%",textStyle:{fontSize:20,fontWeight:"bold"}}:{show:!1}};return void 0!==E&&(n.amplitude=E),void 0!==O&&(n.waveLength=O),void 0!==A&&(n.phase=A),void 0!==P&&(n.period=P),bt(bt({},t),{series:[n]})},[e,I,D,R,N,F,B,E,O,A,P]);(0,o.useEffect)(function(){var t,e=!0;return xt(void 0,void 0,Promise,function(){var t,r;return wt(this,function(o){switch(o.label){case 0:if(!W.current)try{(t=n(129))&&e&&(t.register&&t.register(),W.current=!0)}catch(t){return[2,void 0]}return e&&V.current?(r=(0,_t.X)({canvasId:H.current,containerRef:V,width:i,height:l,theme:u,autoResize:v,renderer:w,option:U,onInit:function(t){j.current=t,C&&Object.entries(C).forEach(function(e){var n=e[0],r=e[1];t.on(n,r)}),_&&_(t),b&&b(t)}}),[4,(0,mt.cK)(r)]):[2,void 0];case 1:return o.sent().init(),[2,function(){j.current&&(C&&Object.keys(C).forEach(function(t){var e;null===(e=j.current)||void 0===e||e.off(t)}),j.current.dispose(),j.current=null)}]}})}).then(function(e){t=e}),function(){e=!1,null==t||t()}},[U,i,l,u,v,w,_,b,C]),(0,o.useEffect)(function(){j.current&&U&&j.current.setOption(U,!0)},[U]),(0,o.useEffect)(function(){j.current&&(y?j.current.showLoading(m):j.current.hideLoading())},[y,m]);var G=bt({width:"number"==typeof i?"".concat(i,"px"):i,height:"number"==typeof l?"".concat(l,"px"):l},h);return a().createElement("div",{className:"taroviz-liquid ".concat(p),style:G,ref:V})});St.displayName="LiquidChart";const Ct=St;var Tt=function(){return Tt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Tt.apply(this,arguments)},kt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},It=(0,o.memo)(function(t){var e=t.option,n=t.treeData,r=t.layout,i=void 0===r?"orthogonal":r,s=t.orient,l=void 0===s?"horizontal":s,u=t.nodeGap,c=t.nodeWidth,h=t.initialTreeDepth,d=t.symbol,p=t.symbolSize,f=t.showLine,v=void 0===f||f,g=t.lineCurveness,y=t.label,m=t.labelPosition,_=t.labelAlign,b=t.lineStyle,x=t.itemStyle,S=kt(t,["option","treeData","layout","orient","nodeGap","nodeWidth","initialTreeDepth","symbol","symbolSize","showLine","lineCurveness","label","labelPosition","labelAlign","lineStyle","itemStyle"]),C=(0,o.useMemo)(function(){var t=e||{};if(t.series&&t.series.length>0)return t;var r={type:"tree",layout:i,orient:l,data:n,showLine:v};return void 0!==u&&(r.nodeGap=u),void 0!==c&&(r.nodeWidth=c),void 0!==h&&(r.initialTreeDepth=h),void 0!==d&&(r.symbol=d),void 0!==p&&(r.symbolSize=p),void 0!==g&&(r.lineCurveness=g),void 0!==y&&(r.label=y),void 0!==m&&(r.labelPosition=m),void 0!==_&&(r.labelAlign=_),void 0!==b&&(r.lineStyle=b),void 0!==x&&(r.itemStyle=x),Tt(Tt({},t),{series:[r]})},[e,n,i,l,u,c,h,d,p,v,g,y,m,_,b,x]);return a().createElement(w.A,Tt({},S,{option:C,chartType:"tree"}))});It.displayName="TreeChart";const Mt=It;var Dt=n(123),Et=n(999);var Ot=function(){return Ot=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Ot.apply(this,arguments)},At=new Map,Pt={theme:"default",name:"Default",description:"简洁现代的默认主题",type:"light",mode:"light",darkMode:!1,tags:["modern","clean","default"],colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"#ffffff",textColor:"#333333",textColorSecondary:"#666666",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#333333",backgroundColor:"transparent",borderColor:"#e8e8e8"},axis:{textColor:"#666666",lineColor:"#e8e8e8",tickColor:"#e8e8e8",splitLineColor:"#f0f0f0"},tooltip:{textColor:"#333333",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e8e8e8",borderRadius:4},title:{textColor:"#333333",subTextColor:"#666666"}}},Lt={theme:"dark",name:"Dark",description:"优雅的深色主题,适合夜间使用",type:"dark",mode:"dark",darkMode:!0,tags:["dark","night","modern"],colors:["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff9f7f","#8d48e3","#dd79ff"],backgroundColor:"#1a1a2e",textColor:"#e8e8e8",textColorSecondary:"#a0a0a0",borderColor:"#2d2d44",dividerColor:"#252538",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#e8e8e8",backgroundColor:"transparent",borderColor:"#2d2d44"},axis:{textColor:"#a0a0a0",lineColor:"#2d2d44",tickColor:"#2d2d44",splitLineColor:"#252538"},tooltip:{textColor:"#e8e8e8",backgroundColor:"rgba(26, 26, 46, 0.95)",borderColor:"#2d2d44",borderRadius:4},title:{textColor:"#e8e8e8",subTextColor:"#a0a0a0"}}},Rt={theme:"neon",name:"Neon",description:"赛博朋克霓虹风格,炫酷吸睛",type:"dark",mode:"dark",darkMode:!0,tags:["neon","cyberpunk","colorful","dark"],colors:["#00fff5","#ff00ff","#ffff00","#00ff00","#ff6b6b","#4ecdc4","#ffe66d","#95e1d3","#f38181"],backgroundColor:"#0d0d1a",textColor:"#ffffff",textColorSecondary:"#b0b0b0",borderColor:"#1a1a2e",dividerColor:"#1a1a2e",fontFamily:'"JetBrains Mono", "Fira Code", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 255, 245, 0.3)",gradients:!0},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(13, 13, 26, 0.95)",borderColor:"#00fff5",borderRadius:4,shadowColor:"rgba(0, 255, 245, 0.3)"}}},Nt={theme:"glass",name:"Glass",description:"现代玻璃态设计,半透明质感",type:"light",mode:"light",darkMode:!1,tags:["glass","modern","minimal","light"],colors:["#667eea","#764ba2","#f093fb","#f5576c","#4facfe","#00f2fe","#43e97b","#38f9d7","#fa709a"],backgroundColor:"rgba(255, 255, 255, 0.8)",backgroundGradient:{start:"#f5f7fa",end:"#c3cfe2",angle:135},textColor:"#2d3748",textColorSecondary:"#718096",borderColor:"rgba(255, 255, 255, 0.5)",dividerColor:"rgba(255, 255, 255, 0.3)",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif",effects:{glassmorphism:!0,blur:10,shadows:!0,shadowColor:"rgba(0, 0, 0, 0.1)",borderRadius:"large"},chart:{tooltip:{textColor:"#2d3748",backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"rgba(255, 255, 255, 0.5)",borderRadius:12}}},zt={theme:"pastel",name:"Pastel",description:"柔和粉彩配色,温馨舒适",type:"light",mode:"light",darkMode:!1,tags:["pastel","soft","gentle","light"],colors:["#ffb3ba","#ffdfba","#ffffba","#baffc9","#bae1ff","#f0b3ff","#b3fff0","#ffb3d9","#d9ffb3"],backgroundColor:"#fff9f5",textColor:"#5d5d5d",textColorSecondary:"#8a8a8a",borderColor:"#f0e6e0",dividerColor:"#f5f0eb",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",chart:{tooltip:{textColor:"#5d5d5d",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#f0e6e0",borderRadius:8}}},Ft={theme:"sunset",name:"Sunset",description:"温暖日落渐变,夕阳余晖",type:"light",mode:"light",darkMode:!1,tags:["sunset","warm","gradient","light"],colors:["#ff6b6b","#feca57","#ff9ff3","#54a0ff","#5f27cd","#ff9f43","#ee5a24","#009432","#f368e0"],backgroundColor:"#fff5f0",backgroundGradient:{start:"#ffecd2",end:"#fcb69f",angle:135},textColor:"#4a4a4a",textColorSecondary:"#7a7a7a",borderColor:"#ffd5c8",dividerColor:"#ffebe6",fontFamily:"Quicksand, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(255, 107, 107, 0.2)",borderRadius:"medium"}},Bt={theme:"ocean",name:"Ocean",description:"深邃海洋蓝,宁静清新",type:"light",mode:"light",darkMode:!1,tags:["ocean","blue","calm","light"],colors:["#0077b6","#00b4d8","#90e0ef","#caf0f8","#03045e","#023e8a","#0096c7","#48cae4","#ade8f4"],backgroundColor:"#f0f8ff",backgroundGradient:{start:"#e0f2fe",end:"#bae6fd",angle:180},textColor:"#1e3a5f",textColorSecondary:"#4a6fa5",borderColor:"#cce7f5",dividerColor:"#e1f0f9",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(0, 119, 182, 0.15)"}},Ht={theme:"cyber",name:"Cyber",description:"未来科技感,赛博朋克",type:"dark",mode:"dark",darkMode:!0,tags:["cyber","tech","futuristic","dark"],colors:["#00f5ff","#ff00ff","#00ff00","#ffff00","#ff0080","#8000ff","#00ff80","#ff8000","#0080ff"],backgroundColor:"#0a0a12",textColor:"#e0e0e0",textColorSecondary:"#808090",borderColor:"#1a1a2e",dividerColor:"#12121e",fontFamily:'"Orbitron", "Rajdhani", "JetBrains Mono", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 245, 255, 0.4)",gradients:!0,borderRadius:"none"},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(10, 10, 18, 0.95)",borderColor:"#00f5ff",borderRadius:0,shadowColor:"rgba(0, 245, 255, 0.4)"}}},jt={theme:"retro",name:"Retro",description:"怀旧复古风格,温馨怀旧",type:"light",mode:"light",darkMode:!1,tags:["retro","vintage","nostalgic","light"],colors:["#d63031","#e17055","#fdcb6e","#00b894","#0984e3","#6c5ce7","#e84393","#00cec9","#fab1a0"],backgroundColor:"#fdf6e3",textColor:"#5c4b37",textColorSecondary:"#8b7355",borderColor:"#e8dcc8",dividerColor:"#f0e8d8",fontFamily:'"Courier Prime", "Courier New", monospace',effects:{shadows:!1,borderRadius:"small"}},Vt={theme:"elegant",name:"Elegant",description:"低调雅致风格,精致品味",type:"light",mode:"light",darkMode:!1,tags:["elegant","minimal","sophisticated","light"],colors:["#2c3e50","#34495e","#7f8c8d","#95a5a6","#bdc3c7","#ecf0f1","#1abc9c","#16a085","#3498db"],backgroundColor:"#fafafa",textColor:"#2c3e50",textColorSecondary:"#7f8c8d",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'"Playfair Display", Georgia, serif',effects:{shadows:!0,shadowColor:"rgba(0, 0, 0, 0.08)",borderRadius:"medium"}};function Wt(t){if(!t)return Pt;var e;if(t.theme&&"string"==typeof t.theme){var n=At.get(t.theme);e=n||(t.darkMode?Lt:Pt)}else e=t.darkMode?Lt:Pt;return Ot(Ot({},e),t)}function Ut(t,e){At.set(t,Ot(Ot({},e),{name:t}))}function Gt(){return Array.from(At.values())}function Yt(t){return At.get(t)}function Zt(t,e){var n;"string"==typeof t?n=At.get(t)||Pt:(n=t,t.name&&Ut(t.name,t));return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:n})),null==e||e(),n}function qt(t){return Gt().filter(function(e){var n;return null===(n=e.tags)||void 0===n?void 0:n.includes(t)})}function Xt(){return Gt().filter(function(t){return!t.darkMode})}function Kt(){return Gt().filter(function(t){return t.darkMode})}var Qt={default:Pt,dark:Lt,walden:Ot(Ot({},Pt),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),chalk:Ot(Ot({},Pt),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),"purple-passion":Ot(Ot({},Pt),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),"blue-green":Ot(Ot({},Pt),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),golden:Ot(Ot({},Pt),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),forest:Ot(Ot({},Pt),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),neon:Rt,glass:Nt,pastel:zt,sunset:Ft,ocean:Bt,cyber:Ht,retro:jt,elegant:Vt};Object.entries(Qt).forEach(function(t){var e=t[0],n=t[1];At.set(e,n)});var Jt=function(){return Jt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Jt.apply(this,arguments)},$t={default:{name:"default",type:"light",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#fafafa","--tv-text-color":"#333333","--tv-text-color-secondary":"#666666","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9d9d9","--tv-divider-color":"#f0f0f0","--tv-shadow-color":"rgba(0, 0, 0, 0.1)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},dark:{name:"dark",type:"dark",isDark:!0,variables:{"--tv-bg-color":"#1a1a2e","--tv-bg-color-secondary":"#16213e","--tv-text-color":"#e0e0e0","--tv-text-color-secondary":"#a0a0a0","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#404040","--tv-divider-color":"#303030","--tv-shadow-color":"rgba(0, 0, 0, 0.3)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},vintage:{name:"vintage",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fef9ef","--tv-bg-color-secondary":"#fcf5e9","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#d4a574","--tv-primary-color-hover":"#c49566","--tv-primary-color-active":"#b8895a","--tv-success-color":"#8db78e","--tv-warning-color":"#e6c87a","--tv-error-color":"#c97c6d","--tv-border-color":"#e0d5c7","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.1)","--tv-chart-color-1":"#d4a574","--tv-chart-color-2":"#8db78e","--tv-chart-color-3":"#e6c87a","--tv-chart-color-4":"#c97c6d","--tv-chart-color-5":"#9ab5a8","--tv-chart-color-6":"#c9b8d4","--tv-chart-color-7":"#a8c4d4","--tv-chart-color-8":"#d4c49a","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},macarons:{name:"macarons",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fefcf9","--tv-bg-color-secondary":"#f9f6f2","--tv-text-color":"#505050","--tv-text-color-secondary":"#757575","--tv-primary-color":"#60acf2","--tv-primary-color-hover":"#4d9de0","--tv-primary-color-active":"#3d8bd0","--tv-success-color":"#62d17a","--tv-warning-color":"#f7c752","--tv-error-color":"#f4645a","--tv-border-color":"#e8e4e0","--tv-divider-color":"#f0ece8","--tv-shadow-color":"rgba(80, 80, 80, 0.08)","--tv-chart-color-1":"#60acf2","--tv-chart-color-2":"#62d17a","--tv-chart-color-3":"#f7c752","--tv-chart-color-4":"#f4645a","--tv-chart-color-5":"#95d9f2","--tv-chart-color-6":"#a8e6cf","--tv-chart-color-7":"#ffd3b6","--tv-chart-color-8":"#ffaaa5","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"12px","--tv-border-radius-small":"8px","--tv-transition-duration":"0.3s"}},infographic:{name:"infographic",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#f5f7fa","--tv-text-color":"#1a1a1a","--tv-text-color-secondary":"#666666","--tv-primary-color":"#277 ace","--tv-primary-color-hover":"#3a8ee6","--tv-primary-color-active":"#146bb3","--tv-success-color":"#2fc25b","--tv-warning-color":"#fbd438","--tv-error-color":"#e8352e","--tv-border-color":"#e0e6ed","--tv-divider-color":"#f0f2f5","--tv-shadow-color":"rgba(26, 26, 26, 0.06)","--tv-chart-color-1":"#277ace","--tv-chart-color-2":"#31cce8","--tv-chart-color-3":"#23d3a2","--tv-chart-color-4":"#fbd438","--tv-chart-color-5":"#f87f50","--tv-chart-color-6":"#e8352e","--tv-chart-color-7":"#b02ad3","--tv-chart-color-8":"#6475d4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"2px","--tv-border-radius-small":"1px","--tv-transition-duration":"0.2s"}},helianthus:{name:"helianthus",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fffbf5","--tv-bg-color-secondary":"#fef7f0","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#f5c242","--tv-primary-color-hover":"#e6b53e","--tv-primary-color-active":"#d4a435","--tv-success-color":"#7ec890","--tv-warning-color":"#f5a623","--tv-error-color":"#e74c3c","--tv-border-color":"#e8dccf","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.08)","--tv-chart-color-1":"#f5c242","--tv-chart-color-2":"#7ec890","--tv-chart-color-3":"#5eb8d9","--tv-chart-color-4":"#e74c3c","--tv-chart-color-5":"#9b7ed4","--tv-chart-color-6":"#f5a623","--tv-chart-color-7":"#6dd3ce","--tv-chart-color-8":"#d4778b","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"6px","--tv-border-radius-small":"4px","--tv-transition-duration":"0.3s"}},blue:{name:"blue",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f0f7ff","--tv-bg-color-secondary":"#e6f0ff","--tv-text-color":"#1a3a5c","--tv-text-color-secondary":"#4a6a8c","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bfd9f2","--tv-divider-color":"#d9e8fc","--tv-shadow-color":"rgba(24, 144, 255, 0.15)","--tv-chart-color-1":"#1890ff","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},red:{name:"red",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fff5f5","--tv-bg-color-secondary":"#ffe6e6","--tv-text-color":"#5c1a1a","--tv-text-color-secondary":"#8c4a4a","--tv-primary-color":"#ff4d4f","--tv-primary-color-hover":"#ff7875","--tv-primary-color-active":"#d9363e","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#f2bfbf","--tv-divider-color":"#fcd9d9","--tv-shadow-color":"rgba(255, 77, 79, 0.15)","--tv-chart-color-1":"#ff4d4f","--tv-chart-color-2":"#ffd700","--tv-chart-color-3":"#ff7c4d","--tv-chart-color-4":"#9c4dff","--tv-chart-color-5":"#00d0ff","--tv-chart-color-6":"#52c41a","--tv-chart-color-7":"#faad14","--tv-chart-color-8":"#8b5cf6","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},green:{name:"green",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f5fff5","--tv-bg-color-secondary":"#e6ffe6","--tv-text-color":"#1a3d1a","--tv-text-color-secondary":"#4a6c4a","--tv-primary-color":"#52c41a","--tv-primary-color-hover":"#73d13d","--tv-primary-color-active":"#389e0d","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bff2bf","--tv-divider-color":"#d9fcd9","--tv-shadow-color":"rgba(82, 196, 26, 0.15)","--tv-chart-color-1":"#52c41a","--tv-chart-color-2":"#1890ff","--tv-chart-color-3":"#faad14","--tv-chart-color-4":"#ff4d4f","--tv-chart-color-5":"#722ed1","--tv-chart-color-6":"#13c2c2","--tv-chart-color-7":"#fa8c16","--tv-chart-color-8":"#eb2f96","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},purple:{name:"purple",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#faf5ff","--tv-bg-color-secondary":"#f0e6ff","--tv-text-color":"#3d1a5c","--tv-text-color-secondary":"#6a4a8c","--tv-primary-color":"#722ed1","--tv-primary-color-hover":"#9254de","--tv-primary-color-active":"#531dab","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9bff2","--tv-divider-color":"#ecd9fc","--tv-shadow-color":"rgba(114, 46, 209, 0.15)","--tv-chart-color-1":"#722ed1","--tv-chart-color-2":"#eb2f96","--tv-chart-color-3":"#1890ff","--tv-chart-color-4":"#52c41a","--tv-chart-color-5":"#faad14","--tv-chart-color-6":"#ff4d4f","--tv-chart-color-7":"#13c2c2","--tv-chart-color-8":"#fa8c16","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}}},te=function(){function t(){this.currentTheme=$t.default,this.listeners=new Set,this.cssVarPrefix="--tv-"}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.getCurrentTheme=function(){return this.currentTheme},t.prototype.getPresetTheme=function(t){return $t[t]},t.prototype.getPresetThemeNames=function(){return Object.keys($t)},t.prototype.setTheme=function(t){var e="string"==typeof t?$t[t]:t;e&&(this.currentTheme=e,this.applyThemeVariables(e),this.notifyListeners())},t.prototype.applyThemeVariables=function(t){if("undefined"!=typeof document){var e=document.documentElement,n=t.variables;Object.entries(n).forEach(function(t){var n=t[0],r=t[1];e.style.setProperty(n,r)}),e.setAttribute("data-theme",t.name),e.setAttribute("data-theme-type",t.type),t.isDark?e.setAttribute("data-theme-dark","true"):e.removeAttribute("data-theme-dark")}},t.prototype.getEChartsTheme=function(){var t=this.currentTheme;return{color:[t.variables["--tv-chart-color-1"],t.variables["--tv-chart-color-2"],t.variables["--tv-chart-color-3"],t.variables["--tv-chart-color-4"],t.variables["--tv-chart-color-5"],t.variables["--tv-chart-color-6"],t.variables["--tv-chart-color-7"],t.variables["--tv-chart-color-8"]],backgroundColor:t.variables["--tv-bg-color"],textStyle:{color:t.variables["--tv-text-color"],fontFamily:t.variables["--tv-font-family"]}}},t.prototype.toggleDarkMode=function(){"dark"===this.currentTheme.type?this.setTheme("default"):this.setTheme("dark")},t.prototype.isDarkMode=function(){return this.currentTheme.isDark||"dark"===this.currentTheme.type},t.prototype.onThemeChange=function(t){var e=this;return this.listeners.add(t),function(){return e.listeners.delete(t)}},t.prototype.notifyListeners=function(){var t=this;this.listeners.forEach(function(e){try{e(t.currentTheme)}catch(t){}})},t.prototype.createCustomTheme=function(t,e){return void 0===e&&(e="custom"),{name:e,type:"custom",isDark:!1,variables:Jt(Jt({},$t.default.variables),t)}},t.prototype.exportThemeAsCSS=function(t){var e=t||this.currentTheme,n=e.variables;return':root[data-theme="'.concat(e.name,'"] {\n').concat(Object.entries(n).map(function(t){var e=t[0],n=t[1];return" ".concat(e,": ").concat(n,";")}).join("\n"),"\n}")},t.prototype.exportThemeAsJSON=function(t){var e=t||this.currentTheme;return JSON.stringify(e,null,2)},t.instance=null,t}().getInstance();var ee=function(){return ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ee.apply(this,arguments)},ne=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};const re=function(t){var e=t.selectedTheme,n=t.onThemeChange,r=t.onThemeSave,i=t.disabled,s=void 0!==i&&i,l=t.style,u=void 0===l?{}:l,c=t.className,h=void 0===c?"":c,d=Gt(),p=(0,o.useState)(d[0]||{}),f=p[0],v=p[1],g=(0,o.useState)(""),y=g[0],m=g[1],_=(0,o.useState)(!1),b=_[0],x=_[1],w=(0,o.useState)(f.colors||[]),S=w[0],C=w[1],T=(0,o.useState)(f.backgroundColor||"#ffffff"),k=T[0],I=T[1],M=(0,o.useState)(f.textColor||"#333333"),D=M[0],E=M[1],O=(0,o.useState)(f.darkMode||!1),A=O[0],P=O[1];(0,o.useEffect)(function(){if(e){var t=d.find(function(t){return t.name===e});t&&(v(t),C(t.colors||[]),I(t.backgroundColor||"#ffffff"),E(t.textColor||"#333333"),P(t.darkMode||!1))}},[e,d]),(0,o.useEffect)(function(){C(f.colors||[]),I(f.backgroundColor||"#ffffff"),E(f.textColor||"#333333"),P(f.darkMode||!1)},[f]);var L=function(t,e){var n=ne([],S,!0);n[t]=e,z({colors:n})},R=function(t){z({backgroundColor:t})},N=function(t){z({textColor:t})},z=function(t){var e=ee(ee({},f),t);v(e),n&&n(e),Zt(e)};return a().createElement("div",{className:"taroviz-theme-editor ".concat(h),style:ee({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},u)},a().createElement("h3",null,"主题编辑器"),a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"选择主题"),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},d.map(function(t){return a().createElement("button",{key:t.name,onClick:function(){return function(t){v(t),n&&n(t),Zt(t)}(t)},disabled:s,style:{padding:"8px 16px",border:"2px solid ".concat(f.name===t.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:f.name===t.name?"#1890ff":"#ffffff",color:f.name===t.name?"#ffffff":"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},t.name)}),a().createElement("button",{onClick:function(){x(!0),m("")},disabled:s,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"+ 新主题"))),b&&a().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},a().createElement("h4",null,"新建主题"),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),a().createElement("input",{type:"text",value:y,onChange:function(t){return m(t.target.value)},disabled:s,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:s?.6:1},placeholder:"输入主题名称"}))),a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},a().createElement("h4",null,"主题颜色"),a().createElement("button",{onClick:function(){C(ne(ne([],S,!0),["#000000"],!1))},disabled:s,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"+ 添加颜色")),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},S.map(function(t,e){return a().createElement("div",{key:e,style:{display:"flex",alignItems:"center",gap:"5px"}},a().createElement("input",{type:"color",value:t,onChange:function(t){return L(e,t.target.value)},disabled:s,style:{width:"50px",height:"30px",border:"none",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}}),a().createElement("input",{type:"text",value:t,onChange:function(t){return L(e,t.target.value)},disabled:s,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:s?.6:1}}),a().createElement("button",{onClick:function(){return function(t){var e=S.filter(function(e,n){return n!==t});C(e),z({colors:e})}(e)},disabled:s||S.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:s||S.length<=1?"not-allowed":"pointer",opacity:s||S.length<=1?.6:1}},"删除"))}))),a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"基础配置"),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"color",value:k,onChange:function(t){return R(t.target.value)},disabled:s,style:{width:"50px",height:"30px",border:"none",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}}),a().createElement("input",{type:"text",value:k,onChange:function(t){return R(t.target.value)},disabled:s,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:s?.6:1}}))),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"color",value:D,onChange:function(t){return N(t.target.value)},disabled:s,style:{width:"50px",height:"30px",border:"none",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}}),a().createElement("input",{type:"text",value:D,onChange:function(t){return N(t.target.value)},disabled:s,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:s?.6:1}}))),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("label",null,"深色模式:"),a().createElement("input",{type:"checkbox",checked:A,onChange:function(){z({darkMode:!A})},disabled:s,style:{cursor:s?"not-allowed":"pointer",opacity:s?.6:1}}))),a().createElement("button",{onClick:function(){var t=ee(ee({},f),{colors:S,backgroundColor:k,textColor:D,darkMode:A});b&&y?(Ut(y,t),x(!1),m("")):Ut(f.name||"custom",t),r&&r(t)},disabled:s,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"保存主题"))};var ie=function(){return ie=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ie.apply(this,arguments)},oe=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},ae=[{name:"预设-科技蓝",colors:["#0050b3","#1890ff","#40a9ff","#69c0ff","#bae7ff"],backgroundColor:"#001529",textColor:"#ffffff",darkMode:!0},{name:"预设-活力橙",colors:["#d46b08","#ff7a45","#ffa940","#ffc53d","#ffe58f"],backgroundColor:"#f5f5f5",textColor:"#333333",darkMode:!1},{name:"预设-森林绿",colors:["#237804","#52c41a","#73d13d","#95de64","#b7eb8f"],backgroundColor:"#f6ffed",textColor:"#333333",darkMode:!1},{name:"预设-神秘紫",colors:["#531dab","#722ed1","#9254de","#b37feb","#d3adf7"],backgroundColor:"#f9f0ff",textColor:"#333333",darkMode:!1},{name:"预设-商务灰",colors:["#434343","#595959","#8c8c8c","#bfbfbf","#e8e8e8"],backgroundColor:"#fafafa",textColor:"#333333",darkMode:!1}];const se=function(t){var e=t.selectedTheme,n=t.onThemeChange,r=t.onThemeSave,i=t.disabled,s=void 0!==i&&i,l=t.enableLivePreview,u=void 0===l||l,c=t.enableImportExport,h=void 0===c||c,d=t.enablePresets,p=void 0===d||d,f=t.style,v=void 0===f?{}:f,g=t.className,y=void 0===g?"":g,m=Gt(),_=(0,o.useState)(m.find(function(t){return t.name===e})||m[0]||{}),b=_[0],x=_[1],w=(0,o.useState)(""),S=w[0],C=w[1],T=(0,o.useState)(!1),k=T[0],M=T[1],D=(0,o.useState)(b.colors||[]),E=D[0],O=D[1],A=(0,o.useState)(b.backgroundColor||"#ffffff"),P=A[0],L=A[1],R=(0,o.useState)(b.textColor||"#333333"),N=R[0],z=R[1],F=(0,o.useState)(b.darkMode||!1),B=F[0],H=F[1],j=(0,o.useState)("basic"),V=j[0],W=j[1],U={title:{text:"主题预览",textStyle:{color:N}},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri"],axisLabel:{color:N}},yAxis:{type:"value",axisLabel:{color:N}},series:[{data:[120,200,150,80,70],type:"bar",itemStyle:{color:E[0]||"#1890ff"}},{data:[120,200,150,80,70].map(function(t){return{value:1.2*t,itemStyle:{color:E[1]||"#40a9ff"}}}),type:"bar"}],backgroundColor:P};(0,o.useEffect)(function(){if(e){var t=m.find(function(t){return t.name===e});t&&(x(t),O(t.colors||[]),L(t.backgroundColor||"#ffffff"),z(t.textColor||"#333333"),H(t.darkMode||!1))}},[e,m]);var G=(0,o.useCallback)(function(t){var e=ie(ie({},b),t);x(e),O(e.colors||[]),L(e.backgroundColor||"#ffffff"),z(e.textColor||"#333333"),H(e.darkMode||!1),u&&Zt(e),null==n||n(e)},[b,u,n]),Y=function(t,e){var n=oe([],E,!0);n[t]=e,G({colors:n})},Z=function(t){var e=ie(ie({},b),{colors:E,backgroundColor:P,textColor:N,darkMode:B}),n="",r="",i="";"json"===t?(n=JSON.stringify(e,null,2),r="".concat(e.name||"theme",".json"),i="application/json"):"css"===t?(n=":root {\n --theme-colors: ".concat(E.join(", "),";\n --theme-bg: ").concat(P,";\n --theme-text: ").concat(N,";\n}"),r="".concat(e.name||"theme",".css"),i="text/css"):(n="$theme-colors: (".concat(E.join(", "),");\n$theme-bg: ").concat(P,";\n$theme-text: ").concat(N,";"),r="".concat(e.name||"theme",".scss"),i="text/x-scss");var o=new Blob([n],{type:i}),a=URL.createObjectURL(o),s=document.createElement("a");s.href=a,s.download=r,s.click(),URL.revokeObjectURL(a)};return a().createElement("div",{className:"taroviz-enhanced-theme-editor ".concat(y),style:ie({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},v)},a().createElement("h3",{style:{marginBottom:"20px"}},"增强版主题编辑器"),a().createElement("div",{style:{display:"flex",borderBottom:"1px solid #e0e0e0",marginBottom:"20px"}},["basic","advanced","presets"].map(function(t){return a().createElement("button",{key:t,onClick:function(){return W(t)},style:{padding:"10px 20px",border:"none",borderBottom:V===t?"2px solid #1890ff":"2px solid transparent",backgroundColor:"transparent",color:V===t?"#1890ff":"#666",cursor:"pointer",fontWeight:V===t?"bold":"normal"}},"basic"===t?"基础配置":"advanced"===t?"高级配置":"预设主题")})),"basic"===V&&a().createElement(a().Fragment,null,a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"选择主题"),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},m.map(function(t){return a().createElement("button",{key:t.name,onClick:function(){M(!1),G(t)},disabled:s,style:{padding:"8px 16px",border:"2px solid ".concat(b.name===t.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:b.name===t.name?"#1890ff":"#ffffff",color:b.name===t.name?"#ffffff":"#333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},t.name)}),a().createElement("button",{onClick:function(){M(!0),C("")},disabled:s,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"+ 新主题"))),k&&a().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},a().createElement("h4",null,"新建主题"),a().createElement("input",{type:"text",value:S,onChange:function(t){return C(t.target.value)},disabled:s,placeholder:"输入主题名称",style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",marginTop:"10px",opacity:s?.6:1}})),a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},a().createElement("h4",null,"主题颜色"),a().createElement("button",{onClick:function(){var t=oe(oe([],E,!0),["#000000"],!1);G({colors:t})},disabled:s,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"+ 添加颜色")),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},E.map(function(t,e){return a().createElement("div",{key:e,style:{display:"flex",alignItems:"center",gap:"5px"}},a().createElement("input",{type:"color",value:t,onChange:function(t){return Y(e,t.target.value)},disabled:s,style:{width:"50px",height:"30px",border:"none",cursor:"pointer"}}),a().createElement("input",{type:"text",value:t,onChange:function(t){return Y(e,t.target.value)},disabled:s,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px"}}),a().createElement("button",{onClick:function(){return function(t){if(!(E.length<=1)){var e=E.filter(function(e,n){return n!==t});G({colors:e})}}(e)},disabled:s||E.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:s||E.length<=1?"not-allowed":"pointer",opacity:s||E.length<=1?.6:1}},"删除"))}))),a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"基础配置"),a().createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"15px",marginTop:"10px"}},a().createElement("div",null,a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"color",value:P,onChange:function(t){return G({backgroundColor:t.target.value})},disabled:s,style:{width:"50px",height:"30px",border:"none",cursor:"pointer"}}),a().createElement("input",{type:"text",value:P,onChange:function(t){return G({backgroundColor:t.target.value})},disabled:s,style:{width:"100px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px"}}))),a().createElement("div",null,a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"color",value:N,onChange:function(t){return G({textColor:t.target.value})},disabled:s,style:{width:"50px",height:"30px",border:"none",cursor:"pointer"}}),a().createElement("input",{type:"text",value:N,onChange:function(t){return G({textColor:t.target.value})},disabled:s,style:{width:"100px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px"}})))),a().createElement("div",{style:{marginTop:"10px"}},a().createElement("label",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"checkbox",checked:B,onChange:function(t){return G({darkMode:t.target.checked})},disabled:s}),"深色模式")))),"presets"===V&&p&&a().createElement("div",null,a().createElement("h4",null,"选择预设主题"),a().createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"15px",marginTop:"15px"}},ae.map(function(t){return a().createElement("div",{key:t.name,onClick:function(){return function(t){G(ie(ie({},t),{name:k&&S?S:t.name})),k||(Zt(t),null==n||n(t))}(t)},style:{padding:"15px",border:"2px solid #e0e0e0",borderRadius:"8px",cursor:"pointer",backgroundColor:t.backgroundColor,color:t.textColor,transition:"all 0.2s"}},a().createElement("div",{style:{display:"flex",gap:"5px",marginBottom:"10px"}},(t.colors||[]).map(function(t,e){return a().createElement("div",{key:e,style:{width:"30px",height:"30px",backgroundColor:t,borderRadius:"4px"}})})),a().createElement("div",{style:{fontSize:"14px",fontWeight:"bold"}},t.name),a().createElement("div",{style:{fontSize:"12px",opacity:.7}},t.darkMode?"深色":"浅色"))}))),"advanced"===V&&a().createElement("div",null,a().createElement("h4",null,"导入导出"),h&&a().createElement("div",{style:{display:"flex",gap:"10px",marginTop:"15px"}},a().createElement("button",{onClick:function(){return Z("json")},disabled:s,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"导出 JSON"),a().createElement("button",{onClick:function(){return Z("css")},disabled:s,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"导出 CSS"),a().createElement("label",{style:{padding:"8px 16px",border:"1px solid #1890ff",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:"pointer"}},"导入 JSON",a().createElement("input",{type:"file",accept:".json",onChange:function(t){var e,n=null===(e=t.target.files)||void 0===e?void 0:e[0];if(n){var r=new FileReader;r.onload=function(t){var e;try{var r=null===(e=t.target)||void 0===e?void 0:e.result;if(n.name.endsWith(".json")){var i=JSON.parse(r);G(i)}else alert("请选择 JSON 格式的主题文件")}catch(t){alert("文件格式错误")}},r.readAsText(n)}},style:{display:"none"}})))),u&&a().createElement("div",{style:{marginTop:"20px"}},a().createElement("h4",null,"实时预览"),a().createElement("div",{style:{marginTop:"10px",border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"}},a().createElement(I.default,{option:U,width:"100%",height:200}))),a().createElement("div",{style:{marginTop:"20px",display:"flex",gap:"10px"}},a().createElement("button",{onClick:function(){var t=k&&S?S:b.name||"custom",e=ie(ie({},b),{name:t,colors:E,backgroundColor:P,textColor:N,darkMode:B});Ut(t,e),M(!1),C(""),r&&r(e)},disabled:s,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"保存主题"),a().createElement("button",{onClick:function(){return G(b)},disabled:s,style:{padding:"10px 20px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"重置预览")))};var le,ue=(le=function(t,e){return le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},le(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}le(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),ce=function(){return ce=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ce.apply(this,arguments)},he=function(t){function e(e){var n=t.call(this,e)||this;return n.handleReset=function(){n.setState({hasError:!1,error:null})},n.state={hasError:!1,error:null},n}return ue(e,t),e.getDerivedStateFromError=function(t){return{hasError:!0,error:t}},e.prototype.componentDidCatch=function(t,e){var n,r;null===(r=(n=this.props).onError)||void 0===r||r.call(n,t,e)},e.prototype.render=function(){var t=this.state,e=t.hasError,n=t.error,r=this.props,i=r.children,o=r.fallback,s=r.showDetails,l=void 0!==s&&s;return e&&n?o?o(n,this.handleReset):a().createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"20px",backgroundColor:"#fff",border:"1px solid #ff4d4f",borderRadius:"8px",color:"#333",minHeight:"200px"}},a().createElement("div",{style:{fontSize:"48px",marginBottom:"16px"}},"⚠️"),a().createElement("h3",{style:{margin:"0 0 12px",color:"#ff4d4f"}},"图表渲染失败"),a().createElement("p",{style:{margin:"0 0 16px",color:"#666",textAlign:"center"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),l&&a().createElement("details",{style:{width:"100%",padding:"12px",backgroundColor:"#f5f5f5",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace",overflow:"auto",maxHeight:"150px"}},a().createElement("summary",{style:{cursor:"pointer",marginBottom:"8px"}},"错误详情"),a().createElement("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"}},n.message,"\n\n",n.stack)),a().createElement("button",{onClick:this.handleReset,style:{marginTop:"16px",padding:"8px 24px",backgroundColor:"#1890ff",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"重试")):i},e}(o.Component);function de(t,e){var n=function(n){return a().createElement(he,ce({},e),a().createElement(t,ce({},n)))},r=t.displayName||t.name;return n.displayName=r?"withErrorBoundary(".concat(r,")"):"withErrorBoundary(WrappedChart)",n}var pe=function(){return pe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},pe.apply(this,arguments)},fe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},ve=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,127))}),ge=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,188))}),ye=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,481))}),me=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,589))}),_e=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,443))}),be=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,835))}),xe=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,334))}),we=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,133))}),Se=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,37))}),Ce=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,673))}),Te=(0,o.lazy)(function(){return Promise.resolve().then(n.bind(n,490))}),ke={line:function(){return Promise.resolve().then(n.bind(n,127))},bar:function(){return Promise.resolve().then(n.bind(n,188))},pie:function(){return Promise.resolve().then(n.bind(n,481))},scatter:function(){return Promise.resolve().then(n.bind(n,589))},radar:function(){return Promise.resolve().then(n.bind(n,443))},heatmap:function(){return Promise.resolve().then(n.bind(n,835))},gauge:function(){return Promise.resolve().then(n.bind(n,334))},funnel:function(){return Promise.resolve().then(n.bind(n,133))},treemap:function(){return Promise.resolve().then(n.bind(n,37))},sunburst:function(){return Promise.resolve().then(n.bind(n,673))},sankey:function(){return Promise.resolve().then(n.bind(n,490))}},Ie=Object.keys(ke),Me=function(t){var e=t.text,n=void 0===e?"加载中...":e;return a().createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",minHeight:"200px",backgroundColor:"#f5f5f5",borderRadius:"8px"}},a().createElement("div",{style:{textAlign:"center"}},a().createElement("div",{style:{width:"40px",height:"40px",border:"3px solid #1890ff",borderTopColor:"transparent",borderRadius:"50%",animation:"taroviz-spin 1s linear infinite",margin:"0 auto 12px"}}),a().createElement("style",null,"\n @keyframes taroviz-spin {\n to { transform: rotate(360deg); }\n }\n "),a().createElement("span",{style:{color:"#666",fontSize:"14px"}},n)))};function De(t,e){var n=function(n){var r=n.loadingText,i=n.fallback,s=fe(n,["loadingText","fallback"]),l=e||Me;return a().createElement(o.Suspense,{fallback:a().createElement(l,{text:r})},i?a().createElement(a().Fragment,null,i,a().createElement(t,pe({},s))):a().createElement(t,pe({},s)))};return n.displayName="withLazyLoad(".concat(t.displayName||t.name||"Chart",")"),n}function Ee(t,e){void 0===e&&(e=!0);var n=ke[t];return n?n().then(function(){}).catch(function(t){}):e?Promise.resolve():Promise.reject(new Error("Unknown chart type: ".concat(t)))}function Oe(){return Promise.all(Ie.map(function(t){return Ee(t)}))}function Ae(t){return{line:ve,bar:ge,pie:ye,scatter:me,radar:_e,heatmap:be,gauge:xe,funnel:we,treemap:Se,sunburst:Ce,sankey:Te}[t]||null}var Pe={get:function(t){return Ae(t)},preload:function(t,e){return void 0===e&&(e=!0),Ee(t,e)},preloadAll:function(){return Oe()}};function Le(t){var e=t.data,n=t.lineStyle,r=t.label,i=t.animation,o=t.animationDuration,a=t.precision;return[{type:"line",markLine:{symbol:["circle","arrow"],silent:!0,animation:!1!==i,animationDuration:o||300,precision:void 0===a?2:a,lineStyle:{color:(null==n?void 0:n.color)||"#333",width:(null==n?void 0:n.width)||2,type:(null==n?void 0:n.type)||"dashed",opacity:null==n?void 0:n.opacity},label:{show:!1!==(null==r?void 0:r.show),position:(null==r?void 0:r.position)||"end",formatter:null==r?void 0:r.formatter,color:(null==r?void 0:r.color)||"#333",fontSize:(null==r?void 0:r.fontSize)||12},data:e.map(function(t){return{xAxis:t.xAxis,yAxis:t.yAxis,name:t.name}})}}]}function Re(t){var e=t.data,n=t.style,r=t.label;return[{type:"bar",markArea:{silent:!0,animation:!1!==t.animation,animationDuration:t.animationDuration||300,itemStyle:{color:(null==n?void 0:n.color)||"rgba(24, 144, 255, 0.1)",opacity:(null==n?void 0:n.opacity)||.3,borderColor:(null==n?void 0:n.borderColor)||"transparent",borderWidth:(null==n?void 0:n.borderWidth)||0,borderType:null==n?void 0:n.borderType},label:{show:!1!==(null==r?void 0:r.show),position:(null==r?void 0:r.position)||"inside",formatter:null==r?void 0:r.formatter,color:(null==r?void 0:r.color)||"#333",fontSize:(null==r?void 0:r.fontSize)||12},data:e.map(function(t){var e=t[0],n=t[1];return[{xAxis:e.xAxis,yAxis:e.yAxis},{xAxis:n.xAxis,yAxis:n.yAxis}]})}}]}function Ne(t){var e=t.data,n=t.symbol,r=t.symbolSize,i=t.itemStyle,o=t.label;return[{type:"scatter",markPoint:{symbol:n,symbolSize:r,itemStyle:i,label:{show:!1!==(null==o?void 0:o.show),position:(null==o?void 0:o.position)||"top",formatter:null==o?void 0:o.formatter,color:(null==o?void 0:o.color)||"#333"},data:e}}]}function ze(t){var e=t.type,n=t.markLine,r=t.markArea,i=t.scatter;return(0,o.useMemo)(function(){var t=[];if("line"===e&&n){var o=Le(n);t.push.apply(t,Array.isArray(o)?o:[o])}if("area"===e&&r){var a=Re(r);t.push.apply(t,Array.isArray(a)?a:[a])}if("scatter"===e&&i){var s=Ne(i);t.push.apply(t,Array.isArray(s)?s:[s])}return{series:t}},[e,n,r,i])}var Fe={averageLine:function(t){return void 0===t&&(t="#1890ff"),{data:[{type:"average",name:"平均值"}],lineStyle:{color:t,type:"dashed",width:2},label:{show:!0,position:"end",color:t}}},maxLine:function(t){return void 0===t&&(t="#f5222d"),{data:[{type:"max",name:"最大值"}],lineStyle:{color:t,type:"dashed",width:2},label:{show:!0,position:"end",color:t}}},minLine:function(t){return void 0===t&&(t="#52c41a"),{data:[{type:"min",name:"最小值"}],lineStyle:{color:t,type:"dashed",width:2},label:{show:!0,position:"end",color:t}}},thresholdLine:function(t,e){return void 0===e&&(e="#faad14"),{data:[{yAxis:t,name:"警戒线"}],lineStyle:{color:e,type:"solid",width:2},label:{show:!0,position:"start",color:e}}},targetArea:function(t,e,n){return void 0===n&&(n="rgba(82, 196, 26, 0.1)"),{data:[[{yAxis:t},{yAxis:e}]],style:{color:n,opacity:.3},label:{show:!0,position:"inside",color:"#52c41a"}}},warningArea:function(t,e,n){return void 0===n&&(n="rgba(250, 173, 20, 0.1)"),{data:[[{yAxis:t},{yAxis:e}]],style:{color:n,opacity:.3},label:{show:!0,position:"inside",color:"#faad14"}}}};function Be(t){var e=[];return t.forEach(function(t){if("line"===t.type&&t.markLine){var n=Le(t.markLine);e.push.apply(e,Array.isArray(n)?n:[n])}if("area"===t.type&&t.markArea){n=Re(t.markArea);e.push.apply(e,Array.isArray(n)?n:[n])}if("scatter"===t.type&&t.scatter){n=Ne(t.scatter);e.push.apply(e,Array.isArray(n)?n:[n])}}),{series:e}}var He=function(){return He=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},He.apply(this,arguments)},je=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},Ve=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};function We(t){for(var e,n=t.split(","),r=(null===(e=n[0].match(/:(.*?);/))||void 0===e?void 0:e[1])||"image/png",i=atob(n[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new Blob([a],{type:r})}function Ue(t,e){var n=(new Date).toISOString().slice(0,10),r=t.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g,"_");return"".concat(r,"_").concat(n,".").concat(e)}var Ge=function(){function t(){}return t.exportImage=function(t,e){void 0===e&&(e={});var n=e.type,r=void 0===n?"png":n,i=e.pixelRatio,o=void 0===i?2:i,a=e.backgroundColor,s=void 0===a?"#ffffff":a,l=e.quality,u=void 0===l?.8:l,c="image/".concat(r);return{data:t.getDataURL({type:r,pixelRatio:o,backgroundColor:s,quality:u}),filename:Ue("chart",r),mimeType:c}},t.exportSVG=function(t,e){void 0===e&&(e={});var n=e.compress,r=void 0!==n&&n,i=t.getDataURL({type:"svg"});if(!i||"data:image/svg+xml;charset=utf8,"===i)throw new Error("SVG export is not supported. Please use canvas renderer.");var o=i,a="image/svg+xml";return r&&(o=o.replace(/>\s+</g,"><").replace(/\s+/g," "),a+=";charset=utf-8"),{data:o,filename:Ue("chart","svg"),mimeType:a}},t.exportPDF=function(t){return je(this,arguments,Promise,function(t,e){var n,r,i,o,a,s,l,u,c,h,d,p,f,v,g,y,m,_,b,x,w,S,C,T,k,I,M,D;return void 0===e&&(e={}),Ve(this,function(E){switch(E.label){case 0:n=e.orientation,r=void 0===n?"portrait":n,i=e.pageSize,o=void 0===i?"a4":i,a=e.title,s=void 0===a?"Chart Export":a,l=e.author,u=void 0===l?"TaroViz":l,c=e.margin,h=void 0===c?{top:40,right:40,bottom:40,left:40}:c,d=e.includeTitle,p=void 0===d||d,f=t.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),E.label=1;case 1:return E.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return v=E.sent().default,[3,4];case 3:return E.sent(),[2,{data:f,filename:Ue("chart","png"),mimeType:"image/png"}];case 4:return g={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[o],y="landscape"===r,(m=new v({orientation:r,unit:"mm",format:o})).setProperties({title:s,author:u,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),_=y?g.height:g.width,b=.6*_,x=y?g.height:g.width,w=y?g.width:g.height,S=h.top||40,C=h.left||40,p&&(m.setFontSize(16),m.setTextColor(51,51,51),m.text(s,C,S)),T=p?S+15:S,k=(x-_)/2,m.addImage(f,"PNG",k,T,_,b),I=w-(null!==(D=h.bottom)&&void 0!==D?D:40)/2,m.setFontSize(10),m.setTextColor(153,153,153),m.text("Generated by TaroViz on ".concat((new Date).toLocaleDateString()),C,I),[2,{data:M=m.output("blob"),filename:Ue(s.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:M.size}]}})})},t.exportBatch=function(t,e){return je(this,void 0,Promise,function(){var n,r,i,o,a,s,l,u,c,h;return Ve(this,function(d){switch(d.label){case 0:n=e.format,r=e.filenamePrefix,i=e.compress,o=[],a=0,s=t,d.label=1;case 1:if(!(a<s.length))return[3,8];l=s[a],u=l.name,c=l.chart,d.label=2;case 2:return d.trys.push([2,6,,7]),h=void 0,"pdf"!==n?[3,4]:[4,this.exportPDF(c,{title:u})];case 3:return h=d.sent(),[3,5];case 4:h=this.exportImage(c,{type:n}),d.label=5;case 5:return i&&h.filename&&(h.filename=h.filename.replace(/\.(\w+)$/,".$1")),o.push(h),[3,7];case 6:return d.sent(),[3,7];case 7:return a++,[3,1];case 8:return[2,o]}})})},t.download=function(t){var e,n,r,i,o;e=t.data,n=t.filename,t.mimeType,r="string"==typeof e?We(e):e,i=URL.createObjectURL(r),(o=document.createElement("a")).href=i,o.download=n,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(function(){document.body.removeChild(o),URL.revokeObjectURL(i)},100)},t.copyToClipboard=function(t){return je(this,arguments,Promise,function(t,e){var n,r,i;return void 0===e&&(e={}),Ve(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n=this.exportImage(t,He(He({},e),{type:"png"})),r=We(n.data),[4,navigator.clipboard.write([new ClipboardItem((i={},i[r.type]=r,i))])];case 1:return o.sent(),[2,!0];case 2:return o.sent(),[2,!1];case 3:return[2]}})})},t.calculateExportSize=function(t,e){void 0===e&&(e=300);var n=t.getWidth(),r=t.getHeight(),i=e/96;return{width:Math.round(n*i),height:Math.round(r*i)}},t}(),Ye=Ge;function Ze(t){void 0===t&&(t={});var e=t.type,n=void 0===e?"inside":e,r=t.start,i=void 0===r?0:r,a=t.end,s=void 0===a?100:a,l=t.minSpan,u=t.maxSpan,c=t.zoomLock,h=void 0!==c&&c,d=t.throttle,p=void 0===d?16:d,f=t.disabled,v=void 0!==f&&f,g=t.brushSelect,y=void 0!==g&&g,m=t.zoomMode,_=void 0===m?"scale":m,b=t.resetOnUnmount,x=void 0!==b&&b,w=t.onZoomChange,S=(0,o.useRef)(null),C=(0,o.useRef)(void 0),T=(0,o.useRef)(void 0),k=(0,o.useRef)(!1),I=(0,o.useRef)(null),M=(0,o.useCallback)(function(t){var e=0;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=Date.now();i-e>=p&&(e=i,t.apply(void 0,n))}},[p]),D=(0,o.useCallback)(function(){var t=[];return"inside"!==n&&"mix"!==_||t.push({type:"inside",start:i,end:s,zoomLock:h,disabled:v,zoomOnMouseWheel:!0,moveOnMouseMove:!1,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),"slider"!==n&&"mix"!==_||t.push({type:"slider",start:i,end:s,minSpan:l,maxSpan:u,zoomLock:h,disabled:v,show:!0,brushSelect:y,throttle:p}),t},[n,i,s,l,u,h,v,y,p]),E=(0,o.useCallback)(function(t){if(t&&!k.current){k.current=!0,S.current=t;try{var e=D();t.setOption({dataZoom:e},!1,!0)}catch(t){}k.current=!1}},[D]),O=(0,o.useCallback)(function(t){var e;if(t)try{null===(e=t.dispatchAction)||void 0===e||e.call(t,{type:"dataZoom",start:0,end:100})}catch(t){}},[]),A=(0,o.useCallback)(function(t,e){var n,r=S.current;if(r){var i=Math.max(0,Math.min(100,t)),o=Math.max(0,Math.min(100,e));try{null===(n=r.dispatchAction)||void 0===n||n.call(r,{type:"dataZoom",start:i,end:o})}catch(t){}}},[]),P=(0,o.useCallback)(function(){A(i,s)},[A,i,s]),L=(0,o.useCallback)(function(){var t,e,n,r=S.current;if(!r)return{start:i,end:s};try{var o=null===(t=r.getOption)||void 0===t?void 0:t.call(r),a=null==o?void 0:o.dataZoom;if(Array.isArray(a)&&a.length>0){var l=a.find(function(t){return"inside"===t.type}),u=a.find(function(t){return"slider"===t.type}),c=l||u||a[0];return{start:null!==(e=c.start)&&void 0!==e?e:i,end:null!==(n=c.end)&&void 0!==n?n:s}}}catch(t){}return{start:i,end:s}},[i,s]),R=(0,o.useCallback)(function(t){if(t){I.current=M(function(t){if(!v){var e=t||{},n=e.start,r=e.end;void 0!==n&&(C.current=n),void 0!==r&&(T.current=r),null==w||w({start:null!=n?n:i,end:null!=r?r:s})}});try{t.on("datazoom",I.current)}catch(t){}}},[v,w,M]),N=(0,o.useCallback)(function(t){if(t&&I.current)try{t.off("datazoom",I.current)}catch(t){}},[]);return(0,o.useEffect)(function(){return function(){var t=S.current;t&&(x&&O(t),N(t))}},[x,O,N]),{bindDataZoom:E,setZoomRange:A,resetZoom:P,getZoomRange:L,startValue:C,endValue:T,bindEvents:R}}function qe(t){var e=t.chartIds,n=void 0===e?[]:e,r=t.events,i=void 0===r?["click","hover","select","dataZoom"]:r,a=t.autoBind,s=void 0!==a&&a,l=t.groupName,u=t.disabled,c=void 0!==u&&u,h=(t.onConnect,t.eventFilter),d=(0,o.useRef)(new Map),p=(0,o.useRef)(!1),f=(0,o.useRef)(t);f.current=t;var v=(0,o.useRef)(new Map),g=(0,o.useCallback)(function(t,e){return function(n){if(!c&&(!h||h(e,n))){y(t,e,n);var r=f.current;r.onConnect&&d.current.forEach(function(i,o){var a;o!==t&&(null===(a=r.onConnect)||void 0===a||a.call(r,t,o,{eventType:e,params:n}))})}}},[c,h]),y=(0,o.useCallback)(function(t,e,n){d.current.forEach(function(r,i){var o,a,s,l,u,c,h,d;if(i!==t)try{switch(e){case"click":null===(a=(o=r.instance).dispatchAction)||void 0===a||a.call(o,{type:"showTip",seriesIndex:null==n?void 0:n.seriesIndex,dataIndex:null==n?void 0:n.dataIndex});break;case"hover":null===(l=(s=r.instance).dispatchAction)||void 0===l||l.call(s,{type:"showTip",seriesIndex:null==n?void 0:n.seriesIndex,dataIndex:null==n?void 0:n.dataIndex});break;case"select":null===(c=(u=r.instance).dispatchAction)||void 0===c||c.call(u,{type:"toggleSelect",seriesIndex:null==n?void 0:n.seriesIndex,dataIndex:null==n?void 0:n.dataIndex});break;case"dataZoom":null===(d=(h=r.instance).dispatchAction)||void 0===d||d.call(h,{type:"dataZoom",start:null==n?void 0:n.start,end:null==n?void 0:n.end,dataZoomIndex:null==n?void 0:n.dataZoomIndex,dataZoomIndexs:null==n?void 0:n.dataZoomIndexs})}}catch(t){}})},[]),m=(0,o.useCallback)(function(t,e){if(t){var n=new Map;i.forEach(function(r){var i=g(e,r);n.set(r,i);try{t.on(r,i)}catch(t){}}),v.current.set(e,n)}},[i,g]),_=(0,o.useCallback)(function(t){var e=v.current.get(t);if(e){var n=d.current.get(t);n&&(e.forEach(function(t,e){try{n.instance.off(e,t)}catch(t){}}),v.current.delete(t))}},[]),b=(0,o.useCallback)(function(t,e){var n=e||"chart_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9));if(!d.current.has(n)&&(d.current.set(n,{instance:t,id:n,handlers:new Map}),m(t,n),p.current=!0,l&&void 0!==t.group))try{t.group=l}catch(t){}},[m,l]),x=(0,o.useCallback)(function(t,e){var n=e;n||d.current.forEach(function(e,r){e.instance===t&&(n=r)}),n&&d.current.has(n)&&(_(n),d.current.delete(n),p.current=d.current.size>0)},[_]),w=(0,o.useCallback)(function(t,e){if(!c&&d.current.get(t)){var n=e||{},r=n.eventType,i=n.params;r&&y(t,r,i)}},[c,y]),S=(0,o.useCallback)(function(t){t.forEach(function(t){var e=t.instance,n=t.id;b(e,n)})},[b]),C=(0,o.useCallback)(function(){d.current.forEach(function(t,e){_(e)}),d.current.clear(),p.current=!1},[_]);return(0,o.useEffect)(function(){s&&n.length},[s,n]),(0,o.useEffect)(function(){return function(){C()}},[C]),{connect:b,disconnect:x,dispatchConnect:w,connectAll:S,disconnectAll:C,isConnected:p.current}}var Xe=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},Ke=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},Qe=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function Je(t){void 0===t&&(t="chart");var e=(new Date).toISOString().slice(0,19).replace(/[:-]/g,"");return"".concat(t,"_").concat(e)}function $e(t,e){var n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}function tn(t,e){var n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function en(t,e){return t?t.series?function(t,e){var n,r,i=t.series,o=void 0===i?[]:i,a=t.xAxis,s=t.dataset,l=null===(n=null==e?void 0:e.includeLabels)||void 0===n||n;if(0===o.length)return"";var u=[];(null==a?void 0:a.data)?u=a.data:(null==s?void 0:s.dimensions)&&s.source?u=s.source.map(function(t){return t[0]}):(null===(r=o[0])||void 0===r?void 0:r.data)&&(u=o[0].data.map(function(t,e){return"object"==typeof t&&t[0]||e}));var c=l?Qe(["Category"],o.map(function(t){return t.name||t.seriesIndex}),!0):[],h=[];return o.forEach(function(t,e){(t.data||[]).forEach(function(t,n){var r="object"==typeof t?t[1]:t,i=u[n]||n;l?0===e?h[n]=[i,r]:(h[n]=h[n]||[i],h[n].push(r)):0===e?h[n]=[r]:(h[n]=h[n]||[],h[n].push(r))})}),(l?Qe([c.join(",")],h.map(function(t){return t.join(",")}),!0):h.map(function(t){return t.join(",")})).join("\n")}(t,e):Array.isArray(t)?function(t){if(0===t.length)return"";if("object"==typeof t[0]&&null!==t[0]){var e=Object.keys(t[0]),n=e.join(","),r=t.map(function(t){return e.map(function(e){var n;return JSON.stringify(null!==(n=t[e])&&void 0!==n?n:"")}).join(",")});return Qe([n],r,!0).join("\n")}return t.join("\n")}(t):"object"==typeof t?function(t){var e=Object.entries(t);return e.map(function(t){var e=t[0],n=t[1];return"".concat(e,",").concat(JSON.stringify(n))}).join("\n")}(t):String(t):""}function nn(t,e){var n=this;void 0===e&&(e={});var r=e.filename,i=e.pixelRatio,a=void 0===i?2:i,s=e.backgroundColor,l=void 0===s?"#ffffff":s,u=e.format,c=void 0===u?"png":u,h=e.includeLabels,d=void 0===h||h,p=e.beforeExport,f=e.afterExport,v=(0,o.useRef)(null);v.current=t;var g=(0,o.useCallback)(function(){var t=v.current;if(t&&p)try{p(t)}catch(t){}},[p]),y=(0,o.useCallback)(function(t){if(f)try{f(t)}catch(t){}},[f]),m=(0,o.useCallback)(function(t){var e,n=v.current;if(n){var r=t||c;try{if("svg"===r){var i=null===(e=n.getSvgData)||void 0===e?void 0:e.call(n);return i?"data:image/svg+xml;base64,".concat(btoa(i)):void 0}return n.getDataURL?n.getDataURL({type:r,pixelRatio:a,backgroundColor:l}):void 0}catch(t){return}}},[c,a,l]),_=(0,o.useCallback)(function(t){return Xe(n,void 0,Promise,function(){var e,n,i,o,s,u,h,d,p,f,m,_,b,x;return Ke(this,function(w){if(g(),!(e=v.current))return[2];i=(n=t||{}).filename,o=n.pixelRatio,s=n.backgroundColor,u=n.format,h=u||c,d=null!=o?o:a,p=null!=s?s:l,f=i||r||Je("chart");try{m=void 0,"svg"===h?(_=null===(b=e.getSvgData)||void 0===b?void 0:b.call(e))&&(m="data:image/svg+xml;base64,".concat(btoa(_))):m=null===(x=e.getDataURL)||void 0===x?void 0:x.call(e,{type:h,pixelRatio:d,backgroundColor:p}),m&&(tn(m,"".concat(f,".").concat(h)),y(m))}catch(t){}return[2]})})},[c,a,l,r,g,y]),b=(0,o.useCallback)(function(t){return Xe(n,void 0,Promise,function(){var e,n,i,o,s,u,c,h,d,p,f;return Ke(this,function(m){switch(m.label){case 0:if(g(),!(e=v.current))return[2];i=(n=t||{}).filename,o=n.pixelRatio,s=n.backgroundColor,u=null!=o?o:a,c=null!=s?s:l,h=i||r||Je("chart"),m.label=1;case 1:return m.trys.push([1,3,,4]),(d=null===(f=e.getDataURL)||void 0===f?void 0:f.call(e,{type:"png",pixelRatio:u,backgroundColor:c}))?[4,x(d)]:[2];case 2:return(p=m.sent())&&(tn(p,"".concat(h,".pdf")),y(p)),[3,4];case 3:return m.sent(),[3,4];case 4:return[2]}})})},[r,a,l,g,y]),x=function(t){return Xe(n,void 0,Promise,function(){return Ke(this,function(e){return[2,new Promise(function(e){try{var n=document.createElement("canvas"),i=n.getContext("2d");if(!i)return void e(null);var o=new Image;o.onload=function(){var t=595.28,a=841.89;n.width=t,n.height=a,i.fillStyle="#ffffff",i.fillRect(0,0,t,a);var s,l,u,c,h=o.width/o.height;h>.7070757462376319?l=(s=476.224)/h:s=(l=.6*a)*h,u=(t-s)/2,c=(a-l)/2,i.drawImage(o,u,c,s,l),i.fillStyle="#333333",i.font="16px Arial",i.textAlign="center",i.fillText(r||"Chart Export",297.64,c-20),e(n.toDataURL("image/png"))},o.onerror=function(){e(null)},o.src=t}catch(t){e(null)}})]})})},w=(0,o.useCallback)(function(){var t,e=v.current;if(!e)return null;try{return(null===(t=e.getOption)||void 0===t?void 0:t.call(e))||null}catch(t){return null}},[]),S=(0,o.useCallback)(function(){var t,e=v.current;if(e)try{return null===(t=e.getSvgData)||void 0===t?void 0:t.call(e)}catch(t){return}},[]),C=(0,o.useCallback)(function(t){return Xe(n,void 0,Promise,function(){var e,n,i,o,a,s,l,u,c,h;return Ke(this,function(p){if(g(),!(e=v.current))return[2];i=(n=t||{}).filename,o=n.dataKey,a=i||r||Je("data");try{if(!(s=null===(h=e.getOption)||void 0===h?void 0:h.call(e)))return[2];l=s,o&&"object"==typeof l&&(l=l[o]||l),(u=en(l,{includeLabels:d}))&&(c=function(t){return new Blob([t],{type:"text/csv;charset=utf-8;"})}(u,"".concat(a,".csv")),$e(c,"".concat(a,".csv")),y(c))}catch(t){}return[2]})})},[r,g,y]),T=(0,o.useCallback)(function(t){return Xe(n,void 0,Promise,function(){var e,n,i,o,a,s,l,u,c,h;return Ke(this,function(d){if(g(),!(e=v.current))return[2];i=(n=t||{}).filename,o=n.dataKey,a=i||r||Je("data");try{if(!(s=null===(h=e.getOption)||void 0===h?void 0:h.call(e)))return[2];l=s,o&&"object"==typeof l&&(l=l[o]||l),u=function(t){var e,n,r;if(!t)return"{}";if(t.series){var i={title:null===(e=t.title)||void 0===e?void 0:e.text,legend:null===(n=t.legend)||void 0===n?void 0:n.data,xAxis:null===(r=t.xAxis)||void 0===r?void 0:r.data,series:t.series.map(function(t){var e;return{name:t.name,type:t.type,data:null===(e=t.data)||void 0===e?void 0:e.map(function(t){return"object"==typeof t?t[1]:t})}})};return JSON.stringify(i,null,2)}return JSON.stringify(t,null,2)}(l),u&&(c=function(t){return new Blob([t],{type:"application/json;charset=utf-8;"})}(u,"".concat(a,".json")),$e(c,"".concat(a,".json")),y(c))}catch(t){}return[2]})})},[r,g,y]),k=(0,o.useCallback)(function(t){return Xe(n,void 0,Promise,function(){var e,n,r,i,o,a;return Ke(this,function(s){switch(s.label){case 0:switch(n=(e=t||{}).format,r=e.filename,i=e.pixelRatio,o=e.backgroundColor,a=n||c){case"png":case"jpeg":return[3,1];case"svg":return[3,3];case"pdf":return[3,5]}return[3,7];case 1:return[4,_({format:a,filename:r,pixelRatio:i,backgroundColor:o})];case 2:return s.sent(),[3,8];case 3:return[4,_({format:"svg",filename:r})];case 4:return s.sent(),[3,8];case 5:return[4,b({filename:r,pixelRatio:i,backgroundColor:o})];case 6:return s.sent(),[3,8];case 7:s.label=8;case 8:return[2]}})})},[c,_,b]);return{downloadImage:_,downloadCSV:C,downloadJSON:T,downloadPDF:b,getImageDataUrl:m,getChartData:w,getSvgData:S,exportChart:k}}var rn=function(){return rn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},rn.apply(this,arguments)},on=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function an(t){var e=t.data,n=t.chartType,r=t.mapping,i=void 0===r?{}:r,a=t.extraConfig,s=void 0===a?{}:a;return(0,o.useMemo)(function(){switch(n){case"line":case"bar":return function(t,e,n,r){var i,o=n||{},a=o.xField,s=void 0===a?"name":a,l=o.yField,u=void 0===l?"value":l,c=o.seriesField,h=t.categories||(null===(i=t.rows)||void 0===i?void 0:i.map(function(t){return String(t[s])}))||[],d=t.series||t.rows||[];if(c){var p=new Map;d.forEach(function(t){var e=String(t[c]||"default");p.has(e)||p.set(e,[]),p.get(e).push(t)});var f=Array.from(p.entries()).map(function(t){var n=t[0],r=t[1];return{name:n,type:e,data:r.map(function(t){var e;return null!==(e=t[u])&&void 0!==e?e:0})}});return rn({xAxis:{type:"category",data:h},yAxis:{type:"value"},series:f},r)}var v=[{type:e,data:d.map(function(t){var e;return null!==(e=t[u])&&void 0!==e?e:0})}];return rn({xAxis:{type:"category",data:h},yAxis:{type:"value"},series:v},r)}(e,n,i,s);case"pie":return function(t,e,n){var r=e||{},i=r.nameField,o=void 0===i?"name":i,a=r.valueField,s=void 0===a?"value":a,l=(t.series||t.rows||[]).map(function(t){return{name:String(t[o]||""),value:Number(t[s])||0}});return rn({series:[{type:"pie",radius:"60%",data:l}]},n)}(e,i,s);case"scatter":return function(t,e,n){var r=e||{},i=r.xField,o=void 0===i?"x":i,a=r.yField,s=void 0===a?"y":a,l=r.sizeField,u=(t.series||t.rows||[]).map(function(t){var e=t,n=[Number(e[o])||0,Number(e[s])||0];return l&&n.push(Number(e[l])||1),n});return rn({xAxis:{type:"value",scale:!0},yAxis:{type:"value",scale:!0},series:[{type:"scatter",data:u}]},n)}(e,i,s);case"radar":return function(t,e,n){var r=e||{},i=r.nameField,o=void 0===i?"name":i,a=r.valueField,s=void 0===a?"value":a,l=(t.series||t.rows||[]).map(function(t){var e=t;return{name:String(e[o]||""),max:Math.max(Number(e[s])||100,100)}}),u=(t.series||t.rows||[]).map(function(t){return Number(t[s])||0});return rn({radar:{indicator:l},series:[{type:"radar",data:[{value:u}]}]},n)}(e,i,s);case"heatmap":return function(t,e,n){var r=e||{},i=r.xField,o=void 0===i?"x":i,a=r.yField,s=void 0===a?"y":a,l=r.valueField,u=void 0===l?"value":l,c=on([],new Set((t.series||t.rows||[]).map(function(t){return String(t[o])})),!0),h=on([],new Set((t.series||t.rows||[]).map(function(t){return String(t[s])})),!0),d=(t.series||t.rows||[]).map(function(t){var e=t;return[c.indexOf(String(e[o])),h.indexOf(String(e[s])),Number(e[u])||0]});return rn({xAxis:{type:"category",data:c},yAxis:{type:"category",data:h},visualMap:{min:0,calculable:!0},series:[{type:"heatmap",data:d}]},n)}(e,i,s);default:return{}}},[e,n,i,s])}function sn(t){var e=t.data,n=t.columns,r=void 0===n?[]:n,i=t.transpose,a=void 0!==i&&i,s=t.extraConfig,l=void 0===s?{}:s;return(0,o.useMemo)(function(){if(!e||0===e.length)return{};var t=e[0],n=r.length>0?r.map(function(t){return t.field}):Object.keys(t),i=new Map(r.map(function(t){return[t.field,t]})),o=a?n:e.map(function(t){return String(t[n[0]]||"")}),s=(a?n:n.slice(1)).map(function(t){var n="string"==typeof t?t:"",r=i.get(n),o=e.map(function(t){return Number(t[n])||0});return{name:(null==r?void 0:r.label)||n,type:"bar",data:o,itemStyle:(null==r?void 0:r.color)?{color:r.color}:void 0}});return rn({xAxis:{type:"category",data:o},yAxis:{type:"value"},series:s},l)},[e,r,a,l])}function ln(t){var e=t.data,n=t.dateField,r=t.valueField,i=t.groupField,a=t.period,s=void 0===a?"day":a,l=t.aggregation,u=void 0===l?"sum":l,c=t.fillMissing,h=void 0===c?"forward":c,d=t.extraConfig,p=void 0===d?{}:d;return(0,o.useMemo)(function(){if(!e||0===e.length)return{};var t=function(t,e,n){return t.reduce(function(t,r){var i,o=new Date(String(r[e]));switch(n){case"day":default:i=o.toISOString().split("T")[0];break;case"week":var a=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+4-n);var r=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-r.getTime())/864e5+1)/7)}(o);i="".concat(o.getFullYear(),"-W").concat(a);break;case"month":i="".concat(o.getFullYear(),"-").concat(String(o.getMonth()+1).padStart(2,"0"));break;case"quarter":i="".concat(o.getFullYear(),"-Q").concat(Math.ceil((o.getMonth()+1)/3));break;case"year":i=String(o.getFullYear())}return t[i]||(t[i]=[]),t[i].push(r),t},{})}(e,n,s),o=Object.keys(t).sort();if(i){var a=new Set(e.map(function(t){return String(t[i])})),l=Array.from(a).map(function(e){var n=o.map(function(n){var o;return un((null===(o=t[n])||void 0===o?void 0:o.filter(function(t){return String(t[i])===e}))||[],r,u,h)});return{name:e,type:"line",data:n,smooth:!0}});return rn({xAxis:{type:"category",data:o},yAxis:{type:"value"},series:l},p)}var c=o.map(function(e){return un(t[e]||[],r,u,h)});return rn({xAxis:{type:"category",data:o},yAxis:{type:"value"},series:[{type:"line",data:c,smooth:!0}]},p)},[e,n,r,i,s,u,h,p])}function un(t,e,n,r){if(0===t.length)return"zero"===r?0:NaN;var i=t.map(function(t){return Number(t[e])||0});switch(n){case"sum":for(var o=0,a=0;a<i.length;a++)o+=i[a];return o;case"average":if(0===i.length)return 0;for(o=0,a=0;a<i.length;a++)o+=i[a];return o/i.length;case"max":var s=i[0];for(a=1;a<i.length;a++)i[a]>s&&(s=i[a]);return s;case"min":var l=i[0];for(a=1;a<i.length;a++)i[a]<l&&(l=i[a]);return l;case"count":return i.length;case"first":default:return i[0];case"last":return i[i.length-1]}}var cn=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},hn=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},dn=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function pn(t,e){var n=this,r=(0,o.useState)(null),i=r[0],a=r[1],s=(0,o.useState)(!1),l=s[0],u=s[1],c=(0,o.useRef)(e);return c.current=e,(0,o.useEffect)(function(){if(t.current&&!i){return cn(n,void 0,void 0,function(){var t;return hn(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,(0,mt.cK)(c.current||{})];case 1:return t=e.sent(),a(t),u(!0),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})}),function(){var t;if(i){try{var e=i;(null===(t=e.isDisposed)||void 0===t?void 0:t.call(e))||e.dispose()}catch(t){}a(null),u(!1)}}}},[t]),[i,a,l]}function fn(t,e,n){var r=n||{},i=r.notMerge,a=void 0!==i&&i,s=r.lazyUpdate,l=void 0!==s&&s,u=r.replaceMerge,c=r.deps,h=void 0===c?[]:c;(0,o.useEffect)(function(){if(t&&e)try{t.setOption(e,a,l)}catch(t){}},dn([t,e,a,l,u],h,!0))}function vn(t,e){var n=e||{},r=n.delay,i=void 0===r?300:r,a=n.minWidth,s=n.minHeight,l=n.enabled,u=void 0===l||l,c=(0,o.useRef)();(0,o.useEffect)(function(){var e;if(t&&u){var n=function(){c.current&&clearTimeout(c.current),c.current=setTimeout(function(){var e,n;try{var r=null===(e=t.getDom)||void 0===e?void 0:e.call(t);if(r){var i=r.clientWidth,o=r.clientHeight;if(a&&i<a)return;if(s&&o<s)return}null===(n=t.resize)||void 0===n||n.call(t)}catch(t){}},i)};window.addEventListener("resize",n);var r=null===(e=t.getDom)||void 0===e?void 0:e.call(t);if(r&&"undefined"!=typeof ResizeObserver){var o=new ResizeObserver(n);return o.observe(r),function(){o.disconnect(),window.removeEventListener("resize",n),c.current&&clearTimeout(c.current)}}return function(){window.removeEventListener("resize",n),c.current&&clearTimeout(c.current)}}},[t,i,a,s,u])}function gn(t,e){(0,o.useEffect)(function(){if(t&&e){var n=Object.entries(e);return n.forEach(function(e){var n=e[0],r=e[1];try{t.on(n,r)}catch(t){}}),function(){n.forEach(function(e){var n=e[0],r=e[1];try{t.off(n,r)}catch(t){}})}}},[t,e])}function yn(t,e,n){(0,o.useEffect)(function(){if(t)try{e?t.showLoading(n):t.hideLoading()}catch(t){}},[t,e,n])}function mn(t,e){return void 0===e&&(e=!1),(0,o.useMemo)(function(){if("string"==typeof t)try{return Yt(t)||(e?"dark":t)}catch(n){return e?"dark":t}return t},[t,e])}function _n(t,e){return(0,o.useMemo)(function(){return!t||Array.isArray(t)&&0===t.length?{}:e(t)},[t,e])}function bn(t){var e=t||{},n=e.breakpoints,r=void 0===n?{xs:0,sm:576,md:768,lg:992,xl:1200}:n,i=e.defaultBreakpoint,a=void 0===i?"md":i,s=(0,o.useState)(a),l=s[0],u=s[1],c=(0,o.useState)({width:0,height:0}),h=c[0],d=c[1];return(0,o.useEffect)(function(){var t=function(){var t=window.innerWidth;d({width:t,height:window.innerHeight});var e="xs";t>=r.xl?e="xl":t>=r.lg?e="lg":t>=r.md?e="md":t>=r.sm&&(e="sm"),u(e)};return t(),window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}},[r]),{breakpoint:l,windowSize:h}}function xn(t){void 0===t&&(t="default");var e=(0,o.useState)(t),n=e[0],r=e[1],i=(0,o.useState)(!1),a=i[0],s=i[1];return{theme:n,isDark:a,switchTheme:(0,o.useCallback)(function(t){r(t),"string"==typeof t&&s("dark"===t||t.includes("dark"))},[]),toggleDark:(0,o.useCallback)(function(){s(function(t){return!t}),r(function(t){return"dark"===t?"default":"dark"})},[]),setTheme:r}}function wn(t,e){var n=this,r=e||{},i=r.interval,a=void 0===i?5e3:i,s=r.autoStart,l=void 0!==s&&s,u=r.retryCount,c=void 0===u?3:u,h=r.retryDelay,d=void 0===h?1e3:h,p=(0,o.useState)(null),f=p[0],v=p[1],g=(0,o.useState)(l),y=g[0],m=g[1],_=(0,o.useState)(null),b=_[0],x=_[1],w=(0,o.useRef)({cancelled:!1}),S=(0,o.useCallback)(function(){return cn(n,void 0,void 0,function(){var e,n,r,i,o;return hn(this,function(a){switch(a.label){case 0:w.current.cancelled=!0,w.current={cancelled:!1},e=w.current,n=c,m(!0),x(null),a.label=1;case 1:if(!(n>0)||e.cancelled)return[3,9];a.label=2;case 2:return a.trys.push([2,4,,8]),[4,t()];case 3:return i=a.sent(),e.cancelled||(v(i),m(!1)),[2];case 4:return r=a.sent(),--n<=0||e.cancelled?(e.cancelled||x(r),m(!1),[2]):[3,5];case 5:return[4,new Promise(function(t){return setTimeout(t,d)})];case 6:a.sent(),a.label=7;case 7:return[3,8];case 8:return[3,1];case 9:if(!(c<=0)||e.cancelled)return[3,14];a.label=10;case 10:return a.trys.push([10,12,,13]),[4,t()];case 11:return i=a.sent(),e.cancelled||(v(i),m(!1)),[3,13];case 12:return o=a.sent(),e.cancelled||(x(o),m(!1)),[3,13];case 13:return[2];case 14:return e.cancelled||(x(new Error("All retries failed")),m(!1)),[2]}})})},[t,c,d]);return(0,o.useEffect)(function(){if(l&&S(),a>0){var t=setInterval(S,a);return function(){clearInterval(t),w.current.cancelled=!0}}return function(){w.current.cancelled=!0}},[a,l,S]),{data:f,loading:y,error:b,refresh:(0,o.useCallback)(function(){S()},[S])}}function Sn(t){var e=(0,o.useState)(!1),n=e[0],r=e[1],i=(0,o.useCallback)(function(){t.current&&(n?document.exitFullscreen&&document.exitFullscreen():t.current.requestFullscreen&&t.current.requestFullscreen())},[t,n]);return(0,o.useEffect)(function(){var t=function(){r(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",t),function(){return document.removeEventListener("fullscreenchange",t)}},[]),{isFullscreen:n,toggle:i}}function Cn(t){var e=t;return{exportImage:(0,o.useCallback)(function(t){var n;if(!e)return null;var r=t||{},i=r.type,o=void 0===i?"png":i,a=r.pixelRatio,s=void 0===a?2:a,l=r.backgroundColor;return null===(n=e.getDataURL)||void 0===n?void 0:n.call(e,{type:o,pixelRatio:s,backgroundColor:l})},[e]),exportSVG:(0,o.useCallback)(function(){var t;return e?null===(t=e.getSvgData)||void 0===t?void 0:t.call(e):null},[e]),exportCSV:(0,o.useCallback)(function(t){var n;return e?null===(n=e.getCompressedDataURL)||void 0===n?void 0:n.call(e,t):null},[e])}}function Tn(t){var e=t;return{getInstance:(0,o.useCallback)(function(){return t},[t]),clear:(0,o.useCallback)(function(){var t;null===(t=null==e?void 0:e.clear)||void 0===t||t.call(e)},[e]),repaint:(0,o.useCallback)(function(){var t;null===(t=null==e?void 0:e.resize)||void 0===t||t.call(e)},[e]),dispatchAction:(0,o.useCallback)(function(t){var n;null===(n=null==e?void 0:e.dispatchAction)||void 0===n||n.call(e,t)},[e]),showTip:(0,o.useCallback)(function(t,n){var r;null===(r=null==e?void 0:e.dispatchAction)||void 0===r||r.call(e,{type:"showTip",seriesIndex:t,dataIndex:n})},[e]),hideTip:(0,o.useCallback)(function(){var t;null===(t=null==e?void 0:e.dispatchAction)||void 0===t||t.call(e,{type:"hideTip"})},[e]),zoom:(0,o.useCallback)(function(t,n){var r;null===(r=null==e?void 0:e.dispatchAction)||void 0===r||r.call(e,{type:"dataZoom",start:null!=t?t:0,end:null!=n?n:100})},[e])}}var kn="taroviz",In="1.7.0";module.exports=r})();