@agions/taroviz 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -41
- package/dist/cjs/index.js +1 -0
- package/dist/esm/index.js +9103 -0
- package/package.json +99 -10
- package/src/adapters/__tests__/index.test.ts +2 -2
- package/src/adapters/h5/index.ts +1 -1
- package/src/adapters/index.ts +99 -167
- package/src/charts/bar/index.tsx +2 -11
- package/src/charts/common/BaseChartWrapper.tsx +2 -2
- package/src/charts/funnel/index.tsx +2 -17
- package/src/charts/gauge/index.tsx +2 -17
- package/src/charts/heatmap/index.tsx +2 -17
- package/src/charts/index.ts +6 -1
- package/src/charts/line/index.tsx +2 -11
- package/src/charts/pie/index.tsx +3 -6
- package/src/charts/radar/index.tsx +2 -17
- package/src/charts/sankey/index.tsx +18 -0
- package/src/charts/scatter/index.tsx +2 -17
- package/src/charts/sunburst/index.tsx +18 -0
- package/src/charts/treemap/index.tsx +18 -0
- package/src/charts/types.ts +761 -30
- package/src/charts/utils.ts +1 -1
- package/src/core/__tests__/platform.test.ts +1 -1
- package/src/core/animation/AnimationManager.ts +2 -2
- package/src/core/components/Annotation.tsx +346 -0
- package/src/core/components/BaseChart.tsx +12 -18
- package/src/core/components/ErrorBoundary.tsx +153 -0
- package/src/core/components/LazyChart.tsx +200 -0
- package/src/core/echarts.ts +80 -0
- package/src/core/index.ts +4 -1
- package/src/core/themes/ThemeManager.ts +628 -0
- package/src/core/utils/__tests__/common.test.ts +1 -1
- package/src/core/utils/chartInstances.ts +2 -2
- package/src/core/utils/codeGenerator/CodeGenerator.ts +2 -2
- package/src/core/utils/codeGenerator/types.ts +0 -2
- package/src/core/utils/configGenerator/ConfigGenerator.ts +12 -12
- package/src/core/utils/debug/DebugPanel.tsx +1 -1
- package/src/core/utils/debug/debugger.ts +1 -1
- package/src/core/utils/export/ExportUtils.ts +385 -0
- package/src/core/utils/index.ts +1 -1
- package/src/core/utils/performance/PerformanceAnalyzer.ts +5 -5
- package/src/editor/ThemeEditor.tsx +9 -9
- package/src/hooks/index.ts +441 -61
- package/src/index.ts +72 -4
- package/src/main.tsx +1 -1
- package/src/themes/index.ts +651 -256
- package/dist/index.esm.js +0 -68685
package/README.md
CHANGED
|
@@ -16,28 +16,35 @@
|
|
|
16
16
|
</p>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
## 📢 最新版本 v1.
|
|
19
|
+
## 📢 最新版本 v1.3.0
|
|
20
20
|
|
|
21
|
-
我们很高兴地宣布 TaroViz v1.
|
|
21
|
+
我们很高兴地宣布 TaroViz v1.3.0 已正式发布!查看 [更新日志](./CHANGELOG.md) 了解详细信息。
|
|
22
22
|
|
|
23
23
|
## 📚 文档
|
|
24
24
|
|
|
25
|
-
- [
|
|
26
|
-
- [
|
|
27
|
-
- [
|
|
28
|
-
- [示例](
|
|
29
|
-
- [
|
|
25
|
+
- [在线文档](https://agions.github.io/TaroViz/)
|
|
26
|
+
- [快速开始](https://agions.github.io/TaroViz/guide/)
|
|
27
|
+
- [API文档](https://agions.github.io/TaroViz/api/)
|
|
28
|
+
- [示例](https://agions.github.io/TaroViz/examples/)
|
|
29
|
+
- [迁移指南](https://agions.github.io/TaroViz/migration/)
|
|
30
30
|
|
|
31
31
|
## 特性
|
|
32
32
|
|
|
33
|
-
- 📊 **丰富的图表类型** -
|
|
34
|
-
- 📱 **多端适配支持** -
|
|
35
|
-
- 🎨 **灵活的主题定制** -
|
|
33
|
+
- 📊 **丰富的图表类型** - 支持折线图、柱状图、饼图、散点图、雷达图、热力图、仪表盘、漏斗图、矩形树图、旭日图、桑基图等多种图表类型
|
|
34
|
+
- 📱 **多端适配支持** - 支持微信小程序、支付宝小程序、百度小程序、字节跳动小程序、HarmonyOS 和 H5
|
|
35
|
+
- 🎨 **灵活的主题定制** - 内置 10+ 预设主题,支持自定义主题和动态主题切换
|
|
36
36
|
- 📦 **单包架构设计** - 简化依赖管理,方便使用
|
|
37
|
-
- 🚀 **高性能渲染** - 基于 ECharts
|
|
38
|
-
-
|
|
39
|
-
-
|
|
37
|
+
- 🚀 **高性能渲染** - 基于 ECharts 优化,支持懒加载和渐进式渲染
|
|
38
|
+
- ⚡ **性能分析工具** - 支持帧率监控和内存使用分析
|
|
39
|
+
- 🛡️ **错误边界** - 内置 ErrorBoundary 组件,防止图表渲染错误影响应用
|
|
40
|
+
- 🪝 **懒加载支持** - 支持图表组件懒加载,优化首屏加载速度
|
|
41
|
+
- 🎯 **标注系统** - 支持 MarkLine、MarkArea 等标注,预设平均线、警戒线等样式
|
|
42
|
+
- 📤 **导出功能** - 支持导出为 PNG、JPEG、SVG、PDF 等格式
|
|
43
|
+
- 🎯 **易用的 React Hooks** - 提供 useChart、useResize、useResponsive、useThemeSwitcher 等 Hooks
|
|
40
44
|
- 📖 **完善的类型定义** - 完整的 TypeScript 类型支持,提升开发体验
|
|
45
|
+
- 🛠️ **图表配置生成器** - 支持快速生成 ECharts 配置
|
|
46
|
+
- 🛠️ **代码示例生成器** - 支持 React、Vue、Vanilla 框架
|
|
47
|
+
- 📚 **完善的文档系统** - 包含在线示例和使用指南
|
|
41
48
|
|
|
42
49
|
## 快速开始
|
|
43
50
|
|
|
@@ -97,29 +104,32 @@ export default App;
|
|
|
97
104
|
|
|
98
105
|
TaroViz 支持以下图表类型:
|
|
99
106
|
|
|
100
|
-
| 图表类型 | 描述
|
|
101
|
-
|
|
102
|
-
| 折线图
|
|
103
|
-
| 柱状图
|
|
104
|
-
| 饼图
|
|
105
|
-
| 散点图
|
|
106
|
-
| 雷达图
|
|
107
|
-
| 热力图
|
|
108
|
-
| 仪表盘
|
|
109
|
-
| 漏斗图
|
|
107
|
+
| 图表类型 | 描述 | 组件名 |
|
|
108
|
+
| -------- | ---------------------------------- | ---------------- |
|
|
109
|
+
| 折线图 | 用于展示数据随时间或类别变化的趋势 | `LineChart` |
|
|
110
|
+
| 柱状图 | 用于比较不同类别的数据大小 | `BarChart` |
|
|
111
|
+
| 饼图 | 用于展示数据占比关系 | `PieChart` |
|
|
112
|
+
| 散点图 | 用于展示两个变量之间的关系 | `ScatterChart` |
|
|
113
|
+
| 雷达图 | 用于展示多维度数据 | `RadarChart` |
|
|
114
|
+
| 热力图 | 用于展示数据密度和分布 | `HeatmapChart` |
|
|
115
|
+
| 仪表盘 | 用于展示单一指标的进度或状态 | `GaugeChart` |
|
|
116
|
+
| 漏斗图 | 用于展示流程中各阶段的数据转化 | `FunnelChart` |
|
|
117
|
+
| 矩形树图 | 用于展示带有层级结构的数据 | `TreeMapChart` |
|
|
118
|
+
| 旭日图 | 用于展示多层级数据的占比关系 | `SunburstChart` |
|
|
119
|
+
| 桑基图 | 用于展示数据流向和转移关系 | `SankeyChart` |
|
|
110
120
|
|
|
111
121
|
## 架构说明
|
|
112
122
|
|
|
113
123
|
TaroViz 采用单包架构设计,包含以下核心模块:
|
|
114
124
|
|
|
115
|
-
| 模块
|
|
116
|
-
|
|
|
117
|
-
| core
|
|
118
|
-
| adapters
|
|
119
|
-
| charts
|
|
120
|
-
| hooks
|
|
121
|
-
| themes
|
|
122
|
-
| utils
|
|
125
|
+
| 模块 | 描述 |
|
|
126
|
+
| -------- | -------------------------------------- |
|
|
127
|
+
| core | 核心功能和类型定义 |
|
|
128
|
+
| adapters | 多平台适配器,处理不同平台的差异 |
|
|
129
|
+
| charts | 各种图表组件的实现 |
|
|
130
|
+
| hooks | React Hooks,提供便捷的状态管理 |
|
|
131
|
+
| themes | 主题系统,支持多种内置主题和自定义主题 |
|
|
132
|
+
| utils | 工具函数和数据处理工具 |
|
|
123
133
|
|
|
124
134
|
## 详细示例
|
|
125
135
|
|
|
@@ -316,14 +326,15 @@ pnpm run docs:api
|
|
|
316
326
|
|
|
317
327
|
## 兼容性
|
|
318
328
|
|
|
319
|
-
| 平台
|
|
320
|
-
|
|
321
|
-
| 微信小程序
|
|
322
|
-
| 支付宝小程序
|
|
323
|
-
| 百度小程序
|
|
324
|
-
| 字节跳动小程序 | ✅ 支持
|
|
325
|
-
|
|
|
326
|
-
|
|
|
329
|
+
| 平台 | 支持情况 |
|
|
330
|
+
| -------------- | ----------- |
|
|
331
|
+
| 微信小程序 | ✅ 支持 |
|
|
332
|
+
| 支付宝小程序 | ✅ 支持 |
|
|
333
|
+
| 百度小程序 | ✅ 支持 |
|
|
334
|
+
| 字节跳动小程序 | ✅ 支持 |
|
|
335
|
+
| HarmonyOS | ✅ 支持 |
|
|
336
|
+
| H5 | ✅ 支持 |
|
|
337
|
+
| React Native | ⚠️ 部分支持 |
|
|
327
338
|
|
|
328
339
|
## 贡献指南
|
|
329
340
|
|
|
@@ -350,8 +361,9 @@ pnpm run docs:api
|
|
|
350
361
|
如果您在使用过程中遇到问题,可以通过以下方式获取帮助:
|
|
351
362
|
|
|
352
363
|
- [GitHub Issues](https://github.com/agions/taroviz/issues) - 提交问题和建议
|
|
353
|
-
- [
|
|
354
|
-
- [示例](
|
|
364
|
+
- [在线文档](https://agions.github.io/TaroViz/) - 查看详细文档
|
|
365
|
+
- [示例](https://agions.github.io/TaroViz/examples/) - 参考使用示例
|
|
366
|
+
- [贡献指南](https://agions.github.io/TaroViz/contributing/) - 了解如何贡献代码
|
|
355
367
|
|
|
356
368
|
## 致谢
|
|
357
369
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={123(e,t,n){n.d(t,{A:()=>s});var r=n(163),o=n(348),a=n(613),i=n(15),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};o.use([r.GridComponent,r.TooltipComponent,r.TitleComponent,r.LegendComponent,a.CanvasRenderer,a.SVGRenderer]);const s=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,n;if(this.instance)return this.instance;var r=(null===(t=this.containerRef)||void 0===t?void 0:t.current)||document.getElementById(this.canvasId);return r?(this.instance=o.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):{}},e.prototype.getInstance=function(){return this.instance},e.prototype.setOption=function(e,t){this.instance?this.instance.setOption(e,c({lazyUpdate:!0},t)):this.options.option=e},e.prototype.setTheme=function(e){var t,n;this.options.theme=e,this.instance&&(null===(n=(t=this.instance).setTheme)||void 0===n||n.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,n=void 0===t?"100%":t,r=e.height,o=void 0===r?"300px":r,a=e.style,s=void 0===a?{}:a,l=e.direction,u=void 0===l?"ltr":l;return i.createElement("div",{id:this.canvasId,ref:this.containerRef,style:c({width:n,height:o,direction:u},s)})},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,n){n.d(t,{A:()=>a});var r=n(15),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])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,n=e.width,r=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:n,height:r,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,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.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,n=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,c=e.height,s=void 0===c?"300px":c,l=e.style,u=void 0===l?{}:l;return r.createElement("view",{id:n,style:o({width:i,height:s},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,n){var r,o;n.d(t,{li:()=>c,cK:()=>l,_$:()=>s}),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"}(r||(r={})),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={}));n(251),n(524),n(930),n(123),n(999),n(85),n(280),n(382);var a,i=((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.HARMONY]={name:"HarmonyOS",requireComponent:!0},a);function c(){if("undefined"==typeof window)return o.H5;for(var e=[{test:function(){var e,t;return"wx"in window&&(null===(e=window.wx)||void 0===e?void 0:e.getSystemInfoSync)&&!(null===(t=window.wx)||void 0===t?void 0:t.qy)},platform:o.WEAPP},{test:function(){var e;return"my"in window&&(null===(e=window.my)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.ALIPAY},{test:function(){var e;return"swan"in window&&(null===(e=window.swan)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.SWAN},{test:function(){var e;return"tt"in window&&(null===(e=window.tt)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.TT},{test:function(){var e;return"qq"in window&&(null===(e=window.qq)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.QQ},{test:function(){var e;return"jd"in window&&(null===(e=window.jd)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.JD},{test:function(){var e;return"dd"in window&&(null===(e=window.dd)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.DD},{test:function(){var e;return"wx"in window&&(null===(e=window.wx)||void 0===e?void 0:e.qy)},platform:o.QYWX},{test:function(){var e,t;return"tt"in window&&"lark"===(null===(t=null===(e=window.tt)||void 0===e?void 0:e.env)||void 0===t?void 0:t.appName)},platform:o.LARK},{test:function(){return navigator.userAgent.includes("HarmonyOS")},platform:o.HARMONY}],t=0,n=e;t<n.length;t++){var r=n[t];if(r.test())return r.platform}return o.H5}function s(){var e;return"undefined"!=typeof window&&"undefined"!=typeof document?"h5":void 0!==n.g&&(null===(e=null===n.g||void 0===n.g?void 0:n.g.wx)||void 0===e?void 0:e.getSystemInfoSync)?"weapp":"unknown"}function l(e){var t=c(),r=i[t];null==r||r.requireComponent;try{return function(e,t){var r;return((r={})[o.H5]=function(){return n(123).A.create(t)},r[o.WEAPP]=function(){return n(999).A.create(t)},r[o.SWAN]=function(){return n(85).A.create(t)},r[o.TT]=function(){return n(280).A.create(t)},r[o.HARMONY]=function(){return n(382).A.create(t)},r[o.ALIPAY]=function(){return n(123).A.create(t)},r[o.QQ]=function(){return n(123).A.create(t)},r[o.JD]=function(){return n(123).A.create(t)},r[o.DD]=function(){return n(123).A.create(t)},r[o.QYWX]=function(){return n(123).A.create(t)},r[o.LARK]=function(){return n(123).A.create(t)},r)[e]()}(t,e)}catch(t){return n(123).A.create(e)}}n(123).A,n(999).A,n(85).A,n(280).A,n(382).A},85(e,t,n){n.d(t,{A:()=>a});var r=n(15),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])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,n=e.width,r=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:n,height:r,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,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.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,n=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,c=e.height,s=void 0===c?"300px":c,l=e.style,u=void 0===l?{}:l;return r.createElement("view",{id:n,style:o({width:i,height:s},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}()},280(e,t,n){n.d(t,{A:()=>a});var r=n(15),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])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,n=e.width,r=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:n,height:r,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,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.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,n=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,c=e.height,s=void 0===c?"300px":c,l=e.style,u=void 0===l?{}:l;return r.createElement("view",{id:n,style:o({width:i,height:s},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}()},999(e,t,n){n.d(t,{A:()=>a});var r=n(15),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])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,n=e.width,r=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:n,height:r,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,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.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,n=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,c=e.height,s=void 0===c?"300px":c,l=e.style,u=void 0===l?{}:l;return r.createElement("view",{id:n,style:o({width:i,height:s},u)})},e}()},188(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"bar-chart"}))}},412(e,t,n){n.d(t,{A:()=>u});var r=n(15),o=n.n(r),a=n(574),i=n(524),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};function s(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},n=c({},t);return Object.keys(e).forEach(function(r){r in t||(n[r]=e[r])}),n}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.option,n=e.width,c=void 0===n?"100%":n,u=e.height,d=void 0===u?"300px":u,f=e.theme,p=e.style,h=void 0===p?{}:p,v=e.className,m=void 0===v?"":v,g=e.autoResize,y=void 0===g||g,b=e.loading,x=void 0!==b&&b,E=e.loadingOption,C=e.onChartInit,w=e.onChartReady,I=e.renderer,T=void 0===I?"canvas":I,S=e.onEvents,k=void 0===S?{}:S,O=e.chartType,A=void 0===O?"chart":O,D=(0,r.useRef)("".concat(A,"-").concat((0,i.uR)())),R=(0,r.useRef)(null),P=(0,r.useRef)(null),L=(0,r.useMemo)(function(){return s({canvasId:D.current,containerRef:P,width:c,height:d,theme:f,autoResize:y,renderer:T,option:t})},[c,d,f,y,T,t,A]);(0,r.useEffect)(function(){var e=s(l(l({},L),{onInit:function(e){R.current=e,k&&Object.keys(k).forEach(function(t){e.on(t,k[t])}),C&&C(e),w&&w(e)}}));return(0,a.cK)(e).init(),function(){R.current&&(k&&Object.keys(k).forEach(function(e){var t;null===(t=R.current)||void 0===t||t.off(e)}),R.current.dispose(),R.current=null)}},[L,C,w,k]),(0,r.useEffect)(function(){R.current&&R.current.setOption(t,!0)},[t]),(0,r.useEffect)(function(){R.current&&(x?R.current.showLoading(E):R.current.hideLoading())},[x,E]);var z=l({width:"number"==typeof c?"".concat(c,"px"):c,height:"number"==typeof d?"".concat(d,"px"):d},h),M=(0,a.cK)(L);return o().createElement("div",{className:"taroviz-".concat(A," ").concat(m),style:z,ref:P},function(e){if(e&&"function"==typeof e.render)try{return e.render()}catch(e){}return null}(M))}},133(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"funnel-chart"}))}},334(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"gauge-chart"}))}},835(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"heatmap-chart"}))}},127(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"line-chart"}))}},481(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"pie-chart"}))}},443(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"radar-chart"}))}},490(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(15),o=n.n(r),a=n(412),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=(0,r.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sankey-chart"}))});c.displayName="SankeyChart";const s=c},589(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"scatter-chart"}))}},673(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(15),o=n.n(r),a=n(412),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=(0,r.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sunburst-chart"}))});c.displayName="SunburstChart";const s=c},37(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(15),o=n.n(r),a=n(412),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=(0,r.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"treemap-chart"}))});c.displayName="TreeMapChart";const s=c},251(e,t,n){var r;n.d(t,{ek:()=>c}),function(e){e.ANIMATION_START="animationStart",e.ANIMATION_UPDATE="animationUpdate",e.ANIMATION_END="animationEnd",e.ANIMATION_CANCEL="animationCancel",e.ANIMATION_REPEAT="animationRepeat"}(r||(r={}));var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])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||(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 n=o(o({},this.defaultConfig),e);return n.threshold&&t>n.threshold&&(n.enabled=!1),n},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 n=this.getOptimizedConfig(e,t);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}},e.prototype.on=function(e,t){var n;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(n=this.eventHandlers.get(e))||void 0===n||n.add(t)},e.prototype.off=function(e,t){var n;t?null===(n=this.eventHandlers.get(e))||void 0===n||n.delete(t):this.eventHandlers.delete(e)},e.prototype.emit=function(e,t){var n=this.eventHandlers.get(e);n&&n.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.updatePerformanceConfig=function(e){this.performanceConfig=o(o({},this.performanceConfig),e)},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 c(e,t){return void 0===e&&(e={}),void 0===t&&(t=0),i.getInstance().generateEChartsAnimationConfig(e,t)}i.getInstance()},930(e,t,n){var r=n(348);const o=require("echarts/charts");var a=n(163),i=n(613),c=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};r.use(i.CanvasRenderer);var s=[o.PieChart,o.LineChart,o.BarChart,o.GaugeChart,o.ScatterChart,o.RadarChart,o.HeatmapChart,o.FunnelChart],l=[a.TitleComponent,a.TooltipComponent,a.LegendComponent,a.GridComponent,a.DataZoomComponent,a.VisualMapComponent];r.use(c(c([],s,!0),l,!0))},524(e,t,n){n.d(t,{sg:()=>x,$N:()=>b,AZ:()=>y,ZV:()=>w,w5:()=>I,uc:()=>C,t2:()=>m,m_:()=>v,nF:()=>E,uR:()=>h});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function a(e,t){void 0===t&&(t={});var n=t.locale,a=void 0===n?"zh-CN":n,i=t.timeZone,c=void 0===i?"Asia/Shanghai":i,s=o(t,["locale","timeZone"]),l="string"==typeof e||"number"==typeof e?new Date(e):e;return new Intl.DateTimeFormat(a,r({timeZone:c},s)).format(l)}function i(e,t){return void 0===t&&(t={}),a(e,r(r({},t),{timeStyle:void 0,hour:void 0,minute:void 0,second:void 0,fractionalSecondDigits:void 0}))}function c(e,t){return void 0===t&&(t={}),a(e,r(r({},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 s(e,t){var n=t.locale,r=void 0===n?"zh-CN":n,o=t.currency,a=t.currencyDisplay,i=void 0===a?"symbol":a,c=t.digits,s=void 0===c?2:c,l=t.useGrouping,u=void 0===l||l;return new Intl.NumberFormat(r,{style:"currency",currency:o,currencyDisplay:i,minimumFractionDigits:s,maximumFractionDigits:s,useGrouping:u}).format(e)}function l(e,t){void 0===t&&(t={});var n=t.locale,r=void 0===n?"zh-CN":n,o=t.digits,a=void 0===o?2:o,i=t.useGrouping,c=void 0===i||i;return new Intl.NumberFormat(r,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:c}).format(e)}function u(e,t){void 0===t&&(t={});var n=t.locale,a=void 0===n?"zh-CN":n,i=t.digits,c=void 0===i?2:i,s=t.useGrouping,l=void 0===s||s,u=o(t,["locale","digits","useGrouping"]);return new Intl.NumberFormat(a,r({minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:l},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,r(r({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatDate=function(e,t){return void 0===t&&(t={}),i(e,r(r({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatTime=function(e,t){return void 0===t&&(t={}),c(e,r(r({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatCurrency=function(e,t){return s(e,r(r({},t),{locale:this.locale}))},e.prototype.formatPercent=function(e,t){return void 0===t&&(t={}),l(e,r(r({},t),{locale:this.locale}))},e.prototype.formatNumber=function(e,t){return void 0===t&&(t={}),u(e,r(r({},t),{locale:this.locale}))},e}();new p;function h(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function v(){return Math.random().toString(36).substring(2,10)}function m(e){return"".concat(e,"-").concat(v())}var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])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 n=g({},e);return Object.keys(t).forEach(function(r){t[r]instanceof Object&&r in e&&e[r]instanceof Object?n[r]=b(e[r],t[r]):n[r]=t[r]}),n}function x(e,t){var n=null;return function(){for(var r=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout(function(){e.apply(r,o),n=null},t)}}function E(e,t){var n=0;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=Date.now();a-n>=t&&(e.apply(this,r),n=a)}}function C(){var e="undefined"==typeof window,t=!e,n=void 0!==window.wx&&"function"==typeof window.wx.getSystemInfoSync,r=void 0!==window.my&&"function"==typeof window.my.getSystemInfoSync;return{isServer:e,isClient:t,isWeapp:n,isAlipay:r,isWeb:t&&!n&&!r}}function w(e,t,n){void 0===t&&(t=2),void 0===n&&(n={});var r=n.useGrouping,o=void 0===r||r,a=n.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 n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{AnnotationPresets:()=>He,BarChart:()=>T.default,BaseChart:()=>C,ErrorBoundary:()=>pe,FunnelChart:()=>R.default,GaugeChart:()=>D.default,H5Adapter:()=>M.A,HeatmapChart:()=>A.default,LazyChartRegistry:()=>Le,LineChart:()=>I.default,PRESET_THEMES:()=>ae,PieChart:()=>S.default,RadarChart:()=>O.default,SankeyChart:()=>z.default,ScatterChart:()=>k.default,SunburstChart:()=>L.default,ThemeEditor:()=>le,TreeMapChart:()=>P.default,WeappAdapter:()=>N.A,convertAnnotationToMarkArea:()=>Me,convertAnnotationToMarkLine:()=>ze,convertAnnotationToScatter:()=>Ne,createCompositeAnnotation:()=>Fe,createLazyChart:()=>Pe,darkTheme:()=>U,debounce:()=>w.sg,deepMerge:()=>w.$N,defaultTheme:()=>F,detectPlatform:()=>c.li,events:()=>w.AZ,exportChart:()=>Ze,formatNumber:()=>w.ZV,getAdapter:()=>c.cK,getContrastColor:()=>w.w5,getDarkThemes:()=>ne,getEnv:()=>c._$,getEnvironment:()=>w.uc,getLightThemes:()=>te,getRegisteredThemes:()=>K,getTheme:()=>Y,getThemeByName:()=>X,getThemesByTag:()=>ee,name:()=>lt,prefixedId:()=>w.t2,preloadAllCharts:()=>Re,preloadChart:()=>De,registerTheme:()=>Q,shortId:()=>w.m_,switchTheme:()=>$,themeManager:()=>ie,throttle:()=>w.nF,useAnnotation:()=>je,useChart:()=>Qe,useChartData:()=>nt,useChartTheme:()=>tt,useChartTools:()=>st,useDataPolling:()=>at,useEvents:()=>$e,useExport:()=>ct,useFullscreen:()=>it,useLoading:()=>et,useOption:()=>Ke,useResize:()=>Xe,useResponsive:()=>rt,useThemeSwitcher:()=>ot,uuid:()=>w.uR,version:()=>ut,withErrorBoundary:()=>he,withLazyLoad:()=>Ae});var o,a=n(15),i=n.n(a),c=n(574),s=n(251),l={};function u(e){return l[e]}!function(e){e.PANEL_SHOW="debugPanelShow",e.PANEL_HIDE="debugPanelHide",e.TAB_CHANGE="debugPanelTabChange",e.INFO_UPDATE="debugPanelInfoUpdate"}(o||(o={}));var d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},f=function(e){var t=e.debugInfo,n=e.options,r=void 0===n?{}:n,c=e.onEvent,s=(0,a.useState)(r.autoExpand||!1),l=s[0],u=s[1],f=(0,a.useState)(r.defaultTab||"instance"),h=f[0],v=f[1],m=(0,a.useRef)(null),g=r.position,y=void 0===g?"bottom-right":g,b=r.width,x=void 0===b?400:b,E=r.height,C=void 0===E?300:E,w=function(e){v(e),null==c||c({type:o.TAB_CHANGE,data:{tab:e}})},I=function(){var e=t.instance;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"图表实例信息"),i().createElement("div",{style:p.debugInfoGrid},i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"ID:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.id)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"类型:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.type)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"版本:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.version)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"渲染器:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.renderer)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"宽度:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.width)||"N/A","px")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"高度:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.height)||"N/A","px")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"平台:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.platform)||"N/A"))))},T=function(){var e=t.config;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"配置信息"),i().createElement("div",{style:p.debugConfig},i().createElement("pre",{style:p.pre},JSON.stringify(e,null,2))))},S=function(){var e,n,r=t.data;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"数据信息"),i().createElement("div",{style:p.debugInfoGrid},i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"系列数量:"),i().createElement("span",{style:p.debugInfoValue},(null===(e=null==r?void 0:r.series)||void 0===e?void 0:e.length)||0)),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"总数据量:"),i().createElement("span",{style:p.debugInfoValue},(null==r?void 0:r.totalDataCount)||0)),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"当前数据量:"),i().createElement("span",{style:p.debugInfoValue},(null==r?void 0:r.currentDataCount)||0))),i().createElement("div",{style:p.debugDataSeries},i().createElement("h4",{style:p.h4},"系列数据"),null===(n=null==r?void 0:r.series)||void 0===n?void 0:n.map(function(e,t){var n,r;return i().createElement("div",{key:t,style:p.debugDataSeriesItem},i().createElement("h5",{style:p.h5},"系列 ",t+1,": ",e.name||"未命名"),i().createElement("pre",{style:p.pre},JSON.stringify(null===(n=e.data)||void 0===n?void 0:n.slice(0,5),null,2),"..."),i().createElement("div",{style:p.debugSeriesInfo},i().createElement("span",null,"数据量: ",(null===(r=e.data)||void 0===r?void 0:r.length)||0)))})))},k=function(){var e=t.performance;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"性能信息"),i().createElement("div",{style:p.debugInfoGrid},i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"初始化时间:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.initTime)||0,"ms")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"渲染时间:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.renderTime)||0,"ms")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"更新时间:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.updateTime)||0,"ms")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"数据大小:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.dataSize)||0," bytes")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"帧率:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.frameRate)||0," FPS"))),i().createElement("div",{style:p.debugPerformanceChart}))},O=function(){var e=t.events;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"事件信息"),i().createElement("div",{style:p.debugEventsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:p.debugEventItem},i().createElement("div",{style:p.debugEventHeader},i().createElement("span",{style:p.debugEventType},e.type),i().createElement("span",{style:p.debugEventTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:p.debugEventParams},i().createElement("pre",{style:p.pre},JSON.stringify(e.params,null,2))))}),(!e||0===e.length)&&i().createElement("div",{style:p.debugEmptyState},"暂无事件记录")))},A=function(){var e=t.errors;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"错误信息"),i().createElement("div",{style:p.debugErrorsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:p.debugErrorItem},i().createElement("div",{style:p.debugErrorHeader},i().createElement("span",{style:p.debugErrorType},e.type),i().createElement("span",{style:p.debugErrorTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:p.debugErrorMessage},e.message),e.stack&&i().createElement("div",{style:p.debugErrorStack},i().createElement("pre",{style:p.pre},e.stack)))}),(!e||0===e.length)&&i().createElement("div",{style:p.debugEmptyState},"暂无错误记录")))},D=function(){return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"调试工具"),i().createElement("div",{style:p.debugToolsGrid},i().createElement("button",{style:p.debugToolButton},"导出配置"),i().createElement("button",{style:p.debugToolButton},"导出数据"),i().createElement("button",{style:p.debugToolButton},"刷新图表"),i().createElement("button",{style:p.debugToolButton},"清空数据"),i().createElement("button",{style:p.debugToolButton},"性能分析"),i().createElement("button",{style:p.debugToolButton},"重置图表")))},R=d(d(d(d(d(d({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"}),l&&{width:x,height:C}),p.tarovizDebugPanel);return i().createElement("div",{ref:m,style:R},i().createElement("div",{style:p.debugPanelHeader},i().createElement("div",{style:p.debugPanelTitle},i().createElement("span",{style:p.debugPanelLogo},"🐛"),i().createElement("span",null,"TaroViz Debug Panel")),i().createElement("button",{style:p.debugPanelToggle,onClick:function(){var e=!l;u(e),null==c||c({type:e?o.PANEL_SHOW:o.PANEL_HIDE})},title:l?"收起":"展开"},l?"▼":"▶")),l&&i().createElement(i().Fragment,null,i().createElement("div",{style:p.debugPanelTabs},i().createElement("button",{style:d(d({},p.debugTab),"instance"===h&&p.debugTabActive),onClick:function(){return w("instance")},title:"实例信息"},"实例"),i().createElement("button",{style:d(d({},p.debugTab),"config"===h&&p.debugTabActive),onClick:function(){return w("config")},title:"配置信息"},"配置"),i().createElement("button",{style:d(d({},p.debugTab),"data"===h&&p.debugTabActive),onClick:function(){return w("data")},title:"数据信息"},"数据"),i().createElement("button",{style:d(d({},p.debugTab),"performance"===h&&p.debugTabActive),onClick:function(){return w("performance")},title:"性能信息"},"性能"),i().createElement("button",{style:d(d({},p.debugTab),"events"===h&&p.debugTabActive),onClick:function(){return w("events")},title:"事件信息"},"事件"),i().createElement("button",{style:d(d({},p.debugTab),"errors"===h&&p.debugTabActive),onClick:function(){return w("errors")},title:"错误信息"},"错误"),i().createElement("button",{style:d(d({},p.debugTab),"tools"===h&&p.debugTabActive),onClick:function(){return w("tools")},title:"调试工具"},"工具")),i().createElement("div",{style:p.debugPanelBody},function(){switch(h){case"instance":return I();case"config":return T();case"data":return S();case"performance":return k();case"events":return O();case"errors":return A();case"tools":return D();default:return i().createElement("div",null,"未知标签页")}}())))},p={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 h,v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},m=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},g=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=v(v({},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 n={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),[n],!1),this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.addError=function(e,t,n){if(this.isEnabled){var r={type:e,message:t,stack:n,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),[r],!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 n;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(n=this.eventHandlers.get(e))||void 0===n||n.add(t)},e.prototype.off=function(e,t){var n;t?null===(n=this.eventHandlers.get(e))||void 0===n||n.delete(t):this.eventHandlers.delete(e)},e.prototype.emitEvent=function(e,t){var n=this.eventHandlers.get(e);n&&n.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"}(h||(h={}));var y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},y.apply(this,arguments)},b=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},x=function(){function e(e){void 0===e&&(e={});var t,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.config=y({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){n.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 n;this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),null===(n=this.eventHandlers.get(e))||void 0===n||n.push(t)},e.prototype.off=function(e,t){var n=this.eventHandlers.get(e);if(n){var r=n.indexOf(t);r>-1&&n.splice(r,1)}},e.prototype.emit=function(e,t){var n=this.eventHandlers.get(e);null==n||n.forEach(function(n){try{n({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(h.MONITORING_START))},e.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(h.MONITORING_END))},e.prototype.startFrameRateMonitoring=function(){var e=this,t=function(){if(e.isMonitoring){var n=performance.now(),r=n-e.lastFrameTime,o=r>0?Math.round(1e3/r):0;e.frameRateHistory.push(o),e.frameRateHistory.length>60&&e.frameRateHistory.shift(),e.lastFrameTime=n,requestAnimationFrame(t)}};requestAnimationFrame(t)},e.prototype.stopFrameRateMonitoring=function(){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 n=this.frameRateHistory.reduce(function(e,t){return e+t},0)/this.frameRateHistory.length;this.recordMetric("frameRate",n,"FPS")}if((null===(t=this.config.metrics)||void 0===t?void 0:t.includes("memoryUsage"))&&void 0!==performance.memory){var r=(performance.memory.usedJSHeapSize/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(r),"MB")}}},e.prototype.recordMetric=function(e,t,n,r){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:n,timestamp:Date.now(),description:r},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(h.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={},n={},r={},o=0,a=100,i=[];this.metrics.forEach(function(a,i){if(0!==a.length){o+=a.length,r[i]=b([],a,!0);var c=a.reduce(function(e,t){return e+t.value},0);e[i]=parseFloat((c/a.length).toFixed(2)),t[i]=Math.max.apply(Math,a.map(function(e){return e.value})),n[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 c={averages:e,maxValues:t,minValues:n,trends:r,score:a,suggestions:i,totalSamples:o,duration:Date.now()-this.startTime};return this.emit(h.ANALYSIS_COMPLETE,c),c},e.prototype.generateReport=function(e){void 0===e&&(e={});var t=this.analyze(),n=y({format:"json",includeCharts:!1,includeSuggestions:!0,includeDetailedData:!1},e);switch(n.format){case"json":default:return this.generateJsonReport(t,n);case"csv":return this.generateCsvReport(t,n);case"html":return this.generateHtmlReport(t,n)}},e.prototype.generateJsonReport=function(e,t){var n={timestamp:(new Date).toISOString(),duration:e.duration,score:e.score,totalSamples:e.totalSamples};return t.includeSuggestions&&(n.suggestions=e.suggestions),t.includeDetailedData&&(n.averages=e.averages,n.maxValues=e.maxValues,n.minValues=e.minValues,n.trends=e.trends),n},e.prototype.generateCsvReport=function(e,t){var n="Metric,Type,Value,Unit\n";return Object.entries(e.averages).forEach(function(e){var t=e[0],r=e[1];n+="".concat(t,",Average,").concat(r,",ms\n")}),Object.entries(e.maxValues).forEach(function(e){var t=e[0],r=e[1];n+="".concat(t,",Max,").concat(r,",ms\n")}),Object.entries(e.minValues).forEach(function(e){var t=e[0],r=e[1];n+="".concat(t,",Min,").concat(r,",ms\n")}),n},e.prototype.generateHtmlReport=function(e,t){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(e.duration/1e3),' 秒</p>\n <div class="score">').concat(e.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(e.averages).forEach(function(t){var r=t[0],o=t[1],a=e.maxValues[r],i=e.minValues[r];n+="\n <tr>\n <td>".concat(r,"</td>\n <td>").concat(o," ms</td>\n <td>").concat(a," ms</td>\n <td>").concat(i," ms</td>\n </tr>")}),n+="\n </table>\n </div>",t.includeSuggestions&&e.suggestions.length>0&&(n+='\n <div class="suggestions">\n <h2>性能建议</h2>\n <ul>',e.suggestions.forEach(function(e){n+="\n <li>".concat(e,"</li>")}),n+="\n </ul>\n </div>"),n+="\n </body>\n </html>"},e.prototype.getIsMonitoring=function(){return this.isMonitoring},e.prototype.getConfig=function(){return y({},this.config)},e.prototype.updateConfig=function(e){this.config=y(y({},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}(),E=(x.getInstance(),function(){return E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},E.apply(this,arguments)});const C=function(e){var t=e.chartId,n=e.option,r=e.width,o=void 0===r?"100%":r,d=e.height,p=void 0===d?"300px":d,h=e.theme,v=e.autoResize,m=void 0===v||v,y=e.direction,b=void 0===y?"ltr":y,C=e.onInit,w=e.onClick,I=e.onDataZoom,T=e.style,S=e.className,k=e.children,O=e.virtualScroll,A=void 0!==O&&O,D=e.virtualScrollPageSize,R=void 0===D?100:D,P=e.virtualScrollPreloadSize,L=void 0===P?50:P,z=e.enablePerformanceMonitoring,M=void 0!==z&&z,N=e.onPerformance,j=(e.enableZoom,e.onZoom),H=e.enableDataFiltering,F=void 0!==H&&H,U=e.filters,B=void 0===U?{}:U,G=e.onDataFiltered,_=e.enableLegendInteraction,V=void 0!==_&&_,W=e.legendInteractionMode,Z=void 0===W?"single":W,q=e.onLegendSelect,J=e.onLegendUnselect,Y=(e.onLegendSelectAll,e.onLegendInverseSelect,e.enableCustomTooltip),Q=void 0!==Y&&Y,K=e.customTooltipContent,X=e.customTooltipStyle,$=e.onTooltipShow,ee=e.onTooltipHide,te=e.onExport,ne=e.linkageConfig,re=void 0===ne?{}:ne,oe=e.onDataUpdate,ae=e.dataUpdateOptions,ie=void 0===ae?{}:ae,ce=(0,a.useRef)(null),se=(0,a.useRef)(null),le=(0,a.useRef)({currentPage:0,totalPages:1,totalDataCount:0,startIndex:0,endIndex:0,isScrolling:!1}),ue=(0,a.useRef)(null),de=(0,a.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0,dataSize:0}),fe=(0,a.useRef)(n),pe=(0,a.useRef)(null),he=function(){return e.debug?"boolean"==typeof e.debug?{enabled:e.debug,autoExpand:!1}:E({enabled:!0},e.debug):null},ve=function(e){if(void 0===e&&(e={}),se.current){var t=e.type,n=void 0===t?"png":t,r=e.pixelRatio,o=void 0===r?2:r,a=e.backgroundColor,i=void 0===a?"transparent":a,c=se.current.convertToDataURL({type:n,pixelRatio:o,backgroundColor:i});return te&&c&&te(c,e),c}},me=(0,a.useRef)({exportChartToDataURL:ve,exportChart:function(e){void 0===e&&(e={});var t=ve(e);if(t){var n=e.type,r=void 0===n?"png":n,o=e.filename,a=void 0===o?"chart-".concat(Date.now()):o,i="".concat(a,".").concat(r),c=document.createElement("a");c.download=i,c.href=t,c.click()}}});i().useImperativeHandle(e,function(){return me.current});var ge=function(e,t){var r=Date.now();switch(e){case"init":if(de.current.initStartTime){de.current.initEndTime=r;var o=de.current.initEndTime-de.current.initStartTime,a=JSON.stringify(n).length;ue.current&&(ue.current.recordInitTime(o),ue.current.recordDataSize(n)),N&&N({renderTime:0,initTime:o,updateTime:0,dataSize:a})}else de.current.initStartTime=r;break;case"render":if(de.current.renderStartTime){de.current.renderEndTime=r;var i=de.current.renderEndTime-de.current.renderStartTime;a=JSON.stringify(n).length;ue.current&&ue.current.recordRenderTime(i),N&&N({renderTime:i,initTime:de.current.initEndTime-de.current.initStartTime,updateTime:0,dataSize:a})}else de.current.renderStartTime=r;break;case"update":if(de.current.updateStartTime){de.current.updateEndTime=r;var c=de.current.updateEndTime-de.current.updateStartTime;a=JSON.stringify(n).length;ue.current&&(ue.current.recordUpdateTime(c),ue.current.recordDataSize(n)),N&&N({renderTime:0,initTime:0,updateTime:c,dataSize:a})}else de.current.updateStartTime=r}},ye=function(e){var t=0;e.series&&(Array.isArray(e.series)?e.series:[e.series]).forEach(function(e){e.data&&(Array.isArray(e.data)?t+=e.data.length:"object"==typeof e.data&&(t+=Object.keys(e.data).length))});return t},be=function(t){if(!t)return t;var n=JSON.parse(JSON.stringify(t));n.series&&Array.isArray(n.series)&&(n.series=n.series.map(function(e){if(e.data&&Array.isArray(e.data)){var t=function(e,t){return F&&t&&0!==Object.keys(t).length?e.filter(function(e){for(var n,r,o=0,a=Object.entries(t);o<a.length;o++){var i=a[o],c=i[0],s=i[1];if(e[c]!==s&&!(null===(r=null===(n=e[c])||void 0===n?void 0:n.includes)||void 0===r?void 0:r.call(n,s)))return!1}return!0}):e}(e.data,B);if(G&&G(t,B),A){le.current.totalDataCount=t.length,le.current.totalPages=Math.ceil(t.length/R);var n=le.current.currentPage*R,r=Math.min(n+R+L,t.length);return le.current.startIndex=n,le.current.endIndex=r,E(E({},e),{data:t.slice(n,r)})}return E(E({},e),{data:t})}return e}));var r=ye(n),o=(0,s.ek)(e.animation,r);return E(E({},n),o)};(0,a.useEffect)(function(){if(ce.current){var e=he();pe.current=e,M&&(ue.current=x.getInstance({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),ge("init");var r=be(n),a=(0,c.cK)({width:o,height:p,theme:h,option:r,onInit:C,containerRef:ce,direction:b});"function"==typeof a.setComponent&&a.setComponent({createChart:function(e){return{}}}),ge("render");var i=a.init();return ge("render"),t&&i&&(d=i,l[t]=d),(null==e?void 0:e.enabled)&&(s={instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof o?o:void 0,height:"number"==typeof p?p:void 0,platform:"web"},config:r,data:{series:Array.isArray(r.series)?r.series:[],totalDataCount:ye(r),currentDataCount:ye(r)},performance:{initTime:de.current.initEndTime-de.current.initStartTime,renderTime:de.current.renderEndTime-de.current.renderStartTime,dataSize:JSON.stringify(r).length}},g.updateDebugInfo(s)),i&&w&&i.on("click",function(e){w(e),re.enableClickLinkage&&t&&re.linkedChartIds&&re.linkedChartIds.forEach(function(t){var n=u(t);n&&n.dispatchAction({type:"highlight",name:e.name})})}),i&&i.on("datazoom",function(e){if(I&&I(e),j&&j({start:e.start||0,end:e.end||100,dataZoomIndex:e.dataZoomIndex||0}),re.enableZoomLinkage&&t&&re.linkedChartIds&&re.linkedChartIds.forEach(function(t){var n=u(t);n&&n.dispatchAction({type:"dataZoom",start:e.start,end:e.end,dataZoomIndex:e.dataZoomIndex})}),A){if(le.current.isScrolling)return;le.current.isScrolling=!0;var r=e.start||0,o=Math.floor(r/100*le.current.totalPages);if(o!==le.current.currentPage){le.current.currentPage=o;var i=be(n);a.setOption(i)}setTimeout(function(){le.current.isScrolling=!1},100)}}),i&&V&&i.on("legendselectchanged",function(e){var n=e.name,r=e.selected;if(re.enableLegendLinkage&&t&&re.linkedChartIds&&re.linkedChartIds.forEach(function(e){var t=u(e);t&&t.setOption({legend:{selected:r}})}),"single"===Z){var o={};Object.keys(r).forEach(function(e){o[e]=e===n}),i.setOption({legend:{selected:o}}),q&&q({name:n,selected:o})}else r[n]?q&&q({name:n,selected:r}):J&&J({name:n,selected:r})}),i&&Q&&(i.on("tooltipshow",function(e){$&&$(e)}),i.on("tooltiphide",function(e){ee&&ee(e)}),K&&i.setOption({tooltip:E({formatter:function(e){return'<div style="background: white; padding: 10px; border: 1px solid #ccc;">'+JSON.stringify(e)+"</div>"}},X&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})})),se.current=a,ge("init"),function(){t&&function(e){l[e]&&delete l[e]}(t),ue.current&&(ue.current.stop(),ue.current=null),a&&a.dispose()}}var s,d},[ce,o,p,h,n,C,w,I,t,re]),(0,a.useEffect)(function(){se.current&&se.current.resize()},[o,p]);(0,a.useEffect)(function(){if(se.current&&n){ge("update");var e=be(n);se.current.setOption(e),ge("update")}if(oe&&!1!==ie.enabled){var t=fe.current;(function(e,t){return e===t||!(!e||!t)&&(ie.deepCompare?JSON.stringify(e)===JSON.stringify(t):e===t)})(t,n)||(oe(t,n),fe.current=n)}},[n,oe,ie]),(0,a.useEffect)(function(){se.current&&h&&se.current.setTheme(h)},[h]),(0,a.useEffect)(function(){if(m&&se.current){var e=function(){se.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}},[m]);var xe=E({width:"number"==typeof o?"".concat(o,"px"):o,height:"number"==typeof p?"".concat(p,"px"):p,direction:b},T),Ee=he(),Ce=i().createElement("div",{ref:ce,style:xe,className:S},k);return(null==Ee?void 0:Ee.enabled)?i().createElement(i().Fragment,null,Ce,i().createElement(f,{options:Ee,debugInfo:{instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof o?o:void 0,height:"number"==typeof p?p:void 0,platform:"web"},config:n,data:{series:Array.isArray(null==n?void 0:n.series)?n.series:[],totalDataCount:ye(n),currentDataCount:ye(n)},performance:{initTime:de.current.initEndTime-de.current.initStartTime,renderTime:de.current.renderEndTime-de.current.renderStartTime,updateTime:de.current.updateEndTime-de.current.updateStartTime,dataSize:JSON.stringify(n).length}}})):Ce};var w=n(524),I=n(127),T=n(188),S=n(481),k=n(589),O=n(443),A=n(835),D=n(334),R=n(133),P=n(37),L=n(673),z=n(490),M=n(123),N=n(999),j=function(){return j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},j.apply(this,arguments)},H=new Map,F={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"}}},U={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"}}},B={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)"}}},G={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}}},_={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}}},V={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"}},W={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)"}},Z={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)"}}},q={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"}},J={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 Y(e){if(!e)return F;var t;if(e.theme&&"string"==typeof e.theme){var n=H.get(e.theme);t=n||(e.darkMode?U:F)}else t=e.darkMode?U:F;return j(j({},t),e)}function Q(e,t){H.set(e,j(j({},t),{name:e}))}function K(){return Array.from(H.values())}function X(e){return H.get(e)}function $(e,t){var n;"string"==typeof e?n=H.get(e)||F:(n=e,e.name&&Q(e.name,e));return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:n})),null==t||t(),n}function ee(e){return K().filter(function(t){var n;return null===(n=t.tags)||void 0===n?void 0:n.includes(e)})}function te(){return K().filter(function(e){return!e.darkMode})}function ne(){return K().filter(function(e){return e.darkMode})}var re={default:F,dark:U,walden:j(j({},F),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),chalk:j(j({},F),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),"purple-passion":j(j({},F),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),"blue-green":j(j({},F),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),golden:j(j({},F),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),forest:j(j({},F),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),neon:B,glass:G,pastel:_,sunset:V,ocean:W,cyber:Z,retro:q,elegant:J};Object.entries(re).forEach(function(e){var t=e[0],n=e[1];H.set(t,n)});var oe=function(){return oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oe.apply(this,arguments)},ae={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=ae.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 ae[e]},e.prototype.getPresetThemeNames=function(){return Object.keys(ae)},e.prototype.setTheme=function(e){var t="string"==typeof e?ae[e]:e;t&&(this.currentTheme=t,this.applyThemeVariables(t),this.notifyListeners())},e.prototype.applyThemeVariables=function(e){if("undefined"!=typeof document){var t=document.documentElement,n=e.variables;Object.entries(n).forEach(function(e){var n=e[0],r=e[1];t.style.setProperty(n,r)}),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:oe(oe({},ae.default.variables),e)}},e.prototype.exportThemeAsCSS=function(e){var t=e||this.currentTheme,n=t.variables;return':root[data-theme="'.concat(t.name,'"] {\n').concat(Object.entries(n).map(function(e){var t=e[0],n=e[1];return" ".concat(t,": ").concat(n,";")}).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 ce=function(){return ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ce.apply(this,arguments)},se=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};const le=function(e){var t=e.selectedTheme,n=e.onThemeChange,r=e.onThemeSave,o=e.disabled,c=void 0!==o&&o,s=e.style,l=void 0===s?{}:s,u=e.className,d=void 0===u?"":u,f=K(),p=(0,a.useState)(f[0]||{}),h=p[0],v=p[1],m=(0,a.useState)(""),g=m[0],y=m[1],b=(0,a.useState)(!1),x=b[0],E=b[1],C=(0,a.useState)(h.colors||[]),w=C[0],I=C[1],T=(0,a.useState)(h.backgroundColor||"#ffffff"),S=T[0],k=T[1],O=(0,a.useState)(h.textColor||"#333333"),A=O[0],D=O[1],R=(0,a.useState)(h.darkMode||!1),P=R[0],L=R[1];(0,a.useEffect)(function(){if(t){var e=f.find(function(e){return e.name===t});e&&(v(e),I(e.colors||[]),k(e.backgroundColor||"#ffffff"),D(e.textColor||"#333333"),L(e.darkMode||!1))}},[t,f]),(0,a.useEffect)(function(){I(h.colors||[]),k(h.backgroundColor||"#ffffff"),D(h.textColor||"#333333"),L(h.darkMode||!1)},[h]);var z=function(e,t){var n=se([],w,!0);n[e]=t,I(n),j({colors:n})},M=function(e){k(e),j({backgroundColor:e})},N=function(e){D(e),j({textColor:e})},j=function(e){var t=ce(ce({},h),e);v(t),n&&n(t),$(t)};return i().createElement("div",{className:"taroviz-theme-editor ".concat(d),style:ce({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},l)},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){v(e),n&&n(e),$(e)}(e)},disabled:c,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:c?"not-allowed":"pointer",opacity:c?.6:1}},e.name)}),i().createElement("button",{onClick:function(){E(!0),y("")},disabled:c,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.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:c,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:c?.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(se(se([],w,!0),["#000000"],!1))},disabled:c,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.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 z(t,e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:e,onChange:function(e){return z(t,e.target.value)},disabled:c,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}),i().createElement("button",{onClick:function(){return function(e){var t=w.filter(function(t,n){return n!==e});I(t),j({colors:t})}(t)},disabled:c||w.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:c||w.length<=1?"not-allowed":"pointer",opacity:c||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:S,onChange:function(e){return M(e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:S,onChange:function(e){return M(e.target.value)},disabled:c,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.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 N(e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:A,onChange:function(e){return N(e.target.value)},disabled:c,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.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(){var e=!P;L(e),j({darkMode:e})},disabled:c,style:{cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}))),i().createElement("button",{onClick:function(){var e=ce(ce({},h),{colors:w,backgroundColor:S,textColor:A,darkMode:P});x&&g?(Q(g,e),E(!1),y("")):Q(h.name||"custom",e),r&&r(e)},disabled:c,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"保存主题"))};var ue,de=(ue=function(e,t){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ue(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 n(){this.constructor=e}ue(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)},pe=function(e){function t(t){var n=e.call(this,t)||this;return n.handleReset=function(){n.setState({hasError:!1,error:null})},n.state={hasError:!1,error:null},n}return de(t,e),t.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},t.prototype.componentDidCatch=function(e,t){var n,r;null===(r=(n=this.props).onError)||void 0===r||r.call(n,e,t)},t.prototype.render=function(){var e=this.state,t=e.hasError,n=e.error,r=this.props,o=r.children,a=r.fallback,c=r.showDetails,s=void 0!==c&&c;return t&&n?a?a(n,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"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),s&&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"}},n.message,"\n\n",n.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 he(e,t){var n=function(n){return i().createElement(pe,fe({},t),i().createElement(e,fe({},n)))};return n.displayName="withErrorBoundary(".concat(e.displayName||e.name||"Chart",")"),n}var ve=function(){return ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ve.apply(this,arguments)},me=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ge=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,127))}),ye=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,188))}),be=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,481))}),xe=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,589))}),Ee=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,443))}),Ce=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,835))}),we=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,334))}),Ie=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,133))}),Te=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,37))}),Se=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,673))}),ke=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,490))}),Oe=function(e){var t=e.text,n=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"}},n)))};function Ae(e,t){var n=function(n){var r=n.loadingText,o=n.fallback,c=me(n,["loadingText","fallback"]),s=t||Oe;return i().createElement(a.Suspense,{fallback:i().createElement(s,{text:r})},o?i().createElement(i().Fragment,null,o,i().createElement(e,ve({},c))):i().createElement(e,ve({},c)))};return n.displayName="withLazyLoad(".concat(e.displayName||e.name||"Chart",")"),n}function De(e){var t={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))}}[e];t&&t().catch(console.error)}function Re(){["line","bar","pie","scatter","radar","heatmap","gauge","funnel","treemap","sunburst","sankey"].forEach(function(e){return De(e)})}function Pe(e){return{line:ge,bar:ye,pie:be,scatter:xe,radar:Ee,heatmap:Ce,gauge:we,funnel:Ie,treemap:Te,sunburst:Se,sankey:ke}[e]||null}var Le={get:function(e){return Pe(e)},preload:function(e){De(e)},preloadAll:function(){Re()}};function ze(e){var t=e.data,n=e.lineStyle,r=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==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:t.map(function(e){return{xAxis:e.xAxis,yAxis:e.yAxis,name:e.name}})}}]}function Me(e){var t=e.data,n=e.style,r=e.label;return[{type:"bar",markArea:{silent:!0,animation:!1!==e.animation,animationDuration:e.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:t.map(function(e){var t=e[0],n=e[1];return[{xAxis:t.xAxis,yAxis:t.yAxis},{xAxis:n.xAxis,yAxis:n.yAxis}]})}}]}function Ne(e){var t=e.data,n=e.symbol,r=e.symbolSize,o=e.itemStyle,a=e.label;return[{type:"scatter",markPoint:{symbol:n,symbolSize:r,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 je(e){var t=e.type,n=e.markLine,r=e.markArea,o=e.scatter;return(0,a.useMemo)(function(){var e=[];return"line"===t&&n&&e.push.apply(e,ze(n)),"area"===t&&r&&e.push.apply(e,Me(r)),"scatter"===t&&o&&e.push.apply(e,Ne(o)),{series:e}},[t,n,r,o])}var He={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,n){return void 0===n&&(n="rgba(82, 196, 26, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:n,opacity:.3},label:{show:!0,position:"inside",color:"#52c41a"}}},warningArea:function(e,t,n){return void 0===n&&(n="rgba(250, 173, 20, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:n,opacity:.3},label:{show:!0,position:"inside",color:"#faad14"}}}};function Fe(e){var t=[];return e.forEach(function(e){"line"===e.type&&e.markLine&&t.push.apply(t,ze(e.markLine)),"area"===e.type&&e.markArea&&t.push.apply(t,Me(e.markArea)),"scatter"===e.type&&e.scatter&&t.push.apply(t,Ne(e.scatter))}),{series:t}}var Ue=function(){return Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ue.apply(this,arguments)},Be=function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,c)}s((r=r.apply(e,t||[])).next())})},Ge=function(e,t){var n,r,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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};function _e(e){for(var t,n=e.split(","),r=(null===(t=n[0].match(/:(.*?);/))||void 0===t?void 0:t[1])||"image/png",o=atob(n[1]),a=o.length,i=new Uint8Array(a);a--;)i[a]=o.charCodeAt(a);return new Blob([i],{type:r})}function Ve(e,t){var n=(new Date).toISOString().slice(0,10),r=e.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g,"_");return"".concat(r,"_").concat(n,".").concat(t)}var We=function(){function e(){}return e.exportImage=function(e,t){void 0===t&&(t={});var n=t.type,r=void 0===n?"png":n,o=t.pixelRatio,a=void 0===o?2:o,i=t.backgroundColor,c=void 0===i?"#ffffff":i,s=t.quality,l=void 0===s?.8:s,u="image/".concat(r);return{data:e.getDataURL({type:r,pixelRatio:a,backgroundColor:c,quality:l}),filename:Ve("chart",r),mimeType:u}},e.exportSVG=function(e,t){void 0===t&&(t={});var n=t.compress,r=void 0!==n&&n,o=e.getSvgData();if(!o)throw new Error("SVG export is not supported. Please use canvas renderer.");var a=o,i="image/svg+xml";return r&&(a=a.replace(/>\s+</g,"><").replace(/\s+/g," "),i+=";charset=utf-8"),{data:a,filename:Ve("chart","svg"),mimeType:i}},e.exportPDF=function(e){return Be(this,arguments,Promise,function(e,t){var n,r,o,a,i,c,s,l,u,d,f,p,h,v,m,g,y,b,x,E,C,w,I,T,S,k,O;return void 0===t&&(t={}),Ge(this,function(A){switch(A.label){case 0:n=t.orientation,r=void 0===n?"portrait":n,o=t.pageSize,a=void 0===o?"a4":o,i=t.title,c=void 0===i?"Chart Export":i,s=t.author,l=void 0===s?"TaroViz":s,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"}),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return v=A.sent().default,[3,4];case 3:return A.sent(),[2,{data:h,filename:Ve("chart","png"),mimeType:"image/png"}];case 4:return m={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[a],g="landscape"===r,(y=new v({orientation:r,unit:"mm",format:a})).setProperties({title:c,author:l,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),b=g?m.height:m.width,x=.6*b,E=g?m.height:m.width,C=g?m.width:m.height,w=d.top||40,I=d.left||40,p&&(y.setFontSize(16),y.setTextColor(51,51,51),y.text(c,I,w)),T=p?w+15:w,S=(E-b)/2,y.addImage(h,"PNG",S,T,b,x),k=C-d.bottom/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:Ve(c.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:O.size}]}})})},e.exportBatch=function(e,t){return Be(this,void 0,Promise,function(){var n,r,o,a,i,c,s,l,u,d;return Ge(this,function(f){switch(f.label){case 0:n=t.format,r=t.filenamePrefix,o=t.compress,a=[],i=0,c=e,f.label=1;case 1:if(!(i<c.length))return[3,8];s=c[i],l=s.name,u=s.chart,f.label=2;case 2:return f.trys.push([2,6,,7]),d=void 0,"pdf"!==n?[3,4]:[4,this.exportPDF(u,{title:l})];case 3:return d=f.sent(),[3,5];case 4:d=this.exportImage(u,{type:n}),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,n,r,o,a;t=e.data,n=e.filename,e.mimeType,r="string"==typeof t?_e(t):t,o=URL.createObjectURL(r),(a=document.createElement("a")).href=o,a.download=n,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 Be(this,arguments,Promise,function(e,t){var n,r,o;return void 0===t&&(t={}),Ge(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.exportImage(e,Ue(Ue({},t),{type:"png"})),r=_e(n.data),[4,navigator.clipboard.write([new ClipboardItem((o={},o[r.type]=r,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 n=e.getWidth(),r=e.getHeight(),o=t/96;return{width:Math.round(n*o),height:Math.round(r*o)}},e}(),Ze=We;var qe=function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,c)}s((r=r.apply(e,t||[])).next())})},Je=function(e,t){var n,r,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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},Ye=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function Qe(e,t){var n=(0,a.useState)(null),r=n[0],o=n[1],i=(0,a.useState)(!1),s=i[0],l=i[1],u=(0,a.useRef)(t);return u.current=t,(0,a.useEffect)(function(){if(e.current&&!r){try{var t=(0,c.cK)(u.current||{});o(t),l(!0)}catch(e){}return function(){var e;if(r){try{var t=r;(null===(e=t.isDisposed)||void 0===e?void 0:e.call(t))||t.dispose()}catch(e){}o(null),l(!1)}}}},[e]),[r,o,s]}function Ke(e,t,n){var r=n||{},o=r.notMerge,i=void 0!==o&&o,c=r.lazyUpdate,s=void 0!==c&&c,l=r.replaceMerge,u=r.deps,d=void 0===u?[]:u;(0,a.useEffect)(function(){if(e&&t)try{e.setOption(t,i,s)}catch(e){}},Ye([e,t,i,s,l],d,!0))}function Xe(e,t){var n=t||{},r=n.delay,o=void 0===r?300:r,i=n.minWidth,c=n.minHeight,s=n.enabled,l=void 0===s||s,u=(0,a.useRef)();(0,a.useEffect)(function(){var t;if(e&&l){var n=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){var t,n;try{var r=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(r){var o=r.clientWidth,a=r.clientHeight;if(i&&o<i)return;if(c&&a<c)return}null===(n=e.resize)||void 0===n||n.call(e)}catch(e){}},o)};window.addEventListener("resize",n);var r=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(r&&"undefined"!=typeof ResizeObserver){var a=new ResizeObserver(n);return a.observe(r),function(){a.disconnect(),window.removeEventListener("resize",n),u.current&&clearTimeout(u.current)}}return function(){window.removeEventListener("resize",n),u.current&&clearTimeout(u.current)}}},[e,o,i,c,l])}function $e(e,t){(0,a.useEffect)(function(){if(e&&t){var n=Object.entries(t);return n.forEach(function(t){var n=t[0],r=t[1];try{e.on(n,r)}catch(e){}}),function(){n.forEach(function(t){var n=t[0],r=t[1];try{e.off(n,r)}catch(e){}})}}},[e,t])}function et(e,t,n){(0,a.useEffect)(function(){if(e)try{t?e.showLoading(n):e.hideLoading()}catch(e){}},[e,t,n])}function tt(e,t){return void 0===t&&(t=!1),(0,a.useMemo)(function(){if("string"==typeof e)try{return getTheme(e)||(t?"dark":e)}catch(n){return t?"dark":e}return e},[e,t])}function nt(e,t){return(0,a.useMemo)(function(){return e?t(e):{}},[e,t])}function rt(e){var t=e||{},n=t.breakpoints,r=void 0===n?{xs:0,sm:576,md:768,lg:992,xl:1200}:n,o=t.defaultBreakpoint,i=void 0===o?"md":o,c=(0,a.useState)(i),s=c[0],l=c[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>=r.xl?t="xl":e>=r.lg?t="lg":e>=r.md?t="md":e>=r.sm&&(t="sm"),l(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[r]),{breakpoint:s,windowSize:d}}function ot(e){void 0===e&&(e="default");var t=(0,a.useState)(e),n=t[0],r=t[1],o=(0,a.useState)(!1),i=o[0],c=o[1];return{theme:n,isDark:i,switchTheme:(0,a.useCallback)(function(e){r(e),"string"==typeof e&&c("dark"===e||e.includes("dark"))},[]),toggleDark:(0,a.useCallback)(function(){c(function(e){return!e}),r(function(e){return"dark"===e?"default":"dark"})},[]),setTheme:r}}function at(e,t){var n=this,r=t||{},o=r.interval,i=void 0===o?5e3:o,c=r.autoStart,s=void 0!==c&&c,l=r.retryCount,u=void 0===l?3:l,d=r.retryDelay,f=void 0===d?1e3:d,p=(0,a.useState)(null),h=p[0],v=p[1],m=(0,a.useState)(s),g=m[0],y=m[1],b=(0,a.useState)(null),x=b[0],E=b[1],C=(0,a.useState)(0),w=C[0],I=C[1],T=(0,a.useCallback)(function(){return qe(n,void 0,void 0,function(){var t,n,r;return Je(this,function(o){switch(o.label){case 0:t=u,y(!0),E(null),o.label=1;case 1:if(!(t>=0))return[3,9];o.label=2;case 2:return o.trys.push([2,4,,8]),[4,e()];case 3:return n=o.sent(),v(n),y(!1),[2];case 4:return r=o.sent(),--t<0?(E(r),y(!1),[3,7]):[3,5];case 5:return[4,new Promise(function(e){return setTimeout(e,f)})];case 6:o.sent(),o.label=7;case 7:return[3,8];case 8:return[3,1];case 9:return[2]}})})},[e,u,f]);return(0,a.useEffect)(function(){if(s&&T(),i>0){var e=setInterval(T,i);return function(){return clearInterval(e)}}},[i,s,T,w]),{data:h,loading:g,error:x,refresh:(0,a.useCallback)(function(){I(function(e){return e+1}),T()},[T])}}function it(e){var t=(0,a.useState)(!1),n=t[0],r=t[1],o=(0,a.useCallback)(function(){e.current&&(n?document.exitFullscreen&&document.exitFullscreen():e.current.requestFullscreen&&e.current.requestFullscreen())},[e,n]);return(0,a.useEffect)(function(){var e=function(){r(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){return document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:n,toggle:o}}function ct(e){var t=e;return{exportImage:(0,a.useCallback)(function(e){var n;if(!t)return null;var r=e||{},o=r.type,a=void 0===o?"png":o,i=r.pixelRatio,c=void 0===i?2:i,s=r.backgroundColor;return null===(n=t.getDataURL)||void 0===n?void 0:n.call(t,{type:a,pixelRatio:c,backgroundColor:s})},[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 n;return t?null===(n=t.getCompressedDataURL)||void 0===n?void 0:n.call(t,e):null},[t])}}function st(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 n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,e)},[t]),showTip:(0,a.useCallback)(function(e,n){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,{type:"showTip",seriesIndex:e,dataIndex:n})},[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,n){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,{type:"dataZoom",start:null!=e?e:0,end:null!=n?n:100})},[t])}}var lt="taroviz",ut="1.2.1";module.exports=r})();
|