@visactor/vstory 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1630) hide show
  1. package/README.md +9 -0
  2. package/cjs/animate/animate.d.ts +13 -0
  3. package/cjs/animate/animate.js +20 -0
  4. package/cjs/animate/animate.js.map +1 -0
  5. package/cjs/animate/bounce.d.ts +15 -0
  6. package/cjs/animate/bounce.js +31 -0
  7. package/cjs/animate/bounce.js.map +1 -0
  8. package/cjs/animate/highlight.d.ts +5 -0
  9. package/cjs/animate/highlight.js +43 -0
  10. package/cjs/animate/highlight.js.map +1 -0
  11. package/cjs/animate/typewirter.d.ts +14 -0
  12. package/cjs/animate/typewirter.js +58 -0
  13. package/cjs/animate/typewirter.js.map +1 -0
  14. package/cjs/animate/util/paths.d.ts +31 -0
  15. package/cjs/animate/util/paths.js +368 -0
  16. package/cjs/animate/util/paths.js.map +1 -0
  17. package/cjs/animate/util/util.d.ts +18 -0
  18. package/cjs/animate/util/util.js +119 -0
  19. package/cjs/animate/util/util.js.map +1 -0
  20. package/cjs/animate/wipeIn.d.ts +32 -0
  21. package/cjs/animate/wipeIn.js +121 -0
  22. package/cjs/animate/wipeIn.js.map +1 -0
  23. package/cjs/component/title.d.ts +18 -0
  24. package/cjs/component/title.js +55 -0
  25. package/cjs/component/title.js.map +1 -0
  26. package/cjs/constants/attribute.d.ts +2 -0
  27. package/cjs/constants/attribute.js +6 -0
  28. package/cjs/constants/attribute.js.map +1 -0
  29. package/cjs/dsl/constant/index.d.ts +29 -0
  30. package/cjs/dsl/constant/index.js +24 -0
  31. package/cjs/dsl/constant/index.js.map +1 -0
  32. package/cjs/dsl/story-chart/area.d.ts +5 -0
  33. package/cjs/dsl/story-chart/area.js +16 -0
  34. package/cjs/dsl/story-chart/area.js.map +1 -0
  35. package/cjs/dsl/story-chart/bar.d.ts +13 -0
  36. package/cjs/dsl/story-chart/bar.js +48 -0
  37. package/cjs/dsl/story-chart/bar.js.map +1 -0
  38. package/cjs/dsl/story-chart/chart.d.ts +25 -0
  39. package/cjs/dsl/story-chart/chart.js +61 -0
  40. package/cjs/dsl/story-chart/chart.js.map +1 -0
  41. package/cjs/dsl/story-chart/component/base.d.ts +9 -0
  42. package/cjs/dsl/story-chart/component/base.js +24 -0
  43. package/cjs/dsl/story-chart/component/base.js.map +1 -0
  44. package/cjs/dsl/story-chart/component/markPoint.d.ts +11 -0
  45. package/cjs/dsl/story-chart/component/markPoint.js +24 -0
  46. package/cjs/dsl/story-chart/component/markPoint.js.map +1 -0
  47. package/cjs/dsl/story-chart/component/title.d.ts +1 -0
  48. package/cjs/dsl/story-chart/component/title.js +3 -0
  49. package/cjs/dsl/story-chart/component/title.js.map +1 -0
  50. package/cjs/dsl/story-chart/default/add.d.ts +4 -0
  51. package/cjs/dsl/story-chart/default/add.js +14 -0
  52. package/cjs/dsl/story-chart/default/add.js.map +1 -0
  53. package/cjs/dsl/story-chart/default/updateStyle.d.ts +2 -0
  54. package/cjs/dsl/story-chart/default/updateStyle.js +11 -0
  55. package/cjs/dsl/story-chart/default/updateStyle.js.map +1 -0
  56. package/cjs/dsl/story-chart/element.d.ts +3 -0
  57. package/cjs/dsl/story-chart/element.js +16 -0
  58. package/cjs/dsl/story-chart/element.js.map +1 -0
  59. package/cjs/dsl/story-chart/index.d.ts +6 -0
  60. package/cjs/dsl/story-chart/index.js +42 -0
  61. package/cjs/dsl/story-chart/index.js.map +1 -0
  62. package/cjs/dsl/story-chart/line.d.ts +10 -0
  63. package/cjs/dsl/story-chart/line.js +38 -0
  64. package/cjs/dsl/story-chart/line.js.map +1 -0
  65. package/cjs/dsl/story-chart/pie.d.ts +8 -0
  66. package/cjs/dsl/story-chart/pie.js +27 -0
  67. package/cjs/dsl/story-chart/pie.js.map +1 -0
  68. package/cjs/dsl/story-executor/index.d.ts +14 -0
  69. package/cjs/dsl/story-executor/index.js +55 -0
  70. package/cjs/dsl/story-executor/index.js.map +1 -0
  71. package/cjs/dsl/story-processor/graphic/appear.d.ts +3 -0
  72. package/cjs/dsl/story-processor/graphic/appear.js +46 -0
  73. package/cjs/dsl/story-processor/graphic/appear.js.map +1 -0
  74. package/cjs/dsl/story-processor/graphic/brighten.d.ts +3 -0
  75. package/cjs/dsl/story-processor/graphic/brighten.js +42 -0
  76. package/cjs/dsl/story-processor/graphic/brighten.js.map +1 -0
  77. package/cjs/dsl/story-processor/graphic/darken.d.ts +3 -0
  78. package/cjs/dsl/story-processor/graphic/darken.js +42 -0
  79. package/cjs/dsl/story-processor/graphic/darken.js.map +1 -0
  80. package/cjs/dsl/story-processor/graphic/disappear.d.ts +3 -0
  81. package/cjs/dsl/story-processor/graphic/disappear.js +45 -0
  82. package/cjs/dsl/story-processor/graphic/disappear.js.map +1 -0
  83. package/cjs/dsl/story-processor/graphic/effect/appear.d.ts +48 -0
  84. package/cjs/dsl/story-processor/graphic/effect/appear.js +135 -0
  85. package/cjs/dsl/story-processor/graphic/effect/appear.js.map +1 -0
  86. package/cjs/dsl/story-processor/graphic/effect/bounce.d.ts +3 -0
  87. package/cjs/dsl/story-processor/graphic/effect/bounce.js +23 -0
  88. package/cjs/dsl/story-processor/graphic/effect/bounce.js.map +1 -0
  89. package/cjs/dsl/story-processor/graphic/effect/disappear.d.ts +38 -0
  90. package/cjs/dsl/story-processor/graphic/effect/disappear.js +108 -0
  91. package/cjs/dsl/story-processor/graphic/effect/disappear.js.map +1 -0
  92. package/cjs/dsl/story-processor/graphic/effect/flicker.d.ts +3 -0
  93. package/cjs/dsl/story-processor/graphic/effect/flicker.js +15 -0
  94. package/cjs/dsl/story-processor/graphic/effect/flicker.js.map +1 -0
  95. package/cjs/dsl/story-processor/graphic/effect/moveTo.d.ts +9 -0
  96. package/cjs/dsl/story-processor/graphic/effect/moveTo.js +13 -0
  97. package/cjs/dsl/story-processor/graphic/effect/moveTo.js.map +1 -0
  98. package/cjs/dsl/story-processor/graphic/effect/shade.d.ts +5 -0
  99. package/cjs/dsl/story-processor/graphic/effect/shade.js +34 -0
  100. package/cjs/dsl/story-processor/graphic/effect/shade.js.map +1 -0
  101. package/cjs/dsl/story-processor/graphic/effect/typewriter.d.ts +2 -0
  102. package/cjs/dsl/story-processor/graphic/effect/typewriter.js +21 -0
  103. package/cjs/dsl/story-processor/graphic/effect/typewriter.js.map +1 -0
  104. package/cjs/dsl/story-processor/graphic/flicker.d.ts +3 -0
  105. package/cjs/dsl/story-processor/graphic/flicker.js +42 -0
  106. package/cjs/dsl/story-processor/graphic/flicker.js.map +1 -0
  107. package/cjs/dsl/story-processor/graphic/moveTo.d.ts +4 -0
  108. package/cjs/dsl/story-processor/graphic/moveTo.js +45 -0
  109. package/cjs/dsl/story-processor/graphic/moveTo.js.map +1 -0
  110. package/cjs/dsl/story-processor/graphic/style.d.ts +5 -0
  111. package/cjs/dsl/story-processor/graphic/style.js +44 -0
  112. package/cjs/dsl/story-processor/graphic/style.js.map +1 -0
  113. package/cjs/dsl/story-processor/graphic/util.d.ts +7 -0
  114. package/cjs/dsl/story-processor/graphic/util.js +24 -0
  115. package/cjs/dsl/story-processor/graphic/util.js.map +1 -0
  116. package/cjs/dsl/story-processor/index.d.ts +2 -0
  117. package/cjs/dsl/story-processor/index.js +30 -0
  118. package/cjs/dsl/story-processor/index.js.map +1 -0
  119. package/cjs/dsl/story-processor/processor.d.ts +17 -0
  120. package/cjs/dsl/story-processor/processor.js +70 -0
  121. package/cjs/dsl/story-processor/processor.js.map +1 -0
  122. package/cjs/dsl/story-processor/processorMap/common.d.ts +4 -0
  123. package/cjs/dsl/story-processor/processorMap/common.js +13 -0
  124. package/cjs/dsl/story-processor/processorMap/common.js.map +1 -0
  125. package/cjs/dsl/story-processor/processorMap/index.d.ts +1 -0
  126. package/cjs/dsl/story-processor/processorMap/index.js +21 -0
  127. package/cjs/dsl/story-processor/processorMap/index.js.map +1 -0
  128. package/cjs/dsl/story-processor/processorMap/processorMap.d.ts +460 -0
  129. package/cjs/dsl/story-processor/processorMap/processorMap.js +71 -0
  130. package/cjs/dsl/story-processor/processorMap/processorMap.js.map +1 -0
  131. package/cjs/dsl/story-processor/processorMap/radar.d.ts +11 -0
  132. package/cjs/dsl/story-processor/processorMap/radar.js +20 -0
  133. package/cjs/dsl/story-processor/processorMap/radar.js.map +1 -0
  134. package/cjs/dsl/story-processor/processorMap/rangeColumn.d.ts +11 -0
  135. package/cjs/dsl/story-processor/processorMap/rangeColumn.js +20 -0
  136. package/cjs/dsl/story-processor/processorMap/rangeColumn.js.map +1 -0
  137. package/cjs/dsl/story-processor/processorMap/rose.d.ts +11 -0
  138. package/cjs/dsl/story-processor/processorMap/rose.js +20 -0
  139. package/cjs/dsl/story-processor/processorMap/rose.js.map +1 -0
  140. package/cjs/dsl/story-processor/processorMap/scatter.d.ts +11 -0
  141. package/cjs/dsl/story-processor/processorMap/scatter.js +20 -0
  142. package/cjs/dsl/story-processor/processorMap/scatter.js.map +1 -0
  143. package/cjs/dsl/story-processor/processorMap/sunburst.d.ts +11 -0
  144. package/cjs/dsl/story-processor/processorMap/sunburst.js +20 -0
  145. package/cjs/dsl/story-processor/processorMap/sunburst.js.map +1 -0
  146. package/cjs/dsl/story-processor/processorMap/treeMap.d.ts +11 -0
  147. package/cjs/dsl/story-processor/processorMap/treeMap.js +20 -0
  148. package/cjs/dsl/story-processor/processorMap/treeMap.js.map +1 -0
  149. package/cjs/dsl/story-processor/processorMap/wordCloud.d.ts +11 -0
  150. package/cjs/dsl/story-processor/processorMap/wordCloud.js +20 -0
  151. package/cjs/dsl/story-processor/processorMap/wordCloud.js.map +1 -0
  152. package/cjs/dsl/story-processor/vchart/add.d.ts +4 -0
  153. package/cjs/dsl/story-processor/vchart/add.js +42 -0
  154. package/cjs/dsl/story-processor/vchart/add.js.map +1 -0
  155. package/cjs/dsl/story-processor/vchart/bounce.d.ts +4 -0
  156. package/cjs/dsl/story-processor/vchart/bounce.js +42 -0
  157. package/cjs/dsl/story-processor/vchart/bounce.js.map +1 -0
  158. package/cjs/dsl/story-processor/vchart/charts/area/areaAppear.d.ts +4 -0
  159. package/cjs/dsl/story-processor/vchart/charts/area/areaAppear.js +38 -0
  160. package/cjs/dsl/story-processor/vchart/charts/area/areaAppear.js.map +1 -0
  161. package/cjs/dsl/story-processor/vchart/charts/area/areaDisappear.d.ts +4 -0
  162. package/cjs/dsl/story-processor/vchart/charts/area/areaDisappear.js +55 -0
  163. package/cjs/dsl/story-processor/vchart/charts/area/areaDisappear.js.map +1 -0
  164. package/cjs/dsl/story-processor/vchart/charts/area/index.d.ts +2 -0
  165. package/cjs/dsl/story-processor/vchart/charts/area/index.js +24 -0
  166. package/cjs/dsl/story-processor/vchart/charts/area/index.js.map +1 -0
  167. package/cjs/dsl/story-processor/vchart/charts/bar/barAppear.d.ts +4 -0
  168. package/cjs/dsl/story-processor/vchart/charts/bar/barAppear.js +39 -0
  169. package/cjs/dsl/story-processor/vchart/charts/bar/barAppear.js.map +1 -0
  170. package/cjs/dsl/story-processor/vchart/charts/bar/barDisappear.d.ts +4 -0
  171. package/cjs/dsl/story-processor/vchart/charts/bar/barDisappear.js +55 -0
  172. package/cjs/dsl/story-processor/vchart/charts/bar/barDisappear.js.map +1 -0
  173. package/cjs/dsl/story-processor/vchart/charts/bar/index.d.ts +2 -0
  174. package/cjs/dsl/story-processor/vchart/charts/bar/index.js +24 -0
  175. package/cjs/dsl/story-processor/vchart/charts/bar/index.js.map +1 -0
  176. package/cjs/dsl/story-processor/vchart/charts/character/characterAppear.d.ts +4 -0
  177. package/cjs/dsl/story-processor/vchart/charts/character/characterAppear.js +50 -0
  178. package/cjs/dsl/story-processor/vchart/charts/character/characterAppear.js.map +1 -0
  179. package/cjs/dsl/story-processor/vchart/charts/character/characterDisappear.d.ts +4 -0
  180. package/cjs/dsl/story-processor/vchart/charts/character/characterDisappear.js +42 -0
  181. package/cjs/dsl/story-processor/vchart/charts/character/characterDisappear.js.map +1 -0
  182. package/cjs/dsl/story-processor/vchart/charts/character/index.d.ts +6 -0
  183. package/cjs/dsl/story-processor/vchart/charts/character/index.js +29 -0
  184. package/cjs/dsl/story-processor/vchart/charts/character/index.js.map +1 -0
  185. package/cjs/dsl/story-processor/vchart/charts/common/commonAppear.d.ts +4 -0
  186. package/cjs/dsl/story-processor/vchart/charts/common/commonAppear.js +38 -0
  187. package/cjs/dsl/story-processor/vchart/charts/common/commonAppear.js.map +1 -0
  188. package/cjs/dsl/story-processor/vchart/charts/common/commonDisappear.d.ts +4 -0
  189. package/cjs/dsl/story-processor/vchart/charts/common/commonDisappear.js +45 -0
  190. package/cjs/dsl/story-processor/vchart/charts/common/commonDisappear.js.map +1 -0
  191. package/cjs/dsl/story-processor/vchart/charts/common/index.d.ts +2 -0
  192. package/cjs/dsl/story-processor/vchart/charts/common/index.js +24 -0
  193. package/cjs/dsl/story-processor/vchart/charts/common/index.js.map +1 -0
  194. package/cjs/dsl/story-processor/vchart/charts/index.d.ts +10 -0
  195. package/cjs/dsl/story-processor/vchart/charts/index.js +25 -0
  196. package/cjs/dsl/story-processor/vchart/charts/index.js.map +1 -0
  197. package/cjs/dsl/story-processor/vchart/charts/line/index.d.ts +2 -0
  198. package/cjs/dsl/story-processor/vchart/charts/line/index.js +24 -0
  199. package/cjs/dsl/story-processor/vchart/charts/line/index.js.map +1 -0
  200. package/cjs/dsl/story-processor/vchart/charts/line/lineAppear.d.ts +4 -0
  201. package/cjs/dsl/story-processor/vchart/charts/line/lineAppear.js +39 -0
  202. package/cjs/dsl/story-processor/vchart/charts/line/lineAppear.js.map +1 -0
  203. package/cjs/dsl/story-processor/vchart/charts/line/lineDisappear.d.ts +4 -0
  204. package/cjs/dsl/story-processor/vchart/charts/line/lineDisappear.js +55 -0
  205. package/cjs/dsl/story-processor/vchart/charts/line/lineDisappear.js.map +1 -0
  206. package/cjs/dsl/story-processor/vchart/charts/line/transformLineSymbolAppear.d.ts +20 -0
  207. package/cjs/dsl/story-processor/vchart/charts/line/transformLineSymbolAppear.js +52 -0
  208. package/cjs/dsl/story-processor/vchart/charts/line/transformLineSymbolAppear.js.map +1 -0
  209. package/cjs/dsl/story-processor/vchart/charts/pie/index.d.ts +2 -0
  210. package/cjs/dsl/story-processor/vchart/charts/pie/index.js +24 -0
  211. package/cjs/dsl/story-processor/vchart/charts/pie/index.js.map +1 -0
  212. package/cjs/dsl/story-processor/vchart/charts/pie/pieAppear.d.ts +4 -0
  213. package/cjs/dsl/story-processor/vchart/charts/pie/pieAppear.js +38 -0
  214. package/cjs/dsl/story-processor/vchart/charts/pie/pieAppear.js.map +1 -0
  215. package/cjs/dsl/story-processor/vchart/charts/pie/pieDisappear.d.ts +4 -0
  216. package/cjs/dsl/story-processor/vchart/charts/pie/pieDisappear.js +55 -0
  217. package/cjs/dsl/story-processor/vchart/charts/pie/pieDisappear.js.map +1 -0
  218. package/cjs/dsl/story-processor/vchart/charts/radar/index.d.ts +2 -0
  219. package/cjs/dsl/story-processor/vchart/charts/radar/index.js +24 -0
  220. package/cjs/dsl/story-processor/vchart/charts/radar/index.js.map +1 -0
  221. package/cjs/dsl/story-processor/vchart/charts/radar/radarAppear.d.ts +4 -0
  222. package/cjs/dsl/story-processor/vchart/charts/radar/radarAppear.js +41 -0
  223. package/cjs/dsl/story-processor/vchart/charts/radar/radarAppear.js.map +1 -0
  224. package/cjs/dsl/story-processor/vchart/charts/radar/radarDisappear.d.ts +4 -0
  225. package/cjs/dsl/story-processor/vchart/charts/radar/radarDisappear.js +56 -0
  226. package/cjs/dsl/story-processor/vchart/charts/radar/radarDisappear.js.map +1 -0
  227. package/cjs/dsl/story-processor/vchart/charts/rose/index.d.ts +2 -0
  228. package/cjs/dsl/story-processor/vchart/charts/rose/index.js +24 -0
  229. package/cjs/dsl/story-processor/vchart/charts/rose/index.js.map +1 -0
  230. package/cjs/dsl/story-processor/vchart/charts/rose/roseAppear.d.ts +4 -0
  231. package/cjs/dsl/story-processor/vchart/charts/rose/roseAppear.js +38 -0
  232. package/cjs/dsl/story-processor/vchart/charts/rose/roseAppear.js.map +1 -0
  233. package/cjs/dsl/story-processor/vchart/charts/rose/roseDisappear.d.ts +4 -0
  234. package/cjs/dsl/story-processor/vchart/charts/rose/roseDisappear.js +55 -0
  235. package/cjs/dsl/story-processor/vchart/charts/rose/roseDisappear.js.map +1 -0
  236. package/cjs/dsl/story-processor/vchart/charts/scatter/index.d.ts +2 -0
  237. package/cjs/dsl/story-processor/vchart/charts/scatter/index.js +24 -0
  238. package/cjs/dsl/story-processor/vchart/charts/scatter/index.js.map +1 -0
  239. package/cjs/dsl/story-processor/vchart/charts/scatter/scatterAppear.d.ts +4 -0
  240. package/cjs/dsl/story-processor/vchart/charts/scatter/scatterAppear.js +38 -0
  241. package/cjs/dsl/story-processor/vchart/charts/scatter/scatterAppear.js.map +1 -0
  242. package/cjs/dsl/story-processor/vchart/charts/scatter/scatterDisappear.d.ts +4 -0
  243. package/cjs/dsl/story-processor/vchart/charts/scatter/scatterDisappear.js +54 -0
  244. package/cjs/dsl/story-processor/vchart/charts/scatter/scatterDisappear.js.map +1 -0
  245. package/cjs/dsl/story-processor/vchart/charts/sunburst/index.d.ts +2 -0
  246. package/cjs/dsl/story-processor/vchart/charts/sunburst/index.js +24 -0
  247. package/cjs/dsl/story-processor/vchart/charts/sunburst/index.js.map +1 -0
  248. package/cjs/dsl/story-processor/vchart/charts/sunburst/sunburstAppear.d.ts +4 -0
  249. package/cjs/dsl/story-processor/vchart/charts/sunburst/sunburstAppear.js +38 -0
  250. package/cjs/dsl/story-processor/vchart/charts/sunburst/sunburstAppear.js.map +1 -0
  251. package/cjs/dsl/story-processor/vchart/charts/sunburst/sunburstDisappear.d.ts +4 -0
  252. package/cjs/dsl/story-processor/vchart/charts/sunburst/sunburstDisappear.js +55 -0
  253. package/cjs/dsl/story-processor/vchart/charts/sunburst/sunburstDisappear.js.map +1 -0
  254. package/cjs/dsl/story-processor/vchart/charts/treeMap/index.d.ts +2 -0
  255. package/cjs/dsl/story-processor/vchart/charts/treeMap/index.js +24 -0
  256. package/cjs/dsl/story-processor/vchart/charts/treeMap/index.js.map +1 -0
  257. package/cjs/dsl/story-processor/vchart/charts/treeMap/treeMapAppear.d.ts +4 -0
  258. package/cjs/dsl/story-processor/vchart/charts/treeMap/treeMapAppear.js +38 -0
  259. package/cjs/dsl/story-processor/vchart/charts/treeMap/treeMapAppear.js.map +1 -0
  260. package/cjs/dsl/story-processor/vchart/charts/treeMap/treeMapDisappear.d.ts +4 -0
  261. package/cjs/dsl/story-processor/vchart/charts/treeMap/treeMapDisappear.js +55 -0
  262. package/cjs/dsl/story-processor/vchart/charts/treeMap/treeMapDisappear.js.map +1 -0
  263. package/cjs/dsl/story-processor/vchart/charts/wordCloud/index.d.ts +2 -0
  264. package/cjs/dsl/story-processor/vchart/charts/wordCloud/index.js +24 -0
  265. package/cjs/dsl/story-processor/vchart/charts/wordCloud/index.js.map +1 -0
  266. package/cjs/dsl/story-processor/vchart/charts/wordCloud/wordCloudAppear.d.ts +4 -0
  267. package/cjs/dsl/story-processor/vchart/charts/wordCloud/wordCloudAppear.js +38 -0
  268. package/cjs/dsl/story-processor/vchart/charts/wordCloud/wordCloudAppear.js.map +1 -0
  269. package/cjs/dsl/story-processor/vchart/charts/wordCloud/wordCloudDisappear.d.ts +4 -0
  270. package/cjs/dsl/story-processor/vchart/charts/wordCloud/wordCloudDisappear.js +54 -0
  271. package/cjs/dsl/story-processor/vchart/charts/wordCloud/wordCloudDisappear.js.map +1 -0
  272. package/cjs/dsl/story-processor/vchart/components/axes/disappear.d.ts +4 -0
  273. package/cjs/dsl/story-processor/vchart/components/axes/disappear.js +67 -0
  274. package/cjs/dsl/story-processor/vchart/components/axes/disappear.js.map +1 -0
  275. package/cjs/dsl/story-processor/vchart/components/axes/index.d.ts +1 -0
  276. package/cjs/dsl/story-processor/vchart/components/axes/index.js +15 -0
  277. package/cjs/dsl/story-processor/vchart/components/axes/index.js.map +1 -0
  278. package/cjs/dsl/story-processor/vchart/components/index.d.ts +2 -0
  279. package/cjs/dsl/story-processor/vchart/components/index.js +21 -0
  280. package/cjs/dsl/story-processor/vchart/components/index.js.map +1 -0
  281. package/cjs/dsl/story-processor/vchart/components/title/disappear.d.ts +4 -0
  282. package/cjs/dsl/story-processor/vchart/components/title/disappear.js +58 -0
  283. package/cjs/dsl/story-processor/vchart/components/title/disappear.js.map +1 -0
  284. package/cjs/dsl/story-processor/vchart/components/title/index.d.ts +1 -0
  285. package/cjs/dsl/story-processor/vchart/components/title/index.js +15 -0
  286. package/cjs/dsl/story-processor/vchart/components/title/index.js.map +1 -0
  287. package/cjs/dsl/story-processor/vchart/dance.d.ts +3 -0
  288. package/cjs/dsl/story-processor/vchart/dance.js +46 -0
  289. package/cjs/dsl/story-processor/vchart/dance.js.map +1 -0
  290. package/cjs/dsl/story-processor/vchart/markPoint.d.ts +5 -0
  291. package/cjs/dsl/story-processor/vchart/markPoint.js +55 -0
  292. package/cjs/dsl/story-processor/vchart/markPoint.js.map +1 -0
  293. package/cjs/dsl/story-processor/vchart/marks/arc/appear.d.ts +4 -0
  294. package/cjs/dsl/story-processor/vchart/marks/arc/appear.js +60 -0
  295. package/cjs/dsl/story-processor/vchart/marks/arc/appear.js.map +1 -0
  296. package/cjs/dsl/story-processor/vchart/marks/arc/disappear.d.ts +4 -0
  297. package/cjs/dsl/story-processor/vchart/marks/arc/disappear.js +60 -0
  298. package/cjs/dsl/story-processor/vchart/marks/arc/disappear.js.map +1 -0
  299. package/cjs/dsl/story-processor/vchart/marks/arc/index.d.ts +2 -0
  300. package/cjs/dsl/story-processor/vchart/marks/arc/index.js +24 -0
  301. package/cjs/dsl/story-processor/vchart/marks/arc/index.js.map +1 -0
  302. package/cjs/dsl/story-processor/vchart/marks/arc/transformArcAppear.d.ts +14 -0
  303. package/cjs/dsl/story-processor/vchart/marks/arc/transformArcAppear.js +51 -0
  304. package/cjs/dsl/story-processor/vchart/marks/arc/transformArcAppear.js.map +1 -0
  305. package/cjs/dsl/story-processor/vchart/marks/area/appear.d.ts +4 -0
  306. package/cjs/dsl/story-processor/vchart/marks/area/appear.js +60 -0
  307. package/cjs/dsl/story-processor/vchart/marks/area/appear.js.map +1 -0
  308. package/cjs/dsl/story-processor/vchart/marks/area/disappear.d.ts +4 -0
  309. package/cjs/dsl/story-processor/vchart/marks/area/disappear.js +60 -0
  310. package/cjs/dsl/story-processor/vchart/marks/area/disappear.js.map +1 -0
  311. package/cjs/dsl/story-processor/vchart/marks/area/index.d.ts +2 -0
  312. package/cjs/dsl/story-processor/vchart/marks/area/index.js +24 -0
  313. package/cjs/dsl/story-processor/vchart/marks/area/index.js.map +1 -0
  314. package/cjs/dsl/story-processor/vchart/marks/area/transformAreaAppear.d.ts +14 -0
  315. package/cjs/dsl/story-processor/vchart/marks/area/transformAreaAppear.js +30 -0
  316. package/cjs/dsl/story-processor/vchart/marks/area/transformAreaAppear.js.map +1 -0
  317. package/cjs/dsl/story-processor/vchart/marks/index.d.ts +6 -0
  318. package/cjs/dsl/story-processor/vchart/marks/index.js +23 -0
  319. package/cjs/dsl/story-processor/vchart/marks/index.js.map +1 -0
  320. package/cjs/dsl/story-processor/vchart/marks/line/appear.d.ts +4 -0
  321. package/cjs/dsl/story-processor/vchart/marks/line/appear.js +60 -0
  322. package/cjs/dsl/story-processor/vchart/marks/line/appear.js.map +1 -0
  323. package/cjs/dsl/story-processor/vchart/marks/line/disappear.d.ts +4 -0
  324. package/cjs/dsl/story-processor/vchart/marks/line/disappear.js +60 -0
  325. package/cjs/dsl/story-processor/vchart/marks/line/disappear.js.map +1 -0
  326. package/cjs/dsl/story-processor/vchart/marks/line/index.d.ts +2 -0
  327. package/cjs/dsl/story-processor/vchart/marks/line/index.js +24 -0
  328. package/cjs/dsl/story-processor/vchart/marks/line/index.js.map +1 -0
  329. package/cjs/dsl/story-processor/vchart/marks/line/transformLineAppear.d.ts +12 -0
  330. package/cjs/dsl/story-processor/vchart/marks/line/transformLineAppear.js +30 -0
  331. package/cjs/dsl/story-processor/vchart/marks/line/transformLineAppear.js.map +1 -0
  332. package/cjs/dsl/story-processor/vchart/marks/rect/appear.d.ts +4 -0
  333. package/cjs/dsl/story-processor/vchart/marks/rect/appear.js +60 -0
  334. package/cjs/dsl/story-processor/vchart/marks/rect/appear.js.map +1 -0
  335. package/cjs/dsl/story-processor/vchart/marks/rect/disappear.d.ts +4 -0
  336. package/cjs/dsl/story-processor/vchart/marks/rect/disappear.js +60 -0
  337. package/cjs/dsl/story-processor/vchart/marks/rect/disappear.js.map +1 -0
  338. package/cjs/dsl/story-processor/vchart/marks/rect/index.d.ts +2 -0
  339. package/cjs/dsl/story-processor/vchart/marks/rect/index.js +24 -0
  340. package/cjs/dsl/story-processor/vchart/marks/rect/index.js.map +1 -0
  341. package/cjs/dsl/story-processor/vchart/marks/rect/transformRectAppear.d.ts +12 -0
  342. package/cjs/dsl/story-processor/vchart/marks/rect/transformRectAppear.js +81 -0
  343. package/cjs/dsl/story-processor/vchart/marks/rect/transformRectAppear.js.map +1 -0
  344. package/cjs/dsl/story-processor/vchart/marks/symbol/appear.d.ts +4 -0
  345. package/cjs/dsl/story-processor/vchart/marks/symbol/appear.js +60 -0
  346. package/cjs/dsl/story-processor/vchart/marks/symbol/appear.js.map +1 -0
  347. package/cjs/dsl/story-processor/vchart/marks/symbol/disappear.d.ts +4 -0
  348. package/cjs/dsl/story-processor/vchart/marks/symbol/disappear.js +60 -0
  349. package/cjs/dsl/story-processor/vchart/marks/symbol/disappear.js.map +1 -0
  350. package/cjs/dsl/story-processor/vchart/marks/symbol/index.d.ts +2 -0
  351. package/cjs/dsl/story-processor/vchart/marks/symbol/index.js +24 -0
  352. package/cjs/dsl/story-processor/vchart/marks/symbol/index.js.map +1 -0
  353. package/cjs/dsl/story-processor/vchart/marks/symbol/transformSymbolAppear.d.ts +12 -0
  354. package/cjs/dsl/story-processor/vchart/marks/symbol/transformSymbolAppear.js +30 -0
  355. package/cjs/dsl/story-processor/vchart/marks/symbol/transformSymbolAppear.js.map +1 -0
  356. package/cjs/dsl/story-processor/vchart/marks/text/appear.d.ts +4 -0
  357. package/cjs/dsl/story-processor/vchart/marks/text/appear.js +60 -0
  358. package/cjs/dsl/story-processor/vchart/marks/text/appear.js.map +1 -0
  359. package/cjs/dsl/story-processor/vchart/marks/text/disappear.d.ts +4 -0
  360. package/cjs/dsl/story-processor/vchart/marks/text/disappear.js +60 -0
  361. package/cjs/dsl/story-processor/vchart/marks/text/disappear.js.map +1 -0
  362. package/cjs/dsl/story-processor/vchart/marks/text/index.d.ts +2 -0
  363. package/cjs/dsl/story-processor/vchart/marks/text/index.js +24 -0
  364. package/cjs/dsl/story-processor/vchart/marks/text/index.js.map +1 -0
  365. package/cjs/dsl/story-processor/vchart/marks/text/transformTextAppear.d.ts +14 -0
  366. package/cjs/dsl/story-processor/vchart/marks/text/transformTextAppear.js +30 -0
  367. package/cjs/dsl/story-processor/vchart/marks/text/transformTextAppear.js.map +1 -0
  368. package/cjs/dsl/story-processor/vchart/style/lineStyle.d.ts +4 -0
  369. package/cjs/dsl/story-processor/vchart/style/lineStyle.js +53 -0
  370. package/cjs/dsl/story-processor/vchart/style/lineStyle.js.map +1 -0
  371. package/cjs/dsl/story-processor/vchart/style/style.d.ts +4 -0
  372. package/cjs/dsl/story-processor/vchart/style/style.js +51 -0
  373. package/cjs/dsl/story-processor/vchart/style/style.js.map +1 -0
  374. package/cjs/dsl/story-processor/vchart/title.d.ts +3 -0
  375. package/cjs/dsl/story-processor/vchart/title.js +42 -0
  376. package/cjs/dsl/story-processor/vchart/title.js.map +1 -0
  377. package/cjs/dsl/story-processor/vchart/update.d.ts +4 -0
  378. package/cjs/dsl/story-processor/vchart/update.js +48 -0
  379. package/cjs/dsl/story-processor/vchart/update.js.map +1 -0
  380. package/cjs/dsl/story-processor/vchart/utils/index.d.ts +2 -0
  381. package/cjs/dsl/story-processor/vchart/utils/index.js +21 -0
  382. package/cjs/dsl/story-processor/vchart/utils/index.js.map +1 -0
  383. package/cjs/dsl/story-processor/vchart/utils/isMatch.d.ts +1 -0
  384. package/cjs/dsl/story-processor/vchart/utils/isMatch.js +13 -0
  385. package/cjs/dsl/story-processor/vchart/utils/isMatch.js.map +1 -0
  386. package/cjs/dsl/story-processor/vchart/utils/mark.d.ts +3 -0
  387. package/cjs/dsl/story-processor/vchart/utils/mark.js +18 -0
  388. package/cjs/dsl/story-processor/vchart/utils/mark.js.map +1 -0
  389. package/cjs/dsl/story-processor/vchart/utils/series.d.ts +4 -0
  390. package/cjs/dsl/story-processor/vchart/utils/series.js +18 -0
  391. package/cjs/dsl/story-processor/vchart/utils/series.js.map +1 -0
  392. package/cjs/dsl/types/Datum.d.ts +1 -0
  393. package/cjs/dsl/types/Datum.js +6 -0
  394. package/cjs/dsl/types/Datum.js.map +1 -0
  395. package/cjs/dsl/types/chart/add.d.ts +13 -0
  396. package/cjs/dsl/types/chart/add.js +6 -0
  397. package/cjs/dsl/types/chart/add.js.map +1 -0
  398. package/cjs/dsl/types/chart/appear.d.ts +12 -0
  399. package/cjs/dsl/types/chart/appear.js +6 -0
  400. package/cjs/dsl/types/chart/appear.js.map +1 -0
  401. package/cjs/dsl/types/chart/createComponent.d.ts +26 -0
  402. package/cjs/dsl/types/chart/createComponent.js +6 -0
  403. package/cjs/dsl/types/chart/createComponent.js.map +1 -0
  404. package/cjs/dsl/types/chart/index.d.ts +11 -0
  405. package/cjs/dsl/types/chart/index.js +6 -0
  406. package/cjs/dsl/types/chart/index.js.map +1 -0
  407. package/cjs/dsl/types/chart/style.d.ts +10 -0
  408. package/cjs/dsl/types/chart/style.js +6 -0
  409. package/cjs/dsl/types/chart/style.js.map +1 -0
  410. package/cjs/dsl/types/chart/update.d.ts +14 -0
  411. package/cjs/dsl/types/chart/update.js +6 -0
  412. package/cjs/dsl/types/chart/update.js.map +1 -0
  413. package/cjs/dsl/types/common/bounce.d.ts +13 -0
  414. package/cjs/dsl/types/common/bounce.js +6 -0
  415. package/cjs/dsl/types/common/bounce.js.map +1 -0
  416. package/cjs/dsl/types/common/brighten.d.ts +12 -0
  417. package/cjs/dsl/types/common/brighten.js +6 -0
  418. package/cjs/dsl/types/common/brighten.js.map +1 -0
  419. package/cjs/dsl/types/common/darken.d.ts +12 -0
  420. package/cjs/dsl/types/common/darken.js +6 -0
  421. package/cjs/dsl/types/common/darken.js.map +1 -0
  422. package/cjs/dsl/types/common/flicker.d.ts +12 -0
  423. package/cjs/dsl/types/common/flicker.js +6 -0
  424. package/cjs/dsl/types/common/flicker.js.map +1 -0
  425. package/cjs/dsl/types/common/index.d.ts +7 -0
  426. package/cjs/dsl/types/common/index.js +21 -0
  427. package/cjs/dsl/types/common/index.js.map +1 -0
  428. package/cjs/dsl/types/common/moveTo.d.ts +9 -0
  429. package/cjs/dsl/types/common/moveTo.js +6 -0
  430. package/cjs/dsl/types/common/moveTo.js.map +1 -0
  431. package/cjs/dsl/types/graphic/appear.d.ts +22 -0
  432. package/cjs/dsl/types/graphic/appear.js +6 -0
  433. package/cjs/dsl/types/graphic/appear.js.map +1 -0
  434. package/cjs/dsl/types/graphic/disappear.d.ts +22 -0
  435. package/cjs/dsl/types/graphic/disappear.js +6 -0
  436. package/cjs/dsl/types/graphic/disappear.js.map +1 -0
  437. package/cjs/dsl/types/graphic/index.d.ts +10 -0
  438. package/cjs/dsl/types/graphic/index.js +6 -0
  439. package/cjs/dsl/types/graphic/index.js.map +1 -0
  440. package/cjs/dsl/types/graphic/style.d.ts +9 -0
  441. package/cjs/dsl/types/graphic/style.js +6 -0
  442. package/cjs/dsl/types/graphic/style.js.map +1 -0
  443. package/cjs/dsl/types/index.d.ts +20 -0
  444. package/cjs/dsl/types/index.js +22 -0
  445. package/cjs/dsl/types/index.js.map +1 -0
  446. package/cjs/dsl/utils/datum.d.ts +1 -0
  447. package/cjs/dsl/utils/datum.js +16 -0
  448. package/cjs/dsl/utils/datum.js.map +1 -0
  449. package/cjs/dsl/utils/flicker.d.ts +2 -0
  450. package/cjs/dsl/utils/flicker.js +18 -0
  451. package/cjs/dsl/utils/flicker.js.map +1 -0
  452. package/cjs/edit/const.d.ts +5 -0
  453. package/cjs/edit/const.js +10 -0
  454. package/cjs/edit/const.js.map +1 -0
  455. package/cjs/edit/edit-action.d.ts +15 -0
  456. package/cjs/edit/edit-action.js +37 -0
  457. package/cjs/edit/edit-action.js.map +1 -0
  458. package/cjs/edit/edit-component/base-selection.d.ts +29 -0
  459. package/cjs/edit/edit-component/base-selection.js +68 -0
  460. package/cjs/edit/edit-component/base-selection.js.map +1 -0
  461. package/cjs/edit/edit-component/box-selection.d.ts +10 -0
  462. package/cjs/edit/edit-component/box-selection.js +27 -0
  463. package/cjs/edit/edit-component/box-selection.js.map +1 -0
  464. package/cjs/edit/edit-component/common.d.ts +11 -0
  465. package/cjs/edit/edit-component/common.js +31 -0
  466. package/cjs/edit/edit-component/common.js.map +1 -0
  467. package/cjs/edit/edit-component/edit-control/constants.d.ts +9 -0
  468. package/cjs/edit/edit-component/edit-control/constants.js +10 -0
  469. package/cjs/edit/edit-component/edit-control/constants.js.map +1 -0
  470. package/cjs/edit/edit-component/edit-control/enum.d.ts +1 -0
  471. package/cjs/edit/edit-component/edit-control/enum.js +3 -0
  472. package/cjs/edit/edit-component/edit-control/enum.js.map +1 -0
  473. package/cjs/edit/edit-component/edit-control/richtext-transform-control.d.ts +12 -0
  474. package/cjs/edit/edit-component/edit-control/richtext-transform-control.js +60 -0
  475. package/cjs/edit/edit-component/edit-control/richtext-transform-control.js.map +1 -0
  476. package/cjs/edit/edit-component/edit-control/transform-control.d.ts +136 -0
  477. package/cjs/edit/edit-component/edit-control/transform-control.js +443 -0
  478. package/cjs/edit/edit-component/edit-control/transform-control.js.map +1 -0
  479. package/cjs/edit/edit-component/edit-control/transform-drag.d.ts +19 -0
  480. package/cjs/edit/edit-component/edit-control/transform-drag.js +45 -0
  481. package/cjs/edit/edit-component/edit-control/transform-drag.js.map +1 -0
  482. package/cjs/edit/edit-component/image-selection.d.ts +8 -0
  483. package/cjs/edit/edit-component/image-selection.js +19 -0
  484. package/cjs/edit/edit-component/image-selection.js.map +1 -0
  485. package/cjs/edit/edit-component/index.d.ts +1 -0
  486. package/cjs/edit/edit-component/index.js +17 -0
  487. package/cjs/edit/edit-component/index.js.map +1 -0
  488. package/cjs/edit/edit-component/layer-edit.d.ts +1 -0
  489. package/cjs/edit/edit-component/layer-edit.js +1 -0
  490. package/cjs/edit/edit-component/layer-edit.js.map +1 -0
  491. package/cjs/edit/edit-component/rect-selection.d.ts +18 -0
  492. package/cjs/edit/edit-component/rect-selection.js +35 -0
  493. package/cjs/edit/edit-component/rect-selection.js.map +1 -0
  494. package/cjs/edit/edit-component/richtext-selection.d.ts +17 -0
  495. package/cjs/edit/edit-component/richtext-selection.js +39 -0
  496. package/cjs/edit/edit-component/richtext-selection.js.map +1 -0
  497. package/cjs/edit/edit-component/text-selection.d.ts +12 -0
  498. package/cjs/edit/edit-component/text-selection.js +30 -0
  499. package/cjs/edit/edit-component/text-selection.js.map +1 -0
  500. package/cjs/edit/edit.d.ts +32 -0
  501. package/cjs/edit/edit.js +56 -0
  502. package/cjs/edit/edit.js.map +1 -0
  503. package/cjs/edit/index.d.ts +2 -0
  504. package/cjs/edit/index.js +21 -0
  505. package/cjs/edit/index.js.map +1 -0
  506. package/cjs/edit/interface.d.ts +60 -0
  507. package/cjs/edit/interface.js +10 -0
  508. package/cjs/edit/interface.js.map +1 -0
  509. package/cjs/index.d.ts +2 -0
  510. package/cjs/index.js +24 -0
  511. package/cjs/index.js.map +1 -0
  512. package/cjs/interface/type.d.ts +26 -0
  513. package/cjs/interface/type.js +6 -0
  514. package/cjs/interface/type.js.map +1 -0
  515. package/cjs/scene/action.d.ts +20 -0
  516. package/cjs/scene/action.js +44 -0
  517. package/cjs/scene/action.js.map +1 -0
  518. package/cjs/scene/index.d.ts +1 -0
  519. package/cjs/scene/index.js +20 -0
  520. package/cjs/scene/index.js.map +1 -0
  521. package/cjs/scene/scene.d.ts +21 -0
  522. package/cjs/scene/scene.js +72 -0
  523. package/cjs/scene/scene.js.map +1 -0
  524. package/cjs/story/act/act.d.ts +2 -0
  525. package/cjs/story/act/act.js +10 -0
  526. package/cjs/story/act/act.js.map +1 -0
  527. package/cjs/story/canvas/canvas.d.ts +20 -0
  528. package/cjs/story/canvas/canvas.js +65 -0
  529. package/cjs/story/canvas/canvas.js.map +1 -0
  530. package/cjs/story/character/base/base.d.ts +26 -0
  531. package/cjs/story/character/base/base.js +40 -0
  532. package/cjs/story/character/base/base.js.map +1 -0
  533. package/cjs/story/character/chart/character.d.ts +24 -0
  534. package/cjs/story/character/chart/character.js +117 -0
  535. package/cjs/story/character/chart/character.js.map +1 -0
  536. package/cjs/story/character/chart/characters/area.d.ts +4 -0
  537. package/cjs/story/character/chart/characters/area.js +14 -0
  538. package/cjs/story/character/chart/characters/area.js.map +1 -0
  539. package/cjs/story/character/chart/characters/bar.d.ts +4 -0
  540. package/cjs/story/character/chart/characters/bar.js +14 -0
  541. package/cjs/story/character/chart/characters/bar.js.map +1 -0
  542. package/cjs/story/character/chart/characters/line.d.ts +4 -0
  543. package/cjs/story/character/chart/characters/line.js +14 -0
  544. package/cjs/story/character/chart/characters/line.js.map +1 -0
  545. package/cjs/story/character/chart/characters/pie.d.ts +4 -0
  546. package/cjs/story/character/chart/characters/pie.js +14 -0
  547. package/cjs/story/character/chart/characters/pie.js.map +1 -0
  548. package/cjs/story/character/chart/characters/radar.d.ts +4 -0
  549. package/cjs/story/character/chart/characters/radar.js +14 -0
  550. package/cjs/story/character/chart/characters/radar.js.map +1 -0
  551. package/cjs/story/character/chart/characters/rangeColumn.d.ts +4 -0
  552. package/cjs/story/character/chart/characters/rangeColumn.js +14 -0
  553. package/cjs/story/character/chart/characters/rangeColumn.js.map +1 -0
  554. package/cjs/story/character/chart/characters/rose.d.ts +4 -0
  555. package/cjs/story/character/chart/characters/rose.js +14 -0
  556. package/cjs/story/character/chart/characters/rose.js.map +1 -0
  557. package/cjs/story/character/chart/characters/scatter.d.ts +4 -0
  558. package/cjs/story/character/chart/characters/scatter.js +14 -0
  559. package/cjs/story/character/chart/characters/scatter.js.map +1 -0
  560. package/cjs/story/character/chart/characters/sunburst.d.ts +4 -0
  561. package/cjs/story/character/chart/characters/sunburst.js +14 -0
  562. package/cjs/story/character/chart/characters/sunburst.js.map +1 -0
  563. package/cjs/story/character/chart/characters/treemap.d.ts +4 -0
  564. package/cjs/story/character/chart/characters/treemap.js +14 -0
  565. package/cjs/story/character/chart/characters/treemap.js.map +1 -0
  566. package/cjs/story/character/chart/characters/wordcloud.d.ts +4 -0
  567. package/cjs/story/character/chart/characters/wordcloud.js +14 -0
  568. package/cjs/story/character/chart/characters/wordcloud.js.map +1 -0
  569. package/cjs/story/character/chart/const.d.ts +9 -0
  570. package/cjs/story/character/chart/const.js +13 -0
  571. package/cjs/story/character/chart/const.js.map +1 -0
  572. package/cjs/story/character/chart/data/interface.d.ts +44 -0
  573. package/cjs/story/character/chart/data/interface.js +6 -0
  574. package/cjs/story/character/chart/data/interface.js.map +1 -0
  575. package/cjs/story/character/chart/data/parser/standard.d.ts +30 -0
  576. package/cjs/story/character/chart/data/parser/standard.js +71 -0
  577. package/cjs/story/character/chart/data/parser/standard.js.map +1 -0
  578. package/cjs/story/character/chart/graphic/vchart-graphic-picker.d.ts +6 -0
  579. package/cjs/story/character/chart/graphic/vchart-graphic-picker.js +37 -0
  580. package/cjs/story/character/chart/graphic/vchart-graphic-picker.js.map +1 -0
  581. package/cjs/story/character/chart/graphic/vchart-graphic-render.d.ts +10 -0
  582. package/cjs/story/character/chart/graphic/vchart-graphic-render.js +41 -0
  583. package/cjs/story/character/chart/graphic/vchart-graphic-render.js.map +1 -0
  584. package/cjs/story/character/chart/graphic/vchart-graphic.d.ts +35 -0
  585. package/cjs/story/character/chart/graphic/vchart-graphic.js +67 -0
  586. package/cjs/story/character/chart/graphic/vchart-graphic.js.map +1 -0
  587. package/cjs/story/character/chart/parser.d.ts +1 -0
  588. package/cjs/story/character/chart/parser.js +3 -0
  589. package/cjs/story/character/chart/parser.js.map +1 -0
  590. package/cjs/story/character/chart/runtime/common-spec.d.ts +10 -0
  591. package/cjs/story/character/chart/runtime/common-spec.js +27 -0
  592. package/cjs/story/character/chart/runtime/common-spec.js.map +1 -0
  593. package/cjs/story/character/chart/runtime/component-spec.d.ts +12 -0
  594. package/cjs/story/character/chart/runtime/component-spec.js +32 -0
  595. package/cjs/story/character/chart/runtime/component-spec.js.map +1 -0
  596. package/cjs/story/character/chart/runtime/interface.d.ts +10 -0
  597. package/cjs/story/character/chart/runtime/interface.js +6 -0
  598. package/cjs/story/character/chart/runtime/interface.js.map +1 -0
  599. package/cjs/story/character/chart/runtime/series-spec.d.ts +10 -0
  600. package/cjs/story/character/chart/runtime/series-spec.js +27 -0
  601. package/cjs/story/character/chart/runtime/series-spec.js.map +1 -0
  602. package/cjs/story/character/chart/runtime/utils.d.ts +2 -0
  603. package/cjs/story/character/chart/runtime/utils.js +15 -0
  604. package/cjs/story/character/chart/runtime/utils.js.map +1 -0
  605. package/cjs/story/character/chart/spec-process/data-temp-transform.d.ts +9 -0
  606. package/cjs/story/character/chart/spec-process/data-temp-transform.js +19 -0
  607. package/cjs/story/character/chart/spec-process/data-temp-transform.js.map +1 -0
  608. package/cjs/story/character/chart/spec-process/interface.d.ts +22 -0
  609. package/cjs/story/character/chart/spec-process/interface.js +6 -0
  610. package/cjs/story/character/chart/spec-process/interface.js.map +1 -0
  611. package/cjs/story/character/chart/spec-process/spec-process.d.ts +11 -0
  612. package/cjs/story/character/chart/spec-process/spec-process.js +44 -0
  613. package/cjs/story/character/chart/spec-process/spec-process.js.map +1 -0
  614. package/cjs/story/character/chart/temp/constant.d.ts +14 -0
  615. package/cjs/story/character/chart/temp/constant.js +18 -0
  616. package/cjs/story/character/chart/temp/constant.js.map +1 -0
  617. package/cjs/story/character/chart/temp/index.d.ts +2 -0
  618. package/cjs/story/character/chart/temp/index.js +21 -0
  619. package/cjs/story/character/chart/temp/index.js.map +1 -0
  620. package/cjs/story/character/chart/temp/interface.d.ts +21 -0
  621. package/cjs/story/character/chart/temp/interface.js +6 -0
  622. package/cjs/story/character/chart/temp/interface.js.map +1 -0
  623. package/cjs/story/character/chart/temp/templates/area.d.ts +17 -0
  624. package/cjs/story/character/chart/temp/templates/area.js +28 -0
  625. package/cjs/story/character/chart/temp/templates/area.js.map +1 -0
  626. package/cjs/story/character/chart/temp/templates/bar.d.ts +13 -0
  627. package/cjs/story/character/chart/temp/templates/bar.js +26 -0
  628. package/cjs/story/character/chart/temp/templates/bar.js.map +1 -0
  629. package/cjs/story/character/chart/temp/templates/base-temp.d.ts +18 -0
  630. package/cjs/story/character/chart/temp/templates/base-temp.js +18 -0
  631. package/cjs/story/character/chart/temp/templates/base-temp.js.map +1 -0
  632. package/cjs/story/character/chart/temp/templates/cartesian-single.d.ts +18 -0
  633. package/cjs/story/character/chart/temp/templates/cartesian-single.js +33 -0
  634. package/cjs/story/character/chart/temp/templates/cartesian-single.js.map +1 -0
  635. package/cjs/story/character/chart/temp/templates/common.d.ts +165 -0
  636. package/cjs/story/character/chart/temp/templates/common.js +157 -0
  637. package/cjs/story/character/chart/temp/templates/common.js.map +1 -0
  638. package/cjs/story/character/chart/temp/templates/line.d.ts +43 -0
  639. package/cjs/story/character/chart/temp/templates/line.js +41 -0
  640. package/cjs/story/character/chart/temp/templates/line.js.map +1 -0
  641. package/cjs/story/character/chart/temp/templates/pie.d.ts +11 -0
  642. package/cjs/story/character/chart/temp/templates/pie.js +34 -0
  643. package/cjs/story/character/chart/temp/templates/pie.js.map +1 -0
  644. package/cjs/story/character/chart/temp/templates/polar-single.d.ts +11 -0
  645. package/cjs/story/character/chart/temp/templates/polar-single.js +28 -0
  646. package/cjs/story/character/chart/temp/templates/polar-single.js.map +1 -0
  647. package/cjs/story/character/chart/temp/templates/radar.d.ts +10 -0
  648. package/cjs/story/character/chart/temp/templates/radar.js +24 -0
  649. package/cjs/story/character/chart/temp/templates/radar.js.map +1 -0
  650. package/cjs/story/character/chart/temp/templates/rangeColumn.d.ts +16 -0
  651. package/cjs/story/character/chart/temp/templates/rangeColumn.js +29 -0
  652. package/cjs/story/character/chart/temp/templates/rangeColumn.js.map +1 -0
  653. package/cjs/story/character/chart/temp/templates/rose.d.ts +8 -0
  654. package/cjs/story/character/chart/temp/templates/rose.js +21 -0
  655. package/cjs/story/character/chart/temp/templates/rose.js.map +1 -0
  656. package/cjs/story/character/chart/temp/templates/scatter.d.ts +12 -0
  657. package/cjs/story/character/chart/temp/templates/scatter.js +24 -0
  658. package/cjs/story/character/chart/temp/templates/scatter.js.map +1 -0
  659. package/cjs/story/character/chart/temp/templates/sunburst.d.ts +11 -0
  660. package/cjs/story/character/chart/temp/templates/sunburst.js +34 -0
  661. package/cjs/story/character/chart/temp/templates/sunburst.js.map +1 -0
  662. package/cjs/story/character/chart/temp/templates/treemap.d.ts +11 -0
  663. package/cjs/story/character/chart/temp/templates/treemap.js +34 -0
  664. package/cjs/story/character/chart/temp/templates/treemap.js.map +1 -0
  665. package/cjs/story/character/chart/temp/templates/wordcloud.d.ts +11 -0
  666. package/cjs/story/character/chart/temp/templates/wordcloud.js +34 -0
  667. package/cjs/story/character/chart/temp/templates/wordcloud.js.map +1 -0
  668. package/cjs/story/character/component/character.d.ts +34 -0
  669. package/cjs/story/character/component/character.js +75 -0
  670. package/cjs/story/character/component/character.js.map +1 -0
  671. package/cjs/story/character/component/characters/character-image.d.ts +6 -0
  672. package/cjs/story/character/component/characters/character-image.js +19 -0
  673. package/cjs/story/character/component/characters/character-image.js.map +1 -0
  674. package/cjs/story/character/component/characters/character-line.d.ts +6 -0
  675. package/cjs/story/character/component/characters/character-line.js +19 -0
  676. package/cjs/story/character/component/characters/character-line.js.map +1 -0
  677. package/cjs/story/character/component/characters/character-qipao.d.ts +6 -0
  678. package/cjs/story/character/component/characters/character-qipao.js +19 -0
  679. package/cjs/story/character/component/characters/character-qipao.js.map +1 -0
  680. package/cjs/story/character/component/characters/character-rect.d.ts +6 -0
  681. package/cjs/story/character/component/characters/character-rect.js +19 -0
  682. package/cjs/story/character/component/characters/character-rect.js.map +1 -0
  683. package/cjs/story/character/component/characters/character-richtext.d.ts +6 -0
  684. package/cjs/story/character/component/characters/character-richtext.js +19 -0
  685. package/cjs/story/character/component/characters/character-richtext.js.map +1 -0
  686. package/cjs/story/character/component/characters/character-text.d.ts +6 -0
  687. package/cjs/story/character/component/characters/character-text.js +19 -0
  688. package/cjs/story/character/component/characters/character-text.js.map +1 -0
  689. package/cjs/story/character/component/graphic/graphic-text.d.ts +18 -0
  690. package/cjs/story/character/component/graphic/graphic-text.js +103 -0
  691. package/cjs/story/character/component/graphic/graphic-text.js.map +1 -0
  692. package/cjs/story/character/component/graphic/graphic.d.ts +40 -0
  693. package/cjs/story/character/component/graphic/graphic.js +92 -0
  694. package/cjs/story/character/component/graphic/graphic.js.map +1 -0
  695. package/cjs/story/character/component/graphic/image.d.ts +17 -0
  696. package/cjs/story/character/component/graphic/image.js +30 -0
  697. package/cjs/story/character/component/graphic/image.js.map +1 -0
  698. package/cjs/story/character/component/graphic/line.d.ts +7 -0
  699. package/cjs/story/character/component/graphic/line.js +29 -0
  700. package/cjs/story/character/component/graphic/line.js.map +1 -0
  701. package/cjs/story/character/component/graphic/qipao.d.ts +15 -0
  702. package/cjs/story/character/component/graphic/qipao.js +29 -0
  703. package/cjs/story/character/component/graphic/qipao.js.map +1 -0
  704. package/cjs/story/character/component/graphic/rect.d.ts +18 -0
  705. package/cjs/story/character/component/graphic/rect.js +31 -0
  706. package/cjs/story/character/component/graphic/rect.js.map +1 -0
  707. package/cjs/story/character/component/graphic/richtext.d.ts +9 -0
  708. package/cjs/story/character/component/graphic/richtext.js +48 -0
  709. package/cjs/story/character/component/graphic/richtext.js.map +1 -0
  710. package/cjs/story/character/component/graphic/text.d.ts +24 -0
  711. package/cjs/story/character/component/graphic/text.js +47 -0
  712. package/cjs/story/character/component/graphic/text.js.map +1 -0
  713. package/cjs/story/character/component/graphic/utils.d.ts +2 -0
  714. package/cjs/story/character/component/graphic/utils.js +14 -0
  715. package/cjs/story/character/component/graphic/utils.js.map +1 -0
  716. package/cjs/story/character/dsl-interface.d.ts +67 -0
  717. package/cjs/story/character/dsl-interface.js +6 -0
  718. package/cjs/story/character/dsl-interface.js.map +1 -0
  719. package/cjs/story/character/index.d.ts +2 -0
  720. package/cjs/story/character/index.js +21 -0
  721. package/cjs/story/character/index.js.map +1 -0
  722. package/cjs/story/character/runtime-interface.d.ts +41 -0
  723. package/cjs/story/character/runtime-interface.js +6 -0
  724. package/cjs/story/character/runtime-interface.js.map +1 -0
  725. package/cjs/story/character/visactor/character.d.ts +31 -0
  726. package/cjs/story/character/visactor/character.js +58 -0
  727. package/cjs/story/character/visactor/character.js.map +1 -0
  728. package/cjs/story/character/visactor/data-temp-transform-base.d.ts +25 -0
  729. package/cjs/story/character/visactor/data-temp-transform-base.js +65 -0
  730. package/cjs/story/character/visactor/data-temp-transform-base.js.map +1 -0
  731. package/cjs/story/character/visactor/interface.d.ts +100 -0
  732. package/cjs/story/character/visactor/interface.js +6 -0
  733. package/cjs/story/character/visactor/interface.js.map +1 -0
  734. package/cjs/story/character/visactor/spec-process-base.d.ts +28 -0
  735. package/cjs/story/character/visactor/spec-process-base.js +50 -0
  736. package/cjs/story/character/visactor/spec-process-base.js.map +1 -0
  737. package/cjs/story/factory/factory.d.ts +27 -0
  738. package/cjs/story/factory/factory.js +42 -0
  739. package/cjs/story/factory/factory.js.map +1 -0
  740. package/cjs/story/index.d.ts +2 -0
  741. package/cjs/story/index.js +53 -0
  742. package/cjs/story/index.js.map +1 -0
  743. package/cjs/story/interface/dsl-interface.d.ts +25 -0
  744. package/cjs/story/interface/dsl-interface.js +6 -0
  745. package/cjs/story/interface/dsl-interface.js.map +1 -0
  746. package/cjs/story/interface/index.d.ts +2 -0
  747. package/cjs/story/interface/index.js +21 -0
  748. package/cjs/story/interface/index.js.map +1 -0
  749. package/cjs/story/interface/player.d.ts +14 -0
  750. package/cjs/story/interface/player.js +6 -0
  751. package/cjs/story/interface/player.js.map +1 -0
  752. package/cjs/story/interface/runtime-interface.d.ts +11 -0
  753. package/cjs/story/interface/runtime-interface.js +6 -0
  754. package/cjs/story/interface/runtime-interface.js.map +1 -0
  755. package/cjs/story/player/encode.d.ts +1 -0
  756. package/cjs/story/player/encode.js +3 -0
  757. package/cjs/story/player/encode.js.map +1 -0
  758. package/cjs/story/player/index.d.ts +45 -0
  759. package/cjs/story/player/index.js +138 -0
  760. package/cjs/story/player/index.js.map +1 -0
  761. package/cjs/story/player/ticker.d.ts +1 -0
  762. package/cjs/story/player/ticker.js +3 -0
  763. package/cjs/story/player/ticker.js.map +1 -0
  764. package/cjs/story/story.d.ts +27 -0
  765. package/cjs/story/story.js +88 -0
  766. package/cjs/story/story.js.map +1 -0
  767. package/cjs/story/utils/chart.d.ts +8 -0
  768. package/cjs/story/utils/chart.js +75 -0
  769. package/cjs/story/utils/chart.js.map +1 -0
  770. package/cjs/story/utils/layout.d.ts +2 -0
  771. package/cjs/story/utils/layout.js +15 -0
  772. package/cjs/story/utils/layout.js.map +1 -0
  773. package/cjs/task.d.ts +21 -0
  774. package/cjs/task.js +23 -0
  775. package/cjs/task.js.map +1 -0
  776. package/cjs/template/base-template.d.ts +13 -0
  777. package/cjs/template/base-template.js +21 -0
  778. package/cjs/template/base-template.js.map +1 -0
  779. package/cjs/template/charts/simple-chart.d.ts +8 -0
  780. package/cjs/template/charts/simple-chart.js +38 -0
  781. package/cjs/template/charts/simple-chart.js.map +1 -0
  782. package/cjs/template/ranking-bar/interface.d.ts +41 -0
  783. package/cjs/template/ranking-bar/interface.js +6 -0
  784. package/cjs/template/ranking-bar/interface.js.map +1 -0
  785. package/cjs/template/ranking-bar/ranking-bar.d.ts +16 -0
  786. package/cjs/template/ranking-bar/ranking-bar.js +39 -0
  787. package/cjs/template/ranking-bar/ranking-bar.js.map +1 -0
  788. package/cjs/template/ranking-bar/spec-parser.d.ts +7 -0
  789. package/cjs/template/ranking-bar/spec-parser.js +319 -0
  790. package/cjs/template/ranking-bar/spec-parser.js.map +1 -0
  791. package/cjs/type/common.d.ts +3 -0
  792. package/cjs/type/common.js +6 -0
  793. package/cjs/type/common.js.map +1 -0
  794. package/cjs/type/space.d.ts +6 -0
  795. package/cjs/type/space.js +6 -0
  796. package/cjs/type/space.js.map +1 -0
  797. package/cjs/util/common.d.ts +2 -0
  798. package/cjs/util/common.js +18 -0
  799. package/cjs/util/common.js.map +1 -0
  800. package/cjs/util/math.d.ts +5 -0
  801. package/cjs/util/math.js +46 -0
  802. package/cjs/util/math.js.map +1 -0
  803. package/cjs/util/size.d.ts +7 -0
  804. package/cjs/util/size.js +28 -0
  805. package/cjs/util/size.js.map +1 -0
  806. package/cjs/util/space.d.ts +42 -0
  807. package/cjs/util/space.js +109 -0
  808. package/cjs/util/space.js.map +1 -0
  809. package/cjs/util/vchart-api.d.ts +3 -0
  810. package/cjs/util/vchart-api.js +17 -0
  811. package/cjs/util/vchart-api.js.map +1 -0
  812. package/cjs/util/vrender-api.d.ts +2 -0
  813. package/cjs/util/vrender-api.js +13 -0
  814. package/cjs/util/vrender-api.js.map +1 -0
  815. package/dist/index.js +52990 -0
  816. package/dist/index.min.js +21 -0
  817. package/es/animate/animate.d.ts +13 -0
  818. package/es/animate/animate.js +12 -0
  819. package/es/animate/animate.js.map +1 -0
  820. package/es/animate/bounce.d.ts +15 -0
  821. package/es/animate/bounce.js +23 -0
  822. package/es/animate/bounce.js.map +1 -0
  823. package/es/animate/highlight.d.ts +5 -0
  824. package/es/animate/highlight.js +41 -0
  825. package/es/animate/highlight.js.map +1 -0
  826. package/es/animate/typewirter.d.ts +14 -0
  827. package/es/animate/typewirter.js +50 -0
  828. package/es/animate/typewirter.js.map +1 -0
  829. package/es/animate/util/paths.d.ts +31 -0
  830. package/es/animate/util/paths.js +352 -0
  831. package/es/animate/util/paths.js.map +1 -0
  832. package/es/animate/util/util.d.ts +18 -0
  833. package/es/animate/util/util.js +112 -0
  834. package/es/animate/util/util.js.map +1 -0
  835. package/es/animate/wipeIn.d.ts +32 -0
  836. package/es/animate/wipeIn.js +113 -0
  837. package/es/animate/wipeIn.js.map +1 -0
  838. package/es/component/title.d.ts +18 -0
  839. package/es/component/title.js +42 -0
  840. package/es/component/title.js.map +1 -0
  841. package/es/constants/attribute.d.ts +2 -0
  842. package/es/constants/attribute.js +4 -0
  843. package/es/constants/attribute.js.map +1 -0
  844. package/es/dsl/constant/index.d.ts +29 -0
  845. package/es/dsl/constant/index.js +26 -0
  846. package/es/dsl/constant/index.js.map +1 -0
  847. package/es/dsl/story-chart/area.d.ts +5 -0
  848. package/es/dsl/story-chart/area.js +8 -0
  849. package/es/dsl/story-chart/area.js.map +1 -0
  850. package/es/dsl/story-chart/bar.d.ts +13 -0
  851. package/es/dsl/story-chart/bar.js +42 -0
  852. package/es/dsl/story-chart/bar.js.map +1 -0
  853. package/es/dsl/story-chart/chart.d.ts +25 -0
  854. package/es/dsl/story-chart/chart.js +62 -0
  855. package/es/dsl/story-chart/chart.js.map +1 -0
  856. package/es/dsl/story-chart/component/base.d.ts +9 -0
  857. package/es/dsl/story-chart/component/base.js +18 -0
  858. package/es/dsl/story-chart/component/base.js.map +1 -0
  859. package/es/dsl/story-chart/component/markPoint.d.ts +11 -0
  860. package/es/dsl/story-chart/component/markPoint.js +16 -0
  861. package/es/dsl/story-chart/component/markPoint.js.map +1 -0
  862. package/es/dsl/story-chart/component/title.d.ts +1 -0
  863. package/es/dsl/story-chart/component/title.js +3 -0
  864. package/es/dsl/story-chart/component/title.js.map +1 -0
  865. package/es/dsl/story-chart/default/add.d.ts +4 -0
  866. package/es/dsl/story-chart/default/add.js +10 -0
  867. package/es/dsl/story-chart/default/add.js.map +1 -0
  868. package/es/dsl/story-chart/default/updateStyle.d.ts +2 -0
  869. package/es/dsl/story-chart/default/updateStyle.js +7 -0
  870. package/es/dsl/story-chart/default/updateStyle.js.map +1 -0
  871. package/es/dsl/story-chart/element.d.ts +3 -0
  872. package/es/dsl/story-chart/element.js +8 -0
  873. package/es/dsl/story-chart/element.js.map +1 -0
  874. package/es/dsl/story-chart/index.d.ts +6 -0
  875. package/es/dsl/story-chart/index.js +10 -0
  876. package/es/dsl/story-chart/index.js.map +1 -0
  877. package/es/dsl/story-chart/line.d.ts +10 -0
  878. package/es/dsl/story-chart/line.js +32 -0
  879. package/es/dsl/story-chart/line.js.map +1 -0
  880. package/es/dsl/story-chart/pie.d.ts +8 -0
  881. package/es/dsl/story-chart/pie.js +21 -0
  882. package/es/dsl/story-chart/pie.js.map +1 -0
  883. package/es/dsl/story-executor/index.d.ts +14 -0
  884. package/es/dsl/story-executor/index.js +47 -0
  885. package/es/dsl/story-executor/index.js.map +1 -0
  886. package/es/dsl/story-processor/graphic/appear.d.ts +3 -0
  887. package/es/dsl/story-processor/graphic/appear.js +42 -0
  888. package/es/dsl/story-processor/graphic/appear.js.map +1 -0
  889. package/es/dsl/story-processor/graphic/brighten.d.ts +3 -0
  890. package/es/dsl/story-processor/graphic/brighten.js +38 -0
  891. package/es/dsl/story-processor/graphic/brighten.js.map +1 -0
  892. package/es/dsl/story-processor/graphic/darken.d.ts +3 -0
  893. package/es/dsl/story-processor/graphic/darken.js +38 -0
  894. package/es/dsl/story-processor/graphic/darken.js.map +1 -0
  895. package/es/dsl/story-processor/graphic/disappear.d.ts +3 -0
  896. package/es/dsl/story-processor/graphic/disappear.js +41 -0
  897. package/es/dsl/story-processor/graphic/disappear.js.map +1 -0
  898. package/es/dsl/story-processor/graphic/effect/appear.d.ts +48 -0
  899. package/es/dsl/story-processor/graphic/effect/appear.js +134 -0
  900. package/es/dsl/story-processor/graphic/effect/appear.js.map +1 -0
  901. package/es/dsl/story-processor/graphic/effect/bounce.d.ts +3 -0
  902. package/es/dsl/story-processor/graphic/effect/bounce.js +17 -0
  903. package/es/dsl/story-processor/graphic/effect/bounce.js.map +1 -0
  904. package/es/dsl/story-processor/graphic/effect/disappear.d.ts +38 -0
  905. package/es/dsl/story-processor/graphic/effect/disappear.js +101 -0
  906. package/es/dsl/story-processor/graphic/effect/disappear.js.map +1 -0
  907. package/es/dsl/story-processor/graphic/effect/flicker.d.ts +3 -0
  908. package/es/dsl/story-processor/graphic/effect/flicker.js +9 -0
  909. package/es/dsl/story-processor/graphic/effect/flicker.js.map +1 -0
  910. package/es/dsl/story-processor/graphic/effect/moveTo.d.ts +9 -0
  911. package/es/dsl/story-processor/graphic/effect/moveTo.js +7 -0
  912. package/es/dsl/story-processor/graphic/effect/moveTo.js.map +1 -0
  913. package/es/dsl/story-processor/graphic/effect/shade.d.ts +5 -0
  914. package/es/dsl/story-processor/graphic/effect/shade.js +26 -0
  915. package/es/dsl/story-processor/graphic/effect/shade.js.map +1 -0
  916. package/es/dsl/story-processor/graphic/effect/typewriter.d.ts +2 -0
  917. package/es/dsl/story-processor/graphic/effect/typewriter.js +15 -0
  918. package/es/dsl/story-processor/graphic/effect/typewriter.js.map +1 -0
  919. package/es/dsl/story-processor/graphic/flicker.d.ts +3 -0
  920. package/es/dsl/story-processor/graphic/flicker.js +38 -0
  921. package/es/dsl/story-processor/graphic/flicker.js.map +1 -0
  922. package/es/dsl/story-processor/graphic/moveTo.d.ts +4 -0
  923. package/es/dsl/story-processor/graphic/moveTo.js +40 -0
  924. package/es/dsl/story-processor/graphic/moveTo.js.map +1 -0
  925. package/es/dsl/story-processor/graphic/style.d.ts +5 -0
  926. package/es/dsl/story-processor/graphic/style.js +37 -0
  927. package/es/dsl/story-processor/graphic/style.js.map +1 -0
  928. package/es/dsl/story-processor/graphic/util.d.ts +7 -0
  929. package/es/dsl/story-processor/graphic/util.js +14 -0
  930. package/es/dsl/story-processor/graphic/util.js.map +1 -0
  931. package/es/dsl/story-processor/index.d.ts +2 -0
  932. package/es/dsl/story-processor/index.js +4 -0
  933. package/es/dsl/story-processor/index.js.map +1 -0
  934. package/es/dsl/story-processor/processor.d.ts +17 -0
  935. package/es/dsl/story-processor/processor.js +64 -0
  936. package/es/dsl/story-processor/processor.js.map +1 -0
  937. package/es/dsl/story-processor/processorMap/common.d.ts +4 -0
  938. package/es/dsl/story-processor/processorMap/common.js +7 -0
  939. package/es/dsl/story-processor/processorMap/common.js.map +1 -0
  940. package/es/dsl/story-processor/processorMap/index.d.ts +1 -0
  941. package/es/dsl/story-processor/processorMap/index.js +2 -0
  942. package/es/dsl/story-processor/processorMap/index.js.map +1 -0
  943. package/es/dsl/story-processor/processorMap/processorMap.d.ts +460 -0
  944. package/es/dsl/story-processor/processorMap/processorMap.js +127 -0
  945. package/es/dsl/story-processor/processorMap/processorMap.js.map +1 -0
  946. package/es/dsl/story-processor/processorMap/radar.d.ts +11 -0
  947. package/es/dsl/story-processor/processorMap/radar.js +26 -0
  948. package/es/dsl/story-processor/processorMap/radar.js.map +1 -0
  949. package/es/dsl/story-processor/processorMap/rangeColumn.d.ts +11 -0
  950. package/es/dsl/story-processor/processorMap/rangeColumn.js +26 -0
  951. package/es/dsl/story-processor/processorMap/rangeColumn.js.map +1 -0
  952. package/es/dsl/story-processor/processorMap/rose.d.ts +11 -0
  953. package/es/dsl/story-processor/processorMap/rose.js +26 -0
  954. package/es/dsl/story-processor/processorMap/rose.js.map +1 -0
  955. package/es/dsl/story-processor/processorMap/scatter.d.ts +11 -0
  956. package/es/dsl/story-processor/processorMap/scatter.js +26 -0
  957. package/es/dsl/story-processor/processorMap/scatter.js.map +1 -0
  958. package/es/dsl/story-processor/processorMap/sunburst.d.ts +11 -0
  959. package/es/dsl/story-processor/processorMap/sunburst.js +26 -0
  960. package/es/dsl/story-processor/processorMap/sunburst.js.map +1 -0
  961. package/es/dsl/story-processor/processorMap/treeMap.d.ts +11 -0
  962. package/es/dsl/story-processor/processorMap/treeMap.js +26 -0
  963. package/es/dsl/story-processor/processorMap/treeMap.js.map +1 -0
  964. package/es/dsl/story-processor/processorMap/wordCloud.d.ts +11 -0
  965. package/es/dsl/story-processor/processorMap/wordCloud.js +26 -0
  966. package/es/dsl/story-processor/processorMap/wordCloud.js.map +1 -0
  967. package/es/dsl/story-processor/vchart/add.d.ts +4 -0
  968. package/es/dsl/story-processor/vchart/add.js +35 -0
  969. package/es/dsl/story-processor/vchart/add.js.map +1 -0
  970. package/es/dsl/story-processor/vchart/bounce.d.ts +4 -0
  971. package/es/dsl/story-processor/vchart/bounce.js +36 -0
  972. package/es/dsl/story-processor/vchart/bounce.js.map +1 -0
  973. package/es/dsl/story-processor/vchart/charts/area/areaAppear.d.ts +4 -0
  974. package/es/dsl/story-processor/vchart/charts/area/areaAppear.js +34 -0
  975. package/es/dsl/story-processor/vchart/charts/area/areaAppear.js.map +1 -0
  976. package/es/dsl/story-processor/vchart/charts/area/areaDisappear.d.ts +4 -0
  977. package/es/dsl/story-processor/vchart/charts/area/areaDisappear.js +53 -0
  978. package/es/dsl/story-processor/vchart/charts/area/areaDisappear.js.map +1 -0
  979. package/es/dsl/story-processor/vchart/charts/area/index.d.ts +2 -0
  980. package/es/dsl/story-processor/vchart/charts/area/index.js +4 -0
  981. package/es/dsl/story-processor/vchart/charts/area/index.js.map +1 -0
  982. package/es/dsl/story-processor/vchart/charts/bar/barAppear.d.ts +4 -0
  983. package/es/dsl/story-processor/vchart/charts/bar/barAppear.js +35 -0
  984. package/es/dsl/story-processor/vchart/charts/bar/barAppear.js.map +1 -0
  985. package/es/dsl/story-processor/vchart/charts/bar/barDisappear.d.ts +4 -0
  986. package/es/dsl/story-processor/vchart/charts/bar/barDisappear.js +52 -0
  987. package/es/dsl/story-processor/vchart/charts/bar/barDisappear.js.map +1 -0
  988. package/es/dsl/story-processor/vchart/charts/bar/index.d.ts +2 -0
  989. package/es/dsl/story-processor/vchart/charts/bar/index.js +4 -0
  990. package/es/dsl/story-processor/vchart/charts/bar/index.js.map +1 -0
  991. package/es/dsl/story-processor/vchart/charts/character/characterAppear.d.ts +4 -0
  992. package/es/dsl/story-processor/vchart/charts/character/characterAppear.js +44 -0
  993. package/es/dsl/story-processor/vchart/charts/character/characterAppear.js.map +1 -0
  994. package/es/dsl/story-processor/vchart/charts/character/characterDisappear.d.ts +4 -0
  995. package/es/dsl/story-processor/vchart/charts/character/characterDisappear.js +36 -0
  996. package/es/dsl/story-processor/vchart/charts/character/characterDisappear.js.map +1 -0
  997. package/es/dsl/story-processor/vchart/charts/character/index.d.ts +6 -0
  998. package/es/dsl/story-processor/vchart/charts/character/index.js +13 -0
  999. package/es/dsl/story-processor/vchart/charts/character/index.js.map +1 -0
  1000. package/es/dsl/story-processor/vchart/charts/common/commonAppear.d.ts +4 -0
  1001. package/es/dsl/story-processor/vchart/charts/common/commonAppear.js +32 -0
  1002. package/es/dsl/story-processor/vchart/charts/common/commonAppear.js.map +1 -0
  1003. package/es/dsl/story-processor/vchart/charts/common/commonDisappear.d.ts +4 -0
  1004. package/es/dsl/story-processor/vchart/charts/common/commonDisappear.js +43 -0
  1005. package/es/dsl/story-processor/vchart/charts/common/commonDisappear.js.map +1 -0
  1006. package/es/dsl/story-processor/vchart/charts/common/index.d.ts +2 -0
  1007. package/es/dsl/story-processor/vchart/charts/common/index.js +4 -0
  1008. package/es/dsl/story-processor/vchart/charts/common/index.js.map +1 -0
  1009. package/es/dsl/story-processor/vchart/charts/index.d.ts +10 -0
  1010. package/es/dsl/story-processor/vchart/charts/index.js +20 -0
  1011. package/es/dsl/story-processor/vchart/charts/index.js.map +1 -0
  1012. package/es/dsl/story-processor/vchart/charts/line/index.d.ts +2 -0
  1013. package/es/dsl/story-processor/vchart/charts/line/index.js +4 -0
  1014. package/es/dsl/story-processor/vchart/charts/line/index.js.map +1 -0
  1015. package/es/dsl/story-processor/vchart/charts/line/lineAppear.d.ts +4 -0
  1016. package/es/dsl/story-processor/vchart/charts/line/lineAppear.js +35 -0
  1017. package/es/dsl/story-processor/vchart/charts/line/lineAppear.js.map +1 -0
  1018. package/es/dsl/story-processor/vchart/charts/line/lineDisappear.d.ts +4 -0
  1019. package/es/dsl/story-processor/vchart/charts/line/lineDisappear.js +53 -0
  1020. package/es/dsl/story-processor/vchart/charts/line/lineDisappear.js.map +1 -0
  1021. package/es/dsl/story-processor/vchart/charts/line/transformLineSymbolAppear.d.ts +20 -0
  1022. package/es/dsl/story-processor/vchart/charts/line/transformLineSymbolAppear.js +44 -0
  1023. package/es/dsl/story-processor/vchart/charts/line/transformLineSymbolAppear.js.map +1 -0
  1024. package/es/dsl/story-processor/vchart/charts/pie/index.d.ts +2 -0
  1025. package/es/dsl/story-processor/vchart/charts/pie/index.js +4 -0
  1026. package/es/dsl/story-processor/vchart/charts/pie/index.js.map +1 -0
  1027. package/es/dsl/story-processor/vchart/charts/pie/pieAppear.d.ts +4 -0
  1028. package/es/dsl/story-processor/vchart/charts/pie/pieAppear.js +34 -0
  1029. package/es/dsl/story-processor/vchart/charts/pie/pieAppear.js.map +1 -0
  1030. package/es/dsl/story-processor/vchart/charts/pie/pieDisappear.d.ts +4 -0
  1031. package/es/dsl/story-processor/vchart/charts/pie/pieDisappear.js +53 -0
  1032. package/es/dsl/story-processor/vchart/charts/pie/pieDisappear.js.map +1 -0
  1033. package/es/dsl/story-processor/vchart/charts/radar/index.d.ts +2 -0
  1034. package/es/dsl/story-processor/vchart/charts/radar/index.js +4 -0
  1035. package/es/dsl/story-processor/vchart/charts/radar/index.js.map +1 -0
  1036. package/es/dsl/story-processor/vchart/charts/radar/radarAppear.d.ts +4 -0
  1037. package/es/dsl/story-processor/vchart/charts/radar/radarAppear.js +37 -0
  1038. package/es/dsl/story-processor/vchart/charts/radar/radarAppear.js.map +1 -0
  1039. package/es/dsl/story-processor/vchart/charts/radar/radarDisappear.d.ts +4 -0
  1040. package/es/dsl/story-processor/vchart/charts/radar/radarDisappear.js +54 -0
  1041. package/es/dsl/story-processor/vchart/charts/radar/radarDisappear.js.map +1 -0
  1042. package/es/dsl/story-processor/vchart/charts/rose/index.d.ts +2 -0
  1043. package/es/dsl/story-processor/vchart/charts/rose/index.js +4 -0
  1044. package/es/dsl/story-processor/vchart/charts/rose/index.js.map +1 -0
  1045. package/es/dsl/story-processor/vchart/charts/rose/roseAppear.d.ts +4 -0
  1046. package/es/dsl/story-processor/vchart/charts/rose/roseAppear.js +34 -0
  1047. package/es/dsl/story-processor/vchart/charts/rose/roseAppear.js.map +1 -0
  1048. package/es/dsl/story-processor/vchart/charts/rose/roseDisappear.d.ts +4 -0
  1049. package/es/dsl/story-processor/vchart/charts/rose/roseDisappear.js +53 -0
  1050. package/es/dsl/story-processor/vchart/charts/rose/roseDisappear.js.map +1 -0
  1051. package/es/dsl/story-processor/vchart/charts/scatter/index.d.ts +2 -0
  1052. package/es/dsl/story-processor/vchart/charts/scatter/index.js +4 -0
  1053. package/es/dsl/story-processor/vchart/charts/scatter/index.js.map +1 -0
  1054. package/es/dsl/story-processor/vchart/charts/scatter/scatterAppear.d.ts +4 -0
  1055. package/es/dsl/story-processor/vchart/charts/scatter/scatterAppear.js +34 -0
  1056. package/es/dsl/story-processor/vchart/charts/scatter/scatterAppear.js.map +1 -0
  1057. package/es/dsl/story-processor/vchart/charts/scatter/scatterDisappear.d.ts +4 -0
  1058. package/es/dsl/story-processor/vchart/charts/scatter/scatterDisappear.js +52 -0
  1059. package/es/dsl/story-processor/vchart/charts/scatter/scatterDisappear.js.map +1 -0
  1060. package/es/dsl/story-processor/vchart/charts/sunburst/index.d.ts +2 -0
  1061. package/es/dsl/story-processor/vchart/charts/sunburst/index.js +4 -0
  1062. package/es/dsl/story-processor/vchart/charts/sunburst/index.js.map +1 -0
  1063. package/es/dsl/story-processor/vchart/charts/sunburst/sunburstAppear.d.ts +4 -0
  1064. package/es/dsl/story-processor/vchart/charts/sunburst/sunburstAppear.js +34 -0
  1065. package/es/dsl/story-processor/vchart/charts/sunburst/sunburstAppear.js.map +1 -0
  1066. package/es/dsl/story-processor/vchart/charts/sunburst/sunburstDisappear.d.ts +4 -0
  1067. package/es/dsl/story-processor/vchart/charts/sunburst/sunburstDisappear.js +53 -0
  1068. package/es/dsl/story-processor/vchart/charts/sunburst/sunburstDisappear.js.map +1 -0
  1069. package/es/dsl/story-processor/vchart/charts/treeMap/index.d.ts +2 -0
  1070. package/es/dsl/story-processor/vchart/charts/treeMap/index.js +4 -0
  1071. package/es/dsl/story-processor/vchart/charts/treeMap/index.js.map +1 -0
  1072. package/es/dsl/story-processor/vchart/charts/treeMap/treeMapAppear.d.ts +4 -0
  1073. package/es/dsl/story-processor/vchart/charts/treeMap/treeMapAppear.js +34 -0
  1074. package/es/dsl/story-processor/vchart/charts/treeMap/treeMapAppear.js.map +1 -0
  1075. package/es/dsl/story-processor/vchart/charts/treeMap/treeMapDisappear.d.ts +4 -0
  1076. package/es/dsl/story-processor/vchart/charts/treeMap/treeMapDisappear.js +53 -0
  1077. package/es/dsl/story-processor/vchart/charts/treeMap/treeMapDisappear.js.map +1 -0
  1078. package/es/dsl/story-processor/vchart/charts/wordCloud/index.d.ts +2 -0
  1079. package/es/dsl/story-processor/vchart/charts/wordCloud/index.js +4 -0
  1080. package/es/dsl/story-processor/vchart/charts/wordCloud/index.js.map +1 -0
  1081. package/es/dsl/story-processor/vchart/charts/wordCloud/wordCloudAppear.d.ts +4 -0
  1082. package/es/dsl/story-processor/vchart/charts/wordCloud/wordCloudAppear.js +34 -0
  1083. package/es/dsl/story-processor/vchart/charts/wordCloud/wordCloudAppear.js.map +1 -0
  1084. package/es/dsl/story-processor/vchart/charts/wordCloud/wordCloudDisappear.d.ts +4 -0
  1085. package/es/dsl/story-processor/vchart/charts/wordCloud/wordCloudDisappear.js +52 -0
  1086. package/es/dsl/story-processor/vchart/charts/wordCloud/wordCloudDisappear.js.map +1 -0
  1087. package/es/dsl/story-processor/vchart/components/axes/disappear.d.ts +4 -0
  1088. package/es/dsl/story-processor/vchart/components/axes/disappear.js +59 -0
  1089. package/es/dsl/story-processor/vchart/components/axes/disappear.js.map +1 -0
  1090. package/es/dsl/story-processor/vchart/components/axes/index.d.ts +1 -0
  1091. package/es/dsl/story-processor/vchart/components/axes/index.js +2 -0
  1092. package/es/dsl/story-processor/vchart/components/axes/index.js.map +1 -0
  1093. package/es/dsl/story-processor/vchart/components/index.d.ts +2 -0
  1094. package/es/dsl/story-processor/vchart/components/index.js +4 -0
  1095. package/es/dsl/story-processor/vchart/components/index.js.map +1 -0
  1096. package/es/dsl/story-processor/vchart/components/title/disappear.d.ts +4 -0
  1097. package/es/dsl/story-processor/vchart/components/title/disappear.js +54 -0
  1098. package/es/dsl/story-processor/vchart/components/title/disappear.js.map +1 -0
  1099. package/es/dsl/story-processor/vchart/components/title/index.d.ts +1 -0
  1100. package/es/dsl/story-processor/vchart/components/title/index.js +2 -0
  1101. package/es/dsl/story-processor/vchart/components/title/index.js.map +1 -0
  1102. package/es/dsl/story-processor/vchart/dance.d.ts +3 -0
  1103. package/es/dsl/story-processor/vchart/dance.js +43 -0
  1104. package/es/dsl/story-processor/vchart/dance.js.map +1 -0
  1105. package/es/dsl/story-processor/vchart/markPoint.d.ts +5 -0
  1106. package/es/dsl/story-processor/vchart/markPoint.js +49 -0
  1107. package/es/dsl/story-processor/vchart/markPoint.js.map +1 -0
  1108. package/es/dsl/story-processor/vchart/marks/arc/appear.d.ts +4 -0
  1109. package/es/dsl/story-processor/vchart/marks/arc/appear.js +58 -0
  1110. package/es/dsl/story-processor/vchart/marks/arc/appear.js.map +1 -0
  1111. package/es/dsl/story-processor/vchart/marks/arc/disappear.d.ts +4 -0
  1112. package/es/dsl/story-processor/vchart/marks/arc/disappear.js +58 -0
  1113. package/es/dsl/story-processor/vchart/marks/arc/disappear.js.map +1 -0
  1114. package/es/dsl/story-processor/vchart/marks/arc/index.d.ts +2 -0
  1115. package/es/dsl/story-processor/vchart/marks/arc/index.js +4 -0
  1116. package/es/dsl/story-processor/vchart/marks/arc/index.js.map +1 -0
  1117. package/es/dsl/story-processor/vchart/marks/arc/transformArcAppear.d.ts +14 -0
  1118. package/es/dsl/story-processor/vchart/marks/arc/transformArcAppear.js +43 -0
  1119. package/es/dsl/story-processor/vchart/marks/arc/transformArcAppear.js.map +1 -0
  1120. package/es/dsl/story-processor/vchart/marks/area/appear.d.ts +4 -0
  1121. package/es/dsl/story-processor/vchart/marks/area/appear.js +58 -0
  1122. package/es/dsl/story-processor/vchart/marks/area/appear.js.map +1 -0
  1123. package/es/dsl/story-processor/vchart/marks/area/disappear.d.ts +4 -0
  1124. package/es/dsl/story-processor/vchart/marks/area/disappear.js +58 -0
  1125. package/es/dsl/story-processor/vchart/marks/area/disappear.js.map +1 -0
  1126. package/es/dsl/story-processor/vchart/marks/area/index.d.ts +2 -0
  1127. package/es/dsl/story-processor/vchart/marks/area/index.js +4 -0
  1128. package/es/dsl/story-processor/vchart/marks/area/index.js.map +1 -0
  1129. package/es/dsl/story-processor/vchart/marks/area/transformAreaAppear.d.ts +14 -0
  1130. package/es/dsl/story-processor/vchart/marks/area/transformAreaAppear.js +22 -0
  1131. package/es/dsl/story-processor/vchart/marks/area/transformAreaAppear.js.map +1 -0
  1132. package/es/dsl/story-processor/vchart/marks/index.d.ts +6 -0
  1133. package/es/dsl/story-processor/vchart/marks/index.js +12 -0
  1134. package/es/dsl/story-processor/vchart/marks/index.js.map +1 -0
  1135. package/es/dsl/story-processor/vchart/marks/line/appear.d.ts +4 -0
  1136. package/es/dsl/story-processor/vchart/marks/line/appear.js +58 -0
  1137. package/es/dsl/story-processor/vchart/marks/line/appear.js.map +1 -0
  1138. package/es/dsl/story-processor/vchart/marks/line/disappear.d.ts +4 -0
  1139. package/es/dsl/story-processor/vchart/marks/line/disappear.js +58 -0
  1140. package/es/dsl/story-processor/vchart/marks/line/disappear.js.map +1 -0
  1141. package/es/dsl/story-processor/vchart/marks/line/index.d.ts +2 -0
  1142. package/es/dsl/story-processor/vchart/marks/line/index.js +4 -0
  1143. package/es/dsl/story-processor/vchart/marks/line/index.js.map +1 -0
  1144. package/es/dsl/story-processor/vchart/marks/line/transformLineAppear.d.ts +12 -0
  1145. package/es/dsl/story-processor/vchart/marks/line/transformLineAppear.js +22 -0
  1146. package/es/dsl/story-processor/vchart/marks/line/transformLineAppear.js.map +1 -0
  1147. package/es/dsl/story-processor/vchart/marks/rect/appear.d.ts +4 -0
  1148. package/es/dsl/story-processor/vchart/marks/rect/appear.js +58 -0
  1149. package/es/dsl/story-processor/vchart/marks/rect/appear.js.map +1 -0
  1150. package/es/dsl/story-processor/vchart/marks/rect/disappear.d.ts +4 -0
  1151. package/es/dsl/story-processor/vchart/marks/rect/disappear.js +58 -0
  1152. package/es/dsl/story-processor/vchart/marks/rect/disappear.js.map +1 -0
  1153. package/es/dsl/story-processor/vchart/marks/rect/index.d.ts +2 -0
  1154. package/es/dsl/story-processor/vchart/marks/rect/index.js +4 -0
  1155. package/es/dsl/story-processor/vchart/marks/rect/index.js.map +1 -0
  1156. package/es/dsl/story-processor/vchart/marks/rect/transformRectAppear.d.ts +12 -0
  1157. package/es/dsl/story-processor/vchart/marks/rect/transformRectAppear.js +73 -0
  1158. package/es/dsl/story-processor/vchart/marks/rect/transformRectAppear.js.map +1 -0
  1159. package/es/dsl/story-processor/vchart/marks/symbol/appear.d.ts +4 -0
  1160. package/es/dsl/story-processor/vchart/marks/symbol/appear.js +58 -0
  1161. package/es/dsl/story-processor/vchart/marks/symbol/appear.js.map +1 -0
  1162. package/es/dsl/story-processor/vchart/marks/symbol/disappear.d.ts +4 -0
  1163. package/es/dsl/story-processor/vchart/marks/symbol/disappear.js +58 -0
  1164. package/es/dsl/story-processor/vchart/marks/symbol/disappear.js.map +1 -0
  1165. package/es/dsl/story-processor/vchart/marks/symbol/index.d.ts +2 -0
  1166. package/es/dsl/story-processor/vchart/marks/symbol/index.js +4 -0
  1167. package/es/dsl/story-processor/vchart/marks/symbol/index.js.map +1 -0
  1168. package/es/dsl/story-processor/vchart/marks/symbol/transformSymbolAppear.d.ts +12 -0
  1169. package/es/dsl/story-processor/vchart/marks/symbol/transformSymbolAppear.js +22 -0
  1170. package/es/dsl/story-processor/vchart/marks/symbol/transformSymbolAppear.js.map +1 -0
  1171. package/es/dsl/story-processor/vchart/marks/text/appear.d.ts +4 -0
  1172. package/es/dsl/story-processor/vchart/marks/text/appear.js +58 -0
  1173. package/es/dsl/story-processor/vchart/marks/text/appear.js.map +1 -0
  1174. package/es/dsl/story-processor/vchart/marks/text/disappear.d.ts +4 -0
  1175. package/es/dsl/story-processor/vchart/marks/text/disappear.js +58 -0
  1176. package/es/dsl/story-processor/vchart/marks/text/disappear.js.map +1 -0
  1177. package/es/dsl/story-processor/vchart/marks/text/index.d.ts +2 -0
  1178. package/es/dsl/story-processor/vchart/marks/text/index.js +4 -0
  1179. package/es/dsl/story-processor/vchart/marks/text/index.js.map +1 -0
  1180. package/es/dsl/story-processor/vchart/marks/text/transformTextAppear.d.ts +14 -0
  1181. package/es/dsl/story-processor/vchart/marks/text/transformTextAppear.js +22 -0
  1182. package/es/dsl/story-processor/vchart/marks/text/transformTextAppear.js.map +1 -0
  1183. package/es/dsl/story-processor/vchart/style/lineStyle.d.ts +4 -0
  1184. package/es/dsl/story-processor/vchart/style/lineStyle.js +50 -0
  1185. package/es/dsl/story-processor/vchart/style/lineStyle.js.map +1 -0
  1186. package/es/dsl/story-processor/vchart/style/style.d.ts +4 -0
  1187. package/es/dsl/story-processor/vchart/style/style.js +49 -0
  1188. package/es/dsl/story-processor/vchart/style/style.js.map +1 -0
  1189. package/es/dsl/story-processor/vchart/title.d.ts +3 -0
  1190. package/es/dsl/story-processor/vchart/title.js +34 -0
  1191. package/es/dsl/story-processor/vchart/title.js.map +1 -0
  1192. package/es/dsl/story-processor/vchart/update.d.ts +4 -0
  1193. package/es/dsl/story-processor/vchart/update.js +43 -0
  1194. package/es/dsl/story-processor/vchart/update.js.map +1 -0
  1195. package/es/dsl/story-processor/vchart/utils/index.d.ts +2 -0
  1196. package/es/dsl/story-processor/vchart/utils/index.js +4 -0
  1197. package/es/dsl/story-processor/vchart/utils/index.js.map +1 -0
  1198. package/es/dsl/story-processor/vchart/utils/isMatch.d.ts +1 -0
  1199. package/es/dsl/story-processor/vchart/utils/isMatch.js +5 -0
  1200. package/es/dsl/story-processor/vchart/utils/isMatch.js.map +1 -0
  1201. package/es/dsl/story-processor/vchart/utils/mark.d.ts +3 -0
  1202. package/es/dsl/story-processor/vchart/utils/mark.js +8 -0
  1203. package/es/dsl/story-processor/vchart/utils/mark.js.map +1 -0
  1204. package/es/dsl/story-processor/vchart/utils/series.d.ts +4 -0
  1205. package/es/dsl/story-processor/vchart/utils/series.js +6 -0
  1206. package/es/dsl/story-processor/vchart/utils/series.js.map +1 -0
  1207. package/es/dsl/types/Datum.d.ts +1 -0
  1208. package/es/dsl/types/Datum.js +2 -0
  1209. package/es/dsl/types/Datum.js.map +1 -0
  1210. package/es/dsl/types/chart/add.d.ts +13 -0
  1211. package/es/dsl/types/chart/add.js +2 -0
  1212. package/es/dsl/types/chart/add.js.map +1 -0
  1213. package/es/dsl/types/chart/appear.d.ts +12 -0
  1214. package/es/dsl/types/chart/appear.js +2 -0
  1215. package/es/dsl/types/chart/appear.js.map +1 -0
  1216. package/es/dsl/types/chart/createComponent.d.ts +26 -0
  1217. package/es/dsl/types/chart/createComponent.js +2 -0
  1218. package/es/dsl/types/chart/createComponent.js.map +1 -0
  1219. package/es/dsl/types/chart/index.d.ts +11 -0
  1220. package/es/dsl/types/chart/index.js +2 -0
  1221. package/es/dsl/types/chart/index.js.map +1 -0
  1222. package/es/dsl/types/chart/style.d.ts +10 -0
  1223. package/es/dsl/types/chart/style.js +2 -0
  1224. package/es/dsl/types/chart/style.js.map +1 -0
  1225. package/es/dsl/types/chart/update.d.ts +14 -0
  1226. package/es/dsl/types/chart/update.js +2 -0
  1227. package/es/dsl/types/chart/update.js.map +1 -0
  1228. package/es/dsl/types/common/bounce.d.ts +13 -0
  1229. package/es/dsl/types/common/bounce.js +2 -0
  1230. package/es/dsl/types/common/bounce.js.map +1 -0
  1231. package/es/dsl/types/common/brighten.d.ts +12 -0
  1232. package/es/dsl/types/common/brighten.js +2 -0
  1233. package/es/dsl/types/common/brighten.js.map +1 -0
  1234. package/es/dsl/types/common/darken.d.ts +12 -0
  1235. package/es/dsl/types/common/darken.js +2 -0
  1236. package/es/dsl/types/common/darken.js.map +1 -0
  1237. package/es/dsl/types/common/flicker.d.ts +12 -0
  1238. package/es/dsl/types/common/flicker.js +2 -0
  1239. package/es/dsl/types/common/flicker.js.map +1 -0
  1240. package/es/dsl/types/common/index.d.ts +7 -0
  1241. package/es/dsl/types/common/index.js +2 -0
  1242. package/es/dsl/types/common/index.js.map +1 -0
  1243. package/es/dsl/types/common/moveTo.d.ts +9 -0
  1244. package/es/dsl/types/common/moveTo.js +2 -0
  1245. package/es/dsl/types/common/moveTo.js.map +1 -0
  1246. package/es/dsl/types/graphic/appear.d.ts +22 -0
  1247. package/es/dsl/types/graphic/appear.js +2 -0
  1248. package/es/dsl/types/graphic/appear.js.map +1 -0
  1249. package/es/dsl/types/graphic/disappear.d.ts +22 -0
  1250. package/es/dsl/types/graphic/disappear.js +2 -0
  1251. package/es/dsl/types/graphic/disappear.js.map +1 -0
  1252. package/es/dsl/types/graphic/index.d.ts +10 -0
  1253. package/es/dsl/types/graphic/index.js +2 -0
  1254. package/es/dsl/types/graphic/index.js.map +1 -0
  1255. package/es/dsl/types/graphic/style.d.ts +9 -0
  1256. package/es/dsl/types/graphic/style.js +2 -0
  1257. package/es/dsl/types/graphic/style.js.map +1 -0
  1258. package/es/dsl/types/index.d.ts +20 -0
  1259. package/es/dsl/types/index.js +6 -0
  1260. package/es/dsl/types/index.js.map +1 -0
  1261. package/es/dsl/utils/datum.d.ts +1 -0
  1262. package/es/dsl/utils/datum.js +10 -0
  1263. package/es/dsl/utils/datum.js.map +1 -0
  1264. package/es/dsl/utils/flicker.d.ts +2 -0
  1265. package/es/dsl/utils/flicker.js +10 -0
  1266. package/es/dsl/utils/flicker.js.map +1 -0
  1267. package/es/edit/const.d.ts +5 -0
  1268. package/es/edit/const.js +6 -0
  1269. package/es/edit/const.js.map +1 -0
  1270. package/es/edit/edit-action.d.ts +15 -0
  1271. package/es/edit/edit-action.js +33 -0
  1272. package/es/edit/edit-action.js.map +1 -0
  1273. package/es/edit/edit-component/base-selection.d.ts +29 -0
  1274. package/es/edit/edit-component/base-selection.js +61 -0
  1275. package/es/edit/edit-component/base-selection.js.map +1 -0
  1276. package/es/edit/edit-component/box-selection.d.ts +10 -0
  1277. package/es/edit/edit-component/box-selection.js +19 -0
  1278. package/es/edit/edit-component/box-selection.js.map +1 -0
  1279. package/es/edit/edit-component/common.d.ts +11 -0
  1280. package/es/edit/edit-component/common.js +25 -0
  1281. package/es/edit/edit-component/common.js.map +1 -0
  1282. package/es/edit/edit-component/edit-control/constants.d.ts +9 -0
  1283. package/es/edit/edit-component/edit-control/constants.js +18 -0
  1284. package/es/edit/edit-component/edit-control/constants.js.map +1 -0
  1285. package/es/edit/edit-component/edit-control/enum.d.ts +1 -0
  1286. package/es/edit/edit-component/edit-control/enum.js +3 -0
  1287. package/es/edit/edit-component/edit-control/enum.js.map +1 -0
  1288. package/es/edit/edit-component/edit-control/richtext-transform-control.d.ts +12 -0
  1289. package/es/edit/edit-component/edit-control/richtext-transform-control.js +55 -0
  1290. package/es/edit/edit-component/edit-control/richtext-transform-control.js.map +1 -0
  1291. package/es/edit/edit-component/edit-control/transform-control.d.ts +136 -0
  1292. package/es/edit/edit-component/edit-control/transform-control.js +453 -0
  1293. package/es/edit/edit-component/edit-control/transform-control.js.map +1 -0
  1294. package/es/edit/edit-component/edit-control/transform-drag.d.ts +19 -0
  1295. package/es/edit/edit-component/edit-control/transform-drag.js +37 -0
  1296. package/es/edit/edit-component/edit-control/transform-drag.js.map +1 -0
  1297. package/es/edit/edit-component/image-selection.d.ts +8 -0
  1298. package/es/edit/edit-component/image-selection.js +13 -0
  1299. package/es/edit/edit-component/image-selection.js.map +1 -0
  1300. package/es/edit/edit-component/index.d.ts +1 -0
  1301. package/es/edit/edit-component/index.js +20 -0
  1302. package/es/edit/edit-component/index.js.map +1 -0
  1303. package/es/edit/edit-component/layer-edit.d.ts +1 -0
  1304. package/es/edit/edit-component/layer-edit.js +1 -0
  1305. package/es/edit/edit-component/layer-edit.js.map +1 -0
  1306. package/es/edit/edit-component/rect-selection.d.ts +18 -0
  1307. package/es/edit/edit-component/rect-selection.js +31 -0
  1308. package/es/edit/edit-component/rect-selection.js.map +1 -0
  1309. package/es/edit/edit-component/richtext-selection.d.ts +17 -0
  1310. package/es/edit/edit-component/richtext-selection.js +35 -0
  1311. package/es/edit/edit-component/richtext-selection.js.map +1 -0
  1312. package/es/edit/edit-component/text-selection.d.ts +12 -0
  1313. package/es/edit/edit-component/text-selection.js +24 -0
  1314. package/es/edit/edit-component/text-selection.js.map +1 -0
  1315. package/es/edit/edit.d.ts +32 -0
  1316. package/es/edit/edit.js +53 -0
  1317. package/es/edit/edit.js.map +1 -0
  1318. package/es/edit/index.d.ts +2 -0
  1319. package/es/edit/index.js +4 -0
  1320. package/es/edit/index.js.map +1 -0
  1321. package/es/edit/interface.d.ts +60 -0
  1322. package/es/edit/interface.js +6 -0
  1323. package/es/edit/interface.js.map +1 -0
  1324. package/es/index.d.ts +2 -0
  1325. package/es/index.js +7 -0
  1326. package/es/index.js.map +1 -0
  1327. package/es/interface/type.d.ts +26 -0
  1328. package/es/interface/type.js +2 -0
  1329. package/es/interface/type.js.map +1 -0
  1330. package/es/scene/action.d.ts +20 -0
  1331. package/es/scene/action.js +34 -0
  1332. package/es/scene/action.js.map +1 -0
  1333. package/es/scene/index.d.ts +1 -0
  1334. package/es/scene/index.js +1 -0
  1335. package/es/scene/index.js.map +1 -0
  1336. package/es/scene/scene.d.ts +21 -0
  1337. package/es/scene/scene.js +76 -0
  1338. package/es/scene/scene.js.map +1 -0
  1339. package/es/story/act/act.d.ts +2 -0
  1340. package/es/story/act/act.js +2 -0
  1341. package/es/story/act/act.js.map +1 -0
  1342. package/es/story/canvas/canvas.d.ts +20 -0
  1343. package/es/story/canvas/canvas.js +58 -0
  1344. package/es/story/canvas/canvas.js.map +1 -0
  1345. package/es/story/character/base/base.d.ts +26 -0
  1346. package/es/story/character/base/base.js +32 -0
  1347. package/es/story/character/base/base.js.map +1 -0
  1348. package/es/story/character/chart/character.d.ts +24 -0
  1349. package/es/story/character/chart/character.js +130 -0
  1350. package/es/story/character/chart/character.js.map +1 -0
  1351. package/es/story/character/chart/characters/area.d.ts +4 -0
  1352. package/es/story/character/chart/characters/area.js +12 -0
  1353. package/es/story/character/chart/characters/area.js.map +1 -0
  1354. package/es/story/character/chart/characters/bar.d.ts +4 -0
  1355. package/es/story/character/chart/characters/bar.js +12 -0
  1356. package/es/story/character/chart/characters/bar.js.map +1 -0
  1357. package/es/story/character/chart/characters/line.d.ts +4 -0
  1358. package/es/story/character/chart/characters/line.js +12 -0
  1359. package/es/story/character/chart/characters/line.js.map +1 -0
  1360. package/es/story/character/chart/characters/pie.d.ts +4 -0
  1361. package/es/story/character/chart/characters/pie.js +12 -0
  1362. package/es/story/character/chart/characters/pie.js.map +1 -0
  1363. package/es/story/character/chart/characters/radar.d.ts +4 -0
  1364. package/es/story/character/chart/characters/radar.js +12 -0
  1365. package/es/story/character/chart/characters/radar.js.map +1 -0
  1366. package/es/story/character/chart/characters/rangeColumn.d.ts +4 -0
  1367. package/es/story/character/chart/characters/rangeColumn.js +12 -0
  1368. package/es/story/character/chart/characters/rangeColumn.js.map +1 -0
  1369. package/es/story/character/chart/characters/rose.d.ts +4 -0
  1370. package/es/story/character/chart/characters/rose.js +12 -0
  1371. package/es/story/character/chart/characters/rose.js.map +1 -0
  1372. package/es/story/character/chart/characters/scatter.d.ts +4 -0
  1373. package/es/story/character/chart/characters/scatter.js +12 -0
  1374. package/es/story/character/chart/characters/scatter.js.map +1 -0
  1375. package/es/story/character/chart/characters/sunburst.d.ts +4 -0
  1376. package/es/story/character/chart/characters/sunburst.js +12 -0
  1377. package/es/story/character/chart/characters/sunburst.js.map +1 -0
  1378. package/es/story/character/chart/characters/treemap.d.ts +4 -0
  1379. package/es/story/character/chart/characters/treemap.js +12 -0
  1380. package/es/story/character/chart/characters/treemap.js.map +1 -0
  1381. package/es/story/character/chart/characters/wordcloud.d.ts +4 -0
  1382. package/es/story/character/chart/characters/wordcloud.js +12 -0
  1383. package/es/story/character/chart/characters/wordcloud.js.map +1 -0
  1384. package/es/story/character/chart/const.d.ts +9 -0
  1385. package/es/story/character/chart/const.js +14 -0
  1386. package/es/story/character/chart/const.js.map +1 -0
  1387. package/es/story/character/chart/data/interface.d.ts +44 -0
  1388. package/es/story/character/chart/data/interface.js +2 -0
  1389. package/es/story/character/chart/data/interface.js.map +1 -0
  1390. package/es/story/character/chart/data/parser/standard.d.ts +30 -0
  1391. package/es/story/character/chart/data/parser/standard.js +67 -0
  1392. package/es/story/character/chart/data/parser/standard.js.map +1 -0
  1393. package/es/story/character/chart/graphic/vchart-graphic-picker.d.ts +6 -0
  1394. package/es/story/character/chart/graphic/vchart-graphic-picker.js +35 -0
  1395. package/es/story/character/chart/graphic/vchart-graphic-picker.js.map +1 -0
  1396. package/es/story/character/chart/graphic/vchart-graphic-render.d.ts +10 -0
  1397. package/es/story/character/chart/graphic/vchart-graphic-render.js +41 -0
  1398. package/es/story/character/chart/graphic/vchart-graphic-render.js.map +1 -0
  1399. package/es/story/character/chart/graphic/vchart-graphic.d.ts +35 -0
  1400. package/es/story/character/chart/graphic/vchart-graphic.js +59 -0
  1401. package/es/story/character/chart/graphic/vchart-graphic.js.map +1 -0
  1402. package/es/story/character/chart/parser.d.ts +1 -0
  1403. package/es/story/character/chart/parser.js +3 -0
  1404. package/es/story/character/chart/parser.js.map +1 -0
  1405. package/es/story/character/chart/runtime/common-spec.d.ts +10 -0
  1406. package/es/story/character/chart/runtime/common-spec.js +19 -0
  1407. package/es/story/character/chart/runtime/common-spec.js.map +1 -0
  1408. package/es/story/character/chart/runtime/component-spec.d.ts +12 -0
  1409. package/es/story/character/chart/runtime/component-spec.js +26 -0
  1410. package/es/story/character/chart/runtime/component-spec.js.map +1 -0
  1411. package/es/story/character/chart/runtime/interface.d.ts +10 -0
  1412. package/es/story/character/chart/runtime/interface.js +2 -0
  1413. package/es/story/character/chart/runtime/interface.js.map +1 -0
  1414. package/es/story/character/chart/runtime/series-spec.d.ts +10 -0
  1415. package/es/story/character/chart/runtime/series-spec.js +21 -0
  1416. package/es/story/character/chart/runtime/series-spec.js.map +1 -0
  1417. package/es/story/character/chart/runtime/utils.d.ts +2 -0
  1418. package/es/story/character/chart/runtime/utils.js +6 -0
  1419. package/es/story/character/chart/runtime/utils.js.map +1 -0
  1420. package/es/story/character/chart/spec-process/data-temp-transform.d.ts +9 -0
  1421. package/es/story/character/chart/spec-process/data-temp-transform.js +11 -0
  1422. package/es/story/character/chart/spec-process/data-temp-transform.js.map +1 -0
  1423. package/es/story/character/chart/spec-process/interface.d.ts +22 -0
  1424. package/es/story/character/chart/spec-process/interface.js +2 -0
  1425. package/es/story/character/chart/spec-process/interface.js.map +1 -0
  1426. package/es/story/character/chart/spec-process/spec-process.d.ts +11 -0
  1427. package/es/story/character/chart/spec-process/spec-process.js +40 -0
  1428. package/es/story/character/chart/spec-process/spec-process.js.map +1 -0
  1429. package/es/story/character/chart/temp/constant.d.ts +14 -0
  1430. package/es/story/character/chart/temp/constant.js +14 -0
  1431. package/es/story/character/chart/temp/constant.js.map +1 -0
  1432. package/es/story/character/chart/temp/index.d.ts +2 -0
  1433. package/es/story/character/chart/temp/index.js +4 -0
  1434. package/es/story/character/chart/temp/index.js.map +1 -0
  1435. package/es/story/character/chart/temp/interface.d.ts +21 -0
  1436. package/es/story/character/chart/temp/interface.js +2 -0
  1437. package/es/story/character/chart/temp/interface.js.map +1 -0
  1438. package/es/story/character/chart/temp/templates/area.d.ts +17 -0
  1439. package/es/story/character/chart/temp/templates/area.js +24 -0
  1440. package/es/story/character/chart/temp/templates/area.js.map +1 -0
  1441. package/es/story/character/chart/temp/templates/bar.d.ts +13 -0
  1442. package/es/story/character/chart/temp/templates/bar.js +22 -0
  1443. package/es/story/character/chart/temp/templates/bar.js.map +1 -0
  1444. package/es/story/character/chart/temp/templates/base-temp.d.ts +18 -0
  1445. package/es/story/character/chart/temp/templates/base-temp.js +13 -0
  1446. package/es/story/character/chart/temp/templates/base-temp.js.map +1 -0
  1447. package/es/story/character/chart/temp/templates/cartesian-single.d.ts +18 -0
  1448. package/es/story/character/chart/temp/templates/cartesian-single.js +27 -0
  1449. package/es/story/character/chart/temp/templates/cartesian-single.js.map +1 -0
  1450. package/es/story/character/chart/temp/templates/common.d.ts +165 -0
  1451. package/es/story/character/chart/temp/templates/common.js +143 -0
  1452. package/es/story/character/chart/temp/templates/common.js.map +1 -0
  1453. package/es/story/character/chart/temp/templates/line.d.ts +43 -0
  1454. package/es/story/character/chart/temp/templates/line.js +39 -0
  1455. package/es/story/character/chart/temp/templates/line.js.map +1 -0
  1456. package/es/story/character/chart/temp/templates/pie.d.ts +11 -0
  1457. package/es/story/character/chart/temp/templates/pie.js +34 -0
  1458. package/es/story/character/chart/temp/templates/pie.js.map +1 -0
  1459. package/es/story/character/chart/temp/templates/polar-single.d.ts +11 -0
  1460. package/es/story/character/chart/temp/templates/polar-single.js +22 -0
  1461. package/es/story/character/chart/temp/templates/polar-single.js.map +1 -0
  1462. package/es/story/character/chart/temp/templates/radar.d.ts +10 -0
  1463. package/es/story/character/chart/temp/templates/radar.js +22 -0
  1464. package/es/story/character/chart/temp/templates/radar.js.map +1 -0
  1465. package/es/story/character/chart/temp/templates/rangeColumn.d.ts +16 -0
  1466. package/es/story/character/chart/temp/templates/rangeColumn.js +25 -0
  1467. package/es/story/character/chart/temp/templates/rangeColumn.js.map +1 -0
  1468. package/es/story/character/chart/temp/templates/rose.d.ts +8 -0
  1469. package/es/story/character/chart/temp/templates/rose.js +17 -0
  1470. package/es/story/character/chart/temp/templates/rose.js.map +1 -0
  1471. package/es/story/character/chart/temp/templates/scatter.d.ts +12 -0
  1472. package/es/story/character/chart/temp/templates/scatter.js +20 -0
  1473. package/es/story/character/chart/temp/templates/scatter.js.map +1 -0
  1474. package/es/story/character/chart/temp/templates/sunburst.d.ts +11 -0
  1475. package/es/story/character/chart/temp/templates/sunburst.js +34 -0
  1476. package/es/story/character/chart/temp/templates/sunburst.js.map +1 -0
  1477. package/es/story/character/chart/temp/templates/treemap.d.ts +11 -0
  1478. package/es/story/character/chart/temp/templates/treemap.js +34 -0
  1479. package/es/story/character/chart/temp/templates/treemap.js.map +1 -0
  1480. package/es/story/character/chart/temp/templates/wordcloud.d.ts +11 -0
  1481. package/es/story/character/chart/temp/templates/wordcloud.js +34 -0
  1482. package/es/story/character/chart/temp/templates/wordcloud.js.map +1 -0
  1483. package/es/story/character/component/character.d.ts +34 -0
  1484. package/es/story/character/component/character.js +72 -0
  1485. package/es/story/character/component/character.js.map +1 -0
  1486. package/es/story/character/component/characters/character-image.d.ts +6 -0
  1487. package/es/story/character/component/characters/character-image.js +15 -0
  1488. package/es/story/character/component/characters/character-image.js.map +1 -0
  1489. package/es/story/character/component/characters/character-line.d.ts +6 -0
  1490. package/es/story/character/component/characters/character-line.js +15 -0
  1491. package/es/story/character/component/characters/character-line.js.map +1 -0
  1492. package/es/story/character/component/characters/character-qipao.d.ts +6 -0
  1493. package/es/story/character/component/characters/character-qipao.js +13 -0
  1494. package/es/story/character/component/characters/character-qipao.js.map +1 -0
  1495. package/es/story/character/component/characters/character-rect.d.ts +6 -0
  1496. package/es/story/character/component/characters/character-rect.js +15 -0
  1497. package/es/story/character/component/characters/character-rect.js.map +1 -0
  1498. package/es/story/character/component/characters/character-richtext.d.ts +6 -0
  1499. package/es/story/character/component/characters/character-richtext.js +15 -0
  1500. package/es/story/character/component/characters/character-richtext.js.map +1 -0
  1501. package/es/story/character/component/characters/character-text.d.ts +6 -0
  1502. package/es/story/character/component/characters/character-text.js +15 -0
  1503. package/es/story/character/component/characters/character-text.js.map +1 -0
  1504. package/es/story/character/component/graphic/graphic-text.d.ts +18 -0
  1505. package/es/story/character/component/graphic/graphic-text.js +97 -0
  1506. package/es/story/character/component/graphic/graphic-text.js.map +1 -0
  1507. package/es/story/character/component/graphic/graphic.d.ts +40 -0
  1508. package/es/story/character/component/graphic/graphic.js +85 -0
  1509. package/es/story/character/component/graphic/graphic.js.map +1 -0
  1510. package/es/story/character/component/graphic/image.d.ts +17 -0
  1511. package/es/story/character/component/graphic/image.js +24 -0
  1512. package/es/story/character/component/graphic/image.js.map +1 -0
  1513. package/es/story/character/component/graphic/line.d.ts +7 -0
  1514. package/es/story/character/component/graphic/line.js +23 -0
  1515. package/es/story/character/component/graphic/line.js.map +1 -0
  1516. package/es/story/character/component/graphic/qipao.d.ts +15 -0
  1517. package/es/story/character/component/graphic/qipao.js +23 -0
  1518. package/es/story/character/component/graphic/qipao.js.map +1 -0
  1519. package/es/story/character/component/graphic/rect.d.ts +18 -0
  1520. package/es/story/character/component/graphic/rect.js +25 -0
  1521. package/es/story/character/component/graphic/rect.js.map +1 -0
  1522. package/es/story/character/component/graphic/richtext.d.ts +9 -0
  1523. package/es/story/character/component/graphic/richtext.js +44 -0
  1524. package/es/story/character/component/graphic/richtext.js.map +1 -0
  1525. package/es/story/character/component/graphic/text.d.ts +24 -0
  1526. package/es/story/character/component/graphic/text.js +43 -0
  1527. package/es/story/character/component/graphic/text.js.map +1 -0
  1528. package/es/story/character/component/graphic/utils.d.ts +2 -0
  1529. package/es/story/character/component/graphic/utils.js +6 -0
  1530. package/es/story/character/component/graphic/utils.js.map +1 -0
  1531. package/es/story/character/dsl-interface.d.ts +67 -0
  1532. package/es/story/character/dsl-interface.js +2 -0
  1533. package/es/story/character/dsl-interface.js.map +1 -0
  1534. package/es/story/character/index.d.ts +2 -0
  1535. package/es/story/character/index.js +4 -0
  1536. package/es/story/character/index.js.map +1 -0
  1537. package/es/story/character/runtime-interface.d.ts +41 -0
  1538. package/es/story/character/runtime-interface.js +2 -0
  1539. package/es/story/character/runtime-interface.js.map +1 -0
  1540. package/es/story/character/visactor/character.d.ts +31 -0
  1541. package/es/story/character/visactor/character.js +50 -0
  1542. package/es/story/character/visactor/character.js.map +1 -0
  1543. package/es/story/character/visactor/data-temp-transform-base.d.ts +25 -0
  1544. package/es/story/character/visactor/data-temp-transform-base.js +59 -0
  1545. package/es/story/character/visactor/data-temp-transform-base.js.map +1 -0
  1546. package/es/story/character/visactor/interface.d.ts +100 -0
  1547. package/es/story/character/visactor/interface.js +2 -0
  1548. package/es/story/character/visactor/interface.js.map +1 -0
  1549. package/es/story/character/visactor/spec-process-base.d.ts +28 -0
  1550. package/es/story/character/visactor/spec-process-base.js +42 -0
  1551. package/es/story/character/visactor/spec-process-base.js.map +1 -0
  1552. package/es/story/factory/factory.d.ts +27 -0
  1553. package/es/story/factory/factory.js +36 -0
  1554. package/es/story/factory/factory.js.map +1 -0
  1555. package/es/story/index.d.ts +2 -0
  1556. package/es/story/index.js +76 -0
  1557. package/es/story/index.js.map +1 -0
  1558. package/es/story/interface/dsl-interface.d.ts +25 -0
  1559. package/es/story/interface/dsl-interface.js +2 -0
  1560. package/es/story/interface/dsl-interface.js.map +1 -0
  1561. package/es/story/interface/index.d.ts +2 -0
  1562. package/es/story/interface/index.js +4 -0
  1563. package/es/story/interface/index.js.map +1 -0
  1564. package/es/story/interface/player.d.ts +14 -0
  1565. package/es/story/interface/player.js +2 -0
  1566. package/es/story/interface/player.js.map +1 -0
  1567. package/es/story/interface/runtime-interface.d.ts +11 -0
  1568. package/es/story/interface/runtime-interface.js +2 -0
  1569. package/es/story/interface/runtime-interface.js.map +1 -0
  1570. package/es/story/player/encode.d.ts +1 -0
  1571. package/es/story/player/encode.js +3 -0
  1572. package/es/story/player/encode.js.map +1 -0
  1573. package/es/story/player/index.d.ts +45 -0
  1574. package/es/story/player/index.js +130 -0
  1575. package/es/story/player/index.js.map +1 -0
  1576. package/es/story/player/ticker.d.ts +1 -0
  1577. package/es/story/player/ticker.js +3 -0
  1578. package/es/story/player/ticker.js.map +1 -0
  1579. package/es/story/story.d.ts +27 -0
  1580. package/es/story/story.js +89 -0
  1581. package/es/story/story.js.map +1 -0
  1582. package/es/story/utils/chart.d.ts +8 -0
  1583. package/es/story/utils/chart.js +65 -0
  1584. package/es/story/utils/chart.js.map +1 -0
  1585. package/es/story/utils/layout.d.ts +2 -0
  1586. package/es/story/utils/layout.js +9 -0
  1587. package/es/story/utils/layout.js.map +1 -0
  1588. package/es/task.d.ts +21 -0
  1589. package/es/task.js +13 -0
  1590. package/es/task.js.map +1 -0
  1591. package/es/template/base-template.d.ts +13 -0
  1592. package/es/template/base-template.js +13 -0
  1593. package/es/template/base-template.js.map +1 -0
  1594. package/es/template/charts/simple-chart.d.ts +8 -0
  1595. package/es/template/charts/simple-chart.js +26 -0
  1596. package/es/template/charts/simple-chart.js.map +1 -0
  1597. package/es/template/ranking-bar/interface.d.ts +41 -0
  1598. package/es/template/ranking-bar/interface.js +2 -0
  1599. package/es/template/ranking-bar/interface.js.map +1 -0
  1600. package/es/template/ranking-bar/ranking-bar.d.ts +16 -0
  1601. package/es/template/ranking-bar/ranking-bar.js +35 -0
  1602. package/es/template/ranking-bar/ranking-bar.js.map +1 -0
  1603. package/es/template/ranking-bar/spec-parser.d.ts +7 -0
  1604. package/es/template/ranking-bar/spec-parser.js +311 -0
  1605. package/es/template/ranking-bar/spec-parser.js.map +1 -0
  1606. package/es/type/common.d.ts +3 -0
  1607. package/es/type/common.js +2 -0
  1608. package/es/type/common.js.map +1 -0
  1609. package/es/type/space.d.ts +6 -0
  1610. package/es/type/space.js +2 -0
  1611. package/es/type/space.js.map +1 -0
  1612. package/es/util/common.d.ts +2 -0
  1613. package/es/util/common.js +10 -0
  1614. package/es/util/common.js.map +1 -0
  1615. package/es/util/math.d.ts +5 -0
  1616. package/es/util/math.js +38 -0
  1617. package/es/util/math.js.map +1 -0
  1618. package/es/util/size.d.ts +7 -0
  1619. package/es/util/size.js +20 -0
  1620. package/es/util/size.js.map +1 -0
  1621. package/es/util/space.d.ts +42 -0
  1622. package/es/util/space.js +97 -0
  1623. package/es/util/space.js.map +1 -0
  1624. package/es/util/vchart-api.d.ts +3 -0
  1625. package/es/util/vchart-api.js +10 -0
  1626. package/es/util/vchart-api.js.map +1 -0
  1627. package/es/util/vrender-api.d.ts +2 -0
  1628. package/es/util/vrender-api.js +7 -0
  1629. package/es/util/vrender-api.js.map +1 -0
  1630. package/package.json +86 -0
@@ -0,0 +1,21 @@
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).VStory={})}(this,(function(t){"use strict";function e(t,e,n){return e=h(e),v(t,i()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function n(){n=function(){return e};var t,e={},i=Object.prototype,r=i.hasOwnProperty,a=Object.defineProperty||function(t,e,i){t[e]=i.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,i){return t[e]=i}}function h(t,e,i,n){var r=e&&e.prototype instanceof m?e:m,o=Object.create(r.prototype),s=new R(n||[]);return a(o,"_invoke",{value:E(t,i,s)}),o}function d(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var f="suspendedStart",v="suspendedYield",p="executing",g="completed",y={};function m(){}function k(){}function b(){}var _={};c(_,s,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(P([])));w&&w!==i&&r.call(w,s)&&(_=w);var S=b.prototype=m.prototype=Object.create(_);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function i(n,a,o,s){var u=d(t[n],t,a);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){i("next",t,o,s)}),(function(t){i("throw",t,o,s)})):e.resolve(c).then((function(t){l.value=t,o(l)}),(function(t){return i("throw",t,o,s)}))}s(u.arg)}var n;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,n){i(t,r,e,n)}))}return n=n?n.then(a,a):a()}})}function E(e,i,n){var r=f;return function(a,o){if(r===p)throw Error("Generator is already running");if(r===g){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=C(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=d(e,i,n);if("normal"===l.type){if(r=n.done?g:v,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=g,n.method="throw",n.arg=l.arg)}}}function C(e,i){var n=i.method,r=e.iterator[n];if(r===t)return i.delegate=null,"throw"===n&&e.iterator.return&&(i.method="return",i.arg=t,C(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=d(r,e.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,y;var o=a.arg;return o?o.done?(i[e.resultName]=o.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function P(e){if(e||""===e){var i=e[s];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function i(){for(;++n<e.length;)if(r.call(e,n))return i.value=e[n],i.done=!1,i;return i.value=t,i.done=!0,i};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return k.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:k,configurable:!0}),k.displayName=c(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(T.prototype),c(T.prototype,u,(function(){return this})),e.AsyncIterator=T,e.async=function(t,i,n,r,a){void 0===a&&(a=Promise);var o=new T(h(t,i,n,r),a);return e.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},A(S),c(S,l,"Generator"),c(S,s,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),i=[];for(var n in e)i.push(n);return i.reverse(),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var i in this)"t"===i.charAt(0)&&r.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var i=this;function n(n,r){return s.type="throw",s.arg=e,i.next=n,r&&(i.method="next",i.arg=t),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:P(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function r(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function u(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,i){return(e=r(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?t:i):r.value}},p.apply(this,arguments)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,a,o,s=[],u=!0,l=!1;try{if(a=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=a.call(i)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){l=!0,r=t}finally{try{if(!u&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){if(t){if("string"==typeof t)return k(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function b(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=m(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw a}}}}var _=function(){function t(){o(this,t)}return u(t,null,[{key:"GenAutoIncrementId",value:function(){return t.auto_increment_id++}}])}();_.auto_increment_id=0;var x=u((function t(e){o(this,t),this.id=_.GenAutoIncrementId(),this.registry=e})),w="named",S="inject",A="multi_inject",T="inversify:tagged",E="inversify:paramtypes",C=function(){return u((function t(e,i){o(this,t),this.key=e,this.value=i}),[{key:"toString",value:function(){return this.key===w?"named: ".concat(String(this.value).toString()," "):"tagged: { key:".concat(this.key.toString(),", value: ").concat(String(this.value)," }")}}])}(),B=function(t){var e;return function(t){var e=Object.prototype.hasOwnProperty,i="function"==typeof Symbol,n=i&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",r=i&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,u=!o&&!s,l={create:o?function(){return A(Object.create(null))}:s?function(){return A({__proto__:null})}:function(){return A({})},has:u?function(t,i){return e.call(t,i)}:function(t,e){return e in t},get:u?function(t,i){return e.call(t,i)?t[i]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),h="object"==("undefined"==typeof process?"undefined":a(process))&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,d=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],i=function(){function t(t,e,i){this._index=0,this._keys=t,this._values=e,this._selector=i}return t.prototype["@@iterator"]=function(){return this},t.prototype[r]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var i=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var i=this._find(t,!0);return this._values[i]=e,this},e.prototype.delete=function(e){var i=this._find(e,!1);if(i>=0){for(var n=this._keys.length,r=i+1;r<n;r++)this._keys[r-1]=this._keys[r],this._values[r-1]=this._values[r];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new i(this._keys,this._values,n)},e.prototype.values=function(){return new i(this._keys,this._values,a)},e.prototype.entries=function(){return new i(this._keys,this._values,o)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[r]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function n(t,e){return t}function a(t,e){return e}function o(t,e){return[t,e]}}():Map,f=(h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new d}Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[r]=function(){return this.keys()}}():Set,new(h||"function"!=typeof WeakMap?function(){var t=16,i=l.create(),n=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=a(t,!1);return void 0!==e&&l.has(e,this._key)},t.prototype.get=function(t){var e=a(t,!1);return void 0!==e?l.get(e,this._key):void 0},t.prototype.set=function(t,e){return a(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=a(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var t;do{t="@@WeakMap@@"+s()}while(l.has(i,t));return i[t]=!0,t}function a(t,i){if(!e.call(t,n)){if(!i)return;Object.defineProperty(t,n,{value:l.create()})}return t[n]}function o(t,e){for(var i=0;i<e;++i)t[i]=255*Math.random()|0;return t}function s(){var e,i=(e=t,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):o(new Uint8Array(e),e):o(new Array(e),e));i[6]=79&i[6]|64,i[8]=191&i[8]|128;for(var n="",r=0;r<t;++r){var a=i[r];4!==r&&6!==r&&8!==r||(n+="-"),a<16&&(n+="0"),n+=a.toString(16).toLowerCase()}return n}}():WeakMap));function v(t,e,i){var n=f.get(t);if(m(n)){if(!i)return;n=new d,f.set(t,n)}var r=n.get(e);if(m(r)){if(!i)return;r=new d,n.set(e,r)}return r}function p(t,e,i){if(g(t,e,i))return!0;var n=S(e);return!k(n)&&p(t,n,i)}function g(t,e,i){var n=v(e,i,!1);return!m(n)&&!!n.has(t)}function y(t,e,i){if(g(t,e,i))return function(t,e,i){var n=v(e,i,!1);if(!m(n))return n.get(t)}(t,e,i);var n=S(e);return k(n)?void 0:y(t,n,i)}function m(t){return void 0===t}function k(t){return null===t}function b(t){return"object"==a(t)?null!==t:"function"==typeof t}function _(t,e){switch(function(t){if(null===t)return 1;switch(a(t)){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var i=3===e?"string":5===e?"number":"default",r=function(t,e){var i=t[e];if(null!=i){if(!w(i))throw new TypeError;return i}}(t,n);if(void 0!==r){var o=r.call(t,i);if(b(o))throw new TypeError;return o}return function(t,e){if("string"===e){var i=t.toString;if(w(i)){var n=i.call(t);if(!b(n))return n}var r=t.valueOf;if(w(r)){var a=r.call(t);if(!b(a))return a}}else{var o=t.valueOf;if(w(o)){var s=o.call(t);if(!b(s))return s}var u=t.toString;if(w(u)){var l=u.call(t);if(!b(l))return l}}throw new TypeError}(t,"default"===i?"number":i)}function x(t){var e=_(t,3);return"symbol"==a(e)?e:function(t){return""+t}(e)}function w(t){return"function"==typeof t}function S(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var i=t.prototype,n=i&&Object.getPrototypeOf(i);if(null==n||n===Object.prototype)return e;var r=n.constructor;return"function"!=typeof r||r===t?e:r}function A(t){return t.__=void 0,delete t.__,t}t("defineMetadata",(function(t,e,i,n){if(!b(i))throw new TypeError;return r=t,a=e,void v(i,n,!0).set(r,a);var r,a})),t("hasMetadata",(function(t,e,i){if(!b(e))throw new TypeError;return m(i)||(i=x(i)),p(t,e,i)})),t("hasOwnMetadata",(function(t,e,i){if(!b(e))throw new TypeError;return m(i)||(i=x(i)),g(t,e,i)})),t("getMetadata",(function(t,e,i){if(!b(e))throw new TypeError;return m(i)||(i=x(i)),y(t,e,i)}))}((e=t,function(t,i){"function"!=typeof e[t]&&Object.defineProperty(e,t,{configurable:!0,writable:!0,value:i})})),t}({});function M(t,e,i,n){!function(t,e,i,n){var r,a=[n],o={};B.hasOwnMetadata(t,e)&&(o=B.getMetadata(t,e));var s=o[i];void 0===s&&(s=[]),(r=s).push.apply(r,a),o[i]=s,B.defineMetadata(t,o,e)}(T,t,i.toString(),n)}function R(t){return function(e,i,n){M(e,0,n,t)}}function P(t){return function(e){return function(i,n,r){return R(new C(t,e))(i,n,r)}}}var O=P(S),I=P(A);function L(){return function(t){return B.defineMetadata(E,null,t),t}}function D(t){return R(new C(w,t))}var j,F="Singleton",N="Transient",z="ConstantValue",G="DynamicValue",U="Factory",W="Function",V="Instance",H="Invalid",X=function(){function t(e,i){o(this,t),this.id=_.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=e,this.scope=i,this.type=H,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}return u(t,[{key:"clone",value:function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===F&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.provider=this.provider,e.constraint=this.constraint,e.cache=this.cache,e}}])}(),Y=function(){return u((function t(){o(this,t)}),[{key:"getConstructorMetadata",value:function(t){return{compilerGeneratedMetadata:B.getMetadata(E,t),userGeneratedMetadata:B.getMetadata(T,t)||{}}}},{key:"getPropertiesMetadata",value:function(t){throw new Error("暂未实现")}}])}(),K=(j=w,function(t){var e=function(e){if(null==e)return!1;if(e.key===j&&e.value===t)return!0;if(null==e.constructorArgsMetadata)return!1;for(var i=e.constructorArgsMetadata,n=0;n<i.length;n++)if(i[n].key===j&&i[n].value===t)return!0;return!1};return e.metaData=new C(j,t),e}),q=function(){return u((function t(e){o(this,t),this._binding=e}),[{key:"inRequestScope",value:function(){throw new Error("暂未实现")}},{key:"inSingletonScope",value:function(){return this._binding.scope=F,this}},{key:"inTransientScope",value:function(){return this._binding.scope=N,this}},{key:"whenTargetNamed",value:function(t){return this._binding.constraint=K(t),this}}])}(),Z=function(){return u((function t(e){o(this,t),this._binding=e}),[{key:"to",value:function(t){return this._binding.type=V,this._binding.implementationType=t,new q(this._binding)}},{key:"toSelf",value:function(){var t=this._binding.serviceIdentifier;return this.to(t)}},{key:"toDynamicValue",value:function(t){return this._binding.type=G,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new q(this._binding)}},{key:"toConstantValue",value:function(t){return this._binding.type=z,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=F,new q(this._binding)}},{key:"toFactory",value:function(t){return this._binding.type=U,this._binding.factory=t,this._binding.scope=F,new q(this._binding)}},{key:"toService",value:function(t){this.toDynamicValue((function(e){return e.container.get(t)}))}}])}(),J=function(){return u((function t(e){o(this,t);var i=e||{};i.defaultScope=i.defaultScope||N,this.options=i,this.id=_.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new Y}),[{key:"load",value:function(t){var e=this._getContainerModuleHelpersFactory()(t.id);t.registry(e.bindFunction,e.unbindFunction,e.isboundFunction,e.rebindFunction)}},{key:"get",value:function(t){var e=this._getNotAllArgs(t,!1);return this._get(e)}},{key:"getAll",value:function(t){var e=this._getAllArgs(t);return this._get(e)}},{key:"getTagged",value:function(t,e,i){var n=this._getNotAllArgs(t,!1,e,i);return this._get(n)}},{key:"getNamed",value:function(t,e){return this.getTagged(t,w,e)}},{key:"isBound",value:function(t){return this._bindingDictionary.has(t)}},{key:"bind",value:function(t){var e=this.options.defaultScope,i=new X(t,e),n=this._bindingDictionary.get(t)||[];return n.push(i),this._bindingDictionary.set(t,n),new Z(i)}},{key:"unbind",value:function(t){this._bindingDictionary.delete(t)}},{key:"rebind",value:function(t){return this.unbind(t),this.bind(t)}},{key:"_getContainerModuleHelpersFactory",value:function(){var t=this,e=function(t,e){t._binding.moduleId=e},i=function(i){return function(n){var r=t.rebind(n);return e(r,i),r}};return function(n){return{bindFunction:(r=n,function(i){var n=t.bind(i);return e(n,r),n}),isboundFunction:function(e){return t.isBound(e)},rebindFunction:i(n),unbindFunction:function(e){return t.unbind(e)},unbindAsyncFunction:function(t){return null}};var r}}},{key:"_getNotAllArgs",value:function(t,e,i,n){return{avoidConstraints:!1,isMultiInject:e,serviceIdentifier:t,key:i,value:n}}},{key:"_getAllArgs",value:function(t){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t}}},{key:"_get",value:function(t){var e=this,i=[];return this._bindingDictionary.get(t.serviceIdentifier).filter((function(e){return e.constraint(t)})).forEach((function(t){i.push(e._resolveFromBinding(t))})),t.isMultiInject||1!==i.length?i:i[0]}},{key:"_getChildRequest",value:function(t){for(var e=this,i=t.implementationType,n=this._metadataReader.getConstructorMetadata(i).userGeneratedMetadata,r=Object.keys(n),a=[],o=function(){var t=n[s],i={};t.forEach((function(t){i[t.key]=t.value}));var r={inject:i[S],multiInject:i[A]},o=r.inject||r.multiInject,u={serviceIdentifier:o,constructorArgsMetadata:t},l={injectIdentifier:o,metadata:t,bindings:e._bindingDictionary.get(o).filter((function(t){return t.constraint(u)}))};a.push(l)},s=0;s<r.length;s++)o();return a}},{key:"_resolveFromBinding",value:function(t){var e=this._getResolvedFromBinding(t);return this._saveToScope(t,e),e}},{key:"_getResolvedFromBinding",value:function(t){var e;switch(t.type){case z:case W:e=t.cache;break;case V:e=this._resolveInstance(t,t.implementationType);break;default:e=t.dynamicValue({container:this})}return e}},{key:"_resolveInstance",value:function(t,e){if(t.activated)return t.cache;var i=this._getChildRequest(t);return this._createInstance(e,i)}},{key:"_createInstance",value:function(t,e){return e.length?function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var a=new(t.bind.apply(t,r));return n&&d(a,n.prototype),a}(t,y(this._resolveRequests(e))):new t}},{key:"_resolveRequests",value:function(t){var e=this;return t.map((function(t){return t.bindings.length>1?t.bindings.map((function(t){return e._resolveFromBinding(t)})):e._resolveFromBinding(t.bindings[0])}))}},{key:"_saveToScope",value:function(t,e){t.scope===F&&(t.cache=e,t.activated=!0)}}])}(),$=Symbol("ContributionProvider"),Q=function(){return u((function t(e,i){o(this,t),this.serviceIdentifier=e,this.container=i}),[{key:"getContributions",value:function(){var t;return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&(t=this.caches).push.apply(t,y(this.container.getAll(this.serviceIdentifier)))),this.caches}}])}();function tt(t,e){t($).toDynamicValue((function(t){var i=t.container;return new Q(e,i)})).inSingletonScope().whenTargetNamed(e)}var et=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"call",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this.taps.map((function(t){return t.fn})).forEach((function(t){return t.apply(void 0,e)}))}}])}(function(){return u((function t(e,i){o(this,t),this._args=e,this.name=i,this.taps=[]}),[{key:"tap",value:function(t,e){this._tap("sync",t,e)}},{key:"unTap",value:function(t,e){var i="string"==typeof t?t.trim():t.name;i&&(this.taps=this.taps.filter((function(t){return!(t.name===i&&(!e||t.fn===e))})))}},{key:"_parseOptions",value:function(t,e,i){var n;if("string"==typeof e)n={name:e.trim()};else if("object"!=a(e)||null===e)throw new Error("Invalid tap options");if("string"!=typeof n.name||""===n.name)throw new Error("Missing name for tap");return n=Object.assign({type:t,fn:i},n)}},{key:"_tap",value:function(t,e,i){this._insert(this._parseOptions(t,e,i))}},{key:"_insert",value:function(t){var e;"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));var i=0;"number"==typeof t.stage&&(i=t.stage);for(var n=this.taps.length;n>0;){n--;var r=this.taps[n];this.taps[n+1]=r;var a=r.stage||0;if(e){if(e.has(r.name)){e.delete(r.name);continue}if(e.size>0)continue}if(!(a>i)){n++;break}}this.taps[n]=t}}])}()),it=Symbol.for("EnvContribution"),nt=Symbol.for("VGlobal"),rt=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},at=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ot=function(t,e){return function(i,n){e(i,n,t)}},st=function(){return u((function t(e){o(this,t),this.contributions=e,this.id=_.GenAutoIncrementId(),this.hooks={onSetEnv:new et(["lastEnv","env","global"])},this.measureTextMethod="native",this.optimizeVisible=!1}),[{key:"env",get:function(){return this._env}},{key:"devicePixelRatio",get:function(){return this._env||this.setEnv("browser"),this.envContribution.getDevicePixelRatio()}},{key:"supportEvent",get:function(){return this._env||this.setEnv("browser"),this.envContribution.supportEvent},set:function(t){this._env||this.setEnv("browser"),this.envContribution.supportEvent=t}},{key:"supportsTouchEvents",get:function(){return this._env||this.setEnv("browser"),this.envContribution.supportsTouchEvents},set:function(t){this._env||this.setEnv("browser"),this.envContribution.supportsTouchEvents=t}},{key:"supportsPointerEvents",get:function(){return this._env||this.setEnv("browser"),this.envContribution.supportsPointerEvents},set:function(t){this._env||this.setEnv("browser"),this.envContribution.supportsPointerEvents=t}},{key:"supportsMouseEvents",get:function(){return this._env||this.setEnv("browser"),this.envContribution.supportsMouseEvents},set:function(t){this._env||this.setEnv("browser"),this.envContribution.supportsMouseEvents=t}},{key:"applyStyles",get:function(){return this._env||this.setEnv("browser"),this.envContribution.applyStyles},set:function(t){this._env||this.setEnv("browser"),this.envContribution.applyStyles=t}},{key:"bindContribution",value:function(t){var e=this,i=[];if(this.contributions.getContributions().forEach((function(n){var r=n.configure(e,t);r&&r.then&&i.push(r)})),i.length)return Promise.all(i)}},{key:"getDynamicCanvasCount",value:function(){return this._env||this.setEnv("browser"),this.envContribution.getDynamicCanvasCount()}},{key:"getStaticCanvasCount",value:function(){return this._env||this.setEnv("browser"),this.envContribution.getStaticCanvasCount()}},{key:"setEnv",value:function(t,e){if(e&&!0===e.force||this._env!==t)return this.deactiveCurrentEnv(),this.activeEnv(t,e)}},{key:"deactiveCurrentEnv",value:function(){this.envContribution&&this.envContribution.release()}},{key:"activeEnv",value:function(t,e){var i=this,n=this._env;this._env=t;var r=this.bindContribution(e);if(r&&r.then)return r.then((function(){i.envParams=e,i.hooks.onSetEnv.call(n,t,i)}));this.envParams=e,this.hooks.onSetEnv.call(n,t,this)}},{key:"setActiveEnvContribution",value:function(t){this.envContribution=t}},{key:"createCanvas",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.createCanvas(t)}},{key:"createOffscreenCanvas",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.createOffscreenCanvas(t)}},{key:"releaseCanvas",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.releaseCanvas(t)}},{key:"addEventListener",value:function(t,e,i){return this._env||this.setEnv("browser"),this.envContribution.addEventListener(t,e,i)}},{key:"removeEventListener",value:function(t,e,i){return this._env||this.setEnv("browser"),this.envContribution.removeEventListener(t,e,i)}},{key:"dispatchEvent",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.dispatchEvent(t)}},{key:"getRequestAnimationFrame",value:function(){return this._env||this.setEnv("browser"),this.envContribution.getRequestAnimationFrame()}},{key:"getCancelAnimationFrame",value:function(){return this._env||this.setEnv("browser"),this.envContribution.getCancelAnimationFrame()}},{key:"getElementById",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.getElementById?this.envContribution.getElementById(t):null}},{key:"getRootElement",value:function(){return this._env||this.setEnv("browser"),this.envContribution.getRootElement?this.envContribution.getRootElement():null}},{key:"getDocument",value:function(){return this._env||this.setEnv("browser"),this.envContribution.getDocument?this.envContribution.getDocument():null}},{key:"mapToCanvasPoint",value:function(t,e){return this._env||this.setEnv("browser"),this.envContribution.mapToCanvasPoint?this.envContribution.mapToCanvasPoint(t,e):null}},{key:"loadImage",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.loadImage(t)}},{key:"loadSvg",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.loadSvg(t)}},{key:"loadJson",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.loadJson(t)}},{key:"loadArrayBuffer",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.loadArrayBuffer(t)}},{key:"loadBlob",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.loadBlob(t)}},{key:"isChrome",value:function(){return null!=this._isChrome||(this._env||this.setEnv("browser"),this._isChrome="browser"===this._env&&navigator.userAgent.indexOf("Chrome")>-1),this._isChrome}},{key:"isSafari",value:function(){return null!=this._isSafari||(this._env||this.setEnv("browser"),this._isSafari="browser"===this._env&&/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)),this._isSafari}},{key:"getNativeAABBBounds",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.getNativeAABBBounds(t)}},{key:"removeDom",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.removeDom(t)}},{key:"createDom",value:function(t){return this._env||this.setEnv("browser"),this.envContribution.createDom(t)}},{key:"updateDom",value:function(t,e){return this._env||this.setEnv("browser"),this.envContribution.updateDom(t,e)}},{key:"getElementTop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._env||this.setEnv("browser"),this.envContribution.getElementTop(t,e)}},{key:"getElementLeft",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._env||this.setEnv("browser"),this.envContribution.getElementLeft(t,e)}},{key:"getElementTopLeft",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._env||this.setEnv("browser"),this.envContribution.getElementTopLeft(t,e)}}])}();function ut(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}st=rt([L(),ot(0,O($)),ot(0,D(it)),at("design:paramtypes",[Object])],st);var lt={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function a(t,e,n,a,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new r(n,a||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),s.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r<a;r++)o[r]=n[r].fn;return o},s.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},s.prototype.emit=function(t,e,n,r,a,o){var s=i?i+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,a),!0;case 6:return c.fn.call(c.context,e,n,r,a,o),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var d,f=c.length;for(l=0;l<f;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,r);break;default:if(!u)for(d=1,u=new Array(h-1);d<h;d++)u[d-1]=arguments[d];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,i){return a(this,t,e,i,!1)},s.prototype.once=function(t,e,i){return a(this,t,e,i,!0)},s.prototype.removeListener=function(t,e,n,r){var a=i?i+t:t;if(!this._events[a])return this;if(!e)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||o(this,a);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||r&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[a]=1===l.length?l[0]:l:o(this,a)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=i,s.EventEmitter=s,t.exports=s}(lt);var ct=ut(lt.exports),ht=function(t,e){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")},dt=function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"boolean"==typeof t:!0===t||!1===t||ht(t,"Boolean")},ft=function(t){return"function"==typeof t},vt=function(t){return null==t},pt=function(t){return null!=t},gt=function(t){var e=a(t);return null!==t&&"object"===e||"function"===e},yt=function(t){return"object"==a(t)&&null!==t},mt=function(t){if(!yt(t)||!ht(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},kt=function(t){return void 0===t},bt=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=a(t);return e?"string"===i:"string"===i||ht(t,"String")},_t=function(t){return Array.isArray?Array.isArray(t):ht(t,"Array")},xt=function(t){return null!==t&&"function"!=typeof t&&Number.isFinite(t.length)},wt=function(t){return ht(t,"Date")},St=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=a(t);return e?"number"===i:"number"===i||ht(t,"Number")},At=function(t){return St(t)&&Number.isFinite(t)},Tt=function(t){return new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(t)},Et=function(t){return new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(t)},Ct=function(t){return{}.toString.call(t).replace(/^\[object /,"").replace(/]$/,"")},Bt=Object.prototype,Mt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Bt)},Rt=Object.prototype.hasOwnProperty;function Pt(t){if(vt(t))return!0;if(xt(t))return!t.length;var e=Ct(t);if("Map"===e||"Set"===e)return!t.size;if(Mt(t))return!Object.keys(t).length;for(var i in t)if(Rt.call(t,i))return!1;return!0}var Ot=function(t,e,i){for(var n=bt(e)?e.split("."):e,r=0;r<n.length;r++)t=t?t[n[r]]:void 0;return void 0===t?i:t},It=Object.prototype.hasOwnProperty,Lt=function(t,e){return null!=t&&It.call(t,e)};function Dt(t){var e;if(!pt(t)||"object"!=a(t))return t;var i=_t(t),n=t.length;e=i?new Array(n):"object"==a(t)?{}:dt(t)||St(t)||bt(t)?t:wt(t)?new Date(+t):void 0;var r=i?void 0:Object.keys(Object(t)),o=-1;if(e)for(;++o<(r||t).length;){var s=r?r[o]:o,u=t[s];e[s]=Dt(u)}return e}function jt(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(t===e)return;if(pt(e)&&"object"==a(e)){var n=Object(e),r=[];for(var o in n)r.push(o);for(var s=r.length,u=-1;s--;){var l=r[++u];pt(n[l])&&"object"==a(n[l])?Ft(t,e,l,i):Nt(t,l,n[l])}}}}function Ft(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=t[i],o=e[i],s=e[i],u=!0;if(_t(o)){if(n)s=[];else if(_t(r))s=r;else if(xt(r)){s=new Array(r.length);for(var l=-1,c=r.length;++l<c;)s[l]=r[l]}}else mt(o)?(s=r,"function"!=typeof r&&"object"==a(r)||(s={})):u=!1;u&&jt(s,o,n),Nt(t,i,s)}function Nt(t,e,i){(void 0!==i&&!function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t[e],i)||void 0===i&&!(e in t))&&(t[e]=i)}function zt(t){for(var e=-1,i=arguments.length<=1?0:arguments.length-1;++e<i;)jt(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1],!0);return t}function Gt(t){return Object.prototype.toString.call(t)}function Ut(t){return Object.keys(t)}function Wt(t,e,i){if(t===e)return!0;if(a(t)!=a(e))return!1;if(null==t||null==e)return!1;if(Number.isNaN(t)&&Number.isNaN(e))return!0;if(Gt(t)!==Gt(e))return!1;if(ft(t))return!!(null==i?void 0:i.skipFunction);if("object"!=a(t))return!1;if(_t(t)){if(t.length!==e.length)return!1;for(var n=t.length-1;n>=0;n--)if(!Wt(t[n],e[n],i))return!1;return!0}if(!mt(t))return!1;var r=Ut(t),o=Ut(e);if(r.length!==o.length)return!1;r.sort(),o.sort();for(var s=r.length-1;s>=0;s--)if(r[s]!=o[s])return!1;for(var u=r.length-1;u>=0;u--){var l=r[u];if(!Wt(t[l],e[l],i))return!1}return!0}function Vt(t,e,i){for(var n=function(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}(e),r=0;r<n.length;r++){var a=n[r];(i?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}function Ht(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var a=n[r];"constructor"!==a&&(i?null!=e[a]:null==t[a])&&(t[a]=e[a])}else Vt(t,e,i)}function Xt(t){return pt(t)?_t(t)?t:[t]:[]}function Yt(t){if(xt(t))return t[t.length-1]}function Kt(t,e){if(!_t(t)||!_t(e))return!1;if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}function qt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Zt(t){return Number(t)}var Jt,$t="undefined"!=typeof console;function Qt(t,e,i){var n=[e].concat([].slice.call(i));$t&&console[t].apply(console,n)}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Info=3]="Info",t[t.Debug=4]="Debug"}(Jt||(Jt={}));var te=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jt.None,i=arguments.length>1?arguments[1]:void 0;o(this,t),this._onErrorHandler=[],this._level=e,this._method=i}return u(t,[{key:"addErrorHandler",value:function(t){this._onErrorHandler.find((function(e){return e===t}))||this._onErrorHandler.push(t)}},{key:"removeErrorHandler",value:function(t){var e=this._onErrorHandler.findIndex((function(e){return e===t}));e<0||this._onErrorHandler.splice(e,1)}},{key:"callErrorHandler",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._onErrorHandler.forEach((function(t){return t.apply(void 0,e)}))}},{key:"canLogInfo",value:function(){return this._level>=Jt.Info}},{key:"canLogDebug",value:function(){return this._level>=Jt.Debug}},{key:"canLogError",value:function(){return this._level>=Jt.Error}},{key:"canLogWarn",value:function(){return this._level>=Jt.Warn}},{key:"level",value:function(t){return arguments.length?(this._level=+t,this):this._level}},{key:"error",value:function(){for(var t,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return this._level>=Jt.Error&&(this._onErrorHandler.length?this.callErrorHandler.apply(this,i):Qt(null!==(t=this._method)&&void 0!==t?t:"error","ERROR",i)),this}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this._level>=Jt.Warn&&Qt(this._method||"warn","WARN",e),this}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this._level>=Jt.Info&&Qt(this._method||"log","INFO",e),this}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this._level>=Jt.Debug&&Qt(this._method||"log","DEBUG",e),this}}],[{key:"getInstance",value:function(e,i){return t._instance&&St(e)?t._instance.level(e):t._instance||(t._instance=new t(e,i)),t._instance}},{key:"setInstance",value:function(e){return t._instance=e}},{key:"setInstanceLevel",value:function(e){t._instance?t._instance.level(e):t._instance=new t(e)}},{key:"clearInstance",value:function(){t._instance=null}}])}();function ee(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;for(vt(n)&&(n=t.length);i<n;){var r=i+n>>>1;qt(t[r],e)>0?n=r:i=r+1}return i}te._instance=null;var ie=1e-10,ne=1e-10;function re(t,e){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ie,n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:ne)*Math.max(t,e);return Math.abs(t-e)<=Math.max(i,n)}function ae(t,e,i,n){return t>e&&!re(t,e,i,n)}function oe(t,e,i,n){return t<e&&!re(t,e,i,n)}var se=function(t){var e=null,i=null;return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return e&&r.every((function(t,i){return t===e[i]}))||(e=r,i=t.apply(void 0,r)),i}},ue=function(t,e,i){return t<e?e:t>i?i:t};function le(t,e){var i;return t>e&&(i=t,t=e,e=i),function(i){return Math.max(t,Math.min(e,i))}}var ce=!1;try{ce="function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame}catch(t){ce=!1}function he(t,e,i){var n,r,a,o,s,u,l=0,c=!1,h=!1,d=!0,f=!e&&0!==e&&ce;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var i=n,a=r;return n=r=void 0,l=e,o=t.apply(a,i)}function p(t,e){return f?(cancelAnimationFrame(s),requestAnimationFrame(t)):setTimeout(t,e)}function g(t){var i=t-u;return void 0===u||i>=e||i<0||h&&t-l>=a}function y(){var t=Date.now();if(g(t))return m(t);s=p(y,function(t){var i=t-l,n=e-(t-u);return h?Math.min(n,a-i):n}(t))}function m(t){return s=void 0,d&&n?v(t):(n=r=void 0,o)}function k(){for(var t=Date.now(),i=g(t),a=arguments.length,d=new Array(a),f=0;f<a;f++)d[f]=arguments[f];if(n=d,r=this,u=t,i){if(void 0===s)return function(t){return l=t,s=p(y,e),c?v(t):o}(u);if(h)return s=p(y,e),v(u)}return void 0===s&&(s=p(y,e)),o}return e=+e||0,gt(i)&&(c=!!i.leading,(h="maxWait"in i)&&(a=Math.max(At(i.maxWait)?i.maxWait:0,e)),d="trailing"in i?!!i.trailing:d),k.cancel=function(){void 0!==s&&function(t){if(f)return cancelAnimationFrame(t);clearTimeout(t)}(s),l=0,n=u=r=s=void 0},k.flush=function(){return void 0===s?o:m(Date.now())},k.pending=function(){return void 0!==s},k}function de(t,e,i){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return gt(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),he(t,e,{leading:n,trailing:r,maxWait:e})}function fe(t,e){return function(i){return t*(1-i)+e*i}}function ve(t,e){return function(i){return Math.round(t*(1-i)+e*i)}}ce=!1;var pe=1e-12,ge=Math.PI,ye=ge/2,me=2*ge,ke=2*Math.PI,be=Math.abs,_e=Math.atan2,xe=Math.cos,we=Math.max,Se=Math.min,Ae=Math.sin,Te=Math.sqrt,Ee=Math.pow;function Ce(t){return t>1?0:t<-1?ge:Math.acos(t)}function Be(t){return t>=1?ye:t<=-1?-ye:Math.asin(t)}function Me(t,e,i,n,r){var a,o;return"number"==typeof t&&"number"==typeof i&&(a=(1-r)*t+r*i),"number"==typeof e&&"number"==typeof n&&(o=(1-r)*e+r*n),{x:a,y:o}}function Re(t,e){return t[0]*e[1]-t[1]*e[0]}var Pe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;o(this,t),this.x=0,this.y=0,this.x=e,this.y=i,this.x1=n,this.y1=r}return u(t,[{key:"clone",value:function(){return new t(this.x,this.y)}},{key:"copyFrom",value:function(t){return this.x=t.x,this.y=t.y,this.x1=t.x1,this.y1=t.y1,this.defined=t.defined,this.context=t.context,this}},{key:"set",value:function(t,e){return this.x=t,this.y=e,this}},{key:"add",value:function(t){return St(t)?(this.x+=t,void(this.y+=t)):(this.x+=t.x,this.y+=t.y,this)}},{key:"sub",value:function(t){return St(t)?(this.x-=t,void(this.y-=t)):(this.x-=t.x,this.y-=t.y,this)}},{key:"multi",value:function(t){throw new Error("暂不支持")}},{key:"div",value:function(t){throw new Error("暂不支持")}}])}(),Oe=function(){return u((function t(){o(this,t)}),null,[{key:"distancePP",value:function(t,e){return Te(Ee(t.x-e.x,2)+Ee(t.y-e.y,2))}},{key:"distanceNN",value:function(t,e,i,n){return Te(Ee(t-i,2)+Ee(e-n,2))}},{key:"distancePN",value:function(t,e,i){return Te(Ee(e-t.x,2)+Ee(i-t.y,2))}},{key:"pointAtPP",value:function(t,e,i){return new Pe((e.x-t.x)*i+t.x,(e.y-t.y)*i+t.y)}}])}();function Ie(t,e,i){var n=e.x1,r=e.y1,a=e.x2,o=e.y2;return i.onlyTranslate()?(t!==e&&t.setValue(e.x1,e.y1,e.x2,e.y2),t.translate(i.e,i.f),e):(t.clear(),t.add(i.a*n+i.c*r+i.e,i.b*n+i.d*r+i.f),t.add(i.a*a+i.c*r+i.e,i.b*a+i.d*r+i.f),t.add(i.a*a+i.c*o+i.e,i.b*a+i.d*o+i.f),t.add(i.a*n+i.c*o+i.e,i.b*n+i.d*o+i.f),e)}var Le=function(){function t(e){o(this,t),e?this.setValue(e.x1,e.y1,e.x2,e.y2):this.clear()}return u(t,[{key:"clone",value:function(){return new t(this)}},{key:"clear",value:function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this}},{key:"empty",value:function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE}},{key:"equals",value:function(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2}},{key:"setValue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return this.x1=t,this.y1=e,this.x2=i,this.y2=n,this}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return i<t?(this.x2=t,this.x1=i):(this.x1=t,this.x2=i),n<e?(this.y2=e,this.y1=n):(this.y1=e,this.y2=n),this}},{key:"add",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this}},{key:"expand",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return _t(t)?(this.y1-=t[0],this.x2+=t[1],this.y2+=t[2],this.x1-=t[3]):(this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t),this}},{key:"round",value:function(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this}},{key:"translate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this}},{key:"rotate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.rotatedPoints(t,e,i);return this.clear().add(n[0],n[1]).add(n[2],n[3]).add(n[4],n[5]).add(n[6],n[7])}},{key:"scale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=this.scalePoints(t,e,i,n);return this.clear().add(r[0],r[1]).add(r[2],r[3])}},{key:"union",value:function(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this}},{key:"intersect",value:function(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this}},{key:"encloses",value:function(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2}},{key:"alignsWith",value:function(t){return t&&(this.x1===t.x1||this.x2===t.x2||this.y1===t.y1||this.y2===t.y2)}},{key:"intersects",value:function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)}},{key:"contains",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)}},{key:"containsPoint",value:function(t){return!(t.x<this.x1||t.x>this.x2||t.y<this.y1||t.y>this.y2)}},{key:"width",value:function(){return this.empty()?0:this.x2-this.x1}},{key:"height",value:function(){return this.empty()?0:this.y2-this.y1}},{key:"scaleX",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x1*=t,this.x2*=t,this}},{key:"scaleY",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y1*=t,this.y2*=t,this}},{key:"transformWithMatrix",value:function(t){return Ie(this,this,t),this}},{key:"copy",value:function(t){return this.x1=t.x1,this.y1=t.y1,this.x2=t.x2,this.y2=t.y2,this}},{key:"rotatedPoints",value:function(t,e,i){var n=this.x1,r=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),u=Math.sin(t),l=e-e*s+i*u,c=i-e*u-i*s;return[s*n-u*r+l,u*n+s*r+c,s*n-u*o+l,u*n+s*o+c,s*a-u*r+l,u*a+s*r+c,s*a-u*o+l,u*a+s*o+c]}},{key:"scalePoints",value:function(t,e,i,n){return[t*this.x1+(1-t)*i,e*this.y1+(1-e)*n,t*this.x2+(1-t)*i,e*this.y2+(1-e)*n]}}])}(),De=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i)}(Le);function je(t){return t*(Math.PI/180)}var Fe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(t<0)for(;t<-me;)t+=me;else if(t>0)for(;t>me;)t-=me;return t};function Ne(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}var ze=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;o(this,t),this.a=e,this.b=i,this.c=n,this.d=r,this.e=a,this.f=s}return u(t,[{key:"equalToMatrix",value:function(t){return!(this.e!==t.e||this.f!==t.f||this.a!==t.a||this.d!==t.d||this.b!==t.b||this.c!==t.c)}},{key:"equalTo",value:function(t,e,i,n,r,a){return!(this.e!==r||this.f!==a||this.a!==t||this.d!==n||this.b!==e||this.c!==i)}},{key:"setValue",value:function(t,e,i,n,r,a){return this.a=t,this.b=e,this.c=i,this.d=n,this.e=r,this.f=a,this}},{key:"reset",value:function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this}},{key:"getInverse",value:function(){var e=this.a,i=this.b,n=this.c,r=this.d,a=this.e,o=this.f,s=new t,u=e*r-i*n;return s.a=r/u,s.b=-i/u,s.c=-n/u,s.d=e/u,s.e=(n*o-r*a)/u,s.f=-(e*o-i*a)/u,s}},{key:"rotate",value:function(t){var e=Math.cos(t),i=Math.sin(t),n=this.a*e+this.c*i,r=this.b*e+this.d*i,a=this.a*-i+this.c*e,o=this.b*-i+this.d*e;return this.a=n,this.b=r,this.c=a,this.d=o,this}},{key:"rotateByCenter",value:function(t,e,i){var n=Math.cos(t),r=Math.sin(t),a=(1-n)*e+r*i,o=(1-n)*i-r*e,s=n*this.a-r*this.b,u=r*this.a+n*this.b,l=n*this.c-r*this.d,c=r*this.c+n*this.d,h=n*this.e-r*this.f+a,d=r*this.e+n*this.f+o;return this.a=s,this.b=u,this.c=l,this.d=c,this.e=h,this.f=d,this}},{key:"scale",value:function(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this}},{key:"setScale",value:function(t,e){return this.b=this.b/this.a*t,this.c=this.c/this.d*e,this.a=t,this.d=e,this}},{key:"transform",value:function(t,e,i,n,r,a){return this.multiply(t,e,i,n,r,a),this}},{key:"translate",value:function(t,e){return this.e+=this.a*t+this.c*e,this.f+=this.b*t+this.d*e,this}},{key:"transpose",value:function(){var t=this.a,e=this.b,i=this.c,n=this.d,r=this.e,a=this.f;return this.a=e,this.b=t,this.c=n,this.d=i,this.e=a,this.f=r,this}},{key:"multiply",value:function(t,e,i,n,r,a){var o=this.a,s=this.b,u=this.c,l=this.d,c=o*t+u*e,h=s*t+l*e,d=o*i+u*n,f=s*i+l*n,v=o*r+u*a+this.e,p=s*r+l*a+this.f;return this.a=c,this.b=h,this.c=d,this.d=f,this.e=v,this.f=p,this}},{key:"interpolate",value:function(e,i){var n=new t;return n.a=this.a+(e.a-this.a)*i,n.b=this.b+(e.b-this.b)*i,n.c=this.c+(e.c-this.c)*i,n.d=this.d+(e.d-this.d)*i,n.e=this.e+(e.e-this.e)*i,n.f=this.f+(e.f-this.f)*i,n}},{key:"transformPoint",value:function(t,e){var i=this.a,n=this.b,r=this.c,a=this.d,o=this.e,s=this.f,u=i*a-n*r,l=a/u,c=-n/u,h=-r/u,d=i/u,f=(r*s-a*o)/u,v=-(i*s-n*o)/u,p=t.x,g=t.y;e.x=p*l+g*h+f,e.y=p*c+g*d+v}},{key:"onlyTranslate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.a===t&&0===this.b&&0===this.c&&this.d===t}},{key:"clone",value:function(){return new t(this.a,this.b,this.c,this.d,this.e,this.f)}},{key:"toTransformAttrs",value:function(){var t=this.a,e=this.b,i=this.c,n=this.d,r=t*n-e*i,a={x:this.e,y:this.f,rotateDeg:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!==t||0!==e){var o=Math.sqrt(t*t+e*e);a.rotateDeg=e>0?Math.acos(t/o):-Math.acos(t/o),a.scaleX=o,a.scaleY=r/o,a.skewX=(t*i+e*n)/r,a.skewY=0}else if(0!==i||0!==n){var s=Math.sqrt(i*i+n*n);a.rotateDeg=Math.PI/2-(n>0?Math.acos(-i/s):-Math.acos(i/s)),a.scaleX=r/s,a.scaleY=s,a.skewX=0,a.skewY=(t*i+e*n)/r}return a.rotateDeg=180*a.rotateDeg/Math.PI,a}}])}();var Ge=function(){return u((function t(){o(this,t),this.CLEAN_THRESHOLD=1e3,this.L_TIME=1e3,this.R_COUNT=1,this.R_TIMESTAMP_MAX_SIZE=20}),[{key:"clearCache",value:function(t,e){var i=e.CLEAN_THRESHOLD,n=void 0===i?this.CLEAN_THRESHOLD:i,r=e.L_TIME,a=void 0===r?this.L_TIME:r,o=e.R_COUNT,s=void 0===o?this.R_COUNT:o;if(t.size<n)return 0;var u=0,l=function(e){u++,t.delete(e)},c=Date.now();return t.forEach((function(t,e){if(t.timestamp.length<s)return l(e);for(var i=0;c-t.timestamp[t.timestamp.length-1-i]<a&&!(++i>=s););if(i<s)return l(e);for(;c-t.timestamp[0]>a;)t.timestamp.shift()})),u}},{key:"addLimitedTimestamp",value:function(t,e,i){var n=i.R_TIMESTAMP_MAX_SIZE,r=void 0===n?this.R_TIMESTAMP_MAX_SIZE:n;t.timestamp.length>r&&t.timestamp.shift(),t.timestamp.push(e)}},{key:"clearTimeStamp",value:function(t,e){var i=e.L_TIME,n=void 0===i?this.L_TIME:i,r=Date.now();t.forEach((function(t){for(;r-t.timestamp[0]>n;)t.timestamp.shift()}))}},{key:"clearItemTimestamp",value:function(t,e){for(var i=e.L_TIME,n=void 0===i?this.L_TIME:i,r=Date.now();r-t.timestamp[0]>n;)t.timestamp.shift()}}])}();function Ue(t,e,i){e/=100,i/=100;var n=(1-Math.abs(2*i-1))*e,r=n*(1-Math.abs(t/60%2-1)),a=i-n/2,o=0,s=0,u=0;return 0<=t&&t<60?(o=n,s=r,u=0):60<=t&&t<120?(o=r,s=n,u=0):120<=t&&t<180?(o=0,s=n,u=r):180<=t&&t<240?(o=0,s=r,u=n):240<=t&&t<300?(o=r,s=0,u=n):300<=t&&t<360&&(o=n,s=0,u=r),{r:o=Math.round(255*(o+a)),g:s=Math.round(255*(s+a)),b:u=Math.round(255*(u+a))}}function We(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),a=r-n,o=0,s=0;return o=0===a?0:r===t?(e-i)/a%6:r===e?(i-t)/a+2:(t-e)/a+4,(o=Math.round(60*o))<0&&(o+=360),s=(r+n)/2,{h:o,s:+(100*(0===a?0:a/(1-Math.abs(2*s-1)))).toFixed(1),l:s=+(100*s).toFixed(1)}}var Ve=/^#([0-9a-f]{3,8})$/,He={transparent:4294967040},Xe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ye(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ke(t){return St(t)?new si(t>>16,t>>8&255,255&t,1):_t(t)?new si(t[0],t[1],t[2]):new si(255,255,255)}function qe(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Ze(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}var Je,$e,Qe,ti,ei,ii,ni,ri,ai,oi=function(){function t(e){o(this,t);var i=t.parseColorString(e);i?this.color=i:(console.warn("Warn: 传入".concat(e,"无法解析为Color")),this.color=new si(255,255,255))}return u(t,[{key:"toRGBA",value:function(){return this.color.formatRgb()}},{key:"toString",value:function(){return this.color.formatRgb()}},{key:"toHex",value:function(){return this.color.formatHex()}},{key:"toHsl",value:function(){return this.color.formatHsl()}},{key:"brighter",value:function(t){var e=this.color,i=e.r,n=e.g,r=e.b;return this.color.r=Math.max(0,Math.min(255,Math.floor(i*t))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t))),this.color.b=Math.max(0,Math.min(255,Math.floor(r*t))),this}},{key:"add",value:function(t){var e=this.color,i=e.r,n=e.g,r=e.b;return this.color.r+=Math.min(255,i+t.color.r),this.color.g+=Math.min(255,n+t.color.g),this.color.b+=Math.min(255,r+t.color.b),this}},{key:"sub",value:function(t){return this.color.r=Math.max(0,this.color.r-t.color.r),this.color.g=Math.max(0,this.color.g-t.color.g),this.color.b=Math.max(0,this.color.b-t.color.b),this}},{key:"multiply",value:function(t){var e=this.color,i=e.r,n=e.g,r=e.b;return this.color.r=Math.max(0,Math.min(255,Math.floor(i*t.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(r*t.color.b))),this}},{key:"getHSVBrightness",value:function(){return Math.max(this.color.r,this.color.g,this.color.b)/255}},{key:"getHSLBrightness",value:function(){return.5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}},{key:"setHsl",value:function(t,e,i){var n=this.color.opacity,r=We(this.color.r,this.color.g,this.color.b),a=Ue(vt(t)?r.h:ue(t,0,360),vt(e)?r.s:e>=0&&e<=1?100*e:e,vt(i)?r.l:i<=1&&i>=0?100*i:i);return this.color=new si(a.r,a.g,a.b,n),this}},{key:"setRGB",value:function(t,e,i){return!vt(t)&&(this.color.r=t),!vt(e)&&(this.color.g=e),!vt(i)&&(this.color.b=i),this}},{key:"setHex",value:function(t){var e="".concat(t).trim().toLowerCase(),i=Ve.exec(e),n=parseInt(i[1],16),r=i[1].length;return 3===r?new si((n>>8&15)+((n>>8&15)<<4),(n>>4&15)+((n>>4&15)<<4),(15&n)+((15&n)<<4),1):6===r?Ke(n):8===r?new si(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):this}},{key:"setColorName",value:function(t){var e=Xe[t.toLowerCase()];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}},{key:"setScalar",value:function(t){return this.color.r=t,this.color.g=t,this.color.b=t,this}},{key:"setOpacity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.color.opacity=t,this}},{key:"getLuminance",value:function(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}},{key:"getLuminance2",value:function(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}},{key:"getLuminance3",value:function(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}},{key:"clone",value:function(){return new t(this.color.toString())}},{key:"copyGammaToLinear",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return this.color.r=Math.pow(t.color.r,e),this.color.g=Math.pow(t.color.g,e),this.color.b=Math.pow(t.color.b,e),this}},{key:"copyLinearToGamma",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=e>0?1/e:1;return this.color.r=Math.pow(t.color.r,i),this.color.g=Math.pow(t.color.g,i),this.color.b=Math.pow(t.color.b,i),this}},{key:"convertGammaToLinear",value:function(t){return this.copyGammaToLinear(this,t),this}},{key:"convertLinearToGamma",value:function(t){return this.copyLinearToGamma(this,t),this}},{key:"copySRGBToLinear",value:function(t){return this.color.r=qe(t.color.r),this.color.g=qe(t.color.g),this.color.b=qe(t.color.b),this}},{key:"copyLinearToSRGB",value:function(t){return this.color.r=Ze(t.color.r),this.color.g=Ze(t.color.g),this.color.b=Ze(t.color.b),this}},{key:"convertSRGBToLinear",value:function(){return this.copySRGBToLinear(this),this}},{key:"convertLinearToSRGB",value:function(){return this.copyLinearToSRGB(this),this}}],[{key:"Brighter",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===i?e:new t(e).brighter(i).toRGBA()}},{key:"SetOpacity",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===i?e:new t(e).setOpacity(i).toRGBA()}},{key:"getColorBrightness",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hsl",n=e instanceof t?e:new t(e);switch(i){case"hsv":default:return n.getHSVBrightness();case"hsl":return n.getHSLBrightness();case"lum":return n.getLuminance();case"lum2":return n.getLuminance2();case"lum3":return n.getLuminance3()}}},{key:"parseColorString",value:function(t){if(pt(He[t]))return function(t){return St(t)?new si(t>>>24,t>>>16&255,t>>>8&255,255&t):_t(t)?new si(t[0],t[1],t[2],t[3]):new si(255,255,255,1)}(He[t]);if(pt(Xe[t]))return Ke(Xe[t]);var e="".concat(t).trim().toLowerCase(),i=Ve.exec(e);if(i){var n=parseInt(i[1],16),r=i[1].length;return 3===r?new si((n>>8&15)+((n>>8&15)<<4),(n>>4&15)+((n>>4&15)<<4),(15&n)+((15&n)<<4),1):6===r?Ke(n):8===r?new si(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):void 0}if(/^(rgb|RGB|rgba|RGBA)/.test(e)){var a=e.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new si(parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10),parseFloat(a[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(e)){var o=e.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),s=Ue(parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10));return new si(s.r,s.g,s.b,parseFloat(o[3]))}}}])}(),si=function(){return u((function t(e,i,n,r){o(this,t),this.r=isNaN(+e)?255:Math.max(0,Math.min(255,+e)),this.g=isNaN(+i)?255:Math.max(0,Math.min(255,+i)),this.b=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),pt(r)?this.opacity=isNaN(+r)?1:Math.max(0,Math.min(1,+r)):this.opacity=1}),[{key:"formatHex",value:function(){return"#".concat(Ye(this.r)+Ye(this.g)+Ye(this.b)+(1===this.opacity?"":Ye(255*this.opacity)))}},{key:"formatRgb",value:function(){var t=this.opacity;return"".concat(1===t?"rgb(":"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b).concat(1===t?")":",".concat(t,")"))}},{key:"formatHsl",value:function(){var t=this.opacity,e=We(this.r,this.g,this.b),i=e.h,n=e.s,r=e.l;return"".concat(1===t?"hsl(":"hsla(").concat(i,",").concat(n,"%,").concat(r,"%").concat(1===t?")":",".concat(t,")"))}},{key:"toString",value:function(){return this.formatHex()}}])}();function ui(t,e,i){t[0]=e[0]-i[0],t[1]=e[1]-i[1]}function li(t,e,i,n){if(!function(t,e,i,n){var r,a=t[0],o=e[0],s=i[0],u=n[0];return o<a&&(r=o,o=a,a=r),u<s&&(r=u,u=s,s=r),!(o<s||u<a||(a=t[1],o=e[1],s=i[1],u=n[1],o<a&&(r=o,o=a,a=r),u<s&&(r=u,u=s,s=r),o<s||u<a))}(t,e,i,n))return!1;var r,a,o=[0,0],s=[0,0],u=[0,0];if(ui(o,e,t),ui(s,n,i),be((r=o)[0]-(a=s)[0])+be(r[1]-a[1])<1e-12)return!0;ui(u,i,t);var l=Re(u,s)/Re(o,s);return l>=0&&l<=1&&[t[0]+o[0]*l,t[1]+o[1]*l]}function ci(t,e,i){var n,r,a,o;return!(t&&e&&(i?(Je=t.x1,$e=t.x2,Qe=t.y1,ti=t.y2,ei=e.x1,ii=e.x2,ni=e.y1,ri=e.y2,Je>$e&&(n=[$e,Je],Je=n[0],$e=n[1]),Qe>ti&&(r=[ti,Qe],Qe=r[0],ti=r[1]),ei>ii&&(a=[ii,ei],ei=a[0],ii=a[1]),ni>ri&&(o=[ri,ni],ni=o[0],ri=o[1]),Je>ii||$e<ei||Qe>ri||ti<ni):t.x1>e.x2||t.x2<e.x1||t.y1>e.y2||t.y2<e.y1))}!function(t){t[t.NONE=0]="NONE",t[t.BBOX1=1]="BBOX1",t[t.BBOX2=2]="BBOX2"}(ai||(ai={}));var hi=function(t){var e=t.charCodeAt(0),i=2===t.length?t.charCodeAt(1):0,n=e;return 55296<=e&&e<=56319&&56320<=i&&i<=57343&&(n=(e&=1023)<<10|(i&=1023),n+=65536),12288===n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":8361===n||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||172===n||175===n||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":161===n||164===n||167<=n&&n<=168||170===n||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||198===n||208===n||215<=n&&n<=216||222<=n&&n<=225||230===n||232<=n&&n<=234||236<=n&&n<=237||240===n||242<=n&&n<=243||247<=n&&n<=250||252===n||254===n||257===n||273===n||275===n||283===n||294<=n&&n<=295||299===n||305<=n&&n<=307||312===n||319<=n&&n<=322||324===n||328<=n&&n<=331||333===n||338<=n&&n<=339||358<=n&&n<=359||363===n||462===n||464===n||466===n||468===n||470===n||472===n||474===n||476===n||593===n||609===n||708===n||711===n||713<=n&&n<=715||717===n||720===n||728<=n&&n<=731||733===n||735===n||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||1025===n||1040<=n&&n<=1103||1105===n||8208===n||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||8240===n||8242<=n&&n<=8243||8245===n||8251===n||8254===n||8308===n||8319===n||8321<=n&&n<=8324||8364===n||8451===n||8453===n||8457===n||8467===n||8470===n||8481<=n&&n<=8482||8486===n||8491===n||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||8585===n||8592<=n&&n<=8601||8632<=n&&n<=8633||8658===n||8660===n||8679===n||8704===n||8706<=n&&n<=8707||8711<=n&&n<=8712||8715===n||8719===n||8721===n||8725===n||8730===n||8733<=n&&n<=8736||8739===n||8741===n||8743<=n&&n<=8748||8750===n||8756<=n&&n<=8759||8764<=n&&n<=8765||8776===n||8780===n||8786===n||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||8853===n||8857===n||8869===n||8895===n||8978===n||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||9675===n||9678<=n&&n<=9681||9698<=n&&n<=9701||9711===n||9733<=n&&n<=9734||9737===n||9742<=n&&n<=9743||9748<=n&&n<=9749||9756===n||9758===n||9792===n||9794===n||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||9839===n||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||9955===n||9960<=n&&n<=9983||10045===n||10071===n||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||65533===n||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"};var di=function(){function t(e,i){o(this,t),this._numberCharSize=null,this._fullCharSize=null,this._letterCharSize=null,this._specialCharSizeMap={},this._canvas=null,this._context=null,this._contextSaved=!1,this._notSupportCanvas=!1,this._notSupportVRender=!1,this._userSpec={},this.specialCharSet="-/: .,@%'\"~",this._option=e,this._userSpec=null!=i?i:{},this.textSpec=this._initSpec(),pt(e.specialCharSet)&&(this.specialCharSet=e.specialCharSet),this._standardMethod=pt(e.getTextBounds)?this.fullMeasure.bind(this):this.measureWithNaiveCanvas.bind(this)}return u(t,[{key:"initContext",value:function(){if(this._notSupportCanvas)return!1;if(vt(this._canvas)&&(pt(this._option.getCanvasForMeasure)&&(this._canvas=this._option.getCanvasForMeasure()),vt(this._canvas)&&"undefined"!=typeof window&&void 0!==window.document&&globalThis&&pt(globalThis.document)&&(this._canvas=globalThis.document.createElement("canvas"))),vt(this._context)&&pt(this._canvas)){var t=this._canvas.getContext("2d");pt(t)&&(t.save(),t.font=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.fontStyle,n=void 0===i?e.fontStyle:i,r=t.fontVariant,a=void 0===r?e.fontVariant:r,o=t.fontWeight,s=void 0===o?e.fontWeight:o,u=t.fontSize,l=void 0===u?e.fontSize:u,c=t.fontFamily;return(n?n+" ":"")+(a?a+" ":"")+(s?s+" ":"")+l+"px "+((void 0===c?e.fontFamily:c)||"sans-serif")}(this.textSpec),this._contextSaved=!0,this._context=t)}return!vt(this._context)||(this._notSupportCanvas=!0,!1)}},{key:"_initSpec",value:function(){var t,e,i,n=this._option.defaultFontParams,r=void 0===n?{}:n,a=this._userSpec,o=a.fontStyle,s=void 0===o?r.fontStyle:o,u=a.fontVariant,l=void 0===u?r.fontVariant:u,c=a.fontWeight,h=void 0===c?null!==(t=r.fontWeight)&&void 0!==t?t:"normal":c,d=a.fontSize,f=void 0===d?null!==(e=r.fontSize)&&void 0!==e?e:12:d,v=a.fontFamily,p=void 0===v?null!==(i=r.fontFamily)&&void 0!==i?i:"sans-serif":v,g=a.align,y=a.textAlign,m=void 0===y?null!=g?g:"center":y,k=a.baseline,b=a.textBaseline,_=void 0===b?null!=k?k:"middle":b,x=a.ellipsis,w=a.limit,S=this._userSpec.lineHeight,A=void 0===S?f:S;if(bt(A)&&"%"===A[A.length-1]){var T=Number.parseFloat(A.substring(0,A.length-1))/100;A=f*T}return{fontStyle:s,fontVariant:l,fontFamily:p,fontSize:f,fontWeight:h,textAlign:m,textBaseline:_,ellipsis:x,limit:w,lineHeight:A}}},{key:"measure",value:function(t,e){switch(e){case"vrender":case"canopus":return this.fullMeasure(t);case"canvas":return this.measureWithNaiveCanvas(t);case"simple":return this.quickMeasureWithoutCanvas(t);default:return this.quickMeasure(t)}}},{key:"fullMeasure",value:function(t){if(vt(t))return{width:0,height:0};if(vt(this._option.getTextBounds)||!this._notSupportVRender)return this.measureWithNaiveCanvas(t);var e,i=this.textSpec,n=i.fontFamily,r=i.fontSize,a=i.fontWeight,o=i.textAlign,s=i.textBaseline,u=i.ellipsis,l=i.limit,c=i.lineHeight;try{var h=this._option.getTextBounds({text:t,fontFamily:n,fontSize:r,fontWeight:a,textAlign:o,textBaseline:s,ellipsis:!!u,maxLineWidth:l||1/0,lineHeight:c});e={width:h.width(),height:h.height()}}catch(i){this._notSupportVRender=!0,e=this.measureWithNaiveCanvas(t)}return e}},{key:"measureWithNaiveCanvas",value:function(t){return this._measureReduce(t,this._measureWithNaiveCanvas.bind(this))}},{key:"_measureWithNaiveCanvas",value:function(t){var e;if(!this.initContext())return this._quickMeasureWithoutCanvas(t);var i=this._context.measureText(t),n=this.textSpec,r=n.fontSize,a=n.lineHeight;return{width:i.width,height:null!==(e=a)&&void 0!==e?e:r}}},{key:"quickMeasure",value:function(t){return this._measureReduce(t,this._quickMeasure.bind(this))}},{key:"_quickMeasure",value:function(e){for(var i={width:0,height:0},n=0;n<e.length;n++){var r=e[n],a=this._measureSpecialChar(r);vt(a)&&t.NUMBERS_CHAR_SET.includes(r)&&(a=this._measureNumberChar()),vt(a)&&["F","W"].includes(hi(r))&&(a=this._measureFullSizeChar()),vt(a)&&(a=this._measureLetterChar()),i.width+=a.width,i.height=Math.max(i.height,a.height)}return i}},{key:"quickMeasureWithoutCanvas",value:function(t){return this._measureReduce(t,this._quickMeasureWithoutCanvas.bind(this))}},{key:"_quickMeasureWithoutCanvas",value:function(t){for(var e,i={width:0,height:0},n=this.textSpec,r=n.fontSize,a=n.lineHeight,o=0;o<t.length;o++){var s=t[o],u=["F","W"].includes(hi(s))?1:.53;i.width+=u*r}return i.height=null!==(e=a)&&void 0!==e?e:r,i}},{key:"_measureReduce",value:function(t,e){var i,n=this.textSpec,r=n.fontSize,a=n.lineHeight,o={width:0,height:0};if(vt(t))return o;if(_t(t)){var s=t.filter(pt).map((function(t){return t.toString()}));return 0===s.length?o:1===s.length?e(s[0]):{width:s.reduce((function(t,i){return Math.max(t,e(i).width)}),0),height:s.length*((null!==(i=a)&&void 0!==i?i:r)+1)+1}}return e(t.toString())}},{key:"_measureNumberChar",value:function(){if(vt(this._numberCharSize)){var e=this._standardMethod(t.NUMBERS_CHAR_SET);this._numberCharSize={width:e.width/t.NUMBERS_CHAR_SET.length,height:e.height}}return this._numberCharSize}},{key:"_measureFullSizeChar",value:function(){return vt(this._fullCharSize)&&(this._fullCharSize=this._standardMethod(t.FULL_SIZE_CHAR)),this._fullCharSize}},{key:"_measureLetterChar",value:function(){if(vt(this._letterCharSize)){var e=this._standardMethod(t.ALPHABET_CHAR_SET);this._letterCharSize={width:e.width/t.ALPHABET_CHAR_SET.length,height:e.height}}return this._letterCharSize}},{key:"_measureSpecialChar",value:function(t){return pt(this._specialCharSizeMap[t])?this._specialCharSizeMap[t]:this.specialCharSet.includes(t)?(this._specialCharSizeMap[t]=this._standardMethod(t),this._specialCharSizeMap[t]):null}},{key:"release",value:function(){pt(this._canvas)&&(this._canvas=null),pt(this._context)&&(this._contextSaved&&(this._context.restore(),this._contextSaved=!1),this._context=null)}}])}();di.ALPHABET_CHAR_SET="abcdefghijklmnopqrstuvwxyz",di.NUMBERS_CHAR_SET="0123456789",di.FULL_SIZE_CHAR="字";function fi(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t)return{width:i,height:n};try{e=null===window||void 0===window?void 0:window.getComputedStyle}catch(t){e=function(){return{}}}var r=e(t);if(/^(\d*\.?\d+)(px)$/.exec(r.width)){var a=parseFloat(r.width)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)||t.clientWidth-1,o=parseFloat(r.height)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)||t.clientHeight-1;return{width:a<=0?i:a,height:o<=0?n:o}}return{width:i,height:n}}var vi,pi,gi,yi,mi,ki,bi,_i,xi,wi,Si,Ai,Ti,Ei,Ci,Bi=function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()},Mi=me-1e-8,Ri=function(){return u((function t(e){o(this,t),this.init(e)}),[{key:"init",value:function(t){this.bounds=t}},{key:"arc",value:function(t,e,i,n,r,a){if(Math.abs(r-n)>Mi)return this.bounds.add(t-i,e-i),void this.bounds.add(t+i,e+i);var o,s,u,l,c=1/0,h=-1/0,d=1/0,f=-1/0;function v(t){u=i*Math.cos(t),l=i*Math.sin(t),u<c&&(c=u),u>h&&(h=u),l<d&&(d=l),l>f&&(f=l)}if(v(n),v(r),r!==n)if((n%=me)<0&&(n+=me),(r%=me)<0&&(r+=me),r<n&&(a=!a,o=n,n=r,r=o),a)for(r-=me,o=n-n%ye,s=0;s<4&&o>r;++s,o-=ye)v(o);else for(o=n-n%ye+ye,s=0;s<4&&o<r;++s,o+=ye)v(o);this.bounds.add(t+c,e+d),this.bounds.add(t+h,e+f)}},{key:"arcTo",value:function(t,e,i,n,r){throw new Error("不支持arcTo")}},{key:"bezierCurveTo",value:function(t,e,i,n,r,a){this.bounds.add(t,e),this.bounds.add(i,n),this.bounds.add(r,a)}},{key:"closePath",value:function(){}},{key:"ellipse",value:function(){throw new Error("不支持ellipse")}},{key:"lineTo",value:function(t,e){this.bounds.add(t,e)}},{key:"moveTo",value:function(t,e){this.bounds.add(t,e)}},{key:"quadraticCurveTo",value:function(t,e,i,n){this.bounds.add(t,e),this.bounds.add(i,n)}},{key:"rect",value:function(t,e,i,n){this.bounds.add(t,e),this.bounds.add(t+i,e+n)}},{key:"clear",value:function(){this.bounds.clear()}},{key:"release",value:function(){}}])}(),Pi=function(){return u((function t(){o(this,t),this.curves=[],this.bounds=new De}),[{key:"getCurveLengths",value:function(){return this.curves.map((function(t){return t.getLength()}))}},{key:"getPointAt",value:function(t){return{x:0,y:0}}},{key:"getLength",value:function(){return 0}},{key:"getBounds",value:function(){return this.bounds}}])}(),Oi=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,Ii={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},Li={A:0,AT:1,C:2,Z:3,E:4,L:5,M:6,Q:7,R:8};function Di(t,e,i,n){for(var r,a,o,s,u,l,c,h,d,f,v,p,g,y,m,k,b,_,x,w,S,A,T,E,C,B,M=function(t,e,i,n,r,a,o,s,u){var l=je(o),c=Math.sin(l),h=Math.cos(l),d=h*(s-t)*.5+c*(u-e)*.5,f=h*(u-e)*.5-c*(s-t)*.5,v=d*d/((i=Math.abs(i))*i)+f*f/((n=Math.abs(n))*n);v>1&&(i*=v=Math.sqrt(v),n*=v);var p=h/i,g=c/i,y=-c/n,m=h/n,k=p*s+g*u,b=y*s+m*u,_=p*t+g*e,x=y*t+m*e,w=1/((_-k)*(_-k)+(x-b)*(x-b))-.25;w<0&&(w=0);var S=Math.sqrt(w);a===r&&(S=-S);var A=.5*(k+_)-S*(x-b),T=.5*(b+x)+S*(_-k),E=Math.atan2(b-T,k-A),C=Math.atan2(x-T,_-A)-E;C<0&&1===a?C+=me:C>0&&0===a&&(C-=me);for(var B=Math.ceil(Math.abs(C/(ye+.001))),M=[],R=0;R<B;++R){var P=E+R*C/B,O=E+(R+1)*C/B;M[R]=[A,T,P,O,i,n,c,h]}return M}(n[5],n[6],n[0],n[1],n[3],n[4],n[2],e,i),R=0;R<M.length;++R){var P=(r=M[R],a=void 0,o=void 0,s=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,f=void 0,v=void 0,p=void 0,g=void 0,y=void 0,m=void 0,k=void 0,b=void 0,_=void 0,x=void 0,w=void 0,S=void 0,A=void 0,T=void 0,E=void 0,C=void 0,B=void 0,a=r[0],o=r[1],s=r[2],u=r[3],l=r[4],c=r[5],h=r[6],d=r[7],f=d*l,v=-h*c,p=h*l,g=d*c,y=Math.cos(s),m=Math.sin(s),k=Math.cos(u),b=Math.sin(u),_=.5*(u-s),x=Math.sin(.5*_),w=8/3*x*x/Math.sin(_),[f*(S=a+y-w*m)+v*(A=o+m+w*y),p*S+g*A,f*(C=(T=a+k)+w*b)+v*(B=(E=o+b)-w*k),p*C+g*B,f*T+v*E,p*T+g*E]);t.bezierCurveTo(P[0],P[1],P[2],P[3],P[4],P[5])}}!function(t){t[t.NONE=0]="NONE",t[t.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",t[t.UPDATE_SHAPE=2]="UPDATE_SHAPE",t[t.CLEAR_SHAPE=253]="CLEAR_SHAPE",t[t.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",t[t.INIT=179]="INIT",t[t.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",t[t.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",t[t.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",t[t.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",t[t.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",t[t.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",t[t.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",t[t.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"}(bi||(bi={})),function(t){t[t.GLOBAL=1]="GLOBAL",t[t.LOCAL=16]="LOCAL",t[t.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",t[t.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"}(_i||(_i={})),function(t){t[t.INIT=0]="INIT",t[t.DEFAULT=1]="DEFAULT",t[t.STATE=2]="STATE",t[t.ANIMATE_BIND=10]="ANIMATE_BIND",t[t.ANIMATE_PLAY=11]="ANIMATE_PLAY",t[t.ANIMATE_START=12]="ANIMATE_START",t[t.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",t[t.ANIMATE_END=14]="ANIMATE_END",t[t.TRANSLATE=20]="TRANSLATE",t[t.TRANSLATE_TO=21]="TRANSLATE_TO",t[t.SCALE=22]="SCALE",t[t.SCALE_TO=23]="SCALE_TO",t[t.ROTATE=24]="ROTATE",t[t.ROTATE_TO=25]="ROTATE_TO"}(xi||(xi={})),function(t){t[t.INITIAL=0]="INITIAL",t[t.RUNNING=1]="RUNNING",t[t.PAUSED=2]="PAUSED",t[t.END=3]="END"}(wi||(wi={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SET_ATTR_IMMEDIATELY=1]="SET_ATTR_IMMEDIATELY"}(Si||(Si={})),function(t){t.wait="wait",t.from="from",t.to="to",t.customAnimate="customAnimate"}(Ai||(Ai={})),function(t){t[t.ROW=1]="ROW",t[t.COLUMN=2]="COLUMN"}(Ti||(Ti={})),function(t){t[t.CubicBezierCurve=0]="CubicBezierCurve",t[t.QuadraticBezierCurve=1]="QuadraticBezierCurve",t[t.ArcCurve=2]="ArcCurve",t[t.LineCurve=3]="LineCurve",t[t.EllipseCurve=4]="EllipseCurve",t[t.MoveCurve=5]="MoveCurve"}(Ei||(Ei={})),function(t){t[t.beforeFillStroke=0]="beforeFillStroke",t[t.afterFillStroke=1]="afterFillStroke"}(Ci||(Ci={}));var ji=function(t,e,i,n,r,a,o){var s=Math.abs(i-e),u=4*Math.tan(s/4)/3,l=i<e?-1:1,c=Math.cos(e),h=Math.sin(e),d=Math.cos(i),f=Math.sin(i),v=c*a+n,p=h*o+r,g=d*a+n,y=f*o+r,m=a*u*l,k=o*u*l;t.push(v-m*h,p+k*c,g+m*f,y-k*d,g,y)},Fi=[function(t,e,i,n,r,a,o){return e.arc(t[1]*r+i,t[2]*a+n,t[3]*(r+a)/2,t[4],t[5],t[6],o)},function(t,e,i,n,r,a,o){return e.arcTo(t[1]*r+i,t[2]*a+n,t[3]*r+i,t[4]*a+n,t[5]*(r+a)/2,o)},function(t,e,i,n,r,a,o){return e.bezierCurveTo(t[1]*r+i,t[2]*a+n,t[3]*r+i,t[4]*a+n,t[5]*r+i,t[6]*a+n,o)},function(t,e,i,n){return e.closePath()},function(t,e,i,n,r,a){return e.ellipse(t[1]*r+i,t[2]*a+n,t[3]*r,t[4]*a,t[5],t[6],t[7],t[8])},function(t,e,i,n,r,a,o){return e.lineTo(t[1]*r+i,t[2]*a+n,o)},function(t,e,i,n,r,a,o){return e.moveTo(t[1]*r+i,t[2]*a+n,o)},function(t,e,i,n,r,a,o){return e.quadraticCurveTo(t[1]*r+i,t[2]*a+n,t[3]*r+i,t[4]*a+n,o)},function(t,e,i,n,r,a,o){return e.rect(t[1]*r+i,t[2]*a+n,t[3]*r,t[4]*a,o)}];function Ni(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6?arguments[6]:void 0,s=0;s<t.length;s++){var u=t[s];Fi[u[0]](u,e,i,n,r,a,o)}}var zi=function(){return u((function t(){o(this,t)}),[{key:"getLength",value:function(t){return null!=t?this.calcProjLength(t):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}])}();function Gi(t,e,i,n,r){return function(t,e){for(var i=0,n=t.length,r=0;r<n;r++){var a=t[r],o=e[r],s=t[(r+1)%n],u=e[(r+1)%n];i+=Oe.distanceNN(a,o,s,u)}return i/2}([t.x,e.x,i.x,n.x],[t.y,e.y,i.y,n.y])}function Ui(t,e,i,n,r){var a=1-r;return a*a*a*t+3*e*r*a*a+3*i*r*r*a+n*r*r*r}function Wi(t,e,i,n,r){var a=Ui(t.x,e.x,i.x,n.x,r),o=Ui(t.y,e.y,i.y,n.y,r);return new Pe(a,o)}function Vi(t,e){var i=t.p0,n=t.p1,r=t.p2,a=t.p3,o=Wi(i,n,r,a,e),s=Oe.pointAtPP(i,n,e),u=Oe.pointAtPP(n,r,e),l=Oe.pointAtPP(r,a,e),c=Oe.pointAtPP(s,u,e),h=Oe.pointAtPP(u,l,e);return[new Hi(i,s,c,o),new Hi(o,h,l,a)]}var Hi=function(t){function i(t,n,r,a){var s;return o(this,i),(s=e(this,i)).type=Ei.CubicBezierCurve,s.p0=t,s.p1=n,s.p2=r,s.p3=a,s}return c(i,t),u(i,[{key:"_validPoint",value:function(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}},{key:"getPointAt",value:function(t){if(!1!==this.defined)return Wi(this.p0,this.p1,this.p2,this.p3,t);throw new Error("defined为false的点不能getPointAt")}},{key:"calcLength",value:function(){return this._validPoint()?Gi(this.p0,this.p1,this.p2,this.p3):60}},{key:"calcProjLength",value:function(t){return t===Ti.ROW?be(this.p0.x-this.p3.x):t===Ti.COLUMN?be(this.p0.y-this.p3.y):0}},{key:"getAngleAt",value:function(t){var e=we(t-.01,0),i=Se(t+.01,1),n=this.getPointAt(e),r=this.getPointAt(i);return _e(r.y-n.y,r.x-n.x)}}])}(zi);function Xi(t,e){var i=t.p0,n=t.p1,r=Oe.pointAtPP(i,n,e);return[new Yi(i,r),new Yi(r,n)]}var Yi=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i)).type=Ei.LineCurve,r.p0=t,r.p1=n,r}return c(i,t),u(i,[{key:"getPointAt",value:function(t){if(!1!==this.defined)return Oe.pointAtPP(this.p0,this.p1,t);throw new Error("defined为false的点不能getPointAt")}},{key:"getAngleAt",value:function(t){return null==this.angle&&(this.angle=_e(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}},{key:"_validPoint",value:function(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}},{key:"calcLength",value:function(){return this._validPoint()?Oe.distancePP(this.p0,this.p1):60}},{key:"calcProjLength",value:function(t){return t===Ti.ROW?be(this.p0.x-this.p1.x):t===Ti.COLUMN?be(this.p0.y-this.p1.y):0}}])}(zi),Ki=function(){return u((function t(e,i){o(this,t),this.init(e,i)}),[{key:"endX",get:function(){return this._lastX}},{key:"endY",get:function(){return this._lastY}},{key:"init",value:function(t,e){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=t,this.direction=e,this.curves=[]}},{key:"bezierCurveTo",value:function(t,e,i,n,r,a,o,s){var u=new Hi(new Pe(this._lastX,this._lastY),new Pe(t,e),new Pe(i,n),new Pe(r,a));u.originP1=this._lastOriginP,u.originP2=s,u.defined=o,this.curves.push(u),this._lastX=r,this._lastY=a,this._lastOriginP=s}},{key:"closePath",value:function(){if(!(this.curves.length<2)){var t=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,t.defined,this._startOriginP)}}},{key:"ellipse",value:function(){throw new Error("SegContext不支持调用ellipse")}},{key:"lineTo",value:function(t,e,i,n){var r=this.addLinearCurve(t,e,i,this._lastOriginP,n);this.curves.push(r),this._lastX=t,this._lastY=e,this._lastOriginP=n}},{key:"moveTo",value:function(t,e,i){return this._lastX=this._startX=t,this._lastY=this._startY=e,this._lastOriginP=i,this._startOriginP=i,this}},{key:"quadraticCurveTo",value:function(t,e,i,n){throw new Error("SegContext不支持调用quadraticCurveTo")}},{key:"clear",value:function(){this.curves=[],this.length=NaN}},{key:"tryUpdateLength",value:function(t){return this.getLength(t)}},{key:"addLinearCurve",value:function(t,e,i,n,r){var a=new Yi(new Pe(this._lastX,this._lastY),new Pe(t,e));return a.originP1=n,a.originP2=r,a.defined=i,a}},{key:"getPointAt",value:function(t){throw new Error("暂未实现")}},{key:"getCurveLengths",value:function(){return[]}},{key:"getLength",value:function(t){var e,i;if(t===Ti.COLUMN){if(!this.curves.length)return 0;var n=this.curves[0],r=this.curves[this.curves.length-1],a=null!==(e=r.p3)&&void 0!==e?e:r.p1;return be(n.p0.y-a.y)}if(t===Ti.ROW){if(!this.curves.length)return 0;var o=this.curves[0],s=this.curves[this.curves.length-1],u=null!==(i=s.p3)&&void 0!==i?i:s.p1;return be(o.p0.x-u.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce((function(t,e){return t+e.getLength()}),0)),this.length}}])}(),qi=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"bezierCurveTo",value:function(t,e,n,r,a,o,s,u){return p(h(i.prototype),"bezierCurveTo",this).call(this,e,t,r,n,o,a,s,u)}},{key:"lineTo",value:function(t,e,n,r){return p(h(i.prototype),"lineTo",this).call(this,e,t,n,r)}},{key:"moveTo",value:function(t,e,n){return p(h(i.prototype),"moveTo",this).call(this,e,t,n)}},{key:"clear",value:function(){return p(h(i.prototype),"clear",this).call(this)}}])}(Ki);function Zi(t,e){for(var i=!1,n=0,r=e.length;n<=r;n++)n>=r===i&&((i=!i)?t.lineStart():t.lineEnd()),i&&t.point(e[n])}function Ji(t,e,i){var n=null!=e?e:be(i[i.length-1].x-i[0].x)>be(i[i.length-1].y-i[0].y)?Ti.ROW:Ti.COLUMN;return"monotoneY"===t?new qi(t,n):new Ki(t,n)}var $i=function(){return u((function t(e,i){o(this,t),this.context=e,i&&(this.startPoint=i)}),[{key:"areaStart",value:function(){this._line=0}},{key:"areaEnd",value:function(){this._line=NaN}},{key:"lineStart",value:function(){this._point=0,this.startPoint&&this.point(this.startPoint)}},{key:"lineEnd",value:function(){(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}},{key:"point",value:function(t){var e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;default:this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t)}this._lastDefined=t.defined}},{key:"tryUpdateLength",value:function(){return this.context.tryUpdateLength()}}])}();function Qi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.direction,n=e.startPoint;if(t.length<2-Number(!!n))return null;var r=Ji("linear",i,t);return function(t,e){Zi(t,e)}(new $i(r,n),t),r}function tn(t,e,i,n,r){t.context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6,n,t.lastPoint1)}var en=function(){return u((function t(e,i){o(this,t),this.context=e,this.startPoint=i}),[{key:"areaStart",value:function(){this._line=0}},{key:"areaEnd",value:function(){this._line=NaN}},{key:"lineStart",value:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}},{key:"lineEnd",value:function(){2===this._point&&tn(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}},{key:"point",value:function(t){var e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;break;default:tn(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}},{key:"tryUpdateLength",value:function(){return this.context.tryUpdateLength()}}])}();function nn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.direction,n=e.startPoint;if(t.length<2-Number(!!n))return null;if(t.length<3-Number(!!n))return Qi(t,e);var r=Ji("basis",i,t);return function(t,e){Zi(t,e)}(new en(r,n),t),r}function rn(t){return t<0?-1:1}function an(t,e,i){var n=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(n||Number(r<0&&-0)),o=(i-t._y1)/(r||Number(n<0&&-0)),s=(a*r+o*n)/(n+r);return(rn(a)+rn(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function on(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function sn(t,e,i,n,r){var a=t._x0,o=t._y0,s=t._x1,u=t._y1,l=(s-a)/3;t.context.bezierCurveTo(a+l,o+l*e,s-l,u-l*i,s,u,n,t.lastPoint1)}var un=function(){return u((function t(e,i){o(this,t),this.context=e,this.startPoint=i}),[{key:"areaStart",value:function(){this._line=0}},{key:"areaEnd",value:function(){this._line=NaN}},{key:"lineStart",value:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}},{key:"lineEnd",value:function(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:sn(this,this._t0,on(this,this._t0),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1)}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}},{key:"point",value:function(t){var e=NaN,i=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(i,n,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(i,n,t);break;case 1:this._point=2;break;case 2:this._point=3,sn(this,on(this,e=an(this,i,n)),e,!1!==this._lastDefined1&&!1!==this._lastDefined2);break;default:sn(this,this._t0,e=an(this,i,n),!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=n,this._t0=e,this._lastDefined1=this._lastDefined2,this._lastDefined2=!1!==t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}},{key:"tryUpdateLength",value:function(){return this.context.tryUpdateLength()}}])}(),ln=function(t){function i(t,n){return o(this,i),e(this,i,[t,n])}return c(i,t),u(i,[{key:"point",value:function(t){return p(h(i.prototype),"point",this).call(this,{y:t.x,x:t.y,defined:t.defined})}}])}(un);function cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.direction,n=e.startPoint;if(t.length<2-Number(!!n))return null;if(t.length<3-Number(!!n))return Qi(t,e);var r=Ji("monotoneX",i,t);return function(t,e){Zi(t,e)}(new un(r,n),t),r}function hn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.direction,n=e.startPoint;if(t.length<2-Number(!!n))return null;if(t.length<3-Number(!!n))return Qi(t,e);var r=Ji("monotoneY",i,t);return function(t,e){Zi(t,e)}(new ln(r,n),t),r}var dn=function(){return u((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2?arguments[2]:void 0;o(this,t),this.context=e,this._t=i,this.startPoint=n}),[{key:"areaStart",value:function(){this._line=0}},{key:"areaEnd",value:function(){this._line=NaN}},{key:"lineStart",value:function(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}},{key:"lineEnd",value:function(){0<this._t&&this._t<1&&2===this._point&&this.context.lineTo(this._x,this._y,!1!==this._lastDefined,this.lastPoint),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}},{key:"point",value:function(t){var e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,i,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t);else{var n=this._x*(1-this._t)+e*this._t;this.context.lineTo(n,this._y,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(n,i,!1!==this._lastDefined&&!1!==t.defined,t)}}this._lastDefined=t.defined,this._x=e,this._y=i,this.lastPoint=t}},{key:"tryUpdateLength",value:function(){return this.context.tryUpdateLength()}}])}();function fn(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.direction,r=i.startPoint;if(t.length<2-Number(!!r))return null;var a=new Ki("step",null!=n?n:be(t[t.length-1].x-t[0].x)>be(t[t.length-1].y-t[0].y)?Ti.ROW:Ti.COLUMN);return function(t,e){Zi(t,e)}(new dn(a,e,r),t),a}var vn=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"lineEnd",value:function(){this.context.closePath()}}])}($i);function pn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.direction,n=e.startPoint;if(t.length<2-Number(!!n))return null;var r=Ji("linear",i,t);return function(t,e){Zi(t,e)}(new vn(r,n),t),r}function gn(t,e,i){switch(e){case"linear":default:return Qi(t,i);case"basis":return nn(t,i);case"monotoneX":return cn(t,i);case"monotoneY":return hn(t,i);case"step":return fn(t,.5,i);case"stepBefore":return fn(t,0,i);case"stepAfter":return fn(t,1,i);case"linearClosed":return pn(t,i)}}var yn=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).commandList=[],t&&(n._ctx=t),n._boundsContext=new Ri(n.bounds),n}return c(i,t),u(i,[{key:"setCtx",value:function(t){this._ctx=t}},{key:"moveTo",value:function(t,e){return this.commandList.push([Li.M,t,e]),this._ctx&&this._ctx.moveTo(t,e),this}},{key:"lineTo",value:function(t,e){return this.commandList.push([Li.L,t,e]),this._ctx&&this._ctx.lineTo(t,e),this}},{key:"quadraticCurveTo",value:function(t,e,i,n){return this.commandList.push([Li.Q,t,e,i,n]),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this}},{key:"bezierCurveTo",value:function(t,e,i,n,r,a){return this.commandList.push([Li.C,t,e,i,n,r,a]),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,r,a),this}},{key:"arcTo",value:function(t,e,i,n,r){return this.commandList.push([Li.AT,t,e,i,n,r]),this._ctx&&this._ctx.arcTo(t,e,i,n,r),this}},{key:"ellipse",value:function(t,e,i,n,r,a,o,s){return this.commandList.push([Li.E,t,e,i,n,r,a,o,s]),this._ctx&&this._ctx.ellipse(t,e,i,n,r,a,o,s),this}},{key:"rect",value:function(t,e,i,n){return this.commandList.push([Li.R,t,e,i,n]),this._ctx&&this._ctx.rect(t,e,i,n),this}},{key:"arc",value:function(t,e,i,n,r,a){return this.commandList.push([Li.A,t,e,i,n,r,a]),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this}},{key:"closePath",value:function(){return this.commandList.push([Li.Z]),this._ctx&&this._ctx.closePath(),this}},{key:"addCurve",value:function(t){this.curves.push(t)}},{key:"clear",value:function(){this.transformCbList=null,this.commandList.length=0,this.curves.length=0}},{key:"beginPath",value:function(){this.clear()}},{key:"toString",value:function(){if(!this.toStringCbList){var t=[];t[Li.M]=function(t){return"M".concat(t[1]," ").concat(t[2])},t[Li.L]=function(t){return"L".concat(t[1]," ").concat(t[2])},t[Li.Q]=function(t){return"Q".concat(t[1]," ").concat(t[2]," ").concat(t[3]," ").concat(t[4])},t[Li.C]=function(t){return"C".concat(t[1]," ").concat(t[2]," ").concat(t[3]," ").concat(t[4]," ").concat(t[5]," ").concat(t[6])},t[Li.A]=function(t){var e=[];ji(e,t[4],t[5],t[1],t[2],t[3],t[3]);for(var i="",n=0;n<e.length;n+=6)i+="C".concat(e[n]," ").concat(e[n+1]," ").concat(e[n+2]," ").concat(e[n+3]," ").concat(e[n+4]," ").concat(e[n+5]);return i},t[Li.R]=function(t){return"M".concat(t[1]," ").concat(t[2]," h").concat(t[3]," v").concat(t[4]," H").concat(t[1],"Z")},t[Li.Z]=function(t){return"Z"},this.toStringCbList=t}var e=this.toStringCbList,i="";return this.commandList.forEach((function(t){i+=e[t[0]](t)})),i}},{key:"fromString",value:function(t,e,i,n,r){this.clear();var a=function(t){if(!t)return[];var e,i,n=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(null===n)return[];for(var r=[],a=0,o=n.length;a<o;a++)if(vi=n[a],pi=vi.slice(1),e=[gi=vi[0]],null!==(i=pi.match(Oi))){for(var s=0,u=i.length;s<u;s++)yi=i[s],mi=parseFloat(yi),Number.isNaN(mi)||e.push(mi);if(ki=Ii[gi],e.length-1>ki)for(var l=void 0,c=1,h=e.length;c<h;c+=ki){l=[gi];for(var d=c,f=c+ki;d<f;d++)l.push(e[d]);r.push(l)}else r.push(e)}else r.push(e);return r}(t);return this._runCommandStrList(a,e,i,n,r),this._updateBounds(),this}},{key:"fromLine",value:function(t){var e=t.attribute,i=e.points,n=e.curveType,r=e.clipRangeByDimension;if(i){var a=gn(i,n);"x"===r?this.direction=Ti.ROW:"y"===r?this.direction=Ti.COLUMN:"auto"===r&&(this.direction=a.direction),this.curves=a.curves}}},{key:"fromCustomPath2D",value:function(t,e,i,n,r){return this.clear(),this._runCommandList(t.commandList,e,i,n,r),this._updateBounds(),this}},{key:"transform",value:function(t,e,i,n){var r=this,a=this.commandList;if(!this.transformCbList){var o=[];o[Li.M]=this.moveToTransform,o[Li.L]=this.lineToTransform,o[Li.Q]=this.quadraticCurveToTransform,o[Li.C]=this.bezierCurveToTransform,o[Li.AT]=this.arcToTransform,o[Li.E]=this.ellipseTransform,o[Li.R]=this.rectTransform,o[Li.A]=this.arcTransform,o[Li.Z]=this.closePathTransform,this.transformCbList=o}a.forEach((function(a){r.transformCbList[a[0]](a,t,e,i,n)})),this._updateBounds()}},{key:"moveToTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i}},{key:"lineToTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i}},{key:"quadraticCurveToTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i,t[3]=t[3]*n+e,t[4]=t[4]*r+i}},{key:"bezierCurveToTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i,t[3]=t[3]*n+e,t[4]=t[4]*r+i,t[5]=t[5]*n+e,t[6]=t[6]*r+i}},{key:"arcToTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i,t[3]=t[3]*n+e,t[4]=t[4]*r+i,t[5]=t[5]*(n+r)/2}},{key:"ellipseTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i,t[3]=t[3]*n,t[4]=t[4]*r}},{key:"rectTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i,t[3]=t[3]*n,t[4]=t[4]*r}},{key:"arcTransform",value:function(t,e,i,n,r){t[1]=t[1]*n+e,t[2]=t[2]*r+i,t[3]=t[3]*(n+r)/2}},{key:"closePathTransform",value:function(){}},{key:"_runCommandStrList",value:function(t){for(var e,i,n,r,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,c=null,h=0,d=0,f=0,v=0,p=0,g=t.length;p<g;++p){switch(e=t[p],1===u&&1===l||(e=kn(e,u,l)),e[0]){case"l":h+=e[1],d+=e[2],this.lineTo(h+o,d+s);break;case"L":h=e[1],d=e[2],this.lineTo(h+o,d+s);break;case"h":h+=e[1],this.lineTo(h+o,d+s);break;case"H":h=e[1],this.lineTo(h+o,d+s);break;case"v":d+=e[1],this.lineTo(h+o,d+s);break;case"V":d=e[1],this.lineTo(h+o,d+s);break;case"m":h+=e[1],d+=e[2],this.moveTo(h+o,d+s);break;case"M":h=e[1],d=e[2],this.moveTo(h+o,d+s);break;case"c":i=h+e[5],n=d+e[6],f=h+e[3],v=d+e[4],this.bezierCurveTo(h+e[1]+o,d+e[2]+s,f+o,v+s,i+o,n+s),h=i,d=n;break;case"C":h=e[5],d=e[6],f=e[3],v=e[4],this.bezierCurveTo(e[1]+o,e[2]+s,f+o,v+s,h+o,d+s);break;case"s":i=h+e[3],n=d+e[4],f=2*h-f,v=2*d-v,this.bezierCurveTo(f+o,v+s,h+e[1]+o,d+e[2]+s,i+o,n+s),f=h+e[1],v=d+e[2],h=i,d=n;break;case"S":i=e[3],n=e[4],f=2*h-f,v=2*d-v,this.bezierCurveTo(f+o,v+s,e[1]+o,e[2]+s,i+o,n+s),h=i,d=n,f=e[1],v=e[2];break;case"q":i=h+e[3],n=d+e[4],f=h+e[1],v=d+e[2],this.quadraticCurveTo(f+o,v+s,i+o,n+s),h=i,d=n;break;case"Q":i=e[3],n=e[4],this.quadraticCurveTo(e[1]+o,e[2]+s,i+o,n+s),h=i,d=n,f=e[1],v=e[2];break;case"t":i=h+e[1],n=d+e[2],null===c[0].match(/[QqTt]/)?(f=h,v=d):"t"===c[0]?(f=2*h-r,v=2*d-a):"q"===c[0]&&(f=2*h-f,v=2*d-v),r=f,a=v,this.quadraticCurveTo(f+o,v+s,i+o,n+s),d=n,f=(h=i)+e[1],v=d+e[2];break;case"T":i=e[1],n=e[2],f=2*h-f,v=2*d-v,this.quadraticCurveTo(f+o,v+s,i+o,n+s),h=i,d=n;break;case"a":Di(this,h+o,d+s,[e[1],e[2],e[3],e[4],e[5],e[6]+h+o,e[7]+d+s]),h+=e[6],d+=e[7];break;case"A":Di(this,h+o,d+s,[e[1],e[2],e[3],e[4],e[5],e[6]+o,e[7]+s]),h=e[6],d=e[7];break;case"z":case"Z":this.closePath()}c=e}}},{key:"_runCommandList",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if(0!==e||0!==i||1!==n||1!==r)for(var a=0,o=t.length;a<o;++a){var s=t[a].slice();switch(s[0]){case Li.L:this.lineToTransform(s,e,i,n,r);break;case Li.M:this.moveToTransform(s,e,i,n,r);break;case Li.C:this.bezierCurveToTransform(s,e,i,n,r);break;case Li.Q:this.quadraticCurveToTransform(s,e,i,n,r);break;case Li.A:this.arcToTransform(s,e,i,n,r);break;case Li.E:this.ellipseTransform(s,e,i,n,r);break;case Li.R:this.rectTransform(s,e,i,n,r);break;case Li.AT:this.arcToTransform(s,e,i,n,r);break;case Li.Z:this.closePath()}}else this.commandList=t.map((function(t){return t.slice()}))}},{key:"_updateBounds",value:function(){this.bounds.clear(),Ni(this.commandList,this._boundsContext)}},{key:"release",value:function(){this.commandList=[],this._boundsContext=null,this._ctx=null}},{key:"getLength",value:function(){if(this.direction===Ti.COLUMN){if(!this.curves.length)return 0;var t=this.curves[0],e=this.curves[this.curves.length-1];return be(t.p0.y-e.p1.y)}if(this.direction===Ti.ROW){if(!this.curves.length)return 0;var i=this.curves[0],n=this.curves[this.curves.length-1];return be(i.p0.x-n.p1.x)}return this.curves.reduce((function(t,e){return t+e.getLength()}),0)}},{key:"getAttrAt",value:function(t){if(!this.curves)return{pos:{x:0,y:0},angle:0};for(var e,i=0,n=0;n<this.curves.length;n++){var r=(e=this.curves[n]).getLength(this.direction);if(i+r>=t)break;i+=r}var a=(t-i)/e.getLength(this.direction);return{pos:e.getPointAt(a),angle:e.getAngleAt(a)}}}])}(Pi),mn=["l",0,0,0,0,0,0,0];function kn(t,e,i){var n=mn[0]=t[0];if("a"===n||"A"===n)mn[1]=e*t[1],mn[2]=i*t[2],mn[3]=t[3],mn[4]=t[4],mn[5]=t[5],mn[6]=e*t[6],mn[7]=i*t[7];else if("h"===n||"H"===n)mn[1]=e*t[1];else if("v"===n||"V"===n)mn[1]=i*t[1];else for(var r=1,a=t.length;r<a;++r)mn[r]=(r%2==1?e:i)*t[r];return mn}var bn={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new ze},_n={fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0},xn={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},wn=Object.assign({outerBorder:Object.assign(Object.assign({},xn),{distance:0}),innerBorder:Object.assign(Object.assign({},xn),{distance:0})},xn),Sn={text:"",maxLineWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:"PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",fontWeight:"",ellipsis:"…",fontVariant:"",fontStyle:"",lineHeight:void 0,underline:0,lineThrough:0,scaleIn3d:!1,direction:"horizontal",wordBreak:"break-all",ignoreBuf:!1,verticalMode:0,wrap:!1,whiteSpace:"no-wrap",heightLimit:1/0,lineClamp:1/0,suffixPosition:"end",underlineDash:[],underlineOffset:0,disableAutoClipedPoptip:void 0},An=Object.assign(Object.assign(Object.assign(Object.assign({forceBoundsWidth:void 0,forceBoundsHeight:void 0,opacity:1,background:null,backgroundOpacity:1,backgroundCornerRadius:0,texture:null,textureColor:"black",textureSize:10,texturePadding:2,backgroundMode:"no-repeat",backgroundFit:!0,blur:0,cursor:null,html:null,react:null},_n),wn),{alignSelf:"auto"}),{pickStrokeBuffer:0}),Tn={connectedType:"none",connectedStyle:{},connectedX:NaN,connectedY:NaN},En=Object.assign(Object.assign(Object.assign({strokeSeg:null,renderable:!0,pickable:!0,shadowGraphic:void 0,childrenPickable:!0,fillPickable:!0,strokePickable:!0,visible:!0,zIndex:0,layout:null,boundsPadding:0,renderStyle:"default",pickMode:"accurate",customPickShape:null,boundsMode:"accurate",keepDirIn3d:!0,shadowRootIdx:1,globalZIndex:1,globalCompositeOperation:"",overflow:"hidden"},{_debug_bounds:!1}),An),bn),Cn=Object.assign(Object.assign({},En),{startAngle:0,endAngle:ke,innerRadius:0,outerRadius:1,innerPadding:0,outerPadding:0,cornerRadius:0,padRadius:0,padAngle:0,cap:!1,forceShowCap:!1}),Bn=Object.assign(Object.assign(Object.assign({},En),Tn),{points:[],segments:[],curveType:"linear",clipRange:1,closePath:!1}),Mn=Object.assign(Object.assign({},En),{radius:1,startAngle:0,endAngle:ke}),Rn=Object.assign(Object.assign({},En),{width:0,height:0,cornerRadius:0,path:[],clip:!1,visibleAll:!0,display:"relative",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",alignContent:"flex-start",baseOpacity:1}),Pn=Object.assign(Object.assign({},En),{path:"",width:0,height:0,cornerRadius:0,clip:!1}),On=Object.assign(Object.assign(Object.assign({},En),Tn),{points:[],segments:[],curveType:"linear",clipRange:1,clipRangeByDimension:"default",closePath:!1}),In=Object.assign(Object.assign({},En),{path:new yn,customPath:function(){te.getInstance().warn("空函数")}}),Ln=Object.assign(Object.assign({},En),{points:[],cornerRadius:0,closePath:!0}),Dn=Object.assign(Object.assign({},En),{width:0,height:0,x1:0,y1:0,strokeBoundsBuffer:0,cornerRadius:0});Object.assign(Object.assign({},En),{width:0,height:0,x1:0,y1:0,cornerRadius:0,length:0});var jn=Object.assign(Object.assign({},En),{symbolType:"circle",size:10,keepDirIn3d:!0}),Fn=Object.assign(Object.assign(Object.assign({},En),Sn),{strokeBoundsBuffer:0,keepDirIn3d:!0}),Nn=Object.assign(Object.assign(Object.assign({},En),Sn),{width:300,height:300,ellipsis:!0,wordBreak:"break-word",verticalDirection:"top",textAlign:"left",textBaseline:"top",layoutDirection:"horizontal",textConfig:[],disableAutoWrapLine:!1,maxHeight:void 0,maxWidth:void 0,singleLine:!1}),zn=Object.assign(Object.assign({repeatX:"no-repeat",repeatY:"no-repeat",image:"",width:0,height:0},En),{fill:!0,cornerRadius:0}),Gn=Object.assign(Object.assign({},zn),{backgroundShowMode:"never",backgroundWidth:0,backgroundHeight:0,textAlign:"left",textBaseline:"middle",direction:"horizontal",margin:0,id:"",width:20,height:20,backgroundFill:"rgba(101, 117, 168, 0.1)",backgroundFillOpacity:1,backgroundStroke:!1,backgroundStrokeOpacity:1,backgroundRadius:4,opacity:1}),Un=new(u((function t(){o(this,t)}))),Wn={horizontal:{width:"width",height:"height",left:"left",top:"top",x:"x",y:"y",bottom:"bottom"},vertical:{width:"height",height:"width",left:"top",top:"left",x:"y",y:"x",bottom:"right"}},Vn=!0,Hn=!1,Xn=/\w|\(|\)|-/,Yn=/[.?!,;:/,。?!、;:]/,Kn=/\S/;function qn(t,e,i,n,r){if(!e||e<=0)return 0;for(var a=Un.graphicUtil.textMeasure,o=n,s=t.slice(0,o),u=Math.floor(a.measureText(s,i).width),l=t.slice(0,o+1),c=Math.floor(a.measureText(l,i).width);u>e||c<=e;){if(u>e?o--:o++,o>t.length){o=t.length;break}if(o<0){o=0;break}s=t.slice(0,o),u=Math.floor(a.measureText(s,i).width),l=t.slice(0,o+1),c=Math.floor(a.measureText(l,i).width)}return r&&(o=Zn(t,o)),o}function Zn(t,e){for(var i=e;Xn.test(t[i-1])&&Xn.test(t[i])||Yn.test(t[i]);)if(--i<=0)return e;return i}function Jn(t,e){var i=Un.graphicUtil.textMeasure.measureText(t,e),n={ascent:0,height:0,descent:0,width:0};return"number"!=typeof i.actualBoundingBoxAscent||"number"!=typeof i.actualBoundingBoxDescent?(n.width=Math.floor(i.width),n.height=e.fontSize||0,n.ascent=n.height,n.descent=0):(n.width=Math.floor(i.width),n.height=Math.floor(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent),n.ascent=Math.floor(i.actualBoundingBoxAscent),n.descent=n.height-n.ascent),n}var $n=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Qn=function(){return u((function t(){o(this,t)}),[{key:"configure",value:function(t,e){this.canvas=t.canvas,this.context=t.context,t.bindTextMeasure(this)}},{key:"measureTextWidth",value:function(t,e){return this.context?(this.context.setTextStyleWithoutAlignBaseline(e),this.context.measureText(t).width):this.estimate(t,e).width}},{key:"estimate",value:function(t,e){for(var i=e.fontSize,n=void 0===i?Fn.fontSize:i,r=0,a=0,o=0;o<t.length;o++)t.charCodeAt(o)<128?r++:a++;return{width:~~(.8*r*n+a*n),height:n}}},{key:"measureTextPixelHeight",value:function(t,e){var i;if(!this.context)return null!==(i=e.fontSize)&&void 0!==i?i:Sn.fontSize;this.context.setTextStyleWithoutAlignBaseline(e);var n=this.context.measureText(t);return Math.abs(n.actualBoundingBoxAscent-n.actualBoundingBoxDescent)}},{key:"measureTextBoundHieght",value:function(t,e){var i;if(!this.context)return null!==(i=e.fontSize)&&void 0!==i?i:Sn.fontSize;this.context.setTextStyleWithoutAlignBaseline(e);var n=this.context.measureText(t);return Math.abs(n.fontBoundingBoxAscent-n.fontBoundingBoxDescent)}},{key:"measureText",value:function(t,e){return this.context?(this.context.setTextStyleWithoutAlignBaseline(e),this.context.measureText(t)):this.estimate(t,e)}},{key:"clipTextVertical",value:function(t,e,i,n){var r=this;if(0===t.length)return{verticalList:t,width:0};var a=e.fontSize,o=void 0===a?12:a;t.forEach((function(t){t.width=0===t.direction?o:r.measureTextWidth(t.text,e)}));for(var s=[],u=0,l=0;l<t.length&&u+t[l].width<i;l++)u+=t[l].width,s.push(t[l]);if(t[l]&&t[l].text.length>1){var c=this._clipText(t[l].text,e,i-u,0,t[l].text.length-1,"end",!1);if(n&&c.str!==t[l].text){for(var h="",d=0,f=0;f<l;f++){var v=t[f];h+=v.text,d+=v.text.length}var p=Zn(h+=t[l].text,d+c.str.length);(p-=d)!==c.str.length-1&&(c.str=c.str.substring(0,p),c.width=this.measureTextWidth(c.str,e))}s.push(Object.assign(Object.assign({},t[l]),{text:c.str,width:c.width})),u+=c.width}return{verticalList:s,width:u}}},{key:"clipText",value:function(t,e,i,n){if(0===t.length)return{str:"",width:0};var r=this.measureTextWidth(t,e);if(r<=i)return{str:t,width:r};if((r=this.measureTextWidth(t[0],e))>i)return{str:"",width:0};var a=this._clipText(t,e,i,0,t.length-1,"end",!1);if(n&&a.str!==t){var o=Zn(t,a.str.length);o!==a.str.length&&(a.str=t.substring(0,o),a.width=this.measureTextWidth(a.str,e))}return a}},{key:"_clipText",value:function(t,e,i,n,r,a,o){var s;if("start"===a)s=this._clipTextStart(t,e,i,n,r),o&&(s.result=o+s.str);else if("middle"===a){var u=this._clipTextMiddle(t,e,i,"","",0,0,1);s={str:"none",width:u.width,result:u.left+o+u.right}}else s=this._clipTextEnd(t,e,i,n,r),o&&(s.result=s.str+o);return s}},{key:"_clipTextEnd",value:function(t,e,i,n,r){var a,o=Math.floor((n+r)/2),s=t.substring(0,o+1),u=this.measureTextWidth(s,e);if(u>i){if(s.length<=1)return{str:"",width:0};var l=t.substring(0,o);return(a=this.measureTextWidth(l,e))<=i?{str:l,width:a}:this._clipTextEnd(t,e,i,n,o)}if(u<i){if(o>=t.length-1)return{str:t,width:this.measureTextWidth(t,e)};var c=t.substring(0,o+2);return(a=this.measureTextWidth(c,e))>=i?{str:s,width:u}:this._clipTextEnd(t,e,i,o,r)}return{str:s,width:u}}},{key:"_clipTextStart",value:function(t,e,i,n,r){var a,o=Math.ceil((n+r)/2),s=t.substring(o-1,t.length-1),u=this.measureTextWidth(s,e);if(u>i){if(s.length<=1)return{str:"",width:0};var l=t.substring(o,t.length-1);return(a=this.measureTextWidth(l,e))<=i?{str:l,width:a}:this._clipTextStart(t,e,i,o,t.length-1)}if(u<i){if(o<=0)return{str:t,width:this.measureTextWidth(t,e)};var c=t.substring(o-2,t.length-1);return(a=this.measureTextWidth(c,e))>=i?{str:s,width:u}:this._clipTextStart(t,e,i,n,o)}return{str:s,width:u}}},{key:"_clipTextMiddle",value:function(t,e,i,n,r,a,o,s){var u=t.substring(0,s),l=this.measureTextWidth(u,e);if(l+o>i)return{left:n,right:r,width:a+o};var c=t.substring(t.length-s,t.length),h=this.measureTextWidth(c,e);return l+h>i?{left:u,right:r,width:l+o}:this._clipTextMiddle(t,e,i,u,c,l,h,s+1)}},{key:"clipTextWithSuffixVertical",value:function(t,e,i,n,r,a){if(""===n)return this.clipTextVertical(t,e,i,r);if(0===t.length)return{verticalList:t,width:0};var o=this.clipTextVertical(t,e,i,r);if(o.verticalList.length===t.length&&o.verticalList[o.verticalList.length-1].width===t[t.length-1].width)return o;var s,u=this.measureTextWidth(n,e);if(u>i)return o;if(i-=u,"start"===a){var l=this.revertVerticalList(t);s=this.clipTextVertical(l,e,i,r);var c=this.revertVerticalList(s.verticalList);c.unshift({text:n,direction:1,width:u}),s.verticalList=c}else if("middle"===a){var h=this.clipTextVertical(t,e,i/2,r),d=this.revertVerticalList(t),f=this.clipTextVertical(d,e,i/2,r);h.verticalList.push({text:n,direction:1,width:u}),this.revertVerticalList(f.verticalList).forEach((function(t){return h.verticalList.push(t)})),s={verticalList:h.verticalList,width:h.width+f.width}}else(s=this.clipTextVertical(t,e,i,r)).verticalList.push({text:n,direction:1,width:u});return s.width+=u,s}},{key:"revertVerticalList",value:function(t){return t.reverse().map((function(t){var e=t.text.split("").reverse().join("");return Object.assign(Object.assign({},t),{text:e})}))}},{key:"clipTextWithSuffix",value:function(t,e,i,n,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(""===n)return this.clipText(t,e,i,r);if(0===t.length)return{str:"",width:0};var s=this.measureTextWidth(t,e);if(!o&&s<=i)return{str:t,width:s};var u=this.measureTextWidth(n,e);if(u>i)return{str:"",width:0};if(o&&s+u<=i)return{str:t+n,width:s+u};i-=u;var l=this._clipText(t,e,i,0,t.length-1,a,n);if(r&&l.str!==t){var c=Zn(t,l.str.length);c!==l.str.length&&(l.result=t.substring(0,c),l.width=this.measureTextWidth(l.str,e))}else o&&l.str===t&&(l.result=t+n);return l.str=l.result,l.width+=u,l}}])}();Qn=$n([L()],Qn);var tr=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},er=Symbol.for("TextMeasureContribution"),ir=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i)}(Qn);ir=tr([L()],ir);var nr=new J,rr=Symbol.for("CanvasFactory"),ar=Symbol.for("Context2dFactory");function or(t){return nr.getNamed(rr,Un.global.env)(t)}var sr=function(){return u((function t(){o(this,t),this.pools=[],this.allocatedCanvas=[]}),[{key:"shareCanvas",value:function(){return this.allocatedCanvas.length?this.allocatedCanvas[0]:this.getCommonCanvas()}},{key:"getCommonCanvas",value:function(){return this._commonCanvas||(this._commonCanvas=this.allocate({width:100,height:100,dpr:2})),this._commonCanvas}},{key:"allocate",value:function(t){if(!this.pools.length){var e=or(Object.assign({nativeCanvas:Un.global.createCanvas(t)},t));return this.allocatedCanvas.push(e),e}var i=this.pools.pop();return i.resize(t.width,t.height),i.dpr=t.dpr,i}},{key:"allocateByObj",value:function(t){if(!this.pools.length){var e={width:t.width/t.dpr,height:t.height/t.dpr,dpr:t.dpr},i=or(Object.assign({nativeCanvas:Un.global.createCanvas(e)},e));return this.allocatedCanvas.push(i),i}var n=this.pools.pop();return n.width=t.width,n.height=t.height,n}},{key:"free",value:function(t){this.pools.push(t)}},{key:"length",get:function(){return this.pools.length}},{key:"release",value:function(){this.pools=[]}}])}(),ur=new sr,lr=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},cr=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},hr=Symbol.for("VWindow"),dr=Symbol.for("WindowHandlerContribution"),fr=function(){return u((function t(){var e=this;o(this,t),this.hooks={onChange:new et(["x","y","width","height"])},this.active=function(){var t=e.global;t.env&&!e.actived&&(nr.getNamed(dr,t.env).configure(e,t),e.actived=!0)},this._uid=_.GenAutoIncrementId(),this.global=Un.global,this.postInit()}),[{key:"width",get:function(){if(this._handler){var t=this._handler.getWH();return this._width=t.width}return this._width}},{key:"height",get:function(){if(this._handler){var t=this._handler.getWH();return this._height=t.height}return this._height}},{key:"dpr",get:function(){return this._handler.getDpr()}},{key:"postInit",value:function(){this.global.hooks.onSetEnv.tap("window",this.active),this.active()}},{key:"style",get:function(){var t;return null!==(t=this._handler.getStyle())&&void 0!==t?t:{}},set:function(t){this._handler.setStyle(t)}},{key:"create",value:function(t){var e,i;this._handler.createWindow(t);var n=this._handler.getWH();this._width=n.width,this._height=n.height,t.viewBox?this.setViewBox(t.viewBox):!1!==t.canvasControled?this.setViewBox({x1:0,y1:0,x2:this._width,y2:this._height}):this.setViewBox({x1:0,y1:0,x2:null!==(e=t.width)&&void 0!==e?e:this._width,y2:null!==(i=t.height)&&void 0!==i?i:this._height}),this.title=this._handler.getTitle(),this.resizable=!0}},{key:"setWindowHandler",value:function(t){this._handler=t}},{key:"setDpr",value:function(t){return this._handler.setDpr(t)}},{key:"resize",value:function(t,e){return this._handler.resizeWindow(t,e)}},{key:"configure",value:function(){throw new Error("暂不支持")}},{key:"release",value:function(){return this.global.hooks.onSetEnv.unTap("window",this.active),this._handler.releaseWindow()}},{key:"getContext",value:function(){return this._handler.getContext()}},{key:"getNativeHandler",value:function(){return this._handler.getNativeHandler()}},{key:"getImageBuffer",value:function(t){return this._handler.getImageBuffer?this._handler.getImageBuffer(t):null}},{key:"addEventListener",value:function(t,e,i){return this._handler.addEventListener(t,e,i)}},{key:"removeEventListener",value:function(t,e,i){return this._handler.removeEventListener(t,e,i)}},{key:"dispatchEvent",value:function(t){return this._handler.dispatchEvent(t)}},{key:"getBoundingClientRect",value:function(){return this._handler.getBoundingClientRect()}},{key:"getContainer",value:function(){return this._handler.container}},{key:"clearViewBox",value:function(t){this._handler.clearViewBox(t)}},{key:"setViewBox",value:function(t){this._handler.setViewBox(t)}},{key:"setViewBoxTransform",value:function(t,e,i,n,r,a){this._handler.setViewBoxTransform(t,e,i,n,r,a)}},{key:"getViewBox",value:function(){return this._handler.getViewBox()}},{key:"getViewBoxTransform",value:function(){return this._handler.getViewBoxTransform()}},{key:"pointTransform",value:function(t,e){var i=this._handler.getViewBox(),n={x:t,y:e};return this._handler.getViewBoxTransform().transformPoint({x:t,y:e},n),n.x-=i.x1,n.y-=i.y1,n}},{key:"hasSubView",value:function(){var t=this._handler.getViewBox();return!(0===t.x1&&0===t.y1&&this.width===t.width()&&this.height===t.height())}},{key:"isVisible",value:function(t){return this._handler.isVisible(t)}},{key:"onVisibleChange",value:function(t){return this._handler.onVisibleChange(t)}},{key:"getTopLeft",value:function(t){return this._handler.getTopLeft(t)}}])}();fr=lr([L(),cr("design:paramtypes",[])],fr);var vr,pr=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},gr=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},yr=function(t,e){return function(i,n){e(i,n,t)}},mr=function(){return u((function t(e){var i=this;o(this,t),this.contributions=e,this.configured=!1,this.global=Un.global,this.global.hooks.onSetEnv.tap("graphic-util",(function(t,e,n){i.configured=!1,i.configure(n,e)}))}),[{key:"canvas",get:function(){return this.tryInitCanvas(),this._canvas}},{key:"context",get:function(){return this.tryInitCanvas(),this._context}},{key:"textMeasure",get:function(){return this._textMeasure||this.configure(this.global,this.global.env),this._textMeasure}},{key:"configure",value:function(t,e){var i=this;this.configured||(this.contributions.getContributions().forEach((function(t){t.configure(i,e)})),this.configured=!0)}},{key:"tryInitCanvas",value:function(){if(!this._canvas){var t=ur.shareCanvas();this._canvas=t,this._context=t.getContext("2d")}}},{key:"bindTextMeasure",value:function(t){this._textMeasure=t}},{key:"measureText",value:function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"native";this.configure(this.global,this.global.env);var r=this.global.measureTextMethod;this.global.measureTextMethod=n;var a={width:this._textMeasure.measureTextWidth(t,e),height:null!==(i=e.fontSize)&&void 0!==i?i:Sn.fontSize};return this.global.measureTextMethod=r,a}},{key:"createTextMeasureInstance",value:function(t,e,i){var n=this;return this.configure(this.global,this.global.env),new di(Object.assign({defaultFontParams:{fontFamily:Sn.fontFamily,fontSize:Sn.fontSize},getCanvasForMeasure:i||function(){return n.canvas},getTextBounds:void 0,specialCharSet:"-/: .,@%'\"~"+di.ALPHABET_CHAR_SET+di.ALPHABET_CHAR_SET.toUpperCase()},null!=e?e:{}),t)}},{key:"drawGraphicToCanvas",value:function(t,e,i){if(!e.defaultLayer)return null;var n=nr.get(hr),r=t.AABBBounds,a=r.width(),o=r.height(),s=-r.x1,u=-r.y1;n.create({viewBox:{x1:s,y1:u,x2:r.x2,y2:r.y2},width:a,height:o,canvas:i,dpr:e.window.dpr,canvasControled:!0,offscreen:!0,title:""});var l=e.params.optimize.disableCheckGraphicWidthOutRange;e.params.optimize.disableCheckGraphicWidthOutRange=!0,e.defaultLayer.getNativeHandler().drawTo(n,[t],{transMatrix:n.getViewBoxTransform(),viewBox:n.getViewBox(),stage:e,layer:e.defaultLayer,renderService:e.renderService,background:"transparent",clear:!0,updateBounds:!1}),e.params.optimize.disableCheckGraphicWidthOutRange=l;var c=n.getNativeHandler();return c.nativeCanvas?c.nativeCanvas:null}}])}();mr=pr([L(),yr(0,O($)),yr(0,D(er)),gr("design:paramtypes",[Object])],mr),function(t){t[t.transform=0]="transform",t[t.matrix=1]="matrix"}(vr||(vr={}));var kr=new ze,br=function(){return u((function t(){o(this,t),this.matrix=new ze}),[{key:"init",value:function(t){return this.mode=vr.transform,this.originTransform=t,this.matrix.reset(),this}},{key:"fromMatrix",value:function(t,e){return this.mode=vr.matrix,this.outSourceMatrix=t,this.outTargetMatrix=e,this}},{key:"scaleMatrix",value:function(t,e,i){var n=this.outSourceMatrix;if(kr.setValue(n.a,n.b,n.c,n.d,n.e,n.f),this.outTargetMatrix.reset(),i){var r=i.x,a=i.y;this.outTargetMatrix.translate(r,a),this.outTargetMatrix.scale(t,e),this.outTargetMatrix.translate(-r,-a)}else this.outTargetMatrix.scale(t,e);return this.outTargetMatrix.multiply(kr.a,kr.b,kr.c,kr.d,kr.e,kr.f),this}},{key:"rotateMatrix",value:function(t,e){var i=this.outSourceMatrix;if(kr.setValue(i.a,i.b,i.c,i.d,i.e,i.f),this.outTargetMatrix.reset(),e){var n=e.x,r=e.y;this.outTargetMatrix.translate(n,r),this.outTargetMatrix.rotate(t),this.outTargetMatrix.translate(-n,-r)}else this.outTargetMatrix.rotate(t);return this.outTargetMatrix.multiply(kr.a,kr.b,kr.c,kr.d,kr.e,kr.f),this}},{key:"scale",value:function(t,e,i){return this.mode===vr.matrix?this.scaleMatrix(t,e,i):this}},{key:"rotate",value:function(t,e){return this.mode===vr.matrix?this.rotateMatrix(t,e):this}},{key:"translateMatrix",value:function(t,e){var i=this.outSourceMatrix;return kr.setValue(i.a,i.b,i.c,i.d,i.e,i.f),this.outTargetMatrix.reset(),this.outTargetMatrix.translate(t,e),this.outTargetMatrix.multiply(kr.a,kr.b,kr.c,kr.d,kr.e,kr.f),this}},{key:"translate",value:function(t,e){return this.mode===vr.matrix?this.translateMatrix(t,e):this}},{key:"simplify",value:function(t){return this.mode===vr.matrix?this.simplifyMatrix(t):this}},{key:"simplifyMatrix",value:function(t){return this}}])}();br=pr([L(),gr("design:paramtypes",[])],br);var _r={arc:Cn,area:Bn,circle:Mn,line:On,path:In,symbol:jn,text:Fn,rect:Dn,polygon:Ln,richtext:Nn,richtextIcon:Gn,image:zn,group:Rn,glyph:Pn},xr=Object.keys(_r);function wr(t,e){Object.keys(e).forEach((function(i){t[i]=e[i]}))}var Sr={arc:Object.assign({},_r.arc),area:Object.assign({},_r.area),circle:Object.assign({},_r.circle),line:Object.assign({},_r.line),path:Object.assign({},_r.path),symbol:Object.assign({},_r.symbol),text:Object.assign({},_r.text),rect:Object.assign({},_r.rect),polygon:Object.assign({},_r.polygon),richtext:Object.assign({},_r.richtext),richtextIcon:Object.assign({},_r.richtextIcon),image:Object.assign({},_r.image),group:Object.assign({},_r.group),glyph:Object.assign({},_r.glyph)},Ar=function(){return u((function t(){o(this,t),this.initTheme(),this.dirty=!1}),[{key:"initTheme",value:function(){var t=this;this._defaultTheme={},xr.forEach((function(e){t._defaultTheme[e]=Object.create(Sr[e])})),this.combinedTheme=this._defaultTheme}},{key:"getTheme",value:function(t){if(!t)return this.combinedTheme;if(!this.dirty)return this.combinedTheme;var e={},i=this.getParentWithTheme(t);return i&&(e=i.theme),this.applyTheme(t,e),this.combinedTheme}},{key:"getParentWithTheme",value:function(t){for(;t.parent;)if((t=t.parent).theme)return t;return null}},{key:"applyTheme",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dirty){var n=this.getParentWithTheme(t);if(n){var r=n.theme;(r.dirty||i)&&r.applyTheme(n,e,!0)}this.userTheme?this.doCombine(n&&n.theme.combinedTheme):(n?this.combinedTheme=n.theme.combinedTheme:(this.combinedTheme=this._defaultTheme,te.getInstance().warn("未知错误,走到不应该走的区域里")),this.dirty=!1)}return this.combinedTheme}},{key:"doCombine",value:function(t){var e=this,i=this.userTheme,n=this.combinedTheme;xr.forEach((function(r){var a=Object.create(Sr[r]);t&&t[r]&&wr(a,t[r]),n[r]&&wr(a,n[r]),i[r]&&wr(a,i[r]),e.combinedTheme[r]=a})),i.common&&xr.forEach((function(t){wr(e.combinedTheme[t],i.common)})),this.dirty=!1}},{key:"setTheme",value:function(t,e){var i=this.userTheme;i?Object.keys(t).forEach((function(e){i[e]?Object.assign(i[e],t[e]):i[e]=Object.assign({},t[e])})):i=t,this.userTheme=i,this.dirty=!0,this.dirtyChildren(e)}},{key:"resetTheme",value:function(t,e){this.userTheme=t,this.dirty=!0,this.dirtyChildren(e)}},{key:"dirtyChildren",value:function(t){var e=this;t.forEachChildren((function(t){t.isContainer&&(t.theme&&(t.theme.dirty=!0),e.dirtyChildren(t))}))}}])}(),Tr=new Ar;function Er(t,e){return t.glyphHost?Er(t.glyphHost):e?(t.isContainer,e):function(t){var e;if(e=t.isContainer?t:t.parent,e){for(;e&&!e.theme;)e=e.parent;return e?(e.theme||e.createTheme(),e.theme.getTheme(e)):Tr.getTheme()}return null}(t)||t.attachedThemeGraphic&&Er(t.attachedThemeGraphic)||Tr.getTheme()}var Cr=function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))},Br=function(t){function i(){var t;return o(this,i),(t=e(this,i))._uid=_.GenAutoIncrementId(),t._firstChild=null,t._lastChild=null,t.parent=null,t._count=1,t}return c(i,t),u(i,[{key:"previousSibling",get:function(){return this._prev}},{key:"nextSibling",get:function(){return this._next}},{key:"children",get:function(){return this.getChildren()}},{key:"firstChild",get:function(){return this._firstChild}},{key:"lastChild",get:function(){return this._lastChild}},{key:"count",get:function(){return this._count}},{key:"childrenCount",get:function(){return this._idMap?this._idMap.size:0}},{key:"forEachChildren",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])for(var e=this._lastChild,i=0;e;){if(t(e,i++))return;e=e._prev}else for(var n=this._firstChild,r=0;n;){if(t(n,r++))return;n=n._next}}},{key:"forEachChildrenAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Cr(this,void 0,void 0,n().mark((function i(){var r,a,o,s,u,l;return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!e){i.next=16;break}r=this._lastChild,a=0;case 2:if(!r){i.next=14;break}if(o=t(r,a++),i.t0=o.then,!i.t0){i.next=9;break}return i.next=8,o;case 8:o=i.sent;case 9:if(!o){i.next=11;break}return i.abrupt("return");case 11:r=r._prev;case 12:i.next=2;break;case 14:i.next=29;break;case 16:s=this._firstChild,u=0;case 17:if(!s){i.next=29;break}if(l=t(s,u++),i.t1=l.then,!i.t1){i.next=24;break}return i.next=23,l;case 23:l=i.sent;case 24:if(!l){i.next=26;break}return i.abrupt("return");case 26:s=s._next;case 27:i.next=17;break;case 29:case"end":return i.stop()}}),i,this)})))}},{key:"forEach",value:function(t){return this.forEachChildren(t)}},{key:"appendChild",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._uid===t._uid)return null;if(!e&&t.isAncestorsOf(this))throw new Error("【Node::appendChild】不能将父辈元素append为子元素");return t.parent&&t.parent.removeChild(t),t.parent=this,this._lastChild?(this._lastChild._next=t,t._prev=this._lastChild,this._lastChild=t):(this._firstChild=this._lastChild=t,t._prev=t._next=null),this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this.setCount(t.count),this._structEdit=!0,t}},{key:"appendChildArrHighPerformance",value:function(t){return console.error("暂不支持该函数"),t}},{key:"insertBefore",value:function(t,e){if(!e)return this.appendChild(t);if(this._uid===t._uid)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,t._prev=e._prev,e._prev?e._prev._next=t:this._firstChild=t,e._prev=t,t._next=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}},{key:"insertAfter",value:function(t,e){if(!e)return this.appendChild(t);if(this._uid===t._uid)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,e._next?(e._next._prev=t,t._next=e._next):this._lastChild=t,e._next=t,t._prev=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}},{key:"insertInto",value:function(t,e){if(!this._ignoreWarn&&this._nodeList&&te.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"),e>=this.childrenCount)return this.appendChild(t);if(this._uid===t._uid)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");if(t.parent&&t.parent.removeChild(t),t.parent=this,0===e)t._next=this._firstChild,this._firstChild&&(this._firstChild._prev=t),t._prev=null,this._firstChild=t;else{for(var i=this._firstChild,n=0;n<e;n++){if(!i)return null;n>0&&(i=i._next)}if(!i)return null;t._next=i._next,t._prev=i,i._next=t,t._next&&(t._next._prev=t)}return this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t}},{key:"insertIntoKeepIdx",value:function(t,e){if(this._nodeList||(this._nodeList=this.children),this._nodeList[e]){var i=this._nodeList[e];return this._nodeList.splice(e,0,t),this.insertBefore(t,i)}var n;this._nodeList[e]=t;for(var r=e-1;r>=0&&!(n=this._nodeList[r]);r--);if(n)return n._next?this.insertBefore(t,n._next):this.appendChild(t);this._ignoreWarn=!0;var a=this.insertInto(t,0);return this._ignoreWarn=!1,a}},{key:"removeChild",value:function(t){if(!this._idMap)return null;if(!this._idMap.has(t._uid))return null;if(this._idMap.delete(t._uid),this._nodeList){var e=this._nodeList.findIndex((function(e){return e===t}));e>=0&&this._nodeList.splice(e,1)}return t._prev?t._prev._next=t._next:this._firstChild=t._next,t._next?t._next._prev=t._prev:this._lastChild=t._prev,t.parent=null,t._prev=null,t._next=null,this._structEdit=!0,this.setCount(-t.count),t}},{key:"delete",value:function(){this.parent&&this.parent.removeChild(this)}},{key:"removeAllChild",value:function(t){if(this._idMap){this._nodeList&&(this._nodeList.length=0);for(var e=this._firstChild;e;){var i=e._next;e.parent=null,e._prev=null,e._next=null,e=e._next,e=i}this._firstChild=null,this._lastChild=null,this._idMap.clear(),this._structEdit=!0,this.setCount(1-this._count)}}},{key:"replaceChild",value:function(t,e){throw new Error("暂不支持")}},{key:"find",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return this.forEachChildren((function(i,r){return!(i===e||!t(i,r)||(n=i,0))})),i&&this.forEachChildren((function(e){if(e.isContainer){var i=e.find(t,!0);if(i)return n=i,!0}return!1})),n}},{key:"findAll",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];return this.forEachChildren((function(i,r){i!==e&&t(i,r)&&n.push(i)})),i&&this.forEachChildren((function(e){if(e.isContainer){var i=e.findAll(t,!0);i.length&&(n=n.concat(i))}})),n}},{key:"getElementById",value:function(t){return this.find((function(e){return e.id===t}),!0)}},{key:"findChildById",value:function(t){return this.getElementById(t)}},{key:"findChildByUid",value:function(t){return this._idMap&&this._idMap.get(t)||null}},{key:"getElementsByName",value:function(t){return this.findAll((function(e){return e.name===t}),!0)}},{key:"findChildrenByName",value:function(t){return this.getElementsByName(t)}},{key:"getElementsByType",value:function(t){return this.findAll((function(e){return e.type===t}),!0)}},{key:"getChildByName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.find((function(e){return e.name===t}),e)}},{key:"getChildAt",value:function(t){var e=this._firstChild;if(!e)return null;for(var i=0;i<t;i++){if(!e._next)return null;e=e._next}return e}},{key:"at",value:function(t){return this.getChildAt(t)}},{key:"containNode",value:function(t){if(!this._idMap)return!1;if(this._idMap.has(t._uid))return!0;for(var e=this._firstChild;e;){if(e.containNode(t))return!0;e=e._next}return!1}},{key:"getRootNode",value:function(){for(var t=this.parent;null==t?void 0:t.parent;)t=t.parent;return t||this}},{key:"hasChildNodes",value:function(){return null!==this._firstChild}},{key:"addChild",value:function(t){return this.appendChild(t)}},{key:"add",value:function(t){return this.appendChild(t)}},{key:"getChildren",value:function(){for(var t=[],e=this._firstChild;e;)t.push(e),e=e._next;return t}},{key:"isChildOf",value:function(t){return!!this.parent&&this.parent._uid===t._uid}},{key:"isParentOf",value:function(t){return t.isChildOf(this)}},{key:"isDescendantsOf",value:function(t){var e=this.parent;if(!e)return!1;do{if(e._uid===t._uid)return!0;e=e.parent}while(null!==e);return!1}},{key:"isAncestorsOf",value:function(t){return t.isDescendantsOf(this)}},{key:"getAncestor",value:function(t){throw new Error("暂不支持")}},{key:"setAllDescendantsProps",value:function(t,e){for(var i=this._firstChild;i;)i[t]=e,i.setAllDescendantsProps(t,e),i=i._next}},{key:"setCount",value:function(t){this._count+=t;var e=this.parent;if(e)do{e._count+=t,e=e.parent}while(null!==e)}},{key:"clone",value:function(){throw new Error("暂不支持")}},{key:"cloneTo",value:function(t){throw new Error("暂不支持")}},{key:"getParent",value:function(){return this.parent}},{key:"del",value:function(t){return this.removeChild(t)}},{key:"addEventListener",value:function(t,e,n){var r=dt(n,!0)&&n||gt(n)&&n.capture,a=gt(n)&&n.once,o=ft(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=ft(e)?e:e.handleEvent,a?p(h(i.prototype),"once",this).call(this,t,e,o):p(h(i.prototype),"on",this).call(this,t,e,o),this}},{key:"on",value:function(t,e,i){return this.addEventListener(t,e,i)}},{key:"removeEventListener",value:function(t,e,n){var r=dt(n,!0)&&n||gt(n)&&n.capture,a=ft(e)?void 0:e;t=r?"".concat(t,"capture"):t,e=ft(e)?e:e.handleEvent;var o=gt(n)&&n.once;return p(h(i.prototype),"off",this).call(this,t,e,a,o),this}},{key:"off",value:function(t,e,i){return this.removeEventListener(t,e,i)}},{key:"once",value:function(t,e,i){return gt(i)?(i.once=!0,this.addEventListener(t,e,i)):this.addEventListener(t,e,{once:!0})}},{key:"removeAllEventListeners",value:function(){return p(h(i.prototype),"removeAllListeners",this).call(this),this}},{key:"removeAllListeners",value:function(){return this.removeAllEventListeners()}},{key:"dispatchEvent",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return(e=p(h(i.prototype),"emit",this)).call.apply(e,[this,t.type,t].concat(r)),!t.defaultPrevented}},{key:"emit",value:function(t,e){return this.dispatchEvent(t,e)}},{key:"release",value:function(){this.removeAllListeners()}}])}(ct),Mr=function(){return u((function t(e){o(this,t),this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=t.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer={x:0,y:0},this.page={x:0,y:0},this.canvas={x:0,y:0},this.viewport={x:0,y:0},this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}),[{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewX",get:function(){return this.viewport.x}},{key:"viewY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[this.path.length-1]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.composedDetailPath(),this.path}},{key:"composedDetailPath",value:function(){return this.pickParams&&this.pickParams.graphic?(this.detailPath=this.path.slice(),this._composedDetailPath(this.pickParams)):this.detailPath=this.path.slice(),this.detailPath}},{key:"_composedDetailPath",value:function(t){if(t&&t.graphic){var e=this.pickParams.graphic;if(e.stage){var i=e.stage.eventSystem.manager.propagationPath(e);this.detailPath.push(i),this._composedDetailPath(t.params)}}}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.stopPropagation(),this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error("Method not implemented.")}}])}(),Rr=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).client={x:0,y:0},t.movement={x:0,y:0},t.offset={x:0,y:0},t.global={x:0,y:0},t.screen={x:0,y:0},t}return c(i,t),u(i,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d,f,v){throw new Error("Method not implemented.")}}])}(Mr),Pr=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).width=0,t.height=0,t.isPrimary=!1,t}return c(i,t),u(i,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){var t,e,n,r=new i(this.manager);r.eventPhase=r.NONE,r.currentTarget=null,r.path=[],r.detailPath=[],r.target=null,r.nativeEvent=this.nativeEvent,r.originalEvent=this.originalEvent,null===(t=this.manager)||void 0===t||t.copyPointerData(this,r),null===(e=this.manager)||void 0===e||e.copyMouseData(this,r),null===(n=this.manager)||void 0===n||n.copyData(this,r),r.target=this.target,r.path=this.composedPath().slice();var a=this.composedDetailPath();return r.detailPath=a&&a.slice(),r.type=this.type,r}}])}(Rr),Or=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).DOM_DELTA_PIXEL=0,t.DOM_DELTA_LINE=1,t.DOM_DELTA_PAGE=2,t}return c(i,t),u(i,[{key:"clone",value:function(){var t,e,n,r=new i(this.manager);r.eventPhase=r.NONE,r.currentTarget=null,r.path=[],r.detailPath=[],r.target=null,r.nativeEvent=this.nativeEvent,r.originalEvent=this.originalEvent,null===(t=this.manager)||void 0===t||t.copyWheelData(this,r),null===(e=this.manager)||void 0===e||e.copyMouseData(this,r),null===(n=this.manager)||void 0===n||n.copyData(this,r),r.target=this.target,r.path=this.composedPath().slice();var a=this.composedDetailPath();return r.detailPath=a&&a.slice(),r.type=this.type,r}}])}(Rr);Or.DOM_DELTA_PIXEL=0,Or.DOM_DELTA_LINE=1,Or.DOM_DELTA_PAGE=2;var Ir=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i)).type=t,r.detail=n,r}return c(i,t),u(i)}(Mr),Lr="object"==("undefined"==typeof performance?"undefined":a(performance))&&performance.now?performance:Date;function Dr(t){return"mouse"===t||"pen"===t}var jr,Fr=function(){return u((function t(e,i){var n=this;o(this,t),this.dispatch=new ct,this.cursorTarget=null,this.pauseNotify=!1,this.mappingState={trackingData:{}},this.eventPool=new Map,this.onPointerDown=function(t,e){if(t instanceof Pr){var i=n.createPointerEvent(t,t.type,e);if(n.dispatchEvent(i,"pointerdown"),"touch"===i.pointerType)n.dispatchEvent(i,"touchstart");else if(Dr(i.pointerType)){var r=2===i.button;n.dispatchEvent(i,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=i.composedPath(),n.freeEvent(i)}else te.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event")},this.onPointerMove=function(t,e){var i,r;if(t instanceof Pr){var a=n.createPointerEvent(t,t.type,e),o=Dr(a.pointerType),s=n.trackingData(t.pointerId),u=n.findMountedTarget(s.overTargets);if(s.overTargets&&u&&u!==n.rootTarget&&u!==a.target){var l="mousemove"===t.type?"mouseout":"pointerout",c=n.createPointerEvent(t,l,u||void 0);if(n.dispatchEvent(c,"pointerout"),o&&n.dispatchEvent(c,"mouseout"),!a.composedPath().includes(u)){var h=n.createPointerEvent(t,"pointerleave",u||void 0);for(h.eventPhase=h.AT_TARGET;h.target&&!a.composedPath().includes(h.target);)h.currentTarget=h.target,n.notifyTarget(h),o&&n.notifyTarget(h,"mouseleave"),h.target=h.target.parent;n.freeEvent(h)}n.freeEvent(c)}if(u!==a.target){var d="mousemove"===t.type?"mouseover":"pointerover",f=n.clonePointerEvent(a,d);n.dispatchEvent(f,"pointerover"),o&&n.dispatchEvent(f,"mouseover");for(var v=null==u?void 0:u.parent;v&&v!==n.rootTarget.parent&&v!==a.target;)v=v.parent;if(!v||v===n.rootTarget.parent){var p=n.clonePointerEvent(a,"pointerenter");p.eventPhase=p.AT_TARGET;for(var g=p.target,y=new Set,m=u;m&&m!==n.rootTarget;)y.add(m),m=m.parent;for(;g&&g!==u&&g!==n.rootTarget.parent;)y.has(g)||(p.currentTarget=g,n.notifyTarget(p),o&&n.notifyTarget(p,"mouseenter")),g=g.parent;n.freeEvent(p)}n.freeEvent(f)}n.dispatchEvent(a,"pointermove"),"touch"===a.pointerType&&n.dispatchEvent(a,"touchmove"),o&&(n.dispatchEvent(a,"mousemove"),n.cursorTarget=a.target,n.cursor=(null===(r=null===(i=a.target)||void 0===i?void 0:i.attribute)||void 0===r?void 0:r.cursor)||n.rootTarget.getCursor()),s.overTargets=a.composedPath(),n.freeEvent(a)}else te.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event")},this.onPointerOver=function(t,e){var i,r;if(t instanceof Pr){var a=n.trackingData(t.pointerId),o=n.createPointerEvent(t,t.type,e),s=Dr(o.pointerType);n.dispatchEvent(o,"pointerover"),s&&n.dispatchEvent(o,"mouseover"),"mouse"===o.pointerType&&(n.cursorTarget=o.target,n.cursor=(null===(r=null===(i=o.target)||void 0===i?void 0:i.attribute)||void 0===r?void 0:r.cursor)||n.rootTarget.getCursor());var u=n.clonePointerEvent(o,"pointerenter");for(u.eventPhase=u.AT_TARGET;u.target&&u.target!==n.rootTarget.parent;)u.currentTarget=u.target,n.notifyTarget(u),s&&n.notifyTarget(u,"mouseenter"),u.target=u.target.parent;a.overTargets=o.composedPath(),n.freeEvent(o),n.freeEvent(u)}else te.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event")},this.onPointerOut=function(t,e){if(t instanceof Pr){var i=n.trackingData(t.pointerId);if(i.overTargets){var r=Dr(t.pointerType),a=n.findMountedTarget(i.overTargets),o=n.createPointerEvent(t,"pointerout",a||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var s=n.createPointerEvent(t,"pointerleave",a||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==n.rootTarget.parent;)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),s.target=s.target.parent;i.overTargets=[],n.freeEvent(o),n.freeEvent(s)}n.cursorTarget=null,n.cursor=""}else te.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event")},this.onPointerUp=function(t,e){var i;if(t instanceof Pr){var r=Lr.now(),a=n.createPointerEvent(t,t.type,e);if(n.dispatchEvent(a,"pointerup"),"touch"===a.pointerType)n.dispatchEvent(a,"touchend");else if(Dr(a.pointerType)){var o=2===a.button;n.dispatchEvent(a,o?"rightup":"mouseup")}var s=n.trackingData(t.pointerId),u=n.findMountedTarget(s.pressTargetsByButton[t.button]),l=u;if(u&&!a.composedPath().includes(u)){for(var c=u;c&&!a.composedPath().includes(c);){if(a.currentTarget=c,n.notifyTarget(a,"pointerupoutside"),"touch"===a.pointerType)n.notifyTarget(a,"touchendoutside");else if(Dr(a.pointerType)){var h=2===a.button;n.notifyTarget(a,h?"rightupoutside":"mouseupoutside")}c=c.parent}delete s.pressTargetsByButton[t.button],l=c}if(l){var d=n.clonePointerEvent(a,"click");d.target=l,d.path=[],d.detailPath=[],s.clicksByButton[t.button]||(s.clicksByButton[t.button]={clickCount:0,target:d.target,timeStamp:r});var f=s.clicksByButton[t.button];f.target===d.target&&r-f.timeStamp<(null!==(i=n._config.clickInterval)&&void 0!==i?i:200)?++f.clickCount:f.clickCount=1,f.target=d.target,f.timeStamp=r,d.detail=f.clickCount,Dr(d.pointerType)?(n.dispatchEvent(d,"click"),2===f.clickCount&&n.dispatchEvent(d,"dblclick")):"touch"===d.pointerType&&(n.dispatchEvent(d,"tap"),2===f.clickCount&&n.dispatchEvent(d,"dbltap")),n.dispatchEvent(d,"pointertap"),n.freeEvent(d)}n.freeEvent(a)}else te.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event")},this.onPointerUpOutside=function(t,e){if(t instanceof Pr){var i=n.trackingData(t.pointerId),r=n.findMountedTarget(i.pressTargetsByButton[t.button]),a=n.createPointerEvent(t,t.type,e);if(r){for(var o=r;o;)a.currentTarget=o,n.notifyTarget(a,"pointerupoutside"),"touch"===a.pointerType?n.notifyTarget(a,"touchendoutside"):Dr(a.pointerType)&&n.notifyTarget(a,2===a.button?"rightupoutside":"mouseupoutside"),o=o.parent;delete i.pressTargetsByButton[t.button]}n.freeEvent(a)}else te.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event")},this.onWheel=function(t,e){if(t instanceof Or){var i=n.createWheelEvent(t,e);n.dispatchEvent(i),n.freeEvent(i)}else te.getInstance().warn("EventManager cannot map a non-wheel event as a wheel event")},this.rootTarget=e,this.mappingTable={},this._config=Object.assign({clickInterval:200},i),this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)}),[{key:"addEventMapping",value:function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))}},{key:"dispatchEvent",value:function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.dispatch.emit(e||t.type,t)}},{key:"mapEvent",value:function(t){var e,i,n,r,a,o,s;if(this.rootTarget){var u,c=this.mappingTable[t.type],h="".concat(t.canvasX,"-").concat(t.canvasY);if((null===(e=this._prePointTargetCache)||void 0===e?void 0:e[h])&&(null===(n=null===(i=this._prePointTargetCache)||void 0===i?void 0:i[h])||void 0===n?void 0:n.stage)&&(null===(a=null===(r=this._prePointTargetCache)||void 0===r?void 0:r[h])||void 0===a?void 0:a.stage.renderCount)===(null===(o=this._prePointTargetCache)||void 0===o?void 0:o.stageRenderCount)?u=this._prePointTargetCache[h]:(u=this.pickTarget(t.viewX,t.viewY,t),t.pickParams||(this._prePointTargetCache=l(l({},h,u),"stageRenderCount",null!==(s=null==u?void 0:u.stage.renderCount)&&void 0!==s?s:-1))),c)for(var d=0,f=c.length;d<f;d++)c[d].fn(t,u);else te.getInstance().warn("[EventManager]: Event mapping not defined for ".concat(t.type))}}},{key:"propagate",value:function(t,e){if(t.target){var i=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var n=0,r=i.length-1;n<r;n++)if(t.currentTarget=i[n],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){t.eventPhase=t.BUBBLING_PHASE;for(var a=i.length-2;a>=0;a--)if(t.currentTarget=i[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(t){for(var e=[t],i=0;i<2048&&t!==this.rootTarget&&t.parent;i++){if(!t.parent)throw new Error("Cannot find propagation path to disconnected target");e.push(t.parent),t=t.parent}return e.reverse(),e}},{key:"notifyTarget",value:function(t,e){if(!this.pauseNotify){e=null!=e?e:t.type;var i=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,i),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)}}},{key:"findMountedTarget",value:function(t){if(!t)return null;for(var e=t[0],i=1;i<t.length&&t[i].parent===e;i++)e=t[i];return e}},{key:"createPointerEvent",value:function(t,e,i){var n,r,a=this.allocateEvent(Pr);return this.copyPointerData(t,a),this.copyMouseData(t,a),this.copyData(t,a),a.nativeEvent=t.nativeEvent,a.originalEvent=t,a.target=i||this.pickTarget(null!==(n=a.viewX)&&void 0!==n?n:a.global.x,null!==(r=a.viewY)&&void 0!==r?r:a.global.y,a),"string"==typeof e&&(a.type=e),a}},{key:"createWheelEvent",value:function(t,e){var i,n,r=this.allocateEvent(Or);return this.copyWheelData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r.originalEvent=t,r.target=e||this.pickTarget(null!==(i=r.viewX)&&void 0!==i?i:r.global.x,null!==(n=r.viewY)&&void 0!==n?n:r.global.y,r),r}},{key:"clonePointerEvent",value:function(t,e){var i=this.allocateEvent(Pr);i.nativeEvent=t.nativeEvent,i.originalEvent=t.originalEvent,this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.target=t.target,i.path=t.composedPath().slice();var n=t.composedDetailPath();return i.detailPath=n&&n.slice(),i.type=null!=e?e:i.type,i}},{key:"copyWheelData",value:function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ}},{key:"copyPointerData",value:function(t,e){t instanceof Pr&&e instanceof Pr&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)}},{key:"copyMouseData",value:function(t,e){t instanceof Rr&&e instanceof Rr&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.shiftKey=t.shiftKey,e.metaKey=t.metaKey,["client","movement","canvas","screen","global","offset","viewport"].forEach((function(i){e[i].x=t[i].x,e[i].y=t[i].y})))}},{key:"copyData",value:function(t,e){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=Lr.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.which=t.which,e.layer.x=t.layer.x,e.layer.y=t.layer.y,e.page.x=t.page.x,e.page.y=t.page.y,e.pickParams=t.pickParams}},{key:"trackingData",value:function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}},{key:"allocateEvent",value:function(t){var e;this.eventPool.has(t)||this.eventPool.set(t,[]);var i=(null===(e=this.eventPool.get(t))||void 0===e?void 0:e.pop())||new t(this);return i.eventPhase=i.NONE,i.currentTarget=null,i.path=[],i.detailPath=[],i.target=null,i}},{key:"freeEvent",value:function(t){var e;if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventManager!");var i=t.constructor;this.eventPool.has(i)||this.eventPool.set(i,[]),null===(e=this.eventPool.get(i))||void 0===e||e.push(t)}},{key:"notifyListeners",value:function(t,e){var i=t.currentTarget._events[e];if(i)if("fn"in i)i.once&&t.currentTarget.removeEventListener(e,i.fn,{once:!0}),i.fn.call(i.context,t);else for(var n=0,r=i.length;n<r&&!t.propagationImmediatelyStopped;n++)i[n].once&&t.currentTarget.removeEventListener(e,i[n].fn,{once:!0}),i[n].fn.call(i[n].context,t);this.emitDelegation(t,e)}},{key:"emitDelegation",value:function(t,e){var i=t.currentTarget._events["*"];if(i)if("fn"in i)i.fn.call(i.context,t,e);else for(var n=0,r=i.length;n<r&&!t.propagationImmediatelyStopped;n++)i[n].fn.call(i[n].context,t,e)}},{key:"pickTarget",value:function(t,e,i){var n,r=this.rootTarget.pick(t,e);return n=r&&r.graphic?r.graphic:r&&r.group?r.group:this.rootTarget.AABBBounds.contains(t,e)?this.rootTarget:null,i&&(i.pickParams=r.params),n}},{key:"release",value:function(){this.dispatch.removeAllListeners(),this.eventPool.clear(),this.rootTarget=null,this.mappingTable=null,this.mappingState=null,this.cursorTarget=null}}])}(),Nr={dispatchEvent:function(t){var e;if(!(t instanceof Mr))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return t.defaultPrevented=!1,t.path=[],t.detailPath&&(t.detailPath=[]),t.target=this,null===(e=null==t?void 0:t.manager)||void 0===e||e.dispatchEvent(t),!t.defaultPrevented},emit:function(t,e){return this.dispatchEvent(new Ir(t,e))}},zr={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Gr=function(){return u((function t(e){var i=this;o(this,t),this.resolution=1,this.onPointerDown=function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e=i.normalizeToPointerData(t);i.autoPreventDefault&&e[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var n=0,r=e.length;n<r;n++){var a=e[n],o=i.bootstrapEvent(i.rootPointerEvent,a);i.manager.mapEvent(o)}i.setCursor(i.manager.cursor,i.manager.cursorTarget)}},this.onPointerMove=function(t){if(!(i.supportsTouchEvents&&"touch"===t.pointerType||i.isEventOutsideOfTargetElement(t))){for(var e=i.normalizeToPointerData(t),n=0,r=e.length;n<r;n++){var a=i.bootstrapEvent(i.rootPointerEvent,e[n]);i.manager.mapEvent(a)}i.setCursor(i.manager.cursor,i.manager.cursorTarget)}},this.onPointerUp=function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){for(var e=i.isEventOutsideOfTargetViewPort(t)?"outside":"",n=i.normalizeToPointerData(t),r=0,a=n.length;r<a;r++){var o=i.bootstrapEvent(i.rootPointerEvent,n[r]);o.type+=e,i.manager.mapEvent(o)}i.setCursor(i.manager.cursor,i.manager.cursorTarget)}},this.onPointerOverOut=function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){for(var e=i.normalizeToPointerData(t),n=0,r=e.length;n<r;n++){var a=i.bootstrapEvent(i.rootPointerEvent,e[n]);i.manager.mapEvent(a)}i.setCursor(i.manager.cursor,i.manager.cursorTarget)}},this.onWheel=function(t){var e=i.normalizeWheelEvent(t);i.manager.mapEvent(e)};var n=e.targetElement,r=e.resolution,a=e.rootNode,s=e.global,u=e.autoPreventDefault,l=void 0!==u&&u,c=e.clickInterval,h=e.supportsTouchEvents,d=void 0===h?s.supportsTouchEvents:h,f=e.supportsPointerEvents,v=void 0===f?s.supportsPointerEvents:f;this.manager=new Fr(a,{clickInterval:c}),this.globalObj=s,this.supportsPointerEvents=v,this.supportsTouchEvents=d,this.supportsMouseEvents=s.supportsMouseEvents,this.applyStyles=s.applyStyles,this.autoPreventDefault=l,this.eventsAdded=!1,this.rootPointerEvent=new Pr,this.rootWheelEvent=new Or,this.cursorStyles={default:"inherit",pointer:"pointer"},this.resolution=r,this.setTargetElement(n)}),[{key:"release",value:function(){this.removeEvents(),this.manager&&this.manager.release(),this.domElement=null,this.manager=null,this.globalObj=null}},{key:"setCursor",value:function(t,e){if(e||this.manager.rootTarget.window._handler.canvas.controled){t||(t="default");var i=this.applyStyles,n=this.domElement;if(this.currentCursor!==t){this.currentCursor=t;var r=this.cursorStyles[t];r?"string"==typeof r&&i?n.style.cursor=r:"function"==typeof r?r(t):"object"==a(r)&&i&&Object.assign(n.style,r):i&&bt(t)&&!Lt(this.cursorStyles,t)&&(n.style.cursor=t)}}}},{key:"setTargetElement",value:function(t){this.removeEvents(),this.domElement=t,this.addEvents()}},{key:"addEvents",value:function(){if(!this.eventsAdded&&this.domElement){var t=this.globalObj,e=this.domElement;this.supportsPointerEvents?(t.getDocument()?(t.getDocument().addEventListener("pointermove",this.onPointerMove,!0),t.getDocument().addEventListener("pointerup",this.onPointerUp,!0)):(e.addEventListener("pointermove",this.onPointerMove,!0),e.addEventListener("pointerup",this.onPointerUp,!0)),e.addEventListener("pointerdown",this.onPointerDown,!0),e.addEventListener("pointerleave",this.onPointerOverOut,!0),e.addEventListener("pointerover",this.onPointerOverOut,!0)):(t.getDocument()?(t.getDocument().addEventListener("mousemove",this.onPointerMove,!0),t.getDocument().addEventListener("mouseup",this.onPointerUp,!0)):(e.addEventListener("mousemove",this.onPointerMove,!0),e.addEventListener("mouseup",this.onPointerUp,!0)),e.addEventListener("mousedown",this.onPointerDown,!0),e.addEventListener("mouseout",this.onPointerOverOut,!0),e.addEventListener("mouseover",this.onPointerOverOut,!0)),this.supportsTouchEvents&&(e.addEventListener("touchstart",this.onPointerDown,!0),e.addEventListener("touchend",this.onPointerUp,!0),e.addEventListener("touchmove",this.onPointerMove,!0)),e.addEventListener("wheel",this.onWheel,{capture:!0}),this.eventsAdded=!0}}},{key:"removeEvents",value:function(){if(this.eventsAdded&&this.domElement){var t=this.globalObj,e=this.domElement;this.supportsPointerEvents?(t.getDocument()?(t.getDocument().removeEventListener("pointermove",this.onPointerMove,!0),t.getDocument().removeEventListener("pointerup",this.onPointerUp,!0)):(e.removeEventListener("pointermove",this.onPointerMove,!0),e.removeEventListener("pointerup",this.onPointerUp,!0)),e.removeEventListener("pointerdown",this.onPointerDown,!0),e.removeEventListener("pointerleave",this.onPointerOverOut,!0),e.removeEventListener("pointerover",this.onPointerOverOut,!0)):(t.getDocument()?(t.getDocument().removeEventListener("mousemove",this.onPointerMove,!0),t.getDocument().removeEventListener("mouseup",this.onPointerUp,!0)):(e.removeEventListener("mousemove",this.onPointerMove,!0),e.removeEventListener("mouseup",this.onPointerUp,!0)),e.removeEventListener("mousedown",this.onPointerDown,!0),e.removeEventListener("mouseout",this.onPointerOverOut,!0),e.removeEventListener("mouseover",this.onPointerOverOut,!0)),this.supportsTouchEvents&&(e.removeEventListener("touchstart",this.onPointerDown,!0),e.removeEventListener("touchend",this.onPointerUp,!0),e.removeEventListener("touchmove",this.onPointerMove,!0)),e.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}}},{key:"mapToViewportPoint",value:function(t){return this.domElement.pointTransform?this.domElement.pointTransform(t.x,t.y):t}},{key:"mapToCanvasPoint",value:function(t){var e,i,n=null===(e=this.globalObj)||void 0===e?void 0:e.mapToCanvasPoint(t,this.domElement);if(n)return n;var r=0,a=0;if(t.changedTouches){var o=null!==(i=t.changedTouches[0])&&void 0!==i?i:{};r=o.clientX||0,a=o.clientY||0}else r=t.clientX||0,a=t.clientY||0;var s=this.domElement.getBoundingClientRect();return{x:r-s.left,y:a-s.top}}},{key:"normalizeToPointerData",value:function(t){var e=[];if(this.supportsTouchEvents&&t.changedTouches&&t.changedTouches.length)for(var i=0,n=t.changedTouches.length;i<n;i++){var r=t.changedTouches[i];kt(r.button)&&(r.button=0),kt(r.buttons)&&(r.buttons=1),kt(r.isPrimary)&&(r.isPrimary=1===t.touches.length&&"touchstart"===t.type),kt(r.width)&&(r.width=r.radiusX||1),kt(r.height)&&(r.height=r.radiusY||1),kt(r.tiltX)&&(r.tiltX=0),kt(r.tiltY)&&(r.tiltY=0),kt(r.pointerType)&&(r.pointerType="touch"),kt(r.pointerId)&&(r.pointerId=r.identifier||0),kt(r.pressure)&&(r.pressure=r.force||.5),kt(r.twist)&&(r.twist=0),kt(r.tangentialPressure)&&(r.tangentialPressure=0),kt(r.layerX)&&(r.layerX=r.offsetX=r.clientX),kt(r.layerY)&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=t.type,e.push(r)}else if(!this.globalObj.supportsMouseEvents||t instanceof MouseEvent&&!(this.supportsPointerEvents&&t instanceof PointerEvent)){var a=t;kt(a.isPrimary)&&(a.isPrimary=!0),kt(a.width)&&(a.width=1),kt(a.height)&&(a.height=1),kt(a.tiltX)&&(a.tiltX=0),kt(a.tiltY)&&(a.tiltY=0),kt(a.pointerType)&&(a.pointerType="mouse"),kt(a.pointerId)&&(a.pointerId=1),kt(a.pressure)&&(a.pressure=.5),kt(a.twist)&&(a.twist=0),kt(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,e.push(a)}else e.push(t);return e}},{key:"normalizeWheelEvent",value:function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var i=this.mapToCanvasPoint(t),n=i.x,r=i.y;e.canvas.x=n,e.canvas.y=r,e.global.x=n,e.global.y=r,e.offset.x=n,e.offset.y=r;var a=this.mapToViewportPoint(e),o=a.x,s=a.y;return e.viewport.x=o,e.viewport.y=s,e.nativeEvent=t,e.type=t.type,e}},{key:"bootstrapEvent",value:function(t,e){t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.mapToCanvasPoint(e),n=i.x,r=i.y;t.canvas.x=n,t.canvas.y=r,t.global.x=n,t.global.y=r,t.offset.x=n,t.offset.y=r;var a=this.mapToViewportPoint(t),o=a.x,s=a.y;return t.viewport.x=o,t.viewport.y=s,t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=zr[t.type]||t.type),t}},{key:"transferMouseData",value:function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=Lr.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.relatedTarget=null}},{key:"isEventOutsideOfTargetViewPort",value:function(t){if(this.isEventOutsideOfTargetElement(t))return!0;if(this.domElement.getViewBox){var e=this.mapToViewportPoint(this.mapToCanvasPoint(t)),i=this.domElement.getViewBox(),n=i.width(),r=i.height();return!(e.x<n&&e.y<r&&e.x>0&&e.y>0)}return!1}},{key:"isEventOutsideOfTargetElement",value:function(t){var e=t.target;return t.composedPath&&t.composedPath().length>0&&(e=t.composedPath()[0]),e!==(this.domElement.getNativeHandler?this.domElement.getNativeHandler().nativeCanvas:this.domElement)}},{key:"pauseTriggerEvent",value:function(){this.manager.pauseNotify=!0}},{key:"resumeTriggerEvent",value:function(){this.manager.pauseNotify=!1}}])}(),Ur=function(){function t(){o(this,t),this.time=0}return u(t,[{key:"avaliable",value:function(){return t.Avaliable()}},{key:"tick",value:function(t,e){this.time=Math.max(0,t+this.time),e(this,{once:!0})}},{key:"tickTo",value:function(t,e){this.time=Math.max(0,t),e(this,{once:!0})}},{key:"release",value:function(){this.timerId>0&&(this.timerId=-1)}},{key:"getTime",value:function(){return this.time}}],[{key:"Avaliable",value:function(){return!0}}])}(),Wr=function(){function t(){o(this,t)}return u(t,[{key:"avaliable",value:function(){return t.Avaliable()}},{key:"tick",value:function(t,e){var i=this;this.timerId=setTimeout((function(){e(i)}),t)}},{key:"release",value:function(){this.timerId>0&&(clearTimeout(this.timerId),this.timerId=-1)}},{key:"getTime",value:function(){return Date.now()}}],[{key:"Avaliable",value:function(){return!0}}])}(),Vr=function(){function t(){o(this,t)}return u(t,[{key:"avaliable",value:function(){return t.Avaliable()}},{key:"tick",value:function(t,e){var i=this;Un.global.getRequestAnimationFrame()((function(){i.released||e(i)}))}},{key:"release",value:function(){this.released=!0}},{key:"getTime",value:function(){return Date.now()}}],[{key:"Avaliable",value:function(){return!!Un.global.getRequestAnimationFrame()}}])}();!function(t){t[t.INITIAL=0]="INITIAL",t[t.RUNNING=1]="RUNNING",t[t.PAUSE=2]="PAUSE"}(jr||(jr={}));var Hr=function(){return u((function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,t),this.handleTick=function(t,i){var n=(null!=i?i:{}).once,r=void 0!==n&&n;e.ifCanStop()?e.stop():(e._handlerTick(t),r||t.tick(e.interval,e.handleTick))},this._handlerTick=function(t){var i=e.tickerHandler.getTime(),n=0;e.lastFrameTime>=0&&(n=i-e.lastFrameTime),e.lastFrameTime=i,e.status===jr.RUNNING&&(e.tickCounts++,e.timelines.forEach((function(t){t.tick(n)})))},this.init(),this.lastFrameTime=-1,this.tickCounts=0,this.timelines=i,this.autoStop=!0}),[{key:"mode",get:function(){return this._mode},set:function(t){this._mode!==t&&(this._mode=t,this.setupTickHandler())}},{key:"init",value:function(){var t=this;this.interval=NaN,this.status=jr.INITIAL,Un.global.hooks.onSetEnv.tap("default-ticker",(function(){t.initHandler()})),Un.global.env&&this.initHandler()}},{key:"addTimeline",value:function(t){this.timelines.push(t)}},{key:"remTimeline",value:function(t){this.timelines=this.timelines.filter((function(e){return e!==t}))}},{key:"initHandler",value:function(){if(this._mode)return null;for(var t=[{mode:"raf",cons:Vr},{mode:"timeout",cons:Wr},{mode:"manual",cons:Ur}],e=0;e<t.length;e++)if(t[e].cons.Avaliable()){this.mode=t[e].mode;break}return null}},{key:"setupTickHandler",value:function(){var t;switch(this._mode){case"raf":t=new Vr;break;case"timeout":t=new Wr;break;case"manual":t=new Ur;break;default:te.getInstance().warn("非法的计时器模式"),t=new Vr}return!!t.avaliable()&&(this.tickerHandler&&this.tickerHandler.release(),this.tickerHandler=t,!0)}},{key:"setInterval",value:function(t){this.interval=t}},{key:"getInterval",value:function(){return this.interval}},{key:"setFPS",value:function(t){this.setInterval(1e3/t)}},{key:"getFPS",value:function(){return 1e3/this.interval}},{key:"tick",value:function(t){var e=this;this.tickerHandler.tick(t,(function(t){e.handleTick(t,{once:!0})}))}},{key:"tickTo",value:function(t){var e=this;this.tickerHandler.tickTo&&this.tickerHandler.tickTo(t,(function(t){e.handleTick(t,{once:!0})}))}},{key:"pause",value:function(){return this.status!==jr.INITIAL&&(this.status=jr.PAUSE,!0)}},{key:"resume",value:function(){return this.status!==jr.INITIAL&&(this.status=jr.RUNNING,!0)}},{key:"ifCanStop",value:function(){if(this.autoStop){if(!this.timelines.length)return!0;if(0===this.timelines.reduce((function(t,e){return t+e.animateCount}),0))return!0}return!1}},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.status===jr.RUNNING)return!1;if(!this.tickerHandler)return!1;if(!t){if(this.status===jr.PAUSE)return!1;if(!this.timelines.length)return!1;if(0===this.timelines.reduce((function(t,e){return t+e.animateCount}),0))return!1}return this.status=jr.RUNNING,this.tickerHandler.tick(0,this.handleTick),!0}},{key:"stop",value:function(){this.status=jr.INITIAL,this.setupTickHandler(),this.lastFrameTime=-1}}])}(),Xr=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"mode",get:function(){return this._mode},set:function(t){this.setupTickHandler()}},{key:"initHandler",value:function(){return this.mode="manual",null}},{key:"setupTickHandler",value:function(){var t=new Ur;return this._mode="manual",this.tickerHandler&&this.tickerHandler.release(),this.tickerHandler=t,!0}},{key:"tickAt",value:function(t){var e=this;this.tickerHandler.tick(t-this.lastFrameTime,(function(t){e.handleTick(t,{once:!0})}))}},{key:"ifCanStop",value:function(){return!1}}])}(Hr),Yr=function(){function t(){o(this,t)}return u(t,null,[{key:"linear",value:function(t){return t}},{key:"none",value:function(){return this.linear}},{key:"get",value:function(t){return t<-1?t=-1:t>1&&(t=1),function(e){return 0===t?e:t<0?e*(e*-t+1+t):e*((2-e)*t+(1-t))}}},{key:"getPowIn",value:function(t){return function(e){return Math.pow(e,t)}}},{key:"getPowOut",value:function(t){return function(e){return 1-Math.pow(1-e,t)}}},{key:"getPowInOut",value:function(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}}},{key:"getBackIn",value:function(t){return function(e){return e*e*((t+1)*e-t)}}},{key:"getBackOut",value:function(t){return function(e){return--e*e*((t+1)*e+t)+1}}},{key:"getBackInOut",value:function(t){return t*=1.525,function(e){return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}},{key:"sineIn",value:function(t){return 1-Math.cos(t*Math.PI/2)}},{key:"sineOut",value:function(t){return Math.sin(t*Math.PI/2)}},{key:"sineInOut",value:function(t){return-(Math.cos(Math.PI*t)-1)/2}},{key:"expoIn",value:function(t){return 0===t?0:Math.pow(2,10*t-10)}},{key:"expoOut",value:function(t){return 1===t?1:1-Math.pow(2,-10*t)}},{key:"expoInOut",value:function(t){return 0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2}},{key:"circIn",value:function(t){return-(Math.sqrt(1-t*t)-1)}},{key:"circOut",value:function(t){return Math.sqrt(1- --t*t)}},{key:"circInOut",value:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},{key:"bounceOut",value:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},{key:"bounceIn",value:function(e){return 1-t.bounceOut(1-e)}},{key:"bounceInOut",value:function(e){return e<.5?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5}},{key:"getElasticIn",value:function(t,e){return function(i){if(0===i||1===i)return i;var n=e/ke*Math.asin(1/t);return-t*Math.pow(2,10*(i-=1))*Math.sin((i-n)*ke/e)}}},{key:"getElasticOut",value:function(t,e){return function(i){if(0===i||1===i)return i;var n=e/ke*Math.asin(1/t);return t*Math.pow(2,-10*i)*Math.sin((i-n)*ke/e)+1}}},{key:"getElasticInOut",value:function(t,e){return function(i){var n=e/ke*Math.asin(1/t);return(i*=2)<1?t*Math.pow(2,10*(i-=1))*Math.sin((i-n)*ke/e)*-.5:t*Math.pow(2,-10*(i-=1))*Math.sin((i-n)*ke/e)*.5+1}}}])}();Yr.quadIn=Yr.getPowIn(2),Yr.quadOut=Yr.getPowOut(2),Yr.quadInOut=Yr.getPowInOut(2),Yr.cubicIn=Yr.getPowIn(3),Yr.cubicOut=Yr.getPowOut(3),Yr.cubicInOut=Yr.getPowInOut(3),Yr.quartIn=Yr.getPowIn(4),Yr.quartOut=Yr.getPowOut(4),Yr.quartInOut=Yr.getPowInOut(4),Yr.quintIn=Yr.getPowIn(5),Yr.quintOut=Yr.getPowOut(5),Yr.quintInOut=Yr.getPowInOut(5),Yr.backIn=Yr.getBackIn(1.7),Yr.backOut=Yr.getBackOut(1.7),Yr.backInOut=Yr.getBackInOut(1.7),Yr.elasticIn=Yr.getElasticIn(1,.3),Yr.elasticOut=Yr.getElasticOut(1,.3),Yr.elasticInOut=Yr.getElasticInOut(1,.3*1.5);var Kr=function(){return u((function t(){o(this,t),this.id=_.GenAutoIncrementId(),this.animateHead=null,this.animateTail=null,this.animateCount=0,this.paused=!1}),[{key:"addAnimate",value:function(t){this.animateTail?(this.animateTail.nextAnimate=t,t.prevAnimate=this.animateTail,this.animateTail=t,t.nextAnimate=null):(this.animateHead=t,this.animateTail=t),this.animateCount++}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}},{key:"tick",value:function(t){if(!this.paused){var e=this.animateHead;for(this.animateCount=0;e;)e.status===wi.END?this.removeAnimate(e):e.status===wi.RUNNING||e.status===wi.INITIAL?(this.animateCount++,e.advance(t)):e.status===wi.PAUSED&&this.animateCount++,e=e.nextAnimate}}},{key:"clear",value:function(){for(var t=this.animateHead;t;)t.release(),t=t.nextAnimate;this.animateHead=null,this.animateTail=null,this.animateCount=0}},{key:"removeAnimate",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t._onRemove&&t._onRemove.forEach((function(t){return t()})),t===this.animateHead?(this.animateHead=t.nextAnimate,t===this.animateTail?this.animateTail=null:this.animateHead.prevAnimate=null):t===this.animateTail?(this.animateTail=t.prevAnimate,this.animateTail.nextAnimate=null):(t.prevAnimate.nextAnimate=t.nextAnimate,t.nextAnimate.prevAnimate=t.prevAnimate),e&&t.release()}}])}(),qr=new Kr,Zr=function(){return u((function t(e,i,n,r,a){o(this,t),this.from=e,this.to=i,this.duration=n,this.easing=r,this.params=a,this.updateCount=0}),[{key:"bind",value:function(t,e){this.target=t,this.subAnimate=e,this.onBind()}},{key:"onBind",value:function(){}},{key:"onFirstRun",value:function(){}},{key:"onStart",value:function(){}},{key:"onEnd",value:function(){}},{key:"getEndProps",value:function(){}},{key:"getFromProps",value:function(){return this.from}},{key:"getMergedEndProps",value:function(){var t,e=this.getEndProps();return e?this._endProps===e?this._mergedEndProps:(this._endProps=e,void(this._mergedEndProps=Object.assign({},null!==(t=this.step.prev.getLastProps())&&void 0!==t?t:{},e))):this.step.prev?this.step.prev.getLastProps():e}},{key:"update",value:function(t,e,i){var n=this;if(0===this.updateCount){this.onFirstRun();var r=this.step.getLastProps();Object.keys(r).forEach((function(t){n.subAnimate.animate.validAttr(t)&&(i[t]=r[t])}))}this.updateCount+=1,this.onUpdate(t,e,i),t&&this.onEnd()}}])}(),Jr=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[null,null,0,"linear"])).cb=t,n}return c(i,t),u(i,[{key:"onUpdate",value:function(t,e,i){}},{key:"onStart",value:function(){this.cb()}}])}(Zr),$r=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.GenAutoIncrementId(),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qr;o(this,t),this.id=e,this.timeline=i,this.status=wi.INITIAL,this.tailAnimate=new ta(this),this.subAnimates=[this.tailAnimate],this.timeScale=1,this.rawPosition=-1,this._startTime=0,this._duringTime=0,this.timeline.addAnimate(this)}return u(t,[{key:"setTimeline",value:function(t){t!==this.timeline&&(this.timeline.removeAnimate(this,!1),t.addAnimate(this))}},{key:"getStartTime",value:function(){return this._startTime}},{key:"getDuration",value:function(){return this.subAnimates.reduce((function(t,e){return t+e.totalDuration}),0)}},{key:"after",value:function(t){var e=t.getDuration();return this._startTime=e,this}},{key:"afterAll",value:function(t){var e=-1/0;return t.forEach((function(t){e=we(t.getDuration(),e)})),this._startTime=e,this}},{key:"parallel",value:function(t){return this._startTime=t.getStartTime(),this}},{key:"play",value:function(t){if(this.tailAnimate.play(t),this.target){var e=this.target.stage;e&&e.renderNextFrame()}return 1===this.subAnimates.length&&this.tailAnimate.duration===t.duration&&this.trySetAttribute(t.getFromProps(),t.mode),this}},{key:"trySetAttribute",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.mode;e&&i&Si.SET_ATTR_IMMEDIATELY&&this.target.setAttributes&&this.target.setAttributes(e,!1,{type:xi.ANIMATE_PLAY})}},{key:"runCb",value:function(t){var e=this,i=new Jr((function(){t(e,i.step.prev)}));return this.tailAnimate.play(i),this}},{key:"customInterpolate",value:function(e,i,n,r,a,o){var s=t.interpolateMap.get(e)||t.interpolateMap.get("");return!!s&&s(e,i,n,r,a,o)}},{key:"pause",value:function(){this.status===wi.RUNNING&&(this.status=wi.PAUSED)}},{key:"resume",value:function(){this.status===wi.PAUSED&&(this.status=wi.RUNNING)}},{key:"to",value:function(t,e,i,n){if(this.tailAnimate.to(t,e,i,n),this.target){var r=this.target.stage;r&&r.renderNextFrame()}return this}},{key:"from",value:function(t,e,i,n){if(this.tailAnimate.from(t,e,i,n),this.target){var r=this.target.stage;r&&r.renderNextFrame()}return this}},{key:"wait",value:function(t){if(this.tailAnimate.wait(t),this.target){var e=this.target.stage;e&&e.renderNextFrame()}return this}},{key:"startAt",value:function(t){if(this.tailAnimate.startAt(t),this.target){var e=this.target.stage;e&&e.renderNextFrame()}return this}},{key:"loop",value:function(t){if(this.tailAnimate.loop=t,this.target){var e=this.target.stage;e&&e.renderNextFrame()}return this}},{key:"reversed",value:function(t){if(this.tailAnimate.reversed=t,this.target){var e=this.target.stage;e&&e.renderNextFrame()}return this}},{key:"bounce",value:function(t){if(this.tailAnimate.bounce=t,this.target){var e=this.target.stage;e&&e.renderNextFrame()}return this}},{key:"subAnimate",value:function(){var t=new ta(this,this.tailAnimate);return this.tailAnimate=t,this.subAnimates.push(t),t.bind(this.target),this}},{key:"getStartProps",value:function(){return this.subAnimates[0].getStartProps()}},{key:"getEndProps",value:function(){return this.tailAnimate.getEndProps()}},{key:"depreventAttr",value:function(t){this._preventAttrs&&this._preventAttrs.delete(t)}},{key:"preventAttr",value:function(t){this._preventAttrs||(this._preventAttrs=new Set),this._preventAttrs.add(t)}},{key:"preventAttrs",value:function(t){var e=this;t.forEach((function(t){return e.preventAttr(t)}))}},{key:"validAttr",value:function(t){return!this._preventAttrs||!this._preventAttrs.has(t)}},{key:"bind",value:function(t){return this.target=t,this.target.onAnimateBind&&this.target.onAnimateBind(this),this.subAnimates.forEach((function(e){e.bind(t)})),this}},{key:"advance",value:function(t){if(this._duringTime<this._startTime){if(this._duringTime+t*this.timeScale<this._startTime)return void(this._duringTime+=t*this.timeScale);t=this._duringTime+t*this.timeScale-this._startTime,this._duringTime=this._startTime}this.status===wi.INITIAL&&(this.status=wi.RUNNING,this._onStart&&this._onStart.forEach((function(t){return t()}))),this.setPosition(this.rawPosition+t*this.timeScale)&&this.status===wi.RUNNING&&(this.status=wi.END,this._onEnd&&this._onEnd.forEach((function(t){return t()})))}},{key:"setPosition",value:function(t){var e,i=0,n=this.rawPosition,r=this.subAnimates.reduce((function(t,e){return t+e.totalDuration}),0);t<0&&(t=0);var a=t>=r;if(a&&(t=r),t===n)return a;for(var o=0;o<this.subAnimates.length&&!(i+(e=this.subAnimates[o]).totalDuration>=t);o++)i+=e.totalDuration,e=void 0;return this.rawPosition=t,e.setPosition(t-i),a}},{key:"onStart",value:function(t){this._onStart||(this._onStart=[]),this._onStart.push(t)}},{key:"onEnd",value:function(t){this._onEnd||(this._onEnd=[]),this._onEnd.push(t)}},{key:"onRemove",value:function(t){this._onRemove||(this._onRemove=[]),this._onRemove.push(t)}},{key:"onFrame",value:function(t){this._onFrame||(this._onFrame=[]),this._onFrame.push(t)}},{key:"release",value:function(){this.status=wi.END}},{key:"stop",value:function(t){t||this.target.onStop(),"start"===t?this.target.onStop(this.getStartProps()):"end"===t?this.target.onStop(this.getEndProps()):this.target.onStop(t),this.release()}}],[{key:"AddInterpolate",value:function(e,i){t.interpolateMap.set(e,i)}}])}();$r.mode=Si.NORMAL,$r.interpolateMap=new Map;var Qr,ta=function(){return u((function t(e,i){o(this,t),this.rawPosition=-1,this.position=0,this.loop=0,this.duration=0,this.animate=e,this.stepHead=new ea(0,0,i?Object.assign({},i.stepTail.props):{}),this.stepTail=this.stepHead,this.dirty=!0,this._startAt=0}),[{key:"totalDuration",get:function(){return this.calcAttr(),this._totalDuration+this._startAt}},{key:"calcAttr",value:function(){this.dirty&&(this._totalDuration=this.duration*(this.loop+1))}},{key:"bind",value:function(t){return this.target=t,this}},{key:"play",value:function(t){var e=t.duration;(null==e||e<0)&&(e=0);var i=t.easing,n="string"==typeof i?Yr[i]:i,r=this._addStep(e,null,n);return r.type=Ai.customAnimate,this._appendProps(t.getEndProps(),r,!1),this._appendCustomAnimate(t,r),this}},{key:"to",value:function(t,e,i,n){var r=this;(null==e||e<0)&&(e=0);var a="string"==typeof i?Yr[i]:i,o=this._addStep(e,null,a);return o.type=Ai.to,this._appendProps(t,o,!!n&&n.tempProps),o.propKeys||(o.propKeys=Object.keys(o.props)),n&&n.noPreventAttrs||this.target.animates.forEach((function(t){t.id!==r.animate.id&&t.preventAttrs(o.propKeys)})),this}},{key:"from",value:function(t,e,i,n){var r=this;this.to(t,0,i,n);var a={};this.stepTail.propKeys||(this.stepTail.propKeys=Object.keys(this.stepTail.props)),this.stepTail.propKeys.forEach((function(t){a[t]=r.getLastPropByName(t,r.stepTail)})),this.to(a,e,i,n),this.stepTail.type=Ai.from}},{key:"startAt",value:function(t){return t<0&&(t=0),this._startAt=t,this}},{key:"getStartProps",value:function(){var t;return null===(t=this.stepHead)||void 0===t?void 0:t.props}},{key:"getEndProps",value:function(){return this.stepTail.props}},{key:"getLastStep",value:function(){return this._lastStep}},{key:"wait",value:function(t){if(t>0){var e=this._addStep(+t,null);e.type=Ai.wait,e.prev.customAnimate?e.props=e.prev.customAnimate.getEndProps():e.props=e.prev.props,this.target.onAddStep&&this.target.onAddStep(e)}return this}},{key:"_addStep",value:function(t,e,i){var n=new ea(this.duration,t,e,i);return this.duration+=t,this.stepTail.append(n),this.stepTail=n,n}},{key:"_appendProps",value:function(t,e,i){var n=this;e.props=i?t:Object.assign({},t);var r=e.prev,a=e.props;for(e.propKeys||(e.propKeys=Object.keys(e.props)),e.propKeys.forEach((function(t){void 0===e.props[t]&&(e.props[t]=n.target.getDefaultAttribute(t))}));r.prev;)r.props&&(r.propKeys||(r.propKeys=Object.keys(r.props)),r.propKeys.forEach((function(t){void 0===a[t]&&(a[t]=r.props[t])}))),e.propKeys=Object.keys(e.props),r=r.prev;var o=this.stepHead.props;e.propKeys||(e.propKeys=Object.keys(a)),e.propKeys.forEach((function(t){if(void 0===o[t]){var e=n.animate.getStartProps();o[t]=e[t]=n.target.getComputedAttribute(t)}})),this.target.onAddStep&&this.target.onAddStep(e)}},{key:"_appendCustomAnimate",value:function(t,e){e.customAnimate=t,t.step=e,t.bind(this.target,this)}},{key:"setPosition",value:function(t){var e,i,n,r=this.duration,a=this.loop,o=this.rawPosition,s=!1,u=null!==(e=this._startAt)&&void 0!==e?e:0;if(t<0&&(t=0),t<u)return this.rawPosition=t,!1;if(r<=0)return s=!0;if(n=(t-=u)-(i=Math.floor(t/r))*r,(s=t>=a*r+r)&&(t=(n=r)*(i=a)+r),t===o)return s;var l=!this.reversed!=!(this.bounce&&i%2);return l&&(n=r-n),this._deltaPosition=n-this.position,this.position=n,this.rawPosition=t+u,this.updatePosition(s,l),s}},{key:"updatePosition",value:function(t,e){if(this.stepHead){var i=this.stepHead.next,n=this.position,r=this.duration;if(this.target&&i){for(var a=i.next;a&&a.position<=n;)a=(i=a).next;var o=t?0===r?1:n/r:(n-i.position)/i.duration;i.easing&&(o=i.easing(o)),this.tryCallCustomAnimateLifeCycle(i,this._lastStep||(e?this.stepTail:this.stepHead),e),this.updateTarget(i,o,t),this._lastStep=i,this.animate._onFrame&&this.animate._onFrame.forEach((function(t){return t(i,o)}))}}}},{key:"tryCallCustomAnimateLifeCycle",value:function(t,e,i){if(t!==e)if(i){for(var n=e.prev;n&&n!==t;)n.customAnimate&&(n.customAnimate.onStart&&n.customAnimate.onStart(),n.customAnimate.onEnd&&n.customAnimate.onEnd()),n=t.prev;e&&e.customAnimate&&e.customAnimate.onEnd&&e.customAnimate.onEnd(),t&&t.customAnimate&&t.customAnimate.onStart&&t.customAnimate.onStart()}else{for(var r=e.next;r&&r!==t;)r.customAnimate&&(r.customAnimate.onStart&&r.customAnimate.onStart(),r.customAnimate.onEnd&&r.customAnimate.onEnd()),r=r.next;e&&e.customAnimate&&e.customAnimate.onEnd&&e.customAnimate.onEnd(),t&&t.customAnimate&&t.customAnimate.onStart&&t.customAnimate.onStart()}}},{key:"getLastPropByName",value:function(t,e){for(var i=e.prev;i;){if(i.props&&void 0!==i.props[t])return i.props[t];if(i.customAnimate){var n=i.customAnimate.getEndProps()[t];if(void 0!==n)return n}i=i.prev}return te.getInstance().warn("未知错误,step中找不到属性"),e.props[t]}},{key:"updateTarget",value:function(t,e,i){null==t.props&&null==t.customAnimate||this.target.onStep(this,this.animate,t,e,i)}}])}(),ea=function(){return u((function t(e,i,n,r){o(this,t),this.duration=i,this.position=e,this.props=n,this.easing=r}),[{key:"append",value:function(t){t.prev=this,t.next=this.next,this.next=t}},{key:"getLastProps",value:function(){for(var t=this.prev;t;){if(t.props)return t.props;if(t.customAnimate)return t.customAnimate.getMergedEndProps();t=t.prev}return null}}])}(),ia=200,na="cubicOut",ra=1e3,aa="quadInOut";!function(t){t[t.Top=1]="Top",t[t.Right=2]="Right",t[t.Bottom=4]="Bottom",t[t.Left=8]="Left",t[t.ALL=15]="ALL"}(Qr||(Qr={}));var oa=[!1,!1,!1,!1],sa=[0,0,0,0],ua=function(t){return t?_t(t)?0===t.length?0:1===t.length?t[0]:2===t.length?(sa[0]=t[0],sa[2]=t[0],sa[1]=t[1],sa[3]=t[1],sa):t:t:0},la=[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],ca=[1,2,3,0,1,2,3,0];function ha(t,e,i,n){for(;t>=ke;)t-=ke;for(;t<0;)t+=ke;for(;t>e;)e+=ke;la[0].x=i,la[1].y=i,la[2].x=-i,la[3].y=-i;var r=Math.ceil(t/ye)%4,a=Math.ceil(e/ye)%4;if(n.add(xe(t)*i,Ae(t)*i),n.add(xe(e)*i,Ae(e)*i),r!==a||e-t>ge)for(var o=!1,s=0;s<ca.length;s++)if(o||r!==ca[s]){if(o&&a===ca[s])break;if(o){var u=la[ca[s]];n.add(u.x,u.y)}}else{o=!0;var l=la[r];n.add(l.x,l.y)}}function da(t,e,i){var n=Me(t.x,t.y,e.x,e.y,i),r=n.x,a=n.y,o=Me(t.x1,t.y1,e.x1,e.y1,i),s=o.x,u=o.y,l=new Pe(r,a,s,u);return l.defined=e.defined,l}function fa(t,e,i){if(!t||!e)return[];Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]);var n=[];if(t.length>e.length){n=e.map((function(t){var e=new Pe(t.x,t.y,t.x1,t.y1);return e.defined=t.defined,e}));for(var r=0;r<e.length;r++)n[r]=da(t[r],e[r],i)}else{n=e.map((function(t){var e=new Pe(t.x,t.y,t.x1,t.y1);return e.defined=t.defined,e}));for(var a=0;a<t.length;a++)n[a]=da(t[a],e[a],i)}return n}var va=["x","y","dx","dy","scaleX","scaleY","angle","anchor","postMatrix","scrollX","scrollY"];function pa(t,e){if(_t(t)){for(var i,n=0;n<t.length&&void 0===i;n++)i=t[n][e];return i}return t[e]}var ga=function(){return u((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.TimeOut;o(this,t),this.durations=[],this.timeout=e,this.lastDate=0,this.durationsListThreshold=30}),[{key:"call",value:function(t){var e=this;return this.lastDate=Date.now(),setTimeout((function(){e.appendDuration(Date.now()-e.lastDate),t(0)}),this.timeout,!0)}},{key:"clear",value:function(t){clearTimeout(t)}},{key:"appendDuration",value:function(t){this.durations.push(t),this.durations.length>this.durationsListThreshold&&this.durations.shift(),this.timeout=Math.min(Math.max(this.durations.reduce((function(t,e){return t+e}),0)/this.durations.length,1e3/60),1e3/30)}}])}();ga.TimeOut=1e3/60;var ya,ma=new ga,ka=function(t,e){return bt(t)&&"%"===t[t.length-1]?e*(Number.parseFloat(t.substring(0,t.length-1))/100):t};!function(t){t[t.LEFT_TO_RIGHT=0]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=1]="RIGHT_TO_LEFT",t[t.TOP_TO_BOTTOM=2]="TOP_TO_BOTTOM",t[t.BOTTOM_TO_TOP=3]="BOTTOM_TO_TOP",t[t.STROKE=4]="STROKE"}(ya||(ya={}));var ba=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i,[null,null,t,"linear"])).customAnimates=n,r}return c(i,t),u(i,[{key:"initAnimates",value:function(){var t=this;this.customAnimates.forEach((function(e){e.step=t.step,e.subAnimate=t.subAnimate,e.target=t.target}))}},{key:"getEndProps",value:function(){var t={};return this.customAnimates.forEach((function(e){Object.assign(t,e.getEndProps())})),t}},{key:"onBind",value:function(){this.initAnimates(),this.customAnimates.forEach((function(t){t.onBind()}))}},{key:"onEnd",value:function(){this.customAnimates.forEach((function(t){t.onEnd()}))}},{key:"onStart",value:function(){this.customAnimates.forEach((function(t){t.onStart()}))}},{key:"onUpdate",value:function(t,e,i){this.updating||(this.updating=!0,this.customAnimates.forEach((function(n){var r=n.easing,a="string"==typeof r?Yr[r]:r;e=a(e),n.onUpdate(t,e,i)})),this.updating=!1)}}])}(Zr);function _a(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,u=(n-i)*r+i,l=(s-o)*r+o,c=(u-s)*r+s,h=(c-l)*r+l;a[0]=t,a[1]=o,a[2]=l,a[3]=h,a[4]=h,a[5]=c,a[6]=u,a[7]=n}function xa(t,e){var i=t.length,n=e.length;if(i===n)return[t,e];for(var r=[],a=[],o=i<n?t:e,s=Math.min(i,n),u=Math.abs(n-i)/6,l=(s-2)/6,c=Math.ceil(u/l),h=[o[0],o[1]],d=u,f=2;f<s;f+=6){var v=o[f-2],p=o[f-1],g=o[f],y=o[f+1],m=o[f+2],k=o[f+3],b=o[f+4],_=o[f+5];if(d<=0)h.push(g,y,m,k,b,_);else{for(var x=Math.min(d,c)+1,w=1;w<=x;w++){var S=w/x;_a(v,g,m,b,S,r),_a(p,y,k,_,S,a),v=r[3],p=a[3],h.push(r[1],a[1],r[2],a[2],v,p),g=r[5],y=a[5],m=r[6],k=a[6]}d-=x-1}}return o===t?[h,e]:[t,h]}function wa(t,e){for(var i=t||e,n=i.length,r=i[n-2],a=i[n-1],o=[],s=0;s<e.length;s+=2)o[s]=r,o[s+1]=a;return o}function Sa(t){for(var e=[],i=t.length,n=0;n<i;n+=2)e[n]=t[i-n-2],e[n+1]=t[i-n-1];return e}function Aa(t){for(var e=0,i=0,n=0,r=t.length,a=0,o=r-2;a<r;o=a,a+=2){var s=t[o],u=t[o+1],l=t[a],c=t[a+1],h=s*c-l*u;e+=h,i+=(s+l)*h,n+=(u+c)*h}return 0===e?[t[0]||0,t[1]||0,0]:[i/e/3,n/e/3,e]}function Ta(t,e,i,n){for(var r=(t.length-2)/6,a=1/0,o=0,s=t.length,u=s-2,l=0;l<r;l++){for(var c=6*l,h=0,d=0;d<s;d+=2){var f=0===d?c:(c+d-2)%u+2,v=t[f]-i[0],p=t[f+1]-i[1],g=e[d]-n[0]-v,y=e[d+1]-n[1]-p;h+=g*g+y*y}h<a&&(a=h,o=l)}return o}var Ea=function(t,e,i,n,r){re(e,n)&&re(i,r)||t.push(e,i,n,r,n,r)};function Ca(t){for(var e,i,n,r,a,o=t.commandList,s=[],u=0,l=0,c=0,h=0,d=function(t,i){e&&e.length>2&&s.push(e),e=[t,i]},f=0,v=o.length;f<v;f++){var p=o[f],g=0===f;switch(g&&(c=u=p[1],h=l=p[2],[Li.L,Li.C,Li.Q].includes(p[0])&&(e=[c,h])),p[0]){case Li.M:u=c=p[1],l=h=p[2],d(c,h);break;case Li.L:i=p[1],n=p[2],Ea(e,u,l,i,n),u=i,l=n;break;case Li.C:e.push(p[1],p[2],p[3],p[4],u=p[5],l=p[6]);break;case Li.Q:i=p[1],n=p[2],r=p[3],a=p[4],e.push(u+2/3*(i-u),l+2/3*(n-l),r+2/3*(i-r),a+2/3*(n-a),r,a),u=r,l=a;break;case Li.A:var y=p[1],m=p[2],k=p[3],b=k,_=p[4],x=p[5],w=!!p[6];i=Math.cos(_)*k+y,n=Math.sin(_)*k+m,g?d(c=i,h=n):Ea(e,u,l,i,n),u=Math.cos(x)*k+y,l=Math.sin(x)*k+m;for(var S=(w?-1:1)*Math.PI/2,A=_;w?A>x:A<x;A+=S){var T=w?Math.max(A+S,x):Math.min(A+S,x);ji(e,A,T,y,m,k,b)}break;case Li.E:var E=p[1],C=p[2],B=p[3],M=p[4],R=p[5],P=p[6],O=p[7]+P,I=!!p[8],L=!re(R,0),D=Math.cos(R),j=Math.sin(R),F=Math.cos(P)*B,N=Math.sin(P)*M;L?(i=F*D-N*j+E,n=F*j+N*D+C):(i=F+E,n=N+C),g?d(c=i,h=n):Ea(e,u,l,i,n),F=Math.cos(O)*B,N=Math.sin(O)*M,L?(u=F*D-N*j+E,l=F*j+N*D+C):(u=F+E,l=N+C);for(var z=(I?-1:1)*Math.PI/2,G=P;I?G>O:G<O;G+=z){var U=I?Math.max(G+z,O):Math.min(G+z,O);if(ji(e,G,U,E,C,B,M),L)for(var W=e.length,V=W-6;V<=W-1;V+=2)F=e[V],N=e[V+1],e[V]=(F-E)*D-(N-C)*j+E,e[V+1]=(F-E)*j+(N-C)*D+C}break;case Li.R:c=u=p[1],h=l=p[2],i=c+p[3],n=h+p[4],d(i,h),Ea(e,i,h,i,n),Ea(e,i,n,c,n),Ea(e,c,n,c,h),Ea(e,c,h,i,h);break;case Li.AT:var H=p[1],X=p[2],Y=p[3],K=p[4],q=p[5],Z=Oe.distancePP({x:u,y:l},{x:H,y:X}),J=Oe.distancePP({x:Y,y:K},{x:H,y:X}),$=((u-H)*(Y-H)+(l-X)*(K-X))/(Z*J),Q=q/Math.sin($/2),tt=(u+Y-2*H)/2,et=(l+K-2*X)/2,it=Oe.distancePP({x:tt,y:et},{x:0,y:0}),nt=H+Q*tt/it,rt=Y+Q*et/it,at=Math.sqrt(Q*Q-q*q);Ea(e,u,l,c=H+at*(u-H)/Z,h=X+at*(l-X)/Z),u=H+at*(Y-H)/J,l=X+at*(K-X)/J;var ot=Ne({x:nt,y:rt},{x:c,y:h}),st=Ne({x:nt,y:rt},{x:u,y:l});ji(e,ot,st,nt,rt,q,q);break;case Li.Z:e&&Ea(e,u,l,c,h),u=c,l=h}}return e&&e.length>2&&s.push(e),s}function Ba(t,e){for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r+=2){var a=n[r],o=n[r+1],s={x:a,y:o};e.transformPoint({x:a,y:o},s),n[r]=s.x,n[r+1]=s.y}}function Ma(t){for(var e=new yn,i=0;i<t.length;i++){var n=t[i];if(n.length>2){e.moveTo(n[0],n[1]);for(var r=2;r<n.length;r+=6)e.bezierCurveTo(n[r],n[r+1],n[r+2],n[r+3],n[r+4],n[r+5])}}return e}var Ra=function(t){if(!t)return{x:0,y:0,width:0,height:0};var e=vt(t.width)?t.x1-t.x:t.width,i=vt(t.height)?t.y1-t.y:t.height,n=0,r=0;return e<0?(n=e,e=-e):Number.isNaN(e)&&(e=0),i<0?(r=i,i=-i):Number.isNaN(i)&&(i=0),{x:n,y:r,width:e,height:i}};function Pa(t,e,i){var n,r,a=t/e;t>=e?(r=Math.ceil(Math.sqrt(i*a)),0===(n=Math.floor(i/r))&&(n=1,r=i)):(n=Math.ceil(Math.sqrt(i/a)),0===(r=Math.floor(i/n))&&(r=1,n=i));for(var o=[],s=0;s<n;s++)o.push(r);var u=i-n*r;if(u>0)for(var l=0;l<u;l+=r)l+r<u?o.push(r):o.push(u-l);return o}var Oa=function(t,e){var i=t.filter((function(t){return!1!==t.defined&&St(t.x)&&St(t.y)}));if(0===i.length)return[];if(1===i.length)return new Array(e).fill(0).map((function(t){return i[0]}));var n=[];if(e<=i.length){for(var r=i.length/e,a=0,o=0;a<e;)n.push(i[Math.floor(o)]),o+=r,a++;return n}for(var s=e-i.length,u=1/(s/(i.length-1)+1),l=0,c=0,h=t.length;c<h;c++)if(n.push(t[c]),c<h-1)for(var d=u,f=t[c].x,v=t[c].y,p=t[c+1].x,g=t[c+1].y;d<1&&l<s;)n.push({x:f+(p-f)*d,y:v+(g-v)*d}),d+=u,l+=1;return n};var Ia,La=function(t){return t.map((function(t){return{x:t.x,y:t.y}}))},Da=function(t,e,i){for(var n,r,a,o=t.length,s=[],u=0;u<o;u++){var l=t[u],c=u===o-1?t[0]:t[u+1],h=li([e.x,e.y],[i.x,i.y],[l.x,l.y],[c.x,c.y]);h&&"boolean"!=typeof h&&s.push({dot:(r=[h[0]-e.x,h[1]-e.x],a=[i.x-e.x,i.y-e.x],r[0]*a[1]-r[1]*a[0]),point:{x:h[0],y:h[1]},edgeIndex:u})}if(s.length<2)return[La(t),La(t)];s.sort((function(t,e){return t.dot-e.dot}));var d=s[0],f=s[s.length-1];d.edgeIndex>f.edgeIndex&&(d=(n=[f,d])[0],f=n[1]);for(var v=d.point,p=f.point,g=[{x:v.x,y:v.y}],y=d.edgeIndex+1;y<=f.edgeIndex;y++)g.push({x:t[y].x,y:t[y].y});g.push({x:p.x,y:p.y});for(var m=[{x:p.x,y:p.y}],k=f.edgeIndex+1,b=d.edgeIndex+o;k<=b;k++){var _=t[k%o];m.push({x:_.x,y:_.y})}return m.push({x:v.x,y:v.y}),[g,m]},ja=function t(e,i,n){if(1===i)n.push({points:e});else{var r=Math.floor(i/2),a=function(t){var e=new Le;t.forEach((function(t){e.add(t.x,t.y)}));var i=e.width(),n=e.height();if(i>=n){var r=e.x1+i/2;return Da(t,{x:r,y:e.y1},{x:r,y:e.y2})}var a=e.y1+n/2;return Da(t,{x:e.x1,y:a},{x:e.x2,y:a})}(e);t(a[0],r,n),t(a[1],i-r,n)}};!function(t){t[t.Color255=0]="Color255",t[t.Color1=1]="Color1"}(Ia||(Ia={}));var Fa=function(){function t(){o(this,t)}return u(t,null,[{key:"Get",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ia.Color1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0,1];if(i===Ia.Color1){var r=t.store1[e];if(r)return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n;var a=oi.parseColorString(e);if(a){var o=[a.r/255,a.g/255,a.b/255,a.opacity];t.store1[e]=o,t.store255[e]=[a.r,a.g,a.b,a.opacity],n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3]}return n}var s=t.store255[e];if(s)return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n;var u=oi.parseColorString(e);return u&&(t.store1[e]=[u.r/255,u.g/255,u.b/255,u.opacity],t.store255[e]=[u.r,u.g,u.b,u.opacity],n[0]=u.r,n[1]=u.g,n[2]=u.b,n[3]=u.opacity),n}},{key:"Set",value:function(e,i,n){if(i===Ia.Color1){if(t.store1[e])return;t.store1[e]=n,t.store255[e]=[Math.floor(255*n[0]),Math.floor(255*n[1]),Math.floor(255*n[2]),Math.floor(255*n[3])]}else{if(t.store255[e])return;t.store255[e]=n,t.store1[e]=[n[0]/255,n[1]/255,n[2]/255,n[3]]}}}])}();function Na(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(t)&&St(t[0])?e?"rgb(".concat(Math.round(t[0]),",").concat(Math.round(t[1]),",").concat(Math.round(t[2]),",").concat(t[3].toFixed(2),")"):"rgb(".concat(Math.round(t[0]),",").concat(Math.round(t[1]),",").concat(Math.round(t[2]),")"):t}function za(t,e,i,n,r){return Array.isArray(t)&&!St(t[0])||Array.isArray(e)&&!St(e[0])?new Array(4).fill(0).map((function(r,a){return Ga(_t(t)?t[a]:t,_t(e)?e[a]:e,i,n)})):Ga(t,e,i,n,r)}function Ga(t,e,i,n,r){if(!t||!e)return t&&Na(t)||e&&Na(e)||!1;var a,o,s=!1,u=!1;if(Array.isArray(t)?a=t:"string"==typeof t?a=Fa.Get(t,Ia.Color255):s=!0,Array.isArray(e)?o=e:"string"==typeof e?o=Fa.Get(e,Ia.Color255):u=!0,s!==u){var l=s?t:e,c=s?e:t,h=Object.assign(Object.assign({},l),{stops:l.stops.map((function(t){return Object.assign(Object.assign({},t),{color:Na(c)})}))});return s?za(l,h,i,n,r):za(h,l,i,n,r)}if(s){if(t.gradient===e.gradient){var d=t,f=e,v=d.stops,p=f.stops;if(v.length!==p.length)return!1;if("linear"===d.gradient)return function(t,e,i){var n=t.stops,r=e.stops;return{gradient:"linear",x0:t.x0+(e.x0-t.x0)*i,x1:t.x1+(e.x1-t.x1)*i,y0:t.y0+(e.y0-t.y0)*i,y1:t.y1+(e.y1-t.y1)*i,stops:new Array(n.length).fill(0).map((function(t,e){return{color:Va(n[e].color,r[e].color,i),offset:n[e].offset+(r[e].offset-n[e].offset)*i}}))}}(d,f,i);if("radial"===d.gradient)return function(t,e,i){var n=t.stops,r=e.stops;return{gradient:"radial",x0:t.x0+(e.x0-t.x0)*i,x1:t.x1+(e.x1-t.x1)*i,y0:t.y0+(e.y0-t.y0)*i,y1:t.y1+(e.y1-t.y1)*i,r0:t.r0+(e.r0-t.r0)*i,r1:t.r1+(e.r1-t.r1)*i,stops:new Array(n.length).fill(0).map((function(t,e){return{color:Va(n[e].color,r[e].color,i),offset:n[e].offset+(r[e].offset-n[e].offset)*i}}))}}(d,f,i);if("conical"===d.gradient)return function(t,e,i){var n=t.stops,r=e.stops;return{gradient:"conical",startAngle:t.startAngle+(e.startAngle-t.startAngle)*i,endAngle:t.endAngle+(e.endAngle-t.endAngle)*i,x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i,stops:new Array(n.length).fill(0).map((function(t,e){return{color:Va(n[e].color,r[e].color,i),offset:n[e].offset+(r[e].offset-n[e].offset)*i}}))}}(d,f,i)}return!1}return r&&r(a,o),Na(function(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i,t[2]+(e[2]-t[2])*i,t[3]+(e[3]-t[3])*i]}(a,o,i),n)}Fa.store255={},Fa.store1={};var Ua=[0,0,0,0],Wa=[0,0,0,0];function Va(t,e,i){return Fa.Get(t,Ia.Color255,Ua),Fa.Get(e,Ia.Color255,Wa),"rgba(".concat(Math.round(Ua[0]+(Wa[0]-Ua[0])*i),",").concat(Math.round(Ua[1]+(Wa[1]-Ua[1])*i),",").concat(Math.round(Ua[2]+(Wa[2]-Ua[2])*i),",").concat(Ua[3]+(Wa[3]-Ua[3])*i,")")}var Ha=function(t,e,i){t.forEach((function(t){if(Number.isFinite(t.to))e[t.key]=t.from+(t.to-t.from)*i;else if("fill"===t.key||"stroke"===t.key){var n=za(t.from,t.to,i,!1);n&&(e[t.key]=n)}}))},Xa=function(t,e,i){var n=[],r=[];e.clear();for(var a=0;a<t.length;a++){var o=t[a],s=o.from,u=o.to,l=o.rotation*i,c=o.fromCp,h=o.toCp,d=Math.sin(l),f=Math.cos(l);r[0]=c[0]+(h[0]-c[0])*i,r[1]=c[1]+(h[1]-c[1])*i;for(var v=0;v<s.length;v+=2){var p=s[v],g=s[v+1],y=p*(1-i)+u[v]*i,m=g*(1-i)+u[v+1]*i;n[v]=y*f-m*d+r[0],n[v+1]=y*d+m*f+r[1]}var k=n[0],b=n[1];e.moveTo(k,b);for(var _=2;_<s.length;_+=6){var x=n[_],w=n[_+1],S=n[_+2],A=n[_+3],T=n[_+4],E=n[_+5];k===x&&b===w&&S===T&&A===E?e.lineTo(T,E):e.bezierCurveTo(x,w,S,A,T,E),k=T,b=E}}},Ya=function(t,e,i){var n=t?Ca(t):[],r=Ca(e);i&&n&&(i.fromTransform&&Ba(n,i.fromTransform.clone().getInverse()),Ba(n,i.toTransfrom));var a=function(t,e){for(var i,n,r=[],a=[],o=0;o<Math.max(t.length,e.length);o++){var s,u=t[o],l=e[o],c=void 0,h=void 0;u?l?(i=c=(s=g(xa(u,l),2))[0],n=h=s[1]):(h=wa(n,u),c=u):(c=wa(i,l),h=l),r.push(c),a.push(h)}return[r,a]}(n,r),o=g(a,2),s=o[0],u=o[1];return t?function(t,e,i,n){for(var r,a=[],o=0;o<t.length;o++){var s=t[o],u=e[o],l=Aa(s),c=Aa(u);null==r&&(r=l[2]<0!=c[2]<0);var h=[],d=[],f=0,v=1/0,p=[],g=s.length;r&&(s=Sa(s));for(var y=6*Ta(s,u,l,c),m=g-2,k=0;k<m;k+=2){var b=(y+k)%m+2;h[k+2]=s[b]-l[0],h[k+3]=s[b+1]-l[1]}if(h[0]=s[y]-l[0],h[1]=s[y+1]-l[1],i>0)for(var _=n/i,x=-n/2;x<=n/2;x+=_){for(var w=Math.sin(x),S=Math.cos(x),A=0,T=0;T<s.length;T+=2){var E=h[T],C=h[T+1],B=u[T]-c[0],M=u[T+1]-c[1],R=B*S-M*w,P=B*w+M*S;p[T]=R,p[T+1]=P;var O=R-E,I=P-C;A+=O*O+I*I}if(A<v){v=A,f=x;for(var L=0;L<p.length;L++)d[L]=p[L]}}else for(var D=0;D<g;D+=2)d[D]=u[D]-c[0],d[D+1]=u[D+1]-c[1];a.push({from:h,to:d,fromCp:l,toCp:c,rotation:-f})}return a}(s,u,10,Math.PI):u.map((function(t,e){return{from:s[e],to:t,fromCp:[0,0],toCp:[0,0],rotation:0}}))},Ka=["fill","fillOpacity","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","lineDashOffset"],qa=function(t,e){if(!t||!e)return null;var i=[],n=!1;return Object.keys(t).forEach((function(r){if(Ka.includes(r)){var a=e[r];vt(a)||vt(t[r])||a===t[r]||("fill"===r||"stroke"===r?i.push({from:"string"==typeof t[r]?Fa.Get(t[r],Ia.Color255):t[r],to:"string"==typeof a?Fa.Get(a,Ia.Color255):a,key:r}):i.push({from:t[r],to:a,key:r}),n=!0)}})),n?i:null},Za=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[0,1,n,r])).morphingData=t.morphingData,a.otherAttrs=t.otherAttrs,a.saveOnEnd=t.saveOnEnd,a}return c(i,t),u(i,[{key:"getEndProps",value:function(){return{}}},{key:"onBind",value:function(){this.target.createPathProxy(),this.onUpdate(!1,0,this.target.attribute)}},{key:"onEnd",value:function(){}},{key:"onUpdate",value:function(t,e,i){var n=this.target,r="function"==typeof n.pathProxy?n.pathProxy(n.attribute):n.pathProxy;Xa(this.morphingData,r,e),this.otherAttrs&&this.otherAttrs.length&&Ha(this.otherAttrs,i,e),t&&!this.saveOnEnd&&(this.target.pathProxy=null)}}])}(Zr),Ja=function(t,e,i,n){var r,a,o;if(t&&(!t.valid||!t.toCustomPath))return __DEV__&&console.error(t," is not validate"),null;if(!e.valid||!e.toCustomPath)return __DEV__&&console.error(e," is not validate"),null;var s=null==t?void 0:t.globalTransMatrix;n&&s&&(s=n.clone().multiply(s.a,s.b,s.c,s.d,s.e,s.f));var u=Ya(null===(r=null==t?void 0:t.toCustomPath)||void 0===r?void 0:r.call(t),e.toCustomPath(),{fromTransform:s,toTransfrom:e.globalTransMatrix}),l=qa(null==t?void 0:t.attribute,e.attribute),c=e.animate(i);return(null==i?void 0:i.delay)&&c.wait(i.delay),c.play(new Za({morphingData:u,otherAttrs:l},null!==(a=null==i?void 0:i.duration)&&void 0!==a?a:ra,null!==(o=null==i?void 0:i.easing)&&void 0!==o?o:aa)),c},$a=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[0,1,n,r])).morphingData=t.morphingData,a.otherAttrs=t.otherAttrs,a}return c(i,t),u(i,[{key:"getEndProps",value:function(){return{}}},{key:"onBind",value:function(){this.addPathProxy()}},{key:"addPathProxy",value:function(){this.target.shadowRoot.forEachChildren((function(t){t.createPathProxy()})),this.onUpdate(!1,0,this.target.attribute)}},{key:"clearPathProxy",value:function(){this.target.shadowRoot.forEachChildren((function(t){t.pathProxy=null}))}},{key:"onEnd",value:function(){}},{key:"onUpdate",value:function(t,e,i){var n=this;this.target.shadowRoot.forEachChildren((function(t,i){var r;Xa(n.morphingData[i],"function"==typeof t.pathProxy?t.pathProxy(t.attribute):t.pathProxy,e),(null===(r=n.otherAttrs)||void 0===r?void 0:r[i])&&n.otherAttrs[i].length&&Ha(n.otherAttrs[i],t.attribute,e)})),t&&(this.clearPathProxy(),this.morphingData=null)}}])}(Zr),Qa=function(t){var e={};return Object.keys(t).forEach((function(i){(function(t){return va.includes(t)})(i)||(e[i]=t[i])})),e},to=function(t,e,i){var n=Qa(t.attribute),r=t.attachShadow();if(e.length)r.setTheme(l({},e[0].type,n)),e.forEach((function(t){r.appendChild(t)}));else{var a=t.AABBBounds,o=a.width(),s=a.height();r.setTheme({rect:n}),new Array(i).fill(0).forEach((function(t){var i=Un.graphicService.creator.rect({x:0,y:0,width:o,height:s});r.appendChild(i),e.push(i)}))}},eo=function(t,e,i){for(var n=[],r=i?null:Qa(t.attribute),a=t.toCustomPath(),o=0;o<e;o++){var s={path:(new yn).fromCustomPath2D(a)};n.push(Un.graphicService.creator.path(i?s:Object.assign({},r,s)))}return i&&to(t,n,e),n},io=function(t,e,i){var n=[],r=i?null:Qa(t.attribute);if("rect"===t.type)(function(t,e){for(var i=Ra(t.attribute),n=i.width,r=i.height,a=Pa(n,r,e),o=[],s=r/a.length,u=0,l=a.length;u<l;u++)for(var c=a[u],h=n/c,d=0;d<c;d++)o.push({x:0+d*h,y:0+u*s,width:h,height:s});return o})(t,e).forEach((function(t){n.push(Un.graphicService.creator.rect(i?t:Object.assign({},r,t)))}));else if("arc"===t.type)(function(t,e){for(var i=t.getParsedAngle(),n=i.startAngle,r=i.endAngle,a=t.getComputedAttribute("innerRadius"),o=t.getComputedAttribute("outerRadius"),s=Math.abs(n-r),u=Math.abs(o-a),l=Pa(s*(a+o)/2,u,e),c=[],h=u/l.length,d=o>=a?1:-1,f=r>=n?1:-1,v=0,p=l.length;v<p;v++)for(var g=l[v],y=s/g,m=0;m<g;m++)c.push({innerRadius:o-h*v*d,outerRadius:o-h*(v+1)*d,startAngle:n+y*m*f,endAngle:n+y*(m+1)*f});return c})(t,e).forEach((function(t){n.push(Un.graphicService.creator.arc(i?t:Object.assign({},r,t)))}));else if("circle"===t.type)(function(t,e){for(var i=t.getComputedAttribute("startAngle"),n=t.getComputedAttribute("endAngle"),r=t.getComputedAttribute("radius"),a=Math.abs(i-n),o=Pa(a*r,r,e),s=[],u=a/o[0],l=r/o.length,c=n>=i?1:-1,h=0,d=o.length;h<d;h++)for(var f=0,v=o[h];f<v;f++)s.push({innerRadius:l*h,outerRadius:l*(h+1),startAngle:i+u*f*c,endAngle:i+u*(f+1)*c});return s})(t,e).forEach((function(t){n.push(Un.graphicService.creator.arc(i?t:Object.assign({},r,t)))}));else if("line"===t.type){var a=function(t,e){var i=t.attribute,n=i.points;if(n)return Oa(n,e);if(i.segments){var r=i.segments.reduce((function(t,e){var i;return t.concat(null!==(i=e.points)&&void 0!==i?i:[])}),[]);return Oa(r,e)}return[]}(t,e),o={size:10,symbolType:"circle"};a.forEach((function(t){n.push(Un.graphicService.creator.symbol(i?Object.assign({},t,o):Object.assign({},r,t,o)))}))}else"polygon"===t.type?function(t,e){var i=t.attribute.points;if(!i||!i.length)return[];if(1===e)return[{points:La(i)}];var n=[];return ja(i,e,n),n}(t,e).forEach((function(t){n.push(Un.graphicService.creator.polygon(i?t:Object.assign({},r,t)))})):"area"===t.type?function(t,e){var i,n,r=t.attribute,a=r.points,o=r.segments;a||(a=o.reduce((function(t,e){var i;return t.concat(null!==(i=e.points)&&void 0!==i?i:[])}),[]));var s=a.filter((function(t){return!1!==t.defined&&St(t.x)&&St(t.y)}));if(!s.length)return[];var u=[];s.forEach((function(t){u.push({x:t.x,y:t.y})}));for(var l=s.length-1;l>=0;l--){var c=s[l];u.push({x:null!==(i=c.x1)&&void 0!==i?i:c.x,y:null!==(n=c.y1)&&void 0!==n?n:c.y})}var h=[];return ja(a,e,h),h}(t,e).forEach((function(t){n.push(Un.graphicService.creator.polygon(i?t:Object.assign({},r,t)))})):"path"===t.type&&function(t,e){var i=Ca(t.getParsedPathShape());if(!i.length||e<0)return[];var n=i.length;if(i.length>=e){for(var r=[],a=Math.floor(i.length/e),o=0;o<e;o++){var s=i.slice(o*a,o===e-1?n:(o+1)*a);r.push({path:Ma(s)})}return r}for(var u=[],l=Math.floor(e/n),c=e,h=0;h<n;h++){for(var d=[],f=2,v=i[h].length;f<v;f+=2)d.push({x:i[0][f],y:i[0][f+1]});ja(d,h===n-1?c:l,u),c-=l}return u}(t,e).forEach((function(t){"path"in t?n.push(Un.graphicService.creator.path(i?t:Object.assign({},r,t))):n.push(Un.graphicService.creator.polygon(i?t:Object.assign({},r,t)))}));return i&&to(t,n,e),n},no=function(){function t(){o(this,t)}return u(t,null,[{key:"GetImage",value:function(e,i){var n,r=t.cache.get(e);r?"fail"===r.loadState?Un.global.getRequestAnimationFrame()((function(){i.imageLoadFail(e)})):"init"===r.loadState||"loading"===r.loadState?null===(n=r.waitingMark)||void 0===n||n.push(i):i&&i.imageLoadSuccess(e,r.data):t.loadImage(e,i)}},{key:"GetSvg",value:function(e,i){var n,r=t.cache.get(e);r?"fail"===r.loadState?Un.global.getRequestAnimationFrame()((function(){i.imageLoadFail(e)})):"init"===r.loadState||"loading"===r.loadState?null===(n=r.waitingMark)||void 0===n||n.push(i):i&&i.imageLoadSuccess(e,r.data):(r={type:"image",loadState:"init"},t.cache.set(e,r),r.dataPromise=Un.global.loadSvg(e),r.dataPromise?(r.waitingMark=[i],r.dataPromise.then((function(t){var i;r.loadState=(null==t?void 0:t.data)?"success":"fail",r.data=null==t?void 0:t.data,null===(i=r.waitingMark)||void 0===i||i.map((function(i,n){(null==t?void 0:t.data)?(r.loadState="success",r.data=t.data,i.imageLoadSuccess(e,t.data)):(r.loadState="fail",i.imageLoadFail(e))}))}))):(r.loadState="fail",i.imageLoadFail(e)))}},{key:"GetFile",value:function(e,i){var n=t.cache.get(e);return n?"init"===n.loadState||"fail"===n.loadState?Promise.reject():"loading"===n.loadState?n.dataPromise.then((function(t){return t.data})):Promise.resolve(n.data):(n={type:i,loadState:"init"},t.cache.set(e,n),"arrayBuffer"===i?n.dataPromise=Un.global.loadArrayBuffer(e):"blob"===i?n.dataPromise=Un.global.loadBlob(e):"json"===i&&(n.dataPromise=Un.global.loadJson(e)),n.dataPromise.then((function(t){return t.data})))}},{key:"loading",value:function(){var e=this;setTimeout((function(){if(!t.isLoading&&t.toLoadAueue.length){t.isLoading=!0;var i=t.toLoadAueue.splice(0,10),n=[];i.forEach((function(e){var i=e.url,r=e.marks,a={type:"image",loadState:"init"};if(t.cache.set(i,a),a.dataPromise=Un.global.loadImage(i),a.dataPromise){a.waitingMark=r;var o=a.dataPromise.then((function(t){var e;a.loadState=(null==t?void 0:t.data)?"success":"fail",a.data=null==t?void 0:t.data,null===(e=a.waitingMark)||void 0===e||e.map((function(e,n){(null==t?void 0:t.data)?(a.loadState="success",a.data=t.data,e.imageLoadSuccess(i,t.data)):(a.loadState="fail",e.imageLoadFail(i))}))}));n.push(o)}else a.loadState="fail",r.forEach((function(t){return t.imageLoadFail(i)}))})),Promise.all(n).then((function(){t.isLoading=!1,e.onLoadSuccessCb.forEach((function(t){return t()})),t.loading()})).catch((function(i){console.error(i),t.isLoading=!1,e.onLoadSuccessCb.forEach((function(t){return t()})),t.loading()}))}}),0)}},{key:"loadImage",value:function(e,i){var n=ro(e,t.toLoadAueue);if(-1!==n)return t.toLoadAueue[n].marks.push(i),void t.loading();t.toLoadAueue.push({url:e,marks:[i]}),t.loading()}},{key:"improveImageLoading",value:function(e){var i=ro(e,t.toLoadAueue);if(-1!==i){var n=t.toLoadAueue.splice(i,1);t.toLoadAueue.unshift(n[0])}}},{key:"onLoadSuccess",value:function(t){this.onLoadSuccessCb.push(t)}}])}();function ro(t,e){for(var i=0;i<e.length;i++)if(e[i].url===t)return i;return-1}no.cache=new Map,no.isLoading=!1,no.toLoadAueue=[],no.onLoadSuccessCb=[];var ao=new ze,oo=new De,so=["lineWidth","scaleX","scaleY","angle","anchor","visible"],uo=["x","y"],lo=["scaleX","scaleY"],co=["angle"],ho=new Pe,fo={strokeSeg:1,boundsPadding:2,pickMode:1,boundsMode:1,customPickShape:1,pickable:1,childrenPickable:1,visible:1,zIndex:1,layout:1,keepDirIn3d:1,globalZIndex:1,outerBorder:1,innerBorder:1,lineDash:1,lineCap:1,lineJoin:1,miterLimit:2,strokeBoundsBuffer:2,scaleCenter:1,anchor:1,anchor3d:1,postMatrix:1,backgroundMode:2,background:1,texture:1,cursor:1,html:1},vo=function(t){function i(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,i),(t=e(this,i))._AABBBounds=new De,t._updateTag=bi.INIT,t.attribute=r,t.valid=t.isValid(),r.background?t.loadImage(null!==(n=r.background.background)&&void 0!==n?n:r.background,!0):r.shadowGraphic&&t.setShadowGraphic(r.shadowGraphic),t}return c(i,t),u(i,[{key:"AABBBounds",get:function(){return this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode)}},{key:"OBBBounds",get:function(){return this.tryUpdateOBBBounds()}},{key:"globalAABBBounds",get:function(){return this.tryUpdateGlobalAABBBounds()}},{key:"transMatrix",get:function(){return this.tryUpdateLocalTransMatrix(!0)}},{key:"globalTransMatrix",get:function(){return this.tryUpdateGlobalTransMatrix(!0)}},{key:"setMode",value:function(t){"3d"===t?this.set3dMode():this.set2dMode()}},{key:"set3dMode",value:function(){this.in3dMode=!0}},{key:"set2dMode",value:function(){this.in3dMode=!1}},{key:"getOffsetXY",value:function(t){var e,i,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attribute,a=r.dx,o=void 0===a?t.dx:a,s=r.dy,u=void 0===s?t.dy:s;if(n&&this.parent){var l=this.parent.attribute;ho.x=o+(null!==(e=l.scrollX)&&void 0!==e?e:0),ho.y=u+(null!==(i=l.scrollY)&&void 0!==i?i:0)}else ho.x=o,ho.y=u;return ho}},{key:"onAnimateBind",value:function(t){this._emitCustomEvent("animate-bind",t)}},{key:"tryUpdateAABBBounds",value:function(t){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;if(!this.valid)return this._AABBBounds.clear(),this._AABBBounds;Un.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);var e=this.doUpdateAABBBounds(t);return Un.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,!0),e}},{key:"combindShadowAABBBounds",value:function(t){if(this.shadowRoot){var e=this.shadowRoot.AABBBounds.clone();t.union(e)}}},{key:"tryUpdateGlobalAABBBounds",value:function(){var t=this.AABBBounds;return this._globalAABBBounds?this._globalAABBBounds.setValue(t.x1,t.y1,t.x2,t.y2):this._globalAABBBounds=t.clone(),this._globalAABBBounds.empty()||this.parent&&this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix),this._globalAABBBounds}},{key:"tryUpdateGlobalTransMatrix",value:function(){if(this._globalTransMatrix){if(this.parent){var t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();return this.shouldUpdateGlobalMatrix()&&this.doUpdateGlobalMatrix(),this._globalTransMatrix}},{key:"shouldUpdateGlobalMatrix",value:function(){return!0}},{key:"tryUpdateLocalTransMatrix",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._transMatrix||(this._transMatrix=new ze),this.shouldUpdateLocalMatrix()&&(this.doUpdateLocalMatrix(),t&&this.clearUpdateLocalPositionTag()),this._transMatrix}},{key:"shouldUpdateAABBBounds",value:function(){return this.shadowRoot?!!(this._updateTag&bi.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&bi.UPDATE_BOUNDS)}},{key:"shouldSelfChangeUpdateAABBBounds",value:function(){return this.shadowRoot?!!(this._updateTag&bi.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&bi.UPDATE_BOUNDS)}},{key:"shouldUpdateLocalMatrix",value:function(){return!!(this._updateTag&bi.UPDATE_LOCAL_MATRIX)}},{key:"isValid",value:function(){var t,e,i=this.attribute;return Number.isFinite((null!==(t=i.x)&&void 0!==t?t:0)+(null!==(e=i.y)&&void 0!==e?e:0))}},{key:"_validNumber",value:function(t){return null==t||Number.isFinite(t)}},{key:"shouldUpdateShape",value:function(){return!!(this._updateTag&bi.UPDATE_SHAPE)}},{key:"clearUpdateShapeTag",value:function(){this._updateTag&=bi.CLEAR_SHAPE}},{key:"containsPoint",value:function(t,e,i,n){if(!n)return!1;if(i===_i.GLOBAL){var r=new Pe(t,e);this.parent&&this.parent.globalTransMatrix.transformPoint(r,r),t=r.x,e=r.y}return n.containsPoint(this,{x:t,y:e})}},{key:"setAttributes",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;(t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,i)||t).background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._setAttributes(t,e,i)}},{key:"_setAttributes",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,n=Object.keys(t),r=0;r<n.length;r++){var a=n[r];this.attribute[a]=t[a]}this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(n)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i)}},{key:"setAttribute",value:function(t,e,i,n){var r,a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(l({},t,e),this.attribute,t,n);a?this._setAttributes(a,i,n):vt(null===(r=this.normalAttrs)||void 0===r?void 0:r[t])?(this.attribute[t]=e,this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!i&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n)):this.normalAttrs[t]=e,"background"===t?this.loadImage(e,!0):"shadowGraphic"===t&&this.setShadowGraphic(e)}},{key:"needUpdateTags",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:so,i=0;i<e.length;i++){var n=e[i];if(-1!==t.indexOf(n))return!0}return!1}},{key:"needUpdateTag",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:so,i=0;i<e.length;i++)if(t===e[i])return!0;return!1}},{key:"initAttributes",value:function(t){var e={type:xi.INIT};t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,e)||t,this.attribute=t,t.background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._updateTag=bi.INIT,this.valid=this.isValid(),this.onAttributeUpdate(e)}},{key:"translate",value:function(t,e){var i,n;if(0===t&&0===e)return this;var r={type:xi.TRANSLATE},a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,uo,r);a&&(t=a.x,e=a.y,delete a.x,delete a.y,this._setAttributes(a));var o=this.attribute,s=o.postMatrix;return s?Un.transformUtil.fromMatrix(s,s).translate(t,e):(o.x=(null!==(i=o.x)&&void 0!==i?i:bn.x)+t,o.y=(null!==(n=o.y)&&void 0!==n?n:bn.y)+e),this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(r),this}},{key:"translateTo",value:function(t,e){var i=this.attribute;if(i.x===t&&i.y===e)return this;var n={type:xi.TRANSLATE_TO},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,uo,n);return r?(this._setAttributes(r,!1,n),this):(i.x=t,i.y=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this)}},{key:"scale",value:function(t,e,i){var n,r;if(1===t&&1===e)return this;var a={type:xi.SCALE},o=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e,scaleCenter:i},this.attribute,lo,a);o&&(t=o.scaleX,e=o.scaleY,delete o.scaleX,delete o.scaleY,this._setAttributes(o));var s=this.attribute;if(i){var u=this.attribute.postMatrix;u||(u=new ze,s.postMatrix=u),Un.transformUtil.fromMatrix(u,u).scale(t,e,i)}else s.scaleX=(null!==(n=s.scaleX)&&void 0!==n?n:bn.scaleX)*t,s.scaleY=(null!==(r=s.scaleY)&&void 0!==r?r:bn.scaleY)*e;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(a),this}},{key:"scaleTo",value:function(t,e){var i=this.attribute;if(i.scaleX===t&&i.scaleY===e)return this;var n={type:xi.SCALE_TO},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e},this.attribute,lo,n);return r?(this._setAttributes(r,!1,n),this):(i.scaleX=t,i.scaleY=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this)}},{key:"rotate",value:function(t,e){var i;if(0===t)return this;var n={type:xi.ROTATE},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({angle:t,rotateCenter:e},this.attribute,co,n);r&&(delete r.angle,this._setAttributes(r,!1,n));var a=this.attribute;if(e){var o=this.attribute.postMatrix;o||(o=new ze,a.postMatrix=o),Un.transformUtil.fromMatrix(o,o).rotate(t,e)}else a.angle=(null!==(i=a.angle)&&void 0!==i?i:bn.angle)+t;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this}},{key:"rotateTo",value:function(t){var e=this.attribute;if(e.angle===t)return this;var i={type:xi.ROTATE_TO},n=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,co,i);return n?(this._setAttributes(n,!1,i),this):(e.angle=t,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this)}},{key:"skewTo",value:function(t,e){return this}},{key:"animate",value:function(t){var e=this;this.animates||(this.animates=new Map);var i=new $r(null==t?void 0:t.id,this.stage&&this.stage.getTimeline()).bind(this);if(t){var n=t.onStart,r=t.onFrame,a=t.onEnd,o=t.onRemove;null!=n&&i.onStart(n),null!=r&&i.onFrame(r),null!=a&&i.onEnd(a),null!=o&&i.onRemove(o),i.interpolateFunc=t.interpolate}return this.animates.set(i.id,i),i.onRemove((function(){e.animates.delete(i.id)})),i}},{key:"onAttributeUpdate",value:function(t){t&&t.skipUpdateCallback||(Un.graphicService.onAttributeUpdate(this),this._emitCustomEvent("afterAttributeUpdate",t))}},{key:"update",value:function(t){t?(t.bounds&&this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),t.trans&&this.tryUpdateLocalTransMatrix()):(this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),this.tryUpdateLocalTransMatrix())}},{key:"hasState",value:function(t){return!(!this.currentStates||!this.currentStates.length)&&(!!vt(t)||this.currentStates.includes(t))}},{key:"getState",value:function(t){var e;return null===(e=this.states)||void 0===e?void 0:e[t]}},{key:"applyStateAttrs",value:function(t,e,i,n){var r,a,o,s,u=this;if(i){var l,c=Object.keys(t),h=this.getNoWorkAnimateAttr(),d={};c.forEach((function(e){h[e]?(l||(l={}),l[e]=t[e]):d[e]=n&&void 0===t[e]?u.getDefaultAttribute(e):t[e]}));var f=this.animate();f.stateNames=e,f.to(d,null!==(a=null===(r=this.stateAnimateConfig)||void 0===r?void 0:r.duration)&&void 0!==a?a:ia,null!==(s=null===(o=this.stateAnimateConfig)||void 0===o?void 0:o.easing)&&void 0!==s?s:na),l&&this.setAttributes(l,!1,{type:xi.STATE})}else this.stopStateAnimates(),this.setAttributes(t,!1,{type:xi.STATE})}},{key:"updateNormalAttrs",value:function(t){var e=this,i={};this.normalAttrs?(Object.keys(t).forEach((function(t){t in e.normalAttrs?(i[t]=e.normalAttrs[t],delete e.normalAttrs[t]):i[t]=e.getNormalAttribute(t)})),Object.keys(this.normalAttrs).forEach((function(i){t[i]=e.normalAttrs[i]}))):Object.keys(t).forEach((function(t){i[t]=e.getNormalAttribute(t)})),this.normalAttrs=i}},{key:"stopStateAnimates",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";this.animates&&this.animates.forEach((function(i){i.stateNames&&(i.stop(e),t.animates.delete(i.id))}))}},{key:"getNormalAttribute",value:function(t){var e=this.attribute[t];return this.animates&&this.animates.forEach((function(i){if(i.stateNames){var n=i.getEndProps();Lt(n,t)&&(e=n[t])}})),e}},{key:"clearStates",value:function(t){this.hasState()&&this.normalAttrs?(this.currentStates=[],this.applyStateAttrs(this.normalAttrs,this.currentStates,t,!0)):this.currentStates=[],this.normalAttrs=null}},{key:"removeState",value:function(t,e){if((this.currentStates?this.currentStates.indexOf(t):-1)>=0){var i=this.currentStates.filter((function(e){return e!==t}));this.useStates(i,e)}}},{key:"toggleState",value:function(t,e){if(this.hasState(t))this.removeState(t,e);else if((this.currentStates?this.currentStates.indexOf(t):-1)<0){var i=this.currentStates?this.currentStates.slice():[];i.push(t),this.useStates(i,e)}}},{key:"addState",value:function(t,e,i){var n;if(!this.currentStates||!this.currentStates.includes(t)||!e&&1!==this.currentStates.length){var r=e&&(null===(n=this.currentStates)||void 0===n?void 0:n.length)?this.currentStates.concat([t]):[t];this.useStates(r,i)}}},{key:"useStates",value:function(t,e){var i,n=this;if(t.length){if((null===(i=this.currentStates)||void 0===i?void 0:i.length)!==t.length||t.some((function(t,e){return n.currentStates[e]!==t}))){var r={};t.forEach((function(e){var i,a=n.stateProxy?n.stateProxy(e,t):null===(i=n.states)||void 0===i?void 0:i[e];a&&Object.assign(r,a)})),this.updateNormalAttrs(r),this.currentStates=t,this.applyStateAttrs(r,t,e)}}else this.clearStates(e)}},{key:"addUpdateBoundTag",value:function(){this._updateTag|=bi.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}},{key:"addUpdateShapeTag",value:function(){this._updateTag|=bi.UPDATE_SHAPE}},{key:"addUpdateShapeAndBoundsTag",value:function(){this._updateTag|=bi.UPDATE_SHAPE_AND_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}},{key:"updateShapeAndBoundsTagSetted",value:function(){return(this._updateTag&bi.UPDATE_SHAPE_AND_BOUNDS)===bi.UPDATE_SHAPE_AND_BOUNDS}},{key:"clearUpdateBoundTag",value:function(){this._updateTag&=bi.CLEAR_BOUNDS}},{key:"addUpdatePositionTag",value:function(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=bi.UPDATE_GLOBAL_LOCAL_MATRIX}},{key:"addUpdateGlobalPositionTag",value:function(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=bi.UPDATE_GLOBAL_MATRIX}},{key:"clearUpdateLocalPositionTag",value:function(){this._updateTag&=bi.CLEAR_LOCAL_MATRIX}},{key:"clearUpdateGlobalPositionTag",value:function(){this._updateTag&=bi.CLEAR_GLOBAL_MATRIX}},{key:"addUpdateLayoutTag",value:function(){this._updateTag|=bi.UPDATE_LAYOUT}},{key:"clearUpdateLayoutTag",value:function(){this._updateTag&=bi.CLEAR_LAYOUT}},{key:"needUpdateLayout",value:function(){return!!(this._updateTag&bi.UPDATE_LAYOUT)}},{key:"getAnchor",value:function(t,e){var i=this,n=[0,0],r=function(){if(e.b)return e.b;var t=i.attribute,n=t.scaleX,r=t.scaleY,a=t.angle;return oo.copy(i._AABBBounds),i.setAttributes({scaleX:1,scaleY:1,angle:0}),e.b=i.AABBBounds.clone(),i._AABBBounds.copy(oo),i.setAttributes({scaleX:n,scaleY:r,angle:a}),e.b};if("string"==typeof t[0]){var a=parseFloat(t[0])/100,o=r();n[0]=o.x1+(o.x2-o.x1)*a}else n[0]=t[0];if("string"==typeof t[1]){var s=parseFloat(t[1])/100,u=r();n[1]=u.y1+(u.y2-u.y1)*s}else n[1]=t[1];return n}},{key:"doUpdateLocalMatrix",value:function(){var t=this.attribute,e=t.x,i=void 0===e?bn.x:e,n=t.y,r=void 0===n?bn.y:n,a=t.scaleX,o=void 0===a?bn.scaleX:a,s=t.scaleY,u=void 0===s?bn.scaleY:s,l=t.angle,c=void 0===l?bn.angle:l,h=t.scaleCenter,d=t.anchor,f=t.postMatrix,v=[0,0],p={};if(d&&(v=this.getAnchor(d,p)),!h||1===o&&1===u)!function(t,e,i,n,r,a,o,s){var u,l,c=e.a,h=e.b,d=e.c,f=e.d,v=e.e,p=e.f,g=xe(o),y=Ae(o);s?(u=s[0],l=s[1]):(u=i,l=n);var m=u-i,k=l-n,b=c*g+d*y,_=h*g+f*y,x=d*g-c*y,w=f*g-h*y;t.a=r*b,t.b=r*_,t.c=a*x,t.d=a*w,t.e=v+c*u+d*l-b*m-x*k,t.f=p+h*u+f*l-_*m-w*k}(this._transMatrix,this._transMatrix.reset(),i,r,o,u,c,d&&v);else{var g=this._transMatrix;g.reset(),g.translate(v[0],v[1]),g.rotate(c),g.translate(-v[0],-v[1]),g.translate(i,r),v=this.getAnchor(h,p),Un.transformUtil.fromMatrix(g,g).scale(o,u,{x:v[0],y:v[1]})}var y=this.getOffsetXY(bn);if(this._transMatrix.e+=y.x,this._transMatrix.f+=y.y,f){var m=ao.setValue(f.a,f.b,f.c,f.d,f.e,f.f),k=this._transMatrix;m.multiply(k.a,k.b,k.c,k.d,k.e,k.f),k.setValue(m.a,m.b,m.c,m.d,m.e,m.f)}}},{key:"doUpdateGlobalMatrix",value:function(){if(this.parent){this._globalTransMatrix.multiply(this.transMatrix.a,this.transMatrix.b,this.transMatrix.c,this.transMatrix.d,this.transMatrix.e,this.transMatrix.f);var t=this.parent.attribute,e=t.scrollX,i=void 0===e?0:e,n=t.scrollY,r=void 0===n?0:n;this._globalTransMatrix.translate(i,r)}}},{key:"setStage",value:function(t,e){if(this.stage!==t){if(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this.animates&&this.animates.size){var i=t.getTimeline();this.animates.forEach((function(t){t.setTimeline(i)}))}this._onSetStage&&this._onSetStage(this,t,e),Un.graphicService.onSetStage(this,t)}}},{key:"setStageToShadowRoot",value:function(t,e){this.shadowRoot&&this.shadowRoot.setStage(t,e)}},{key:"onAddStep",value:function(t){}},{key:"onStop",value:function(t){t&&this.setAttributes(t,!1,{type:xi.ANIMATE_END})}},{key:"onStep",value:function(t,e,i,n,r){var a={};if(i.customAnimate)i.customAnimate.update(r,n,a);else{var o=i.props,s=i.parsedProps,u=i.propKeys;this.stepInterpolate(t,e,a,i,n,r,o,void 0,s,u)}this.setAttributes(a,!1,{type:xi.ANIMATE_UPDATE,animationState:{ratio:n,end:r,step:i,isFirstFrameOfStep:t.getLastStep()!==i}}),this.stage&&this.stage.renderNextFrame()}},{key:"stepInterpolate",value:function(t,e,i,n,r,a,o,s,u,l){var c=this;l||(l=Object.keys(o),n.propKeys=l),a?n.propKeys.forEach((function(t){e.validAttr(t)&&(i[t]=o[t])})):l.forEach((function(a){var l;if(e.validAttr(a)){var h=o[a],d=null!==(l=s&&s[a])&&void 0!==l?l:t.getLastPropByName(a,n);if(null!=h&&null!=d)e.interpolateFunc&&e.interpolateFunc(a,r,d,h,i)||(e.customInterpolate(a,r,d,h,c,i)||c.defaultInterpolate(h,d,a,i,u,r)||c._interpolate(a,r,d,h,i));else i[a]=h}})),n.parsedProps=u}},{key:"defaultInterpolate",value:function(t,e,i,n,r,a){if(Number.isFinite(t))return n[i]=e+(t-e)*a,!0;if("fill"===i){r||(r={});var o=r.fillColorArray,s=za(e,null!=o?o:t,a,!1,(function(t,e){r.fillColorArray=e}));return s&&(n[i]=s),!0}if("stroke"===i){r||(r={});var u=r.strokeColorArray,l=za(e,null!=u?u:t,a,!1,(function(t,e){r.strokeColorArray=e}));return l&&(n[i]=l),!0}if("shadowColor"===i){r||(r={});var c=r.shadowColorArray,h=za(e,null!=c?c:t,a,!0,(function(t,e){r.shadowColorArray=e}));return h&&(n[i]=h),!0}return!1}},{key:"_interpolate",value:function(t,e,i,n,r){}},{key:"getDefaultAttribute",value:function(t){return Er(this)[this.type][t]}},{key:"getComputedAttribute",value:function(t){var e;return null!==(e=this.attribute[t])&&void 0!==e?e:this.getDefaultAttribute(t)}},{key:"onSetStage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._onSetStage=t,e&&this.stage&&t(this,this.stage)}},{key:"attachShadow",value:function(t){return t&&(t.shadowHost=this),this.shadowRoot=null!=t?t:Un.graphicService.creator.shadowRoot(this),this.addUpdateBoundTag(),this.shadowRoot.setStage(this.stage,this.layer),this.shadowRoot}},{key:"detachShadow",value:function(){this.shadowRoot&&(this.addUpdateBoundTag(),this.shadowRoot=null)}},{key:"toJson",value:function(){return{attribute:this.attribute,_uid:this._uid,type:this.type,name:this.name,children:this.children.map((function(t){return t.toJson()}))}}},{key:"createPathProxy",value:function(t){return bt(t,!0)?this.pathProxy=(new yn).fromString(t):this.pathProxy=new yn,this.pathProxy}},{key:"loadImage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(!t||e&&function(t){return!(!t.fill&&!t.stroke)}(t))){var i=t;this.resources||(this.resources=new Map);var n={data:"init",state:null};this.resources.set(i,n),"string"==typeof t?(n.state="loading",t.startsWith("<svg")?(no.GetSvg(t,this),this.backgroundImg=this.backgroundImg||e):(Tt(t)||t.includes("/")||Et(t))&&(no.GetImage(t,this),this.backgroundImg=this.backgroundImg||e)):gt(t)?(n.state="success",n.data=t,this.backgroundImg=this.backgroundImg||e):n.state="fail"}}},{key:"setShadowGraphic",value:function(t){t?this.attachShadow().add(t):this.detachShadow()}},{key:"imageLoadSuccess",value:function(t,e,i){if(this.resources){var n=this.resources.get(t);n&&(n.state="success",n.data=e,i&&i(),this.addUpdateBoundTag(),this.stage&&this.stage.renderNextFrame())}}},{key:"imageLoadFail",value:function(t,e){if(this.resources){var i=this.resources.get(t);i&&(i.state="fail",e&&e())}}},{key:"_stopAnimates",value:function(t){t&&t.forEach((function(t){t.stop()}))}},{key:"stopAnimates",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._stopAnimates(this.animates),this.shadowRoot&&this.shadowRoot.stopAnimates(!0),this.isContainer&&t&&this.forEachChildren((function(e){e.stopAnimates(t)}))}},{key:"release",value:function(){this.releaseStatus="released",Un.graphicService.onRelease(this)}},{key:"_emitCustomEvent",value:function(t,e){var i,n;if(this._events&&t in this._events){var r=new Ir(t,e);r.bubbles=!1,r.manager=null===(n=null===(i=this.stage)||void 0===i?void 0:i.eventSystem)||void 0===n?void 0:n.manager,this.dispatchEvent(r)}}}],[{key:"mixin",value:function(t){for(var e=Object.keys(t),n=0;n<e.length;++n){var r=e[n];Object.defineProperty(i.prototype,r,Object.getOwnPropertyDescriptor(t,r))}}}])}(Br);vo.mixin(Nr);var po=function(){return u((function t(e){o(this,t),this.tagname=e,this.child=[],this[":@"]={}}),[{key:"add",value:function(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push(l({},t,e))}},{key:"addChild",value:function(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push(l(l({},t.tagname,t.child),":@",t[":@"])):this.child.push(l({},t.tagname,t.child))}}])}();function go(t,e,i,n){var r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function yo(t,e,i){var n=function(t,e){for(var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",r="",a=e;a<t.length;a++){var o=t[a];if(i)o===i&&(i="");else if('"'===o||"'"===o)i=o;else if(o===n[0]){if(!n[1])return{data:r,index:a};if(t[a+1]===n[1])return{data:r,index:a}}else"\t"===o&&(o=" ");r+=o}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(n){var r=n.data,a=n.index,o=r.search(/\s/),s=r,u=!0;-1!==o&&(s=r.substr(0,o).replace(/\s\s*$/,""),r=r.substr(o+1));var l=s;if(i){var c=s.indexOf(":");-1!==c&&(u=(s=s.substr(c+1))!==n.data.substr(c+1))}return{tagName:s,tagExp:r,closeIndex:a,attrExpPresent:u,rawTagName:l}}}var mo=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm"),ko=function(){return u((function t(e){o(this,t),this.currentNode=null,this.options=e,this.tagsNodeStack=[],this.docTypeEntities={}}),[{key:"addChild",value:function(t,e,i){var n=e.tagname;"string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e)}},{key:"buildAttributesMap",value:function(t,e,i){var n={};if(t){for(var r=function(t,e){for(var i=[],n=e.exec(t);n;){var r=[];r.startIndex=e.lastIndex-n[0].length;for(var a=n.length,o=0;o<a;o++)r.push(n[o]);i.push(r),n=e.exec(t)}return i}(t,mo),a=r.length,o=0;o<a;o++){var s=r[o][1],u=r[o][4];s&&(n[s]=void 0===u||(isNaN(u)?u:Number(u)))}return n}}},{key:"parseXml",value:function(t){t=t.replace(/\r\n?/g,"\n");for(var e=new po("!xml"),i=e,n="",r="",a=0;a<t.length;a++)if("<"===t[a])if("/"===t[a+1]){var o=go(t,">",a,"Closing Tag is not closed."),s=r.lastIndexOf(".");r=r.substring(0,s),(i=this.tagsNodeStack.pop())&&i.child&&n&&i.child[i.child.length-1][":@"]&&(i.child[i.child.length-1][":@"].text=n),n="",a=o}else if("?"===t[a+1])a=yo(t,a,!1,"?>").closeIndex+1;else if("!--"===t.substr(a+1,3))a=go(t,"--\x3e",a+4,"Comment is not closed.");else{var u=yo(t,a,!1),l=u.tagName,c=u.tagExp,h=u.attrExpPresent,d=u.closeIndex;if(l!==e.tagname&&(r+=r?"."+l:l),c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),r=r.substr(0,r.length-1),c=l):c=c.substr(0,c.length-1);var f=new po(l);l!==c&&h&&(f[":@"]=this.buildAttributesMap(c,r,l)),this.addChild(i,f,r),r=r.substr(0,r.lastIndexOf("."))}else{var v=new po(l);this.tagsNodeStack.push(i),l!==c&&h&&(v[":@"]=this.buildAttributesMap(c,r,l)),this.addChild(i,v,r),i=v}n="",a=d}else n+=t[a];return e.child}}])}();function bo(t,e){return _o(t)}function _o(t,e){for(var i,n={},r=0;r<t.length;r++){var a=t[r],o=xo(a);if(void 0!==o&&a[o]){var s=_o(a[o]);i=s,Object.keys(i).length,a[":@"]&&wo(s,a[":@"]),void 0!==n[o]&&n.hasOwnProperty(o)?(Array.isArray(n[o])||(n[o]=[n[o]]),n[o].push(s)):n[o]=s}}return n}function xo(t){for(var e=Object.keys(t),i=0;i<e.length;i++){var n=e[i];if(":@"!==n)return n}}function wo(t,e,i){if(e)for(var n=Object.keys(e),r=n.length,a=0;a<r;a++){var o=n[a];t[o]=e[o]}}var So=function(){return u((function t(e){o(this,t),this.options=Object.assign({},t.defaultOptions,e)}),[{key:"valid",value:function(t){return t.startsWith("<")}},{key:"parse",value:function(t){return!!this.valid&&bo(new ko(this.options).parseXml(t),this.options)}}])}();So.defaultOptions={};var Ao=function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};function To(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.expand(e+(n/2+(i?function(t,e){return t?e:0}(i,e):0))),t}var Eo,Co=0;function Bo(){return Co++}function Mo(t){for(var e=[],i=0,n="",r=0;r<t.length;r++)Oo(t[r])?i?n+=t[r]:(i=1,n=t[r]):(i&&(e.push({text:n,direction:Eo.VERTICAL}),n="",i=0),e.push({text:t[r],direction:Eo.HORIZONTAL}));return n&&e.push({text:n,direction:Eo.VERTICAL}),e}!function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(Eo||(Eo={}));var Ro=new Map;["…","(",")","—","【","】","「","」","《","》"].forEach((function(t){return Ro.set(t,!0)}));var Po=new Map;function Oo(t){if(Ro.has(t))return!0;if(Po.has(t))return!1;var e=!1;return t.codePointAt(0)<256&&(e=!0),e}[""].forEach((function(t){return Po.set(t,!0)}));var Io,Lo=Bo(),Do=Bo(),jo=Bo(),Fo=Bo(),No=Bo(),zo=Bo(),Go=Bo(),Uo=Bo(),Wo=Bo(),Vo=Bo(),Ho=Bo(),Xo=Bo(),Yo=Bo(),Ko=Bo(),qo=Bo(),Zo=Bo(),Jo=Symbol.for("GraphicService"),$o=Symbol.for("GraphicCreator"),Qo={"stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-width":"lineWidth","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity",stroke:"stroke",fill:"fill"},ts=Object.keys(Qo);!function(t){t[t.LESS_GROUP=0]="LESS_GROUP",t[t.MORE_GROUP=1]="MORE_GROUP"}(Io||(Io={}));var es=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="group",n.parent=null,n.isContainer=!0,n.numberType=zo,n._childUpdateTag=bi.UPDATE_BOUNDS,n}return c(i,t),u(i,[{key:"setMode",value:function(t){"3d"===t?this.set3dMode():this.set2dMode()}},{key:"set3dMode",value:function(){this.in3dMode=!0}},{key:"set2dMode",value:function(){this.in3dMode=!1}},{key:"setTheme",value:function(t){return this.theme||(this.theme=new Ar),this.theme.setTheme(t,this)}},{key:"createTheme",value:function(){this.theme||(this.theme=new Ar)}},{key:"hideAll",value:function(){this.setAttribute("visible",!1),this.forEachChildren((function(t){t.isContainer&&t.hideAll?t.hideAll():t.setAttribute("visible",!1)}))}},{key:"showAll",value:function(){this.setAttribute("visible",!0),this.forEachChildren((function(t){t.isContainer&&t.showAll?t.showAll():t.setAttribute("visible",!0)}))}},{key:"containsPoint",value:function(t,e,i){if(i===_i.GLOBAL){var n=new Pe(t,e);return this.parent&&this.parent.globalTransMatrix.transformPoint(n,n),this.AABBBounds.contains(n.x,n.y)}return this.AABBBounds.contains(t,e)}},{key:"shouldUpdateAABBBounds",value:function(){return!!p(h(i.prototype),"shouldUpdateAABBBounds",this).call(this)||!!(this._childUpdateTag&bi.UPDATE_BOUNDS)}},{key:"tryUpdateAABBBounds",value:function(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;Un.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);var t=this.shouldSelfChangeUpdateAABBBounds(),e=this.doUpdateAABBBounds();return this.addUpdateLayoutTag(),Un.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,t),e}},{key:"doUpdateLocalMatrix",value:function(){var t=this.attribute,e=t.x,n=void 0===e?bn.x:e,r=t.y,a=void 0===r?bn.y:r,o=t.dx,s=void 0===o?bn.dx:o,u=t.dy,l=void 0===u?bn.dy:u,c=t.scaleX,d=void 0===c?bn.scaleX:c,f=t.scaleY,v=void 0===f?bn.scaleY:f,g=t.angle,y=void 0===g?bn.angle:g,m=t.postMatrix;if(0!==n||0!==a||0!==s||0!==l||1!==d||1!==v||0!==y||m)return p(h(i.prototype),"doUpdateLocalMatrix",this).call(this);this._transMatrix.reset()}},{key:"doUpdateAABBBounds",value:function(){var t=this.attribute,e=Er(this).group;this._AABBBounds.clear();var i=Un.graphicService.updateGroupAABBBounds(t,e,this._AABBBounds,this),n=t.boundsPadding,r=void 0===n?e.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.parent&&this.parent.addChildUpdateBoundTag(),this.clearUpdateBoundTag(),this._emitCustomEvent("AAABBBoundsChange"),i}},{key:"clearUpdateBoundTag",value:function(){this._updateTag&=bi.CLEAR_BOUNDS,this._childUpdateTag&=bi.CLEAR_BOUNDS}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"addUpdateBoundTag",value:function(){this._updateTag|=bi.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag()}},{key:"addChildUpdateBoundTag",value:function(){this._childUpdateTag&bi.UPDATE_BOUNDS||(this._childUpdateTag|=bi.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag())}},{key:"getTheme",value:function(){return this.theme.getTheme(this)}},{key:"incrementalAppendChild",value:function(t){var e=p(h(i.prototype),"appendChild",this).call(this,t);return this.stage&&e&&(e.stage=this.stage,e.layer=this.layer),this.addUpdateBoundTag(),Un.graphicService.onAddIncremental(t,this,this.stage),e}},{key:"incrementalClearChild",value:function(){p(h(i.prototype),"removeAllChild",this).call(this),this.addUpdateBoundTag(),Un.graphicService.onClearIncremental(this,this.stage)}},{key:"appendChild",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=p(h(i.prototype),"appendChild",this).call(this,t);return e&&this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}},{key:"insertBefore",value:function(t,e){var n=p(h(i.prototype),"insertBefore",this).call(this,t,e);return this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}},{key:"insertAfter",value:function(t,e){var n=p(h(i.prototype),"insertAfter",this).call(this,t,e);return this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}},{key:"insertInto",value:function(t,e){var n=p(h(i.prototype),"insertInto",this).call(this,t,e);return this.stage&&n&&n.setStage(this.stage,this.layer),this.addUpdateBoundTag(),n}},{key:"removeChild",value:function(t){var e=p(h(i.prototype),"removeChild",this).call(this,t);return t.stage=null,Un.graphicService.onRemove(t),this.addUpdateBoundTag(),e}},{key:"removeAllChild",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.forEachChildren((function(e){Un.graphicService.onRemove(e),t&&e.isContainer&&e.removeAllChild(t)})),p(h(i.prototype),"removeAllChild",this).call(this),this.addUpdateBoundTag()}},{key:"setStage",value:function(t,e){var i=this;this.stage!==t&&(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this._onSetStage&&this._onSetStage(this,t,e),Un.graphicService.onSetStage(this,t),this.forEachChildren((function(e){e.setStage(t,i.layer)})))}},{key:"addUpdatePositionTag",value:function(){p(h(i.prototype),"addUpdatePositionTag",this).call(this),this.forEachChildren((function(t){t.isContainer&&t.addUpdateGlobalPositionTag()}))}},{key:"addUpdateGlobalPositionTag",value:function(){p(h(i.prototype),"addUpdateGlobalPositionTag",this).call(this),this.forEachChildren((function(t){t.isContainer&&t.addUpdateGlobalPositionTag()}))}},{key:"tryUpdateGlobalTransMatrix",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){if(this._globalTransMatrix){if(this.parent){var e=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(e.a,e.b,e.c,e.d,e.e,e.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();this.doUpdateGlobalMatrix(),t&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}},{key:"shouldUpdateGlobalMatrix",value:function(){return!!(this._updateTag&bi.UPDATE_GLOBAL_MATRIX)}},{key:"_getChildByName",value:function(t,e){return this.find((function(e){return e.name===t}),e)}},{key:"createOrUpdateChild",value:function(t,e,i){var n=this._getChildByName(t);return n?n.setAttributes(e):((n=Un.graphicService.creator[i](e)).name=t,this.add(n)),n}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function is(t){return new es(t)}es.NOWORK_ANIMATE_ATTR=fo;var ns,rs=function(t){function i(t,n,r,a){var s,u;return o(this,i),(s=e(this,i,[{}])).stage=t,s.global=n,s.window=r,s.main=a.main,s.layerHandler=a.layerHandler,s.layerHandler.init(f(s),r,{main:a.main,canvasId:a.canvasId,width:s.viewWidth,height:s.viewHeight,zIndex:null!==(u=a.zIndex)&&void 0!==u?u:0}),s.layer=f(s),s.subLayers=new Map,s.theme=new Ar,s.background="rgba(0, 0, 0, 0)",s.afterDrawCbs=[],s}return c(i,t),u(i,[{key:"offscreen",get:function(){return this.layerHandler.offscreen}},{key:"layerMode",get:function(){return this.layerHandler.type}},{key:"width",get:function(){return this.stage?this.stage.width:0}},{key:"height",get:function(){return this.stage?this.stage.height:0}},{key:"viewWidth",get:function(){return this.stage?this.stage.viewWidth:0}},{key:"viewHeight",get:function(){return this.stage?this.stage.viewHeight:0}},{key:"dirtyBound",get:function(){throw new Error("暂不支持")}},{key:"dpr",get:function(){return this._dpr}},{key:"combineSubLayer",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=Array.from(this.subLayers.values()).sort((function(t,e){return t.zIndex-e.zIndex}));this.layerHandler.merge(i.map((function(t){return t.layer.subLayers.size&&t.layer.combineSubLayer(e),t.layer.getNativeHandler()}))),e&&i.forEach((function(t){t.group&&(t.group.incremental=0)})),i.forEach((function(e){Un.layerService.releaseLayer(t.stage,e.layer)})),this.subLayers.clear()}},{key:"getNativeHandler",value:function(){return this.layerHandler}},{key:"setStage",value:function(t,e){p(h(i.prototype),"setStage",this).call(this,t,this)}},{key:"pick",value:function(t,e){throw new Error("暂不支持")}},{key:"tryRenderSecondaryLayer",value:function(t,e){var i=this;this.layerHandler.secondaryHandlers&&this.layerHandler.secondaryHandlers.length&&this.layerHandler.secondaryHandlers.forEach((function(n){n.layer.renderCount=i.renderCount,n.layer.render(t,e)}))}},{key:"render",value:function(t,e){var i,n=this;this.layerHandler.render([this],{renderService:t.renderService,stage:this.stage,layer:this,viewBox:t.viewBox,transMatrix:t.transMatrix,background:null!==(i=t.background)&&void 0!==i?i:this.background,updateBounds:t.updateBounds},e),this.afterDrawCbs.forEach((function(t){return t(n)})),this.tryRenderSecondaryLayer(t,e)}},{key:"resize",value:function(t,e){this.layerHandler.resize(t,e)}},{key:"resizeView",value:function(t,e){this.layerHandler.resizeView(t,e)}},{key:"setDpr",value:function(t){this.layerHandler.setDpr(t)}},{key:"afterDraw",value:function(t){this.afterDrawCbs.push(t)}},{key:"startAnimate",value:function(t){throw new Error("暂不支持")}},{key:"setToFrame",value:function(t){throw new Error("暂不支持")}},{key:"prepare",value:function(t,e){}},{key:"release",value:function(){var t=this;p(h(i.prototype),"release",this).call(this),this.layerHandler.release(),this.subLayers&&this.subLayers.forEach((function(e){Un.layerService.releaseLayer(t.stage,e.layer)}))}},{key:"drawTo",value:function(t,e){var i,n=this;this.layerHandler.drawTo(t,[this],Object.assign({background:null!==(i=e.background)&&void 0!==i?i:this.background,renderService:e.renderService,viewBox:e.viewBox,transMatrix:e.transMatrix,stage:this.stage,layer:this},e)),this.afterDrawCbs.forEach((function(t){return t(n)}))}}])}(es),as=Symbol.for("TransformUtil"),os=Symbol.for("GraphicUtil"),ss=Symbol.for("LayerService"),us=Symbol.for("StaticLayerHandlerContribution"),ls=Symbol.for("DynamicLayerHandlerContribution"),cs=Symbol.for("VirtualLayerHandlerContribution"),hs=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ds=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},fs=ns=function(){return u((function t(){o(this,t),this.layerMap=new Map,this.global=Un.global}),[{key:"tryInit",value:function(){this.inited||(this.staticLayerCountInEnv=this.global.getStaticCanvasCount(),this.dynamicLayerCountInEnv=this.global.getDynamicCanvasCount(),this.inited=!0)}},{key:"getStageLayer",value:function(t){return this.layerMap.get(t)}},{key:"getRecommendedLayerType",value:function(t){return t||(0!==this.staticLayerCountInEnv?"static":0!==this.dynamicLayerCountInEnv?"dynamic":"virtual")}},{key:"getLayerHandler",value:function(t){return"static"===t?nr.get(us):"dynamic"===t?nr.get(ls):nr.get(cs)}},{key:"createLayer",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{main:!1};this.tryInit();var n=this.getRecommendedLayerType(i.layerMode);n=i.main||i.canvasId?"static":n;var r=this.getLayerHandler(n),a=new rs(t,this.global,t.window,Object.assign(Object.assign({main:!1},i),{layerMode:n,canvasId:null!==(e=i.canvasId)&&void 0!==e?e:ns.GenerateLayerId(),layerHandler:r})),o=this.layerMap.get(t)||[];return o.push(a),this.layerMap.set(t,o),this.staticLayerCountInEnv--,a}},{key:"prepareStageLayer",value:function(t){var e;t.forEachChildren((function(t){var i=t.getNativeHandler();"virtual"===i.type?(i.mainHandler=e,e.secondaryHandlers.push(i)):(e=i).secondaryHandlers=[]}))}},{key:"releaseLayer",value:function(t,e){e.release();var i=this.layerMap.get(t)||[];this.layerMap.set(t,i.filter((function(t){return t!==e})))}},{key:"layerCount",value:function(t){return(this.layerMap.get(t)||[]).length}},{key:"restLayerCount",value:function(t){return"browser"===this.global.env?10:0}},{key:"releaseStage",value:function(t){this.layerMap.delete(t)}}],[{key:"GenerateLayerId",value:function(){return"".concat(ns.idprefix,"_").concat(ns.prefix_count++)}}])}();fs.idprefix="visactor_layer",fs.prefix_count=0,fs=ns=hs([L(),ds("design:paramtypes",[])],fs);var vs=new x((function(t){t(nt).to(st).inSingletonScope(),t(hr).to(fr),t(os).to(mr).inSingletonScope(),t(as).to(br).inSingletonScope(),t(ss).to(fs).inSingletonScope()}));function ps(t,e){return!(!t&&!e)}function gs(t,e){return(_t(t)?t.some((function(t){return t||void 0===t})):!!t)&&e>0}function ys(t,e,i){return i&&t*e>0}function ms(t,e,i,n,r){return r&&t*e>0&&0!==i&&0!==n}function ks(t,e){return t*e>0}function bs(t,e,i,n){return t*e>0&&0!==i&&0!==n}function _s(t,e,i,n,r,a,o,s){var u=i-t,l=n-e,c=o-r,h=s-a,d=h*u-c*l;return d*d<pe?[]:[t+(d=(c*(e-a)-h*(t-r))/d)*u,e+d*l]}function xs(t,e,i,n,r,a,o){var s=t-i,u=e-n,l=(o?a:-a)/Math.sqrt(s*s+u*u),c=l*u,h=-l*s,d=t+c,f=e+h,v=i+c,p=n+h,g=(d+v)/2,y=(f+p)/2,m=v-d,k=p-f,b=m*m+k*k,_=r-a,x=d*p-v*f,w=(k<0?-1:1)*Math.sqrt(Math.max(0,_*_*b-x*x)),S=(x*k-m*w)/b,A=(-x*m-k*w)/b,T=(x*k+m*w)/b,E=(-x*m+k*w)/b,C=S-g,B=A-y,M=T-g,R=E-y;return C*C+B*B>M*M+R*R&&(S=T,A=E),{cx:S,cy:A,x01:-c,y01:-h,x11:S*(r/_-1),y11:A*(r/_-1)}}function ws(t,e,i,n,r,a,o){var s=t.getParsedAngle(),u=s.startAngle,l=s.endAngle,c=be(l-u),h=l>u,d=!1;if(r<a){var f=r;r=a,a=f}if(r<=pe)e.moveTo(i,n);else if(c>=ke-pe)e.moveTo(i+r*xe(u),n+r*Ae(u)),e.arc(i,n,r,u,l,!h),a>pe&&(e.moveTo(i+a*xe(l),n+a*Ae(l)),e.arc(i,n,a,l,u,h));else{var v,p,g,y,m=t.getParsedCornerRadius(),k=t.getParsePadAngle(u,l),b=k.outerDeltaAngle,_=k.innerDeltaAngle,x=k.outerStartAngle,w=k.outerEndAngle,S=k.innerEndAngle,A=k.innerStartAngle,T=m,E=m,C=m,B=m,M=Math.max(E,T),R=Math.max(C,B),P=M,O=R,I=r*xe(x),L=r*Ae(x),D=a*xe(S),j=a*Ae(S);if((R>pe||M>pe)&&(v=r*xe(w),p=r*Ae(w),g=a*xe(A),y=a*Ae(A),c<ge)){var F=_s(I,L,g,y,v,p,D,j);if(F){var N=I-F[0],z=L-F[1],G=v-F[0],U=p-F[1],W=1/Ae(Ce((N*G+z*U)/(Te(N*N+z*z)*Te(G*G+U*U)))/2),V=Te(F[0]*F[0]+F[1]*F[1]);O=Se(R,(a-V)/(W-1)),P=Se(M,(r-V)/(W+1))}}if(b<.001)o&&(o[3]||o[1])&&e.moveTo(i+I,n+L),d=!0;else if(P>pe){var H=Se(T,P),X=Se(E,P),Y=xs(g,y,I,L,r,H,Number(h)),K=xs(v,p,D,j,r,X,Number(h));P<M&&H===X?!o||o[0]?(e.moveTo(i+Y.cx+Y.x01,n+Y.cy+Y.y01),e.arc(i+Y.cx,n+Y.cy,P,_e(Y.y01,Y.x01),_e(K.y01,K.x01),!h)):e.moveTo(i+Y.cx+P*xe(_e(K.y01,K.x01)),n+Y.cy+P*Ae(_e(K.y01,K.x01))):!o||o[0]?(e.moveTo(i+Y.cx+Y.x01,n+Y.cy+Y.y01),H>0&&e.arc(i+Y.cx,n+Y.cy,H,_e(Y.y01,Y.x01),_e(Y.y11,Y.x11),!h),e.arc(i,n,r,_e(Y.cy+Y.y11,Y.cx+Y.x11),_e(K.cy+K.y11,K.cx+K.x11),!h),X>0&&e.arc(i+K.cx,n+K.cy,X,_e(K.y11,K.x11),_e(K.y01,K.x01),!h)):X>0?e.moveTo(i+K.cx+X*xe(_e(K.y01,K.x01)),n+K.cy+X*Ae(_e(K.y01,K.x01))):e.moveTo(i+v,n+r*Ae(w))}else!o||o[0]?(e.moveTo(i+I,n+L),e.arc(i,n,r,x,w,!h)):e.moveTo(i+r*xe(w),n+r*Ae(w));if(!(a>pe)||_<.001)!o||o[1]?e.lineTo(i+D,n+j):e.moveTo(i+D,n+j),d=!0;else if(O>pe){var q=Se(B,O),Z=Se(C,O),J=xs(D,j,v,p,a,-Z,Number(h)),$=xs(I,L,g,y,a,-q,Number(h));if(!o||o[1]?e.lineTo(i+J.cx+J.x01,n+J.cy+J.y01):e.moveTo(i+J.cx+J.x01,n+J.cy+J.y01),O<R&&q===Z){var Q=_e($.y01,$.x01);!o||o[2]?e.arc(i+J.cx,n+J.cy,O,_e(J.y01,J.x01),Q,!h):e.moveTo(i+J.cx+xe(Q),n+J.cy+Ae(Q))}else!o||o[2]?(Z>0&&e.arc(i+J.cx,n+J.cy,Z,_e(J.y01,J.x01),_e(J.y11,J.x11),!h),e.arc(i,n,a,_e(J.cy+J.y11,J.cx+J.x11),_e($.cy+$.y11,$.cx+$.x11),h),q>0&&e.arc(i+$.cx,n+$.cy,q,_e($.y11,$.x11),_e($.y01,$.x01),!h)):q>0?e.moveTo(i+$.cx+q*xe(_e($.y01,$.x01)),n+$.cy+q*Ae(_e($.y01,$.x01))):e.moveTo(i+g,n+y)}else!o||o[1]?e.lineTo(i+D,n+j):e.moveTo(i+D,n+j),!o||o[2]?e.arc(i,n,a,S,A,h):e.moveTo(i+a*xe(A),n+a*Ae(A))}return o?o[3]&&e.lineTo(i+r*xe(u),n+r*Ae(u)):e.closePath(),d}var Ss=function(){function t(){o(this,t)}return u(t,null,[{key:"GetCanvas",value:function(){try{return t.canvas||(t.canvas=Un.global.createCanvas({})),t.canvas}catch(t){return null}}},{key:"GetCtx",value:function(){if(!t.ctx){var e=t.GetCanvas();t.ctx=e.getContext("2d")}return t.ctx}}])}(),As=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;o(this,i),(t=e(this,i)).cacheParams={CLEAN_THRESHOLD:100,L_TIME:1e3},t.dataMap=new Map;var a=Ss.GetCanvas(),s=Ss.GetCtx();if(a.width=r,a.height=1,!s)return v(t);if(s.translate(0,0),!s)throw new Error("获取ctx发生错误");var u=s.createLinearGradient(0,0,r,0);return n.forEach((function(t){u.addColorStop(t[0],t[1])})),s.fillStyle=u,s.fillRect(0,0,r,1),t.rgbaSet=s.getImageData(0,0,r,1).data,t}return c(i,t),u(i,[{key:"getColor",value:function(t){var e=this.rgbaSet.slice(4*t,4*t+4);return"rgba(".concat(e[0],", ").concat(e[1],", ").concat(e[2],", ").concat(e[3]/255,")")}},{key:"GetOrCreate",value:function(t,e,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:100,s="".concat(t).concat(e).concat(n).concat(r);a.forEach((function(t){return s+=t.join()})),s+=o;var u=this.dataMap.get(s);return u||(u={data:new i(a,o),timestamp:[]},this.addLimitedTimestamp(u,Date.now(),{}),this.dataMap.set(s,u)),this.clearCache(this.dataMap,this.cacheParams),u.data}}],[{key:"getInstance",value:function(){return i._instance||(i._instance=new i),i._instance}}])}(Ge),Ts=function(){function t(){o(this,t)}return u(t,null,[{key:"GetSize",value:function(e){for(var i=0;i<t.ImageSize.length;i++)if(t.ImageSize[i]>=e)return t.ImageSize[i];return e}},{key:"Get",value:function(e,i,n,r,a,o,s){var u=t.GenKey(e,i,n,r,a),l=t.cache[u];if(!l||0===l.length)return null;for(var c=0;c<l.length;c++)if(l[c].width>=o&&l[c].height>=s)return l[c].pattern;return null}},{key:"Set",value:function(e,i,n,r,a,o,s,u){var l=t.GenKey(e,i,n,r,a);t.cache[l]?t.cache[l].push({width:s,height:u,pattern:o}):t.cache[l]=[{width:s,height:u,pattern:o}]}},{key:"GenKey",value:function(t,e,i,n,r){return"".concat(e,",").concat(i,",").concat(n,",").concat(r,",").concat(t.join())}}])}();Ts.cache={},Ts.ImageSize=[20,40,80,160,320,640,1280,2560];var Es=Symbol.for("ArcRenderContribution"),Cs=Symbol.for("AreaRenderContribution"),Bs=Symbol.for("CircleRenderContribution"),Ms=Symbol.for("GroupRenderContribution"),Rs=Symbol.for("ImageRenderContribution"),Ps=Symbol.for("PathRenderContribution"),Os=Symbol.for("PolygonRenderContribution"),Is=Symbol.for("RectRenderContribution"),Ls=Symbol.for("SymbolRenderContribution"),Ds=Symbol.for("TextRenderContribution"),js=Symbol.for("InteractiveSubRenderContribution"),Fs=["radius","startAngle","endAngle"].concat(y(so)),Ns=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{radius:1};return o(this,i),(t=e(this,i,[n])).type="circle",t.numberType=Fo,t}return c(i,t),u(i,[{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){var t=this.attribute,e=t.startAngle,i=t.endAngle,n=t.radius;return this._validNumber(e)&&this._validNumber(i)&&this._validNumber(n)}},{key:"doUpdateAABBBounds",value:function(t){var e=Er(this).circle;this._AABBBounds.clear();var i=this.attribute,n=Un.graphicService.updateCircleAABBBounds(i,Er(this).circle,this._AABBBounds,t,this),r=i.boundsPadding,a=void 0===r?e.boundsPadding:r,o=ua(a);return o&&n.expand(o),this.clearUpdateBoundTag(),n}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Er(this).circle[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,Fs)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,Fs)}},{key:"toCustomPath",value:function(){var t,e,i,n=this.attribute,r=null!==(t=n.radius)&&void 0!==t?t:this.getDefaultAttribute("radius"),a=null!==(e=n.startAngle)&&void 0!==e?e:this.getDefaultAttribute("startAngle"),o=null!==(i=n.endAngle)&&void 0!==i?i:this.getDefaultAttribute("endAngle"),s=new yn;return s.arc(0,0,r,a,o),s}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function zs(t){return new Ns(t)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;i||(i=1);var n=t.fontStyle,r=void 0===n?e.fontStyle:n,a=t.fontVariant,o=void 0===a?e.fontVariant:a,s=t.fontWeight,u=void 0===s?e.fontWeight:s,l=t.fontSize,c=void 0===l?e.fontSize:l,h=t.fontFamily;return(r?r+" ":"")+(o?o+" ":"")+(u?u+" ":"")+c*i+"px "+((void 0===h?e.fontFamily:h)||"sans-serif")}function Us(t,e){return"end"===t||"right"===t?-e:"center"===t?-e/2:0}function Ws(t,e,i){return"middle"===t?-e/2:"top"===t?0:"bottom"===t?(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)-e:t&&"alphabetic"!==t?0:(i||(i=e),-(e-i)/2-.79*i)}Ns.NOWORK_ANIMATE_ATTR=fo;var Vs=function(){return u((function t(e,i,n){o(this,t),this.fontFamily=e,this.textOptions=i,this.textMeasure=n}),[{key:"LayoutBBox",value:function(t,e,i){if("left"===e||"start"===e)t.xOffset=0;else if("center"===e)t.xOffset=t.width/-2;else{if("right"!==e&&"end"!==e)throw new Error("非法的textAlign");t.xOffset=-t.width}return t.yOffset="top"===i?0:"middle"===i?t.height/-2:"alphabetic"===i?-.79*t.height:-t.height,t}},{key:"GetLayout",value:function(t,e,i,n,r,a,o,s,u){for(var l=[],c=[e,i],h=[0,0];t.length>0;){var d=this.textMeasure.clipTextWithSuffix(t,this.textOptions,e,o,s,u).str;l.push({str:d,width:this.textMeasure.measureTextWidth(d,this.textOptions)}),t=t.substring(d.length)}"left"===n||"start"===n||("center"===n?h[0]=c[0]/-2:"right"!==n&&"end"!==n||(h[0]=-c[0])),"top"===r||("middle"===r?h[1]=c[1]/-2:"bottom"===r&&(h[1]=-c[1]));var f={xOffset:h[0],yOffset:h[1],width:c[0],height:c[1]};return this.layoutWithBBox(f,l,n,r,a)}},{key:"GetLayoutByLines",value:function(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"end";t=t.map((function(t){return t.toString()}));var u=[],l=[0,0];if("number"==typeof o&&o!==1/0){for(var c,h=0,d=t.length;h<d;h++)c=Math.min(this.textMeasure.measureTextWidth(t[h],this.textOptions),o),u.push({str:this.textMeasure.clipTextWithSuffix(t[h],this.textOptions,c,r,a,s).str,width:c});l[0]=o}else{var f,v;o=0;for(var p=0,g=t.length;p<g;p++)v=t[p],f=this.textMeasure.measureTextWidth(v,this.textOptions),o=Math.max(o,f),u.push({str:v,width:f});l[0]=o}l[1]=u.length*n,l[0]=u.reduce((function(t,e){return Math.max(t,e.width)}),0);var y={xOffset:0,yOffset:0,width:l[0],height:l[1]};return this.LayoutBBox(y,e,i),this.layoutWithBBox(y,u,e,i,n)}},{key:"layoutWithBBox",value:function(t,e,i,n,r){var a=[0,0],o=e.length*r;"top"===n||("middle"===n?a[1]=(t.height-o)/2:"bottom"===n&&(a[1]=t.height-o));for(var s=0;s<e.length;s++)this.lineOffset(t,e[s],i,n,r,a);return{bbox:t,lines:e,fontFamily:this.fontFamily,fontSize:this.textOptions.fontSize,fontWeight:this.textOptions.fontWeight,lineHeight:r,textAlign:i,textBaseline:n}}},{key:"lineOffset",value:function(t,e,i,n,r,a){return"left"===i||"start"===i?e.leftOffset=0:"center"===i?e.leftOffset=(t.width-e.width)/2:"right"!==i&&"end"!==i||(e.leftOffset=t.width-e.width),e.topOffset=(r-this.textOptions.fontSize)/2+.79*this.textOptions.fontSize+a[1],a[1]+=r,e}}])}(),Hs=["text","maxLineWidth","textAlign","textBaseline","heightLimit","lineClamp","fontSize","fontFamily","fontWeight","ellipsis","lineHeight","direction","wordBreak","heightLimit","lineClamp"].concat(y(so)),Xs=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{text:"",fontSize:16};return o(this,i),(t=e(this,i,[n])).type="text",t.numberType=Zo,t.cache={},t}return c(i,t),u(i,[{key:"font",get:function(){var t=Er(this).text;return this._font||(this._font=Gs(this.attribute,t)),this._font}},{key:"clipedText",get:function(){var t,e=this.attribute,i=Er(this).text;if(this.isSimplify()){var n=e.maxLineWidth,r=void 0===n?i.maxLineWidth:n;return Number.isFinite(r)?(this.tryUpdateAABBBounds(),this.cache.clipedText):(null!==(t=e.text)&&void 0!==t?t:i.text).toString()}}},{key:"clipedWidth",get:function(){if(this.isSimplify())return this.tryUpdateAABBBounds(),this.cache.clipedWidth}},{key:"cliped",get:function(){var t=Er(this).text,e=this.attribute;if(!this.isMultiLine){var i=e.maxLineWidth,n=void 0===i?t.maxLineWidth:i;return!!Number.isFinite(n)&&(this.tryUpdateAABBBounds(),"vertical"===e.direction&&this.cache.verticalList&&this.cache.verticalList[0]?this.cache.verticalList[0].map((function(t){return t.text})).join("")!==e.text.toString():null!=this.clipedText&&this.clipedText!==e.text.toString())}}},{key:"multilineLayout",get:function(){if(this.isMultiLine)return this.tryUpdateAABBBounds(),this.cache.layoutData}},{key:"isSimplify",value:function(){return!this.isMultiLine&&"vertical"!==this.attribute.direction}},{key:"isMultiLine",get:function(){return Array.isArray(this.attribute.text)||"normal"===this.attribute.whiteSpace}},{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){var t=this.attribute.text;return _t(t)?!t.every((function(t){return null==t||""===t})):null!=t&&""!==t}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).text;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateTextAABBBounds(e,t,this._AABBBounds,this),n=this.attribute.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"updateWrapAABBBounds",value:function(t){var e,i,n,r,a=Er(this).text,o=this.attribute,s=o.fontFamily,u=void 0===s?a.fontFamily:s,l=o.textAlign,c=void 0===l?a.textAlign:l,h=o.textBaseline,d=void 0===h?a.textBaseline:h,f=o.fontSize,v=void 0===f?a.fontSize:f,p=o.ellipsis,g=void 0===p?a.ellipsis:p,y=o.maxLineWidth,m=o.stroke,k=void 0===m?a.stroke:m,b=o.lineWidth,_=void 0===b?a.lineWidth:b,x=o.wordBreak,w=void 0===x?a.wordBreak:x,S=o.fontWeight,A=void 0===S?a.fontWeight:S,T=o.ignoreBuf,E=void 0===T?a.ignoreBuf:T,C=o.suffixPosition,B=void 0===C?a.suffixPosition:C,M=o.heightLimit,R=void 0===M?0:M,P=o.lineClamp,O=null!==(e=ka(this.attribute.lineHeight,this.attribute.fontSize||a.fontSize))&&void 0!==e?e:this.attribute.fontSize||a.fontSize,I=E?0:2;if(!this.shouldUpdateShape()&&(null===(i=this.cache)||void 0===i?void 0:i.layoutData)){var L=this.cache.layoutData.bbox;return this._AABBBounds.set(L.xOffset,L.yOffset,L.xOffset+L.width,L.yOffset+L.height),k&&this._AABBBounds.expand(_/2),this._AABBBounds}var D=Un.graphicUtil.textMeasure,j=new Vs(u,{fontSize:v,fontWeight:A,fontFamily:u},D),F=_t(t)?t.map((function(t){return t.toString()})):[t.toString()],N=[],z=[0,0],G=1/0;if(R>0&&(G=Math.max(Math.floor(R/O),1)),P&&(G=Math.min(G,P)),"number"==typeof y&&y!==1/0){if(y>0)for(var U=0;U<F.length;U++){var W=F[U],V=!0;if(U===G-1){var H=j.textMeasure.clipTextWithSuffix(W,j.textOptions,y,g,!1,B,U!==F.length-1);N.push({str:H.str,width:H.width});break}var X=j.textMeasure.clipText(W,j.textOptions,y,"break-word"===w);if(""!==W&&""===X.str){if(g){var Y=j.textMeasure.clipTextWithSuffix(W,j.textOptions,y,g,!1,B);X.str=null!==(n=Y.str)&&void 0!==n?n:"",X.width=null!==(r=Y.width)&&void 0!==r?r:0}else X.str="",X.width=0;V=!1}if(N.push({str:X.str,width:X.width}),X.str.length===W.length);else if(V){var K=W.substring(X.str.length);F.splice(U+1,0,K)}}var q=0;N.forEach((function(t){q=Math.max(q,t.width)})),z[0]=q}else{for(var Z,J,$=0,Q=0,tt=F.length;Q<tt;Q++){if(Q===G-1){var et=j.textMeasure.clipTextWithSuffix(F[Q],j.textOptions,y,g,!1,B);N.push({str:et.str,width:et.width}),$=Math.max($,et.width);break}J=F[Q],Z=j.textMeasure.measureTextWidth(J,j.textOptions,"break-word"===w),$=Math.max($,Z),N.push({str:J,width:Z})}z[0]=$}z[1]=N.length*(O+I);var it={xOffset:0,yOffset:0,width:z[0],height:z[1]};j.LayoutBBox(it,c,d);var nt=j.layoutWithBBox(it,N,c,d,O);return this.cache.layoutData=nt,this.clearUpdateShapeTag(),this._AABBBounds.set(it.xOffset,it.yOffset,it.xOffset+it.width,it.yOffset+it.height),k&&this._AABBBounds.expand(_/2),this._AABBBounds}},{key:"updateSingallineAABBBounds",value:function(t){var e=Er(this).text,i=this.attribute,n=i.direction,r=void 0===n?e.direction:n,a=i.underlineOffset,o=void 0===a?e.underlineOffset:a,s="horizontal"===r?this.updateHorizontalSinglelineAABBBounds(t):this.updateVerticalSinglelineAABBBounds(t);return"horizontal"===r&&o&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+o),s}},{key:"updateMultilineAABBBounds",value:function(t){var e=Er(this).text,i=this.attribute,n=i.direction,r=void 0===n?e.direction:n,a=i.underlineOffset,o=void 0===a?e.underlineOffset:a,s="horizontal"===r?this.updateHorizontalMultilineAABBBounds(t):this.updateVerticalMultilineAABBBounds(t);return"horizontal"===r&&o&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+o),s}},{key:"updateHorizontalSinglelineAABBBounds",value:function(t){var e,i,n=Er(this).text,r=this.attribute.wrap;if(void 0===r?n.wrap:r)return this.updateWrapAABBBounds([t]);var a,o,s=Un.graphicUtil.textMeasure,u=this.attribute,l=u.maxLineWidth,c=void 0===l?n.maxLineWidth:l,h=u.ellipsis,d=void 0===h?n.ellipsis:h,f=u.textAlign,v=void 0===f?n.textAlign:f,p=u.textBaseline,g=void 0===p?n.textBaseline:p,y=u.fontFamily,m=void 0===y?n.fontFamily:y,k=u.fontSize,b=void 0===k?n.fontSize:k,_=u.fontWeight,x=void 0===_?n.fontWeight:_,w=u.stroke,S=void 0===w?n.stroke:w,A=u.lineWidth,T=void 0===A?n.lineWidth:A,E=u.ignoreBuf,C=void 0===E?n.ignoreBuf:E,B=u.whiteSpace,M=void 0===B?n.whiteSpace:B,R=u.suffixPosition,P=void 0===R?n.suffixPosition:R;if("normal"===M)return this.updateWrapAABBBounds(t);var O=C?0:Math.max(2,.075*b),I=u.fontSize||n.fontSize,L=null!==(e=ka(u.lineHeight,I))&&void 0!==e?e:I+O;if(!this.shouldUpdateShape()&&this.cache){var D=Us(v,a=null!==(i=this.cache.clipedWidth)&&void 0!==i?i:0),j=Ws(g,L,b);return this._AABBBounds.set(D,j,D+a,j+L),S&&this._AABBBounds.expand(T/2),this._AABBBounds}if(Number.isFinite(c)){if(d){var F=!0===d?n.ellipsis:d,N=s.clipTextWithSuffix(t.toString(),{fontSize:b,fontWeight:x,fontFamily:m},c,F,!1,P);o=N.str,a=N.width}else{var z=s.clipText(t.toString(),{fontSize:b,fontWeight:x,fontFamily:m},c,!1);o=z.str,a=z.width}this.cache.clipedText=o,this.cache.clipedWidth=a}else a=s.measureTextWidth(t.toString(),{fontSize:b,fontWeight:x,fontFamily:m}),this.cache.clipedText=t.toString(),this.cache.clipedWidth=a;this.clearUpdateShapeTag();var G=Us(v,a),U=L;Un.global&&Un.global.isSafari()&&(U+=.2*b);var W=Ws(g,U,b,O);return this._AABBBounds.set(G,W,G+a,W+U),S&&this._AABBBounds.expand(T/2),this._AABBBounds}},{key:"getBaselineMapAlign",value:function(){return i.baselineMapAlign}},{key:"getAlignMapBaseline",value:function(){return i.alignMapBaseline}},{key:"updateVerticalSinglelineAABBBounds",value:function(t){var e,n,r,a,o=Er(this).text,s=Un.graphicUtil.textMeasure,u=this.attribute,l=u.ignoreBuf,c=(void 0===l?o.ignoreBuf:l)?0:2,h=u.maxLineWidth,d=void 0===h?o.maxLineWidth:h,f=u.ellipsis,v=void 0===f?o.ellipsis:f,p=u.fontSize,g=void 0===p?o.fontSize:p,y=u.fontWeight,m=void 0===y?o.fontWeight:y,k=u.fontFamily,b=void 0===k?o.fontFamily:k,_=u.stroke,x=void 0===_?o.stroke:_,w=u.lineWidth,S=void 0===w?o.lineWidth:w,A=u.verticalMode,T=void 0===A?o.verticalMode:A,E=u.suffixPosition,C=void 0===E?o.suffixPosition:E,B=null!==(e=ka(u.lineHeight,u.fontSize||o.fontSize))&&void 0!==e?e:(u.fontSize||o.fontSize)+c,M=u.textAlign,R=void 0===M?o.textAlign:M,P=u.textBaseline,O=void 0===P?o.textBaseline:P;if(!T){var I=R;R=null!==(n=i.baselineMapAlign[O])&&void 0!==n?n:"left",O=null!==(r=i.alignMapBaseline[I])&&void 0!==r?r:"top"}if(!this.shouldUpdateShape()&&this.cache){var L=Us(R,a=this.cache.clipedWidth),D=Ws(O,B,g);return this._AABBBounds.set(D,L,D+B,L+a),x&&this._AABBBounds.expand(S/2),this._AABBBounds}var j=[Mo(t.toString())];if(Number.isFinite(d)){if(v){var F=!0===v?o.ellipsis:v,N=s.clipTextWithSuffixVertical(j[0],{fontSize:g,fontWeight:m,fontFamily:b},d,F,!1,C);j=[N.verticalList],a=N.width}else{var z=s.clipTextVertical(j[0],{fontSize:g,fontWeight:m,fontFamily:b},d,!1);j=[z.verticalList],a=z.width}this.cache.verticalList=j,this.cache.clipedWidth=a}else a=0,j[0].forEach((function(t){var e=t.direction===Eo.HORIZONTAL?g:s.measureTextWidth(t.text,{fontSize:g,fontWeight:m,fontFamily:b});a+=e,t.width=e})),this.cache.verticalList=j,this.cache.clipedWidth=a;this.clearUpdateShapeTag();var G=Us(R,a),U=Ws(O,B,g);return this._AABBBounds.set(U,G,U+B,G+a),x&&this._AABBBounds.expand(S/2),this._AABBBounds}},{key:"updateHorizontalMultilineAABBBounds",value:function(t){var e,i,n=Er(this).text,r=this.attribute.wrap;if(void 0===r?n.wrap:r)return this.updateWrapAABBBounds(t);var a=this.attribute,o=a.fontFamily,s=void 0===o?n.fontFamily:o,u=a.textAlign,l=void 0===u?n.textAlign:u,c=a.textBaseline,h=void 0===c?n.textBaseline:c,d=a.fontSize,f=void 0===d?n.fontSize:d,v=a.fontWeight,p=void 0===v?n.fontWeight:v,g=a.ellipsis,y=void 0===g?n.ellipsis:g,m=a.maxLineWidth,k=a.stroke,b=void 0===k?n.stroke:k,_=a.lineWidth,x=void 0===_?n.lineWidth:_,w=a.whiteSpace,S=void 0===w?n.whiteSpace:w,A=a.suffixPosition,T=void 0===A?n.suffixPosition:A,E=null!==(e=ka(a.lineHeight,a.fontSize||n.fontSize))&&void 0!==e?e:a.fontSize||n.fontSize;if("normal"===S)return this.updateWrapAABBBounds(t);if(!this.shouldUpdateShape()&&(null===(i=this.cache)||void 0===i?void 0:i.layoutData)){var C=this.cache.layoutData.bbox;return this._AABBBounds.set(C.xOffset,C.yOffset,C.xOffset+C.width,C.yOffset+C.height),b&&this._AABBBounds.expand(x/2),this._AABBBounds}var B=Un.graphicUtil.textMeasure,M=new Vs(s,{fontSize:f,fontWeight:p,fontFamily:s},B).GetLayoutByLines(t,l,h,E,!0===y?n.ellipsis:y||void 0,!1,m,T),R=M.bbox;return this.cache.layoutData=M,this.clearUpdateShapeTag(),this._AABBBounds.set(R.xOffset,R.yOffset,R.xOffset+R.width,R.yOffset+R.height),b&&this._AABBBounds.expand(x/2),this._AABBBounds}},{key:"updateVerticalMultilineAABBBounds",value:function(t){var e,n,r,a,o=Er(this).text,s=Un.graphicUtil.textMeasure,u=this.attribute,l=u.ignoreBuf,c=(void 0===l?o.ignoreBuf:l)?0:2,h=u.maxLineWidth,d=void 0===h?o.maxLineWidth:h,f=u.ellipsis,v=void 0===f?o.ellipsis:f,p=u.fontFamily,g=void 0===p?o.fontFamily:p,y=u.fontSize,m=void 0===y?o.fontSize:y,k=u.fontWeight,b=void 0===k?o.fontWeight:k,_=u.stroke,x=void 0===_?o.stroke:_,w=u.lineWidth,S=void 0===w?o.lineWidth:w,A=u.verticalMode,T=void 0===A?o.verticalMode:A,E=u.suffixPosition,C=void 0===E?o.suffixPosition:E,B=null!==(e=ka(u.lineHeight,u.fontSize||o.fontSize))&&void 0!==e?e:(u.fontSize||o.fontSize)+c,M=u.textAlign,R=void 0===M?o.textAlign:M,P=u.textBaseline,O=void 0===P?o.textBaseline:P;if(!T){var I=R;R=null!==(n=i.baselineMapAlign[O])&&void 0!==n?n:"left",O=null!==(r=i.alignMapBaseline[I])&&void 0!==r?r:"top"}if(a=0,!this.shouldUpdateShape()&&this.cache){this.cache.verticalList.forEach((function(t){var e=t.reduce((function(t,e){return t+e.width}),0);a=we(e,a)}));var L=Us(R,a),D=this.cache.verticalList.length*B,j=Ws(O,D,m);return this._AABBBounds.set(j,L,j+D,L+a),x&&this._AABBBounds.expand(S/2),this._AABBBounds}var F=t.map((function(t){return Mo(t.toString())}));F.forEach((function(t,e){if(Number.isFinite(d))if(v){var i=!0===v?o.ellipsis:v,n=s.clipTextWithSuffixVertical(t,{fontSize:m,fontWeight:b,fontFamily:g},d,i,!1,C);F[e]=n.verticalList,a=n.width}else{var r=s.clipTextVertical(t,{fontSize:m,fontWeight:b,fontFamily:g},d,!1);F[e]=r.verticalList,a=r.width}else a=0,t.forEach((function(t){var e=t.direction===Eo.HORIZONTAL?m:s.measureTextWidth(t.text,{fontSize:m,fontWeight:b,fontFamily:g});a+=e,t.width=e}))})),this.cache.verticalList=F,this.clearUpdateShapeTag(),this.cache.verticalList.forEach((function(t){var e=t.reduce((function(t,e){return t+e.width}),0);a=we(e,a)}));var N=Us(R,a),z=this.cache.verticalList.length*B,G=Ws(O,z,m);return this._AABBBounds.set(G,N,G+z,N+a),x&&this._AABBBounds.expand(S/2),this._AABBBounds}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Er(this).text[t]}},{key:"needUpdateTags",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hs;return p(h(i.prototype),"needUpdateTags",this).call(this,t,e)}},{key:"needUpdateTag",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hs;return p(h(i.prototype),"needUpdateTag",this).call(this,t,e)}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Ys(t){return new Xs(t)}Xs.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,direction:1,textAlign:1,textBaseline:1,fontFamily:1,fontWeight:1},fo),Xs.baselineMapAlign={top:"left",bottom:"right",middle:"center"},Xs.alignMapBaseline={left:"top",right:"bottom",center:"middle"};var Ks=["heightLimit","lineClamp"],qs=function(t){function i(t){return o(this,i),e(this,i,[Object.assign(Object.assign({},t),{wrap:!0})])}return c(i,t),u(i,[{key:"_isValid",value:function(){var t=this.attribute.text;return _t(t)?!t.every((function(t){return null==t||""===t})):null!=t&&""!==t}},{key:"updateMultilineAABBBounds",value:function(t){var e,i,n,r,a=Er(this).text,o=this.attribute,s=o.fontFamily,u=void 0===s?a.fontFamily:s,l=o.textAlign,c=void 0===l?a.textAlign:l,h=o.textBaseline,d=void 0===h?a.textBaseline:h,f=o.fontSize,v=void 0===f?a.fontSize:f,p=o.ellipsis,g=void 0===p?a.ellipsis:p,y=o.maxLineWidth,m=o.stroke,k=void 0===m?a.stroke:m,b=o.lineWidth,_=void 0===b?a.lineWidth:b,x=o.wordBreak,w=void 0===x?a.wordBreak:x,S=o.fontWeight,A=void 0===S?a.fontWeight:S,T=o.ignoreBuf,E=void 0===T?a.ignoreBuf:T,C=o.heightLimit,B=void 0===C?0:C,M=o.suffixPosition,R=void 0===M?a.suffixPosition:M,P=o.lineClamp,O=null!==(e=ka(this.attribute.lineHeight,this.attribute.fontSize||a.fontSize))&&void 0!==e?e:this.attribute.fontSize||a.fontSize,I=E?0:2;if(!this.shouldUpdateShape()&&(null===(i=this.cache)||void 0===i?void 0:i.layoutData)){var L=this.cache.layoutData.bbox;return this._AABBBounds.set(L.xOffset,L.yOffset,L.xOffset+L.width,L.yOffset+L.height),k&&this._AABBBounds.expand(_/2),this._AABBBounds}var D=Un.graphicUtil.textMeasure,j=new Vs(u,{fontSize:v,fontWeight:A,fontFamily:u},D),F=t.map((function(t){return t.toString()})),N=[],z=[0,0],G=1/0;if(B>0&&(G=Math.max(Math.floor(B/O),1)),P&&(G=Math.min(G,P)),"number"==typeof y&&y!==1/0){if(y>0)for(var U=0;U<F.length;U++){var W=F[U],V=!0;if(U===G-1){var H=j.textMeasure.clipTextWithSuffix(W,j.textOptions,y,g,!1,R);N.push({str:H.str,width:H.width});break}var X=j.textMeasure.clipText(W,j.textOptions,y,"break-word"===w);if(""!==W&&""===X.str){if(g){var Y=j.textMeasure.clipTextWithSuffix(W,j.textOptions,y,g,!1,R);X.str=null!==(n=Y.str)&&void 0!==n?n:"",X.width=null!==(r=Y.width)&&void 0!==r?r:0}else X.str="",X.width=0;V=!1}if(N.push({str:X.str,width:X.width}),X.str.length===W.length);else if(V){var K=W.substring(X.str.length);F.splice(U+1,0,K)}}var q=0;N.forEach((function(t){q=Math.max(q,t.width)})),z[0]=q}else{for(var Z,J,$=0,Q=0,tt=F.length;Q<tt;Q++){if(Q===G-1){var et=j.textMeasure.clipTextWithSuffix(F[Q],j.textOptions,y,g,!1,R);N.push({str:et.str,width:et.width}),$=Math.max($,et.width);break}J=F[Q],Z=j.textMeasure.measureTextWidth(J,j.textOptions,"break-word"===w),$=Math.max($,Z),N.push({str:J,width:Z})}z[0]=$}z[1]=N.length*(O+I);var it={xOffset:0,yOffset:0,width:z[0],height:z[1]};j.LayoutBBox(it,c,d);var nt=j.layoutWithBBox(it,N,c,d,O);return this.cache.layoutData=nt,this.clearUpdateShapeTag(),this._AABBBounds.set(it.xOffset,it.yOffset,it.xOffset+it.width,it.yOffset+it.height),k&&this._AABBBounds.expand(_/2),this._AABBBounds}},{key:"needUpdateTags",value:function(t){for(var e=0;e<Ks.length;e++){var n=Ks[e];if(-1!==t.indexOf(n))return!0}return p(h(i.prototype),"needUpdateTags",this).call(this,t)}},{key:"needUpdateTag",value:function(t){for(var e=0;e<Ks.length;e++)if(t===Ks[e])return!0;return p(h(i.prototype),"needUpdateTag",this).call(this,t)}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(Xs);function Zs(t){return new qs(t)}var Js=function(){return u((function t(){o(this,t)}),[{key:"bounds",value:function(t,e){if(St(t)){var i=t/2;e.x1=-i,e.x2=i,e.y1=-i,e.y2=i}else e.x1=-t[0]/2,e.x2=t[0]/2,e.y1=-t[1]/2,e.y2=t[1]/2}}])}();function $s(t,e,i,n,r){return r?t.arc(i,n,e,0,me,!1,r):t.arc(i,n,e,0,me),!1}var Qs=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="circle",t.pathStr="M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n,r){return $s(t,e/2,i,n,r)}},{key:"drawOffset",value:function(t,e,i,n,r,a){return $s(t,e/2+r,i,n,a)}},{key:"drawToSvgPath",value:function(t,e,i,n){var r=t/2;return"M ".concat(e-r,", ").concat(i," a ").concat(r,",").concat(r," 0 1,0 ").concat(2*r,",0 a ").concat(r,",").concat(r," 0 1,0 -").concat(2*r,",0")}}])}(Js),tu=new Qs;var eu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="cross",t.pathStr="M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n,r){return function(t,e,i,n,r){return t.moveTo(-3*e+i,-e+n,r),t.lineTo(-e+i,-e+n,r),t.lineTo(-e+i,-3*e+n,r),t.lineTo(e+i,-3*e+n,r),t.lineTo(e+i,-e+n,r),t.lineTo(3*e+i,-e+n,r),t.lineTo(3*e+i,e+n,r),t.lineTo(e+i,e+n,r),t.lineTo(e+i,3*e+n,r),t.lineTo(-e+i,3*e+n,r),t.lineTo(-e+i,e+n,r),t.lineTo(-3*e+i,e+n,r),t.closePath(),!0}(t,e/6,i,n,r)}},{key:"drawOffset",value:function(t,e,i,n,r,a){return function(t,e,i,n,r,a){return t.moveTo(-3*e+i-r,-e+n-r,a),t.lineTo(-e+i-r,-e+n-r,a),t.lineTo(-e+i-r,-3*e+n-r,a),t.lineTo(e+i+r,-3*e+n-r,a),t.lineTo(e+i+r,-e+n-r,a),t.lineTo(3*e+i+r,-e+n-r,a),t.lineTo(3*e+i+r,e+n+r,a),t.lineTo(e+i+r,e+n+r,a),t.lineTo(e+i+r,3*e+n+r,a),t.lineTo(-e+i-r,3*e+n+r,a),t.lineTo(-e+i-r,e+n+r,a),t.lineTo(-3*e+i-r,e+n+r,a),t.closePath(),!0}(t,e/6,i,n,r,a)}}])}(Js),iu=new eu;function nu(t,e,i,n,r){return t.moveTo(i,n-e,r),t.lineTo(e+i,n,r),t.lineTo(i,n+e,r),t.lineTo(i-e,n,r),t.closePath(),!0}var ru=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="diamond",t.pathStr="M-0.5,0L0,-0.5L0.5,0L0,0.5Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n,r){return nu(t,e/2,i,n,r)}},{key:"drawFitDir",value:function(t,e,i,n,r){return nu(t,e/2,i,n,r)}},{key:"drawOffset",value:function(t,e,i,n,r,a){return nu(t,e/2+r,i,n,a)}}])}(Js),au=new ru;function ou(t,e,i,n){var r=2*e;return t.rect(i-e,n-e,r,r),!1}var su=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="square",t.pathStr="M-0.5,-0.5h1v1h-1Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return ou(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return ou(t,e/2+r,i,n)}}])}(Js),uu=new su;var lu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="triangleUp",t.pathStr="M0.5,0.5 L-0.5,0.5 L0,-0.5 Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return function(t,e,i,n){return t.moveTo(i+e,e+n),t.lineTo(i-e,e+n),t.lineTo(i,n-e),t.closePath(),!0}(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return function(t,e,i,n,r){return t.moveTo(i+e+2*r,e+n+r),t.lineTo(i-e-2*r,e+n+r),t.lineTo(i,n-e-2*r),t.closePath(),!0}(t,e/2,i,n,r)}}])}(Js),cu=new lu,hu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="triangle",t}return c(i,t),u(i)}(lu),du=new hu,fu=Math.sin(Math.PI/10)/Math.sin(7*Math.PI/10),vu=Math.sin(me/10)*fu,pu=-Math.cos(me/10)*fu;function gu(t,e,i,n){var r=vu*e,a=pu*e;t.moveTo(i,-e+n),t.lineTo(r+i,a+n);for(var o=1;o<5;++o){var s=me*o/5,u=Math.cos(s),l=Math.sin(s);t.lineTo(l*e+i,-u*e+n),t.lineTo(u*r-l*a+i,l*r+u*a+n)}return t.closePath(),!0}var yu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="star",t.pathStr="M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return gu(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return gu(t,e/2+r,i,n)}}])}(Js),mu=new yu,ku=Te(3);function bu(t,e,i,n){var r=e,a=r/ku,o=a/5,s=e;return t.moveTo(0+i,-r+n),t.lineTo(a/2+i,n),t.lineTo(o/2+i,n),t.lineTo(o/2+i,s+n),t.lineTo(-o/2+i,s+n),t.lineTo(-o/2+i,n),t.lineTo(-a/2+i,n),t.closePath(),!0}var _u=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="arrow",t.pathStr="M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return bu(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return bu(t,e/2+r,i,n)}}])}(Js),xu=new _u;function wu(t,e,i,n){var r=2*e;return t.moveTo(i,-e+n),t.lineTo(r/3/2+i,e+n),t.lineTo(-r/3/2+i,e+n),t.closePath(),!0}var Su=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="wedge",t.pathStr="M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return wu(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return wu(t,e/2+r,i,n)}}])}(Js),Au=new Su;function Tu(t,e,i,n){return t.moveTo(-e+i,n),t.lineTo(i,e+n),!1}var Eu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="stroke",t.pathStr="",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return Tu(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return Tu(t,e/2+r,i,n)}}])}(Js),Cu=new Eu,Bu=-.5,Mu=Te(3)/2,Ru=1/Te(12);function Pu(t,e,i,n){var r=e/2,a=e*Ru,o=r,s=e*Ru+e,u=-o,l=s;return t.moveTo(r+i,a+n),t.lineTo(o+i,s+n),t.lineTo(u+i,l+n),t.lineTo(Bu*r-Mu*a+i,Mu*r+Bu*a+n),t.lineTo(Bu*o-Mu*s+i,Mu*o+Bu*s+n),t.lineTo(Bu*u-Mu*l+i,Mu*u+Bu*l+n),t.lineTo(Bu*r+Mu*a+i,Bu*a-Mu*r+n),t.lineTo(Bu*o+Mu*s+i,Bu*s-Mu*o+n),t.lineTo(Bu*u+Mu*l+i,Bu*l-Mu*u+n),t.closePath(),!1}var Ou=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="wye",t.pathStr="M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return Pu(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return Pu(t,e/2+r,i,n)}}])}(Js),Iu=new Ou;var Lu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="triangleLeft",t.pathStr="M-0.5,0 L0.5,0.5 L0.5,-0.5 Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return function(t,e,i,n){return t.moveTo(-e+i,n),t.lineTo(e+i,e+n),t.lineTo(e+i,n-e),t.closePath(),!0}(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return function(t,e,i,n,r){return t.moveTo(-e+i-2*r,n),t.lineTo(e+i+r,e+n+2*r),t.lineTo(e+i+r,n-e-2*r),t.closePath(),!0}(t,e/2,i,n,r)}}])}(Js),Du=new Lu;var ju=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="triangleRight",t.pathStr="M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return function(t,e,i,n){return t.moveTo(i-e,e+n),t.lineTo(e+i,n),t.lineTo(i-e,n-e),t.closePath(),!0}(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return function(t,e,i,n,r){return t.moveTo(i-e-r,e+n+2*r),t.lineTo(e+i+2*r,n),t.lineTo(i-e-r,n-e-2*r),t.closePath(),!0}(t,e/2,i,n,r)}}])}(Js),Fu=new ju;var Nu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="triangleDown",t.pathStr="M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return function(t,e,i,n){return t.moveTo(i-e,n-e),t.lineTo(i+e,n-e),t.lineTo(i,n+e),t.closePath(),!0}(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return function(t,e,i,n,r){return t.moveTo(i-e-2*r,n-e-r),t.lineTo(i+e+2*r,n-e-r),t.lineTo(i,n+e+2*r),t.closePath(),!0}(t,e/2,i,n,r)}}])}(Js),zu=new Nu,Gu=Te(3);function Uu(t,e,i,n){var r=e*Gu;return t.moveTo(i,n+-r/3*2),t.lineTo(e+i,n+r),t.lineTo(i-e,n+r),t.closePath(),!0}var Wu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="thinTriangle",t.pathStr="M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return Uu(t,e/2/Gu,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return Uu(t,e/2/Gu+r,i,n)}}])}(lu),Vu=new Wu;function Hu(t,e,i,n){var r=2*e;return t.moveTo(e+i,n-r),t.lineTo(i-e,n),t.lineTo(e+i,r+n),!0}var Xu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="arrow2Left",t.pathStr="M 0.25 -0.5 L -0.25 0 l 0.25 0.5",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return Hu(t,e/4,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return Hu(t,e/4+r,i,n)}}])}(Js),Yu=new Xu;function Ku(t,e,i,n){var r=2*e;return t.moveTo(i-e,n-r),t.lineTo(i+e,n),t.lineTo(i-e,r+n),!0}var qu=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="arrow2Right",t.pathStr="M -0.25 -0.5 l 0.25 0 l -0.25 0.5",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return Ku(t,e/4,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return Ku(t,e/4+r,i,n)}}])}(Js),Zu=new qu;function Ju(t,e,i,n){var r=2*e;return t.moveTo(i-r,n+e),t.lineTo(i,n-e),t.lineTo(i+r,n+e),!0}var $u=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="arrow2Up",t.pathStr="M -0.5 0.25 L 0 -0.25 l 0.5 0.25",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return Ju(t,e/4,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return Ju(t,e/4+r,i,n)}}])}(Js),Qu=new $u;function tl(t,e,i,n){var r=2*e;return t.moveTo(i-r,n-e),t.lineTo(i,n+e),t.lineTo(i+r,n-e),!0}var el=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="arrow2Down",t.pathStr="M -0.5 -0.25 L 0 0.25 l 0.5 -0.25",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return tl(t,e/4,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return tl(t,e/4+r,i,n)}}])}(Js),il=new el;function nl(t,e,i,n,r){return t.moveTo(i,n-e),t.lineTo(i,n+e),!0}var rl=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="lineV",t.pathStr="M0,-0.5L0,0.5",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n,r){return nl(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r,a){return nl(t,e/2+r,i,n)}},{key:"drawToSvgPath",value:function(t,e,i,n){var r=t/2;return"M ".concat(e,", ").concat(i-r," L ").concat(e,",").concat(i+r)}}])}(Js),al=new rl;function ol(t,e,i,n,r){return t.moveTo(i-e,n),t.lineTo(i+e,n),!0}var sl=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="lineH",t.pathStr="M-0.5,0L0.5,0",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n,r){return ol(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r,a){return ol(t,e/2+r,i,n)}},{key:"drawToSvgPath",value:function(t,e,i,n){var r=t/2;return"M ".concat(e-r,", ").concat(i," L ").concat(e+r,",").concat(i)}}])}(Js),ul=new sl;function ll(t,e,i,n,r){return t.moveTo(i-e,n-e),t.lineTo(i+e,n+e),t.moveTo(i+e,n-e),t.lineTo(i-e,n+e),!0}var cl=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="close",t.pathStr="M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n,r){return ll(t,e/2,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r,a){return ll(t,e/2+r,i,n)}},{key:"drawToSvgPath",value:function(t,e,i,n){var r=t/2;return"M ".concat(e-r,", ").concat(i-r," L ").concat(e+r,",").concat(i+r," M ").concat(e+r,", ").concat(i-r," L ").concat(e-r,",").concat(i+r)}}])}(Js),hl=new cl;function dl(t,e,i,n){return t.rect(i-e[0]/2,n-e[1]/2,e[0],e[1]),!1}function fl(t,e,i,n){var r=e,a=e/2;return t.rect(i-r/2,n-a/2,r,a),!1}var vl=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="rect",t.pathStr="M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z",t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){return St(e)?fl(t,e,i,n):dl(t,e,i,n)}},{key:"drawOffset",value:function(t,e,i,n,r){return St(e)?fl(t,e+2*r,i,n):dl(t,[e[0]+2*r,e[1]+2*r],i,n)}}])}(Js),pl=new vl,gl=new De,yl=function(){return u((function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o(this,t),this.pathStr="",this.type=e,_t(i)?this.svgCache=i:this.path=i,this.isSvg=n}),[{key:"drawOffset",value:function(t,e,i,n,r,a,o){return this.isSvg?!!this.svgCache&&(this.svgCache.forEach((function(r){t.beginPath(),Ni(r.path.commandList,t,i,n,e,e),o&&o(r.path,r.attribute)})),!1):(Ni(this.path.commandList,t,i,n,e+r,e+r),!1)}},{key:"draw",value:function(t,e,i,n,r,a){return this.isSvg?!!this.svgCache&&(this.svgCache.forEach((function(r){t.beginPath(),Ni(r.path.commandList,t,i,n,e,e),a&&a(r.path,r.attribute)})),!1):(Ni(this.path.commandList,t,i,n,e,e),!1)}},{key:"bounds",value:function(t,e){if(this.isSvg){if(!this.svgCache)return;return e.clear(),void this.svgCache.forEach((function(i){var n=i.path;gl.x1=n.bounds.x1*t,gl.y1=n.bounds.y1*t,gl.x2=n.bounds.x2*t,gl.y2=n.bounds.y2*t,e.union(gl)}))}this.path.bounds&&(e.x1=this.path.bounds.x1*t,e.y1=this.path.bounds.y1*t,e.x2=this.path.bounds.x2*t,e.y2=this.path.bounds.y2*t)}}])}(),ml={};[tu,iu,au,uu,Vu,du,mu,xu,Au,Cu,Iu,Du,Fu,cu,zu,Yu,Zu,Qu,il,pl,al,ul,hl].forEach((function(t){ml[t.type]=t}));var kl={arrowLeft:"M 0.25 -0.5 L -0.25 0 l 0.5 0.5",arrowRight:"M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",rectRound:"M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",roundLine:"M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"},bl=new De,_l=["symbolType","size"].concat(y(so)),xl=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{symbolType:"circle"};return o(this,i),(t=e(this,i,[n])).type="symbol",t.numberType=qo,t}return c(i,t),u(i,[{key:"getParsedPath",value:function(){return this.shouldUpdateShape()&&(this.doUpdateParsedPath(),this.clearUpdateShapeTag()),this._parsedPath}},{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){var t=this.attribute.size;return _t(t)?2===t.length&&t.every(this._validNumber):this._validNumber(t)}},{key:"doUpdateParsedPath",value:function(){var t,e=Er(this).symbol,n=this.attribute.symbolType,r=void 0===n?e.symbolType:n,a=ml[r];if(a)return this._parsedPath=a,a;if(a=i.userSymbolMap[r])return this._parsedPath=a,a;if(!0===((t=r=kl[r]||r).startsWith("<svg")||t.startsWith("<?xml"))){var o=(new So).parse(r).svg;if(!o)return null;var s=_t(o.path)?o.path:[o.path];bl.clear();var u=[];s.forEach((function(t){var e=(new yn).fromString(t.d),i={};ts.forEach((function(e){t[e]&&(i[Qo[e]]=t[e])})),u.push({path:e,attribute:i}),bl.union(e.bounds)}));var l=bl.width(),c=bl.height(),h=1/we(l,c);return u.forEach((function(t){return t.path.transform(0,0,h,h)})),this._parsedPath=new yl(r,u,!0),i.userSymbolMap[r]=this._parsedPath,this._parsedPath}var d=(new yn).fromString(r),f=d.bounds.width(),v=d.bounds.height(),p=1/we(f,v);return d.transform(0,0,p,p),this._parsedPath=new yl(r,d),i.userSymbolMap[r]=this._parsedPath,this._parsedPath}},{key:"doUpdateAABBBounds",value:function(t){var e=Er(this).symbol;this._AABBBounds.clear();var i=this.attribute,n=Un.graphicService.updateSymbolAABBBounds(i,Er(this).symbol,this._AABBBounds,t,this),r=i.boundsPadding,a=void 0===r?e.boundsPadding:r,o=ua(a);return o&&n.expand(o),this.clearUpdateBoundTag(),n}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Er(this).symbol[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,_l)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,_l)}},{key:"toCustomPath",value:function(){var t=this.getParsedPath(),e=this.attribute.size,i=_t(e)?e:[e,e];return t.path?(new yn).fromCustomPath2D(t.path,0,0,i[0],i[1]):(new yn).fromString(t.pathStr,0,0,i[0],i[1])}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function wl(t){return new xl(t)}xl.userSymbolMap={},xl.NOWORK_ANIMATE_ATTR=Object.assign({symbolType:1},fo);var Sl=["segments","points","curveType"].concat(y(so)),Al=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,i),(t=e(this,i,[n])).type="line",t.numberType=Uo,t}return c(i,t),u(i,[{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){if(this.pathProxy)return!0;var t=this.attribute,e=t.points,i=t.segments;return i?0!==i.length:!(!e||e.length<=1)}},{key:"_interpolate",value:function(t,e,i,n,r){"points"===t&&(r.points=fa(i,n,e))}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).line;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateLineAABBBounds(e,Er(this).line,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Er(this).line[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,Sl)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,Sl)}},{key:"toCustomPath",value:function(){var t=this.attribute,e=new yn,i=t.segments,n=function(t){if(t&&t.length){var i=!0;t.forEach((function(t){!1!==t.defined&&(i?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y),i=!1)}))}};return i&&i.length?i.forEach((function(t){n(t.points)})):t.points&&n(t.points),e}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Tl(t){return new Al(t)}Al.NOWORK_ANIMATE_ATTR=Object.assign({segments:1,curveType:1},fo);var El=["width","x1","y1","height","cornerRadius"].concat(y(so)),Cl=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="rect",n.numberType=Xo,n}return c(i,t),u(i,[{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){return!0}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).rect;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateRectAABBBounds(e,Er(this).rect,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Er(this).rect[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,El)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,El)}},{key:"toCustomPath",value:function(){var t=this.attribute,e=Ra(t),i=e.x,n=e.y,r=e.width,a=e.height,o=new yn;return o.moveTo(i,n),o.rect(i,n,r,a),o}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Bl(t){return new Cl(t)}Cl.NOWORK_ANIMATE_ATTR=fo;var Ml=[[0,0,0],[1,0,0],[1,1,0],[0,1,0],[0,0,1],[1,0,1],[1,1,1],[0,1,1]],Rl=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="rect3d",n.numberType=Yo,n}return c(i,t),u(i,[{key:"findFace",value:function(){var t={polygons:[],vertices:[],edges:[]},e=Er(this).rect,i=this.attribute,n=i.x1,r=i.y1,a=i.x,o=i.y,s=i.length,u=void 0===s?Se(e.width,e.height):s,l=this.attribute,c=l.width,h=l.height;c=null!=c?c:n-a,h=null!=h?h:r-o;for(var d=0;d<Ml.length;d++){var f=Ml[d];t.vertices.push([f[0]*c,f[1]*h,f[2]*u])}return t.polygons.push({polygon:[0,1,5,4],normal:[0,-1,0]}),t.polygons.push({polygon:[2,3,7,6],normal:[0,1,0]}),t.polygons.push({polygon:[4,7,3,0],normal:[-1,0,0]}),t.polygons.push({polygon:[1,2,6,5],normal:[1,0,0]}),t.polygons.push({polygon:[0,1,2,3],normal:[0,0,-1]}),t.polygons.push({polygon:[4,5,6,7],normal:[0,0,1]}),t.edges=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[3,7],[1,5],[2,6]],t}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(Cl);function Pl(t){return new Rl(t)}Rl.NOWORK_ANIMATE_ATTR=fo;var Ol=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="glyph",n.numberType=No,n.subGraphic=[],n._onInit&&n._onInit(f(n)),n.valid=n.isValid(),n}return c(i,t),u(i,[{key:"setSubGraphic",value:function(t){var e=this;this.detachSubGraphic(),this.subGraphic=t,t.forEach((function(t){t.glyphHost=e,Object.setPrototypeOf(t.attribute,e.attribute)})),this.valid=this.isValid(),this.addUpdateBoundTag()}},{key:"detachSubGraphic",value:function(){this.subGraphic.forEach((function(t){t.glyphHost=null,Object.setPrototypeOf(t.attribute,{})}))}},{key:"getSubGraphic",value:function(){return this.subGraphic}},{key:"onInit",value:function(t){this._onInit=t}},{key:"onUpdate",value:function(t){this._onUpdate=t}},{key:"isValid",value:function(){return!0}},{key:"setAttribute",value:function(t,e,n,r){p(h(i.prototype),"setAttribute",this).call(this,t,e,n,r),this.subGraphic.forEach((function(t){t.addUpdateShapeAndBoundsTag(),t.addUpdatePositionTag()}))}},{key:"setAttributes",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;p(h(i.prototype),"setAttributes",this).call(this,t,e,n),this.subGraphic.forEach((function(t){t.addUpdateShapeAndBoundsTag(),t.addUpdatePositionTag()}))}},{key:"translate",value:function(t,e){return p(h(i.prototype),"translate",this).call(this,t,e),this.subGraphic.forEach((function(t){t.addUpdatePositionTag(),t.addUpdateBoundTag()})),this}},{key:"translateTo",value:function(t,e){return p(h(i.prototype),"translateTo",this).call(this,t,e),this.subGraphic.forEach((function(t){t.addUpdatePositionTag(),t.addUpdateBoundTag()})),this}},{key:"scale",value:function(t,e,n){return p(h(i.prototype),"scale",this).call(this,t,e,n),this.subGraphic.forEach((function(t){t.addUpdatePositionTag(),t.addUpdateBoundTag()})),this}},{key:"scaleTo",value:function(t,e){return p(h(i.prototype),"scaleTo",this).call(this,t,e),this.subGraphic.forEach((function(t){t.addUpdatePositionTag(),t.addUpdateBoundTag()})),this}},{key:"rotate",value:function(t){return p(h(i.prototype),"rotate",this).call(this,t),this.subGraphic.forEach((function(t){t.addUpdatePositionTag(),t.addUpdateBoundTag()})),this}},{key:"rotateTo",value:function(t){return p(h(i.prototype),"rotate",this).call(this,t),this.subGraphic.forEach((function(t){t.addUpdatePositionTag(),t.addUpdateBoundTag()})),this}},{key:"doUpdateAABBBounds",value:function(){this._AABBBounds.clear();var t=Un.graphicService.updateGlyphAABBBounds(this.attribute,Er(this).glyph,this._AABBBounds,this);return this.clearUpdateBoundTag(),t}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"needUpdateTags",value:function(t){return!1}},{key:"needUpdateTag",value:function(t){return!1}},{key:"useStates",value:function(t,e){var i,n=this;if(t.length){if((null===(i=this.currentStates)||void 0===i?void 0:i.length)!==t.length||t.some((function(t,e){return n.currentStates[e]!==t}))){this.stopStateAnimates();var r={},a=this.subGraphic.map((function(){return{}}));t.forEach((function(e){var i,o=n.glyphStateProxy?n.glyphStateProxy(e,t):n.glyphStates[e];o&&(Object.assign(r,o.attributes),(null===(i=o.subAttributes)||void 0===i?void 0:i.length)&&a.forEach((function(t,e){Object.assign(t,o.subAttributes[e])})))})),this.subGraphic.forEach((function(i,n){i.updateNormalAttrs(a[n]),i.applyStateAttrs(a[n],t,e)})),this.updateNormalAttrs(r),this.currentStates=t,this.applyStateAttrs(r,t,e)}}else this.clearStates(e)}},{key:"clearStates",value:function(t){var e=this;this.stopStateAnimates(),this.hasState()&&this.normalAttrs?(this.currentStates=[],this.subGraphic.forEach((function(i){i.applyStateAttrs(i.normalAttrs,e.currentStates,t,!0),i.normalAttrs=null})),this.applyStateAttrs(this.normalAttrs,this.currentStates,t,!0)):this.currentStates=[],this.normalAttrs=null}},{key:"clone",value:function(){var t=new i(Object.assign({},this.attribute));return t.setSubGraphic(this.subGraphic.map((function(t){return t.clone()}))),t}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Il(t){return new Ol(t)}Ol.NOWORK_ANIMATE_ATTR=fo;var Ll=function(){return u((function t(e,i,n,r,a,s,u,l,c,h,d,f,v,p){o(this,t),this.left=e,this.top=i,this.width=n,this.height=r,this.actualHeight=0,this.bottom=i+r,this.right=e+n,this.ellipsis=a,this.wordBreak=s,this.verticalDirection=u,this.lines=[],this.globalAlign=l,this.globalBaseline=c,this.layoutDirection=h,this.directionKey=Wn[this.layoutDirection],this.isWidthMax=d,this.isHeightMax=f,this.singleLine=v,p?(p.clear(),this.icons=p):this.icons=new Map}),[{key:"draw",value:function(t,e){var i=this.getActualSize(),n=i.width,r=i.height,a=this.isWidthMax?Math.min(this.width,n):this.width||n||0,o=this.isHeightMax?Math.min(this.height,r):this.height||r||0;o=Math.min(o,r);var s=0;switch(this.globalBaseline){case"top":s=0;break;case"middle":s=-o/2;break;case"bottom":s=-o}var u=0;"right"===this.globalAlign||"end"===this.globalAlign?u=-a:"center"===this.globalAlign&&(u=-a/2);var l=this[this.directionKey.height];this.singleLine&&(l=this.lines[0].height+1);var c=!1;if("middle"===this.verticalDirection)if(this.actualHeight>=l&&0!==l)for(var h=0;h<this.lines.length;h++){var d=this.lines[h],f=d.top,v=d.height;if(f+v<this[this.directionKey.top]||f+v>this[this.directionKey.top]+l)return c;var p=!1;this.ellipsis&&this.lines[h+1]&&this.lines[h+1].top+this.lines[h+1].height>this[this.directionKey.top]+l&&(p=!0,c=!0),this.lines[h].draw(t,p,this.lines[h][this.directionKey.left]+u,this.lines[h][this.directionKey.top]+s,this.ellipsis,e)}else{var g=Math.floor((l-this.actualHeight)/2);"vertical"===this.layoutDirection?u+=g:s+=g;for(var y=0;y<this.lines.length;y++)this.lines[y].draw(t,!1,this.lines[y][this.directionKey.left]+u,this.lines[y][this.directionKey.top]+s,this.ellipsis,e)}else if("bottom"===this.verticalDirection&&"vertical"!==this.layoutDirection)for(var m=0;m<this.lines.length;m++){var k=this.lines[m];k.top;var b=k.height,_=l-this.lines[m].top-this.lines[m].height;if(0===l)this.lines[m].draw(t,!1,u,_+s,this.ellipsis,e);else{if(_+b>this[this.directionKey.top]+l||_<this[this.directionKey.top])return c;var x=!1;this.ellipsis&&this.lines[m+1]&&_-this.lines[m+1].height<this[this.directionKey.top]&&(x=!0,c=!0),this.lines[m].draw(t,x,u,_+s,this.ellipsis,e)}}else{"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&this.singleLine&&this.isWidthMax&&(u+=this.lines[0].height+1);for(var w=0;w<this.lines.length;w++){"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&(u-=this.lines[w].height+this.lines[w].top);var S=this.lines[w],A=S.top,T=S.height;if(0===l)this.lines[w].draw(t,!1,this.lines[w][this.directionKey.left]+u,this.lines[w][this.directionKey.top]+s,this.ellipsis,e);else{if(A+T<this[this.directionKey.top]||A+T>this[this.directionKey.top]+l)return c;var E=!1;this.ellipsis&&this.lines[w+1]&&this.lines[w+1].top+this.lines[w+1].height>this[this.directionKey.top]+l&&(E=!0,c=!0),this.lines[w].draw(t,E,this.lines[w][this.directionKey.left]+u,this.lines[w][this.directionKey.top]+s,this.ellipsis,e)}}}return c}},{key:"getActualSize",value:function(){return this.ellipsis?this.getActualSizeWidthEllipsis():this.getRawActualSize()}},{key:"getRawActualSize",value:function(){for(var t=0,e=0,i=0;i<this.lines.length;i++){var n=this.lines[i];n.actualWidth>t&&(t=n.actualWidth),e+=n.height}return{width:"vertical"===this.layoutDirection?e:t,height:"vertical"===this.layoutDirection?t:e}}},{key:"getActualSizeWidthEllipsis",value:function(){var t=0,e=0,i=this.getRawActualSize();i.width;i.height;this.width,this.height;var n=this[this.directionKey.height];if(this.singleLine&&(n=this.lines[0].height+1),"middle"===this.verticalDirection)if(this.actualHeight>=n&&0!==n)for(var r=0;r<this.lines.length;r++){var a=this.lines[r],o=a.top,s=a.height;if(o+s<this[this.directionKey.top]||o+s>this[this.directionKey.top]+n);else if(this.ellipsis&&this.lines[r+1]&&this.lines[r+1].top+this.lines[r+1].height>this[this.directionKey.top]+n){var u=!0===this.ellipsis?"...":this.ellipsis||"",l=this.lines[r].getWidthWithEllips(u);l>t&&(t=l),e+=this.lines[r].height}else this.lines[r].actualWidth>t&&(t=this.lines[r].actualWidth),e+=this.lines[r].height}else{Math.floor((n-this.actualHeight)/2);for(var c=0;c<this.lines.length;c++)this.lines[c].actualWidth>t&&(t=this.lines[c].actualWidth),e+=this.lines[c].height}else if("bottom"===this.verticalDirection)for(var h=0;h<this.lines.length;h++){var d=this.lines[h];d.top;var f=d.height,v=n-this.lines[h].top-this.lines[h].height;if(0===n)this.lines[h].actualWidth>t&&(t=this.lines[h].actualWidth),e+=this.lines[h].height;else if(v+f>this[this.directionKey.top]+n||v<this[this.directionKey.top]);else if(this.ellipsis&&this.lines[h+1]&&v-this.lines[h+1].height<this[this.directionKey.top]){var p=!0===this.ellipsis?"...":this.ellipsis||"",g=this.lines[h].getWidthWithEllips(p);g>t&&(t=g),e+=this.lines[h].height}else this.lines[h].actualWidth>t&&(t=this.lines[h].actualWidth),e+=this.lines[h].height}else for(var y=0;y<this.lines.length;y++){var m=this.lines[y],k=m.top,b=m.height;if(0===n)this.lines[y].actualWidth>t&&(t=this.lines[y].actualWidth),e+=this.lines[y].height;else if(k+b<this[this.directionKey.top]||k+b>this[this.directionKey.top]+n);else if(this.ellipsis&&this.lines[y+1]&&this.lines[y+1].top+this.lines[y+1].height>this[this.directionKey.top]+n){var _=!0===this.ellipsis?"...":this.ellipsis||"",x=this.lines[y].getWidthWithEllips(_);x>t&&(t=x),e+=this.lines[y].height}else this.lines[y].actualWidth>t&&(t=this.lines[y].actualWidth),e+=this.lines[y].height}return{width:"vertical"===this.layoutDirection?e:t,height:"vertical"===this.layoutDirection?t:e}}}])}(),Dl=function(){return u((function t(e,i,n){o(this,t),this.fontSize=n.fontSize||16,this.textBaseline=n.textBaseline||"alphabetic";var r=ka(n.lineHeight,this.fontSize);this.lineHeight="number"==typeof r?r>this.fontSize?r:this.fontSize:Math.floor(1.2*this.fontSize),this.height=this.lineHeight;var a=Jn(e,n),s=a.ascent,u=a.height,l=a.descent,c=a.width,h=0,d=0,f=0;this.height>u&&(h=(this.height-u)/2,d=Math.ceil(h),f=Math.floor(h)),"top"===this.textBaseline?(this.ascent=h,this.descent=u-h):"bottom"===this.textBaseline?(this.ascent=u-h,this.descent=h):"middle"===this.textBaseline?(this.ascent=this.height/2,this.descent=this.height/2):(this.ascent=s+d,this.descent=l+f),this.length=e.length,this.width=c||0,this.text=e||"",this.newLine=i||!1,this.character=n,this.left=0,this.top=0,this.ellipsis="normal",this.ellipsisWidth=0,this.ellipsisOtherParagraphWidth=0,"vertical"===n.direction&&(this.direction=n.direction,this.widthOrigin=this.width,this.heightOrigin=this.height,this.width=this.heightOrigin,this.height=this.widthOrigin,this.lineHeight=this.height),this.ellipsisStr="..."}),[{key:"updateWidth",value:function(){var t=Jn(this.text,this.character).width;this.width=t,"vertical"===this.direction&&(this.widthOrigin=this.width,this.width=this.heightOrigin,this.height=this.widthOrigin)}},{key:"draw",value:function(t,e,i,n,r){var a=this.text,o=this.left+i;e+=this.top;var s=this.direction;if(this.verticalEllipsis)a=this.ellipsisStr,s="vertical",e-=this.ellipsisWidth/2;else{if("hide"===this.ellipsis)return;if("add"===this.ellipsis)a+=this.ellipsisStr,"right"!==r&&"end"!==r||(o-=this.ellipsisWidth);else if("replace"===this.ellipsis){var u=qn(a,("vertical"===s?this.height:this.width)-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,a.length-1);if(a=a.slice(0,u),a+=this.ellipsisStr,"right"===r||"end"===r){var l=Jn(this.text.slice(u),this.character).width;"vertical"===s||(o-=this.ellipsisWidth-l)}}}switch(this.character.script){case"super":e-=this.ascent*(1/3);break;case"sub":e+=this.descent/2}"vertical"===s&&(t.save(),t.rotateAbout(Math.PI/2,o,e),t.translate(-this.heightOrigin||-this.lineHeight/2,-this.descent/2),t.translate(o,e),o=0,e=0),this.character.stroke&&(function(t,e){var i=e&&e.stroke||Hn;if(i){var n=e.strokeOpacity,r=void 0===n?1:n,a=e.opacity,o=void 0===a?1:a;t.globalAlpha=r*o,t.lineWidth=e&&"number"==typeof e.lineWidth?e.lineWidth:1,t.strokeStyle=i;var s=e.fontSize||16;switch(e.script){case"super":case"sub":s*=.8}t.setTextStyle({textAlign:"left",textBaseline:e.textBaseline||"alphabetic",fontStyle:e.fontStyle||"",fontWeight:e.fontWeight||"",fontSize:s,fontFamily:e.fontFamily||"sans-serif"})}else t.globalAlpha=0}(t,this.character),t.strokeText(a,o,e)),function(t,e){var i=e&&e.fill||Vn;if(i){var n=e.fillOpacity,r=void 0===n?1:n,a=e.opacity,o=void 0===a?1:a;t.globalAlpha=r*o,t.fillStyle=i;var s=e.fontSize||16;switch(e.script){case"super":case"sub":s*=.8}t.setTextStyle({textAlign:"left",textBaseline:e.textBaseline||"alphabetic",fontStyle:e.fontStyle||"",fontWeight:e.fontWeight||"",fontSize:s,fontFamily:e.fontFamily||"sans-serif"})}else t.globalAlpha=0}(t,this.character),this.character.fill&&t.fillText(a,o,e),this.character.fill&&("boolean"==typeof this.character.lineThrough||"boolean"==typeof this.character.underline?(this.character.underline&&t.fillRect(o,1+e,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1),this.character.lineThrough&&t.fillRect(o,1+e-this.ascent/2,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)):"underline"===this.character.textDecoration?t.fillRect(o,1+e,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1):"line-through"===this.character.textDecoration&&t.fillRect(o,1+e-this.ascent/2,this.widthOrigin||this.width,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)),"vertical"===s&&t.restore()}},{key:"getWidthWithEllips",value:function(t){var e=this.text,i="vertical"===t?this.height:this.width;if("hide"===this.ellipsis)return i;if("add"===this.ellipsis)return i+this.ellipsisWidth;if("replace"===this.ellipsis){var n=qn(e,i-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,e.length-1);e=e.slice(0,n),e+=this.ellipsisStr;var r=Jn(this.text.slice(n),this.character).width;return i+this.ellipsisWidth-r}return i}}])}();var jl=["width","height","image"].concat(y(so)),Fl=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="image",n.numberType=Go,n.loadImage(n.attribute.image),n}return c(i,t),u(i,[{key:"width",get:function(){var t;return null!==(t=this.attribute.width)&&void 0!==t?t:0},set:function(t){this.attribute.width===t&&(this.attribute.width=t,this.addUpdateShapeAndBoundsTag())}},{key:"height",get:function(){var t;return null!==(t=this.attribute.height)&&void 0!==t?t:0},set:function(t){this.attribute.height===t&&(this.attribute.height=t,this.addUpdateShapeAndBoundsTag())}},{key:"repeatX",get:function(){var t;return null!==(t=this.attribute.repeatX)&&void 0!==t?t:"no-repeat"},set:function(t){this.attribute.repeatX===t&&(this.attribute.repeatX=t)}},{key:"repeatY",get:function(){var t;return null!==(t=this.attribute.repeatY)&&void 0!==t?t:"no-repeat"},set:function(t){this.attribute.repeatY===t&&(this.attribute.repeatY=t)}},{key:"image",get:function(){return this.attribute.image},set:function(t){t!==this.attribute.image&&(this.attribute.image=t,this.loadImage(this.attribute.image))}},{key:"imageLoadSuccess",value:function(t,e,n){var r=this;p(h(i.prototype),"imageLoadSuccess",this).call(this,t,e,(function(){r.successCallback&&r.successCallback()}))}},{key:"imageLoadFail",value:function(t,e){var n=this;p(h(i.prototype),"imageLoadFail",this).call(this,t,(function(){n.failCallback&&n.failCallback()}))}},{key:"setAttributes",value:function(t,e,n){return t.image&&this.loadImage(t.image),p(h(i.prototype),"setAttributes",this).call(this,t,e,n)}},{key:"setAttribute",value:function(t,e,n,r){return"image"===t&&this.loadImage(e),p(h(i.prototype),"setAttribute",this).call(this,t,e,n,r)}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).image;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateImageAABBBounds(e,Er(this).image,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return zn[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,jl)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,jl)}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Nl(t){return new Fl(t)}Fl.NOWORK_ANIMATE_ATTR=Object.assign({image:1,repeatX:1,repeatY:1},fo);var zl=function(t){function i(t){var n;if(o(this,i),(n=e(this,i,[t]))._x=0,n._y=0,n._hovered=!1,n._marginArray=[0,0,0,0],"always"===t.backgroundShowMode&&(n._hovered=!0),t.margin){var r=ua(t.margin);n._marginArray="number"==typeof r?[r,r,r,r]:r}return n.onBeforeAttributeUpdate=function(t,e,i){if(_t(i)&&-1!==i.indexOf("margin")||"margin"===i)if(e.margin){var r=ua(e.margin);n._marginArray="number"==typeof r?[r,r,r,r]:r}else n._marginArray=[0,0,0,0]},f(n)}return c(i,t),u(i,[{key:"width",get:function(){var t;return(null!==(t=this.attribute.width)&&void 0!==t?t:0)+this._marginArray[1]+this._marginArray[3]}},{key:"height",get:function(){var t;return(null!==(t=this.attribute.height)&&void 0!==t?t:0)+this._marginArray[0]+this._marginArray[2]}},{key:"tryUpdateAABBBounds",value:function(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;this.doUpdateAABBBounds();var t=this.attribute,e=t.width,i=void 0===e?zn.width:e,n=t.height,r=void 0===n?zn.height:n,a=this.attribute,o=a.backgroundWidth,s=void 0===o?i:o,u=a.backgroundHeight,l=(s-i)/2,c=((void 0===u?r:u)-r)/2;return this._AABBBounds.expand([0,2*l,2*c,0]),this._AABBBounds}},{key:"setHoverState",value:function(t){"hover"===this.attribute.backgroundShowMode&&this._hovered!==t&&(this._hovered=t)}}])}(Fl),Gl=function(){return u((function t(e,i,n,r,a,s,u,l){var c=this;o(this,t),this.left=e,this.width=i,this.baseline=n,this.ascent=r,this.descent=a,this.top=n-r,this.paragraphs=s.map((function(t){return t})),this.textAlign=(this.paragraphs[0]instanceof zl?this.paragraphs[0].attribute.textAlign:this.paragraphs[0].character.textAlign)||"left",this.direction=u,this.directionKey=Wn[this.direction],this.actualWidth=0;var h=0;this.paragraphs.forEach((function(t,e){if(0===e&&t instanceof Dl){var i=Kn.exec(t.text);0!==(null==i?void 0:i.index)&&(t.text=t.text.slice(null==i?void 0:i.index),t.updateWidth())}c.actualWidth+=t[c.directionKey.width],h=Math.max(t[c.directionKey.height],h)})),this.height=h,this.blankWidth=l?0:this.width-this.actualWidth,this.calcOffset(i,l)}),[{key:"calcOffset",value:function(t,e){var i=this.directionKey,n=this.height,r=this.left,a=0;this.actualWidth<t&&!e&&("right"===this.textAlign||"end"===this.textAlign?r=t-this.actualWidth:"center"===this.textAlign?r=(t-this.actualWidth)/2:"justify"===this.textAlign&&(this.paragraphs.length<2?r=(t-this.actualWidth)/2:a=(t-this.actualWidth)/(this.paragraphs.length-1))),this.paragraphs.map((function(t){t instanceof zl?(t["_"+i.x]=r,r+=t[i.width]+a,t["_"+i.y]="top"===t.attribute.textBaseline?0:"bottom"===t.attribute.textBaseline?n-t.height:(n-t.height)/2):(t[i.left]=r,r+=t[i.width]+a)}))}},{key:"draw",value:function(t,e,i,n,r,a){var o=this;if(r&&(e||this.paragraphs.some((function(t){return t.overflow}))))for(var s=0,u=this.paragraphs.length-1;u>=0;u--){var l=this.paragraphs[u];if(!l.overflow){if(l instanceof zl)break;if("vertical"===this.direction&&"vertical"!==l.direction){l.verticalEllipsis=!0;break}var c=!0===r?"...":r||"";l.ellipsisStr=c;var h=Jn(c,l.character).width||0;if(h<=this.blankWidth+s){e&&(l.ellipsis="add");break}if(h<=this.blankWidth+s+l.width){l.ellipsis="replace",l.ellipsisWidth=h,l.ellipsisOtherParagraphWidth=this.blankWidth+s;break}l.ellipsis="hide",s+=l.width}}this.paragraphs.map((function(e,r){if(e instanceof zl)return e.setAttributes({x:i+e._x,y:n+e._y}),void a(e,t,i+e._x,n+e._y,o.ascent);e.draw(t,n+o.ascent,i,0===r,o.textAlign)}))}},{key:"getWidthWithEllips",value:function(t){for(var e=this,i=0,n=this.paragraphs.length-1;n>=0;n--){var r=this.paragraphs[n];if(r instanceof zl)break;var a=Jn(t,r.character).width||0;if(a<=this.blankWidth+i){r.ellipsis="add",r.ellipsisWidth=a;break}if(a<=this.blankWidth+i+r.width){r.ellipsis="replace",r.ellipsisWidth=a,r.ellipsisOtherParagraphWidth=this.blankWidth+i;break}r.ellipsis="hide",i+=r.width}var o=0;return this.paragraphs.map((function(t,i){o+=t instanceof zl?t.width:t.getWidthWithEllips(e.direction)})),o}}])}(),Ul=function(){return u((function t(e){o(this,t),this.frame=e,this.width=this.frame.width,this.height=this.frame.height,this.lineWidth=0,this.y=this.frame.top,this.maxAscent=0,this.maxDescent=0,this.maxAscentForBlank=0,this.maxDescentForBlank=0,this.lineBuffer=[],this.direction=e.layoutDirection,this.directionKey=Wn[this.direction]}),[{key:"store",value:function(t){if(t instanceof zl){this.frame.icons.set(t.richtextId,t),this.lineBuffer.push(t),this.lineWidth+=t[this.directionKey.width];var e=0,i=0;"top"===t.attribute.textBaseline?(e=0,i=t.height):"bottom"===t.attribute.textBaseline?(e=t.height,i=0):(e=t.height/2,i=t.height/2),this.maxAscent=Math.max(this.maxAscent,e),this.maxDescent=Math.max(this.maxDescent,i)}else this.lineBuffer.push(t),0!==t.text.length?(this.lineWidth+=t[this.directionKey.width],this.maxAscent=Math.max(this.maxAscent,t.ascent),this.maxDescent=Math.max(this.maxDescent,t.descent)):(this.maxAscentForBlank=Math.max(this.maxAscentForBlank,t.ascent),this.maxDescentForBlank=Math.max(this.maxDescentForBlank,t.descent))}},{key:"send",value:function(){if(0!==this.lineBuffer.length){var t=0===this.maxAscent?this.maxAscentForBlank:this.maxAscent,e=0===this.maxDescent?this.maxDescentForBlank:this.maxDescent,i=new Gl(this.frame.left,this[this.directionKey.width],this.y+t,t,e,this.lineBuffer,this.direction,"horizontal"===this.direction?this.frame.isWidthMax:this.frame.isHeightMax);this.frame.lines.push(i),this.frame.actualHeight+=i.height,this.y+=i.height,this.lineBuffer.length=0,this.lineWidth=this.maxAscent=this.maxDescent=this.maxAscentForBlank=this.maxDescentForBlank=0}}},{key:"deal",value:function(t){t instanceof zl?"horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+t[this.directionKey.width]<=this[this.directionKey.width]?this.store(t):0===this.lineBuffer.length?(this.store(t),this.send()):(this.send(),this.deal(t)):"number"!=typeof this.width||this.width<0||(t.newLine&&this.send(),0!==t.text.length&&("horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+t[this.directionKey.width]<=this[this.directionKey.width]?this.store(t):this.lineWidth===this[this.directionKey.width]?(this.send(),this.deal(t)):this.cut(t)))}},{key:"cut",value:function(t){var e=this[this.directionKey.width]-this.lineWidth||0,i=Math.ceil(e/t[this.directionKey.width]*t.length)||0,n=qn(t.text,e,t.character,i,"break-word"===this.frame.wordBreak);if(0!==n){var r=function(t,e){var i=t.text.slice(0,e),n=t.text.slice(e);return[new Dl(i,t.newLine,t.character),new Dl(n,!0,t.character)]}(t,n),a=g(r,2),o=a[0],s=a[1];this.store(o),this.deal(s)}else 0!==this.lineBuffer.length&&(this.send(),this.deal(t))}}])}(),Wl=["width","height","ellipsis","wordBreak","verticalDirection","maxHeight","maxWidth","textAlign","textBaseline","textConfig","layoutDirection"].concat(y(so)),Vl=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="richtext",n._currentHoverIcon=null,n.numberType=Ko,n}return c(i,t),u(i,[{key:"width",get:function(){var t;return null!==(t=this.attribute.width)&&void 0!==t?t:Nn.width},set:function(t){this.attribute.width!==t&&(this.attribute.width=t,this.addUpdateShapeAndBoundsTag())}},{key:"height",get:function(){var t;return null!==(t=this.attribute.height)&&void 0!==t?t:Nn.height},set:function(t){this.attribute.height!==t&&(this.attribute.height=t,this.addUpdateShapeAndBoundsTag())}},{key:"maxWidth",get:function(){return this.attribute.maxWidth},set:function(t){this.attribute.maxWidth!==t&&(this.attribute.maxWidth=t,this.addUpdateShapeAndBoundsTag())}},{key:"maxHeight",get:function(){return this.attribute.maxHeight},set:function(t){this.attribute.maxHeight!==t&&(this.attribute.maxHeight=t,this.addUpdateShapeAndBoundsTag())}},{key:"ellipsis",get:function(){var t;return null!==(t=this.attribute.ellipsis)&&void 0!==t?t:Nn.ellipsis},set:function(t){this.attribute.ellipsis!==t&&(this.attribute.ellipsis=t,this.addUpdateShapeAndBoundsTag())}},{key:"wordBreak",get:function(){var t;return null!==(t=this.attribute.wordBreak)&&void 0!==t?t:Nn.wordBreak},set:function(t){this.attribute.wordBreak!==t&&(this.attribute.wordBreak=t,this.addUpdateShapeAndBoundsTag())}},{key:"verticalDirection",get:function(){var t;return null!==(t=this.attribute.verticalDirection)&&void 0!==t?t:Nn.verticalDirection},set:function(t){this.attribute.verticalDirection!==t&&(this.attribute.verticalDirection=t,this.addUpdateShapeAndBoundsTag())}},{key:"textAlign",get:function(){var t;return null!==(t=this.attribute.textAlign)&&void 0!==t?t:Nn.textAlign},set:function(t){this.attribute.textAlign!==t&&(this.attribute.textAlign=t,this.addUpdateShapeAndBoundsTag())}},{key:"textBaseline",get:function(){var t;return null!==(t=this.attribute.textBaseline)&&void 0!==t?t:Nn.textBaseline},set:function(t){this.attribute.textBaseline!==t&&(this.attribute.textBaseline=t,this.addUpdateShapeAndBoundsTag())}},{key:"textConfig",get:function(){var t;return null!==(t=this.attribute.textConfig)&&void 0!==t?t:Nn.textConfig},set:function(t){this.attribute.textConfig=t,this.addUpdateShapeAndBoundsTag()}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).richtext;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateRichTextAABBBounds(e,Er(this).richtext,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Nn[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,Wl)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,Wl)}},{key:"getFrameCache",value:function(){return this.shouldUpdateShape()&&(this.doUpdateFrameCache(),this.clearUpdateShapeTag()),this._frameCache}},{key:"combinedStyleToCharacter",value:function(t){var e=this.attribute,i=e.fill,n=e.stroke,r=e.fontSize,a=e.fontFamily,o=e.fontStyle,s=e.fontWeight,u=e.lineWidth,l=e.opacity,c=e.fillOpacity,h=e.strokeOpacity;return Object.assign({fill:i,stroke:n,fontSize:r,fontFamily:a,fontStyle:o,fontWeight:s,lineWidth:u,opacity:l,fillOpacity:c,strokeOpacity:h},t)}},{key:"doUpdateFrameCache",value:function(){for(var t,e=this,i=this.attribute,n=i.textConfig,r=void 0===n?[]:n,a=i.maxWidth,o=i.maxHeight,s=i.width,u=i.height,l=i.ellipsis,c=i.wordBreak,h=i.verticalDirection,d=i.textAlign,f=i.textBaseline,v=i.layoutDirection,p=i.singleLine,g=i.disableAutoWrapLine,y=[],m=0;m<r.length;m++)if("image"in r[m]){var k=this.combinedStyleToCharacter(r[m]),b=k.id&&this._frameCache&&this._frameCache.icons&&this._frameCache.icons.get(k.id);if(b)y.push(b);else{var _=new zl(k);_.successCallback=function(){var t;e.addUpdateBoundTag(),null===(t=e.stage)||void 0===t||t.renderNextFrame()},_.richtextId=k.id,y.push(_)}}else{var x=this.combinedStyleToCharacter(r[m]);if(St(x.text)&&(x.text="".concat(x.text)),x.text&&x.text.includes("\n"))for(var w=x.text.split("\n"),S=0;S<w.length;S++)y.push(new Dl(w[S],0!==S,x));else x.text&&y.push(new Dl(x.text,!1,x))}var A="number"==typeof a&&Number.isFinite(a)&&a>0,T="number"==typeof o&&Number.isFinite(o)&&o>0,E="number"==typeof s&&Number.isFinite(s)&&s>0&&(!A||s<=a),C="number"==typeof u&&Number.isFinite(u)&&u>0&&(!T||u<=o),B=new Ll(0,0,(E?s:A?a:0)||0,(C?u:T?o:0)||0,l,c,h,d,f,v||"horizontal",!E&&A,!C&&T,p||!1,null===(t=this._frameCache)||void 0===t?void 0:t.icons),M=new Ul(B);if(g)for(var R=0,P=!1,O=0;O<y.length;O++){var I=y[O];P?(I.overflow=!0,I.left=1/0,I.top=1/0,!I.newLine&&B.lines[B.lines.length-1].paragraphs.push(I)):M.deal(I),B.lines.length!==R&&(R=B.lines.length,M.lineBuffer.length=0,I.overflow=!0,I.left=1e3,I.top=1e3,B.lines[B.lines.length-1].paragraphs.push(I),P=!0),I.newLine&&(P=!1,M.lineWidth=0)}else for(var L=0;L<y.length;L++)M.deal(y[L]);if(M.send(),!("horizontal"===B.layoutDirection?E:C)){var D=B.getActualSizeWidthEllipsis(),j="horizontal"===B.layoutDirection?D.width:D.height;("horizontal"===B.layoutDirection?A:T)&&(j=Math.min(j,"horizontal"===B.layoutDirection?a:o)),B.lines.forEach((function(t){t.calcOffset(j,!1)}))}this._frameCache=B}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"setStage",value:function(t,e){p(h(i.prototype),"setStage",this).call(this,t,e),this.getFrameCache().icons.forEach((function(i){i.setStage(t,e)}))}},{key:"bindIconEvent",value:function(){var t=this;this.addEventListener("pointermove",(function(e){var i,n,r,a,o,s=t.pickIcon(e.global);s&&s===t._currentHoverIcon||(s?(null===(i=t._currentHoverIcon)||void 0===i||i.setHoverState(!1),t._currentHoverIcon=s,t._currentHoverIcon.setHoverState(!0),null===(n=t.stage)||void 0===n||n.setCursor(s.attribute.cursor),null===(r=t.stage)||void 0===r||r.renderNextFrame()):!s&&t._currentHoverIcon&&(t._currentHoverIcon.setHoverState(!1),t._currentHoverIcon=null,null===(a=t.stage)||void 0===a||a.setCursor(),null===(o=t.stage)||void 0===o||o.renderNextFrame()))})),this.addEventListener("pointerleave",(function(e){var i,n;t._currentHoverIcon&&(t._currentHoverIcon.setHoverState(!1),t._currentHoverIcon=null,null===(i=t.stage)||void 0===i||i.setCursor(),null===(n=t.stage)||void 0===n||n.renderNextFrame())}))}},{key:"pickIcon",value:function(t){var e,i=this.getFrameCache(),n=this.globalTransMatrix,r=n.e,a=n.f;return i.icons.forEach((function(i){var n,o;i.AABBBounds.containsPoint({x:t.x-r,y:t.y-a})&&(e=i,e.globalX=(null!==(n=e.attribute.x)&&void 0!==n?n:0)+r,e.globalY=(null!==(o=e.attribute.y)&&void 0!==o?o:0)+a)})),e}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Hl(t){return new Vl(t)}Vl.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,verticalDirection:1,textAlign:1,textBaseline:1,textConfig:1,layoutDirection:1},fo);var Xl=["path","customPath"].concat(y(so)),Yl=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="path",n.numberType=Wo,n}return c(i,t),u(i,[{key:"pathShape",get:function(){return this.tryUpdateAABBBounds(),this.getParsedPathShape()}},{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){var t=this.attribute.path;return null!=t&&""!==t}},{key:"getParsedPathShape",value:function(){var t=Er(this).path;if(!this.valid)return t.path;var e=this.attribute;return e.path instanceof yn?e.path:(vt(this.cache)&&this.doUpdatePathShape(),this.cache instanceof yn?this.cache:t.path)}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).path;this.doUpdatePathShape(),this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updatePathAABBBounds(e,Er(this).path,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"doUpdatePathShape",value:function(){var t=this.attribute;bt(t.path,!0)?this.cache=(new yn).fromString(t.path):t.customPath&&(this.cache=new yn,t.customPath(this.cache,this))}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"getDefaultAttribute",value:function(t){return Er(this).path[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,Xl)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,Xl)}},{key:"toCustomPath",value:function(){return(new yn).fromCustomPath2D(this.getParsedPathShape(),0,0)}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Kl(t){return new Yl(t)}Yl.NOWORK_ANIMATE_ATTR=Object.assign({path:1,customPath:1},fo);var ql=["segments","points","curveType"].concat(y(so)),Zl=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="area",n.numberType=jo,n}return c(i,t),u(i,[{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){if(this.pathProxy)return!0;var t=this.attribute,e=t.points,i=t.segments;return i?0!==i.length:!!e&&0!==e.length}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).area;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateAreaAABBBounds(e,Er(this).area,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),i}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"_interpolate",value:function(t,e,i,n,r){"points"===t&&(r.points=fa(i,n,e))}},{key:"getDefaultAttribute",value:function(t){return Er(this).area[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,ql)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,ql)}},{key:"toCustomPath",value:function(){var t=new yn,e=this.attribute,i=e.segments,n=function(e){if(e&&e.length){var i=!0,n=[];if(e.forEach((function(e){var r,a;!1!==e.defined&&(i?t.moveTo(e.x,e.y):t.lineTo(e.x,e.y),n.push({x:null!==(r=e.x1)&&void 0!==r?r:e.x,y:null!==(a=e.y1)&&void 0!==a?a:e.y}),i=!1)})),n.length){for(var r=n.length-1;r>=0;r--)t.lineTo(n[r].x,n[r].y);t.closePath()}}};return e.points?n(e.points):i&&i.length&&i.forEach((function(t){n(t.points)})),t}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function Jl(t){return new Zl(t)}Zl.NOWORK_ANIMATE_ATTR=Object.assign({segments:1,curveType:1},fo);var $l=["innerRadius","outerRadius","startAngle","endAngle","cornerRadius","padAngle","padRadius","cap"].concat(y(so)),Ql=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="arc",n.numberType=Lo,n}return c(i,t),u(i,[{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){var t=this.attribute,e=t.startAngle,i=t.endAngle,n=t.outerRadius,r=t.innerRadius;return this._validNumber(e)&&this._validNumber(i)&&this._validNumber(n)&&this._validNumber(r)}},{key:"getParsedCornerRadius",value:function(){var t=Er(this).arc,e=this.attribute,i=e.cornerRadius,n=void 0===i?t.cornerRadius:i,r=e.innerPadding,a=void 0===r?t.innerPadding:r,o=e.outerPadding,s=void 0===o?t.outerPadding:o,u=this.attribute,l=u.outerRadius,c=void 0===l?t.outerRadius:l,h=u.innerRadius,d=void 0===h?t.innerRadius:h;if(c+=s,d-=a,0===n||"0%"===n)return 0;var f=Math.abs(c-d);return Math.min(St(n,!0)?n:f*parseFloat(n)/100,f/2)}},{key:"getParsedAngle",value:function(){var t=Er(this).arc,e=this.attribute,i=e.startAngle,n=void 0===i?t.startAngle:i,r=e.endAngle,a=void 0===r?t.endAngle:r,o=this.attribute.cap,s=void 0===o?t.cap:o,u=a-n>=0?1:-1,l=a-n;if(a=(n=Fe(n))+l,s&&be(l)<ke-pe){var c=1,h=1;s.length&&(c=Number(s[0]),h=Number(s[1]));var d=this.attribute,f=d.outerRadius,v=void 0===f?t.outerRadius:f,p=d.innerRadius,g=void 0===p?t.innerRadius:p,y=this.attribute,m=y.outerPadding,k=void 0===m?t.outerPadding:m,b=y.innerPadding;v+=k,g-=void 0===b?t.innerPadding:b;var _=Math.abs(v-g)/2,x=_/v;if(_>pe&&v>pe)return{startAngle:n-u*x*c,endAngle:a+u*x*h,sc:u*x*c,ec:u*x*h}}return{startAngle:n,endAngle:a}}},{key:"getParsePadAngle",value:function(t,e){var i=Er(this).arc,n=this.attribute,r=n.innerPadding,a=void 0===r?i.innerPadding:r,o=n.outerPadding,s=void 0===o?i.outerPadding:o,u=n.padAngle,l=void 0===u?i.padAngle:u,c=this.attribute,h=c.outerRadius,d=void 0===h?i.outerRadius:h,f=c.innerRadius,v=void 0===f?i.innerRadius:f;d+=s,v-=a;var p=this.attribute.padRadius,g=void 0===p?Te(d*d+v*v):p,y=be(e-t),m=t,k=e,b=t,_=e,x=l/2,w=y,S=y;if(x>pe&&g>pe){var A=e>t?1:-1,T=Be(Number(g)/v*Ae(x)),E=Be(Number(g)/d*Ae(x));return(w-=2*T)>pe?(b+=T*=A,_-=T):(w=0,b=_=(t+e)/2),(S-=2*E)>pe?(m+=E*=A,k-=E):(S=0,m=k=(t+e)/2),{outerStartAngle:m,outerEndAngle:k,innerStartAngle:b,innerEndAngle:_,innerDeltaAngle:w,outerDeltaAngle:S}}return{outerStartAngle:m,outerEndAngle:k,innerStartAngle:b,innerEndAngle:_,innerDeltaAngle:w,outerDeltaAngle:S}}},{key:"doUpdateAABBBounds",value:function(t){var e=Er(this).arc;this._AABBBounds.clear();var i=this.attribute,n=Un.graphicService.updateArcAABBBounds(i,Er(this).arc,this._AABBBounds,t,this),r=i.boundsPadding,a=void 0===r?e.boundsPadding:r,o=ua(a);return o&&n.expand(o),this.clearUpdateBoundTag(),n}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,$l)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,$l)}},{key:"getDefaultAttribute",value:function(t){return Er(this).arc[t]}},{key:"toCustomPath",value:function(){var t=this.attribute,e=this.getParsedAngle(),i=e.startAngle,n=e.endAngle,r=t.innerRadius-(t.innerPadding||0),a=t.outerRadius-(t.outerPadding||0),o=be(n-i),s=n>i;if(a<r){var u=a;a=r,r=u}var l=new yn;if(a<=pe)l.moveTo(0,0);else if(o>=ke-pe)l.moveTo(0+a*xe(i),0+a*Ae(i)),l.arc(0,0,a,i,n,!s),r>pe&&(l.moveTo(0+r*xe(n),0+r*Ae(n)),l.arc(0,0,r,n,i,s));else{var c=a*xe(i),h=a*Ae(i),d=r*xe(n),f=r*Ae(n);l.moveTo(0+c,0+h),l.arc(0,0,a,i,n,!s),l.lineTo(0+d,0+f),l.arc(0,0,r,n,i,s),l.closePath()}return l}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function tc(t){return new Ql(t)}Ql.NOWORK_ANIMATE_ATTR=Object.assign({cap:1},fo);var ec=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="arc3d",n.numberType=Do,n}return c(i,t),u(i,[{key:"doUpdateAABBBounds",value:function(){var t=Er(this).arc;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updateArc3dAABBBounds(e,Er(this).polygon,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),this._AABBBounds}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(Ql);function ic(t){return new ec(t)}ec.NOWORK_ANIMATE_ATTR=Object.assign({cap:1},fo);var nc=["points","cornerRadius"].concat(y(so)),rc=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="polygon",n.numberType=Vo,n}return c(i,t),u(i,[{key:"isValid",value:function(){return p(h(i.prototype),"isValid",this).call(this)&&this._isValid()}},{key:"_isValid",value:function(){var t=this.attribute.points;return t&&t.length>=2}},{key:"doUpdateAABBBounds",value:function(){var t=Er(this).polygon;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updatePolygonAABBBounds(e,Er(this).polygon,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),this._AABBBounds}},{key:"tryUpdateOBBBounds",value:function(){throw new Error("暂不支持")}},{key:"_interpolate",value:function(t,e,i,n,r){"points"===t&&(r.points=fa(i,n,e))}},{key:"getDefaultAttribute",value:function(t){return Er(this).polygon[t]}},{key:"needUpdateTags",value:function(t){return p(h(i.prototype),"needUpdateTags",this).call(this,t,nc)}},{key:"needUpdateTag",value:function(t){return p(h(i.prototype),"needUpdateTag",this).call(this,t,nc)}},{key:"toCustomPath",value:function(){var t=this.attribute.points,e=new yn;return t.forEach((function(t,i){0===i?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)})),e.closePath(),e}},{key:"clone",value:function(){return new i(Object.assign({},this.attribute))}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(vo);function ac(t){return new rc(t)}rc.NOWORK_ANIMATE_ATTR=fo;var oc=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).type="pyramid3d",n.numberType=Ho,n}return c(i,t),u(i,[{key:"doUpdateAABBBounds",value:function(){var t=Er(this).polygon;this._AABBBounds.clear();var e=this.attribute,i=Un.graphicService.updatePyramid3dAABBBounds(e,Er(this).polygon,this._AABBBounds,this),n=e.boundsPadding,r=void 0===n?t.boundsPadding:n,a=ua(r);return a&&i.expand(a),this.clearUpdateBoundTag(),this._AABBBounds}},{key:"findFace",value:function(){for(var t=this.attribute.points,e=t.map((function(e,i){var n=3===i?t[0]:t[i+1],r=e.x-n.x;return 0===r?0:(e.y-n.y)/r})),i=t.map((function(t){return{p:t,d:0}})),n=!1,r=0,a=0;a<e.length-1;a++){for(var o=a+1;o<e.length;o++){if(e[a]===e[o]){n=!0;var s=Oe.distancePP(i[a].p,i[a+1].p);i[a].d=s,i[a+1].d=s,r=we(r,s);var u=Oe.distancePP(i[o].p,i[o+1].p);i[o].d=u,i[o+1].d=u,r=we(r,u)}if(n)break}if(n)break}for(var l=t.length-1;l>=0;l--){var c=t[l];i.unshift({p:c,d:0})}for(var h=0;h<t.length;h++){var d=(r-i[h+t.length].d)/2;i[h].d+=d,i[h+t.length].d+=d}var f={polygons:[],vertices:[],edges:[]};return i.forEach((function(t){f.vertices.push([t.p.x,t.p.y,t.d])})),f.polygons.push({polygon:[0,4,5,1],normal:[0,-1,0]}),f.polygons.push({polygon:[7,6,2,3],normal:[0,1,0]}),f.polygons.push({polygon:[0,4,7,3],normal:[-1,0,0]}),f.polygons.push({polygon:[1,5,6,2],normal:[1,0,0]}),f.polygons.push({polygon:[0,1,2,3],normal:[0,0,-1]}),f.polygons.push({polygon:[4,5,6,7],normal:[0,0,1]}),f.edges=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[3,7],[1,5],[2,6]],f}},{key:"_isValid",value:function(){return p(h(i.prototype),"_isValid",this).call(this)&&4===this.attribute.points.length}},{key:"getNoWorkAnimateAttr",value:function(){return i.NOWORK_ANIMATE_ATTR}}])}(rc);function sc(t){return new oc(t)}oc.NOWORK_ANIMATE_ATTR=fo;var uc=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[{x:0,y:0}])).type="shadowroot",n.shadowHost=t,n}return c(i,t),u(i,[{key:"addUpdateBoundTag",value:function(){p(h(i.prototype),"addUpdateBoundTag",this).call(this),this.shadowHost&&this.shadowHost.addUpdateBoundTag()}},{key:"addUpdateShapeAndBoundsTag",value:function(){p(h(i.prototype),"addUpdateShapeAndBoundsTag",this).call(this),this.shadowHost&&this.shadowHost.addUpdateBoundTag()}},{key:"tryUpdateGlobalTransMatrix",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){var e=this.transMatrix;this._globalTransMatrix?this._globalTransMatrix.setValue(e.a,e.b,e.c,e.d,e.e,e.f):this._globalTransMatrix=e.clone(),this.doUpdateGlobalMatrix(),t&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}},{key:"doUpdateGlobalMatrix",value:function(){if(this.shadowHost){var t=this.shadowHost.globalTransMatrix;this._globalTransMatrix.multiply(t.a,t.b,t.c,t.d,t.e,t.f)}}},{key:"tryUpdateGlobalAABBBounds",value:function(){return this._globalAABBBounds?this._globalAABBBounds.setValue(this._AABBBounds.x1,this._AABBBounds.y1,this._AABBBounds.x2,this._AABBBounds.y2):this._globalAABBBounds=this._AABBBounds.clone(),this.shadowHost&&this._globalAABBBounds.transformWithMatrix(this.shadowHost.globalTransMatrix),this._globalAABBBounds}}])}(es);function lc(t){return new uc(t)}var cc=function(){return u((function t(){o(this,t)}),[{key:"updateBounds",value:function(t,e,i,n){var r=t.outerBorder,a=t.shadowBlur,o=void 0===a?e.shadowBlur:a;if(r){var s=e.outerBorder,u=r.distance,l=void 0===u?s.distance:u,c=r.lineWidth,h=void 0===c?s.lineWidth:c;i.expand(l+(o+h)/2)}return i}}])}(),hc=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"updateBounds",value:function(t,e,i,n){var r=t.outerBorder,a=t.shadowBlur,o=void 0===a?e.shadowBlur:a,s=t.strokeBoundsBuffer,u=void 0===s?e.strokeBoundsBuffer:s;if(r){var l=e.outerBorder,c=r.distance,h=void 0===c?l.distance:c,d=r.lineWidth;To(i,h+(o+(void 0===d?l.lineWidth:d))/2,!0,u)}return i}}])}(cc);var dc=function(){return u((function t(){o(this,t),this.pools=[]}),[{key:"allocate",value:function(t,e,i,n,r,a){if(!this.pools.length)return new ze(t,e,i,n,r,a);var o=this.pools.pop();return o.a=t,o.b=e,o.c=i,o.d=n,o.e=r,o.f=a,o}},{key:"allocateByObj",value:function(t){if(!this.pools.length)return new ze(t.a,t.b,t.c,t.d,t.e,t.f);var e=this.pools.pop();return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e}},{key:"free",value:function(t){this.pools.push(t)}},{key:"length",get:function(){return this.pools.length}},{key:"release",value:function(){this.pools=[]}}])}(),fc=function(){function t(){o(this,t),this.pools=[]}return u(t,[{key:"allocate",value:function(){if(!this.pools.length)return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];var e=this.pools.pop();return t.identity(e),e}},{key:"allocateByObj",value:function(t){var e;e=this.pools.length?this.pools.pop():[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];for(var i=0;i<e.length;i++)e[i]=t[i];return e}},{key:"free",value:function(t){t&&this.pools.push(t)}},{key:"length",get:function(){return this.pools.length}},{key:"release",value:function(){this.pools=[]}}],[{key:"identity",value:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}}])}(),vc=new dc,pc=new fc,gc=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},yc=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mc=function(t,e){return function(i,n){e(i,n,t)}};function kc(t,e,i){var n,r,a,o,s,u,l,c,h,d,f,v,p=i[0],g=i[1],y=i[2];return e===t?(t[12]=e[0]*p+e[4]*g+e[8]*y+e[12],t[13]=e[1]*p+e[5]*g+e[9]*y+e[13],t[14]=e[2]*p+e[6]*g+e[10]*y+e[14],t[15]=e[3]*p+e[7]*g+e[11]*y+e[15]):(n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],d=e[9],f=e[10],v=e[11],t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=h,t[9]=d,t[10]=f,t[11]=v,t[12]=n*p+s*g+h*y+e[12],t[13]=r*p+u*g+d*y+e[13],t[14]=a*p+l*g+f*y+e[14],t[15]=o*p+c*g+v*y+e[15]),t}function bc(t,e){t[0]=e.a,t[1]=e.b,t[2]=0,t[3]=0,t[4]=e.c,t[5]=e.d,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e.e,t[13]=e.f,t[14]=0,t[15]=1}function _c(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],d=e[9],f=e[10],v=e[11],p=e[12],g=e[13],y=e[14],m=e[15],k=i[0],b=i[1],_=i[2],x=i[3];return t[0]=k*n+b*s+_*h+x*p,t[1]=k*r+b*u+_*d+x*g,t[2]=k*a+b*l+_*f+x*y,t[3]=k*o+b*c+_*v+x*m,k=i[4],b=i[5],_=i[6],x=i[7],t[4]=k*n+b*s+_*h+x*p,t[5]=k*r+b*u+_*d+x*g,t[6]=k*a+b*l+_*f+x*y,t[7]=k*o+b*c+_*v+x*m,k=i[8],b=i[9],_=i[10],x=i[11],t[8]=k*n+b*s+_*h+x*p,t[9]=k*r+b*u+_*d+x*g,t[10]=k*a+b*l+_*f+x*y,t[11]=k*o+b*c+_*v+x*m,k=i[12],b=i[13],_=i[14],x=i[15],t[12]=k*n+b*s+_*h+x*p,t[13]=k*r+b*u+_*d+x*g,t[14]=k*a+b*l+_*f+x*y,t[15]=k*o+b*c+_*v+x*m,t}function xc(t,e,i){var n,r=e.attribute,a=r.x,o=void 0===a?i.x:a,s=r.y,u=void 0===s?i.y:s,l=r.z,c=void 0===l?i.z:l,h=r.dx,d=void 0===h?i.dx:h,f=r.dy,v=void 0===f?i.dy:f,p=r.dz,g=void 0===p?i.dz:p,y=r.scaleX,m=void 0===y?i.scaleX:y,k=r.scaleY,b=void 0===k?i.scaleY:k,_=r.scaleZ,x=void 0===_?i.scaleZ:_,w=r.alpha,S=void 0===w?i.alpha:w,A=r.beta,T=void 0===A?i.beta:A,E=r.angle,C=void 0===E?i.angle:E,B=r.anchor3d,M=void 0===B?e.attribute.anchor:B,R=r.anchor,P=[0,0,0];if(M){if("string"==typeof M[0]){var O=parseFloat(M[0])/100,I=e.AABBBounds;P[0]=I.x1+(I.x2-I.x1)*O}else P[0]=M[0];if("string"==typeof M[1]){var L=parseFloat(M[1])/100,D=e.AABBBounds;P[1]=D.x1+(D.x2-D.x1)*L}else P[1]=M[1];P[2]=null!==(n=M[2])&&void 0!==n?n:0}if(function(t){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(t),kc(t,t,[o+d,u+v,c+g]),kc(t,t,[P[0],P[1],P[2]]),function(t,e,i){var n=Math.sin(i),r=Math.cos(i),a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c=e[9],h=e[10],d=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*r+l*n,t[5]=o*r+c*n,t[6]=s*r+h*n,t[7]=u*r+d*n,t[8]=l*r-a*n,t[9]=c*r-o*n,t[10]=h*r-s*n,t[11]=d*r-u*n}(t,t,T),function(t,e,i){var n=Math.sin(i),r=Math.cos(i),a=e[0],o=e[1],s=e[2],u=e[3],l=e[8],c=e[9],h=e[10],d=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*r-l*n,t[1]=o*r-c*n,t[2]=s*r-h*n,t[3]=u*r-d*n,t[8]=a*n+l*r,t[9]=o*n+c*r,t[10]=s*n+h*r,t[11]=u*n+d*r}(t,t,S),kc(t,t,[-P[0],-P[1],P[2]]),function(t,e,i){var n=i[0],r=i[1],a=i[2];t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}(t,t,[m,b,x]),C){var j=pc.allocate(),F=[0,0];if(R){if("string"==typeof M[0]){var N=parseFloat(M[0])/100,z=e.AABBBounds;F[0]=z.x1+(z.x2-z.x1)*N}else F[0]=M[0];if("string"==typeof M[1]){var G=parseFloat(M[1])/100,U=e.AABBBounds;F[1]=U.x1+(U.x2-U.x1)*G}else F[1]=M[1]}kc(j,j,[F[0],F[1],0]),function(t,e,i){var n=Math.sin(i),r=Math.cos(i),a=e[0],o=e[1],s=e[2],u=e[3],l=e[4],c=e[5],h=e[6],d=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*r+l*n,t[1]=o*r+c*n,t[2]=s*r+h*n,t[3]=u*r+d*n,t[4]=l*r-a*n,t[5]=c*r-o*n,t[6]=h*r-s*n,t[7]=d*r-u*n}(j,j,C),kc(j,j,[-F[0],-F[1],0]),_c(t,t,j)}}var wc=function(){return u((function t(e){o(this,t),this.creator=e,this.hooks={onAttributeUpdate:new et(["graphic"]),onSetStage:new et(["graphic","stage"]),onRemove:new et(["graphic"]),onRelease:new et(["graphic"]),onAddIncremental:new et(["graphic","group","stage"]),onClearIncremental:new et(["graphic","group","stage"]),beforeUpdateAABBBounds:new et(["graphic","stage","willUpdate","aabbBounds"]),afterUpdateAABBBounds:new et(["graphic","stage","aabbBounds","globalAABBBounds","selfChange"])},this.tempAABBBounds1=new De,this.tempAABBBounds2=new De,this._rectBoundsContribitions=[new cc],this._symbolBoundsContribitions=[new hc],this._imageBoundsContribitions=[new cc],this._circleBoundsContribitions=[new cc],this._arcBoundsContribitions=[new cc],this._pathBoundsContribitions=[new cc]}),[{key:"onAttributeUpdate",value:function(t){this.hooks.onAttributeUpdate.taps.length&&this.hooks.onAttributeUpdate.call(t)}},{key:"onSetStage",value:function(t,e){this.hooks.onSetStage.taps.length&&this.hooks.onSetStage.call(t,e)}},{key:"onRemove",value:function(t){this.hooks.onRemove.taps.length&&this.hooks.onRemove.call(t)}},{key:"onRelease",value:function(t){this.hooks.onRelease.taps.length&&this.hooks.onRelease.call(t)}},{key:"onAddIncremental",value:function(t,e,i){this.hooks.onAddIncremental.taps.length&&this.hooks.onAddIncremental.call(t,e,i)}},{key:"onClearIncremental",value:function(t,e){this.hooks.onClearIncremental.taps.length&&this.hooks.onClearIncremental.call(t,e)}},{key:"beforeUpdateAABBBounds",value:function(t,e,i,n){this.hooks.beforeUpdateAABBBounds.taps.length&&this.hooks.beforeUpdateAABBBounds.call(t,e,i,n)}},{key:"afterUpdateAABBBounds",value:function(t,e,i,n,r){this.hooks.afterUpdateAABBBounds.taps.length&&this.hooks.afterUpdateAABBBounds.call(t,e,i,n,r)}},{key:"updatePathProxyAABBBounds",value:function(t,e){var i="function"==typeof e.pathProxy?e.pathProxy(e.attribute):e.pathProxy;if(!i)return!1;var n=new Ri(t);return Ni(i.commandList,n,0,0),!0}},{key:"updateRectAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;if(!this.updatePathProxyAABBBounds(i,n)){var r=t.width,a=t.height,o=t.x1,s=t.y1,u=t.x,l=t.y;r=null!=r?r:o-u,a=null!=a?a:s-l,i.set(0,0,r||0,a||0)}var c=this.tempAABBBounds1,h=this.tempAABBBounds2;return c.setValue(i.x1,i.y1,i.x2,i.y2),h.setValue(i.x1,i.y1,i.x2,i.y2),this._rectBoundsContribitions.length&&this._rectBoundsContribitions.forEach((function(r){r.updateBounds(t,e,c,n),i.union(c),c.setValue(h.x1,h.y1,h.x2,h.y2)})),this.transformAABBBounds(t,i,e,!1,n),i}},{key:"updateGroupAABBBounds",value:function(t,e,i,n){var r=i;i=i.clone();var a=t.width,o=t.height,s=t.path,u=t.clip,l=void 0===u?e.clip:u;s&&s.length?s.forEach((function(t){i.union(t.AABBBounds)})):null!=a&&null!=o&&i.set(0,0,Math.max(0,a),Math.max(0,o)),l||n.forEachChildren((function(t){i.union(t.AABBBounds)}));var c=this.tempAABBBounds1,h=this.tempAABBBounds2;return c.setValue(i.x1,i.y1,i.x2,i.y2),h.setValue(i.x1,i.y1,i.x2,i.y2),this.transformAABBBounds(t,i,e,!1,n),r.copy(i),r}},{key:"updateGlyphAABBBounds",value:function(t,e,i,n){return this._validCheck(t,e,i,n)?(n.getSubGraphic().forEach((function(t){i.union(t.AABBBounds)})),i):i}},{key:"updateHTMLTextAABBBounds",value:function(t,e,i,n){var r=t.textAlign,a=t.textBaseline;if(null!=t.forceBoundsHeight){var o=St(t.forceBoundsHeight)?t.forceBoundsHeight:t.forceBoundsHeight(),s=Ws(a,o,o);i.set(i.x1,s,i.x2,s+o)}if(null!=t.forceBoundsWidth){var u=St(t.forceBoundsWidth)?t.forceBoundsWidth:t.forceBoundsWidth(),l=Us(r,u);i.set(l,i.y1,l+u,i.y2)}}},{key:"updateRichTextAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;if(!n)return i;var r=t.width,a=void 0===r?e.width:r,o=t.height,s=void 0===o?e.height:o,u=t.maxWidth,l=void 0===u?e.maxWidth:u,c=t.maxHeight,h=void 0===c?e.maxHeight:c,d=t.textAlign,f=void 0===d?e.textAlign:d,v=t.textBaseline,p=void 0===v?e.textBaseline:v;if(a>0&&s>0)i.set(0,0,a,s);else{var g=n.getFrameCache().getActualSize(),y=g.width,m=g.height,k=a||y||0,b=s||m||0;b="number"==typeof h&&b>h?h:b||0,k="number"==typeof l&&k>l?l:k||0,i.set(0,0,k,b)}var _=0;switch(p){case"top":_=0;break;case"middle":_=-i.height()/2;break;case"bottom":_=-i.height()}var x=0;switch(f){case"left":x=0;break;case"center":x=-i.width()/2;break;case"right":x=-i.width()}i.translate(x,_);var w=this.tempAABBBounds1,S=this.tempAABBBounds2;return w.setValue(i.x1,i.y1,i.x2,i.y2),S.setValue(i.x1,i.y1,i.x2,i.y2),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||this.updateHTMLTextAABBBounds(t,e,i),this.transformAABBBounds(t,i,e,!1,n),i}},{key:"updateTextAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;if(!n)return i;var r=n.attribute.text,a=void 0===r?e.text:r;Array.isArray(a)?n.updateMultilineAABBBounds(a):n.updateSingallineAABBBounds(a);var o=this.tempAABBBounds1,s=this.tempAABBBounds2;o.setValue(i.x1,i.y1,i.x2,i.y2),s.setValue(i.x1,i.y1,i.x2,i.y2);var u=t.scaleX,l=void 0===u?e.scaleX:u,c=t.scaleY,h=void 0===c?e.scaleY:c,d=t.shadowBlur,f=void 0===d?e.shadowBlur:d,v=t.strokeBoundsBuffer,p=void 0===v?e.strokeBoundsBuffer:v;f&&(To(o,f/Math.abs(l+h),!0,p),i.union(o));return this.combindShadowAABBBounds(i,n),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||this.updateHTMLTextAABBBounds(t,e,i),Ie(i,i,n.transMatrix),i}},{key:"updatePathAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;this.updatePathProxyAABBBounds(i,n)||this.updatePathAABBBoundsImprecise(t,e,i,n);var r=this.tempAABBBounds1,a=this.tempAABBBounds2;r.setValue(i.x1,i.y1,i.x2,i.y2),a.setValue(i.x1,i.y1,i.x2,i.y2),this._pathBoundsContribitions.length&&this._pathBoundsContribitions.forEach((function(o){o.updateBounds(t,e,r,n),i.union(r),r.setValue(a.x1,a.y1,a.x2,a.y2)}));var o=t.lineJoin,s=void 0===o?e.lineJoin:o;return this.transformAABBBounds(t,i,e,"miter"===s,n),i}},{key:"updatePathAABBBoundsImprecise",value:function(t,e,i,n){if(!n)return i;var r=n.getParsedPathShape();return i.union(r.getBounds()),i}},{key:"updatePyramid3dAABBBounds",value:function(t,e,i,n){if(!n)return i;var r=n.stage;if(!r||!r.camera)return i;n.findFace().vertices.forEach((function(t){var e=t[0],n=t[1];i.add(e,n)}));var a=this.tempAABBBounds1,o=this.tempAABBBounds2;return a.setValue(i.x1,i.y1,i.x2,i.y2),o.setValue(i.x1,i.y1,i.x2,i.y2),this.transformAABBBounds(t,i,e,!1,n),i}},{key:"updateArc3dAABBBounds",value:function(t,e,i,n){if(!n)return i;var r=n.stage;if(!r||!r.camera)return i;var a=t.outerRadius,o=void 0===a?e.outerRadius:a,s=t.height,u=o+(void 0===s?0:s);i.setValue(-u,-u,u,u);var l=this.tempAABBBounds1,c=this.tempAABBBounds2;return l.setValue(i.x1,i.y1,i.x2,i.y2),c.setValue(i.x1,i.y1,i.x2,i.y2),this.transformAABBBounds(t,i,e,!1,n),i}},{key:"updatePolygonAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;this.updatePathProxyAABBBounds(i,n)||this.updatePolygonAABBBoundsImprecise(t,e,i,n);var r=this.tempAABBBounds1,a=this.tempAABBBounds2;r.setValue(i.x1,i.y1,i.x2,i.y2),a.setValue(i.x1,i.y1,i.x2,i.y2);var o=t.lineJoin,s=void 0===o?e.lineJoin:o;return this.transformAABBBounds(t,i,e,"miter"===s,n),i}},{key:"updatePolygonAABBBoundsImprecise",value:function(t,e,i,n){var r=t.points;return(void 0===r?e.points:r).forEach((function(t){i.add(t.x,t.y)})),i}},{key:"updateLineAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;this.updatePathProxyAABBBounds(i,n)||(t.segments?this.updateLineAABBBoundsBySegments(t,e,i,n):this.updateLineAABBBoundsByPoints(t,e,i,n));var r=this.tempAABBBounds1,a=this.tempAABBBounds2;r.setValue(i.x1,i.y1,i.x2,i.y2),a.setValue(i.x1,i.y1,i.x2,i.y2);var o=t.lineJoin,s=void 0===o?e.lineJoin:o;return this.transformAABBBounds(t,i,e,"miter"===s,n),i}},{key:"updateLineAABBBoundsByPoints",value:function(t,e,i,n){var r=t.points,a=void 0===r?e.points:r,o=i;return a.forEach((function(t){o.add(t.x,t.y)})),o}},{key:"updateLineAABBBoundsBySegments",value:function(t,e,i,n){var r=t.segments,a=void 0===r?e.segments:r,o=i;return a.forEach((function(t){t.points.forEach((function(t){o.add(t.x,t.y)}))})),o}},{key:"updateAreaAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;this.updatePathProxyAABBBounds(i,n)||(t.segments?this.updateAreaAABBBoundsBySegments(t,e,i,n):this.updateAreaAABBBoundsByPoints(t,e,i,n));var r=this.tempAABBBounds1,a=this.tempAABBBounds2;r.setValue(i.x1,i.y1,i.x2,i.y2),a.setValue(i.x1,i.y1,i.x2,i.y2);var o=t.lineJoin,s=void 0===o?e.lineJoin:o;return this.transformAABBBounds(t,i,e,"miter"===s,n),i}},{key:"updateAreaAABBBoundsByPoints",value:function(t,e,i,n){var r=t.points,a=void 0===r?e.points:r,o=i;return a.forEach((function(t){var e,i;o.add(t.x,t.y),o.add(null!==(e=t.x1)&&void 0!==e?e:t.x,null!==(i=t.y1)&&void 0!==i?i:t.y)})),o}},{key:"updateAreaAABBBoundsBySegments",value:function(t,e,i,n){var r=t.segments,a=void 0===r?e.segments:r,o=i;return a.forEach((function(t){t.points.forEach((function(t){var e,i;o.add(t.x,t.y),o.add(null!==(e=t.x1)&&void 0!==e?e:t.x,null!==(i=t.y1)&&void 0!==i?i:t.y)}))})),o}},{key:"updateCircleAABBBounds",value:function(t,e,i,n,r){if(!this._validCheck(t,e,i,r))return i;this.updatePathProxyAABBBounds(i,r)||(n?this.updateCircleAABBBoundsImprecise(t,e,i,r):this.updateCircleAABBBoundsAccurate(t,e,i,r));var a=this.tempAABBBounds1,o=this.tempAABBBounds2;return a.setValue(i.x1,i.y1,i.x2,i.y2),o.setValue(i.x1,i.y1,i.x2,i.y2),this._circleBoundsContribitions.length&&this._circleBoundsContribitions.forEach((function(n){n.updateBounds(t,e,a,r),i.union(a),a.setValue(o.x1,o.y1,o.x2,o.y2)})),this.transformAABBBounds(t,i,e,!1,r),i}},{key:"updateCircleAABBBoundsImprecise",value:function(t,e,i,n){var r=t.radius,a=void 0===r?e.radius:r;return i.set(-a,-a,a,a),i}},{key:"updateCircleAABBBoundsAccurate",value:function(t,e,i,n){var r=t.startAngle,a=void 0===r?e.startAngle:r,o=t.endAngle,s=void 0===o?e.endAngle:o,u=t.radius,l=void 0===u?e.radius:u;return s-a>ke-pe?i.set(-l,-l,l,l):ha(a,s,l,i),i}},{key:"updateArcAABBBounds",value:function(t,e,i,n,r){if(!this._validCheck(t,e,i,r))return i;this.updatePathProxyAABBBounds(i,r)||(n?this.updateArcAABBBoundsImprecise(t,e,i,r):this.updateArcAABBBoundsAccurate(t,e,i,r));var a=this.tempAABBBounds1,o=this.tempAABBBounds2;a.setValue(i.x1,i.y1,i.x2,i.y2),o.setValue(i.x1,i.y1,i.x2,i.y2),this._arcBoundsContribitions.length&&this._arcBoundsContribitions.forEach((function(n){n.updateBounds(t,e,a,r),i.union(a),a.setValue(o.x1,o.y1,o.x2,o.y2)}));var s=t.lineJoin,u=void 0===s?e.lineJoin:s;return this.transformAABBBounds(t,i,e,"miter"===u,r),i}},{key:"updateArcAABBBoundsImprecise",value:function(t,e,i,n){var r=t.outerRadius,a=void 0===r?e.outerRadius:r,o=t.innerRadius,s=void 0===o?e.innerRadius:o,u=t.outerPadding,l=void 0===u?e.outerPadding:u,c=t.innerPadding;return(a+=l)<(s-=void 0===c?e.innerPadding:c)&&(a=s),i.set(-a,-a,a,a),i}},{key:"updateArcAABBBoundsAccurate",value:function(t,e,i,n){var r=t.outerRadius,a=void 0===r?e.outerRadius:r,o=t.innerRadius,s=void 0===o?e.innerRadius:o,u=t.outerPadding,l=void 0===u?e.outerPadding:u,c=t.innerPadding;if((a+=l)<(s-=void 0===c?e.innerPadding:c)){var h=a;a=s,s=h}var d=t.endAngle,f=void 0===d?e.endAngle:d,v=t.startAngle,p=void 0===v?e.startAngle:v;if(p>f){var g=p;p=f,f=g}return a<=pe?i.set(0,0,0,0):Math.abs(f-p)>ke-pe?i.set(-a,-a,a,a):(ha(p,f,a,i),ha(p,f,s,i)),i}},{key:"updateSymbolAABBBounds",value:function(t,e,i,n,r){if(!this._validCheck(t,e,i,r))return i;this.updatePathProxyAABBBounds(i,r)||(n?this.updateSymbolAABBBoundsImprecise(t,e,i,r):this.updateSymbolAABBBoundsAccurate(t,e,i,r));var a=this.tempAABBBounds1,o=this.tempAABBBounds2;a.setValue(i.x1,i.y1,i.x2,i.y2),o.setValue(i.x1,i.y1,i.x2,i.y2),this._symbolBoundsContribitions.length&&this._symbolBoundsContribitions.forEach((function(n){n.updateBounds(t,e,a,r),i.union(a),a.setValue(o.x1,o.y1,o.x2,o.y2)}));var s=t.lineJoin,u=void 0===s?e.lineJoin:s;return this.transformAABBBounds(t,i,e,"miter"===u,r),i}},{key:"updateSymbolAABBBoundsImprecise",value:function(t,e,i,n){var r=t.size,a=void 0===r?e.size:r;if(_t(a))i.set(-a[0]/2,-a[1]/2,a[0]/2,a[1]/2);else{var o=a/2;i.set(-o,-o,o,o)}return i}},{key:"updateSymbolAABBBoundsAccurate",value:function(t,e,i,n){if(!n)return i;var r=t.size,a=void 0===r?e.size:r;return n.getParsedPath().bounds(a,i),i}},{key:"updateImageAABBBounds",value:function(t,e,i,n){if(!this._validCheck(t,e,i,n))return i;if(!this.updatePathProxyAABBBounds(i,n)){var r=t.width,a=void 0===r?e.width:r,o=t.height,s=void 0===o?e.height:o;i.set(0,0,a,s)}var u=this.tempAABBBounds1,l=this.tempAABBBounds2;return u.setValue(i.x1,i.y1,i.x2,i.y2),l.setValue(i.x1,i.y1,i.x2,i.y2),this._imageBoundsContribitions.length&&this._imageBoundsContribitions.forEach((function(r){r.updateBounds(t,e,u,n),i.union(u),u.setValue(l.x1,l.y1,l.x2,l.y2)})),this.transformAABBBounds(t,i,e,!1,n),i}},{key:"combindShadowAABBBounds",value:function(t,e){if(e&&e.shadowRoot){var i=e.shadowRoot.AABBBounds;t.union(i)}}},{key:"transformAABBBounds",value:function(t,e,i,n,r){if(!e.empty()){var a=t.scaleX,o=void 0===a?i.scaleX:a,s=t.scaleY,u=void 0===s?i.scaleY:s,l=t.stroke,c=void 0===l?i.stroke:l,h=t.shadowBlur,d=void 0===h?i.shadowBlur:h,f=t.lineWidth,v=void 0===f?i.lineWidth:f,p=t.pickStrokeBuffer,g=void 0===p?i.pickStrokeBuffer:p,y=t.strokeBoundsBuffer,m=void 0===y?i.strokeBoundsBuffer:y,k=this.tempAABBBounds1,b=this.tempAABBBounds2;if(c&&v)To(k,(v+g)/Math.abs(o+u),n,m),e.union(k),k.setValue(b.x1,b.y1,b.x2,b.y2);if(d){var _=t.shadowOffsetX,x=void 0===_?i.shadowOffsetX:_,w=t.shadowOffsetY,S=void 0===w?i.shadowOffsetY:w;To(k,d/Math.abs(o+u)*2,!1,m+1),k.translate(x,S),e.union(k)}}if(this.combindShadowAABBBounds(e,r),!e.empty()){var A=!0,T=r.transMatrix;r&&r.isContainer&&(A=!(1===T.a&&0===T.b&&0===T.c&&1===T.d&&0===T.e&&0===T.f)),A&&Ie(e,e,T)}}},{key:"_validCheck",value:function(t,e,i,n){if(!n)return!0;if(null!=t.forceBoundsHeight||null!=t.forceBoundsWidth)return!0;if(!n.valid)return i.clear(),!1;var r=t.visible;return!!(void 0===r?e.visible:r)||(i.clear(),!1)}}])}();wc=gc([L(),mc(0,O($o)),yc("design:paramtypes",[Object])],wc);var Sc,Ac=new(function(){return u((function t(){o(this,t),this.store=new Map}),[{key:"RegisterGraphicCreator",value:function(t,e){this.store.set(t,e),this[t]=e}},{key:"CreateGraphic",value:function(t,e){var i=this.store.get(t);return i?i(e):null}}])}());function Tc(t){return Sc||(Sc=Ac.CreateGraphic("text",{})),Sc.initAttributes(t),Sc.AABBBounds}var Ec={x:0,y:0,z:0,lastModelMatrix:null},Cc=function(){return u((function t(){o(this,t)}),[{key:"init",value:function(t){var e=this;t&&(this._renderContribitions=t.getContributions()),this._renderContribitions||(this._renderContribitions=[]),this.builtinContributions&&this.builtinContributions.forEach((function(t){return e._renderContribitions.push(t)})),this._renderContribitions.length&&(this._renderContribitions.sort((function(t,e){return e.order-t.order})),this._beforeRenderContribitions=this._renderContribitions.filter((function(t){return t.time===Ci.beforeFillStroke})),this._afterRenderContribitions=this._renderContribitions.filter((function(t){return t.time===Ci.afterFillStroke})))}},{key:"beforeRenderStep",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){this._beforeRenderContribitions&&this._beforeRenderContribitions.forEach((function(f){f.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(f.supportedAppName)?f.supportedAppName:[f.supportedAppName]).includes(t.stage.params.context.appName)||f.drawShape(t,e,i,n,r,a,o,s,u,l,c,h,d)}))}},{key:"afterRenderStep",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){this._afterRenderContribitions&&this._afterRenderContribitions.forEach((function(f){f.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(f.supportedAppName)?f.supportedAppName:[f.supportedAppName]).includes(t.stage.params.context.appName)||f.drawShape(t,e,i,n,r,a,o,s,u,l,c,h,d)}))}},{key:"valid",value:function(t,e,i,n){var r=t.attribute,a=r.fill,o=void 0===a?e.fill:a,s=r.background,u=r.stroke,l=void 0===u?e.stroke:u,c=r.opacity,h=void 0===c?e.opacity:c,d=r.fillOpacity,f=void 0===d?e.fillOpacity:d,v=r.lineWidth,p=void 0===v?e.lineWidth:v,g=r.strokeOpacity,y=void 0===g?e.strokeOpacity:g,m=r.visible,k=void 0===m?e.visible:m,b=ys(h,f,o),_=ks(h,y),x=ps(o,s),w=gs(l,p);return!(!t.valid||!k)&&!(!x&&!w)&&!!(b||_||i||n||s)&&{fVisible:b,sVisible:_,doFill:x,doStroke:w}}},{key:"transform",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=t.attribute,a=r.x,o=void 0===a?e.x:a,s=r.y,u=void 0===s?e.y:s,l=r.z,c=void 0===l?e.z:l,h=r.scaleX,d=void 0===h?e.scaleX:h,f=r.scaleY,v=void 0===f?e.scaleY:f,p=r.angle,g=void 0===p?e.angle:p,y=r.postMatrix,m=i.modelMatrix,k=i.camera;Ec.x=o,Ec.y=u,Ec.z=c,Ec.lastModelMatrix=m;var b=k&&(n||function(t){var e=t.attribute,i=e.alpha,n=e.beta;return i||n}(t)),_=b?t.transMatrix.onlyTranslate()&&!y:1===d&&1===v&&0===g&&!y;if(b){var x=pc.allocate(),w=pc.allocate();xc(w,t,e),_c(x,m||x,w),Ec.x=0,Ec.y=0,Ec.z=0,i.modelMatrix=x,i.setTransform(1,0,0,1,0,0,!0),pc.free(w)}if(_&&!m){var S=t.getOffsetXY(e);Ec.x+=S.x,Ec.y+=S.y,Ec.z=c,i.setTransformForCurrent()}else if(b)Ec.x=0,Ec.y=0,Ec.z=0,i.setTransform(1,0,0,1,0,0,!0);else if(k&&i.project){var A=t.getOffsetXY(e);Ec.x+=A.x,Ec.y+=A.y,this.transformWithoutTranslate(i,Ec.x,Ec.y,Ec.z,d,v,g)}else i.transformFromMatrix(t.transMatrix,!0),Ec.x=0,Ec.y=0,Ec.z=0;return Ec}},{key:"transformUseContext2d",value:function(t,e,i,n){var r=n.camera;if(this.camera=r,r){var a=t.AABBBounds,o=a.x2-a.x1,s=a.y2-a.y1,u=n.project(0,0,i),l=n.project(o,0,i),c=n.project(o,s,i),h={x:0,y:0},d={x:o,y:0},f={x:o,y:s};n.camera=null;var v=1/(h.x*(f.y-d.y)-d.x*f.y+f.x*d.y+(d.x-f.x)*h.y),p=-(h.y*(c.x-l.x)-d.y*c.x+f.y*l.x+(d.y-f.y)*u.x)*v,g=(d.y*c.y+h.y*(l.y-c.y)-f.y*l.y+(f.y-d.y)*u.y)*v,y=(h.x*(c.x-l.x)-d.x*c.x+f.x*l.x+(d.x-f.x)*u.x)*v,m=-(d.x*c.y+h.x*(l.y-c.y)-f.x*l.y+(f.x-d.x)*u.y)*v,k=(h.x*(f.y*l.x-d.y*c.x)+h.y*(d.x*c.x-f.x*l.x)+(f.x*d.y-d.x*f.y)*u.x)*v,b=(h.x*(f.y*l.y-d.y*c.y)+h.y*(d.x*c.y-f.x*l.y)+(f.x*d.y-d.x*f.y)*u.y)*v;n.setTransform(p,g,y,m,k,b,!0)}}},{key:"restoreTransformUseContext2d",value:function(t,e,i,n){this.camera&&(n.camera=this.camera)}},{key:"transformWithoutTranslate",value:function(t,e,i,n,r,a,o){var s=t.project(e,i,n);t.translate(s.x,s.y,!1),t.scale(r,a,!1),t.rotate(o,!1),t.translate(-s.x,-s.y,!1),t.setTransformForCurrent()}},{key:"_draw",value:function(t,e,i,n,r){var a=n.context;if(a&&!1!==t.attribute.renderable){a.highPerformanceSave();var o=this.transform(t,e,a,i),s=o.x,u=o.y,l=o.z,c=o.lastModelMatrix;this.z=l,function(t,e,i,n,r,a,o,s){if(!t.pathProxy)return!1;var u=Er(t,null==a?void 0:a.theme)[t.type.replace("3d","")],l=t.attribute,c=l.fill,h=void 0===c?u.fill:c,d=l.stroke,f=void 0===d?u.stroke:d,v=l.opacity,p=void 0===v?u.opacity:v,g=l.fillOpacity,y=void 0===g?u.fillOpacity:g,m=l.lineWidth,k=void 0===m?u.lineWidth:m,b=l.strokeOpacity,_=void 0===b?u.strokeOpacity:b,x=l.visible,w=void 0===x?u.visible:x,S=l.x,A=void 0===S?u.x:S,T=l.y,E=void 0===T?u.y:T,C=ys(p,y,h),B=ks(p,_),M=ps(h),R=gs(f,k);return!w||!M&&!R||!(C||B||o||s)||(e.beginPath(),Ni(("function"==typeof t.pathProxy?t.pathProxy(t.attribute):t.pathProxy).commandList,e,i,n),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),R&&(s?s(e,t.attribute,u):B&&(e.setStrokeStyle(t,t.attribute,i-A,n-E,u),e.stroke())),M&&(o?o(e,t.attribute,u):C&&(e.setCommonStyle(t,t.attribute,i-A,n-E,u),e.fill())),!0)}(t,a,s,u,0,r)||(this.drawShape(t,a,s,u,n,r),this.z=0,a.modelMatrix!==c&&pc.free(a.modelMatrix),a.modelMatrix=c),a.highPerformanceRestore()}}}])}(),Bc=function(){var t={linearGradient:/^(linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,fromAngleValue:/^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/(^\#[0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,rgbaColor:/^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function i(t){var i=new Error(e+": "+t);throw i.source=e,i}function n(){return r("linear",t.linearGradient,a)||r("radial",t.radialGradient,s)||r("conic",t.conicGradient,o)}function r(e,n,r){return function(n,a){var o,s=y(n);if(s){y(t.startCall)||i("Missing (");var u=((o=r())&&(y(t.comma)||i("Missing comma before color stops")),{type:e,orientation:o,colorStops:d(f)});return y(t.endCall)||i("Missing )"),u}}(n)}function a(){return g("directional",t.sideOrCorner,1)||g("angular",t.angleValue,1)}function o(){return g("angular",t.fromAngleValue,1)}function s(){var i,n,r=u();return r&&((i=[]).push(r),n=e,y(t.comma)&&((r=u())?i.push(r):e=n)),i}function u(){var t,e=function(){var t=g("shape",/^(circle)/i,0);return t&&(t.style=p()||l()),t}()||((t=g("shape",/^(ellipse)/i,0))&&(t.style=v()||l()),t);if(e)e.at=c();else{var i=l();if(i){e=i;var n=c();n&&(e.at=n)}else{var r=h();r&&(e={type:"default-radial",at:r})}}return e}function l(){return g("extent-keyword",t.extentKeywords,1)}function c(){if(g("position",/^at/,0)){var t=h();return t||i("Missing positioning value"),t}}function h(){var t={x:v(),y:v()};if(t.x||t.y)return{type:"position",value:t}}function d(e){var n=e(),r=[];if(n)for(r.push(n);y(t.comma);)(n=e())?r.push(n):i("One extra comma");return r}function f(){var e=g("hex",t.hexColor,1)||g("rgba",t.rgbaColor,1)||g("rgb",t.rgbColor,1)||g("literal",t.literalColor,0);return e||i("Expected color definition"),e.length=v(),e}function v(){return g("%",t.percentageValue,1)||g("position-keyword",t.positionKeywords,1)||p()}function p(){return g("px",t.pixelValue,1)||g("em",t.emValue,1)}function g(t,e,i){var n=y(e);if(n)return{type:t,value:n[i]}}function y(t){var i=/^[\n\r\t\s]+/.exec(e);i&&m(i[0].length);var n=t.exec(e);return n&&m(n[0].length),n}function m(t){e=e.substr(t)}return function(t){return e=t.toString(),r=d(n),e.length>0&&i("Invalid input not EOF"),r;var r}}(),Mc=function(){function t(){o(this,t)}return u(t,null,[{key:"IsGradient",value:function(t){return!("string"==typeof t&&!t.includes("gradient"))}},{key:"IsGradientStr",value:function(t){return"string"==typeof t&&t.includes("gradient")}},{key:"Parse",value:function(e){if(t.IsGradientStr(e))try{var i=Bc(e)[0];if(i){if("linear"===i.type)return t.ParseLinear(i);if("radial"===i.type)return t.ParseRadial(i);if("conic"===i.type)return t.ParseConic(i)}}catch(t){return e}return e}},{key:"ParseConic",value:function(t){var e=t.orientation,i=t.colorStops,n=void 0===i?[]:i,r=ge/2,a=parseFloat(e.value)/180*ge-r;return{gradient:"conical",x:.5,y:.5,startAngle:a,endAngle:a+ke,stops:n.map((function(t){return{color:t.value,offset:parseFloat(t.length.value)/100}}))}}},{key:"ParseRadial",value:function(t){var e=t.colorStops;return{gradient:"radial",x0:.5,y0:.5,x1:.5,y1:.5,r0:0,r1:1,stops:(void 0===e?[]:e).map((function(t){return{color:t.value,offset:parseFloat(t.length.value)/100}}))}}},{key:"ParseLinear",value:function(t){for(var e=t.orientation,i=t.colorStops,n=void 0===i?[]:i,r=ge/2,a="angular"===e.type?parseFloat(e.value)/180*ge:0;a<0;)a+=ke;for(;a>ke;)a-=ke;var o=0,s=0,u=0,l=0;return a<r?(o=0,s=1,u=Math.sin(a),l=Math.cos(a)):a<ge?(o=0,s=0,u=Math.cos(a-r),l=Math.sin(a-r)):a<ge+r?(s=0,u=(o=1)-Math.sin(a-ge),l=Math.cos(a-ge)):(u=(o=1)-Math.cos(a-r-ge),l-=Math.sin(a-r-ge)),{gradient:"linear",x0:o,y0:s,x1:u,y1:l,stops:n.map((function(t){return{color:t.value,offset:parseFloat(t.length.value)/100}}))}}}])}();function Rc(t,e,i){var n=e,r=t.currentMatrix,a=r.a,o=r.b,s=r.c,u=r.d,l=Math.sign(a)*Math.sqrt(a*a+o*o),c=Math.sign(u)*Math.sqrt(s*s+u*u);return l+c===0?0:n=n/Math.abs(l+c)*2*i}function Pc(t,e,i,n,r){if(!e||!0===e)return"black";var a,o;if(_t(e))for(var s=0;s<e.length&&!(o=e[s]);s++);else o=e;return"string"==typeof(o=Mc.Parse(o))?o:("linear"===o.gradient?a=function(t,e,i){var n,r,a,o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=i.AABBBounds;if(!l)return;var c=l.x2-l.x1,h=l.y2-l.y1,d=l.x1-s,f=l.y1-u;if(i.attribute){var v=i.attribute,p=v.scaleX,g=void 0===p?1:p,y=v.scaleY,m=void 0===y?1:y;if(g*m==0)return;c/=g,h/=m,d/=g,f/=m}var k=t.createLinearGradient(d+(null!==(n=e.x0)&&void 0!==n?n:0)*c,f+(null!==(r=e.y0)&&void 0!==r?r:0)*h,d+(null!==(a=e.x1)&&void 0!==a?a:1)*c,f+(null!==(o=e.y1)&&void 0!==o?o:0)*h);return e.stops.forEach((function(t){k.addColorStop(t.offset,t.color)})),k}(t,o,i,n,r):"conical"===o.gradient?a=function(t,e,i){var n,r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=i.AABBBounds;if(!s)return;var u=s.x2-s.x1,l=s.y2-s.y1,c=s.x1-a,h=s.y1-o;if(i.attribute){var d=i.attribute,f=d.scaleX,v=void 0===f?1:f,p=d.scaleY,g=void 0===p?1:p;if(v*g==0)return;u/=v,l/=g,c/=v,h/=g}var y=t.createConicGradient(c+(null!==(n=e.x)&&void 0!==n?n:0)*u,h+(null!==(r=e.y)&&void 0!==r?r:0)*l,e.startAngle,e.endAngle);return e.stops.forEach((function(t){y.addColorStop(t.offset,t.color)})),y.GetPattern(u+c,l+h,void 0)}(t,o,i,n,r):"radial"===o.gradient&&(a=function(t,e,i){var n,r,a,o,s,u,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,h=i.AABBBounds;if(!h)return;var d=h.x2-h.x1,f=h.y2-h.y1,v=h.x1-l,p=h.y1-c;if(i.attribute){var g=i.attribute,y=g.scaleX,m=void 0===y?1:y,k=g.scaleY,b=void 0===k?1:k;if(m*b==0)return;v/=m,p/=b,d/=m,f/=b}var _=t.createRadialGradient(v+(null!==(n=e.x0)&&void 0!==n?n:.5)*d,p+(null!==(r=e.y0)&&void 0!==r?r:.5)*f,Math.max(d,f)*(null!==(a=e.r0)&&void 0!==a?a:0),v+(null!==(o=e.x1)&&void 0!==o?o:.5)*d,p+(null!==(s=e.y1)&&void 0!==s?s:.5)*f,Math.max(d,f)*(null!==(u=e.r1)&&void 0!==u?u:.5));return e.stops.forEach((function(t){_.addColorStop(t.offset,t.color)})),_}(t,o,i,n,r)),a||"orange")}var Oc=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ic=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Lc=function(t,e){return function(i,n){e(i,n,t)}},Dc=function(){return u((function t(){o(this,t),this.time=Ci.beforeFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){var f,v=t.attribute,p=v.background,g=v.backgroundOpacity,y=void 0===g?null!==(f=t.attribute.fillOpacity)&&void 0!==f?f:u.backgroundOpacity:g,m=v.opacity,k=void 0===m?u.opacity:m,b=v.backgroundMode,_=void 0===b?u.backgroundMode:b,x=v.backgroundFit,w=void 0===x?u.backgroundFit:x;if(p)if(t.backgroundImg&&t.resources){var S=t.resources.get(p);if("success"!==S.state||!S.data)return;if(e.save(),t.parent&&!t.transMatrix.onlyTranslate()){var A=Er(t.parent).group,T=t.parent.attribute,E=T.scrollX,C=void 0===E?A.scrollX:E,B=T.scrollY,M=void 0===B?A.scrollY:B;e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.translate(C,M)}e.clip();var R=t.AABBBounds;e.setCommonStyle(t,t.attribute,i,n,u),e.globalAlpha=y*k,this.doDrawImage(e,S.data,R,_,w),e.restore(),t.transMatrix.onlyTranslate()||e.setTransformForCurrent()}else e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,i,n,u),e.globalAlpha=y*k,e.fillStyle=p,e.fill(),e.highPerformanceRestore()}},{key:"doDrawImage",value:function(t,e,i,n,r){if("no-repeat"===n)t.drawImage(e,i.x1,i.y1,i.width(),i.height());else{var a=i.width(),o=i.height(),s=a,u=o;if(r&&"repeat"!==n&&(e.width||e.height)){var l=e.width,c=e.height;"repeat-x"===n?(s=l*(o/c),u=o):"repeat-y"===n&&(u=c*(a/l),s=a);var h=t.dpr,d=ur.allocate({width:s,height:u,dpr:h}),f=d.getContext("2d");f&&(f.inuse=!0,f.clearMatrix(),f.setTransformForCurrent(!0),f.clearRect(0,0,s,u),f.drawImage(e,0,0,s,u),e=d.nativeCanvas),ur.free(d)}var v=t.dpr,p=t.createPattern(e,n);p.setTransform&&p.setTransform(new DOMMatrix([1/v,0,0,1/v,0,0])),t.fillStyle=p,t.translate(i.x1,i.y1),t.fillRect(0,0,a,o),t.translate(-i.x1,-i.y1)}}}])}(),jc=new Dc,Fc=function(){return u((function t(e){o(this,t),this.subRenderContribitions=e,this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){this._subRenderContribitions||(this._subRenderContribitions=this.subRenderContribitions.getContributions()),this._subRenderContribitions.forEach((function(f){f.render(t,e,i,n,r,a,o,s,u,l,c,h,d)}))}}])}();Fc=Oc([L(),Lc(0,O($)),Lc(0,D(js)),Ic("design:paramtypes",[Object])],Fc);var Nc=function(){return u((function t(){o(this,t),this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=10}),[{key:"createCommonPattern",value:function(t,e,i,n,r){var a=(t-2*e)/2,o=n.dpr,s=ur.allocate({width:t,height:t,dpr:o}),u=s.getContext("2d");if(!u)return null;u.inuse=!0,u.clearMatrix(),u.setTransformForCurrent(!0),u.clearRect(0,0,t,t),r(a,u);var l=n.createPattern(s.nativeCanvas,"repeat");return l.setTransform&&l.setTransform(new DOMMatrix([1/o,0,0,1/o,0,0])),ur.free(s),l}},{key:"createCirclePattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(t,e){e.fillStyle=i,e.arc(t,t,t,0,ke),e.fill()}))}},{key:"createDiamondPattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(e,n){var r=t/2,a=r;n.fillStyle=i,n.moveTo(r,a-e),n.lineTo(e+r,a),n.lineTo(r,a+e),n.lineTo(r-e,a),n.closePath(),n.fill()}))}},{key:"createRectPattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(t,n){var r=e,a=r;n.fillStyle=i,n.fillRect(r,a,2*t,2*t)}))}},{key:"createVerticalLinePattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(n,r){var a=e;r.fillStyle=i,r.fillRect(a,0,2*n,t)}))}},{key:"createHorizontalLinePattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(n,r){var a=e;r.fillStyle=i,r.fillRect(0,a,t,2*n)}))}},{key:"createBiasLRLinePattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(e,n){n.strokeStyle=i,n.lineWidth=e,n.moveTo(0,0),n.lineTo(t,t);var r=t/2,a=-r;n.moveTo(r,a),n.lineTo(r+t,a+t),n.moveTo(-r,-a),n.lineTo(-r+t,-a+t),n.stroke()}))}},{key:"createBiasRLLinePattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(e,n){n.strokeStyle=i,n.lineWidth=e,n.moveTo(t,0),n.lineTo(0,t);var r=t/2,a=r;n.moveTo(t+r,a),n.lineTo(r,a+t),n.moveTo(t-r,-a),n.lineTo(-r,-a+t),n.stroke()}))}},{key:"createGridPattern",value:function(t,e,i,n){return this.createCommonPattern(t,e,i,n,(function(t,n){var r=e,a=r;n.fillStyle=i,n.fillRect(r,a,t,t),n.fillRect(r+t,a+t,t,t)}))}},{key:"initTextureMap",value:function(t,e){this.textureMap=new Map}},{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){this.textureMap||this.initTextureMap(e,t.stage);var f=t.attribute,v=f.texture,p=void 0===v?u.texture:v,g=f.textureColor,y=void 0===g?u.textureColor:g,m=f.textureSize,k=void 0===m?u.textureSize:m,b=f.texturePadding,_=void 0===b?u.texturePadding:b;p&&this.drawTexture(p,t,e,i,n,u,y,k,_)}},{key:"drawTexture",value:function(t,e,i,n,r,a,o,s,u){var l=this.textureMap.get(t);if(!l)switch(t){case"circle":l=this.createCirclePattern(s,u,o,i);break;case"diamond":l=this.createDiamondPattern(s,u,o,i);break;case"rect":l=this.createRectPattern(s,u,o,i);break;case"vertical-line":l=this.createVerticalLinePattern(s,u,o,i);break;case"horizontal-line":l=this.createHorizontalLinePattern(s,u,o,i);break;case"bias-lr":l=this.createBiasLRLinePattern(s,u,o,i);break;case"bias-rl":l=this.createBiasRLLinePattern(s,u,o,i);break;case"grid":l=this.createGridPattern(s,u,o,i)}l&&(i.highPerformanceSave(),i.setCommonStyle(e,e.attribute,n,r,a),i.fillStyle=l,i.fill(),i.highPerformanceRestore())}}])}(),zc=new Nc,Gc=function(){return u((function t(){o(this,t),this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.attribute,f=d.outerBorder,v=d.innerBorder,p=f&&!1!==f.visible,g=v&&!1!==v.visible;if(p||g){var y=t.attribute,m=y.innerPadding,k=void 0===m?u.innerPadding:m,b=y.outerPadding,_=void 0===b?u.outerPadding:b,x=y.startAngle,w=void 0===x?u.startAngle:x,S=y.endAngle,A=void 0===S?u.endAngle:S,T=y.opacity,E=void 0===T?u.opacity:T,C=y.x,B=void 0===C?u.x:C,M=y.y,R=void 0===M?u.y:M,P=y.scaleX,O=void 0===P?u.scaleX:P,I=y.scaleY,L=void 0===I?u.scaleY:I,D=t.attribute,j=D.innerRadius,F=void 0===j?u.innerRadius:j,N=D.outerRadius,z=void 0===N?u.outerRadius:N;z+=_,F-=k;var G=!(!f||!f.stroke),U=!(!v||!v.stroke);if(p){var W=f.distance,V=void 0===W?u.outerBorder.distance:W,H=Rc(e,V,e.dpr),X=V/z;if(t.setAttributes({outerRadius:z+H,innerRadius:F-H,startAngle:w-X,endAngle:A+X}),e.beginPath(),ws(t,e,i,n,z+H,F-H),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,f,u.outerBorder);else if(G){var Y=u.outerBorder.opacity;u.outerBorder.opacity=E,e.setStrokeStyle(t,f,(B-i)/O,(R-n)/L,u.outerBorder),u.outerBorder.opacity=Y,e.stroke()}}if(g){var K=v.distance,q=void 0===K?u.innerBorder.distance:K,Z=Rc(e,q,e.dpr),J=q/z;if(t.setAttributes({outerRadius:z-Z,innerRadius:F+Z,startAngle:w+J,endAngle:A-J}),e.beginPath(),ws(t,e,i,n,z-Z,F+Z),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,v,u.innerBorder);else if(U){var $=u.innerBorder.opacity;u.innerBorder.opacity=E,e.setStrokeStyle(t,v,(B-i)/O,(R-n)/L,u.innerBorder),u.innerBorder.opacity=$,e.stroke()}}t.setAttributes({outerRadius:z,innerRadius:F,startAngle:w,endAngle:A})}}}])}(),Uc=new Gc,Wc=zc,Vc=jc,Hc=function(){return u((function t(){o(this,t),this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.attribute,f=d.outerBorder,v=d.innerBorder,p=f&&!1!==f.visible,g=v&&!1!==v.visible;if(p||g){var y=t.attribute,m=y.radius,k=void 0===m?u.radius:m,b=y.startAngle,_=void 0===b?u.startAngle:b,x=y.endAngle,w=void 0===x?u.endAngle:x,S=y.opacity,A=void 0===S?u.opacity:S,T=y.x,E=void 0===T?u.x:T,C=y.y,B=void 0===C?u.y:C,M=y.scaleX,R=void 0===M?u.scaleX:M,P=y.scaleY,O=void 0===P?u.scaleY:P,I=!(!f||!f.stroke),L=!(!v||!v.stroke);if(p){var D=f.distance,j=Rc(e,void 0===D?u.outerBorder.distance:D,e.dpr);if(e.beginPath(),e.arc(i,n,k+j,_,w),e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,f,u.outerBorder);else if(I){var F=u.outerBorder.opacity;u.outerBorder.opacity=A,e.setStrokeStyle(t,f,(E-i)/R,(B-n)/O,u.outerBorder),u.outerBorder.opacity=F,e.stroke()}}if(g){var N=v.distance,z=Rc(e,void 0===N?u.innerBorder.distance:N,e.dpr);if(e.beginPath(),e.arc(i,n,k-z,_,w),e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,v,u.innerBorder);else if(L){var G=u.innerBorder.opacity;u.innerBorder.opacity=A,e.setStrokeStyle(t,v,(E-i)/R,(B-n)/O,u.innerBorder),u.innerBorder.opacity=G,e.stroke()}}}}}])}(),Xc=new Hc,Yc=zc,Kc=jc,qc=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).time=Ci.beforeFillStroke,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.attribute,f=d.background,v=d.backgroundMode,p=void 0===v?u.backgroundMode:v,g=d.backgroundFit,y=void 0===g?u.backgroundFit:g;if(f)if(t.backgroundImg&&t.resources){var m=t.resources.get(f);if("success"!==m.state||!m.data)return;e.highPerformanceSave(),e.setTransformFromMatrix(t.parent.globalTransMatrix,!0);var k=t.AABBBounds;this.doDrawImage(e,m.data,k,p,y),e.highPerformanceRestore(),e.setTransformForCurrent()}else e.highPerformanceSave(),e.fillStyle=f,e.fill(),e.highPerformanceRestore()}}])}(Dc),Zc=new qc,Jc=ge/2;function $c(t,e,i,n,r,a){var o;if(n<0&&(e+=n,n=-n),r<0&&(i+=r,r=-r),St(a,!0))o=[a=be(a),a,a,a];else if(Array.isArray(a)){var s,u,l=a;switch(l.length){case 0:o=[0,0,0,0];break;case 1:o=[s=be(l[0]),s,s,s];break;case 2:case 3:o=[s=be(l[0]),u=be(l[1]),s,u];break;default:(o=l)[0]=be(o[0]),o[1]=be(o[1]),o[2]=be(o[2]),o[3]=be(o[3])}}else o=[0,0,0,0];if(n<0||o[0]+o[1]+o[2]+o[3]<1e-12)return t.rect(e,i,n,r);var c=[e,i],h=[e+n,i],d=[e+n,i+r],f=[e,i+r],v=Math.min(n/2,r/2),p=[Math.min(v,o[0]),Math.min(v,o[1]),Math.min(v,o[2]),Math.min(v,o[3])],g=[c[0]+p[0],c[1]],y=[c[0],c[1]+p[0]],m=[h[0]-p[1],h[1]],k=[h[0],h[1]+p[1]],b=[d[0]-p[2],d[1]],_=[d[0],d[1]-p[2]],x=[f[0]+p[3],f[1]],w=[f[0],f[1]-p[3]];if(t.moveTo(g[0],g[1]),t.lineTo(m[0],m[1]),!Kt(m,k)){var S=m[0],A=m[1]+p[1];t.arc(S,A,p[1],-Jc,0,!1)}if(t.lineTo(_[0],_[1]),!Kt(b,_)){var T=_[0]-p[2],E=_[1];t.arc(T,E,p[2],0,Jc,!1)}if(t.lineTo(x[0],x[1]),!Kt(x,w)){var C=x[0],B=x[1]-p[3];t.arc(C,B,p[3],Jc,ge,!1)}if(t.lineTo(y[0],y[1]),!Kt(g,y)){var M=g[0],R=g[1]+p[0];t.arc(M,R,p[0],ge,ge+Jc,!1)}return t.closePath(),t}var Qc=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},th=function(){return u((function t(){o(this,t),this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.attribute,f=d.outerBorder,v=d.innerBorder,p=f&&!1!==f.visible,g=v&&!1!==v.visible;if(p||g){var y=t.attribute,m=y.cornerRadius,k=void 0===m?u.cornerRadius:m,b=y.opacity,_=void 0===b?u.opacity:b,x=y.x,w=void 0===x?u.x:x,S=y.y,A=void 0===S?u.y:S,T=y.scaleX,E=void 0===T?u.scaleX:T,C=y.scaleY,B=void 0===C?u.scaleY:C,M=y.x1,R=y.y1,P=t.attribute,O=P.width,I=P.height;O=(null!=O?O:M-i)||0,I=(null!=I?I:R-n)||0;var L=!(!f||!f.stroke),D=!(!v||!v.stroke);if(p){var j=f.distance,F=Rc(e,void 0===j?u.outerBorder.distance:j,e.dpr),N=i-F,z=n-F,G=2*F;if(0===k||_t(k)&&k.every((function(t){return 0===t}))?(e.beginPath(),e.rect(N,z,O+G,I+G)):(e.beginPath(),$c(e,N,z,O+G,I+G,k)),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,f,u.outerBorder);else if(L){var U=u.outerBorder.opacity;u.outerBorder.opacity=_,e.setStrokeStyle(t,f,(w-i)/E,(A-n)/B,u.outerBorder),u.outerBorder.opacity=U,e.stroke()}}if(g){var W=v.distance,V=Rc(e,void 0===W?u.innerBorder.distance:W,e.dpr),H=i+V,X=n+V,Y=2*V;if(0===k||_t(k)&&k.every((function(t){return 0===t}))?(e.beginPath(),e.rect(H,X,O-Y,I-Y)):(e.beginPath(),$c(e,H,X,O-Y,I-Y,k)),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,v,u.innerBorder);else if(D){var K=u.innerBorder.opacity;u.innerBorder.opacity=_,e.setStrokeStyle(t,v,(w-i)/E,(A-n)/B,u.innerBorder),u.innerBorder.opacity=K,e.stroke()}}}}}])}(),eh=function(){return u((function t(){o(this,t),this.time=Ci.beforeFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){var f=t.attribute.stroke,v=void 0===f?u.stroke:f;Array.isArray(v)&&v.some((function(t){return!1===t}))&&(d.doStroke=!1)}}])}();eh=Qc([L()],eh);var ih=function(){return u((function t(){o(this,t),this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.attribute,f=d.x1,v=d.y1,p=d.x,g=void 0===p?u.x:p,y=d.y,m=void 0===y?u.y:y,k=d.stroke,b=void 0===k?u.stroke:k,_=t.attribute,x=_.width,w=_.height;if(x=(null!=x?x:f-g)||0,w=(null!=w?w:v-m)||0,Array.isArray(b)&&b.some((function(t){return!1===t}))){if(e.setStrokeStyle(t,t.attribute,i,n,u),e.beginPath(),e.moveTo(i,n),b[0]?e.lineTo(i+x,n):e.moveTo(i+x,n),b[1]?e.lineTo(i+x,n+w):e.moveTo(i+x,n+w),b[2]?e.lineTo(i,n+w):e.moveTo(i,n+w),b[3]){var S=b[0]?n-e.lineWidth/2:n;e.lineTo(i,S)}else e.moveTo(i,n);e.stroke()}}}])}();ih=Qc([L()],ih);var nh=new th,rh=zc,ah=jc,oh=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).time=Ci.beforeFillStroke,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.attribute,f=d.background,v=d.backgroundMode,p=void 0===v?u.backgroundMode:v,g=d.backgroundFit,y=void 0===g?u.backgroundFit:g;if(f)if(t.backgroundImg){var m=t.resources.get(f);if("success"!==m.state||!m.data)return;if(e.save(),t.parent&&!t.transMatrix.onlyTranslate()){var k=Er(t.parent).group,b=t.parent.attribute,_=b.scrollX,x=void 0===_?k.scrollX:_,w=b.scrollY,S=void 0===w?k.scrollY:w;e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.translate(x,S)}var A=t.AABBBounds;this.doDrawImage(e,m.data,A,p,y),e.restore(),t.transMatrix.onlyTranslate()||e.setTransformForCurrent()}else if(gt(f)){var T=f.stroke,E=f.fill,C=f.lineWidth,B=void 0===C?1:C,M=f.cornerRadius,R=void 0===M?0:M,P=f.expandX,O=void 0===P?0:P,I=f.expandY,L=void 0===I?0:I;if(!T&&!E)return;e.beginPath();var D=function(t){var e=ua(t.attribute.boundsPadding),i=t.AABBBounds,n=i.x1,r=i.y1,a=i.width(),o=i.height();return St(e)?(n+=e,r+=e,a-=2*e,o-=2*e):(n+=e[3],r+=e[0],a-=e[1]+e[3],o-=e[0]+e[2]),{x:n,y:r,width:a,height:o}}(t),j=D.x,F=D.y,N=D.width,z=D.height;R?$c(e,j-O,F-L,N+2*O,z+2*L,R):e.rect(j-O,F-L,N+2*O,z+2*L),e.globalAlpha=1,E&&(e.fillStyle=E,e.fill()),T&&B>0&&(e.lineWidth=B,e.strokeStyle=T,e.stroke())}else{e.beginPath();var G=t.AABBBounds;e.rect(i,n,G.width(),G.height()),e.fillStyle=f,e.globalAlpha=1,e.fill()}}}])}(Dc);var sh=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).time=Ci.afterFillStroke,t.useStyle=!0,t.order=0,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,n,r,a,o,s,u,l,c,d,f){return p(h(i.prototype),"drawShape",this).call(this,t,e,n,r,a,o,s,u,l,c,d,f)}}])}(th),uh=new sh,lh=new oh,ch=new(function(){return u((function t(){o(this,t),this.time=Ci.afterFillStroke,this.useStyle=!0,this.order=0}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=t.getParsedPath();if(d){var f=t.attribute,v=f.outerBorder,p=f.innerBorder,g=v&&!1!==v.visible,y=p&&!1!==p.visible;if(g||y){var m=t.attribute,k=m.size,b=void 0===k?u.size:k,_=m.opacity,x=void 0===_?u.opacity:_,w=m.x,S=void 0===w?u.x:w,A=m.y,T=void 0===A?u.y:A,E=m.scaleX,C=void 0===E?u.scaleX:E,B=m.scaleY,M=void 0===B?u.scaleY:B,R=!(!v||!v.stroke),P=!(!p||!p.stroke);if(g){var O=v.distance,I=Rc(e,void 0===O?u.outerBorder.distance:O,e.dpr);if(e.beginPath(),!1===d.drawOffset(e,b,i,n,I)&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,v,u.outerBorder);else if(R){var L=u.outerBorder.opacity;u.outerBorder.opacity=x,e.setStrokeStyle(t,v,(S-i)/C,(T-n)/M,u.outerBorder),u.outerBorder.opacity=L,e.stroke()}}if(y){var D=p.distance,j=Rc(e,void 0===D?u.innerBorder.distance:D,e.dpr);if(e.beginPath(),!1===d.drawOffset(e,b,i,n,-j)&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),h)h(e,p,u.innerBorder);else if(P){var F=u.innerBorder.opacity;u.innerBorder.opacity=x,e.setStrokeStyle(t,p,(S-i)/C,(T-n)/M,u.innerBorder),u.innerBorder.opacity=F,e.stroke()}}}}}}])}()),hh=zc,dh=jc,fh=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).time=Ci.afterFillStroke,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){var f,v,p,g;this.textureMap||this.initTextureMap(e,t.stage);var y=(d||{}).attribute,m=void 0===y?t.attribute:y,k=m.texture,b=void 0===k?null!==(f=t.attribute.texture)&&void 0!==f?f:pa(u,"texture"):k,_=m.textureColor,x=void 0===_?null!==(v=t.attribute.textureColor)&&void 0!==v?v:pa(u,"textureColor"):_,w=m.textureSize,S=void 0===w?null!==(p=t.attribute.textureSize)&&void 0!==p?p:pa(u,"textureSize"):w,A=m.texturePadding,T=void 0===A?null!==(g=t.attribute.texturePadding)&&void 0!==g?g:pa(u,"texturePadding"):A;b&&this.drawTexture(b,t,e,i,n,u,x,S,T)}}])}(Nc),vh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ph=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},gh=function(t,e){return function(i,n){e(i,n,t)}},yh=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).arcRenderContribitions=t,n.numberType=Lo,n.builtinContributions=[Uc,Vc,Wc],n.init(t),n}return c(i,t),u(i,[{key:"drawArcTailCapPath",value:function(t,e,i,n,r,a,o,s){var u=s-o,l=t.getParsedAngle(),c=l.startAngle,h=l.endAngle,d=be((h=s)-c),f=h>c,v=!1;if(r<a){var p=r;r=a,a=p}var g=t.getParsedCornerRadius(),y=t.getParsePadAngle(c,h);y.outerDeltaAngle;var m,k,b,_,x=y.innerDeltaAngle,w=y.outerStartAngle,S=y.outerEndAngle,A=y.innerEndAngle,T=y.innerStartAngle,E=g,C=g,B=g,M=g,R=Math.max(C,E),P=Math.max(B,M),O=R,I=P,L=r*xe(w),D=r*Ae(w),j=a*xe(A),F=a*Ae(A);if((P>pe||R>pe)&&(m=r*xe(S),k=r*Ae(S),b=a*xe(T),_=a*Ae(T),d<ge)){var N=_s(L,D,b,_,m,k,j,F);if(N){var z=L-N[0],G=D-N[1],U=m-N[0],W=k-N[1],V=1/Ae(Ce((z*U+G*W)/(Te(z*z+G*G)*Te(U*U+W*W)))/2),H=Te(N[0]*N[0]+N[1]*N[1]);I=Se(P,(a-H)/(V-1)),O=Se(R,(r-H)/(V+1))}}if(O>pe){var X=Se(E,O),Y=Se(C,O),K=xs(b,_,L,D,r,X,Number(f)),q=xs(m,k,j,F,r,Y,Number(f));if(O<R&&X===Y)e.moveTo(i+K.cx+K.x01,n+K.cy+K.y01),e.arc(i+K.cx,n+K.cy,O,_e(K.y01,K.x01),_e(q.y01,q.x01),!f);else{var Z=h-u-.03,J=_e(q.y11,q.x11);e.arc(i,n,r,Z,J,!f),Y>0&&e.arc(i+q.cx,n+q.cy,Y,_e(q.y11,q.x11),_e(q.y01,q.x01),!f)}}else e.moveTo(i+L,n+D);if(!(a>pe)||x<.001)e.lineTo(i+j,n+F),v=!0;else if(I>pe){var $=Se(M,I),Q=Se(B,I),tt=xs(j,F,m,k,a,-Q,Number(f)),et=xs(L,D,b,_,a,-$,Number(f));if(e.lineTo(i+tt.cx+tt.x01,n+tt.cy+tt.y01),I<P&&$===Q){var it=_e(et.y01,et.x01);e.arc(i+tt.cx,n+tt.cy,I,_e(tt.y01,tt.x01),it,!f)}else{Q>0&&e.arc(i+tt.cx,n+tt.cy,Q,_e(tt.y01,tt.x01),_e(tt.y11,tt.x11),!f);var nt=_e(tt.cy+tt.y11,tt.cx+tt.x11),rt=h-u-.03;e.arc(i,n,a,nt,rt,f)}}else e.lineTo(i+a*xe(T),n+a*Ae(T));return v}},{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u=Er(t,null==a?void 0:a.theme).arc,l=t.attribute,c=l.fill,h=void 0===c?u.fill:c,d=l.stroke,f=void 0===d?u.stroke:d,v=l.x,p=void 0===v?u.x:v,g=l.y,y=void 0===g?u.y:g,m=this.valid(t,u,o,s);if(m){var k=m.fVisible,b=m.sVisible,_=m.doFill,x=m.doStroke,w=t.attribute,S=w.outerPadding,A=void 0===S?u.outerPadding:S,T=w.innerPadding,E=void 0===T?u.innerPadding:T,C=w.cap,B=void 0===C?u.cap:C,M=w.forceShowCap,R=void 0===M?u.forceShowCap:M,P=t.attribute,O=P.outerRadius,I=void 0===O?u.outerRadius:O,L=P.innerRadius,D=void 0===L?u.innerRadius:L;I+=A,D-=E;var j=0,F=(dt(B)&&B||B[0])&&"conical"===h.gradient;if(F){var N=t.getParsedAngle(),z=N.sc,G=N.startAngle,U=N.endAngle;be(U-G)<ke-pe&&(j=z||0,h.startAngle-=j,h.endAngle-=j)}var W=!1,V=function(t){var e,i=!0;if(dt(t,!0)){for(var n=0;n<4;n++)oa[n]=t,i&&(i=!(null!==(e=oa[n])&&void 0!==e&&!e));i=t}else if(Array.isArray(t))for(var r=0;r<4;r++)oa[r]=!!t[r],i&&(i=!!oa[r]);else oa[0]=!1,oa[1]=!1,oa[2]=!1,oa[3]=!1;return{isFullStroke:i,stroke:oa}}(f),H=V.isFullStroke,X=V.stroke;if((_||H)&&(e.beginPath(),ws(t,e,i,n,I,D),W=!0,e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,i,n,_,x,k,b,u,r,o,s),_&&(o?o(e,t.attribute,u):k&&(e.setCommonStyle(t,t.attribute,p-i,y-n,u),e.fill())),x&&H&&(s?s(e,t.attribute,u):b&&(e.setStrokeStyle(t,t.attribute,p-i,y-n,u),e.stroke()))),!H&&x&&(e.beginPath(),ws(t,e,i,n,I,D,X),W||this.beforeRenderStep(t,e,i,n,_,x,k,b,u,r,o,s),s?s(e,t.attribute,u):b&&(e.setStrokeStyle(t,t.attribute,i,n,u),e.stroke())),(dt(B)&&B||B[1])&&R){var Y=t.getParsedAngle(),K=Y.startAngle,q=Y.endAngle;if(be(q-K)>=ke-pe){e.beginPath();var Z=Math.abs(I-D)/2/I,J=t.attribute,$=J.endAngle,Q=void 0===$?u.endAngle:$,tt=J.fill,et=void 0===tt?u.fill:tt,it=Q;if(this.drawArcTailCapPath(t,e,i,n,I,D,it,it+Z),W||this.beforeRenderStep(t,e,i,n,_,x,k,b,u,r,o,s),_){var nt=et;if("conical"===nt.gradient){var rt=function(t,e,i,n){for(var r=n.stops,a=n.startAngle,o=n.endAngle;i<0;)i+=ke;for(;i>ke;)i-=ke;if(i<a)return r[0].color;if(i>o)return r[0].color;for(var s,u,l=(i-a)/(o-a),c=0;c<r.length;c++)if(r[c].offset>=l){s=r[c-1],u=r[c];break}return l=(l-s.offset)/(u.offset-s.offset),za(s.color,u.color,l,!1)}(0,0,Q,nt);o||ys&&(e.setCommonStyle(t,t.attribute,i,n,u),e.fillStyle=rt,e.fill())}}x&&(s||b&&(e.setStrokeStyle(t,t.attribute,i,n,u),e.stroke()))}}this.afterRenderStep(t,e,i,n,_,x,k,b,u,r,o,s),F&&(h.startAngle+=j,h.endAngle+=j)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).arc;this._draw(t,r,!1,i,n)}}])}(Cc);yh=vh([L(),gh(0,O($)),gh(0,D(Es)),ph("design:paramtypes",[Object])],yh);var mh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},kh=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},bh=function(t,e){return function(i,n){e(i,n,t)}},_h=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).circleRenderContribitions=t,n.numberType=Fo,n.builtinContributions=[Xc,Kc,Yc],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u=Er(t,null==a?void 0:a.theme).circle,l=t.attribute,c=l.radius,h=void 0===c?u.radius:c,d=l.startAngle,f=void 0===d?u.startAngle:d,v=l.endAngle,p=void 0===v?u.endAngle:v,g=l.x,y=void 0===g?u.x:g,m=l.y,k=void 0===m?u.y:m,b=this.valid(t,u,o,s);if(b){var _=b.fVisible,x=b.sVisible,w=b.doFill,S=b.doStroke;e.beginPath(),e.arc(i,n,h,f,p),e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,i,n,w,S,_,x,u,r,o,s),w&&(o?o(e,t.attribute,u):_&&(e.setCommonStyle(t,t.attribute,y-i,k-n,u),e.fill())),S&&(s?s(e,t.attribute,u):x&&(e.setStrokeStyle(t,t.attribute,y-i,k-n,u),e.stroke())),this.afterRenderStep(t,e,i,n,w,S,_,x,u,r,o,s)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).circle;this._draw(t,r,!1,i,n)}}])}(Cc);function xh(t,e,i,n){if(e.p1){var r=n||{},a=r.offsetX,o=void 0===a?0:a,s=r.offsetY,u=void 0===s?0:s,l=r.offsetZ,c=void 0===l?0:l;if(1===i)e.p2&&e.p3?t.bezierCurveTo(o+e.p1.x,u+e.p1.y,o+e.p2.x,u+e.p2.y,o+e.p3.x,u+e.p3.y,c):t.lineTo(o+e.p1.x,u+e.p1.y,c);else if(e.p2&&e.p3){var h=g(Vi(e,i),1)[0];t.bezierCurveTo(o+h.p1.x,u+h.p1.y,o+h.p2.x,u+h.p2.y,o+h.p3.x,u+h.p3.y,c)}else{var d=e.getPointAt(i);t.lineTo(o+d.x,u+d.y,c)}}}function wh(t,e,i,n,r){var a,o=r||{},s=o.offsetX,u=void 0===s?0:s,l=o.offsetY,c=void 0===l?0:l,h=o.offsetZ,d=void 0===h?0:h,f=o.mode,v=void 0===f?"none":f,p=o.drawConnect,g=void 0!==p&&p;if(o.zeroX,o.zeroY,(!g||"none"!==v)&&e){var y=!0,m=e.curves;if(i>=1)if(g){var k,b=!0;m.forEach((function(e,i){var n,r=e.p0;if(e.originP1!==e.originP2){if(k&&k.originP1===k.originP2&&(r=k.p0),e.defined)b||(t.lineTo(r.x+u,r.y+c,d),b=!b);else{var a,o=e.originP1,s=e.originP2;if(o&&!1!==o.defined?a=r:o&&!1!==s.defined&&(a=null!==(n=e.p3)&&void 0!==n?n:e.p1),b){b=!b;var l=a?a.x:e.p0.x,h=a?a.y:e.p0.y;t.moveTo(l+u,h+c,d)}else a&&(b=!b,t.lineTo(a.x+u,a.y+c,d))}k=e}else k=e}))}else m.forEach((function(e){e.defined?(y&&t.moveTo(e.p0.x+u,e.p0.y+c,d),xh(t,e,1,r),y=!1):y=!0}));else if(!(i<=0)){var _;"x"===n?_=Ti.ROW:"y"===n?_=Ti.COLUMN:"auto"===n&&(_=e.direction);for(var x=i*e.tryUpdateLength(_),w=0,S=!0,A=null,T=0,E=m.length;T<E;T++){var C=m[T],B=C.getLength(_),M=(x-w)/B;if(w+=B,M<0)break;if(g){var R=C.p0;if(C.originP1===C.originP2){A=C;continue}if(A&&A.originP1===A.originP2&&(R=A.p0),C.defined)S||(t.lineTo(R.x+u,R.y+c,d),S=!S);else{var P=C.originP1,O=C.originP2,I=void 0;if(P&&!1!==P.defined?I=R:P&&!1!==O.defined&&(I=null!==(a=C.p3)&&void 0!==a?a:C.p1),S){S=!S;var L=I?I.x:C.p0.x,D=I?I.y:C.p0.y;t.moveTo(L+u,D+c,d)}else I&&(S=!S,t.lineTo(I.x+u,I.y+c,d))}A=C}else{if(!C.defined){y=!0;continue}y&&t.moveTo(C.p0.x+u,C.p0.y+c,d),xh(t,C,Se(M,1),r),y=!1}}}}}_h=mh([L(),bh(0,O($)),bh(0,D(Bs)),kh("design:paramtypes",[Object])],_h);var Sh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ah=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).numberType=Uo,t}return c(i,t),u(i,[{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).line;this._draw(t,r,!1,i,n)}},{key:"drawSegmentItem",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d,f,v){var p,g,y,m,k;if(e){t.beginPath();var b=null!==(p=this.z)&&void 0!==p?p:0;wh(t.camera?t:t.nativeContext,e,u,l,{offsetX:c,offsetY:h,offsetZ:b}),d.cache&&!_t(d.cache)&&d.cache.curves.every((function(t){return t.defined}))&&d.attribute.curveType&&d.attribute.curveType.includes("Closed")&&t.closePath(),t.setShadowBlendStyle&&t.setShadowBlendStyle(d,o,s);var _=o.x,x=void 0===_?0:_,w=o.x,S=void 0===w?0:w;!1!==i&&(f?f(t,o,s):r&&(t.setCommonStyle(d,o,x-c,S-h,s),t.fill())),!1!==n&&(v?v(t,o,s):a&&(t.setStrokeStyle(d,o,x-c,S-h,s),t.stroke()));var A=o.connectedType,T=o.connectedX,E=o.connectedY,C=o.connectedStyle;if(_t(s)?(A=null!==(g=null!=A?A:s[0].connectedType)&&void 0!==g?g:s[1].connectedType,T=null!==(y=null!=T?T:s[0].connectedX)&&void 0!==y?y:s[1].connectedX,E=null!==(m=null!=E?E:s[0].connectedY)&&void 0!==m?m:s[1].connectedY,C=null!==(k=null!=C?C:s[0].connectedStyle)&&void 0!==k?k:s[1].connectedStyle):(A=null!=A?A:s.connectedType,T=null!=T?T:s.connectedX,E=null!=E?E:s.connectedY,C=null!=C?C:s.connectedStyle),"connect"!==A&&"zero"!==A&&(A="none"),"none"!==A){t.beginPath(),wh(t.camera?t:t.nativeContext,e,u,l,{offsetX:c,offsetY:h,offsetZ:b,drawConnect:!0,mode:A,zeroX:T,zeroY:E});var B=[];_t(s)?s.forEach((function(t){return B.push(t)})):B.push(s),B.push(o),!1!==i&&(f?f(t,o,s):r&&(t.setCommonStyle(d,C,x-c,S-h,B),t.fill())),!1!==n&&(v?v(t,o,s):a&&(t.setStrokeStyle(d,C,x-c,S-h,B),t.stroke()))}return!1}}},{key:"drawLinearLineHighPerformance",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){var f;e.beginPath();var v=null!==(f=this.z)&&void 0!==f?f:0,p=t.attribute.points,g=p[0];e.moveTo(g.x+o,g.y+s,v);for(var y=1;y<p.length;y++){var m=p[y];e.lineTo(m.x+o,m.y+s,v)}e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u);var k=t.attribute,b=k.x,_=void 0===b?0:b,x=k.x,w=void 0===x?0:x;!1!==i&&(h?h(e,t.attribute,u):r&&(e.setCommonStyle(t,t.attribute,_-o,w-s,u),e.fill())),!1!==n&&(d?d(e,t.attribute,u):a&&(e.setStrokeStyle(t,t.attribute,_-o,w-s,u),e.stroke()))}},{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u=this,l=Er(t,null==a?void 0:a.theme).line,c=t.attribute,h=c.fill,d=void 0===h?l.fill:h,f=c.stroke,v=void 0===f?l.stroke:f,p=c.fillOpacity,g=void 0===p?l.fillOpacity:p,y=c.strokeOpacity,m=void 0===y?l.strokeOpacity:y,k=c.segments,b=c.points,_=c.closePath;if(this.valid(t,l,o,s)){var x=t.attribute.curveType,w=void 0===x?l.curveType:x;_&&"linear"===w&&(w="linearClosed");var S=t.attribute,A=S.clipRange,T=void 0===A?l.clipRange:A,E=S.clipRangeByDimension,C=void 0===E?l.clipRangeByDimension:E;if(1===T&&!k&&!b.some((function(t){return!1===t.defined}))&&"linear"===w)return this.drawLinearLineHighPerformance(t,e,!!d,!!v,g,m,i,n,l,r,a,o,s);if(t.shouldUpdateShape()){var B=t.attribute,M=B.points,R=B.segments,P=M;if(R&&R.length){var O,I;if(t.cache=R.map((function(t,e){if(t.points.length<=1&&0===e)return t.points[0]&&(I={endX:t.points[0].x,endY:t.points[0].y,curves:[{defined:!1!==t.points[0].defined}]}),null;1===e?O={x:I.endX,y:I.endY,defined:I.curves[I.curves.length-1].defined}:e>1&&(O.x=I.endX,O.y=I.endY,O.defined=I.curves[I.curves.length-1].defined);var i=gn(t.points,w,{startPoint:O});return I=i,i})).filter((function(t){return!!t})),"linearClosed"===w){for(var L,D=0;D<t.cache.length;D++){for(var j=t.cache[D],F=0;F<j.curves.length;F++)if(j.curves[F].defined){L=j.curves[F].p0;break}if(L)break}t.cache[t.cache.length-1]&&t.cache[t.cache.length-1].lineTo(L.x,L.y,!0)}}else{if(!M||!M.length)return t.cache=null,void t.clearUpdateShapeTag();t.cache=gn(P,w)}t.clearUpdateShapeTag()}if(Array.isArray(t.cache)){var N=t.attribute.segments.filter((function(t){return t.points.length}));if(1===N[0].points.length&&N.shift(),1===T){var z=!1;t.cache.forEach((function(r,a){z||(z=u.drawSegmentItem(e,r,!!d,!!v,g,m,N[a],[l,t.attribute],T,C,i,n,t,o,s))}))}else{var G=t.cache.reduce((function(t,e){return t+e.getLength()}),0),U=T*G,W=0,V=!1;t.cache.forEach((function(r,a){if(!V){var c=r.getLength(),h=(U-W)/c;W+=c,h>0&&(V=u.drawSegmentItem(e,r,!!d,!!v,g,m,N[a],[l,t.attribute],Se(h,1),C,i,n,t,o,s))}}))}}else this.drawSegmentItem(e,t.cache,!!d,!!v,g,m,t.attribute,l,T,C,i,n,t,o,s)}}}])}(Cc);function Th(t,e,i,n){if(!(e.length<2)){var r=n||{},a=r.offsetX,o=void 0===a?0:a,s=r.offsetY,u=void 0===s?0:s,l=r.offsetZ,c=void 0===l?0:l;r.mode;var h=e[0];t.moveTo(h.p0.x+o,h.p0.y+u,c);var d=(h=e[e.length-1]).p3||h.p1;t.lineTo(d.x+o,d.y+u,c),h=i[i.length-1],t.lineTo(h.p0.x+o,h.p0.y+u,c),d=(h=i[0]).p3||h.p1,t.lineTo(d.x+o,d.y+u,c),t.closePath()}}function Eh(t,e,i,n){var r=n||{},a=r.offsetX,o=void 0===a?0:a,s=r.offsetY,u=void 0===s?0:s,l=r.offsetZ,c=void 0===l?0:l,h=!0;e.forEach((function(e){e.defined?(h&&t.moveTo(e.p0.x+o,e.p0.y+u,c),xh(t,e,1,n),h=!1):h=!0})),h=!0;for(var d=i.length-1;d>=0;d--){var f=i[d];f.defined?(h&&t.lineTo(f.p0.x+o,f.p0.y+u,c),xh(t,f,1,n),h=!1):h=!0}t.closePath()}Ah=Sh([L()],Ah);var Ch=new fh,Bh=jc,Mh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Rh=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ph=function(t,e){return function(i,n){e(i,n,t)}};function Oh(t,e,i){switch(e){case"linear":default:return Qi(t,i);case"basis":return nn(t,i);case"monotoneX":return cn(t,i);case"monotoneY":return hn(t,i);case"step":return fn(t,.5,i);case"stepBefore":return fn(t,0,i);case"stepAfter":return fn(t,1,i);case"linearClosed":return pn(t,i)}}var Ih=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).areaRenderContribitions=t,n.numberType=jo,n.builtinContributions=[Ch,Bh],n.init(t),n}return c(i,t),u(i,[{key:"drawLinearAreaHighPerformance",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d){var f,v,p,g,y,m=t.attribute.points;if(!(m.length<2)){e.beginPath();var k=null!==(f=this.z)&&void 0!==f?f:0,b=m[0];e.moveTo(b.x+o,b.y+s,k);for(var _=1;_<m.length;_++){var x=m[_];e.lineTo(x.x+o,x.y+s,k)}for(var w=m.length-1;w>=0;w--){var S=m[w];e.lineTo((null!==(v=S.x1)&&void 0!==v?v:S.x)+o,(null!==(p=S.y1)&&void 0!==p?p:S.y)+s,k)}e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,o,s,!!r,!1,i,!1,u,l,h,null,{attribute:t.attribute});var A=t.attribute,T=A.x,E=void 0===T?0:T,C=A.x,B=void 0===C?0:C;if(!1!==i&&(h?h(e,t.attribute,u):r&&(e.setCommonStyle(t,t.attribute,E-o,B-s,u),e.fill())),this.afterRenderStep(t,e,o,s,!!r,!1,i,!1,u,l,h,null,{attribute:t.attribute}),n){var M=t.attribute.stroke,R=void 0===M?u&&u.stroke:M;if(_t(R)&&(R[0]||R[2])&&!1===R[1])if(e.beginPath(),R[0]){e.moveTo(b.x+o,b.y+s,k);for(var P=1;P<m.length;P++){var O=m[P];e.lineTo(O.x+o,O.y+s,k)}}else if(R[2]){var I=m[m.length-1];e.moveTo(I.x+o,I.y+s,k);for(var L=m.length-2;L>=0;L--){var D=m[L];e.lineTo((null!==(g=D.x1)&&void 0!==g?g:D.x)+o,(null!==(y=D.y1)&&void 0!==y?y:D.y)+s,k)}}d?d(e,t.attribute,u):(e.setStrokeStyle(t,t.attribute,E-o,B-s,u),e.stroke())}}}},{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l,c,h,d,f,v=this,p=Er(t,null==a?void 0:a.theme).area,g=t.attribute,y=g.fill,m=void 0===y?p.fill:y,k=g.stroke;void 0===k&&p.stroke;var b=g.fillOpacity,_=void 0===b?p.fillOpacity:b,x=g.z,w=void 0===x?p.z:x,S=g.strokeOpacity,A=void 0===S?p.strokeOpacity:S,T=this.valid(t,p,o,s);if(T){var E=T.doFill,C=T.doStroke,B=t.attribute,M=B.clipRange,R=void 0===M?p.clipRange:M,P=B.closePath,O=B.points,I=B.segments,L=t.attribute.curveType,D=void 0===L?p.curveType:L;if(P&&"linear"===D&&(D="linearClosed"),1===R&&!I&&!O.some((function(t){return!1===t.defined}))&&"linear"===D)return this.drawLinearAreaHighPerformance(t,e,!!m,C,_,A,i,n,p,r,a,o,s);if(t.shouldUpdateShape()){if(I&&I.length){for(var j,F,N,z=I.map((function(t,e){if(t.points.length<=1&&0===e)return t.points[0]&&(F={endX:t.points[0].x,endY:t.points[0].y}),null;1===e?j={x:F.endX,y:F.endY}:e>1&&(j.x=F.endX,j.y=F.endY);var i=Oh(t.points,D,{startPoint:j});return F=i,i})).filter((function(t){return!!t})),G=[],U=I.length-1;U>=0;U--){for(var W=I[U].points,V=[],H=W.length-1;H>=0;H--)V.push({x:null!==(u=W[H].x1)&&void 0!==u?u:W[H].x,y:null!==(l=W[H].y1)&&void 0!==l?l:W[H].y});if(0!==U){var X=I[U-1].points,Y=X[X.length-1];Y&&V.push({x:null!==(c=Y.x1)&&void 0!==c?c:Y.x,y:null!==(h=Y.y1)&&void 0!==h?h:Y.y})}V.length>1&&(N=Oh(V,"stepBefore"===D?"stepAfter":"stepAfter"===D?"stepBefore":D),G.unshift(N))}t.cacheArea=G.map((function(t,e){return{top:z[e],bottom:t}}))}else{if(!O||!O.length)return t.cacheArea=null,void t.clearUpdateShapeTag();for(var K=O,q=[],Z=O.length-1;Z>=0;Z--)q.push({x:null!==(d=O[Z].x1)&&void 0!==d?d:O[Z].x,y:null!==(f=O[Z].y1)&&void 0!==f?f:O[Z].y});var J=Oh(K,D),$=Oh(q,"stepBefore"===D?"stepAfter":"stepAfter"===D?"stepBefore":D);t.cacheArea={top:J,bottom:$}}t.clearUpdateShapeTag()}if(Array.isArray(t.cacheArea)){var Q=t.attribute.segments.filter((function(t){return t.points.length}));if(1===Q[0].points.length&&Q.shift(),1===R){var tt=!1;t.cacheArea.forEach((function(a,u){tt||(tt=v.drawSegmentItem(e,a,E,_,C,A,Q[u],[p,t.attribute],R,i,n,w,t,r,o,s))}))}else{var et=t.cacheArea.reduce((function(t,e){return t+e.top.getLength()}),0),it=R*et,nt=0,rt=!1;t.cacheArea.forEach((function(a,u){if(!rt){var l=a.top.getLength(),c=(it-nt)/l;nt+=l,c>0&&(rt=v.drawSegmentItem(e,a,E,_,C,A,Q[u],[p,t.attribute],Se(c,1),i,n,w,t,r,o,s))}}))}}else this.drawSegmentItem(e,t.cacheArea,E,_,C,A,t.attribute,p,R,i,n,w,t,r,o,s)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).area;this._draw(t,r,!1,i,n)}},{key:"drawSegmentItem",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d,f,v,p){var g=!1;return g=(g=g||this._drawSegmentItem(t,e,i,n,r,a,o,s,u,l,c,h,d,f,!1,v,p))||this._drawSegmentItem(t,e,i,n,r,a,o,s,u,l,c,h,d,f,!0,v,p)}},{key:"_drawSegmentItem",value:function(t,e,i,n,r,a,o,s,u,l,c,h,d,f,v,p,g){var y,m,k,b;if(e&&e.top&&e.bottom&&e.top.curves&&e.top.curves.length&&e.bottom.curves&&e.bottom.curves.length){var _=o.connectedType,x=o.connectedX,w=o.connectedY,S=o.connectedStyle,A=[];if(v&&(_t(s)?(_=null!==(y=null!=_?_:s[0].connectedType)&&void 0!==y?y:s[1].connectedType,x=null!==(m=null!=x?x:s[0].connectedX)&&void 0!==m?m:s[1].connectedX,w=null!==(k=null!=w?w:s[0].connectedY)&&void 0!==k?k:s[1].connectedY,S=null!==(b=null!=S?S:s[0].connectedStyle)&&void 0!==b?b:s[1].connectedStyle):(_=null!=_?_:s.connectedType,x=null!=x?x:s.connectedX,w=null!=w?w:s.connectedY,S=null!=S?S:s.connectedStyle),"connect"!==_&&"zero"!==_&&(_="none"),_t(s)?s.forEach((function(t){return A.push(t)})):A.push(s),A.push(o)),v&&"none"===_)return!1;t.beginPath();var T,E,C=d.attribute,B=C.points,M=C.segments,R=Ti.ROW;if(M){var P=M[M.length-1];E=M[0].points[0],T=P.points[P.points.length-1]}else E=B[0],T=B[B.length-1];var O=be(T.x-E.x),I=be(T.y-E.y);R=Number.isFinite(O+I)?O>I?Ti.ROW:Ti.COLUMN:Ti.ROW,function(t,e,i,n){var r,a=n||{},o=a.drawConnect,s=void 0!==o&&o,u=a.mode;if(!s||"none"!==(void 0===u?"none":u)){var l=e.top,c=e.bottom;if(l.curves.length===c.curves.length)if(i>=1){var h=[],d=[],f=!0;if(s){var v,p,g=!0,y=l.curves.length;l.curves.forEach((function(e,i){var r=c.curves[y-i-1],a=e,o=r;if(e.originP1===e.originP2)return v=e,void(p=r);if(v&&v.originP1===v.originP2&&(a=v,o=p),e.defined)g||(h.push(a),d.push(o),Th(t,h,d,n),h.length=0,d.length=0,g=!g);else{var s,u,l=e.originP1,f=e.originP2;l&&!1!==l.defined?(s=a,u=o):l&&!1!==f.defined&&(s=e,u=r),g?(g=!g,h.push(s||e),d.push(u||r)):s&&(g=!g,h.push(s||e),d.push(u||r),Th(t,h,d,n),h.length=0,d.length=0)}v=e})),Th(t,h,d,n)}else{for(var m=0,k=l.curves.length;m<k;m++){var b=l.curves[m];f!==b.defined?(f?(Eh(t,h,d,n),h.length=0,d.length=0):(h.push(b),d.push(c.curves[k-m-1])),f=!f):f&&(h.push(b),d.push(c.curves[k-m-1]))}Eh(t,h,d,n)}}else if(!(i<=0)){var _=(n||{}).direction,x=l.curves,w=null!==(r=x[x.length-1].p3)&&void 0!==r?r:x[x.length-1].p1,S=be(w.x-x[0].p0.x),A=be(w.y-x[0].p0.y);_=null!=_?_:S>A?Ti.ROW:Ti.COLUMN,Number.isFinite(S)||(_=Ti.COLUMN),Number.isFinite(A)||(_=Ti.ROW);for(var T,E,C=i*(_===Ti.ROW?S:A),B=0,M=!0,R=[],P=[],O=!0,I=0,L=l.curves.length;I<L;I++){var D=l.curves[I],j=D.getLength(_),F=(C-B)/j;if(F<0)break;if(B+=j,s){var N=c.curves[L-I-1],z=D,G=N;if(D.originP1===D.originP2){T=D,E=N;continue}if(T&&T.originP1===T.originP2&&(z=T,G=E),D.defined)O||(R.push(z),P.push(G),Th(t,R,P,n),R.length=0,P.length=0,O=!O);else{var U=D.originP1,W=D.originP2,V=void 0,H=void 0;U&&!1!==U.defined?(V=z,H=G):U&&!1!==W.defined&&(V=D,H=N),O?(O=!O,R.push(V||D),P.push(H||N)):V&&(O=!O,R.push(V||D),P.push(H||N),Th(t,R,P,n),R.length=0,P.length=0)}T=D}else{var X=null,Y=null;M!==D.defined?(M?(Eh(t,R,P,n),R.length=0,P.length=0):(X=D,Y=c.curves[L-I-1]),M=!M):M&&(X=D,Y=c.curves[L-I-1]),X&&Y&&(F<1&&(X=X.p2&&X.p3?Vi(X,F)[0]:Xi(X,F)[0],Y=Y.p2&&Y.p3?Vi(Y,1-F)[1]:Xi(Y,1-F)[1]),X.defined=M,Y.defined=M,R.push(X),P.push(Y)),X=null,Y=null}}s?Th(t,R,P,n):Eh(t,R,P,n)}}}(t.camera?t:t.nativeContext,e,u,{offsetX:l,offsetY:c,offsetZ:h,direction:R,drawConnect:v,mode:_,zeroX:x,zeroY:w}),this.beforeRenderStep(d,t,l,c,!!n,!1,i,!1,s,f,p,null,{attribute:o}),t.setShadowBlendStyle&&t.setShadowBlendStyle(d,o,s);var L=o.x,D=void 0===L?0:L,j=o.x,F=void 0===j?0:j;if(!1!==i&&(p?p(t,o,s):n&&(t.setCommonStyle(d,v?S:o,D-l,F-c,v?A:s),t.fill())),this.afterRenderStep(d,t,l,c,!!n,!1,i,!1,s,f,p,null,{attribute:o}),!1!==r)if(g)g(t,o,s);else{var N=o.stroke,z=void 0===N?s&&s[1]&&s[1].stroke:N;_t(z)&&(z[0]||z[2])&&!1===z[1]&&(t.beginPath(),wh(t.camera?t:t.nativeContext,z[0]?e.top:e.bottom,u,R===Ti.ROW?"x":"y",{offsetX:l,offsetY:c,offsetZ:h,drawConnect:v,mode:_,zeroX:x,zeroY:w})),t.setStrokeStyle(d,v?S:o,D-l,F-c,v?A:s),t.stroke()}return!1}}}])}(Cc);Ih=Mh([L(),Ph(0,O($)),Ph(0,D(Cs)),Rh("design:paramtypes",[Object])],Ih);var Lh=zc,Dh=jc,jh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Fh=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Nh=function(t,e){return function(i,n){e(i,n,t)}},zh=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).pathRenderContribitions=t,n.numberType=Wo,n.builtinContributions=[Dh,Lh],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l,c,h=null!==(u=this.tempTheme)&&void 0!==u?u:Er(t,null==a?void 0:a.theme).path,d=t.attribute,f=d.x,v=void 0===f?h.x:f,p=d.y,g=void 0===p?h.y:p,y=null!==(l=this.z)&&void 0!==l?l:0,m=this.valid(t,h,o,s);if(m){var k=m.fVisible,b=m.sVisible,_=m.doFill,x=m.doStroke;if(e.beginPath(),t.pathShape)Ni(t.pathShape.commandList,e,i,n,1,1,y);else Ni((null!==(c=t.attribute.path)&&void 0!==c?c:h.path).commandList,e,i,n,1,1,y);e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),this.beforeRenderStep(t,e,i,n,_,x,k,b,h,r,o,s),x&&(s?s(e,t.attribute,h):b&&(e.setStrokeStyle(t,t.attribute,v-i,g-n,h),e.stroke())),_&&(o?o(e,t.attribute,h):k&&(e.setCommonStyle(t,t.attribute,v-i,g-n,h),e.fill())),this.afterRenderStep(t,e,i,n,_,x,k,b,h,r,o,s)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).path;this.tempTheme=r,this._draw(t,r,!1,i,n),this.tempTheme=null}}])}(Cc);zh=jh([L(),Nh(0,O($)),Nh(0,D(Ps)),Fh("design:paramtypes",[Object])],zh);var Gh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Uh=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Wh=function(t,e){return function(i,n){e(i,n,t)}},Vh=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).rectRenderContribitions=t,n.type="rect",n.numberType=Xo,n.builtinContributions=[nh,ah,rh],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l=null!==(u=this.tempTheme)&&void 0!==u?u:Er(t,null==a?void 0:a.theme).rect,c=t.attribute,h=c.fill,d=void 0===h?l.fill:h,f=c.background,v=c.stroke,p=void 0===v?l.stroke:v,g=c.cornerRadius,y=void 0===g?l.cornerRadius:g,m=c.opacity,k=void 0===m?l.opacity:m,b=c.fillOpacity,_=void 0===b?l.fillOpacity:b,x=c.lineWidth,w=void 0===x?l.lineWidth:x,S=c.strokeOpacity,A=void 0===S?l.strokeOpacity:S,T=c.visible,E=void 0===T?l.visible:T,C=c.x1,B=c.y1,M=c.x,R=void 0===M?l.x:M,P=c.y,O=void 0===P?l.y:P,I=t.attribute,L=I.width,D=I.height,j=ms(k,_,L=(null!=L?L:C-R)||0,D=(null!=D?D:B-O)||0,d),F=bs(k,A,L,D),N=ps(d,f),z=gs(p,w);if(t.valid&&E&&(N||z)&&(j||F||o||s||f)){0===y||_t(y)&&y.every((function(t){return 0===t}))?(e.beginPath(),e.rect(i,n,L,D)):(e.beginPath(),$c(e,i,n,L,D,y));var G={doFill:N,doStroke:z};e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),this.beforeRenderStep(t,e,i,n,N,z,j,F,l,r,o,s,G),G.doFill&&(o?o(e,t.attribute,l):j&&(e.setCommonStyle(t,t.attribute,R-i,O-n,l),e.fill())),G.doStroke&&(s?s(e,t.attribute,l):F&&(e.setStrokeStyle(t,t.attribute,R-i,O-n,l),e.stroke())),this.afterRenderStep(t,e,i,n,N,z,j,F,l,r,o,s)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).rect;this.tempTheme=r,this._draw(t,r,!1,i,n),this.tempTheme=null}}])}(Cc);Vh=Gh([L(),Wh(0,O($)),Wh(0,D(Is)),Uh("design:paramtypes",[Object])],Vh);var Hh=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Xh=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yh=function(t,e){return function(i,n){e(i,n,t)}},Kh=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).symbolRenderContribitions=t,n.numberType=qo,n.builtinContributions=[ch,dh,hh],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l=Er(t,null==a?void 0:a.theme).symbol,c=t.attribute,h=c.size,d=void 0===h?l.size:h,f=c.x,v=void 0===f?l.x:f,p=c.y,g=void 0===p?l.y:p,y=c.scaleX,m=void 0===y?l.scaleX:y,k=c.scaleY,b=void 0===k?l.scaleY:k,_=this.valid(t,l,o,s);if(_){var x=_.fVisible,w=_.sVisible,S=_.doFill,A=_.doStroke,T=t.getParsedPath();if(T){var E=t.attribute.keepDirIn3d,C=void 0===E?l.keepDirIn3d:E,B=null!==(u=this.z)&&void 0!==u?u:0;if(e.beginPath(),C&&e.camera&&e.project){var M=e.project(i,n,B),R=e.camera;e.camera=null,!1===T.draw(e,_t(d)?[d[0]*m,d[1]*b]:d*m,M.x,M.y,void 0,(function(r,a){var u,c,h;if(t._parsedPath.svgCache){var d=Object.assign({},a);d.fill=null!==(u=a.fill)&&void 0!==u?u:t.attribute.fill,d.opacity=null!==(c=a.fill)&&void 0!==c?c:t.attribute.opacity,d.fillOpacity=t.attribute.fillOpacity,d.stroke=null!==(h=a.stroke)&&void 0!==h?h:t.attribute.stroke,a=d}a.fill&&(o?o(e,t.attribute,l):(e.setCommonStyle(t,a,v-i,g-n,l),e.fill())),a.stroke&&(s?s(e,t.attribute,l):(e.setStrokeStyle(t,a,(v-i)/m,(g-n)/b,l),e.stroke()))}))&&e.closePath(),e.camera=R}else!1===T.draw(e,d,i,n,B,(function(r,a){var u,c,h;if(t._parsedPath.svgCache){var d=Object.assign({},a);d.fill=null!==(u=a.fill)&&void 0!==u?u:t.attribute.fill,d.opacity=null!==(c=a.opacity)&&void 0!==c?c:t.attribute.opacity,d.fillOpacity=t.attribute.fillOpacity,d.stroke=null!==(h=a.stroke)&&void 0!==h?h:t.attribute.stroke,a=d}a.fill&&(o?o(e,t.attribute,l):(e.setCommonStyle(t,a,v-i,g-n,l),e.fill())),a.stroke&&(s?s(e,t.attribute,l):(e.setStrokeStyle(t,a,(v-i)/m,(g-n)/b,l),e.stroke()))}))&&e.closePath();e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),this.beforeRenderStep(t,e,i,n,S,A,x,w,l,r,o,s),S&&!T.isSvg&&(o?o(e,t.attribute,l):x&&(e.setCommonStyle(t,t.attribute,v-i,g-n,l),e.fill())),A&&!T.isSvg&&(s?s(e,t.attribute,l):w&&(e.setStrokeStyle(t,t.attribute,(v-i)/m,(g-n)/b,l),e.stroke())),this.afterRenderStep(t,e,i,n,S,A,x,w,l,r,o,s)}}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).symbol;this._draw(t,r,!1,i,n)}}])}(Cc);Kh=Hh([L(),Yh(0,O($)),Yh(0,D(Ls)),Xh("design:paramtypes",[Object])],Kh);var qh=new(function(){return u((function t(){o(this,t),this.pools=[];for(var e=0;e<10;e++)this.pools.push(new De)}),[{key:"allocate",value:function(t,e,i,n){if(!this.pools.length)return(new De).setValue(t,e,i,n);var r=this.pools.pop();return r.x1=t,r.y1=e,r.x2=i,r.y2=n,r}},{key:"allocateByObj",value:function(t){if(!this.pools.length)return new De(t);var e=this.pools.pop();return e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e}},{key:"free",value:function(t){this.pools.push(t)}},{key:"length",get:function(){return this.pools.length}},{key:"release",value:function(){this.pools=[]}}])}()),Zh=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).time=Ci.beforeFillStroke,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d,f,v,p,g,y,m,k,b,_,x,w=t.attribute,S=w.backgroundMode,A=void 0===S?u.backgroundMode:S,T=w.backgroundFit,E=void 0===T?u.backgroundFit:T,C=t.attribute.background;if(C){var B,M=function(){"richtext"===t.type&&(e.restore(),e.save(),x&&e.setTransformFromMatrix(x,!0,1))};"richtext"===t.type&&(x=e.currentMatrix.clone(),e.restore(),e.save(),e.setTransformForCurrent());var R=gt(C)&&C.background,P=t.transMatrix.onlyTranslate();if(R){var O=t.AABBBounds,I=(null!==(d=C.x)&&void 0!==d?d:O.x1)+(null!==(f=C.dx)&&void 0!==f?f:0),L=(null!==(v=C.y)&&void 0!==v?v:O.y1)+(null!==(p=C.dy)&&void 0!==p?p:0),D=null!==(g=C.width)&&void 0!==g?g:O.width(),j=null!==(y=C.height)&&void 0!==y?y:O.height();if(B=qh.allocate(I,L,I+D,L+j),C=C.background,!P){var F=B.width(),N=B.height();B.set((null!==(m=C.x)&&void 0!==m?m:0)+(null!==(k=C.dx)&&void 0!==k?k:0),(null!==(b=C.y)&&void 0!==b?b:0)+(null!==(_=C.dy)&&void 0!==_?_:0),F,N)}}else B=t.AABBBounds,P||(B=Tc(Object.assign(Object.assign({},t.attribute),{angle:0,scaleX:1,scaleY:1,x:0,y:0,dx:0,dy:0})).clone());if(t.backgroundImg&&t.resources){var z=t.resources.get(C);if("success"!==z.state||!z.data)return void M();e.highPerformanceSave(),P&&e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.setCommonStyle(t,t.attribute,i,n,u),this.doDrawImage(e,z.data,B,A,E),e.highPerformanceRestore(),e.setTransformForCurrent()}else{var G=t.attribute.backgroundCornerRadius;e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,i,n,u),e.fillStyle=C,G?($c(e,B.x1,B.y1,B.width(),B.height(),G),e.fill()):e.fillRect(B.x1,B.y1,B.width(),B.height()),e.highPerformanceRestore()}R&&qh.free(B),M()}}}])}(Dc),Jh=new Zh,$h=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Qh=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},td=function(t,e){return function(i,n){e(i,n,t)}},ed=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).textRenderContribitions=t,n.numberType=Zo,n.builtinContributions=[Jh],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l,c,h=this,d=Er(t,null==a?void 0:a.theme).text,f=t.attribute;f.text;var v=f.underline,p=void 0===v?d.underline:v,g=f.lineThrough,y=void 0===g?d.lineThrough:g,m=f.keepDirIn3d,k=void 0===m?d.keepDirIn3d:m,b=f.direction,_=void 0===b?d.direction:b,x=f.whiteSpace;void 0===x&&d.whiteSpace;var w=f.fontSize,S=void 0===w?d.fontSize:w,A=f.verticalMode,T=void 0===A?d.verticalMode:A,E=f.x,C=void 0===E?d.x:E,B=f.y,M=void 0===B?d.y:B,R=t.attribute,P=R.textAlign,O=void 0===P?d.textAlign:P,I=R.textBaseline,L=void 0===I?d.textBaseline:I;if(!T&&"vertical"===_){var D=O;O=null!==(u=t.getBaselineMapAlign()[L])&&void 0!==u?u:"left",L=null!==(l=t.getAlignMapBaseline()[D])&&void 0!==l?l:"top"}var j=null!==(c=ka(t.attribute.lineHeight,S))&&void 0!==c?c:S,F=this.valid(t,d,o,s);if(F){var N=F.fVisible,z=F.sVisible,G=F.doFill,U=F.doStroke,W=!k,V=this.z||0;e.beginPath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,d),this.beforeRenderStep(t,e,i,n,G,U,N,z,d,r,o,s),W&&this.transformUseContext2d(t,d,V,e);var H=function(r,a,u,l){var c=i+a,f=n+u;if(l){e.highPerformanceSave(),c+=S;var v=vc.allocate(1,0,0,1,0,0);v.rotateByCenter(Math.PI/2,c,f),e.transformFromMatrix(v,!0),vc.free(v)}U&&(s?s(e,t.attribute,d):z&&(e.setStrokeStyle(t,t.attribute,C-i,M-n,d),e.strokeText(r,c,f,V))),G&&(o?o(e,t.attribute,d):N&&(e.setCommonStyle(t,t.attribute,C-i,M-n,d),e.fillText(r,c,f,V),h.drawUnderLine(p,y,t,c,f,V,d,e))),l&&(e.highPerformanceRestore(),e.setTransformForCurrent())};if(t.isMultiLine)if(e.setTextStyleWithoutAlignBaseline(t.attribute,d,V),"horizontal"===_){var X=t.multilineLayout;if(!X)return void e.highPerformanceRestore();var Y=X.bbox,K=Y.xOffset,q=Y.yOffset;U&&(s?s(e,t.attribute,d):z&&(e.setStrokeStyle(t,t.attribute,C-i,M-n,d),X.lines.forEach((function(t){e.strokeText(t.str,(t.leftOffset||0)+K+i,(t.topOffset||0)+q+n,V)})))),G&&(o?o(e,t.attribute,d):N&&(e.setCommonStyle(t,t.attribute,C-i,M-n,d),X.lines.forEach((function(r){var a,o;e.fillText(r.str,(r.leftOffset||0)+K+i,(r.topOffset||0)+q+n,V),h.drawMultiUnderLine(p,y,t,(r.leftOffset||0)+K+i,(r.topOffset||0)+q+n-(o=S,"top"===(a="bottom")?Math.ceil(.79*o):"middle"===a?Math.round(.3*o):"bottom"===a?Math.round(-.21*o):0)-.05*S,V,r.width,d,e)}))))}else{t.tryUpdateAABBBounds();var Z=t.cache.verticalList;e.textAlign="left",e.textBaseline="top";var J=j*Z.length,$=0;Z.forEach((function(t){var e=t.reduce((function(t,e){return t+(e.width||0)}),0);$=we(e,$)}));var Q=0,tt=0;"bottom"===L?tt=-J:"middle"===L&&(tt=-J/2),"center"===O?Q-=$/2:"right"===O&&(Q-=$),Z.forEach((function(t,e){var i=t.reduce((function(t,e){return t+(e.width||0)}),0),n=$-i,r=Q;"center"===O?r+=n/2:"right"===O&&(r+=n),t.forEach((function(t){var i=t.text,n=t.width,a=t.direction;H(i,J-(e+1)*j+tt,r,a),r+=n}))}))}else if("horizontal"===_){e.setTextStyle(t.attribute,d,V);var et=t.clipedText,it=0;j!==S&&("top"===L?it=(j-S)/2:"middle"===L||"bottom"===L&&(it=-(j-S)/2)),H(et,0,it,0)}else{t.tryUpdateAABBBounds();var nt=t.cache;if(nt){e.setTextStyleWithoutAlignBaseline(t.attribute,d,V);var rt=nt.verticalList,at=0,ot=rt[0].reduce((function(t,e){return t+(e.width||0)}),0),st=0;"bottom"===L?st=-j:"middle"===L&&(st=-j/2),"center"===O?at-=ot/2:"right"===O&&(at-=ot),e.textAlign="left",e.textBaseline="top",rt[0].forEach((function(t){var e=t.text,i=t.width,n=t.direction;H(e,st,at,n),at+=i}))}}W&&this.restoreTransformUseContext2d(t,d,V,e),this.afterRenderStep(t,e,i,n,G,U,N,z,d,r,o,s)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).text,a=t.attribute.keepDirIn3d,o=!(void 0===a?r.keepDirIn3d:a);this._draw(t,r,o,i,n)}},{key:"drawUnderLine",value:function(t,e,i,n,r,a,o,s){if(!(e+t<=0)){var u=i.attribute,l=u.textAlign,c=void 0===l?o.textAlign:l,h=u.textBaseline,d=void 0===h?o.textBaseline:h,f=u.fontSize,v=void 0===f?o.fontSize:f,p=u.fill,g=void 0===p?o.fill:p,y=u.opacity,m=void 0===y?o.opacity:y,k=u.underlineOffset,b=void 0===k?o.underlineOffset:k,_=u.underlineDash,x=void 0===_?o.underlineDash:_,w=u.fillOpacity,S=void 0===w?o.fillOpacity:w,A=i.clipedWidth,T=Us(c,A),E=Ws(d,v,v),C={lineWidth:0,stroke:g,opacity:m,strokeOpacity:S};if(t){C.lineWidth=t,s.setStrokeStyle(i,C,n,r,o),x&&s.setLineDash(x),s.beginPath();var B=r+E+v+b;s.moveTo(n+T,B,a),s.lineTo(n+T+A,B,a),s.stroke()}if(e){C.lineWidth=e,s.setStrokeStyle(i,C,n,r,o),s.beginPath();var M=r+E+v/2;s.moveTo(n+T,M,a),s.lineTo(n+T+A,M,a),s.stroke()}}}},{key:"drawMultiUnderLine",value:function(t,e,i,n,r,a,o,s,u){if(!(e+t<=0)){var l=i.attribute,c=l.fontSize,h=void 0===c?s.fontSize:c,d=l.fill,f=void 0===d?s.fill:d,v=l.opacity,p=void 0===v?s.opacity:v,g=l.underlineOffset,y=void 0===g?s.underlineOffset:g,m=l.underlineDash,k=void 0===m?s.underlineDash:m,b=l.fillOpacity,_=void 0===b?s.fillOpacity:b,x=Ws("alphabetic",h,h),w={lineWidth:0,stroke:f,opacity:p,strokeOpacity:_},S=-3;if(t){w.lineWidth=t,u.setStrokeStyle(i,w,n,r,s),k&&u.setLineDash(k),u.beginPath();var A=r+x+h+S+y;u.moveTo(n+0,A,a),u.lineTo(n+0+o,A,a),u.stroke()}if(S=-1,e){w.lineWidth=e,u.setStrokeStyle(i,w,n,r,s),u.beginPath();var T=r+x+h/2+S;u.moveTo(n+0,T,a),u.lineTo(n+0+o,T,a),u.stroke()}}}}])}(Cc);function id(t,e,i,n){t.moveTo(e[0].x+i,e[0].y+n);for(var r=1;r<e.length;r++)t.lineTo(e[r].x+i,e[r].y+n)}function nd(t,e){return Math.sqrt(t*t+e*e)}function rd(t,e,i,n,r){var a=e/i;return{x:t.x-n*a,y:t.y-r*a}}ed=$h([L(),td(0,O($)),td(0,D(Ds)),Qh("design:paramtypes",[Object])],ed);var ad=zc,od=jc,sd=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ud=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ld=function(t,e){return function(i,n){e(i,n,t)}},cd=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).polygonRenderContribitions=t,n.numberType=Vo,n.builtinContributions=[od,ad],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u=Er(t,null==a?void 0:a.theme).polygon,l=t.attribute,c=l.points,h=void 0===c?u.points:c,d=l.cornerRadius,f=void 0===d?u.cornerRadius:d,v=l.x,p=void 0===v?u.x:v,g=l.y,y=void 0===g?u.y:g,m=l.closePath,k=void 0===m?u.closePath:m,b=this.valid(t,u,o,s);if(b){var _=b.fVisible,x=b.sVisible,w=b.doFill,S=b.doStroke;e.beginPath(),f<=0||_t(f)&&f.every((function(t){return 0===t}))?id(e.camera?e:e.nativeContext,h,i,n):function(t,e,i,n,r){var a,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(e.length<3)id(t,e,i,n);else{var s=0,u=e.length-1;o||(s+=1,u-=1,t.moveTo(e[0].x+i,e[0].y+n));for(var l=s;l<=u;l++){var c=e[0===l?u:(l-1)%e.length],h=e[l%e.length],d=e[(l+1)%e.length],f=h.x-c.x,v=h.y-c.y,p=h.x-d.x,g=h.y-d.y,y=(Math.atan2(v,f)-Math.atan2(g,p))/2,m=Math.abs(Math.tan(y)),k=Array.isArray(r)?null!==(a=r[l%e.length])&&void 0!==a?a:0:r,b=k/m,_=nd(f,v),x=nd(p,g),w=Math.min(_,x);b>w&&(b=w,k=w*m);var S=rd(h,b,_,f,v),A=rd(h,b,x,p,g),T=2*h.x-S.x-A.x,E=2*h.y-S.y-A.y,C=nd(T,E),B=rd(h,nd(b,k),C,T,E),M=Math.atan2(S.y-B.y,S.x-B.x),R=Math.atan2(A.y-B.y,A.x-B.x),P=R-M;P<0&&(M=R,P=-P),P>Math.PI&&(P-=Math.PI),0===l?t.moveTo(S.x+i,S.y+n):t.lineTo(S.x+i,S.y+n),P&&t.arcTo(h.x+i,h.y+n,A.x+i,A.y+n,k),t.lineTo(A.x+i,A.y+n)}o||t.lineTo(e[u+1].x+i,e[u+1].y+n)}}(e.camera?e:e.nativeContext,h,i,n,f,k),k&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,i,n,w,S,_,x,u,r,o,s),w&&(o?o(e,t.attribute,u):_&&(e.setCommonStyle(t,t.attribute,p-i,y-n,u),e.fill())),S&&(s?s(e,t.attribute,u):x&&(e.setStrokeStyle(t,t.attribute,p-i,y-n,u),e.stroke())),this.afterRenderStep(t,e,i,n,w,S,_,x,u,r,o,s)}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).polygon;this._draw(t,r,!1,i,n)}}])}(Cc);cd=sd([L(),ld(0,O($)),ld(0,D(Os)),ud("design:paramtypes",[Object])],cd);var hd=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},dd=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},fd=function(t,e){return function(i,n){e(i,n,t)}},vd=["","repeat-x","repeat-y","repeat"],pd=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).imageRenderContribitions=t,n.numberType=Go,n.builtinContributions=[uh,lh],n.init(t),n}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u=Er(t).image,l=t.attribute,c=l.width,h=void 0===c?u.width:c,d=l.height,f=void 0===d?u.height:d,v=l.repeatX,p=void 0===v?u.repeatX:v,g=l.repeatY,y=void 0===g?u.repeatY:g,m=l.x,k=void 0===m?u.x:m,b=l.y,_=void 0===b?u.y:b,x=l.cornerRadius,w=void 0===x?u.cornerRadius:x,S=l.image,A=this.valid(t,u,o);if(A){var T=A.fVisible,E=A.sVisible,C=A.doFill,B=A.doStroke;if(e.setShadowBlendStyle&&e.setShadowBlendStyle(t,u),this.beforeRenderStep(t,e,i,n,C,!1,T,!1,u,r,o),C)if(o)o(e,t.attribute,u);else if(T){if(!S||!t.resources)return;var M=t.resources.get(S);if("success"!==M.state)return;var R=!1;0===w||_t(w)&&w.every((function(t){return 0===t}))||(e.beginPath(),$c(e,i,n,h,f,w),e.save(),e.clip(),R=!0),e.setCommonStyle(t,t.attribute,i,n,u);var P=0;if("repeat"===p&&(P|=1),"repeat"===y&&(P|=2),P){var O=e.createPattern(M.data,vd[P]);e.fillStyle=O,e.translate(i,n,!0),e.fillRect(0,0,h,f),e.translate(-i,-n,!0)}else e.drawImage(M.data,i,n,h,f);R&&e.restore()}B&&(s?s(e,t.attribute,u):E&&(e.setStrokeStyle(t,t.attribute,k-i,_-n,u),e.stroke())),this.afterRenderStep(t,e,i,n,C,!1,T,!1,u,r,o)}}},{key:"draw",value:function(t,e,i){var n=t.attribute.image;if(n&&t.resources){var r=t.resources.get(n);if("loading"===r.state&&bt(n))no.improveImageLoading(n);else if("success"===r.state)if(e.drawParams.context){var a=Er(t).image;this._draw(t,a,!1,i)}}}}])}(Cc);pd=hd([L(),fd(0,O($)),fd(0,D(Rs)),dd("design:paramtypes",[Object])],pd);var gd=Symbol.for("IncrementalDrawContribution"),yd=Symbol.for("ArcRender"),md=Symbol.for("Arc3dRender"),kd=Symbol.for("AreaRender"),bd=Symbol.for("CircleRender"),_d=Symbol.for("GraphicRender"),xd=Symbol.for("GroupRender"),wd=Symbol.for("LineRender"),Sd=Symbol.for("PathRender"),Ad=Symbol.for("PolygonRender"),Td=Symbol.for("RectRender"),Ed=Symbol.for("Rect3DRender"),Cd=Symbol.for("SymbolRender"),Bd=Symbol.for("TextRender"),Md=Symbol.for("RichTextRender"),Rd=Symbol.for("Pyramid3dRender"),Pd=Symbol.for("GlyphRender"),Od=Symbol.for("ImageRender"),Id=Symbol.for("DrawContribution"),Ld=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Dd=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},jd=Symbol.for("DrawItemInterceptor"),Fd=new De,Nd=new De,zd=function(){return u((function t(){o(this,t),this.order=1}),[{key:"afterDrawItem",value:function(t,e,i,n,r){return(t.attribute.shadowRootIdx>0||!t.attribute.shadowRootIdx)&&this.drawItem(t,e,i,n,r),!1}},{key:"beforeDrawItem",value:function(t,e,i,n,r){return t.attribute.shadowRootIdx<0&&this.drawItem(t,e,i,n,r),!1}},{key:"drawItem",value:function(t,e,i,n,r){if(!t.shadowRoot)return!1;var a=i.context;if(a.highPerformanceSave(),a.transformFromMatrix(t.transMatrix,!0),n.dirtyBounds&&n.backupDirtyBounds){Fd.copy(n.dirtyBounds),Nd.copy(n.backupDirtyBounds);var o=t.globalTransMatrix.getInverse();n.dirtyBounds.copy(n.backupDirtyBounds).transformWithMatrix(o),n.backupDirtyBounds.copy(n.dirtyBounds)}return n.renderGroup(t.shadowRoot,i,t.parent.globalTransMatrix),a.highPerformanceRestore(),n.dirtyBounds&&n.backupDirtyBounds&&(n.dirtyBounds.copy(Fd),n.backupDirtyBounds.copy(Nd)),!0}}])}(),Gd=function(){return u((function t(){o(this,t),this.order=1}),[{key:"afterDrawItem",value:function(t,e,i,n,r){return t.attribute._debug_bounds&&this.drawItem(t,e,i,n,r),!1}},{key:"drawItem",value:function(t,e,i,n,r){if(!t.attribute._debug_bounds)return!1;var a=i.context;a.highPerformanceSave(),t.parent&&a.setTransformFromMatrix(t.parent.globalTransMatrix,!0),t.glyphHost&&t.glyphHost.parent&&a.setTransformFromMatrix(t.glyphHost.parent.globalTransMatrix,!0);var o=t.AABBBounds;return!0!==t.attribute._debug_bounds&&t.attribute._debug_bounds(a,t),a.strokeRect(o.x1,o.y1,o.width(),o.height()),a.highPerformanceRestore(),!0}}])}(),Ud=function(){return u((function t(){o(this,t),this.order=1,this.interceptors=[new zd,new Vd,new Wd,new Gd]}),[{key:"afterDrawItem",value:function(t,e,i,n,r){for(var a=0;a<this.interceptors.length;a++)if(this.interceptors[a].afterDrawItem&&this.interceptors[a].afterDrawItem(t,e,i,n,r))return!0;return!1}},{key:"beforeDrawItem",value:function(t,e,i,n,r){if((!t.in3dMode||i.in3dInterceptor)&&!t.shadowRoot&&!(t.baseGraphic||t.attribute.globalZIndex||t.interactiveGraphic))return!1;for(var a=0;a<this.interceptors.length;a++)if(this.interceptors[a].beforeDrawItem&&this.interceptors[a].beforeDrawItem(t,e,i,n,r))return!0;return!1}}])}();Ud=Ld([L(),Dd("design:paramtypes",[])],Ud);var Wd=function(){return u((function t(){o(this,t),this.order=1}),[{key:"beforeDrawItem",value:function(t,e,i,n,r){return!this.processing&&(t.baseGraphic?this.beforeDrawInteractive(t,e,i,n,r):this.beforeSetInteractive(t,e,i,n,r))}},{key:"beforeSetInteractive",value:function(t,e,i,n,r){var a=t.interactiveGraphic;if(t.attribute.globalZIndex){a||(a=t.clone(),t.interactiveGraphic=a,a.baseGraphic=t),a.setAttributes({globalZIndex:0,zIndex:t.attribute.globalZIndex},!1,{skipUpdateCallback:!0}),i.stage.tryInitInteractiveLayer();var o=i.stage.getLayer("_builtin_interactive");return o&&this.getShadowRoot(o).add(a),!0}if(a){i.stage.tryInitInteractiveLayer();var s=i.stage.getLayer("_builtin_interactive");s&&this.getShadowRoot(s).removeChild(a),t.interactiveGraphic=null,a.baseGraphic=null}return!1}},{key:"beforeDrawInteractive",value:function(t,e,i,n,r){var a=t.baseGraphic;if(!a.stage){var o=i.stage.getLayer("_builtin_interactive");return o&&this.getShadowRoot(o).removeChild(t),!0}if(a){this.processing=!0;var s=i.context;return s.highPerformanceSave(),s.setTransformFromMatrix(a.parent.globalTransMatrix,!0),a.isContainer?n.renderGroup(a,i,a.parent.globalTransMatrix):n.renderItem(a,i),s.highPerformanceRestore(),this.processing=!1,!0}return!1}},{key:"getShadowRoot",value:function(t){var e,i=t.getElementById("_interactive_group");return i||((i=Ac.CreateGraphic("group",{})).id="_interactive_group",t.add(i)),null!==(e=i.shadowRoot)&&void 0!==e?e:i.attachShadow()}}])}(),Vd=function(){return u((function t(){o(this,t),this.order=1}),[{key:"beforeDrawItem",value:function(t,e,i,n,r){if(!t.in3dMode||i.in3dInterceptor)return!1;i.in3dInterceptor=!0;var a=e.drawParams,o=a.context,s=a.stage;o.canvas,o.save(),this.initCanvasCtx(o),o.camera=s.camera;var u=o.currentMatrix;u.a/=o.dpr,u.b/=o.dpr,u.c/=o.dpr,u.d/=o.dpr,u.e/=o.dpr,u.f/=o.dpr;var l=pc.allocate();bc(l,u);var c=o.modelMatrix;if(c){if(l){var h=pc.allocate();o.modelMatrix=_c(h,c,l)}}else o.modelMatrix=l;if(o.setTransform(1,0,0,1,0,0,!0),t.isContainer){var d=!1,f=!1;if(t.forEachChildren((function(t){return!(d=t.numberType===Do)})),t.forEachChildren((function(t){return!(f=!!t.findFace)})),d){var v=t.getChildren(),p=y(v);p.sort((function(t,e){for(var i,n,r,a,o=((null!==(i=t.attribute.startAngle)&&void 0!==i?i:0)+(null!==(n=t.attribute.endAngle)&&void 0!==n?n:0))/2,s=((null!==(r=e.attribute.startAngle)&&void 0!==r?r:0)+(null!==(a=e.attribute.endAngle)&&void 0!==a?a:0))/2;o<0;)o+=ke;for(;s<0;)s+=ke;return s-o})),p.forEach((function(t){t._next=null,t._prev=null})),t.removeAllChild(),t.update(),p.forEach((function(e){t.appendChild(e)}));var g=t.parent.globalTransMatrix;i.hack_pieFace="outside",n.renderGroup(t,i,g),i.hack_pieFace="inside",n.renderGroup(t,i,g),i.hack_pieFace="top",n.renderGroup(t,i,g),t.removeAllChild(),v.forEach((function(t){t._next=null,t._prev=null})),v.forEach((function(e){t.appendChild(e)}))}else if(f){var m=t.getChildren(),k=m.map((function(t){return{ave_z:t.findFace().vertices.map((function(e){var i;return o.view(e[0],e[1],null!==(i=e[2]+t.attribute.z)&&void 0!==i?i:0)[2]})).reduce((function(t,e){return t+e}),0),g:t}}));k.sort((function(t,e){return e.ave_z-t.ave_z})),t.removeAllChild(),k.forEach((function(t){t.g._next=null,t.g._prev=null})),t.update(),k.forEach((function(e){t.add(e.g)})),n.renderGroup(t,i,t.parent.globalTransMatrix,!0),t.removeAllChild(),m.forEach((function(t){t._next=null,t._prev=null})),t.update(),m.forEach((function(e){t.add(e)}))}else n.renderGroup(t,i,t.parent.globalTransMatrix)}else n.renderItem(t,i);return o.camera=null,o.restore(),o.modelMatrix!==c&&pc.free(o.modelMatrix),o.modelMatrix=c,i.in3dInterceptor=!1,!0}},{key:"initCanvasCtx",value:function(t){t.setTransformForCurrent()}}])}(),Hd=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Xd=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yd=function(t,e){return function(i,n){e(i,n,t)}},Kd=Symbol.for("RenderService"),qd=function(){return u((function t(e){o(this,t),this.drawContribution=e}),[{key:"prepare",value:function(t){var e=this;t&&this.renderTreeRoots.forEach((function(i){e._prepare(i,t)}))}},{key:"_prepare",value:function(t,e){var i=this;t.forEachChildren((function(t){i._prepare(t,e)})),t.update({bounds:e,trans:!0})}},{key:"prepareRenderList",value:function(){}},{key:"beforeDraw",value:function(t){}},{key:"draw",value:function(t){this.drawContribution.draw(this,Object.assign({},this.drawParams))}},{key:"afterDraw",value:function(t){this.drawContribution.afterDraw&&this.drawContribution.afterDraw(this,Object.assign({},this.drawParams))}},{key:"render",value:function(t,e){this.renderTreeRoots=t,this.drawParams=e;var i=e.updateBounds;this.prepare(i),this.prepareRenderList(),this.beforeDraw(e),this.draw(e),this.afterDraw(e),this.drawParams=null}}])}();qd=Hd([L(),Yd(0,O(Id)),Xd("design:paramtypes",[Object])],qd);var Zd=new x((function(t){t(Kd).to(qd)})),Jd=Symbol.for("PickerService"),$d=Symbol.for("GlobalPickerService"),Qd=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},tf=Symbol.for("PickItemInterceptor"),ef=function(){return u((function t(){o(this,t),this.order=1}),[{key:"afterPickItem",value:function(t,e,i,n,r){return t.attribute.shadowRootIdx>0||!t.attribute.shadowRootIdx?this._pickItem(t,e,i,n,r):null}},{key:"beforePickItem",value:function(t,e,i,n,r){return t.attribute.shadowRootIdx<0?this._pickItem(t,e,i,n,r):null}},{key:"_pickItem",value:function(t,e,i,n,r){if(!t.shadowRoot)return null;var a=(r||{}).parentMatrix;if(!a)return null;var o=e.pickContext;o.highPerformanceSave();var s=t.shadowRoot,u=vc.allocateByObj(a),l=new Pe(u.a*i.x+u.c*i.y+u.e,u.b*i.x+u.d*i.y+u.f),c=e.pickGroup(s,l,u,n);return o.highPerformanceRestore(),c}}])}();ef=Qd([L()],ef);var nf=function(){return u((function t(){o(this,t),this.order=1}),[{key:"beforePickItem",value:function(t,e,i,n,r){var a=t.baseGraphic;if(a&&a.parent){var o=new Pe(i.x,i.y),s=e.pickContext;s.highPerformanceSave();var u=a.parent.globalTransMatrix;u.transformPoint(o,o);var l=a.isContainer?e.pickGroup(a,o.clone(),u,n):e.pickItem(a,o.clone(),u,n);return s.highPerformanceRestore(),l}return null}}])}();nf=Qd([L()],nf);var rf=function(){return u((function t(){o(this,t),this.order=1}),[{key:"beforePickItem",value:function(t,e,i,n,r){if(!t.in3dMode||n.in3dInterceptor)return null;var a=e.pickContext,o=t.stage;if(!a||!o)return null;if(n.in3dInterceptor=!0,a.save(),this.initCanvasCtx(a),a.camera=o.camera,t.isContainer){var s,u=!1,l=!1;if(t.forEachChildren((function(t){return!(u=t.numberType===Do)})),t.forEachChildren((function(t){return!(l=!!t.findFace)})),u){var c=t.getChildren(),h=y(c);h.sort((function(t,e){for(var i,n,r,a,o=(null!==(n=null!==(i=t.attribute.startAngle)&&void 0!==i?i:0+t.attribute.endAngle)&&void 0!==n?n:0)/2,s=(null!==(a=null!==(r=e.attribute.startAngle)&&void 0!==r?r:0+e.attribute.endAngle)&&void 0!==a?a:0)/2;o<0;)o+=ke;for(;s<0;)s+=ke;return s-o})),h.forEach((function(t){t._next=null,t._prev=null})),t.removeAllChild(),t.update(),h.forEach((function(e){t.appendChild(e)})),n.hack_pieFace="outside",(s=e.pickGroup(t,i,r.parentMatrix,n)).graphic||(n.hack_pieFace="inside",s=e.pickGroup(t,i,r.parentMatrix,n)),s.graphic||(n.hack_pieFace="top",s=e.pickGroup(t,i,r.parentMatrix,n)),t.removeAllChild(),c.forEach((function(t){t._next=null,t._prev=null})),c.forEach((function(e){t.appendChild(e)}))}else if(l){var d=t.getChildren(),f=d.map((function(t){return{ave_z:t.findFace().vertices.map((function(e){var i;return a.view(e[0],e[1],null!==(i=e[2]+t.attribute.z)&&void 0!==i?i:0)[2]})).reduce((function(t,e){return t+e}),0),g:t}}));f.sort((function(t,e){return e.ave_z-t.ave_z})),t.removeAllChild(),f.forEach((function(t){t.g._next=null,t.g._prev=null})),t.update(),f.forEach((function(e){t.add(e.g)})),s=e.pickGroup(t,i,r.parentMatrix,n),t.removeAllChild(),d.forEach((function(t){t._next=null,t._prev=null})),t.update(),d.forEach((function(e){t.add(e)}))}else s=e.pickGroup(t,i,r.parentMatrix,n);return a.camera=null,n.in3dInterceptor=!1,a.restore(),s}return a.restore(),null}},{key:"initCanvasCtx",value:function(t){t.setTransformForCurrent()}}])}();rf=Qd([L()],rf);var af=new x((function(t,e,i){i(Jd)||(t($d).toSelf(),t(Jd).toService($d)),t(rf).toSelf().inSingletonScope(),t(tf).toService(rf),t(ef).toSelf().inSingletonScope(),t(tf).toService(ef),t(nf).toSelf().inSingletonScope(),t(tf).toService(nf),tt(t,tf)})),of=new x((function(t){t(Jo).to(wc).inSingletonScope(),t($o).toConstantValue(Ac)})),sf=Symbol.for("AutoEnablePlugins"),uf=Symbol.for("PluginService"),lf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},cf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},hf=function(t,e){return function(i,n){e(i,n,t)}},df=function(){return u((function t(e){o(this,t),this.autoEnablePlugins=e,this.onStartupFinishedPlugin=[],this.onRegisterPlugin=[],this.actived=!1}),[{key:"active",value:function(t,e){var i=this;this.stage=t,this.actived=!0;var n=e.pluginList;n&&nr.isBound(sf)&&this.autoEnablePlugins.getContributions().forEach((function(t){n.includes(t.name)&&i.register(t)}))}},{key:"findPluginsByName",value:function(t){var e=[];return this.onStartupFinishedPlugin.forEach((function(i){i.name===t&&e.push(i)})),this.onRegisterPlugin.forEach((function(i){i.name===t&&e.push(i)})),e}},{key:"register",value:function(t){"onStartupFinished"===t.activeEvent?this.onStartupFinishedPlugin.push(t):"onRegister"===t.activeEvent&&(this.onRegisterPlugin.push(t),t.activate(this))}},{key:"unRegister",value:function(t){"onStartupFinished"===t.activeEvent?this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(t),1):"onRegister"===t.activeEvent&&this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(t),1),t.deactivate(this)}},{key:"release",value:function(){var t=this;this.onStartupFinishedPlugin.forEach((function(e){e.deactivate(t)})),this.onStartupFinishedPlugin=[],this.onRegisterPlugin.forEach((function(e){e.deactivate(t)})),this.onRegisterPlugin=[]}}])}();df=lf([L(),hf(0,O($)),hf(0,D(sf)),cf("design:paramtypes",[Object])],df);var ff=new x((function(t){t(uf).to(df),function(t,e){t($).toDynamicValue((function(t){var i=t.container;return new Q(e,i)})).whenTargetNamed(e)}(t,sf)})),vf=new x((function(t){tt(t,it)})),pf=new x((function(t){t(er).to(ir).inSingletonScope(),tt(t,er)})),gf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},yf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mf=function(){return u((function t(){o(this,t),this.type="static",this.offscreen=!1,this.global=Un.global}),[{key:"setDpr",value:function(t){this.canvas.dpr=t}},{key:"init",value:function(t,e,i){if(this.layer=t,this.window=e,i.main)this.main=!0,this.context=e.getContext(),this.canvas=this.context.getCanvas();else{var n;this.main=!1,i.canvasId&&(n=this.global.getElementById(i.canvasId)),n||(n=this.global.createCanvas({width:e.width,height:e.height})),n.style&&(n.style["pointer-events"]="none");var r=e.getContext().getCanvas().nativeCanvas,a=or({nativeCanvas:n,width:e.width,height:e.height,dpr:e.dpr,id:i.canvasId,canvasControled:!0,container:e.getContainer(),x:r.offsetLeft,y:r.offsetTop});a.applyPosition(),this.canvas=a,this.context=a.getContext()}}},{key:"resize",value:function(t,e){this.canvas.resize(t,e)}},{key:"resizeView",value:function(t,e){}},{key:"render",value:function(t,e,i){var n;if(!this.main){var r=this.window.getContext().getCanvas().nativeCanvas;!r||this.canvas.x===r.offsetLeft&&this.canvas.y===r.offsetTop||(this.canvas.x=r.offsetLeft,this.canvas.y=r.offsetTop,this.canvas.applyPosition())}e.renderService.render(t,Object.assign(Object.assign({context:this.context,clear:null!==(n=e.background)&&void 0!==n?n:"#ffffff"},e),i))}},{key:"merge",value:function(t){var e=this;t.forEach((function(t){var i=t.getContext().canvas.nativeCanvas;e.context.drawImage(i,0,0)}))}},{key:"prepare",value:function(t,e){}},{key:"drawTo",value:function(t,e,i){var n,r=t.getContext();i.renderService.render(e,Object.assign(Object.assign({context:r},i),{clear:i.clear?null!==(n=i.background)&&void 0!==n?n:"#fff":void 0}))}},{key:"getContext",value:function(){return this.context}},{key:"release",value:function(){this.canvas.release()}}])}();mf=gf([L(),yf("design:paramtypes",[])],mf);var kf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},bf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},_f=function(){return u((function t(){o(this,t),this.offscreen=!1,this.type="virtual",this.global=Un.global}),[{key:"setDpr",value:function(t){}},{key:"init",value:function(t,e,i){if(this.layer=t,this.window=e,i.main)throw new Error("virtual layer不能作为main layer");this.main=!1,this.canvas=null,this.context=null}},{key:"resize",value:function(t,e){}},{key:"resizeView",value:function(t,e){}},{key:"render",value:function(t,e,i){this.mainHandler.render(t,e,Object.assign(Object.assign({},i),{clear:!1}))}},{key:"merge",value:function(t){}},{key:"prepare",value:function(t,e){}},{key:"drawTo",value:function(t,e,i){var n,r=t.getContext();i.renderService.render(e,Object.assign(Object.assign({context:r},i),{clear:i.clear?null!==(n=i.background)&&void 0!==n?n:"#fff":void 0}))}},{key:"getContext",value:function(){return null}},{key:"release",value:function(){}}])}();_f=kf([L(),bf("design:paramtypes",[])],_f);var xf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},wf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Sf=function(){return u((function t(){o(this,t),this.offscreen=!0,this.type="dynamic",this.global=Un.global}),[{key:"setDpr",value:function(t){this.canvas.dpr=t}},{key:"init",value:function(t,e,i){this.layer=t;var n=or({nativeCanvas:this.global.createOffscreenCanvas({width:i.width,height:i.height,dpr:e.dpr}),width:i.width,height:i.height,dpr:e.dpr,canvasControled:!0});this.canvas=n,this.context=n.getContext()}},{key:"resize",value:function(t,e){this.canvas.resize(t,e)}},{key:"resizeView",value:function(t,e){this.canvas.resize(t,e)}},{key:"render",value:function(t,e){var i;e.renderService.render(t,Object.assign(Object.assign({context:this.context,viewBox:e.stage.window.getViewBox(),transMatrix:e.stage.window.getViewBoxTransform()},e),{clear:null!==(i=e.background)&&void 0!==i?i:"#ffffff"}))}},{key:"prepare",value:function(t,e){}},{key:"release",value:function(){this.canvas.release()}},{key:"getContext",value:function(){return this.context}},{key:"drawTo",value:function(t,e,i){var n=t.getContext(),r=t.dpr,a=i.viewBox,o=a.x1,s=a.y1,u=a.width(),l=a.height();n.nativeContext.save(),n.nativeContext.setTransform(r,0,0,r,0,0),i.clear&&n.clearRect(o,s,u,l),n.drawImage(this.canvas.nativeCanvas,0,0,this.canvas.width,this.canvas.height,o,s,u,l),n.nativeContext.restore()}},{key:"merge",value:function(t){}}])}();Sf=xf([L(),wf("design:paramtypes",[])],Sf);var Af=new x((function(t){t(mf).toSelf(),t(Sf).toSelf(),t(_f).toSelf(),t(us).toService(mf),t(ls).toService(Sf),t(cs).toService(_f)}));var Tf=function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};function Ef(t,e,i){var n,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={},s=[],u=!1;a?u=!0:t.forEachChildren((function(t,i){var r=t.attribute.zIndex,a=void 0===r?e:r;if(0===i)n=a;else if(n!==a)return u=!0,!0;return!1}),r);if(u){t.forEachChildren((function(t){var i=t.attribute.zIndex,n=void 0===i?e:i;o[n]?o[n].push(t):(o[n]=[t],s.push(n))}),r),s.sort((function(t,e){return r?e-t:t-e}));for(var l=!1,c=0;c<s.length&&!l;c++){var h=s[c],d=o[h];a&&d.sort((function(t,e){var i,n;return(r?-1:1)*((null!==(i=e.attribute.z)&&void 0!==i?i:0)-(null!==(n=t.attribute.z)&&void 0!==n?n:0))}));for(var f=0;f<d.length;f++)if(i(d[f],f)){l=!0;break}}}else t.forEachChildren(i,r)}function Cf(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Tf(this,void 0,void 0,n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.forEachChildrenAsync(i,r);case 2:case"end":return e.stop()}}),e)})))}function Bf(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r={},a=[],o=!1;t.forEachChildren((function(t,e){var n=t.attribute.zIndex;if(0===e);else if(void 0!==(void 0===n?i:n))return o=!0,!0;return!1}),n);var s=null,u=!1;if(o){t.forEachChildren((function(t){var e=t.attribute.zIndex,n=void 0===e?i:e;r[n]?r[n].push(t):(r[n]=[t],a.push(n))}),n),a.sort((function(t,e){return n?e-t:t-e}));for(var l=!1,c=0;c<a.length&&!l;c++)for(var h=a[c],d=r[h],f=0;f<d.length;f++){if(u){l=!0,s=d[f];break}d[f]._uid!==e||(u=!0)}}else t.forEachChildren((function(t){return u?(s=t,!0):(t._uid===e&&(u=!0),!1)}),n);return s}var Mf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Rf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Pf=function(t,e){return function(i,n){e(i,n,t)}},Of=function(){return u((function t(e,i){o(this,t),this.contributions=e,this.drawItemInterceptorContributions=i,this.currentRenderMap=new Map,this.defaultRenderMap=new Map,this.styleRenderMap=new Map,this.dirtyBounds=new Le,this.backupDirtyBounds=new Le,this.global=Un.global,this.layerService=Un.layerService,this.init()}),[{key:"init",value:function(){var t=this;this.contributions.forEach((function(e){if(e.style){var i=t.styleRenderMap.get(e.style)||new Map;i.set(e.numberType,e),t.styleRenderMap.set(e.style,i)}else t.defaultRenderMap.set(e.numberType,e)})),this.InterceptorContributions=this.drawItemInterceptorContributions.getContributions().sort((function(t,e){return t.order-e.order}))}},{key:"prepareForDraw",value:function(t,e){e.updateBounds?this.useDirtyBounds=!0:this.useDirtyBounds=!e.stage.params.optimize.disableCheckGraphicWidthOutRange}},{key:"draw",value:function(t,e){var i=this;this.prepareForDraw(t,e),e.drawContribution=this,this.currentRenderMap=this.styleRenderMap.get(e.renderStyle)||this.defaultRenderMap,this.currentRenderService=t;var n=e.context,r=e.stage,a=e.viewBox,o=e.transMatrix;if(n){var s,u,l,c,h,d,f,v=this.dirtyBounds.setValue(0,0,a.width(),a.height());if(r.dirtyBounds&&!r.dirtyBounds.empty()){var p=(s=v,u=r.dirtyBounds,l=!1,null===s?u:null===u?s:(Je=s.x1,$e=s.x2,Qe=s.y1,ti=s.y2,ei=u.x1,ii=u.x2,ni=u.y1,ri=u.y2,l&&(Je>$e&&(Je=(c=[$e,Je])[0],$e=c[1]),Qe>ti&&(Qe=(h=[ti,Qe])[0],ti=h[1]),ei>ii&&(ei=(d=[ii,ei])[0],ii=d[1]),ni>ri&&(ni=(f=[ri,ni])[0],ri=f[1])),Je>=ii||$e<=ei||Qe>=ri||ti<=ni?{x1:0,y1:0,x2:0,y2:0}:{x1:Math.max(Je,ei),y1:Math.max(Qe,ni),x2:Math.min($e,ii),y2:Math.min(ti,ri)}));v.x1=Math.floor(p.x1),v.y1=Math.floor(p.y1),v.x2=Math.ceil(p.x2),v.y2=Math.ceil(p.y2)}var g=n.dpr%1;(g||.5!==g)&&(v.x1=Math.floor(v.x1*n.dpr)/n.dpr,v.y1=Math.floor(v.y1*n.dpr)/n.dpr,v.x2=Math.ceil(v.x2*n.dpr)/n.dpr,v.y2=Math.ceil(v.y2*n.dpr)/n.dpr),this.backupDirtyBounds.copy(v),n.inuse=!0,n.setClearMatrix(o.a,o.b,o.c,o.d,o.e,o.f),n.clearMatrix(),n.setTransformForCurrent(!0),n.translate(a.x1,a.y1,!0),n.beginPath(),n.rect(v.x1,v.y1,v.width(),v.height()),n.clip(),r.camera&&(this.dirtyBounds.setValue(-1/0,-1/0,1/0,1/0),this.backupDirtyBounds.setValue(-1/0,-1/0,1/0,1/0)),this.clearScreen(t,n,e),n.save(),t.renderTreeRoots.sort((function(t,e){var i,n;return(null!==(i=t.attribute.zIndex)&&void 0!==i?i:En.zIndex)-(null!==(n=e.attribute.zIndex)&&void 0!==n?n:En.zIndex)})).forEach((function(t){t.isContainer?i.renderGroup(t,e,vc.allocate(1,0,0,1,0,0)):i.renderItem(t,e)})),n.restore(),n.setClearMatrix(1,0,0,1,0,0),n.inuse=!1,n.draw()}}},{key:"doRegister",value:function(){throw new Error("暂不支持")}},{key:"_findNextGraphic",value:function(t){for(var e=t.parent,i=t._uid;e;){var n=Bf(e,i,En.zIndex);if(n)return n;i=e._uid,e=e.parent}return null}},{key:"renderGroup",value:function(t,e,i,n){var r=this;if(!e.break&&!1!==t.attribute.visibleAll){if(t.incremental&&(null==e.startAtId||e.startAtId===t._uid))return e.break=!0,void this._increaseRender(t,e);if(!this.useDirtyBounds||ci(t.AABBBounds,this.dirtyBounds,!1)){var a,o=i;if(this.useDirtyBounds){a=qh.allocateByObj(this.dirtyBounds);var s=t.transMatrix;o=vc.allocateByObj(i).multiply(s.a,s.b,s.c,s.d,s.e,s.f),this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(o.getInverse())}this.renderItem(t,e,{drawingCb:function(){var i;n?t.forEachChildren((function(t){e.break||(t.isContainer?r.renderGroup(t,e,o):r.renderItem(t,e))})):Ef(t,En.zIndex,(function(t){e.break||(t.isContainer?r.renderGroup(t,e,o):r.renderItem(t,e))}),!1,!!(null===(i=e.context)||void 0===i?void 0:i.camera))}}),this.useDirtyBounds&&(this.dirtyBounds.copy(a),qh.free(a),vc.free(o))}}}},{key:"_increaseRender",value:function(t,e){var i=e.layer,n=e.stage,r=i.subLayers,a=r.get(t._uid);a||(a={layer:this.layerService.createLayer(n),zIndex:r.size,group:t},r.set(t._uid,a));var o=a.layer.getNativeHandler().getContext(),s=a.drawContribution||nr.get(gd);s.dirtyBounds.setValue(-1/0,-1/0,1/0,1/0),s.backupDirtyBounds.setValue(-1/0,-1/0,1/0,1/0),s.draw(this.currentRenderService,Object.assign(Object.assign({},e),{drawContribution:s,clear:"transparent",layer:a.layer,context:o,startAtId:t._uid,break:!1})),a.drawContribution=s;var u=this._findNextGraphic(t);if(u)if(u.isContainer&&u.incremental)this._increaseRender(u,e);else{var l=r.get(u._uid);l||(l={layer:this.layerService.createLayer(n),zIndex:r.size},r.set(u._uid,l));var c=l.layer.getNativeHandler().getContext();this.draw(this.currentRenderService,Object.assign(Object.assign({},e),{drawContribution:s,clear:"transparent",layer:l.layer,context:c,startAtId:u._uid,break:!1}))}}},{key:"getRenderContribution",value:function(t){var e;return e||(e=this.selectRenderByNumberType(t.numberType,t)),e||(e=this.selectRenderByType(t.type)),e}},{key:"renderItem",value:function(t,e,i){if(this.InterceptorContributions.length)for(var n=0;n<this.InterceptorContributions.length;n++){var r=this.InterceptorContributions[n];if(r.beforeDrawItem&&r.beforeDrawItem(t,this.currentRenderService,e,this,i))return}var a=this.getRenderContribution(t);if(a){var o,s=!1;if(t.parent){var u=t.parent.attribute,l=u.scrollX,c=void 0===l?0:l,h=u.scrollY,d=void 0===h?0:h;if(s=!(!c&&!d)){o=this.dirtyBounds.clone();var f=t.globalTransMatrix.getInverse();this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(f),this.dirtyBounds.translate(-c,-d)}}if(!this.useDirtyBounds||t.isContainer||ci(t.AABBBounds,this.dirtyBounds,!1)){var v=null!=e.startAtId&&t._uid!==e.startAtId;if(t._uid===e.startAtId&&(e.startAtId=null),i&&(i.skipDraw=v),v?t.isContainer&&a.draw(t,this.currentRenderService,e,i):a.draw(t,this.currentRenderService,e,i),s&&this.dirtyBounds.copy(o),this.InterceptorContributions.length)for(var p=0;p<this.InterceptorContributions.length;p++){var g=this.InterceptorContributions[p];if(g.afterDrawItem&&g.afterDrawItem(t,this.currentRenderService,e,this))return}}else s&&this.dirtyBounds.copy(o)}}},{key:"selectRenderByType",value:function(t){return te.getInstance().warn("未知错误,不应该走到这里"),null}},{key:"selectRenderByNumberType",value:function(t,e){var i;if(e.attribute.renderStyle){var n=this.styleRenderMap.get(e.attribute.renderStyle);i=n&&n.get(t)}return i||this.currentRenderMap.get(t)||this.defaultRenderMap.get(t)}},{key:"clearScreen",value:function(t,e,i){var n,r,a=i.clear,o=i.viewBox,s=o.width(),u=o.height();if(a){e.clearRect(0,0,s,u);var l=null===(n=t.drawParams)||void 0===n?void 0:n.stage;if(l&&(e.globalAlpha=null!==(r=l.attribute.opacity)&&void 0!==r?r:1),l&&l.backgroundImg&&l.resources){var c=l.resources.get(a);c&&"success"===c.state&&c.data&&e.drawImage(c.data,0,0,s,u)}else e.fillStyle=Pc(e,a,{AABBBounds:{x1:0,y1:0,x2:0+s,y2:0+u}},0,0),e.fillRect(0,0,s,u)}}},{key:"afterDraw",value:function(t,e){}}])}();Of=Mf([L(),Pf(0,I(_d)),Pf(1,O($)),Pf(1,D(jd)),Rf("design:paramtypes",[Array,Object])],Of);var If=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Lf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Df=function(t,e){return function(i,n){e(i,n,t)}},jf=function(){return u((function t(e){o(this,t),this.groupRenderContribitions=e,this.numberType=zo}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u=Er(t,null==a?void 0:a.theme).group,l=t.attribute,c=l.fill,h=void 0===c?u.fill:c,d=l.background,f=l.stroke,v=void 0===f?u.stroke:f,p=l.opacity,g=void 0===p?u.opacity:p,y=l.width,m=void 0===y?u.width:y,k=l.height,b=void 0===k?u.height:k,_=l.clip,x=void 0===_?u.clip:_,w=l.fillOpacity,S=void 0===w?u.fillOpacity:w,A=l.strokeOpacity,T=void 0===A?u.strokeOpacity:A,E=l.cornerRadius,C=void 0===E?u.cornerRadius:E,B=l.path,M=void 0===B?u.path:B,R=l.lineWidth,P=void 0===R?u.lineWidth:R,O=l.visible,I=void 0===O?u.visible:O,L=ms(g,S,m,b,h),D=bs(g,T,m,b),j=ps(h,d),F=gs(v,P);if(t.valid&&I){if(!x){if(!j&&!F)return;if(!(L||D||o||s||d))return}if(M&&M.length&&r.drawContribution){var N=e.disableFill,z=e.disableStroke,G=e.disableBeginPath;e.disableFill=!0,e.disableStroke=!0,e.disableBeginPath=!0,M.forEach((function(t){r.drawContribution.getRenderContribution(t).draw(t,r.renderService,r,a)})),e.disableFill=N,e.disableStroke=z,e.disableBeginPath=G}else 0===C||_t(C)&&C.every((function(t){return 0===t}))?(e.beginPath(),e.rect(i,n,m,b)):(e.beginPath(),$c(e,i,n,m,b,C));this._groupRenderContribitions||(this._groupRenderContribitions=this.groupRenderContribitions.getContributions()||[],this._groupRenderContribitions.push(Zc));var U={doFill:j,doStroke:F};this._groupRenderContribitions.forEach((function(a){a.time===Ci.beforeFillStroke&&a.drawShape(t,e,i,n,j,F,L,D,u,r,o,s,U)})),x&&e.clip(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),U.doFill&&(o?o(e,t.attribute,u):L&&(e.setCommonStyle(t,t.attribute,i,n,u),e.fill())),U.doStroke&&(s?s(e,t.attribute,u):D&&(e.setStrokeStyle(t,t.attribute,i,n,u),e.stroke())),this._groupRenderContribitions.forEach((function(a){a.time===Ci.afterFillStroke&&a.drawShape(t,e,i,n,j,F,L,D,u,r,o,s)}))}}},{key:"draw",value:function(t,e,i,n){var r=i.context;if(r){var a=t.attribute,o=a.clip,s=a.baseOpacity,u=void 0===s?1:s;o?r.save():r.highPerformanceSave(),r.baseGlobalAlpha*=u;var l=Er(t,null==n?void 0:n.theme).group,c=r.modelMatrix;if(r.camera){var h=pc.allocate(),d=pc.allocate();xc(d,t,l),_c(h,c||h,d),r.modelMatrix=h,pc.free(d),r.setTransform(1,0,0,1,0,0,!0)}else r.transformFromMatrix(t.transMatrix,!0);r.beginPath(),n.skipDraw?this.drawShape(t,r,0,0,i,n,(function(){return!1}),(function(){return!1})):this.drawShape(t,r,0,0,i);var f,v=t.attribute,p=v.scrollX,g=void 0===p?l.scrollX:p,y=v.scrollY,m=void 0===y?l.scrollY:y;(g||m)&&r.translate(g,m),n&&n.drawingCb&&(f=n.drawingCb()),r.modelMatrix!==c&&pc.free(r.modelMatrix),r.modelMatrix=c,r.baseGlobalAlpha/=u,f&&f.then?f.then((function(){o?r.restore():r.highPerformanceRestore()})):o?r.restore():r.highPerformanceRestore()}}}])}();jf=If([L(),Df(0,O($)),Df(0,D(Ms)),Lf("design:paramtypes",[Object])],jf);var Ff=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Nf=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).numberType=Uo,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,n,r,a,o,s,u){if(t.incremental&&a.multiGraphicOptions){var l=a.multiGraphicOptions,c=l.startAtIdx,d=l.length,f=t.attribute.segments,v=void 0===f?[]:f;if(c>v.length)return;var g=Er(t).line,y=t.attribute,m=y.fill,k=void 0===m?g.fill:m,b=y.stroke,_=void 0===b?g.stroke:b,x=y.opacity,w=void 0===x?g.opacity:x,S=y.fillOpacity,A=void 0===S?g.fillOpacity:S,T=y.strokeOpacity,E=void 0===T?g.strokeOpacity:T,C=y.lineWidth,B=void 0===C?g.lineWidth:C,M=y.visible,R=void 0===M?g.visible:M,P=ys(w,A,k),O=ks(w,E),I=ps(k),L=gs(_,B);if(!t.valid||!R)return;if(!I&&!L)return;if(!(P||O||s||u))return;for(var D=a.context,j=c;j<c+d;j++)this.drawIncreaseSegment(t,D,v[j-1],v[j],t.attribute.segments[j],[g,t.attribute],n,r)}else p(h(i.prototype),"drawShape",this).call(this,t,e,n,r,a,o,s,u)}},{key:"drawIncreaseSegment",value:function(t,e,i,n,r,a,o,s){n&&(e.beginPath(),function(t,e,i,n){var r=n||{},a=r.offsetX,o=void 0===a?0:a,s=r.offsetY,u=void 0===s?0:s,l=e?e.points[e.points.length-1]:i.points[0];t.moveTo(l.x+o,l.y+u),i.points.forEach((function(e){!1!==e.defined?t.lineTo(e.x+o,e.y+u):t.moveTo(e.x+o,e.y+u)}))}(e.nativeContext,i,n,{offsetX:o,offsetY:s}),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,r,a),e.setStrokeStyle(t,r,o,s,a),e.stroke())}}])}(Ah);Nf=Ff([L()],Nf);var zf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Gf=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).numberType=jo,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,n,r,a,o,s){if(t.incremental&&a.multiGraphicOptions){var u=a.multiGraphicOptions,l=u.startAtIdx,c=u.length,d=t.attribute.segments,f=void 0===d?[]:d;if(l>f.length)return;var v=Er(t).area,g=t.attribute,y=g.fill,m=void 0===y?v.fill:y,k=g.fillOpacity,b=void 0===k?v.fillOpacity:k,_=g.opacity,x=void 0===_?v.opacity:_,w=g.visible,S=void 0===w?v.visible:w,A=ys(x,b,m),T=ps(m);if(!t.valid||!S)return;if(!T)return;if(!A&&!s)return;for(var E=l;E<l+c;E++)this.drawIncreaseSegment(t,e,f[E-1],f[E],t.attribute.segments[E],[v,t.attribute],n,r)}else p(h(i.prototype),"drawShape",this).call(this,t,e,n,r,a,o,s)}},{key:"drawIncreaseSegment",value:function(t,e,i,n,r,a,o,s){n&&(e.beginPath(),function(t,e,i,n){for(var r=n||{},a=r.offsetX,o=void 0===a?0:a,s=r.offsetY,u=void 0===s?0:s,l=i.points,c=[],h=0;h<l.length;h++)l[h].defined;c.push(l),c.forEach((function(i,n){var r,a,s,l,c=e&&0===n?e.points[e.points.length-1]:i[0];t.moveTo(c.x+o,c.y+u),i.forEach((function(e){!1!==e.defined?t.lineTo(e.x+o,e.y+u):t.moveTo(e.x+o,e.y+u)}));for(var h=i.length-1;h>=0;h--){var d=i[h];t.lineTo(null!==(r=d.x1)&&void 0!==r?r:d.x,null!==(a=d.y1)&&void 0!==a?a:d.y)}t.lineTo(null!==(s=c.x1)&&void 0!==s?s:c.x,null!==(l=c.y1)&&void 0!==l?l:c.y),t.closePath()}))}(e.camera?e:e.nativeContext,i,n,{offsetX:o,offsetY:s}),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,r,a),e.setCommonStyle(t,r,o,s,a),e.fill())}}])}(Ih);Gf=zf([L()],Gf);var Uf,Wf=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Vf=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Hf=function(t,e){return function(i,n){e(i,n,t)}},Xf=function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};!function(t){t[t.NORMAL=0]="NORMAL",t[t.STOP=1]="STOP"}(Uf||(Uf={}));var Yf=function(t){function i(t,n,r,a){var s;return o(this,i),(s=e(this,i,[t,a])).contributions=t,s.lineRender=n,s.areaRender=r,s.drawItemInterceptorContributions=a,s.rendering=!1,s.currFrameStartAt=0,s.currentIdx=0,s.status=Uf.NORMAL,s.checkingForDrawPromise=null,s.hooks={completeDraw:new et([])},s.defaultRenderMap.set(s.lineRender.numberType,s.lineRender),s.defaultRenderMap.set(s.areaRender.numberType,s.areaRender),s}return c(i,t),u(i,[{key:"draw",value:function(t,e){return Xf(this,void 0,void 0,n().mark((function i(){var r,a,o,s=this;return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!this.checkingForDrawPromise){i.next=2;break}return i.abrupt("return");case 2:return this.lastRenderService=t,this.lastDrawContext=e,this.checkingForDrawPromise=this.checkForDraw(e),i.next=5,this.checkingForDrawPromise;case 5:if(r=i.sent,this.checkingForDrawPromise=null,!r){i.next=8;break}return i.abrupt("return");case 8:this.currentRenderService=t,a=e.context,o=e.viewBox,a&&(a.inuse=!0,a.clearMatrix(),a.setTransformForCurrent(!0),a.save(),e.restartIncremental&&this.clearScreen(this.currentRenderService,a,e),a.translate(o.x1,o.y1,!0),a.save(),t.renderTreeRoots.sort((function(t,e){var i,n;return(null!==(i=t.attribute.zIndex)&&void 0!==i?i:En.zIndex)-(null!==(n=e.attribute.zIndex)&&void 0!==n?n:En.zIndex)})).forEach((function(t){s.renderGroup(t,e)})),this.hooks.completeDraw.tap("top-draw",(function(){a.restore(),a.restore(),a.draw(),a.inuse=!1,s.rendering=!1})));case 11:case"end":return i.stop()}}),i,this)})))}},{key:"_increaseRender",value:function(t,e){return Xf(this,void 0,void 0,n().mark((function i(){return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return this.rendering=!0,i.next=3,this._renderIncrementalGroup(t,e);case 3:case"end":return i.stop()}}),i,this)})))}},{key:"_renderIncrementalGroup",value:function(t,e){return Xf(this,void 0,void 0,n().mark((function i(){var r=this;return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return this.count=t.count,i.next=3,new Promise((function(i){r.renderItem(t,e,{drawingCb:function(){return Xf(r,void 0,void 0,n().mark((function r(){var a,o=this;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(2===t.count){n.next=6;break}return n.next=3,Cf(t,En.zIndex,(function(i,n){if(o.status===Uf.STOP)return!0;if(i.isContainer)return!1;if(n<o.currentIdx)return!1;var r=o.currFrameStartAt+t.incremental;return n<r&&(o.currentIdx=n+1,o.renderItem(i,e)),n===r-1&&(o.currFrameStartAt=o.currentIdx,o.waitToNextFrame())}));case 3:i(!1),n.next=21;break;case 6:if(!(a=t.getChildAt(0)).incremental||!a.attribute.segments){n.next=19;break}a.incrementalAt||(a.incrementalAt=0);case 9:if(!(a.incrementalAt<a.attribute.segments.length)){n.next=17;break}return e.multiGraphicOptions={startAtIdx:a.incrementalAt,length:a.incremental},this.renderItem(a,e),a.incrementalAt+=a.incremental,n.next=15,this.waitToNextFrame();case 15:n.next=9;break;case 17:n.next=20;break;case 19:this.renderItem(a,e);case 20:i(!1);case 21:case"end":return n.stop()}}),r,this)})))}})}));case 3:this.hooks.completeDraw.call();case 4:case"end":return i.stop()}}),i,this)})))}},{key:"waitToNextFrame",value:function(){return Xf(this,void 0,void 0,n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.global.getRequestAnimationFrame()((function(){t(!1)}))})));case 1:case"end":return t.stop()}}),t)})))}},{key:"checkForDraw",value:function(t){return Xf(this,void 0,void 0,n().mark((function e(){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.rendering,e.t0=t.restartIncremental,!e.t0){e.next=7;break}return i=!1,e.next=6,this.forceStop();case 6:this.resetToInit();case 7:return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"forceStop",value:function(){return Xf(this,void 0,void 0,n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=this.rendering,!t.t0){t.next=5;break}return this.status=Uf.STOP,t.next=5,new Promise((function(t){e.hooks.completeDraw.tap("stopCb",(function(){e.status=Uf.NORMAL,e.hooks.completeDraw.taps=e.hooks.completeDraw.taps.filter((function(t){return"stopCb"!==t.name})),t(!1)}))}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"resetToInit",value:function(){this.currFrameStartAt=0,this.currentIdx=0}},{key:"renderGroup",value:function(t,e){return Xf(this,void 0,void 0,n().mark((function i(){var r=this;return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.break||!1===t.attribute.visibleAll){i.next=11;break}if(!t.incremental||e.startAtId!==t._uid){i.next=7;break}return i.next=4,this._increaseRender(t,e);case 4:i.t0=void(e.break=!0),i.next=10;break;case 7:return i.next=9,new Promise((function(i){r.renderItem(t,e,{drawingCb:function(){return Xf(r,void 0,void 0,n().mark((function r(){var a=this;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Cf(t,En.zIndex,(function(t){return Xf(a,void 0,void 0,n().mark((function i(){return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(i.t0=e.break,i.t0){i.next=6;break}if(i.t1=t.isContainer,!i.t1){i.next=6;break}return i.next=6,this.renderGroup(t,e);case 6:case"end":return i.stop()}}),i,this)})))}));case 2:i(!1);case 3:case"end":return r.stop()}}),r)})))}})}));case 9:i.t0=void i.sent;case 10:return i.abrupt("return",i.t0);case 11:case"end":return i.stop()}}),i,this)})))}}])}(Of);Yf=Wf([L(),Hf(0,I(_d)),Hf(1,O(Nf)),Hf(2,O(Gf)),Hf(3,O($)),Hf(3,D(jd)),Vf("design:paramtypes",[Array,Object,Object,Object])],Yf);var Kf=new x((function(t){t(Dc).toSelf().inSingletonScope(),t(Nc).toSelf().inSingletonScope(),t(Id).to(Of),t(gd).to(Yf),t(xd).to(jf).inSingletonScope(),t(_d).toService(xd),tt(t,Ms),t(Fc).toSelf().inSingletonScope(),tt(t,js),tt(t,_d),t(Ud).toSelf().inSingletonScope(),t(jd).toService(Ud),tt(t,jd)}));function qf(){qf.__loaded||(qf.__loaded=!0,nr.load(vs),nr.load(of),nr.load(Zd),nr.load(af),nr.load(ff),function(t){t.load(vf),t.load(pf),t.load(Af)}(nr),function(t){t.load(Kf)}(nr))}qf.__loaded=!1,qf();var Zf=nr.get(nt);Un.global=Zf;var Jf=nr.get(os);Un.graphicUtil=Jf;var $f=nr.get(as);Un.transformUtil=$f;var Qf=nr.get(Jo);Un.graphicService=Qf;var tv=nr.get(ss);Un.layerService=tv;var ev=function(){return u((function t(){o(this,t),this.name="AutoRenderPlugin",this.activeEvent="onRegister",this._uid=_.GenAutoIncrementId(),this.key=this.name+this._uid}),[{key:"activate",value:function(t){this.pluginService=t,Un.graphicService.hooks.onAttributeUpdate.tap(this.key,(function(e){e.glyphHost&&(e=e.glyphHost),e.stage===t.stage&&null!=e.stage&&e.stage.renderNextFrame()})),Un.graphicService.hooks.onSetStage.tap(this.key,(function(e){e.glyphHost&&(e=e.glyphHost),e.stage===t.stage&&null!=e.stage&&e.stage.renderNextFrame()}))}},{key:"deactivate",value:function(t){var e=this;Un.graphicService.hooks.onAttributeUpdate.taps=Un.graphicService.hooks.onAttributeUpdate.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.onSetStage.taps=Un.graphicService.hooks.onSetStage.taps.filter((function(t){return t.name!==e.key}))}}])}(),iv=function(){return u((function t(){var e=this;o(this,t),this.name="ViewTransform3dPlugin",this.activeEvent="onRegister",this._uid=_.GenAutoIncrementId(),this.key=this.name+this._uid,this.onMouseDown=function(t){e.option3d||(e.option3d=e.pluginService.stage.option3d),e.option3d&&(e.mousedown=!0,e.pageX=t.page.x,e.pageY=t.page.y)},this.onMouseUp=function(t){e.option3d||(e.option3d=e.pluginService.stage.option3d),e.option3d&&(e.mousedown=!1)},this.onMouseMove=function(t){var i,n,r=e.pluginService.stage;if(e.option3d||(e.option3d=r.option3d),e.option3d&&e.mousedown)if(e.pageX&&e.pageY){var a=t.page.x-e.pageX,o=t.page.y-e.pageY;e.pageX=t.page.x,e.pageY=t.page.y;var s=a/100,u=o/100;e.option3d.alpha=(null!==(i=e.option3d.alpha)&&void 0!==i?i:0)+s,e.option3d.beta=(null!==(n=e.option3d.beta)&&void 0!==n?n:0)+u,r.set3dOptions(e.option3d),r.renderNextFrame()}else e.pageX=t.page.x,e.pageY=t.page.y}}),[{key:"activate",value:function(t){this.pluginService=t;var e=t.stage;this.option3d=e.option3d,e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mousemove",this.onMouseMove)}},{key:"deactivate",value:function(t){var e=t.stage;e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mousemove",this.onMouseMove)}}])}(),nv=function(){return u((function t(){o(this,t),this.name="IncrementalAutoRenderPlugin",this.activeEvent="onRegister",this.nextFrameRenderGroupSet=new Set,this.willNextFrameRender=!1,this.nextUserParams={},this._uid=_.GenAutoIncrementId(),this.key=this.name+this._uid}),[{key:"activate",value:function(t){var e=this;this.pluginService=t,Un.graphicService.hooks.onAddIncremental.tap(this.key,(function(i,n,r){i.glyphHost&&(i=i.glyphHost),i.stage===t.stage&&null!=i.stage&&(e.nextUserParams.startAtId=n._uid,e.renderNextFrame(n))})),Un.graphicService.hooks.onClearIncremental.tap(this.key,(function(i,n){i.stage===t.stage&&null!=i.stage&&(e.nextUserParams.startAtId=i._uid,e.nextUserParams.restartIncremental=!0,e.renderNextFrame(i))}))}},{key:"deactivate",value:function(t){var e=this;Un.graphicService.hooks.onAddIncremental.taps=Un.graphicService.hooks.onAddIncremental.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.onClearIncremental.taps=Un.graphicService.hooks.onClearIncremental.taps.filter((function(t){return t.name!==e.key}))}},{key:"renderNextFrame",value:function(t){var e=this;this.nextFrameRenderGroupSet.add(t),this.willNextFrameRender||(this.willNextFrameRender=!0,Un.global.getRequestAnimationFrame()((function(){e._doRenderInThisFrame(),e.willNextFrameRender=!1})))}},{key:"_doRenderInThisFrame",value:function(){var t=this,e=this.pluginService.stage;this.nextFrameRenderGroupSet.size&&(this.nextFrameRenderGroupSet.forEach((function(i){var n=i.layer;if(n&&i.layer.subLayers){var r=i.layer.subLayers.get(i._uid);r&&r.drawContribution&&r.drawContribution.draw(e.renderService,Object.assign({stage:e,layer:n,viewBox:e.window.getViewBox(),transMatrix:e.window.getViewBoxTransform(),clear:"transparent",renderService:e.renderService,updateBounds:!1,startAtId:i._uid,context:r.layer.getNativeHandler().getContext()},t.nextUserParams))}})),this.nextUserParams={},this.nextFrameRenderGroupSet.clear())}}])}(),rv=function(){return u((function t(){o(this,t),this.name="HtmlAttributePlugin",this.activeEvent="onRegister",this._uid=_.GenAutoIncrementId(),this.key=this.name+this._uid,this.htmlMap={},this.renderId=0}),[{key:"activate",value:function(t){var e=this;this.pluginService=t,t.stage.hooks.afterRender.tap(this.key,(function(i){i&&i===e.pluginService.stage&&e.drawHTML(t.stage.renderService)}))}},{key:"deactivate",value:function(t){var e=this;t.stage.hooks.afterRender.taps=t.stage.hooks.afterRender.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.onRemove.unTap(this.key),Un.graphicService.hooks.onRelease.unTap(this.key),this.release()}},{key:"getWrapContainer",value:function(t,e,i){var n;return n=e?"string"==typeof e?Un.global.getElementById(e):e:t.window.getContainer(),{wrapContainer:Un.global.createDom(Object.assign({tagName:"div",parent:n},i)),nativeContainer:n}}},{key:"parseDefaultStyleFromGraphic",value:function(t){return function(t){var e={};return["textAlign","fontFamily","fontVariant","fontStyle","fontWeight"].forEach((function(i){t[i]&&(e[Bi(i)]=t[i])})),["fontSize","lineHeight"].forEach((function(i){var n=Bi(i);vt(t[i])||(e[n]=/^[0-9]*$/.test("".concat(t[i]))?"".concat(t[i],"px"):"".concat(t[i]))})),t.underline?e["text-decoration"]="underline":t.lineThrough&&(e["text-decoration"]="line-through"),t.fill&&bt(t.fill)&&(e.color=t.fill),e}("text"===t.type&&t.attribute?t.attribute:Er(t).text)}},{key:"getTransformOfText",value:function(t){var e=Er(t).text,i=t.attribute,n=i.textAlign,r=void 0===n?e.textAlign:n,a=i.textBaseline,o=void 0===a?e.textBaseline:a,s=t.globalTransMatrix.toTransformAttrs(),u=s.rotateDeg,l=s.scaleX,c=s.scaleY,h={left:"0",start:"0",end:"-100%",center:"-50%",right:"-100%",top:"0",middle:"-50%",bottom:"-100%",alphabetic:"-79%"},d={left:"0",start:"0",end:"100%",center:"50%",right:"100%",top:"0",middle:"50%",bottom:"100%",alphabetic:"79%"};return{textAlign:r,transform:"translate(".concat(h[r],",").concat(h[o],") rotate(").concat(u,"deg) scaleX(").concat(l,") scaleY(").concat(c,")"),transformOrigin:"".concat(d[r]," ").concat(d[o])}}},{key:"updateStyleOfWrapContainer",value:function(t,e,i,n,r){var a=r.pointerEvents,o=this.parseDefaultStyleFromGraphic(t);o.display=!1!==t.attribute.visible?"block":"none",o.pointerEvents=!0===a?"all":a||"none",i.style.position||(i.style.position="absolute",n.style.position="relative");var s=0,u=0,l=t.globalAABBBounds,c=r.anchorType;if(vt(c)&&(c="text"===t.type?"position":"boundsLeftTop"),"boundsLeftTop"===c&&(c="top-left"),"position"===c||l.empty()){var h=t.globalTransMatrix;s=h.e,u=h.f}else{var d=function(t,e){var i=t.x1,n=t.x2,r=t.y1,a=t.y2,o=Math.abs(n-i),s=Math.abs(a-r),u=(i+n)/2,l=(r+a)/2,c=0,h=0;switch(e){case"top":case"inside-top":h=-.5;break;case"bottom":case"inside-bottom":h=.5;break;case"left":case"inside-left":c=-.5;break;case"right":case"inside-right":c=.5;break;case"top-right":c=.5,h=-.5;break;case"top-left":c=-.5,h=-.5;break;case"bottom-right":c=.5,h=.5;break;case"bottom-left":c=-.5,h=.5}return{x:u+=c*o,y:l+=h*s}}(l,c);s=d.x,u=d.y}var f=Un.global.getElementTopLeft(n,!1),v=e.window.getTopLeft(!1),p=s+v.left-f.left,g=u+v.top-f.top;if(o.left="".concat(p,"px"),o.top="".concat(g,"px"),"text"===t.type&&"position"===c&&(o=Object.assign(Object.assign({},o),this.getTransformOfText(t))),ft(r.style)){var y=r.style({top:g,left:p,width:l.width(),height:l.height()},t,i);y&&(o=Object.assign(Object.assign({},o),y))}else gt(r.style)?o=Object.assign(Object.assign({},o),r.style):bt(r.style)&&r.style&&(o=Object.assign(Object.assign({},o),function(){var t={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(";").forEach((function(e){if(e){var i=e.split(":");if(2===i.length){var n=i[0].trim(),r=i[1].trim();n&&r&&(t[n]=r)}}})),t}(r.style)));Un.global.updateDom(i,{width:r.width,height:r.width,style:o})}},{key:"clearCacheContainer",value:function(){var t=this;this.htmlMap&&Object.keys(this.htmlMap).forEach((function(e){t.htmlMap[e]&&t.htmlMap[e].renderId!==t.renderId&&t.removeElement(e)})),this.renderId+=1}},{key:"drawHTML",value:function(t){var e=this;"browser"===Un.global.env&&(t.renderTreeRoots.sort((function(t,e){var i,n;return(null!==(i=t.attribute.zIndex)&&void 0!==i?i:En.zIndex)-(null!==(n=e.attribute.zIndex)&&void 0!==n?n:En.zIndex)})).forEach((function(t){e.renderGroupHTML(t)})),this.clearCacheContainer())}},{key:"renderGroupHTML",value:function(t){var e=this;this.renderGraphicHTML(t),t.forEachChildren((function(t){t.isContainer?e.renderGroupHTML(t):e.renderGraphicHTML(t)}))}},{key:"removeElement",value:function(t){if(this.htmlMap&&this.htmlMap[t]){var e=this.htmlMap[t].wrapContainer;e&&Un.global.removeDom(e),this.htmlMap[t]=null}}},{key:"renderGraphicHTML",value:function(t){var e,i=t.attribute.html;if(i){var n=t.stage;if(n){var r=i.dom,a=i.container;if(r){var o=vt(i.id)?"".concat(null!==(e=t.id)&&void 0!==e?e:t._uid,"_react"):i.id;if(this.htmlMap&&this.htmlMap[o]&&a&&a!==this.htmlMap[o].container&&this.removeElement(o),this.htmlMap&&this.htmlMap[o])"string"==typeof r?this.htmlMap[o].wrapContainer.innerHTML=r:r!==this.htmlMap[o].wrapContainer.firstChild&&(this.htmlMap[o].wrapContainer.removeChild(this.htmlMap[o].wrapContainer.firstChild),this.htmlMap[o].wrapContainer.appendChild(r));else{var s=this.getWrapContainer(n,a),u=s.wrapContainer,l=s.nativeContainer;u&&("string"==typeof r?u.innerHTML=r:u.appendChild(r),this.htmlMap||(this.htmlMap={}),this.htmlMap[o]={wrapContainer:u,nativeContainer:l,container:a,renderId:this.renderId})}if(this.htmlMap&&this.htmlMap[o]){var c=this.htmlMap[o],h=c.wrapContainer,d=c.nativeContainer;this.updateStyleOfWrapContainer(t,n,h,d,i),this.htmlMap[o].renderId=this.renderId}}}}}},{key:"release",value:function(){"browser"===Un.global.env&&this.removeAllDom(this.pluginService.stage.defaultLayer)}},{key:"removeAllDom",value:function(t){var e=this;this.htmlMap&&(Object.keys(this.htmlMap).forEach((function(t){e.removeElement(t)})),this.htmlMap=null)}}])}(),av=new De,ov=function(){return u((function t(){o(this,t),this.name="DirtyBoundsPlugin",this.activeEvent="onRegister",this._uid=_.GenAutoIncrementId(),this.key=this.name+this._uid}),[{key:"activate",value:function(t){var e=this;this.pluginService=t,t.stage.hooks.afterRender.tap(this.key,(function(t){t&&t===e.pluginService.stage&&t.dirtyBounds.clear()})),Un.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key,(function(t,i,n,r){t.glyphHost&&(t=t.glyphHost),i&&i===e.pluginService.stage&&i.renderCount&&(t.isContainer&&!t.shouldSelfChangeUpdateAABBBounds()||n&&(av.setValue(r.x1,r.y1,r.x2,r.y2),i.dirty(av,t.parent&&t.parent.globalTransMatrix)))})),Un.graphicService.hooks.afterUpdateAABBBounds.tap(this.key,(function(t,i,n,r,a){i&&i===e.pluginService.stage&&i.renderCount&&(t.isContainer&&!a||i.dirty(r.globalAABBBounds))})),Un.graphicService.hooks.onRemove.tap(this.key,(function(t){var i=t.stage;i&&i===e.pluginService.stage&&i.renderCount&&i&&i.dirty(t.globalAABBBounds)}))}},{key:"deactivate",value:function(t){var e=this;Un.graphicService.hooks.beforeUpdateAABBBounds.taps=Un.graphicService.hooks.beforeUpdateAABBBounds.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.afterUpdateAABBBounds.taps=Un.graphicService.hooks.afterUpdateAABBBounds.taps.filter((function(t){return t.name!==e.key})),t.stage.hooks.afterRender.taps=t.stage.hooks.afterRender.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.onRemove.taps=Un.graphicService.hooks.onRemove.taps.filter((function(t){return t.name!==e.key}))}}])}(),sv=new De,uv=function(){return u((function t(){o(this,t),this.name="FlexLayoutPlugin",this.activeEvent="onRegister",this.id=_.GenAutoIncrementId(),this.key=this.name+this.id,this.tempBounds=new De}),[{key:"pauseLayout",value:function(t){this.pause=t}},{key:"tryLayoutChildren",value:function(t){t.firstChild&&this.tryLayout(t.firstChild)}},{key:"tryLayout",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.pause){var n=t.parent;if(i||n&&t.needUpdateLayout()){var r=Er(n).group,a=n.attribute.display;if("flex"===(void 0===a?r.display:a)){var o=n.attribute,s=o.flexDirection,u=void 0===s?r.flexDirection:s,l=o.flexWrap,c=void 0===l?r.flexWrap:l,h=o.alignItems,d=void 0===h?r.alignItems:h,f=o.clip,v=void 0===f?r.clip:f,p=n.attribute.alignContent,g=void 0===p?null!=d?d:r.alignContent:p,y=n.attribute,m=y.width,k=y.height,b=y.justifyContent,_=void 0===b?r.justifyContent:b,x=n.getChildren();if(null==m||null==k){var w=0,S=0,A=0;if(x.forEach((function(t){var i=e.getAABBBounds(t);i.empty()||("column"===u||"column-reverse"===u?(S+=i.height(),w=Math.max(w,i.width())):(w+=i.width(),S=Math.max(S,i.height())),A+=i.x1,A+=i.y1,A+=i.x2,A+=i.y2)})),!isFinite(A))return;m=w,k=S}null==n.attribute.width?n.attribute.width=m:m=n.attribute.width,null==n.attribute.height?n.attribute.height=k:k=n.attribute.height,this.tempBounds.copy(n._AABBBounds);var T={main:{len:m,field:"x"},cross:{len:k,field:"y"}},E=T.main,C=T.cross;"column"!==u&&"column-reverse"!==u||(E.len=k,C.len=m,E.field="y",C.field="x"),"row-reverse"!==u&&"column-reverse"!==u||("flex-start"===_?_="flex-end":"flex-end"===_?_="flex-start":x.reverse());var B=0,M=0,R=[];x.forEach((function(t){var i=e.getAABBBounds(t);if(!i.empty()){var n="x"===E.field?i.width():i.height(),r="x"===C.field?i.width():i.height();R.push({mainLen:n,crossLen:r}),B+=n,M=Math.max(M,r)}}));var P=[];if(B>E.len&&"wrap"===c){var O=0,I=0;R.forEach((function(t,e){var i=t.mainLen,n=t.crossLen;O+i>E.len?0===O?(P.push({idx:e,mainLen:O+i,crossLen:n}),O=0,I=0):(P.push({idx:e-1,mainLen:O,crossLen:I}),O=i,I=n):(O+=i,I=Math.max(I,n))})),P.push({idx:R.length-1,mainLen:O,crossLen:I})}else P.push({idx:R.length-1,mainLen:B,crossLen:M});var L=0;if(P.forEach((function(t){e.layoutMain(n,x,_,E,R,L,t),L=t.idx+1})),M=P.reduce((function(t,e){return t+e.crossLen}),0),1===P.length){var D={"flex-start":0,"flex-end":C.len,center:C.len/2};this.layoutCross(x,d,C,D,R,P[0],0)}else if("flex-start"===g){L=0;var j=0;P.forEach((function(t,i){var n={"flex-start":j,"flex-end":j+t.crossLen,center:j+t.crossLen/2};e.layoutCross(x,"flex-start",C,n,R,P[i],L),L=t.idx+1,j+=t.crossLen}))}else if("center"===g){L=0;var F=Math.max(0,(C.len-M)/2);P.forEach((function(t,i){var n={"flex-start":F,"flex-end":F+t.crossLen,center:F+t.crossLen/2};e.layoutCross(x,"center",C,n,R,P[i],L),L=t.idx+1,F+=t.crossLen}))}else if("space-around"===g){L=0;var N=Math.max(0,(C.len-M)/P.length/2),z=N;P.forEach((function(t,i){var n={"flex-start":z,"flex-end":z+t.crossLen,center:z+t.crossLen/2};e.layoutCross(x,"flex-start",C,n,R,P[i],L),L=t.idx+1,z+=t.crossLen+2*N}))}else if("space-between"===g){L=0;var G=Math.max(0,(C.len-M)/(2*P.length-2)),U=0;P.forEach((function(t,i){var n={"flex-start":U,"flex-end":U+t.crossLen,center:U+t.crossLen/2};e.layoutCross(x,"flex-start",C,n,R,P[i],L),L=t.idx+1,U+=t.crossLen+2*G}))}x.forEach((function(t,e){t.addUpdateBoundTag(),t.addUpdatePositionTag(),t.clearUpdateLayoutTag()})),n.addUpdateLayoutTag();var W=this.getAABBBounds(n);v||this.tempBounds.equals(W)||this.tryLayout(n,!1)}}}}},{key:"getAABBBounds",value:function(t){this.skipBoundsTrigger=!0;var e=t.AABBBounds;return this.skipBoundsTrigger=!1,e}},{key:"updateChildPos",value:function(t,e,i){return t+(null!=e?e:0)-i}},{key:"layoutMain",value:function(t,e,i,n,r,a,o){if("flex-start"===i)for(var s=0,u=a;u<=o.idx;u++){var l=s+(e[u],n.field,0),c=this.getAABBBounds(e[u]);!c.empty()&&(e[u].attribute[n.field]=this.updateChildPos(l,e[u].attribute[n.field],c["".concat(n.field,"1")])),s+=r[u].mainLen}else if("flex-end"===i)for(var h=n.len,d=o.idx;d>=a;d--){var f=(h-=r[d].mainLen)+(e[d],n.field,0),v=this.getAABBBounds(e[d]);!v.empty()&&(e[d].attribute[n.field]=this.updateChildPos(f,e[d].attribute[n.field],v["".concat(n.field,"1")]))}else if("space-around"===i)if(o.mainLen>=n.len)for(var p=0,g=a;g<=o.idx;g++){var y=p+(e[g],n.field,0),m=this.getAABBBounds(e[g]);!m.empty()&&(e[g].attribute[n.field]=this.updateChildPos(y,e[g].attribute[n.field],m["".concat(n.field,"1")])),p+=r[g].mainLen}else for(var k=o.idx-a+1,b=(n.len-o.mainLen)/k/2,_=b,x=a;x<=o.idx;x++){var w=_+(e[x],n.field,0),S=this.getAABBBounds(e[x]);!S.empty()&&(e[x].attribute[n.field]=this.updateChildPos(w,e[x].attribute[n.field],S["".concat(n.field,"1")])),_+=r[x].mainLen+2*b}else if("space-between"===i)if(o.mainLen>=n.len)for(var A=0,T=a;T<=o.idx;T++){var E=A+(e[T],n.field,0),C=this.getAABBBounds(e[T]);!C.empty()&&(e[T].attribute[n.field]=this.updateChildPos(E,e[T].attribute[n.field],C["".concat(n.field,"1")])),A+=r[T].mainLen}else for(var B=o.idx-a+1,M=(n.len-o.mainLen)/(2*B-2),R=0,P=a;P<=o.idx;P++){var O=R+(e[P],n.field,0),I=this.getAABBBounds(e[P]);!I.empty()&&(e[P].attribute[n.field]=this.updateChildPos(O,e[P].attribute[n.field],I["".concat(n.field,"1")])),R+=r[P].mainLen+2*M}else if("center"===i)for(var L=(n.len-o.mainLen)/2,D=a;D<=o.idx;D++){var j=L+(e[D],n.field,0),F=this.getAABBBounds(e[D]);!F.empty()&&(e[D].attribute[n.field]=this.updateChildPos(j,e[D].attribute[n.field],F["".concat(n.field,"1")])),L+=r[D].mainLen}}},{key:"layoutCross",value:function(t,e,i,n,r,a,o){for(var s,u=o;u<=a.idx;u++){var l=t[u],c=l.attribute.alignSelf;c&&"auto"!==c||(c=e);var h=this.getAABBBounds(l),d=null!==(s=n[c])&&void 0!==s?s:n["flex-start"];"flex-end"===c?!h.empty()&&(l.attribute[i.field]=this.updateChildPos(d-r[u].crossLen+(i.field,0),l.attribute[i.field],h["".concat(i.field,"1")])):"center"===c?!h.empty()&&(l.attribute[i.field]=this.updateChildPos(d-r[u].crossLen/2+(i.field,0),l.attribute[i.field],h["".concat(i.field,"1")])):!h.empty()&&(l.attribute[i.field]=this.updateChildPos(d+(i.field,0),l.attribute[i.field],h["".concat(i.field,"1")]))}}},{key:"activate",value:function(t){var e=this;this.pluginService=t,Un.graphicService.hooks.onAttributeUpdate.tap(this.key,(function(t){t.glyphHost&&(t=t.glyphHost),t.stage&&t.stage===e.pluginService.stage&&e.tryLayout(t,!1)})),Un.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key,(function(t,i,n,r){t.glyphHost&&(t=t.glyphHost),i&&i===e.pluginService.stage&&t.isContainer&&!e.skipBoundsTrigger&&sv.copy(r)})),Un.graphicService.hooks.afterUpdateAABBBounds.tap(this.key,(function(t,i,n,r,a){i&&i===e.pluginService.stage&&t.isContainer&&!e.skipBoundsTrigger&&(sv.equals(n)||e.tryLayout(t,!1))})),Un.graphicService.hooks.onSetStage.tap(this.key,(function(t){t.glyphHost&&(t=t.glyphHost),e.tryLayout(t,!1)}))}},{key:"deactivate",value:function(t){var e=this;Un.graphicService.hooks.onAttributeUpdate.taps=Un.graphicService.hooks.onAttributeUpdate.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.beforeUpdateAABBBounds.taps=Un.graphicService.hooks.beforeUpdateAABBBounds.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.afterUpdateAABBBounds.taps=Un.graphicService.hooks.afterUpdateAABBBounds.taps.filter((function(t){return t.name!==e.key})),Un.graphicService.hooks.onSetStage.taps=Un.graphicService.hooks.onSetStage.taps.filter((function(t){return t.name!==e.key}))}}])}();var lv=new Hr;lv.addTimeline(qr),lv.setFPS(60);var cv=function(){return u((function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;o(this,t),this.dir=e,this.color=i,this.colorRgb=Fa.Get(i,Ia.Color1),this.ambient=n;var r=Te(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);this.formatedDir=[e[0]/r,e[1]/r,e[2]/r]}),[{key:"computeColor",value:function(t,e){var i,n=this.formatedDir,r=Se(we((t[0]*n[0]+t[1]*n[1]+t[2]*n[2])*(1-this.ambient/2),0)+this.ambient,1);i=bt(e)?Fa.Get(e,Ia.Color1):e;var a=this.colorRgb;return"rgb(".concat(a[0]*i[0]*r,", ").concat(a[1]*i[1]*r,", ").concat(a[2]*i[2]*r,")")}}])}();function hv(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],d=e[9],f=e[10],v=e[11],p=e[12],g=e[13],y=e[14],m=e[15],k=i[0],b=i[1],_=i[2],x=i[3];return t[0]=k*n+b*s+_*h+x*p,t[1]=k*r+b*u+_*d+x*g,t[2]=k*a+b*l+_*f+x*y,t[3]=k*o+b*c+_*v+x*m,k=i[4],b=i[5],_=i[6],x=i[7],t[4]=k*n+b*s+_*h+x*p,t[5]=k*r+b*u+_*d+x*g,t[6]=k*a+b*l+_*f+x*y,t[7]=k*o+b*c+_*v+x*m,k=i[8],b=i[9],_=i[10],x=i[11],t[8]=k*n+b*s+_*h+x*p,t[9]=k*r+b*u+_*d+x*g,t[10]=k*a+b*l+_*f+x*y,t[11]=k*o+b*c+_*v+x*m,k=i[12],b=i[13],_=i[14],x=i[15],t[12]=k*n+b*s+_*h+x*p,t[13]=k*r+b*u+_*d+x*g,t[14]=k*a+b*l+_*f+x*y,t[15]=k*o+b*c+_*v+x*m,t}function dv(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[3]*n+i[7]*r+i[11]*a+i[15];return o=o||1,t[0]=(i[0]*n+i[4]*r+i[8]*a+i[12])/o,t[1]=(i[1]*n+i[5]*r+i[9]*a+i[13])/o,t[2]=(i[2]*n+i[6]*r+i[10]*a+i[14])/o,t}var fv,vv=function(){return u((function t(e){o(this,t),this.params=e}),[{key:"params",get:function(){return Object.assign({},this._params)},set:function(t){this._params=Object.assign({},t),this._projectionMatrixCached=this.forceGetProjectionMatrix(),this._viewMatrixCached=this.forceGetViewMatrix()}},{key:"getViewMatrix",value:function(){return this._viewMatrixCached||(this._viewMatrixCached=pc.allocate()),this._viewMatrixCached}},{key:"forceGetViewMatrix",value:function(){this._viewMatrixCached||(this._viewMatrixCached=pc.allocate());var t=this.params.viewParams,e=t.pos,i=t.center,n=t.up;return function(t,e,i,n){var r,a,o,s,u,l,c,h,d,f,v=e[0],p=e[1],g=e[2],y=n[0],m=n[1],k=n[2],b=i[0],_=i[1],x=i[2];Math.abs(v-b)<pe&&Math.abs(p-_)<pe&&Math.abs(g-x)<pe?fc.identity(t):(c=v-b,h=p-_,d=g-x,r=m*(d*=f=1/Math.hypot(c,h,d))-k*(h*=f),a=k*(c*=f)-y*d,o=y*h-m*c,(f=Math.hypot(r,a,o))?(r*=f=1/f,a*=f,o*=f):(r=0,a=0,o=0),s=h*o-d*a,u=d*r-c*o,l=c*a-h*r,(f=Math.hypot(s,u,l))?(s*=f=1/f,u*=f,l*=f):(s=0,u=0,l=0),t[0]=r,t[1]=s,t[2]=c,t[3]=0,t[4]=a,t[5]=u,t[6]=h,t[7]=0,t[8]=o,t[9]=l,t[10]=d,t[11]=0,t[12]=-(r*v+a*p+o*g),t[13]=-(s*v+u*p+l*g),t[14]=-(c*v+h*p+d*g),t[15]=1)}(this._viewMatrixCached,e,i,n),this._vp||(this._vp=pc.allocate()),this._vp=hv(this._vp,this.getProjectionMatrix(),this.getViewMatrix()),this._viewMatrixCached}},{key:"getProjectionMatrix",value:function(){return this._projectionMatrixCached||(this._projectionMatrixCached=pc.allocate()),this._projectionMatrixCached}},{key:"forceGetProjectionMatrix",value:function(){this._projectionMatrixCached||(this._projectionMatrixCached=pc.allocate());var t=this._params,e=t.left,i=t.top,n=t.right,r=t.bottom;return function(t,e,i,n,r,a,o){var s=1/(e-i),u=1/(n-r),l=1/(a-o);t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+i)*s,t[13]=(r+n)*u,t[14]=(o+a)*l,t[15]=1}(this._projectionMatrixCached,e,n,r,i,0,-2e6),this._vp||(this._vp=pc.allocate()),this._vp=hv(this._vp,this.getProjectionMatrix(),this.getViewMatrix()),this._projectionMatrixCached}},{key:"getField",value:function(){var t=this._params,e=t.fieldRatio,i=void 0===e?.8:e,n=t.fieldDepth,r=t.left,a=t.right;return(null!=n?n:a-r)*i}},{key:"getProjectionScale",value:function(t){var e=this.getField();return e/(e+t)}},{key:"view",value:function(t,e,i){var n=[0,0,0];return dv(n,[t,e,i],this._viewMatrixCached),n}},{key:"vp",value:function(t,e,i){var n=[0,0,0],r=this._params.viewParams.pos;dv(n,[t,e,i],this._viewMatrixCached),t=n[0],e=n[1],i=n[2];var a=this.getProjectionScale(i);return{x:t*a+r[0],y:e*a+r[1]}}}])}();function pv(){if(null==fv)try{var t=document.createElement("canvas"),e=t.getContext("2d");(fv=!!(window&&t.getBoundingClientRect&&requestAnimationFrame&&window.devicePixelRatio&&e&&e.isPointInPath&&e.isPointInStroke))&&(fv=!!document.createElement)}catch(t){fv=!1}}function gv(){pv();var t=Un.global&&Un.global.env;return t?"browser"===t:fv}var yv=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).name="ReactAttributePlugin",t.activeEvent="onRegister",t._uid=_.GenAutoIncrementId(),t.key=t.name+t._uid,t.htmlMap={},t}return c(i,t),u(i,[{key:"removeElement",value:function(t){if(this.htmlMap&&this.htmlMap[t]){var e=this.htmlMap[t],i=e.root,n=e.wrapContainer;i&&Un.global.getRequestAnimationFrame()((function(){i.unmount()})),n&&Un.global.removeDom(n),this.htmlMap[t]=null}}},{key:"renderGraphicHTML",value:function(t){var e,i=t.attribute.react;if(i){var n=t.stage;if(n){var r=n.params.ReactDOM,a=i.element,o=i.container;if(a&&r&&r.createRoot){var s=vt(i.id)?"".concat(null!==(e=t.id)&&void 0!==e?e:t._uid,"_react"):i.id;if(this.htmlMap&&this.htmlMap[s]&&o&&o!==this.htmlMap[s].container&&this.removeElement(s),this.htmlMap&&this.htmlMap[s])this.htmlMap[s].root.render(a);else{var u=this.getWrapContainer(n,o),l=u.wrapContainer,c=u.nativeContainer;if(l){var h=r.createRoot(l);h.render(a),this.htmlMap||(this.htmlMap={}),this.htmlMap[s]={root:h,wrapContainer:l,nativeContainer:c,container:o,renderId:this.renderId}}}if(this.htmlMap&&this.htmlMap[s]){var d=this.htmlMap[s],f=d.wrapContainer,v=d.nativeContainer;this.updateStyleOfWrapContainer(t,n,f,v,i),this.htmlMap[s].renderId=this.renderId}}}}}}])}(rv),mv="white",kv=function(t){function i(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,i),(t=e(this,i,[{}]))._onVisibleChange=function(e){if(!(t._skipRender<0))if(e){if(t.dirtyBounds){var i=t.window.getViewBox();t.dirtyBounds.setValue(i.x1,i.y1,i.width(),i.height())}t._skipRender>1&&t.renderNextFrame(),t._skipRender=0}else t._skipRender=1},t.beforeRender=function(e){t._beforeRender&&t._beforeRender(e)},t.afterRender=function(e){t.renderCount++,t._afterRender&&t._afterRender(e),t._afterNextRenderCbs&&t._afterNextRenderCbs.forEach((function(t){return t(e)})),t._afterNextRenderCbs=null},t.params=r,t.theme=new Ar,t.hooks={beforeRender:new et(["stage"]),afterRender:new et(["stage"])},t.global=Un.global,!t.global.env&&gv()&&t.global.setEnv("browser"),t.window=nr.get(hr),t.renderService=nr.get(Kd),t.pluginService=nr.get(uf),t.layerService=nr.get(ss),t.pluginService.active(f(t),r),t.window.create({width:r.width,height:r.height,viewBox:r.viewBox,container:r.container,dpr:r.dpr||t.global.devicePixelRatio,canvasControled:!1!==r.canvasControled,title:r.title||"",canvas:r.canvas}),t.state="normal",t.renderCount=0,t.tryInitEventSystem(),t._background=null!==(n=r.background)&&void 0!==n?n:mv,t.appendChild(t.layerService.createLayer(f(t),{main:!0})),t.nextFrameRenderLayerSet=new Set,t.willNextFrameRender=!1,t.stage=f(t),t.renderStyle=r.renderStyle,r.autoRender&&t.enableAutoRender(),!1===r.disableDirtyBounds&&t.enableDirtyBounds(),r.enableHtmlAttribute&&t.enableHtmlAttribute(r.enableHtmlAttribute),r.ReactDOM&&t.enableReactAttribute(r.ReactDOM),r.enableLayout&&t.enableLayout(),t.hooks.beforeRender.tap("constructor",t.beforeRender),t.hooks.afterRender.tap("constructor",t.afterRender),t._beforeRender=r.beforeRender,t._afterRender=r.afterRender,t.ticker=r.ticker||lv,t.supportInteractiveLayer=!1!==r.interactiveLayer,t.timeline=new Kr,t.ticker.addTimeline(t.timeline),t.timeline.pause(),r.optimize||(r.optimize={}),t.optmize(r.optimize),r.background&&bt(t._background)&&t._background.includes("/")&&t.setAttributes({background:t._background}),t}return c(i,t),u(i,[{key:"viewBox",get:function(){return this.window.getViewBox()},set:function(t){this.window.setViewBox(t)}},{key:"x",get:function(){return this.window.getViewBox().x1},set:function(t){var e=this.window.getViewBox();e.translate(t-e.x1,0),this.window.setViewBox(e)}},{key:"y",get:function(){return this.window.getViewBox().y1},set:function(t){var e=this.window.getViewBox();e.translate(0,t-e.y1),this.window.setViewBox(e)}},{key:"width",get:function(){return this.window.width},set:function(t){this.resize(t,this.height)}},{key:"viewWidth",get:function(){return this.window.getViewBox().width()},set:function(t){this.resizeView(t,this.viewHeight)}},{key:"viewHeight",get:function(){return this.window.getViewBox().height()},set:function(t){this.resizeView(this.viewWidth,t)}},{key:"height",get:function(){return this.window.height},set:function(t){this.resize(this.width,t)}},{key:"dpr",get:function(){return this.window.dpr},set:function(t){this.setDpr(t)}},{key:"background",get:function(){var t;return null!==(t=this._background)&&void 0!==t?t:mv},set:function(t){this._background=t}},{key:"defaultLayer",get:function(){return this.at(0)}},{key:"eventSystem",get:function(){return this._eventSystem}},{key:"pauseRender",value:function(){this._skipRender=-1}},{key:"resumeRender",value:function(){this._skipRender=0}},{key:"tryInitEventSystem",value:function(){this.global.supportEvent&&!this._eventSystem&&(this._eventSystem=new Gr(Object.assign({targetElement:this.window,resolution:this.window.dpr||this.global.devicePixelRatio,rootNode:this,global:this.global,supportsPointerEvents:this.params.supportsPointerEvents,supportsTouchEvents:this.params.supportsTouchEvents},this.params.event)))}},{key:"preventRender",value:function(t){t?this._skipRender=-1/0:!1!==this.params.optimize.skipRenderWithOutRange?this._skipRender=this.window.isVisible()?0:1:this._skipRender=0}},{key:"optmize",value:function(t){this.optmizeRender(t.skipRenderWithOutRange),this.params.optimize=t}},{key:"optmizeRender",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this._skipRender=this._skipRender<0?this._skipRender:this.window.isVisible()?0:1,this.window.onVisibleChange(this._onVisibleChange))}},{key:"getTimeline",value:function(){return this.timeline}},{key:"get3dOptions",value:function(t){var e=t.center,i=void 0===e?{x:this.width/2,y:this.height/2,z:0,dx:0,dy:0,dz:0}:e,n=t.light,r=void 0===n?{}:n,a=t.alpha,o=void 0===a?0:a,s=t.beta,u=void 0===s?0:s,l=t.camera,c=t.fieldRatio,h=void 0===c?1:c,d=t.fieldDepth;return Object.assign(Object.assign({},t),{center:i,light:r,alpha:o,beta:u,camera:l,fieldRatio:h,fieldDepth:d})}},{key:"set3dOptions",value:function(t){var e,i,n,r,a,o;this.option3d=t;var s=this.get3dOptions(t),u=s.light,l=s.center,c=s.camera,h=s.alpha,d=s.beta,f=s.fieldRatio,v=s.fieldDepth,p=u.dir,g=void 0===p?[1,1,-1]:p,y=u.color,m=void 0===y?"white":y,k=u.ambient,b=(null!==(e=l.x)&&void 0!==e?e:this.width/2)+(null!==(i=l.dx)&&void 0!==i?i:0),_=(null!==(n=l.y)&&void 0!==n?n:this.height/2)+(null!==(r=l.dy)&&void 0!==r?r:0),x=[b,_,(null!==(a=l.z)&&void 0!==a?a:0)+(null!==(o=l.dz)&&void 0!==o?o:0)],w=0,S=0,A=0;c||(w=Math.sin(h)+b,S=Math.sin(d)+_,A=Math.cos(h)*Math.cos(d)*1),this.light=new cv(g,m,k);var T={left:0,right:this.width,top:0,bottom:this.height,fieldRatio:f,fieldDepth:v,viewParams:{pos:[w,S,A],center:x,up:[0,1,0]}};this.camera?this.camera.params=T:this.camera=new vv(T),t.enableView3dTransform&&this.enableView3dTransform()}},{key:"setBeforeRender",value:function(t){this._beforeRender=t}},{key:"setAfterRender",value:function(t){this._afterRender=t}},{key:"afterNextRender",value:function(t){this._afterNextRenderCbs||(this._afterNextRenderCbs=[]),this._afterNextRenderCbs.push(t)}},{key:"enableView3dTransform",value:function(){this.view3dTranform||(this.view3dTranform=!0,this.pluginService.register(new iv))}},{key:"disableView3dTranform",value:function(){var t=this;this.view3dTranform&&(this.view3dTranform=!1,this.pluginService.findPluginsByName("ViewTransform3dPlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"enableAutoRender",value:function(){this.autoRender||(this.autoRender=!0,this.pluginService.register(new ev))}},{key:"disableAutoRender",value:function(){var t=this;this.autoRender&&(this.autoRender=!1,this.pluginService.findPluginsByName("AutoRenderPlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"enableIncrementalAutoRender",value:function(){this.increaseAutoRender||(this.increaseAutoRender=!0,this.pluginService.register(new nv))}},{key:"disableIncrementalAutoRender",value:function(){var t=this;this.increaseAutoRender&&(this.increaseAutoRender=!1,this.pluginService.findPluginsByName("IncrementalAutoRenderPlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"enableDirtyBounds",value:function(){if(!this.dirtyBounds){this.dirtyBounds=new Le;var t=this.pluginService.findPluginsByName("DirtyBoundsPlugin")[0];t?t.activate(this.pluginService):(t=new ov,this.pluginService.register(t))}}},{key:"disableDirtyBounds",value:function(){var t=this;this.dirtyBounds&&(this.dirtyBounds=null,this.pluginService.findPluginsByName("DirtyBoundsPlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"enableLayout",value:function(){this._enableLayout||(this._enableLayout=!0,this.pluginService.register(new uv))}},{key:"disableLayout",value:function(){var t=this;this._enableLayout&&(this._enableLayout=!1,this.pluginService.findPluginsByName("FlexLayoutPlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"enableHtmlAttribute",value:function(t){this.htmlAttribute||(this.htmlAttribute=t,this.pluginService.register(new rv))}},{key:"disableHtmlAttribute",value:function(){var t=this;this.htmlAttribute&&(this.htmlAttribute=!1,this.pluginService.findPluginsByName("HtmlAttributePlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"enableReactAttribute",value:function(t){this.reactAttribute||(this.reactAttribute=t,this.pluginService.register(new yv))}},{key:"disableReactAttribute",value:function(){var t=this;this.reactAttribute&&(this.reactAttribute=!1,this.pluginService.findPluginsByName("ReactAttributePlugin").forEach((function(e){t.pluginService.unRegister(e)})))}},{key:"getPluginsByName",value:function(t){return this.pluginService.findPluginsByName(t)}},{key:"tryUpdateAABBBounds",value:function(){var t=this.window.getViewBox();return this._AABBBounds.setValue(t.x1,t.y1,t.x2,t.y2),this._AABBBounds}},{key:"combineLayer",value:function(t,e){throw new Error("暂不支持")}},{key:"createLayer",value:function(t,e){var i=this.layerService.createLayer(this,{main:!1,layerMode:e,canvasId:t});return this.appendChild(i),i}},{key:"sortLayer",value:function(t){var e=this,i=this.children;i.sort(t),this.removeAllChild(),i.forEach((function(t){e.appendChild(t)}))}},{key:"removeLayer",value:function(t){return this.removeChild(this.findChildByUid(t))}},{key:"tryInitInteractiveLayer",value:function(){this.supportInteractiveLayer&&!this.interactiveLayer&&(this.interactiveLayer=this.createLayer(),this.interactiveLayer.name="_builtin_interactive",this.interactiveLayer.attribute.pickable=!1,this.nextFrameRenderLayerSet.add(this.interactiveLayer))}},{key:"clearViewBox",value:function(t){this.window.clearViewBox(t)}},{key:"render",value:function(t,e){this.ticker.start(),this.timeline.resume();var i=this.state;this.state="rendering",this.layerService.prepareStageLayer(this),this._skipRender||(this.lastRenderparams=e,this.hooks.beforeRender.call(this),this._skipRender||(this.renderLayerList(this.children),this.combineLayersToWindow(),this.nextFrameRenderLayerSet.clear()),this.hooks.afterRender.call(this)),this.state=i,this._skipRender&&this._skipRender++}},{key:"combineLayersToWindow",value:function(){if("harmony"===this.global.env){var t=this.window.getContext().nativeContext;this.forEachChildren((function(e,i){if(i>0){var n=e.getNativeHandler().getContext().canvas.nativeCanvas.nativeCanvas._c.transferToImageBitmap();t.transferFromImageBitmap(n)}}))}}},{key:"renderNextFrame",value:function(t,e){var i=this;this.nextFrameRenderLayerSet.size!==this.childrenCount&&(t||this).forEach((function(t){i.nextFrameRenderLayerSet.add(t)})),this.willNextFrameRender||(this.willNextFrameRender=!0,this.global.getRequestAnimationFrame()((function(){i._doRenderInThisFrame(),i.willNextFrameRender=!1})))}},{key:"_doRenderInThisFrame",value:function(){this.timeline.resume(),this.ticker.start();var t=this.state;this.state="rendering",this.layerService.prepareStageLayer(this),this.nextFrameRenderLayerSet.size&&!this._skipRender&&(this.hooks.beforeRender.call(this),this._skipRender||(this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()),this.lastRenderparams||{}),this.combineLayersToWindow(),this.nextFrameRenderLayerSet.clear()),this.hooks.afterRender.call(this)),this.state=t,this._skipRender&&this._skipRender++}},{key:"renderLayerList",value:function(t,e){for(var i=this,n=[],r=0;r<t.length;r++){var a=t[r];"virtual"===a.layerMode&&(a=a.getNativeHandler().mainHandler.layer),n.includes(a)||n.push(a)}n.forEach((function(t){t.renderCount>i.renderCount||(t.renderCount=i.renderCount+1,t.render({renderService:i.renderService,background:t===i.defaultLayer?i.background:void 0,updateBounds:!(!i.dirtyBounds||i.dirtyBounds.empty()),viewBox:i.window.getViewBox(),transMatrix:i.window.getViewBoxTransform()},Object.assign({renderStyle:i.renderStyle},e)))})),this.interactiveLayer&&!t.includes(this.interactiveLayer)&&this.interactiveLayer.render({renderService:this.renderService,updateBounds:!(!this.dirtyBounds||this.dirtyBounds.empty()),viewBox:this.window.getViewBox(),transMatrix:this.window.getViewBoxTransform()},Object.assign({renderStyle:this.renderStyle},e))}},{key:"resizeWindow",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.window.resize(t,e),i&&this.render()}},{key:"resize",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.window.hasSubView()||this.viewBox.setValue(this.viewBox.x1,this.viewBox.y1,this.viewBox.x1+t,this.viewBox.y1+e),this.window.resize(t,e),this.forEachChildren((function(i){i.resize(t,e)})),this.camera&&this.option3d&&this.set3dOptions(this.option3d),i&&this.render()}},{key:"resizeView",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.viewBox.setValue(this.viewBox.x1,this.viewBox.y1,this.viewBox.x1+t,this.viewBox.y1+e),this.forEachChildren((function(i){i.resizeView(t,e)})),this.camera&&(this.camera.params=Object.assign(Object.assign({},this.camera.params),{right:this.width,bottom:this.height})),i&&this.render()}},{key:"setViewBox",value:function(t,e,i,n,r){var o=this,s=!0;"object"==a(t)?(this.viewBox.setValue(t.x1,t.y1,t.x2,t.y2),!1===e&&(s=!1)):(this.viewBox.setValue(t,e,t+i,e+n),!1===r&&(s=!1)),this.forEachChildren((function(t){t.resizeView(o.viewBox.width(),o.viewBox.height())})),s&&this.render()}},{key:"setDpr",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.forEachChildren((function(e){e.setDpr(t)})),e&&this.render()}},{key:"setOrigin",value:function(t,e){throw new Error("暂不支持")}},{key:"export",value:function(t){throw new Error("暂不支持")}},{key:"pick",value:function(t,e){this.pickerService||(this.pickerService=nr.get(Jd));var i=this.pickerService.pick(this.children,new Pe(t,e),{bounds:this.AABBBounds});return!(!(null==i?void 0:i.graphic)&&!(null==i?void 0:i.group))&&i}},{key:"startAnimate",value:function(t){throw new Error("暂不支持")}},{key:"setToFrame",value:function(t){throw new Error("暂不支持")}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this),this.hooks.beforeRender.unTap("constructor",this.beforeRender),this.hooks.afterRender.unTap("constructor",this.afterRender),this.eventSystem&&this.eventSystem.release(),this.layerService.releaseStage(this),this.pluginService.release(),this.forEach((function(t){t.release()})),this.interactiveLayer&&this.interactiveLayer.release(),this.window.release(),this.ticker.remTimeline(this.timeline),this.renderService.renderTreeRoots=[]}},{key:"setStage",value:function(t){}},{key:"dirty",value:function(t,e){e&&t.transformWithMatrix(e),this.dirtyBounds.empty()&&this.dirtyBounds.setValue(t.x1,t.y1,t.x2,t.y2),this.dirtyBounds.union(t)}},{key:"getLayer",value:function(t){return this.children.filter((function(e){return e.name===t}))[0]}},{key:"renderTo",value:function(t){var e=this;this.forEachChildren((function(i,n){i.drawTo(t,{renderService:e.renderService,viewBox:t.getViewBox(),transMatrix:t.getViewBoxTransform(),background:i===e.defaultLayer?e.background:void 0,clear:0===n,updateBounds:!(!e.dirtyBounds||e.dirtyBounds.empty())})}))}},{key:"renderToNewWindow",value:function(){var t=arguments.length>1?arguments[1]:void 0,e=nr.get(hr),i=t?-t.x1:0,n=t?-t.y1:0,r=t?t.x2:this.viewWidth,a=t?t.y2:this.viewHeight,o=t?t.width():this.viewWidth,s=t?t.height():this.viewHeight;return e.create({viewBox:{x1:i,y1:n,x2:r,y2:a},width:o,height:s,dpr:this.window.dpr,canvasControled:!0,offscreen:!0,title:""}),this.renderTo(e),e}},{key:"toCanvas",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1?arguments[1]:void 0,i=this.renderToNewWindow(t,e).getNativeHandler();return i.nativeCanvas?i.nativeCanvas:null}},{key:"setCursor",value:function(t){this._cursor=t,this.eventSystem.setCursor(t,"ignore")}},{key:"getCursor",value:function(){return this._cursor}},{key:"eventPointTransform",value:function(t){var e=this.global.mapToCanvasPoint(t,this.window.getContext().canvas.nativeCanvas);return this.stage.window.pointTransform(e.x,e.y)}},{key:"pauseTriggerEvent",value:function(){this._eventSystem&&this._eventSystem.pauseTriggerEvent()}},{key:"resumeTriggerEvent",value:function(){this._eventSystem&&this._eventSystem.resumeTriggerEvent()}}])}(es);function bv(t){return new kv(t)}var _v=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},xv=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},wv=500,Sv=500,Av=1,Tv=function(){return u((function t(e){var i;o(this,t);var n=e.nativeCanvas,r=e.width,a=void 0===r?wv:r,s=e.height,u=void 0===s?Sv:s,l=e.dpr,c=void 0===l?Av:l,h=e.x,d=e.y,f=e.id,v=e.canvasControled,p=void 0===v||v;this._x=null!=h?h:0,this._y=null!=d?d:0,this._pixelWidth=a*c,this._pixelHeight=u*c,this._visiable=!1!==e.visiable,this.controled=p,this._displayWidth=a,this._displayHeight=u,this._dpr=c,this._nativeCanvas=n,this._id=null!==(i=n.id)&&void 0!==i?i:f,f&&(n.id=f),this.init(e)}),[{key:"displayWidth",get:function(){return this._pixelWidth/this._dpr}},{key:"displayHeight",get:function(){return this._pixelHeight/this._dpr}},{key:"id",get:function(){return this._id}},{key:"x",get:function(){return this._x},set:function(t){this._x=t}},{key:"y",get:function(){return this._y},set:function(t){this._y=t}},{key:"nativeCanvas",get:function(){return this._nativeCanvas}},{key:"width",get:function(){return this._pixelWidth},set:function(t){this._pixelWidth=t,this._displayWidth=t/(this._dpr||1)}},{key:"height",get:function(){return this._pixelHeight},set:function(t){this._pixelHeight=t,this._displayHeight=t/(this._dpr||1)}},{key:"getContext",value:function(t){return this._context}},{key:"visiable",get:function(){return this._visiable},set:function(t){this._visiable=t,t?this.show():this.hide()}},{key:"dpr",get:function(){return this._dpr},set:function(t){this._dpr=t,this.resize(this._displayWidth,this._displayHeight)}},{key:"getNativeCanvas",value:function(){return this._nativeCanvas}},{key:"hide",value:function(){}},{key:"show",value:function(){}},{key:"applyPosition",value:function(){}},{key:"resetStyle",value:function(t){}},{key:"resize",value:function(t,e){}},{key:"toDataURL",value:function(t,e){return""}},{key:"readPixels",value:function(t,e,i,n){return this._context.getImageData(t,e,i,n)}},{key:"convertToBlob",value:function(t){throw new Error("暂未实现")}},{key:"transferToImageBitmap",value:function(){throw new Error("暂未实现")}},{key:"release",value:function(){this.controled&&this._nativeCanvas.parentElement&&this._nativeCanvas.parentElement.removeChild(this._nativeCanvas)}}])}();Tv.env="browser",Tv=_v([L(),xv("design:paramtypes",[Object])],Tv);var Ev=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Cv=function(){return u((function t(){o(this,t)}),[{key:"configure",value:function(t){t.env===this.type&&t.setActiveEnvContribution(this)}},{key:"getNativeAABBBounds",value:function(t){return new De}},{key:"removeDom",value:function(t){return!1}},{key:"createDom",value:function(t){return null}},{key:"updateDom",value:function(t,e){return!1}},{key:"getDynamicCanvasCount",value:function(){return 999}},{key:"getStaticCanvasCount",value:function(){return 999}},{key:"getElementById",value:function(t){return document.getElementById(t)}},{key:"getRootElement",value:function(){return document.body}},{key:"loadJson",value:function(t){var e=fetch(t).then((function(t){return t.json()}));return e.then((function(t){return{data:t,state:"success"}})).catch((function(){return{data:null,state:"fail"}})),e}},{key:"loadArrayBuffer",value:function(t){return fetch(t).then((function(t){return t.arrayBuffer()})).then((function(t){return{data:t,loadState:"success"}})).catch((function(){return{data:null,loadState:"fail"}}))}},{key:"loadBlob",value:function(t){return fetch(t).then((function(t){return t.blob()})).then((function(t){return{data:t,loadState:"success"}})).catch((function(){return{data:null,loadState:"fail"}}))}},{key:"getElementTop",value:function(t,e){return 0}},{key:"getElementLeft",value:function(t,e){return 0}},{key:"getElementTopLeft",value:function(t,e){return{top:0,left:0}}}])}();Cv=Ev([L()],Cv);var Bv=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Mv=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Rv=function(){return u((function t(){o(this,t),this._uid=_.GenAutoIncrementId(),this.viewBox=new De,this.modelMatrix=new ze(1,0,0,1,0,0)}),[{key:"onChange",value:function(t){this._onChangeCb=t}},{key:"configure",value:function(t,e){e.env===this.type&&t.setWindowHandler(this)}},{key:"release",value:function(){this.releaseWindow()}},{key:"isVisible",value:function(t){return!0}},{key:"onVisibleChange",value:function(t){}},{key:"getTopLeft",value:function(t){return{top:0,left:0}}},{key:"setViewBox",value:function(t){this.viewBox.setValue(t.x1,t.y1,t.x2,t.y2)}},{key:"getViewBox",value:function(){return this.viewBox}},{key:"setViewBoxTransform",value:function(t,e,i,n,r,a){this.modelMatrix.setValue(t,e,i,n,r,a)}},{key:"getViewBoxTransform",value:function(){return this.modelMatrix}}])}();Rv=Bv([L(),Mv("design:paramtypes",[])],Rv);var Pv=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ov=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Iv=function(t,e){return function(i,n){e(i,n,t)}},Lv=function(){return u((function t(e){o(this,t),this.pickItemInterceptorContributions=e,this.type="default",this.global=Un.global}),[{key:"_init",value:function(){this.InterceptorContributions=this.pickItemInterceptorContributions.getContributions().sort((function(t,e){return t.order-e.order}))}},{key:"pick",value:function(t,e,i){var n={graphic:null,group:null};i.pickerService=this;var r=i.bounds.width(),a=i.bounds.height();if(!(new De).setValue(0,0,r,a).containsPoint(e))return n;this.pickContext&&(this.pickContext.inuse=!0),i.pickContext=this.pickContext,this.pickContext&&this.pickContext.clearMatrix(!0,1);for(var o,s=new ze(1,0,0,1,0,0),u=t.length-1;u>=0&&!(n=t[u].isContainer?this.pickGroup(t[u],e,s,i):this.pickItem(t[u],e,s,i)).graphic;u--)o||(o=n.group);if(n.graphic||(n.group=o),this.pickContext&&(this.pickContext.inuse=!1),n.graphic){for(var l=n.graphic;l.parent;)l=l.parent;l.shadowHost&&(n.params={shadowTarget:n.graphic},n.graphic=l.shadowHost)}return n}},{key:"containsPoint",value:function(t,e,i){var n;return!!(null===(n=this.pickItem(t,e,null,null!=i?i:{pickContext:this.pickContext,pickerService:this}))||void 0===n?void 0:n.graphic)}},{key:"pickGroup",value:function(t,e,i,n){var r=this,a={group:null,graphic:null};if(!1===t.attribute.visibleAll)return a;var o=n.pickContext,s=o.modelMatrix;if(o.camera){var u=t.transMatrix,l=pc.allocate();if(bc(l,u),s){if(l){var c=pc.allocate();o.modelMatrix=_c(c,s,l),pc.free(l)}}else bc(l,t.globalTransMatrix),o.modelMatrix=l}if(this.InterceptorContributions.length)for(var h=0;h<this.InterceptorContributions.length;h++){var d=this.InterceptorContributions[h];if(d.beforePickItem){var f=d.beforePickItem(t,this,e,n,{parentMatrix:i});if(f)return o.modelMatrix!==s&&pc.free(o.modelMatrix),o.modelMatrix=s,f}}var v=t.transMatrix,p=vc.allocateByObj(i),g=new Pe(e.x,e.y);p.transformPoint(g,g);var y=t.AABBBounds.containsPoint(g);if(!y&&!t.stage.camera)return a;var m=this.pickItem(t,g.clone(),i,n);m&&m.graphic&&(a.graphic=m.graphic,a.params=m.params);var k=!1!==t.attribute.pickable&&y;return p.multiply(v.a,v.b,v.c,v.d,v.e,v.f),!1===t.attribute.childrenPickable||m&&m.graphic||Ef(t,En.zIndex,(function(o){if(o.isContainer){var s=new Pe(e.x,e.y),u=Er(t).group,l=t.attribute,c=l.scrollX,h=void 0===c?u.scrollX:c,d=l.scrollY,f=void 0===d?u.scrollY:d;s.x-=h,s.y-=f,a=r.pickGroup(o,s,p,n)}else{var v=new Pe(e.x,e.y);p.transformPoint(v,v);var g=Er(t).group,y=t.attribute,m=y.scrollX,k=void 0===m?g.scrollX:m,b=y.scrollY,_=void 0===b?g.scrollY:b;v.x-=k,v.y-=_;var x=r.pickItem(o,v,i,n);x&&x.graphic&&(a.graphic=x.graphic,a.params=x.params)}return!!a.graphic||!!a.group}),!0,!!o.camera),o.modelMatrix!==s&&pc.free(o.modelMatrix),o.modelMatrix=s,a.graphic||a.group||!k||t.stage.camera||(a.group=t),vc.free(p),a}},{key:"selectPicker",value:function(t){return this.pickerMap.get(t.numberType)||null}}])}();Lv=Pv([L(),Iv(0,O($)),Iv(0,D(tf)),Ov("design:paramtypes",[Object])],Lv);var Dv=!1,jv=new x((function(t){Dv||(Dv=!0,t(yh).toSelf().inSingletonScope(),t(yd).to(yh).inSingletonScope(),t(_d).toService(yd),t(Es).toService(Fc),tt(t,Es))})),Fv=!1,Nv=new x((function(t){Fv||(Fv=!0,t(Vh).toSelf().inSingletonScope(),t(Td).to(Vh).inSingletonScope(),t(_d).toService(Td),t(ih).toSelf(),t(eh).toSelf(),t(Is).toService(ih),t(Is).toService(eh),t(Is).toService(Fc),tt(t,Is))})),zv=!1,Gv=new x((function(t){zv||(zv=!0,t(Ah).toSelf().inSingletonScope(),t(Nf).toSelf().inSingletonScope(),t(wd).to(Ah).inSingletonScope(),t(_d).toService(wd))})),Uv=!1,Wv=new x((function(t){Uv||(Uv=!0,t(Ih).toSelf().inSingletonScope(),t(kd).to(Ih).inSingletonScope(),t(_d).toService(kd),t(Cs).toService(Fc),tt(t,Cs),t(Gf).toSelf().inSingletonScope())})),Vv=!1,Hv=new x((function(t){Vv||(Vv=!0,t(Kh).toSelf().inSingletonScope(),t(Cd).to(Kh).inSingletonScope(),t(_d).toService(Cd),t(Ls).toService(Fc),tt(t,Ls))})),Xv=!1,Yv=new x((function(t){Xv||(Xv=!0,t(_h).toSelf().inSingletonScope(),t(bd).to(_h).inSingletonScope(),t(_d).toService(bd),t(Bs).toService(Fc),tt(t,Bs))})),Kv=!1,qv=new x((function(t){Kv||(Kv=!0,t(Bd).to(ed).inSingletonScope(),t(_d).toService(Bd),t(Ds).toService(Fc),tt(t,Ds))})),Zv=!1,Jv=new x((function(t){Zv||(Zv=!0,t(zh).toSelf().inSingletonScope(),t(Sd).to(zh).inSingletonScope(),t(_d).toService(Sd),t(Ps).toService(Fc),tt(t,Ps))})),$v=!1,Qv=new x((function(t){$v||($v=!0,t(Ad).to(cd).inSingletonScope(),t(_d).toService(Ad),t(Os).toService(Fc),tt(t,Os))})),tp=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ep=function(){return u((function t(){o(this,t),this.numberType=No}),[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){r.drawContribution&&t.getSubGraphic().forEach((function(t){var u=r.drawContribution.getRenderContribution(t);u&&u.drawShape&&u.drawShape(t,e,i,n,r,a,o,s)}))}},{key:"draw",value:function(t,e,i,n){var r=i.context;if(r&&(r.highPerformanceSave(),i.drawContribution)){var a=Er(t),o=t.getSubGraphic();o.length&&o.forEach((function(t){i.drawContribution.renderItem(t,i,{theme:a})})),r.highPerformanceRestore()}}}])}();ep=tp([L()],ep);var ip=!1,np=new x((function(t){ip||(ip=!0,t(Pd).to(ep).inSingletonScope(),t(_d).toService(Pd))})),rp=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ap=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},op=function(t){function i(){var t;return o(this,i),(t=e(this,i)).numberType=Ko,t.builtinContributions=[Jh],t.init(),t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r){var a=Er(t).richtext,o=t.attribute,s=o.strokeOpacity,u=void 0===s?a.strokeOpacity:s,l=o.opacity,c=void 0===l?a.opacity:l,h=o.fillOpacity,d=void 0===h?a.fillOpacity:h,f=o.visible,v=void 0===f?a.visible:f;if(t.valid&&v){var p=ys(c,d,!0),g=ys(c,u,!0);p&&(e.translate(i,n),this.beforeRenderStep(t,e,i,n,p,g,p,g,a,r),t.getFrameCache().draw(e,this.drawIcon),this.afterRenderStep(t,e,i,n,p,g,p,g,a,r))}}},{key:"drawIcon",value:function(t,e,i,n,r){var a,o=Er(t).richtextIcon,s=t.attribute,u=s.width,l=void 0===u?o.width:u,c=s.height,h=void 0===c?o.height:c,d=s.opacity,f=void 0===d?o.opacity:d,v=s.image,p=s.backgroundFill,g=void 0===p?o.backgroundFill:p,y=s.backgroundFillOpacity,m=void 0===y?o.backgroundFillOpacity:y,k=s.backgroundStroke,b=void 0===k?o.backgroundStroke:k,_=s.backgroundStrokeOpacity,x=void 0===_?o.backgroundStrokeOpacity:_,w=s.backgroundRadius,S=void 0===w?o.backgroundRadius:w,A=s.margin,T=t.attribute,E=T.backgroundWidth,C=void 0===E?l:E,B=T.backgroundHeight,M=void 0===B?h:B;if(A&&(i+=t._marginArray[3],n+=t._marginArray[0]),t._hovered){var R=(C-l)/2,P=(M-h)/2;0===S?(e.beginPath(),e.rect(i-R,n-P,C,M)):(e.beginPath(),$c(e,i-R,n-P,C,M,S)),g&&(e.globalAlpha=m,e.fillStyle=g,e.fill()),b&&(e.globalAlpha=x,e.strokeStyle=b,e.stroke())}var O=v&&(null===(a=null==t?void 0:t.resources)||void 0===a?void 0:a.get(v));O&&"success"===O.state&&(e.globalAlpha=f,e.drawImage(O.data,i,n,l,h))}},{key:"draw",value:function(t,e,i){var n=Er(t).richtext;this._draw(t,n,!1,i)}}])}(Cc);op=rp([L(),ap("design:paramtypes",[])],op);var sp=!1,up=new x((function(t){sp||(sp=!0,t(Md).to(op).inSingletonScope(),t(_d).toService(Md))})),lp=!1,cp=new x((function(t){lp||(lp=!0,t(Od).to(pd).inSingletonScope(),t(_d).toService(Od),t(Rs).toService(Fc),tt(t,Rs))})),hp=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},dp=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="rect3d",t.numberType=Yo,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l=Er(t,null==a?void 0:a.theme).rect,c=t.attribute,h=c.fill,d=void 0===h?l.fill:h,f=c.stroke,v=void 0===f?l.stroke:f,p=c.x1,g=c.y1,y=c.x,m=c.y,k=c.opacity,b=void 0===k?l.opacity:k,_=c.fillOpacity,x=void 0===_?l.fillOpacity:_,w=c.lineWidth,S=void 0===w?l.lineWidth:w,A=c.strokeOpacity,T=void 0===A?l.strokeOpacity:A,E=c.visible,C=void 0===E?l.visible:E,B=t.attribute,M=B.width,R=B.height;M=(null!=M?M:p-y)||0,R=(null!=R?R:g-m)||0;var P=null!==(u=this.z)&&void 0!==u?u:0,O=ms(b,x,M,R,d),I=bs(b,T,M,R),L=ps(d),D=gs(v,S);if(t.valid&&C&&(L||D)&&(O||I||o||s)){var j=r.stage||{},F=j.light;j.camera;var N=t.findFace();if(!1!==d){e.setCommonStyle(t,t.attribute,i,n,l);var z=d;"string"!=typeof z&&(z="black"),this.fill(i,n,P,N,z,e,F,o)}!1!==v&&(e.setStrokeStyle(t,t.attribute,i,n,l),this.stroke(i,n,P,N,e))}}},{key:"stroke",value:function(t,e,i,n,r){var a=n.vertices;n.edges.forEach((function(n){var o=a[n[0]],s={x:t+o[0],y:e+o[1],z:i+o[2]},u=a[n[1]],l={x:t+u[0],y:e+u[1],z:i+u[2]};r.beginPath(),r.moveTo(s.x,s.y,s.z),r.lineTo(l.x,l.y,l.z),r.stroke()}))}},{key:"fill",value:function(t,e,i,n,r,a,o,s){var u=Fa.Get(r,Ia.Color255),l=n.vertices,c=l.map((function(t){return a.view(t[0],t[1],t[2])[2]})),h=[];n.polygons.forEach((function(t,e){h.push({faceIdx:e,polygon:t});var i=t.polygon;t.normal;var n=c[i[0]],r=c[i[1]],a=c[i[2]],o=c[i[3]];t.ave_z=n+r+a+o})),h.sort((function(t,e){return e.polygon.ave_z-t.polygon.ave_z})),h.forEach((function(n){var c=n.polygon,h=c.polygon,d=c.normal,f=l[h[0]],v=l[h[1]],p=l[h[2]],g=l[h[3]],y={x:t+f[0],y:e+f[1],z:i+f[2]},m={x:t+v[0],y:e+v[1],z:i+v[2]},k={x:t+p[0],y:e+p[1],z:i+p[2]},b={x:t+g[0],y:e+g[1],z:i+g[2]};a.beginPath(),a.moveTo(y.x,y.y,y.z),a.lineTo(m.x,m.y,m.z),a.lineTo(k.x,k.y,k.z),a.lineTo(b.x,b.y,b.z),a.closePath(),s?s(a,null,null):(a.fillStyle=o?o.computeColor(d,u):r,a.fill())}))}},{key:"draw",value:function(t,e,i){var n=Er(t).rect;this._draw(t,n,!1,i)}}])}(Cc);dp=hp([L()],dp);var fp=!1,vp=new x((function(t){fp||(fp=!0,t(Ed).to(dp).inSingletonScope(),t(_d).toService(Ed))})),pp=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};var gp=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).numberType=Do,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l=Er(t,null==a?void 0:a.theme).arc,c=t.attribute.fill,h=void 0===c?l.fill:c,d=this.valid(t,l,o,s);if(d){var f=d.fVisible,v=d.sVisible,p=d.doFill,g=d.doStroke,y=null!==(u=this.z)&&void 0!==u?u:0,m=t.attribute,k=m.outerPadding,b=void 0===k?l.outerPadding:k,_=m.innerPadding,x=void 0===_?l.innerPadding:_,w=m.height,S=void 0===w?10:w,A=t.attribute,T=A.outerRadius,E=void 0===T?l.outerRadius:T,C=A.innerRadius,B=void 0===C?l.innerRadius:C;E+=b,B-=x;var M=Fa.Get(h,Ia.Color255),R=(r.stage||{}).light,P=r.hack_pieFace,O={top:y,bottom:y+S},I={top:[0,1,0],bottom:[0,-1,0],outside:[1,0,-1],inside:[1,0,-1]};"bottom"===P||"top"===P?(e.beginPath(),function(t,e,i,n,r,a,o){var s=t.getParsedAngle(),u=s.startAngle,l=s.endAngle,c=be(l-u),h=l>u,d=!1;if(a<o){var f=a;a=o,o=f}if(a<=pe)e.moveTo(i,n,r);else if(c>=ke-pe)e.moveTo(i+a*xe(u),n+a*Ae(u),r),e.arc(i,n,a,u,l,!h,r),o>pe&&(e.moveTo(i+o*xe(l),n+o*Ae(l),r),e.arc(i,n,o,l,u,h,r));else{var v=t.getParsePadAngle(u,l),p=v.outerDeltaAngle,g=v.innerDeltaAngle,y=v.outerStartAngle,m=v.outerEndAngle,k=v.innerEndAngle,b=v.innerStartAngle,_=a*xe(y),x=a*Ae(y),w=o*xe(k),S=o*Ae(k);p<.001?d=!0:(e.moveTo(i+_,n+x,r),e.arc(i,n,a,y,m,!h,r)),!(o>pe)||g<.001?(e.lineTo(i+w,n+S,r),d=!0):(e.lineTo(i+w,n+S,r),e.arc(i,n,o,k,b,h,r))}e.closePath()}(t,e,i,n,O[P],E,B),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),p&&(o?o(e,t.attribute,l):f&&(e.setCommonStyle(t,t.attribute,i,n,l),e.fillStyle=R?R.computeColor(I[P],M):h,e.fill())),g&&(s?s(e,t.attribute,l):v&&(e.setStrokeStyle(t,t.attribute,i,n,l),e.stroke()))):"outside"!==P&&"inside"!==P||("inside"===P&&(e.save(),e.beginPath(),e.arc(i,n,B,0,ke,!0,O.top),e.clip()),e.beginPath(),function(t,e,i,n,r,a,o,s){var u=t.getParsedAngle(),l=u.startAngle,c=u.endAngle,h=be(c-l),d=c>l,f=!1;if(o<=pe)e.moveTo(i,n,r);else if(h>=ke-pe)e.moveTo(i+o*xe(l),n+o*Ae(l),r),e.arc(i,n,o,l,c,!d,r),e.lineTo(i+o*xe(c),n+o*Ae(c),a),e.arc(i,n,o,c,l,d,a);else{var v=s(l,c),p=v.innerouterDeltaAngle,g=v.innerouterStartAngle,y=v.innerouterEndAngle,m=o*xe(g),k=o*Ae(g),b=o*xe(y),_=o*Ae(y);p<.001?f=!0:(e.moveTo(i+m,n+k,r),e.arc(i,n,o,g,y,!d,r),e.lineTo(i+b,n+_,a),e.arc(i,n,o,y,g,d,a))}e.closePath()}(t,e,i,n,O.top,O.bottom,"outside"===P?E:B,(function(e,i){var n=t.getParsePadAngle(e,i),r=n.outerDeltaAngle,a=n.innerDeltaAngle,o=n.outerStartAngle,s=n.outerEndAngle,u=n.innerEndAngle,l=n.innerStartAngle;return"outside"===P?{innerouterDeltaAngle:r,innerouterEndAngle:s,innerouterStartAngle:o}:{innerouterDeltaAngle:a,innerouterEndAngle:u,innerouterStartAngle:l}})),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),p&&(o?o(e,t.attribute,l):f&&(e.setCommonStyle(t,t.attribute,i,n,l),e.fillStyle=R?R.computeColor(I[P],M):h,e.fill())),g&&(s?s(e,t.attribute,l):v&&(e.setStrokeStyle(t,t.attribute,i,n,l),e.stroke())),"inside"===P&&e.restore())}}},{key:"draw",value:function(t,e,i,n){var r=Er(t,null==n?void 0:n.theme).arc;this._draw(t,r,!1,i,n)}}])}(Cc);gp=pp([L()],gp);var yp=!1,mp=new x((function(t){yp||(yp=!0,t(md).to(gp).inSingletonScope(),t(_d).toService(md))})),kp=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},bp=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="pyramid3d",t.numberType=Ho,t}return c(i,t),u(i,[{key:"drawShape",value:function(t,e,i,n,r,a,o,s){var u,l=Er(t,null==a?void 0:a.theme).polygon,c=t.attribute,h=c.fill,d=void 0===h?l.fill:h,f=c.stroke,v=void 0===f?l.stroke:f,p=c.face,g=void 0===p?[!0,!0,!0,!0,!0,!0]:p,y=null!==(u=this.z)&&void 0!==u?u:0;if(this.valid(t,l,o,s)){var m=r.stage||{},k=m.light,b=m.camera,_=t.findFace();if(!1!==d){e.setCommonStyle(t,t.attribute,i,n,l);var x=d;"string"!=typeof x&&(x="black"),this.fill(i,n,y,_,g,x,e,k,b,t,l,o)}!1!==v&&(e.setStrokeStyle(t,t.attribute,i,n,l),this.stroke(i,n,y,_,e))}}},{key:"stroke",value:function(t,e,i,n,r){var a=n.vertices;n.edges.forEach((function(n){var o=a[n[0]],s=a[n[1]],u={x:t+o[0],y:e+o[1],z:i+o[2]},l={x:t+s[0],y:e+s[1],z:i+s[2]};r.beginPath(),r.moveTo(u.x,u.y,u.z),r.lineTo(l.x,l.y,l.z),r.stroke()}))}},{key:"fill",value:function(t,e,i,n,r,a,o,s,u,l,c,h){var d=Fa.Get(a,Ia.Color255),f=n.vertices,v=f.map((function(t){return o.view(t[0],t[1],t[2])[2]})),p=[];n.polygons.forEach((function(t,e){if(r[e]){p.push({faceIdx:e,polygon:t});var i=t.polygon;t.normal;var n=v[i[0]],a=v[i[1]],o=v[i[2]],s=v[i[3]];t.ave_z=n+a+o+s}})),p.sort((function(t,e){return e.polygon.ave_z-t.polygon.ave_z})),p.forEach((function(n){var r=n.polygon,u=r.polygon,v=r.normal,p=f[u[0]],g=f[u[1]],y=f[u[2]],m=f[u[3]],k={x:t+p[0],y:e+p[1],z:i+p[2]},b={x:t+g[0],y:e+g[1],z:i+g[2]},_={x:t+y[0],y:e+y[1],z:i+y[2]},x={x:t+m[0],y:e+m[1],z:i+m[2]};o.beginPath(),o.moveTo(k.x,k.y,k.z),o.lineTo(b.x,b.y,b.z),o.lineTo(_.x,_.y,_.z),o.lineTo(x.x,x.y,x.z),o.closePath(),h?h(o,l.attribute,c):(o.fillStyle=s?s.computeColor(v,d):a,o.fill())}))}},{key:"draw",value:function(t,e,i){var n=Er(t).polygon;this._draw(t,n,!1,i)}}])}(Cc);bp=kp([L()],bp);var _p=!1,xp=new x((function(t){_p||(_p=!0,t(Rd).to(bp).inSingletonScope(),t(_d).toService(Rd))}));function wp(){Ac.RegisterGraphicCreator("shadowRoot",lc)}var Sp=Symbol.for("MathPickerContribution"),Ap=Symbol.for("MathArcPicker"),Tp=Symbol.for("MathAreaPicker"),Ep=Symbol.for("MathCirclePicker"),Cp=Symbol.for("MathImagePicker"),Bp=Symbol.for("MathLinePicker"),Mp=Symbol.for("MathPathPicker"),Rp=Symbol.for("MathRectPicker"),Pp=Symbol.for("MathSymbolPicker"),Op=Symbol.for("MathTextPicker"),Ip=Symbol.for("MathPolygonPicker"),Lp=Symbol.for("MathGlyphPicker"),Dp=Symbol.for("CanvasArcPicker"),jp=Symbol.for("CanvasArc3dPicker"),Fp=Symbol.for("CanvasAreaPicker"),Np=Symbol.for("CanvasCirclePicker"),zp=Symbol.for("CanvasImagePicker"),Gp=Symbol.for("CanvasLinePicker"),Up=Symbol.for("CanvasPathPicker"),Wp=Symbol.for("CanvasRectPicker"),Vp=Symbol.for("CanvasRect3dPicker"),Hp=Symbol.for("CanvasSymbolPicker"),Xp=Symbol.for("CanvasTextPicker"),Yp=Symbol.for("CanvasPolygonPicker"),Kp=Symbol.for("CanvasPyramid3dPicker"),qp=Symbol.for("CanvasRichTextPicker"),Zp=Symbol.for("CanvasGlyphPicker"),Jp=Symbol.for("CanvasGroupPicker"),$p=Symbol.for("CanvasPickerContribution"),Qp=function(){return u((function t(e){var i=this;o(this,t),this.onPointerDown=function(t){var e=t.target,n=i.rootNode,r=e===n;if(e&&!r){var a,o=function(t){if(s||(t.type="dragstart",null==e||e.dispatchEvent(t),s=!0),t.type="drag",null==e||e.dispatchEvent(t),!r){e.attribute.pickable=!1;var i=(null==n?void 0:n.pick(t.global.x,t.global.y)).graphic;e.attribute.pickable=!0,a!==i&&(a&&(t.type="dragleave",t.target=a,a.dispatchEvent(t)),i&&(t.type="dragenter",t.target=i,i.dispatchEvent(t)),(a=i)&&(t.type="dragover",t.target=a,a.dispatchEvent(t)))}},s=!1;null==n||n.addEventListener("pointermove",o);var u=function(){s&&(a&&(t.type="drop",t.target=a,a.dispatchEvent(t)),t.type="dragend",e.dispatchEvent(t),s=!1),null==n||n.removeEventListener("pointermove",o)};e.addEventListener("pointerup",u,{once:!0}),e.addEventListener("pointerupoutside",u,{once:!0})}},this.rootNode=e,this.initEvents()}),[{key:"initEvents",value:function(){var t;null===(t=this.rootNode)||void 0===t||t.addEventListener("pointerdown",this.onPointerDown)}},{key:"removeEvents",value:function(){var t;null===(t=this.rootNode)||void 0===t||t.removeEventListener("pointerdown",this.onPointerDown)}},{key:"release",value:function(){this.removeEvents(),this.rootNode=null}}])}(),tg=function(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.abs(i)>Math.abs(n)?i>0?"right":"left":n>0?"down":"up"},eg=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return Math.sqrt(i*i+n*n)},ig=function(t){function i(t){var n,r,a,s,u,l,c,h,d,v,p,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,i),(n=e(this,i)).cachedEvents=[],n.startPoints=[],n.processEvent={},n.throttleTimer=0,n.emitThrottles=[],n.lastTapTarget=null,n.onStart=function(t){n.reset(),n.startTime=Lr.now();var e=f(n),i=e.cachedEvents,r=e.startPoints;t&&i.push(t.clone()),r.length=i.length;for(var a=0;a<i.length;a++){var o=i[a],s={x:o.x,y:o.y};r[a]=s}if(1!==r.length)n.startDistance=eg(r[0],r[1]),n.center=function(t){var e=t.length;if(1===e)return{x:Math.round(t[0].x),y:Math.round(t[0].y)};for(var i=0,n=0,r=0;r<e;)i+=t[r].x,n+=t[r].y,r++;return{x:Math.round(i/e),y:Math.round(n/e)}}([r[0],r[1]]);else{var u=i[0];n.pressTimeout=setTimeout((function(){u.direction="none",u.deltaX=0,u.deltaY=0,u.points=r,n.triggerStartEvent("press",u),n.triggerEvent("press",u),n.eventType="press",n.direction="none"}),n.config.press.time)}},n.onMove=function(t){n.clearPressTimeout();var e=f(n),i=e.startPoints,r=e.cachedEvents;if(i.length){for(var a=t.clone(),o=a.x,s=a.y,u=a.pointerId,l=0,c=r.length;l<c;l++)if(u===r[l].pointerId){r[l]=a;break}var h={x:o,y:s},d=r.map((function(t){return{x:t.x,y:t.y}})),v=Lr.now();if(n.prevMoveTime=n.lastMoveTime,n.prevMovePoint=n.lastMovePoint,n.lastMoveTime=v,n.lastMovePoint=h,1===i.length){var p=i[0],g=o-p.x,y=s-p.y,m=n.direction||tg(p,h);n.direction=m;var k=n.getEventType(h);return a.direction=m,a.deltaX=g,a.deltaY=y,a.points=d,n.triggerStartEvent(k,a),void n.triggerEvent(k,a)}var b=f(n).startDistance,_=eg(d[0],d[1]);a.scale=_/b,a.center=n.center,a.points=d,n.triggerStartEvent("pinch",a),n.triggerEvent("pinch",a)}},n.onEnd=function(t){var e=t.clone(),i=f(n),r=i.cachedEvents,a=i.startPoints,o=r.map((function(t){return{x:t.x,y:t.y}}));if(e.points=o,n.triggerEndEvent(e),1===r.length){var s=Lr.now(),u=n.lastMoveTime;if(s-u<100){var l=u-(n.prevMoveTime||n.startTime);if(l>0){var c=n.prevMovePoint||a[0],h=n.lastMovePoint||a[0],d=eg(c,h),v=d/l;v>n.config.swipe.velocity&&d>n.config.swipe.threshold&&(e.velocity=v,e.direction=tg(c,h),n.triggerEvent("swipe",e))}}s-n.lastTapTime<n.config.tap.interval&&t.target===n.lastTapTarget?n.tapCount++:n.tapCount=1,n.lastTapTime=s,n.lastTapTarget=t.target,1===n.tapCount?n.triggerEvent("tap",e):2===n.tapCount&&(n.triggerEvent("doubletap",e),n.tapCount=0)}for(var p=0,g=r.length;p<g;p++)if(r[p].pointerId===e.pointerId){r.splice(p,1),a.splice(p,1);break}n.reset(),r.length>0&&n.onStart()},n.element=t,n.tapCount=0,n.lastTapTime=0,n.config={press:{time:null!==(a=null===(r=null==g?void 0:g.press)||void 0===r?void 0:r.time)&&void 0!==a?a:251,threshold:null!==(u=null===(s=null==g?void 0:g.press)||void 0===s?void 0:s.threshold)&&void 0!==u?u:9},swipe:{threshold:null!==(c=null===(l=null==g?void 0:g.swipe)||void 0===l?void 0:l.threshold)&&void 0!==c?c:10,velocity:null!==(d=null===(h=null==g?void 0:g.swipe)||void 0===h?void 0:h.velocity)&&void 0!==d?d:.3},tap:{interval:null!==(p=null===(v=null==g?void 0:g.tap)||void 0===v?void 0:v.interval)&&void 0!==p?p:300}},n.initEvents(),n}return c(i,t),u(i,[{key:"initEvents",value:function(){var t=this.element;t&&(t.addEventListener("pointerdown",this.onStart),t.addEventListener("pointermove",this.onMove),t.addEventListener("pointerup",this.onEnd),t.addEventListener("pointerupoutside",this.onEnd))}},{key:"removeEvents",value:function(){var t=this.element;t&&(t.removeEventListener("pointerdown",this.onStart),t.removeEventListener("pointermove",this.onMove),t.removeEventListener("pointerup",this.onEnd),t.removeEventListener("pointerupoutside",this.onEnd))}},{key:"release",value:function(){this.removeEvents(),this.element=null}},{key:"getEventType",value:function(t){var e,i=this.eventType,n=this.startTime,r=this.startPoints;return i||(e=Lr.now()-n>this.config.press.time&&eg(r[0],t)<this.config.press.threshold?"press":"pan",this.eventType=e,e)}},{key:"enable",value:function(t){this.processEvent[t]=!0}},{key:"isProcess",value:function(t){return this.processEvent[t]}},{key:"pushEvent",value:function(t,e){for(var i=this.emitThrottles,n={type:t,ev:e},r=0,a=i.length;r<a;r++)if(i[r].type===t)return void i.splice(r,1,n);i.push(n)}},{key:"clearPressTimeout",value:function(){this.pressTimeout&&(clearTimeout(this.pressTimeout),this.pressTimeout=null)}},{key:"reset",value:function(){this.clearPressTimeout(),this.startTime=0,this.startDistance=0,this.direction=null,this.eventType=null,this.prevMoveTime=0,this.prevMovePoint=null,this.lastMoveTime=0,this.lastMovePoint=null}},{key:"triggerEvent",value:function(t,e){var i=this;this.pushEvent(t,e);var n=this.throttleTimer,r=this.emitThrottles;n||(this.throttleTimer=Un.global.getRequestAnimationFrame()((function(){for(var t=0,e=r.length;t<e;t++){var n=r[t],a=n.type,o=n.ev;i.emitEvent(a,o)}i.throttleTimer=0,i.emitThrottles.length=0})))}},{key:"triggerStartEvent",value:function(t,e){this.isProcess(t)||(this.enable(t),this.triggerEvent("".concat(t,"start"),e))}},{key:"triggerEndEvent",value:function(t){var e=this,i=this.processEvent;Object.keys(i).forEach((function(n){e.triggerEvent("".concat(n,"end"),t),"press"===n&&e.triggerEvent("".concat(n,"up"),t),delete i[n]}))}},{key:"emitEvent",value:function(t,e){var i=this.element._events["*"];if(i)if("fn"in i)i.fn.call(i.context,e,t);else for(var n=0,r=i.length;n<r&&!e.propagationImmediatelyStopped;n++)i[n].fn.call(i[n].context,e,t);this.emit(t,e)}}])}(ct),ng=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},rg=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ag=[0,0,0],og=function(){return u((function t(e,i){o(this,t),this.fillAttributes=Object.assign(Object.assign({},_n),{opacity:1}),this.strokeAttributes=Object.assign(Object.assign({},wn),{opacity:1}),this.textAttributes=Object.assign(Object.assign({},Sn),{opacity:1}),this._clearShadowStyle=!1,this._clearFilterStyle=!1,this._clearGlobalCompositeOperationStyle=!1;var n=e.nativeCanvas.getContext("2d");if(!n)throw new Error("发生错误,获取2d上下文失败");this.nativeContext=n,this.canvas=e,this.matrix=new ze(1,0,0,1,0,0),this.stack=[],this.dpr=i,this.applyedMatrix=new ze(1,0,0,1,0,0),this._clearMatrix=new ze(1,0,0,1,0,0),this.baseGlobalAlpha=1}),[{key:"fillStyle",get:function(){return this.nativeContext.fillStyle},set:function(t){this.nativeContext.fillStyle=t}},{key:"font",get:function(){return this.nativeContext.font},set:function(t){this.nativeContext.font=t}},{key:"globalAlpha",get:function(){return this.nativeContext.globalAlpha},set:function(t){this.nativeContext.globalAlpha=t*this.baseGlobalAlpha}},{key:"lineCap",get:function(){return this.nativeContext.lineCap},set:function(t){this.nativeContext.lineCap=t}},{key:"lineDashOffset",get:function(){return this.nativeContext.lineDashOffset},set:function(t){this.nativeContext.lineDashOffset=t}},{key:"lineJoin",get:function(){return this.nativeContext.lineJoin},set:function(t){this.nativeContext.lineJoin=t}},{key:"lineWidth",get:function(){return this.nativeContext.lineWidth},set:function(t){this.nativeContext.lineWidth=t}},{key:"miterLimit",get:function(){return this.nativeContext.miterLimit},set:function(t){this.nativeContext.miterLimit=t}},{key:"shadowBlur",get:function(){return this.nativeContext.shadowBlur},set:function(t){this.nativeContext.shadowBlur=t}},{key:"shadowColor",get:function(){return this.nativeContext.shadowColor},set:function(t){this.nativeContext.shadowColor=t}},{key:"shadowOffsetX",get:function(){return this.nativeContext.shadowOffsetX},set:function(t){this.nativeContext.shadowOffsetX=t}},{key:"shadowOffsetY",get:function(){return this.nativeContext.shadowOffsetY},set:function(t){this.nativeContext.shadowOffsetY=t}},{key:"strokeStyle",get:function(){return this.nativeContext.strokeStyle},set:function(t){this.nativeContext.strokeStyle=t}},{key:"textAlign",get:function(){return this.nativeContext.textAlign},set:function(t){this.nativeContext.textAlign=t}},{key:"textBaseline",get:function(){return this.nativeContext.textBaseline},set:function(t){this.nativeContext.textBaseline=t}},{key:"inuse",get:function(){return!!this._inuse},set:function(t){t!==!!this._inuse&&(this._inuse=t,t?(this.nativeContext.save(),this.reset()):this.nativeContext.restore())}},{key:"reset",value:function(){this.stack.length&&te.getInstance().warn("可能存在bug,matrix没有清空"),this.matrix.setValue(1,0,0,1,0,0),this.applyedMatrix=new ze(1,0,0,1,0,0),this.stack.length=0,this.nativeContext.setTransform(1,0,0,1,0,0)}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getContext",value:function(){return this.nativeContext}},{key:"setTransformForCurrent",value:function(){!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.applyedMatrix.equalToMatrix(this.matrix)||(this.applyedMatrix.setValue(this.matrix.a,this.matrix.b,this.matrix.c,this.matrix.d,this.matrix.e,this.matrix.f),this.nativeContext.setTransform(this.matrix.a,this.matrix.b,this.matrix.c,this.matrix.d,this.matrix.e,this.matrix.f))}},{key:"currentMatrix",get:function(){return this.matrix}},{key:"cloneMatrix",value:function(t){return vc.allocateByObj(t)}},{key:"clear",value:function(){this.save(),this.resetTransform(),this.nativeContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.restore()}},{key:"restore",value:function(){this.nativeContext.restore(),this.stack.length>0&&(vc.free(this.matrix),this.matrix=this.stack.pop(),this.setTransformForCurrent(!0))}},{key:"highPerformanceRestore",value:function(){this.stack.length>0&&(vc.free(this.matrix),this.matrix=this.stack.pop())}},{key:"rotate",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.matrix.rotate(t),e&&this.setTransformForCurrent()}},{key:"save",value:function(){var t=this.cloneMatrix(this.matrix);this.stack.push(t),this.nativeContext.save()}},{key:"highPerformanceSave",value:function(){var t=this.cloneMatrix(this.matrix);this.stack.push(t)}},{key:"scale",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.matrix.scale(t,e),i&&this.setTransformForCurrent()}},{key:"setScale",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.matrix.setScale(t,e),i&&this.setTransformForCurrent()}},{key:"scalePoint",value:function(t,e,i,n){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];this.translate(i,n,!1),this.scale(t,e,!1),this.translate(-i,-n,!1),r&&this.setTransformForCurrent()}},{key:"setTransform",value:function(t,e,i,n,r,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:this.dpr;this.matrix.setValue(s*t,s*e,s*i,s*n,s*r,s*a),o&&this.setTransformForCurrent()}},{key:"setTransformFromMatrix",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dpr;this.matrix.setValue(t.a*i,t.b*i,t.c*i,t.d*i,t.e*i,t.f*i),e&&this.setTransformForCurrent()}},{key:"resetTransform",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.dpr;this.setTransform(e,0,0,e,0,0),t&&this.setTransformForCurrent()}},{key:"transform",value:function(t,e,i,n,r,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];this.matrix.multiply(t,e,i,n,r,a),o&&this.setTransformForCurrent()}},{key:"transformFromMatrix",value:function(t,e){this.matrix.multiply(t.a,t.b,t.c,t.d,t.e,t.f),e&&this.setTransformForCurrent()}},{key:"translate",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.matrix.translate(t,e),i&&this.setTransformForCurrent()}},{key:"rotateDegrees",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t*Math.PI/180;this.rotate(i,e)}},{key:"rotateAbout",value:function(t,e,i){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.translate(e,i,!1),this.rotate(t,!1),this.translate(-e,-i,!1),n&&this.setTransformForCurrent()}},{key:"rotateDegreesAbout",value:function(t,e,i){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.translate(e,i,!1),this.rotateDegrees(t,!1),this.translate(-e,-i,!1),n&&this.setTransformForCurrent()}},{key:"beginPath",value:function(){this.disableBeginPath||this.nativeContext.beginPath()}},{key:"clip",value:function(t,e){t?"string"==typeof t?this.nativeContext.clip(t):this.nativeContext.clip(t,e):this.nativeContext.clip()}},{key:"arc",value:function(t,e,i,n,r,a,o){if(o=o||0,this.camera){var s=[];!function(t,e,i,n,r,a,o,s){if(s)for(;i>e;)i-=ke;else for(;i<e;)i+=ke;for(var u=ge/3*(i>e?1:-1),l=e,c=l;c!==i;){c=u>0?Math.min(c+u,i):Math.max(c+u,i);var h=Math.abs(c-l),d=4*Math.tan(h/4)/3,f=c<l?-1:1,v=Math.cos(l),p=Math.sin(l),g=Math.cos(c),y=Math.sin(c),m=v*a+n,k=p*o+r,b=g*a+n,_=y*o+r,x=a*d*f,w=o*d*f;t.push([m-x*p,k+w*v,b+x*y,_-w*g,b,_]),l=c}}(s,n,r,t,e,i,i,a);for(var u=0;u<s.length;++u){var l=s[u];this.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5],o)}}else this.nativeContext.arc(t,e,i,n,r,a)}},{key:"arcTo",value:function(t,e,i,n,r){this.nativeContext.arcTo(t,e,i,n,r)}},{key:"bezierCurveTo",value:function(t,e,i,n,r,a,o){if(o=o||0,this.camera){var s=o,u=o;this.modelMatrix&&(dv(ag,[t,e,o],this.modelMatrix),t=ag[0],e=ag[1],s=ag[2],dv(ag,[i,n,o],this.modelMatrix),i=ag[0],n=ag[1],u=ag[2],dv(ag,[r,a,o],this.modelMatrix),r=ag[0],a=ag[1],o=ag[2]);var l=this.camera.vp(r,a,o);r=l.x,a=l.y,t=(l=this.camera.vp(t,e,s)).x,e=l.y,i=(l=this.camera.vp(i,n,u)).x,n=l.y}this.nativeContext.bezierCurveTo(t,e,i,n,r,a)}},{key:"closePath",value:function(){this.nativeContext.closePath()}},{key:"ellipse",value:function(t,e,i,n,r,a,o,s){null==s?this.nativeContext.ellipse(t,e,i,n,r,a,o):this.nativeContext.ellipse(t,e,i,n,r,a,o,s)}},{key:"lineTo",value:function(t,e,i){if(i=i||0,this.camera){this.modelMatrix&&(dv(ag,[t,e,i],this.modelMatrix),t=ag[0],e=ag[1],i=ag[2]);var n=this.camera.vp(t,e,i);t=n.x,e=n.y}this.nativeContext.lineTo(t,e)}},{key:"moveTo",value:function(t,e,i){if(i=i||0,this.camera){this.modelMatrix&&(dv(ag,[t,e,i],this.modelMatrix),t=ag[0],e=ag[1],i=ag[2]);var n=this.camera.vp(t,e,i);t=n.x,e=n.y}this.nativeContext.moveTo(t,e)}},{key:"quadraticCurveTo",value:function(t,e,i,n,r){if(r=r||0,this.camera){var a=r;this.modelMatrix&&(dv(ag,[t,e,r],this.modelMatrix),t=ag[0],e=ag[1],a=ag[2],dv(ag,[i,n,r],this.modelMatrix),i=ag[0],n=ag[1],r=ag[2]);var o=this.camera.vp(i,n,r);i=o.x,n=o.y,t=(o=this.camera.vp(t,e,a)).x,e=o.y}this.nativeContext.quadraticCurveTo(t,e,i,n)}},{key:"rect",value:function(t,e,i,n,r){r=r||0,this.camera?(this.moveTo(t,e,r),this.lineTo(t+i,e,r),this.lineTo(t+i,e+n,r),this.lineTo(t,e+n,r),this.closePath()):this.nativeContext.rect(t,e,i,n)}},{key:"createImageData",value:function(){var t=arguments;return 2===t.length?this.nativeContext.createImageData(t[0],t[1]):1===t.length?this.nativeContext.createImageData(t[0]):null}},{key:"createLinearGradient",value:function(t,e,i,n){return this.nativeContext.createLinearGradient(t,e,i,n)}},{key:"createPattern",value:function(t,e){return 0===t.width||0===t.height?null:this.nativeContext.createPattern(t,e)}},{key:"createRadialGradient",value:function(t,e,i,n,r,a){return this.nativeContext.createRadialGradient(t,e,i,n,r,a)}},{key:"createConicGradient",value:function(t,e,i,n){var r,a=!1,o=this;return{stops:[],addColorStop:function(t,e){this.stops.push([t,e]),a=!0},GetPattern:function(s,u,l){return a&&(l||(l=n-i),r=function(t,e,i,n,r,a,o,s,u){var l=Math.floor(180*r/Math.PI),c=Ss.GetCanvas(),h=Ss.GetCtx();if(!h)return null;var d=Ts.GetSize(s),f=Ts.GetSize(u),v=Ts.Get(e,i,n,a,o,d,f);if(v)return v;var p=Math.sqrt(Math.max(Math.max(Math.pow(i,2)+Math.pow(n,2),Math.pow(d-i,2)+Math.pow(n,2)),Math.max(Math.pow(d-i,2)+Math.pow(f-n,2),Math.pow(i,2)+Math.pow(f-n,2)))),g=l+1,y=r/Math.max(1,g-1),m=As.getInstance().GetOrCreate(i,n,d,f,e,g),k=2*Math.PI*p/360;c.width=d,c.height=f,h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,d,f),h.translate(i,n),h.rotate(a);for(var b=0,_=g-1;b<_&&!(a+b*y>o);b++){var x=m.getColor(b);h.beginPath(),h.rotate(y),h.moveTo(0,0),h.lineTo(p,-2*k),h.lineTo(p,0),h.fillStyle=x,h.closePath(),h.fill()}var w=h.getImageData(0,0,d,f);return c.width=w.width,c.height=w.height,h.putImageData(w,0,0),(v=t.createPattern(c,"no-repeat"))&&Ts.Set(e,i,n,a,o,v,d,f),v}(o,this.stops,t,e,l,i,n,s,u),a=!1),r}}}},{key:"fill",value:function(t,e){this.disableFill||(t?this.nativeContext.fill(t):this.nativeContext.fill())}},{key:"fillRect",value:function(t,e,i,n){this.nativeContext.fillRect(t,e,i,n)}},{key:"clearRect",value:function(t,e,i,n){this.nativeContext.clearRect(t,e,i,n)}},{key:"project",value:function(t,e,i){if(i=i||0,this.camera){this.modelMatrix&&(dv(ag,[t,e,i],this.modelMatrix),t=ag[0],e=ag[1],i=ag[2]);var n=this.camera.vp(t,e,i);t=n.x,e=n.y}return{x:t,y:e}}},{key:"view",value:function(t,e,i){return i=i||0,this.camera?(this.modelMatrix&&(dv(ag,[t,e,i],this.modelMatrix),t=ag[0],e=ag[1],i=ag[2]),this.camera.view(t,e,i)):[t,e,i]}},{key:"fillText",value:function(t,e,i,n){if(n=n||0,this.camera){this.modelMatrix&&(dv(ag,[e,i,n],this.modelMatrix),e=ag[0],i=ag[1],n=ag[2]);var r=this.camera.vp(e,i,n);e=r.x,i=r.y}this.nativeContext.fillText(t,e,i)}},{key:"getImageData",value:function(t,e,i,n){return this.nativeContext.getImageData(t,e,i,n)}},{key:"getLineDash",value:function(){return this.nativeContext.getLineDash()}},{key:"isPointInPath",value:function(t,e){return this.nativeContext.isPointInPath(t,e)}},{key:"isPointInStroke",value:function(t,e){return this.nativeContext.isPointInStroke(t,e)}},{key:"measureText",value:function(t){var e,i,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Un.global.measureTextMethod;if(!r||"native"===r)return this.nativeContext.measureText(t);this.mathTextMeasure||(this.mathTextMeasure=Un.graphicUtil.createTextMeasureInstance({},{},(function(){return n.canvas.nativeCanvas})));var a=null!==(e=this.fontFamily)&&void 0!==e?e:Sn.fontFamily,o=null!==(i=this.fontSize)&&void 0!==i?i:Sn.fontSize;return this.mathTextMeasure.textSpec.fontFamily===a&&this.mathTextMeasure.textSpec.fontSize===o||(this.mathTextMeasure.textSpec.fontFamily=a,this.mathTextMeasure.textSpec.fontSize=o,this.mathTextMeasure._numberCharSize=null,this.mathTextMeasure._fullCharSize=null,this.mathTextMeasure._letterCharSize=null,this.mathTextMeasure._specialCharSizeMap={}),this.mathTextMeasure.measure(t,r)}},{key:"putImageData",value:function(t,e,i){this.nativeContext.putImageData(t,e,i)}},{key:"setLineDash",value:function(t){var e=arguments,i=this.nativeContext;this.nativeContext.setLineDash?e[0]&&i.setLineDash(e[0]):"mozDash"in i?i.mozDash=e[0]:"webkitLineDash"in i&&(i.webkitLineDash=e[0])}},{key:"stroke",value:function(t){this.disableStroke||(t?this.nativeContext.stroke(t):this.nativeContext.stroke())}},{key:"strokeRect",value:function(t,e,i,n){this.nativeContext.strokeRect(t,e,i,n)}},{key:"strokeText",value:function(t,e,i,n){if(n=n||0,this.camera){this.modelMatrix&&(dv(ag,[e,i,n],this.modelMatrix),e=ag[0],i=ag[1],n=ag[2]);var r=this.camera.vp(e,i,n);e=r.x,i=r.y}this.nativeContext.strokeText(t,e,i)}},{key:"drawImage",value:function(){var t=this.nativeContext,e=arguments;3===e.length?t.drawImage(e[0],e[1],e[2]):5===e.length?t.drawImage(e[0],e[1],e[2],e[3],e[4]):9===e.length&&t.drawImage(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}},{key:"setCommonStyle",value:function(t,e,i,n,r){if(Array.isArray(r)){if(r.length<=1)return this._setCommonStyle(t,e,i,n,r[0]);var a=Object.create(r[0]);return r.forEach((function(t,e){0!==e&&Object.assign(a,t)})),this._setCommonStyle(t,e,i,n,a)}return this._setCommonStyle(t,e,i,n,r)}},{key:"_setCommonStyle",value:function(t,e,i,n,r){var a=this.nativeContext;r||(r=this.fillAttributes);var o=e.fillOpacity,s=void 0===o?r.fillOpacity:o,u=e.opacity,l=void 0===u?r.opacity:u,c=e.fill,h=void 0===c?r.fill:c;s>1e-12&&l>1e-12?(a.globalAlpha=s*l*this.baseGlobalAlpha,a.fillStyle=Pc(this,h,t,i,n)):a.globalAlpha=s*l*this.baseGlobalAlpha}},{key:"setShadowBlendStyle",value:function(t,e,i){if(Array.isArray(i)){if(i.length<=1)return this._setShadowBlendStyle(t,i[0]);var n=Object.create(i[0]);return i.forEach((function(t,e){0!==e&&Object.assign(n,t)})),this._setShadowBlendStyle(t,e,n)}return this._setShadowBlendStyle(t,e,i)}},{key:"_setShadowBlendStyle",value:function(t,e,i){var n=this.nativeContext;i||(i=this.fillAttributes);var r=e.opacity,a=void 0===r?i.opacity:r,o=e.shadowBlur,s=void 0===o?i.shadowBlur:o,u=e.shadowColor,l=void 0===u?i.shadowColor:u,c=e.shadowOffsetX,h=void 0===c?i.shadowOffsetX:c,d=e.shadowOffsetY,f=void 0===d?i.shadowOffsetY:d,v=e.blur,p=void 0===v?i.blur:v,g=e.globalCompositeOperation,y=void 0===g?i.globalCompositeOperation:g;a<=1e-12||(s||h||f?(n.shadowBlur=s*this.dpr,n.shadowColor=l,n.shadowOffsetX=h*this.dpr,n.shadowOffsetY=f*this.dpr,this._clearShadowStyle=!0):this._clearShadowStyle&&(n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0),p?(n.filter="blur(".concat(p,"px)"),this._clearFilterStyle=!0):this._clearFilterStyle&&(n.filter="blur(0px)",this._clearFilterStyle=!1),y?(n.globalCompositeOperation=y,this._clearGlobalCompositeOperationStyle=!0):this._clearGlobalCompositeOperationStyle&&(n.globalCompositeOperation="source-over",this._clearGlobalCompositeOperationStyle=!1))}},{key:"setStrokeStyle",value:function(t,e,i,n,r){if(Array.isArray(r)){if(r.length<=1)return this._setStrokeStyle(t,e,i,n,r[0]);var a=Object.create(r[0]);return r.forEach((function(t,e){0!==e&&Object.assign(a,t)})),this._setStrokeStyle(t,e,i,n,a)}return this._setStrokeStyle(t,e,i,n,r)}},{key:"_setStrokeStyle",value:function(t,e,i,n,r){var a=this.nativeContext;r||(r=this.strokeAttributes);var o=e.strokeOpacity,s=void 0===o?r.strokeOpacity:o,u=e.opacity,l=void 0===u?r.opacity:u;if(s>1e-12&&l>1e-12){var c=e.lineWidth,h=void 0===c?r.lineWidth:c,d=e.stroke,f=void 0===d?r.stroke:d,v=e.lineJoin,p=void 0===v?r.lineJoin:v,g=e.lineDash,y=void 0===g?r.lineDash:g,m=e.lineCap,k=void 0===m?r.lineCap:m,b=e.miterLimit,_=void 0===b?r.miterLimit:b;a.globalAlpha=s*l*this.baseGlobalAlpha,a.lineWidth=Rc(this,h,this.dpr),a.strokeStyle=Pc(this,f,t,i,n),a.lineJoin=p,y&&a.setLineDash(y),a.lineCap=k,a.miterLimit=_}}},{key:"setTextStyleWithoutAlignBaseline",value:function(t,e,i){var n=this.nativeContext;e||(e=this.textAttributes);var r=t.scaleIn3d,a=void 0===r?e.scaleIn3d:r;t.font?n.font=t.font:n.font=Gs(t,e,a&&this.camera&&this.camera.getProjectionScale(i));var o=t.fontFamily,s=void 0===o?e.fontFamily:o,u=t.fontSize,l=void 0===u?e.fontSize:u;this.fontFamily=s,this.fontSize=l,n.textAlign="left",n.textBaseline="alphabetic"}},{key:"setTextStyle",value:function(t,e,i){var n,r,a=this.nativeContext;e||(e=this.textAttributes),t.font?a.font=t.font:a.font=Gs(t,e,this.camera&&this.camera.getProjectionScale(i));var o=t.fontFamily,s=void 0===o?e.fontFamily:o,u=t.fontSize,l=void 0===u?e.fontSize:u;this.fontFamily=s,this.fontSize=l,a.textAlign=null!==(n=t.textAlign)&&void 0!==n?n:e.textAlign,a.textBaseline=null!==(r=t.textBaseline)&&void 0!==r?r:e.textBaseline}},{key:"draw",value:function(){}},{key:"clearMatrix",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.dpr;this.setTransformFromMatrix(this._clearMatrix,t,e)}},{key:"setClearMatrix",value:function(t,e,i,n,r,a){this._clearMatrix.setValue(t,e,i,n,r,a)}},{key:"onlyTranslate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dpr;return this.matrix.a===t&&0===this.matrix.b&&0===this.matrix.c&&this.matrix.d===t}},{key:"release",value:function(){this.stack.forEach((function(t){return vc.free(t)})),this.stack.length=0}}])}();og.env="browser",og=ng([L(),rg("design:paramtypes",[Object,Number])],og);var sg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ug=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},lg=function(t){function i(t){return o(this,i),e(this,i,[t])}return c(i,t),u(i,[{key:"init",value:function(t){var e=t.container;if("string"==typeof e){var i=Un.global.getElementById(e);i&&(this._container=i)}else this._container=e;this._context=new og(this,this._dpr),this.initStyle()}},{key:"initStyle",value:function(){if(this.controled){var t=this.nativeCanvas;t.width=this._pixelWidth,t.height=this._pixelHeight,!t.style||this.setCanvasStyle(t,this._x,this._y,this._displayWidth,this._displayHeight),this._container&&this._container.appendChild(t),this.visiable||this.hide()}}},{key:"hide",value:function(){this._nativeCanvas&&(this._nativeCanvas.style.display="none")}},{key:"show",value:function(){this._nativeCanvas&&(this._nativeCanvas.style.display="block")}},{key:"applyPosition",value:function(){var t=this._nativeCanvas;t.style.position="absolute",t.style.top="".concat(this._y,"px"),t.style.left="".concat(this._x,"px")}},{key:"resetStyle",value:function(t){if(this.controled){var e=t.width,i=void 0===e?this._displayWidth:e,n=t.height,r=void 0===n?this._displayHeight:n,a=t.dpr,o=void 0===a?this._dpr:a,s=t.x,u=void 0===s?this._x:s,l=t.y,c=void 0===l?this._y:l,h=this.nativeCanvas;h.width=i*o,h.height=r*o,!h.style||this.setCanvasStyle(h,u,c,i,r),t.id&&(h.id=t.id),this.visiable||this.hide()}}},{key:"setCanvasStyle",value:function(t,e,i,n,r){this.controled&&(t.style.width="".concat(n,"px"),t.style.height="".concat(r,"px"))}},{key:"toDataURL",value:function(t,e){return"image/jpeg"===t?this._nativeCanvas.toDataURL(t,e):"image/png"===t?this._nativeCanvas.toDataURL(t):this._nativeCanvas.toDataURL(t,e)}},{key:"resize",value:function(t,e){this.controled&&(this._pixelWidth=t*this._dpr,this._pixelHeight=e*this._dpr,this._displayWidth=t,this._displayHeight=e,this._nativeCanvas.style&&(this._nativeCanvas.style.width="".concat(t,"px"),this._nativeCanvas.style.height="".concat(e,"px")),this._nativeCanvas.width=this._pixelWidth,this._nativeCanvas.height=this._pixelHeight,this._context.dpr=this._dpr)}}])}(Tv);function cg(t,e){return new x((function(i){i(rr).toDynamicValue((function(){return function(e){return new t(e)}})).whenTargetNamed(t.env),i(ar).toDynamicValue((function(){return function(t,i){return new e(t,i)}})).whenTargetNamed(e.env)}))}lg.env="browser";var hg=cg(lg=sg([L(),ug("design:paramtypes",[Object])],lg),og),dg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},fg=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vg=function(t,e){return function(i,n){e(i,n,t)}},pg=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[r])).contributions=t,a.drawContribution=n,a.pickItemInterceptorContributions=r,a.global.hooks.onSetEnv.tap("canvas-picker-service",(function(t,e,i){a.configure(i,e)})),a.configure(a.global,a.global.env),a.pickerMap=new Map,a.init(),a}return c(i,t),u(i,[{key:"init",value:function(){var t=this;this.contributions.getContributions().forEach((function(e){t.pickerMap.set(e.numberType,e)})),p(h(i.prototype),"_init",this).call(this)}},{key:"configure",value:function(t,e){this.pickCanvas=ur.shareCanvas(),this.pickContext=this.pickCanvas.getContext("2d")}},{key:"pickItem",value:function(t,e,i,n){if(!1===t.attribute.pickable)return null;if(this.InterceptorContributions.length)for(var r=0;r<this.InterceptorContributions.length;r++){var a=this.InterceptorContributions[r];if(a.beforePickItem){var o=a.beforePickItem(t,this,e,n,{parentMatrix:i});if(o)return o}}var s=this.pickerMap.get(t.numberType);if(!s)return null;var u=s.contains(t,e,n),l=u?t:null,c={graphic:l,params:u};if(l)return c;if(this.InterceptorContributions.length)for(var h=0;h<this.InterceptorContributions.length;h++){var d=this.InterceptorContributions[h];if(d.afterPickItem){var f=d.afterPickItem(t,this,e,n,{parentMatrix:i});if(f)return f}}return c}}])}(Lv);pg=dg([L(),vg(0,O($)),vg(0,D($p)),vg(1,O(Id)),vg(2,O($)),vg(2,D(tf)),fg("design:paramtypes",[Object,Object,Object])],pg);var gg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},yg=function(){return u((function t(){o(this,t),this.type="group",this.numberType=zo}),[{key:"contains",value:function(t,e,i){return!1}}])}();yg=gg([L()],yg);var mg=new x((function(t,e,i,n){mg.__vloaded||(mg.__vloaded=!0,t(Jp).to(yg).inSingletonScope(),t($p).toService(Jp),tt(t,$p))}));mg.__vloaded=!1;var kg=mg,bg=new x((function(t,e,i,n){i(pg)||t(pg).toSelf().inSingletonScope(),i(Jd)?n(Jd).toService(pg):t(Jd).toService(pg)}));var _g,xg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},wg=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Sg=_g=function(t){function i(){var t;return o(this,i),(t=e(this,i)).type="browser",t._canvasIsIntersecting=!0,t.global=Un.global,t.viewBox=new De,t.modelMatrix=new ze(1,0,0,1,0,0),t}return c(i,t),u(i,[{key:"container",get:function(){return this.canvas.nativeCanvas.parentElement}},{key:"getTitle",value:function(){return this.canvas.id&&this.canvas.id.toString()}},{key:"getWH",value:function(){return{width:this.canvas.width/(this.canvas.dpr||1),height:this.canvas.height/(this.canvas.dpr||1)}}},{key:"getXY",value:function(){return this.canvas.nativeCanvas.getBoundingClientRect()}},{key:"createWindow",value:function(t){t.canvas?this.createWindowByCanvas(t):this.createWindowByConfig(t),this.postInit()}},{key:"postInit",value:function(){if(this.global.optimizeVisible)try{this.observerCanvas()}catch(t){console.error("发生错误,该环境不存在IntersectionObserver")}}},{key:"isElementVisible",value:function(t){var e=t.getBoundingClientRect(),i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;return!(e.right<0||e.bottom<0||e.left>i||e.top>n)}},{key:"observerCanvas",value:function(){var t=this;this._canvasIsIntersecting=this.isElementVisible(this.canvas.nativeCanvas);var e=new IntersectionObserver((function(e,i){e.forEach((function(e){t._canvasIsIntersecting!==e.isIntersecting?(t._canvasIsIntersecting=e.isIntersecting,t._onVisibleChangeCb&&t._onVisibleChangeCb(e.isIntersecting)):t._canvasIsIntersecting=e.isIntersecting}))}));e&&e.observe(this.canvas.nativeCanvas)}},{key:"createWindowByConfig",value:function(t){var e,i=this.global.createCanvas({width:t.width,height:t.height});if(!(e="string"==typeof t.container?this.global.getElementById(t.container):t.container?t.container:this.global.getRootElement()))throw new Error("发生错误,containerId可能传入有误");t.offscreen?e=null:e.appendChild(i);var n={width:t.width,height:t.height,dpr:t.dpr,nativeCanvas:i,container:e,id:_g.GenerateCanvasId(),canvasControled:!0};this.canvas=new lg(n)}},{key:"createWindowByCanvas",value:function(t){var e,i;if("string"==typeof t.canvas){if(!(i=this.global.getElementById(t.canvas)))throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom")}else i=t.canvas;if(!i)throw new Error("发生错误,传入的canvas不正确");var n=t.width,r=t.height;if(null==n||null==r||!t.canvasControled){var a=i.getBoundingClientRect();n=a.width,r=a.height}var o=t.dpr;null==o&&(o=null!==(e=i.getContext("2d").pixelRatio)&&void 0!==e?e:i.width/n),this.canvas=new lg({width:n,height:r,dpr:o,nativeCanvas:i,canvasControled:t.canvasControled})}},{key:"releaseWindow",value:function(){this.canvas.release()}},{key:"resizeWindow",value:function(t,e){this.canvas.resize(t,e)}},{key:"setDpr",value:function(t){this.canvas.dpr=t}},{key:"getContext",value:function(){return this.canvas.getContext()}},{key:"getNativeHandler",value:function(){return this.canvas}},{key:"getDpr",value:function(){return this.canvas.dpr}},{key:"addEventListener",value:function(t,e,i){return this.canvas.nativeCanvas.addEventListener(t,e,i)}},{key:"removeEventListener",value:function(t,e,i){return this.canvas.nativeCanvas.removeEventListener(t,e,i)}},{key:"dispatchEvent",value:function(t){return this.canvas.nativeCanvas.dispatchEvent(t)}},{key:"getStyle",value:function(){var t;return null!==(t=this.canvas.nativeCanvas.style)&&void 0!==t?t:{}}},{key:"setStyle",value:function(t){this.canvas.nativeCanvas.style=t}},{key:"getBoundingClientRect",value:function(){var t=this.canvas.nativeCanvas,e=this.getWH();return t.parentElement?this.canvas.nativeCanvas.getBoundingClientRect():{x:0,y:0,width:e.width,height:e.height,left:0,top:0,right:0,bottom:0}}},{key:"clearViewBox",value:function(t){var e=this.viewBox,i=this.getContext(),n=this.getDpr();i.nativeContext.save(),i.nativeContext.setTransform(n,0,0,n,0,0),i.clearRect(e.x1,e.y1,e.x2-e.x1,e.y2-e.y1),t&&(i.fillStyle=t,i.fillRect(e.x1,e.y1,e.x2-e.x1,e.y2-e.y1)),i.nativeContext.restore()}},{key:"isVisible",value:function(t){return this._canvasIsIntersecting}},{key:"onVisibleChange",value:function(t){this._onVisibleChangeCb=t}},{key:"getTopLeft",value:function(t){return this.global.getElementTopLeft(this.canvas.nativeCanvas,t)}}],[{key:"GenerateCanvasId",value:function(){return"".concat(_g.idprefix,"_").concat(_g.prefix_count++)}}])}(Rv);Sg.env="browser",Sg.idprefix="visactor_window",Sg.prefix_count=0,Sg=_g=xg([L(),wg("design:paramtypes",[])],Sg);var Ag=new x((function(t){t(Sg).toSelf(),t(dr).toDynamicValue((function(t){return t.container.get(Sg)})).whenTargetNamed(Sg.env)})),Tg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Eg=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Cg=function(){return u((function t(e){o(this,t),this.dom=e}),[{key:"x1",get:function(){return this.dom.getBoundingClientRect().left}},{key:"x2",get:function(){return this.dom.getBoundingClientRect().right}},{key:"y1",get:function(){return this.dom.getBoundingClientRect().top}},{key:"y2",get:function(){return this.dom.getBoundingClientRect().bottom}},{key:"width",get:function(){return this.dom.getBoundingClientRect().width}},{key:"height",get:function(){return this.dom.getBoundingClientRect().height}}])}();function Bg(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.createElement("img");if(i.crossOrigin="anonymous",e){var n=new Blob([t],{type:"image/svg+xml"});t=window.URL.createObjectURL(n)}return i.src=t,i.complete?Promise.resolve(i):new Promise((function(t,e){i.onload=function(){t(i)},i.onerror=function(){e(new Error("加载失败"))}}))}var Mg=function(t){function i(){var t;o(this,i),(t=e(this,i)).type="browser",t.supportEvent=!0;try{t.supportsTouchEvents="ontouchstart"in globalThis,t.supportsPointerEvents=!!globalThis.PointerEvent,t.supportsMouseEvents=!!globalThis.MouseEvent}catch(e){t.supportsTouchEvents=!1,t.supportsPointerEvents=!1,t.supportsPointerEvents=!1}return t.applyStyles=!0,t}return c(i,t),u(i,[{key:"mapToCanvasPoint",value:function(t,e){var i,n,r=0,a=0,o=0,s=0;if(t.changedTouches){var u=null!==(i=t.changedTouches[0])&&void 0!==i?i:{};o=r=u.clientX||0,s=a=u.clientY||0}else r=t.clientX||0,a=t.clientY||0,o=t.offsetX||0,s=t.offsetY||0;if(e){var l,c,h=r,d=a,f=e.getBoundingClientRect(),v=null===(n=e.getNativeHandler)||void 0===n?void 0:n.call(e).nativeCanvas;return v&&(l=f.width/v.offsetWidth,c=f.height/v.offsetHeight),{x:(h-f.left)/(At(l)?l:1),y:(d-f.top)/(At(c)?c:1)}}return{x:o,y:s}}},{key:"getNativeAABBBounds",value:function(t){var e=t;if("string"==typeof t&&((e=(new DOMParser).parseFromString(t,"text/html").firstChild).lastChild&&(e=e.lastChild.firstChild)),e.getBoundingClientRect){var i=e.getBoundingClientRect();return new Cg(i)}return new De}},{key:"removeDom",value:function(t){return t.parentElement.removeChild(t),!0}},{key:"updateDom",value:function(t,e){var i=e.width,n=e.height,r=e.style;return r&&(bt(r)?t.setAttribute("style",r):Object.keys(r).forEach((function(e){t.style[e]=r[e]}))),null!=i&&(t.style.width="".concat(i,"px")),null!=n&&(t.style.height="".concat(n,"px")),!0}},{key:"createDom",value:function(t){var e=t.tagName,i=void 0===e?"div":e,n=t.parent,r=document.createElement(i);if(this.updateDom(r,t),n){var a=bt(n)?this.getElementById(n):n;a&&a.appendChild&&a.appendChild(r)}return r}},{key:"loadImage",value:function(t){return Bg(t,!1).then((function(t){return{data:t,loadState:"success"}})).catch((function(){return{data:null,loadState:"fail"}}))}},{key:"loadSvg",value:function(t){return Bg(t,!0).then((function(t){return{data:t,loadState:"success"}})).catch((function(){return{data:null,loadState:"fail"}}))}},{key:"createCanvas",value:function(t){var e,i,n=document.createElement("canvas");t.id&&(n.id=null!==(e=t.id)&&void 0!==e?e:_.GenAutoIncrementId().toString());var r=null!==(i=t.dpr)&&void 0!==i?i:window.devicePixelRatio;return t.width&&t.height&&(n.style.width="".concat(t.width,"px"),n.style.height="".concat(t.height,"px"),n.width=t.width*r,n.height=t.height*r),n}},{key:"createOffscreenCanvas",value:function(t){var e,i=null!==(e=t.dpr)&&void 0!==e?e:window.devicePixelRatio;return new OffscreenCanvas(t.width*i,t.height*i)}},{key:"releaseCanvas",value:function(t){var e;(e="string"==typeof t?document.getElementById(t):t)&&e.parentElement&&e.parentElement.removeChild(e)}},{key:"getDevicePixelRatio",value:function(){return window.devicePixelRatio}},{key:"getRequestAnimationFrame",value:function(){return window.requestAnimationFrame}},{key:"getCancelAnimationFrame",value:function(){return window.cancelAnimationFrame}},{key:"addEventListener",value:function(t,e,i){return document.addEventListener(t,e,i)}},{key:"removeEventListener",value:function(t,e,i){return document.removeEventListener(t,e,i)}},{key:"dispatchEvent",value:function(t){return document.dispatchEvent(t)}},{key:"getElementById",value:function(t){return document.getElementById(t)}},{key:"getRootElement",value:function(){return document.body}},{key:"getDocument",value:function(){return document}},{key:"release",value:function(){}},{key:"getElementTop",value:function(t,e){for(var i=t.offsetTop,n=t.offsetParent;null!==n;)i+=n.offsetTop,n=n.offsetParent;return i}},{key:"getElementLeft",value:function(t,e){for(var i=t.offsetLeft,n=t.offsetParent;null!==n;)i+=n.offsetLeft,n=n.offsetParent;return i}},{key:"getElementTopLeft",value:function(t,e){for(var i=t.offsetTop,n=t.offsetLeft,r=t.offsetParent;null!==r;)i+=r.offsetTop,n+=r.offsetLeft,r=r.offsetParent;return{top:i,left:n}}}])}(Cv);Mg=Tg([L(),Eg("design:paramtypes",[])],Mg);var Rg=new x((function(t){Rg.isBrowserBound||(Rg.isBrowserBound=!0,t(Mg).toSelf().inSingletonScope(),t(it).toService(Mg))}));function Pg(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Pg.__loaded||(Pg.__loaded=!0,t.load(Rg),t.load(hg),t.load(Ag),e&&function(t){t.load(kg),t.load(bg)}(t))}Rg.isBrowserBound=!1,Pg.__loaded=!1;var Og=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ig=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Lg=function(t,e){return function(i,n){e(i,n,t)}},Dg=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="arc",this.numberType=Lo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).arc;n.highPerformanceSave();var a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();Dg=Og([L(),Lg(0,O(yd)),Ig("design:paramtypes",[Object])],Dg);var jg=!1,Fg=new x((function(t,e,i,n){jg||(jg=!0,t(Ap).to(Dg).inSingletonScope(),t(Sp).toService(Ap))})),Ng=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},zg=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Gg=function(t,e){return function(i,n){e(i,n,t)}},Ug=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="area",this.numberType=jo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).area,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t){return!!h||(h=t.isPointInPath(e.x,e.y))})),n.highPerformanceRestore(),h}}])}();Ug=Ng([L(),Gg(0,O(kd)),zg("design:paramtypes",[Object])],Ug);var Wg=!1,Vg=new x((function(t,e,i,n){Wg||(Wg=!0,t(Tp).to(Ug).inSingletonScope(),t(Sp).toService(Tp))})),Hg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Xg=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yg=function(t,e){return function(i,n){e(i,n,t)}},Kg=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="circle",this.numberType=Fo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).circle,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();Kg=Hg([L(),Yg(0,O(bd)),Xg("design:paramtypes",[Object])],Kg);var qg=!1,Zg=new x((function(t,e,i,n){qg||(qg=!0,t(Ep).to(Kg).inSingletonScope(),t(Sp).toService(Ep))})),Jg=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},$g=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Qg=function(t,e){return function(i,n){e(i,n,t)}},ty=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="glyph",this.numberType=No}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;if(!(null!=i?i:{}).pickContext)return!1;var n=null==i?void 0:i.pickerService;if(n){var r=!1;return t.getSubGraphic().forEach((function(t){r||(r=!!n.pickItem(t,e,null,i))})),r}return!1}}])}();ty=Jg([L(),Qg(0,O(Pd)),$g("design:paramtypes",[Object])],ty);var ey=!1,iy=new x((function(t,e,i,n){ey||(ey=!0,t(Lp).to(ty).inSingletonScope(),t(ty).toService(Lp))})),ny=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ry=function(){return u((function t(){o(this,t),this.type="image",this.numberType=Go}),[{key:"contains",value:function(t,e,i){return!!(null!=i?i:{}).pickContext&&!!t.AABBBounds.containsPoint(e)}}])}();ry=ny([L()],ry);var ay=!1,oy=new x((function(t,e,i,n){ay||(ay=!0,t(Cp).to(ry).inSingletonScope(),t(ry).toService(Cp))})),sy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},uy=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ly=function(t,e){return function(i,n){e(i,n,t)}},cy=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="line",this.numberType=Uo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).line,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();cy=sy([L(),ly(0,O(wd)),uy("design:paramtypes",[Object])],cy);var hy=!1,dy=new x((function(t,e,i,n){hy||(hy=!0,t(Bp).to(cy).inSingletonScope(),t(Sp).toService(Bp))})),fy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},vy=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},py=function(t,e){return function(i,n){e(i,n,t)}},gy=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="polygon",this.numberType=Vo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.contains(e.x,e.y))return!1;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).polygon,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();gy=fy([L(),py(0,O(Ad)),vy("design:paramtypes",[Object])],gy);var yy=!1,my=new x((function(t,e,i,n){yy||(yy=!0,t(Ip).to(gy).inSingletonScope(),t(Sp).toService(Ip))})),ky=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},by=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},_y=function(t,e){return function(i,n){e(i,n,t)}},xy=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="path",this.numberType=Wo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).path,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();xy=ky([L(),_y(0,O(Sd)),by("design:paramtypes",[Object])],xy);var wy=!1,Sy=new x((function(t,e,i,n){wy||(wy=!0,t(Mp).to(xy).inSingletonScope(),t(Sp).toService(Mp))})),Ay=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ty=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ey=function(t,e){return function(i,n){e(i,n,t)}},Cy=new De,By=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="rect",this.numberType=Xo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).rect,a=t.attribute.cornerRadius,o=void 0===a?r.cornerRadius:a,s=t.attribute,u=s.x,l=void 0===u?r.x:u,c=s.y,h=void 0===c?r.y:c;n.highPerformanceSave();var d=!0;if(t.transMatrix.onlyTranslate()){var f=t.getOffsetXY(r);l+=f.x,h+=f.y,n.setTransformForCurrent()}else l=0,h=0,d=!1,n.transformFromMatrix(t.transMatrix,!0);var v=!0;if(!d||St(o,!0)&&0!==o||_t(o)&&o.some((function(t){return 0!==t})))v=!1,this.canvasRenderer.drawShape(t,n,l,h,{},null,(function(t,i,n){return!!v||(v=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(v)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,v=t.isPointInStroke(e.x,e.y)}));else if(v){var p=t.attribute,g=p.fill,y=void 0===g?r.fill:g,m=p.stroke,k=void 0===m?r.stroke:m,b=p.lineWidth,_=void 0===b?r.lineWidth:b;if(y)v=!0;else if(k){var x=t.AABBBounds;Cy.setValue(x.x1,x.y1,x.x2,x.y2),Cy.expand(-_/2),v=!Cy.containsPoint(e)}}return n.highPerformanceRestore(),v}}])}();By=Ay([L(),Ey(0,O(Td)),Ty("design:paramtypes",[Object])],By);var My=!1,Ry=new x((function(t,e,i,n){My||(My=!0,t(Rp).to(By).inSingletonScope(),t(Sp).toService(Rp))})),Py=!1,Oy=new x((function(t,e,i,n){Py||(Py=!0,t(Cp).to(ry).inSingletonScope(),t(ry).toService(Cp))})),Iy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ly=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Dy=function(t,e){return function(i,n){e(i,n,t)}},jy=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="symbol",this.numberType=qo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).symbol,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=a+o,h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();jy=Iy([L(),Dy(0,O(Cd)),Ly("design:paramtypes",[Object])],jy);var Fy=!1,Ny=new x((function(t,e,i,n){Fy||(Fy=!0,t(Pp).to(jy).inSingletonScope(),t(Sp).toService(Pp))})),zy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Gy=function(){return u((function t(){o(this,t),this.type="text",this.numberType=Zo}),[{key:"contains",value:function(t,e,i){return!!t.AABBBounds.containsPoint(e)}}])}();Gy=zy([L()],Gy);var Uy=!1,Wy=new x((function(t,e,i,n){Uy||(Uy=!0,t(Op).to(Gy).inSingletonScope(),t(Sp).toService(Op))})),Vy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Hy=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Xy=function(t){function i(t,n){var r;o(this,i),r=e(this,i,[t,n]);var a=t.nativeCanvas.getContext("2d");if(!a)throw new Error("发生错误,获取2d上下文失败");return r.nativeContext=a,r.canvas=t,r.matrix=new ze(1,0,0,1,0,0),r.stack=[],r.dpr=null!=n?n:1,r}return c(i,t),u(i,[{key:"release",value:function(){}}])}(og);Xy.env="node",Xy=Vy([L(),Hy("design:paramtypes",[Object,Number])],Xy);var Yy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ky=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},qy=function(t){function i(t){return o(this,i),e(this,i,[t])}return c(i,t),u(i,[{key:"init",value:function(){this._context=new Xy(this,this._dpr),this.nativeCanvas.width=this._pixelWidth,this.nativeCanvas.height=this._pixelHeight}},{key:"release",value:function(){this._nativeCanvas.release&&ft(this._nativeCanvas.release)&&this._nativeCanvas.release()}}])}(Tv);qy.env="node";var Zy=cg(qy=Yy([L(),Ky("design:paramtypes",[Object])],qy),Xy),Jy=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},$y=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Qy=function(t,e){return function(i,n){e(i,n,t)}},tm=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).global=t,n.type="node",n}return c(i,t),u(i,[{key:"container",get:function(){return null}},{key:"getTitle",value:function(){return""}},{key:"getWH",value:function(){return{width:this.canvas.displayWidth,height:this.canvas.displayHeight}}},{key:"getXY",value:function(){return{x:0,y:0}}},{key:"createWindow",value:function(t){t.canvas?this.createWindowByCanvas(t):this.createWindowByConfig(t)}},{key:"createWindowByConfig",value:function(t){var e=this.global.createCanvas({width:t.width,height:t.height}),i={width:t.width,height:t.height,dpr:t.dpr,nativeCanvas:e,id:_.GenAutoIncrementId().toString(),canvasControled:!0};this.canvas=new qy(i)}},{key:"createWindowByCanvas",value:function(t){var e=t.canvas,i=t.width,n=t.height;null!=i&&null!=n&&t.canvasControled||(i=e.width,n=e.height),this.canvas=new qy({width:i,height:n,dpr:1,nativeCanvas:e,canvasControled:t.canvasControled})}},{key:"releaseWindow",value:function(){this.canvas.release()}},{key:"resizeWindow",value:function(t,e){this.canvas.resize(t,e)}},{key:"setDpr",value:function(t){this.canvas.dpr=t}},{key:"getContext",value:function(){return this.canvas.getContext()}},{key:"getNativeHandler",value:function(){return this.canvas}},{key:"getDpr",value:function(){return this.canvas.dpr}},{key:"getImageBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return this.canvas.nativeCanvas.toBuffer(t)}},{key:"addEventListener",value:function(t,e,i){}},{key:"dispatchEvent",value:function(t){return!0}},{key:"removeEventListener",value:function(t,e,i){}},{key:"getStyle",value:function(){}},{key:"setStyle",value:function(t){}},{key:"getBoundingClientRect",value:function(){return null}},{key:"clearViewBox",value:function(t){}}])}(Rv);tm.env="node",tm=Jy([L(),Qy(0,O(nt)),$y("design:paramtypes",[Object])],tm);var em=new x((function(t){t(tm).toSelf(),t(dr).toDynamicValue((function(t){return t.container.get(tm)})).whenTargetNamed(tm.env)})),im=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},nm=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type="node",t._lastTime=0,t.supportEvent=!1,t}return c(i,t),u(i,[{key:"configure",value:function(t,e){t.env===this.type&&(t.setActiveEnvContribution(this),this.pkg=e)}},{key:"getDynamicCanvasCount",value:function(){return 0}},{key:"getStaticCanvasCount",value:function(){return 999}},{key:"loadJson",value:function(t){var e=fetch(t).then((function(t){return t.json()}));return e.then((function(t){return{data:t,state:"success"}})).catch((function(){return{data:null,state:"fail"}})),e}},{key:"loadArrayBuffer",value:function(t){return fetch(t).then((function(t){return t.arrayBuffer()})).then((function(t){return{data:t,loadState:"success"}})).catch((function(){return{data:null,loadState:"fail"}}))}},{key:"loadImage",value:function(t){var e=this.pkg.loadImage;return e?e(t).then((function(t){return{loadState:t?"success":"fail",data:t}})).catch((function(){return{loadState:"fail",data:null}})):Promise.reject(new Error("node-canvas loadImage could not be found!"))}},{key:"loadSvg",value:function(t){var e=this.pkg.Resvg;if(!e)return Promise.reject(new Error("@resvg/resvg-js svgParser could not be found!"));var i=new e(t).render().asPng();return this.loadImage(i)}},{key:"createCanvas",value:function(t){return this.pkg.createCanvas(t.width,t.height)}},{key:"releaseCanvas",value:function(t){}},{key:"getDevicePixelRatio",value:function(){return 1}},{key:"getRequestAnimationFrame",value:function(){return function(t){return ma.call(t)}}},{key:"getCancelAnimationFrame",value:function(){return function(t){ma.clear(t)}}},{key:"addEventListener",value:function(t,e,i){}},{key:"removeEventListener",value:function(t,e,i){}},{key:"getElementById",value:function(t){return null}},{key:"getRootElement",value:function(){return null}},{key:"dispatchEvent",value:function(t){}},{key:"release",value:function(){}},{key:"createOffscreenCanvas",value:function(t){}}])}(Cv);nm=im([L()],nm);var rm=new x((function(t){rm.isNodeBound||(rm.isNodeBound=!0,t(nm).toSelf().inSingletonScope(),t(it).toService(nm))}));function am(t){am.__loaded||(am.__loaded=!0,t.load(rm),t.load(Zy),t.load(em))}rm.isNodeBound=!1,am.__loaded=!1;var om=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},sm=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},um=function(t,e){return function(i,n){e(i,n,t)}},lm=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="arc",this.numberType=Lo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).arc;n.highPerformanceSave();var a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=Rc(n,a+o,n.dpr),h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();lm=om([L(),um(0,O(yd)),sm("design:paramtypes",[Object])],lm);var cm=!1,hm=new x((function(t,e,i,n){cm||(cm=!0,t(Dp).to(lm).inSingletonScope(),t($p).toService(Dp))})),dm=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},fm=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vm=function(t,e){return function(i,n){e(i,n,t)}},pm=new De,gm=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="rect",this.numberType=Xo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).rect,a=t.attribute.cornerRadius,o=void 0===a?r.cornerRadius:a,s=t.attribute,u=s.x,l=void 0===u?r.x:u,c=s.y,h=void 0===c?r.y:c;n.highPerformanceSave();var d=!0;if(t.transMatrix.onlyTranslate()){var f=t.getOffsetXY(r);l+=f.x,h+=f.y,n.setTransformForCurrent()}else l=0,h=0,d=!1,n.transformFromMatrix(t.transMatrix,!0);var v=!0;if(!d||t.shadowRoot||St(o,!0)&&0!==o||_t(o)&&o.some((function(t){return 0!==t})))v=!1,this.canvasRenderer.drawShape(t,n,l,h,{},null,(function(t,i,n){return!!v||(v=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(v)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=Rc(n,a+o,n.dpr),v=t.isPointInStroke(e.x,e.y)}));else{var p=t.attribute,g=p.fill,y=void 0===g?r.fill:g,m=p.stroke,k=void 0===m?r.stroke:m,b=p.lineWidth,_=void 0===b?r.lineWidth:b;if(y)v=!0;else if(k){var x=t.AABBBounds;pm.setValue(x.x1,x.y1,x.x2,x.y2),pm.expand(-_/2),v=!pm.containsPoint(e)}}return n.highPerformanceRestore(),v}}])}();gm=dm([L(),vm(0,O(Td)),fm("design:paramtypes",[Object])],gm);var ym=!1,mm=new x((function(t,e,i,n){ym||(ym=!0,t(Wp).to(gm).inSingletonScope(),t($p).toService(Wp))})),km=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},bm=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i)}(Cc),_m=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},xm=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},wm=function(t,e){return function(i,n){e(i,n,t)}},Sm=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="line",n.numberType=Uo,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;n.highPerformanceSave();var r=Er(t).line,a=this.transform(t,r,n),o=a.x,s=a.y,u=a.z,l=a.lastModelMatrix,c=e;if(n.camera){c=e.clone();var h=t.parent.globalTransMatrix;c.x=h.a*e.x+h.c*e.y+h.e,c.y=h.b*e.x+h.d*e.y+h.f}this.canvasRenderer.z=u;var d=!1;return this.canvasRenderer.drawShape(t,n,o,s,{},null,(function(t){return!!d||(d=t.isPointInPath(c.x,c.y))}),(function(t,e,i){if(d)return!0;var r=e.lineWidth||i.lineWidth,a=e.pickStrokeBuffer||i.pickStrokeBuffer;return n.lineWidth=Rc(n,r+a,n.dpr),d=t.isPointInStroke(c.x,c.y)})),this.canvasRenderer.z=0,n.modelMatrix!==l&&pc.free(n.modelMatrix),n.modelMatrix=l,n.highPerformanceRestore(),d}}])}(bm=km([L()],bm));Sm=_m([L(),wm(0,O(wd)),xm("design:paramtypes",[Object])],Sm);var Am=!1,Tm=new x((function(t,e,i,n){Am||(Am=!0,t(Gp).to(Sm).inSingletonScope(),t($p).toService(Gp))})),Em=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Cm=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Bm=function(t,e){return function(i,n){e(i,n,t)}},Mm=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="area",this.numberType=jo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).area,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u,c=t.attribute,h=c.fillPickable,d=void 0===h?r.fillPickable:h,f=c.strokePickable,v=void 0===f?r.strokePickable:f;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var p=t.getOffsetXY(r);s+=p.x,l+=p.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var g=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t){return!!g||!!d&&(g=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(g)return!0;if(!v)return!1;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=Rc(n,a+o,n.dpr),g=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),g}}])}();Mm=Em([L(),Bm(0,O(kd)),Cm("design:paramtypes",[Object])],Mm);var Rm=!1,Pm=new x((function(t,e,i,n){Rm||(Rm=!0,t(Fp).to(Mm).inSingletonScope(),t($p).toService(Fp))})),Om=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Im=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Lm=function(t,e){return function(i,n){e(i,n,t)}},Dm=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="symbol",n.numberType=qo,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=t.getParsedPath();if(!n.camera){if(!t.AABBBounds.containsPoint(e))return!1;if(r.isSvg||"imprecise"===t.attribute.pickMode)return!0}n.highPerformanceSave();var a=Er(t).symbol,o=this.transform(t,a,n),s=o.x,u=o.y,l=o.z,c=o.lastModelMatrix,h=e;if(n.camera){h=e.clone();var d=t.parent.globalTransMatrix;h.x=d.a*e.x+d.c*e.y+d.e,h.y=d.b*e.x+d.d*e.y+d.f}this.canvasRenderer.z=l;var f=!1;return this.canvasRenderer.drawShape(t,n,s,u,{},null,(function(t,e,i){return!!f||(f=t.isPointInPath(h.x,h.y))}),(function(t,e,i){if(f)return!0;var r=e.lineWidth||i.lineWidth,a=e.pickStrokeBuffer||i.pickStrokeBuffer;return n.lineWidth=Rc(n,r+a,n.dpr),f=t.isPointInStroke(h.x,h.y)})),this.canvasRenderer.z=0,n.modelMatrix!==c&&pc.free(n.modelMatrix),n.modelMatrix=c,n.highPerformanceRestore(),f}}])}(bm);Dm=Om([L(),Lm(0,O(Cd)),Im("design:paramtypes",[Object])],Dm);var jm=!1,Fm=new x((function(t,e,i,n){jm||(jm=!0,t(Hp).to(Dm).inSingletonScope(),t($p).toService(Hp))})),Nm=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},zm=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Gm=function(t,e){return function(i,n){e(i,n,t)}},Um=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="circle",this.numberType=Fo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).circle,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=Rc(n,a+o,n.dpr),h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();Um=Nm([L(),Gm(0,O(bd)),zm("design:paramtypes",[Object])],Um);var Wm=!1,Vm=new x((function(t,e,i,n){Wm||(Wm=!0,t(Np).to(Um).inSingletonScope(),t($p).toService(Np))})),Hm=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Xm=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ym=function(t,e){return function(i,n){e(i,n,t)}},Km=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="text",n.numberType=Zo,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=t.AABBBounds;if(!n.camera)return!!r.containsPoint(e);n.highPerformanceSave();var a=Er(t).text,o=t.attribute.keepDirIn3d,s=!(void 0===o?a.keepDirIn3d:o),u=this.transform(t,a,n,s),l=u.x,c=u.y,h=u.z,d=u.lastModelMatrix;this.canvasRenderer.z=h;var f=e;if(n.camera){f=e.clone();var v=t.parent.globalTransMatrix;f.x=v.a*e.x+v.c*e.y+v.e,f.y=v.b*e.x+v.d*e.y+v.f}var p=!1;return this.canvasRenderer.drawShape(t,n,l,c,{},null,(function(e,i,n){if(p)return!0;var r=t.attribute,o=r.fontSize,s=void 0===o?a.fontSize:o,u=r.textBaseline,d=void 0===u?a.textBaseline:u,v=r.textAlign,g=void 0===v?a.textAlign:v,y=t.AABBBounds,m=y.height(),k=y.width(),b=Ws(d,m,s),_=Us(g,k);return e.rect(_+l,b+c,k,m,h),p=e.isPointInPath(f.x,f.y)}),(function(t,e,i){return p})),this.canvasRenderer.z=0,n.modelMatrix!==d&&pc.free(n.modelMatrix),n.modelMatrix=d,n.highPerformanceRestore(),p}}])}(bm);Km=Hm([L(),Ym(0,O(Bd)),Xm("design:paramtypes",[Object])],Km);var qm=!1,Zm=new x((function(t,e,i,n){qm||(qm=!0,t(Xp).to(Km).inSingletonScope(),t($p).toService(Xp))})),Jm=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},$m=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Qm=function(t,e){return function(i,n){e(i,n,t)}},tk=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="path",n.numberType=Wo,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).path;n.highPerformanceSave();var a=this.transform(t,r,n),o=a.x,s=a.y,u=a.z,l=a.lastModelMatrix,c=e;if(n.camera){c=e.clone();var h=t.parent.globalTransMatrix;c.x=h.a*e.x+h.c*e.y+h.e,c.y=h.b*e.x+h.d*e.y+h.f}this.canvasRenderer.z=u;var d=!1;return this.canvasRenderer.drawShape(t,n,o,s,{},null,(function(t,e,i){return!!d||(d=t.isPointInPath(c.x,c.y))}),(function(t,e,i){if(d)return!0;var r=e.lineWidth||i.lineWidth,a=e.pickStrokeBuffer||i.pickStrokeBuffer;return n.lineWidth=Rc(n,r+a,n.dpr),d=t.isPointInStroke(c.x,c.y)})),this.canvasRenderer.z=0,n.modelMatrix!==l&&pc.free(n.modelMatrix),n.modelMatrix=l,n.highPerformanceRestore(),d}}])}(bm);tk=Jm([L(),Qm(0,O(Sd)),$m("design:paramtypes",[Object])],tk);var ek=!1,ik=new x((function(t,e,i,n){ek||(ek=!0,t(Up).to(tk).inSingletonScope(),t($p).toService(Up))})),nk=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},rk=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ak=function(t,e){return function(i,n){e(i,n,t)}},ok=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="polygon",this.numberType=Vo}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.contains(e.x,e.y))return!1;if("imprecise"===t.attribute.pickMode)return!0;var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).polygon,a=t.attribute,o=a.x,s=void 0===o?r.x:o,u=a.y,l=void 0===u?r.y:u;if(n.highPerformanceSave(),t.transMatrix.onlyTranslate()){var c=t.getOffsetXY(r);s+=c.x,l+=c.y,n.setTransformForCurrent()}else s=0,l=0,n.transformFromMatrix(t.transMatrix,!0);var h=!1;return this.canvasRenderer.drawShape(t,n,s,l,{},null,(function(t,i,n){return!!h||(h=t.isPointInPath(e.x,e.y))}),(function(t,i,r){if(h)return!0;var a=i.lineWidth||r.lineWidth,o=i.pickStrokeBuffer||r.pickStrokeBuffer;return n.lineWidth=Rc(n,a+o,n.dpr),h=t.isPointInStroke(e.x,e.y)})),n.highPerformanceRestore(),h}}])}();ok=nk([L(),ak(0,O(Ad)),rk("design:paramtypes",[Object])],ok);var sk=!1,uk=new x((function(t,e,i,n){sk||(sk=!0,t(Yp).to(ok).inSingletonScope(),t($p).toService(Yp))})),lk=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},ck=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},hk=function(t,e){return function(i,n){e(i,n,t)}},dk=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="glyph",this.numberType=No}),[{key:"contains",value:function(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;if(!(null!=i?i:{}).pickContext)return!1;var n=null==i?void 0:i.pickerService;if(n){var r=!1;return t.getSubGraphic().forEach((function(t){if(!r){var a=n.pickItem(t,e,null,i);r=!(!a||!a.graphic)}})),r}return!1}}])}();dk=lk([L(),hk(0,O(Pd)),ck("design:paramtypes",[Object])],dk);var fk=!1,vk=new x((function(t,e,i,n){fk||(fk=!0,t(Zp).to(dk).inSingletonScope(),t($p).toService(Zp))})),pk=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},gk=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},yk=function(t,e){return function(i,n){e(i,n,t)}},mk=function(){return u((function t(e){o(this,t),this.canvasRenderer=e,this.type="richtext",this.numberType=Ko}),[{key:"contains",value:function(t,e,i){return!!t.AABBBounds.containsPoint(e)}}])}();mk=pk([L(),yk(0,O(Md)),gk("design:paramtypes",[Object])],mk);var kk=!1,bk=new x((function(t,e,i,n){kk||(kk=!0,t(qp).to(mk).inSingletonScope(),t($p).toService(qp))})),_k=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},xk=function(){return u((function t(){o(this,t),this.type="image",this.numberType=Go}),[{key:"contains",value:function(t,e,i){return!!(null!=i?i:{}).pickContext&&!!t.AABBBounds.containsPoint(e)}}])}();xk=_k([L()],xk);var wk=!1,Sk=new x((function(t,e,i,n){wk||(wk=!0,t(zp).to(xk).inSingletonScope(),t($p).toService(zp))})),Ak=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Tk=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ek=function(t,e){return function(i,n){e(i,n,t)}};new De;var Ck=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="rect3d",n.numberType=Yo,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).rect;n.highPerformanceSave();var a=this.transform(t,r,n),o=a.x,s=a.y,u=a.z,l=a.lastModelMatrix,c=e;if(n.camera){c=e.clone();var h=t.parent.globalTransMatrix;c.x=h.a*e.x+h.c*e.y+h.e,c.y=h.b*e.x+h.d*e.y+h.f}this.canvasRenderer.z=u;var d=!1;return this.canvasRenderer.drawShape(t,n,o,s,i,null,(function(t,e,i){return!!d||(d=t.isPointInPath(c.x,c.y))})),this.canvasRenderer.z=0,n.modelMatrix!==l&&pc.free(n.modelMatrix),n.modelMatrix=l,n.highPerformanceRestore(),d}}])}(bm);Ck=Ak([L(),Ek(0,O(Ed)),Tk("design:paramtypes",[Object])],Ck);var Bk=!1,Mk=new x((function(t,e,i,n){Bk||(Bk=!0,t(Vp).to(Ck).inSingletonScope(),t($p).toService(Vp))})),Rk=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Pk=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ok=function(t,e){return function(i,n){e(i,n,t)}},Ik=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="arc3d",n.numberType=Do,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).arc;n.highPerformanceSave();var a=this.transform(t,r,n),o=a.x,s=a.y,u=a.z,l=a.lastModelMatrix,c=e;if(n.camera){c=e.clone();var h=t.parent.globalTransMatrix;c.x=h.a*e.x+h.c*e.y+h.e,c.y=h.b*e.x+h.d*e.y+h.f}this.canvasRenderer.z=u;var d=!1;return this.canvasRenderer.drawShape(t,n,o,s,i,null,(function(t,e,i){return!!d||(d=t.isPointInPath(c.x,c.y))})),this.canvasRenderer.z=0,n.modelMatrix!==l&&pc.free(n.modelMatrix),n.modelMatrix=l,n.highPerformanceRestore(),d}}])}(bm);Ik=Rk([L(),Ok(0,O(md)),Pk("design:paramtypes",[Object])],Ik);var Lk=!1,Dk=new x((function(t,e,i,n){Lk||(Lk=!0,t(jp).to(Ik).inSingletonScope(),t($p).toService(jp))})),jk=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Fk=function(t,e){if("object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Nk=function(t,e){return function(i,n){e(i,n,t)}},zk=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).canvasRenderer=t,n.type="pyramid3d",n.numberType=Ho,n}return c(i,t),u(i,[{key:"contains",value:function(t,e,i){var n=(null!=i?i:{}).pickContext;if(!n)return!1;var r=Er(t).polygon;n.highPerformanceSave();var a=this.transform(t,r,n),o=a.x,s=a.y,u=a.z,l=a.lastModelMatrix,c=e;if(n.camera){c=e.clone();var h=t.parent.globalTransMatrix;c.x=h.a*e.x+h.c*e.y+h.e,c.y=h.b*e.x+h.d*e.y+h.f}this.canvasRenderer.z=u;var d=!1;return this.canvasRenderer.drawShape(t,n,o,s,{},null,(function(t,e,i){return!!d||(d=t.isPointInPath(c.x,c.y))}),(function(t,e,i){return!1})),this.canvasRenderer.z=0,n.modelMatrix!==l&&pc.free(n.modelMatrix),n.modelMatrix=l,n.highPerformanceRestore(),d}}])}(bm);zk=jk([L(),Nk(0,O(Rd)),Fk("design:paramtypes",[Object])],zk);var Gk=!1,Uk=new x((function(t,e,i,n){Gk||(Gk=!0,t(Kp).to(zk).inSingletonScope(),t($p).toService(Kp))})),Wk=gv();function Vk(){Vk.__loaded||(Vk.__loaded=!0,Ac.RegisterGraphicCreator("arc",tc),nr.load(jv),nr.load(Wk?hm:Fg))}Vk.__loaded=!1;var Hk=Vk;function Xk(){Xk.__loaded||(Xk.__loaded=!0,Ac.RegisterGraphicCreator("arc3d",ic),nr.load(mp),nr.load(Dk))}Xk.__loaded=!1;var Yk=Xk;function Kk(){Kk.__loaded||(Kk.__loaded=!0,Ac.RegisterGraphicCreator("area",Jl),nr.load(Wv),nr.load(Wk?Pm:Vg))}Kk.__loaded=!1;var qk=Kk;function Zk(){Zk.__loaded||(Zk.__loaded=!0,Ac.RegisterGraphicCreator("circle",zs),nr.load(Yv),nr.load(Wk?Vm:Zg))}Zk.__loaded=!1;var Jk=Zk;function $k(){$k.__loaded||($k.__loaded=!0,Ac.RegisterGraphicCreator("glyph",Il),nr.load(np),nr.load(Wk?vk:iy))}$k.__loaded=!1;var Qk=$k;function tb(){tb.__loaded||(tb.__loaded=!0,Ac.RegisterGraphicCreator("group",is))}tb.__loaded=!1;var eb=tb;function ib(){ib.__loaded||(ib.__loaded=!0,Ac.RegisterGraphicCreator("image",Nl),nr.load(cp),nr.load(Wk?Sk:oy))}ib.__loaded=!1;var nb=ib;function rb(){rb.__loaded||(rb.__loaded=!0,Ac.RegisterGraphicCreator("line",Tl),nr.load(Gv),nr.load(Wk?Tm:dy))}rb.__loaded=!1;var ab=rb;function ob(){ob.__loaded||(ob.__loaded=!0,Ac.RegisterGraphicCreator("path",Kl),nr.load(Jv),nr.load(Wk?ik:Sy))}ob.__loaded=!1;var sb=ob;function ub(){ub.__loaded||(ub.__loaded=!0,Ac.RegisterGraphicCreator("polygon",ac),nr.load(Qv),nr.load(Wk?uk:my))}ub.__loaded=!1;var lb=ub;function cb(){cb.__loaded||(cb.__loaded=!0,Ac.RegisterGraphicCreator("pyramid3d",sc),nr.load(xp),nr.load(Uk))}cb.__loaded=!1;var hb=cb;function db(){db.__loaded||(db.__loaded=!0,Ac.RegisterGraphicCreator("rect",Bl),nr.load(Nv),nr.load(Wk?mm:Ry))}db.__loaded=!1;var fb=db;function vb(){vb.__loaded||(vb.__loaded=!0,Ac.RegisterGraphicCreator("rect3d",Pl),nr.load(vp),nr.load(Mk))}vb.__loaded=!1;var pb=vb;function gb(){gb.__loaded||(gb.__loaded=!0,Ac.RegisterGraphicCreator("richtext",Hl),nr.load(up),nr.load(Wk?bk:Oy))}gb.__loaded=!1;var yb=gb;function mb(){mb.__loaded||(mb.__loaded=!0,wp())}mb.__loaded=!1;var kb=mb;function bb(){bb.__loaded||(bb.__loaded=!0,Ac.RegisterGraphicCreator("symbol",wl),nr.load(Hv),nr.load(Wk?Fm:Ny))}bb.__loaded=!1;var _b=bb;function xb(){xb.__loaded||(xb.__loaded=!0,Ac.RegisterGraphicCreator("text",Ys),nr.load(qv),nr.load(Wk?Zm:Wy))}xb.__loaded=!1;var wb=xb;function Sb(){Sb.__loaded||(Sb.__loaded=!0,Ac.RegisterGraphicCreator("wrapText",Zs))}Sb.__loaded=!1;var Ab=Sb;qf(),gv()?Pg(nr):function(){pv();var t=Un.global&&Un.global.env;return t?"node"===t:!fv}()&&am(nr),Hk(),Yk(),qk(),Jk(),Qk(),eb(),nb(),ab(),sb(),lb(),hb(),fb(),pb(),yb(),kb(),_b(),wb(),Ab();var Tb=function(t,e){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")},Eb=function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"boolean"==typeof t:!0===t||!1===t||Tb(t,"Boolean")},Cb=function(t){return null==t},Bb=function(t){return null!=t},Mb=function(t){var e=a(t);return null!==t&&"object"===e||"function"===e},Rb=function(t){return"object"==a(t)&&null!==t},Pb=function(t){if(!Rb(t)||!Tb(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Ob=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=a(t);return e?"string"===i:"string"===i||Tb(t,"String")},Ib=function(t){return Array.isArray?Array.isArray(t):Tb(t,"Array")},Lb=function(t){return null!==t&&"function"!=typeof t&&Number.isFinite(t.length)},Db=function(t){return Tb(t,"Date")},jb=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=a(t);return e?"number"===i:"number"===i||Tb(t,"Number")};function Fb(t){var e;if(!Bb(t)||"object"!=a(t))return t;var i=Ib(t),n=t.length;e=i?new Array(n):"object"==a(t)?{}:Eb(t)||jb(t)||Ob(t)?t:Db(t)?new Date(+t):void 0;var r=i?void 0:Object.keys(Object(t)),o=-1;if(e)for(;++o<(r||t).length;){var s=r?r[o]:o,u=t[s];e[s]=Fb(u)}return e}function Nb(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(t===e)return;if(Bb(e)&&"object"==a(e)){var n=Object(e),r=[];for(var o in n)r.push(o);for(var s=r.length,u=-1;s--;){var l=r[++u];Bb(n[l])&&"object"==a(n[l])?zb(t,e,l,i):Gb(t,l,n[l])}}}}function zb(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=t[i],o=e[i],s=e[i],u=!0;if(Ib(o)){if(n)s=[];else if(Ib(r))s=r;else if(Lb(r)){s=new Array(r.length);for(var l=-1,c=r.length;++l<c;)s[l]=r[l]}}else Pb(o)?(s=r,"function"!=typeof r&&"object"==a(r)||(s={})):u=!1;u&&Nb(s,o,n),Gb(t,i,s)}function Gb(t,e,i){(void 0!==i&&!function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t[e],i)||void 0===i&&!(e in t))&&(t[e]=i)}function Ub(t){for(var e=-1,i=arguments.length<=1?0:arguments.length-1;++e<i;)Nb(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1],!0);return t}function Wb(t){return Bb(t)?Ib(t)?t:[t]:[]}var Vb=function(t,e,i){return t<e?e:t>i?i:t};function Hb(t,e,i){e/=100,i/=100;var n=(1-Math.abs(2*i-1))*e,r=n*(1-Math.abs(t/60%2-1)),a=i-n/2,o=0,s=0,u=0;return 0<=t&&t<60?(o=n,s=r,u=0):60<=t&&t<120?(o=r,s=n,u=0):120<=t&&t<180?(o=0,s=n,u=r):180<=t&&t<240?(o=0,s=r,u=n):240<=t&&t<300?(o=r,s=0,u=n):300<=t&&t<360&&(o=n,s=0,u=r),{r:o=Math.round(255*(o+a)),g:s=Math.round(255*(s+a)),b:u=Math.round(255*(u+a))}}function Xb(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),a=r-n,o=0,s=0;return o=0===a?0:r===t?(e-i)/a%6:r===e?(i-t)/a+2:(t-e)/a+4,(o=Math.round(60*o))<0&&(o+=360),s=(r+n)/2,{h:o,s:+(100*(0===a?0:a/(1-Math.abs(2*s-1)))).toFixed(1),l:s=+(100*s).toFixed(1)}}var Yb=/^#([0-9a-f]{3,8})$/,Kb={transparent:4294967040},qb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Zb(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Jb(t){return jb(t)?new e_(t>>16,t>>8&255,255&t,1):Ib(t)?new e_(t[0],t[1],t[2]):new e_(255,255,255)}function $b(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Qb(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}var t_=function(){function t(e){o(this,t);var i=t.parseColorString(e);i?this.color=i:(console.warn("Warn: 传入".concat(e,"无法解析为Color")),this.color=new e_(255,255,255))}return u(t,[{key:"toRGBA",value:function(){return this.color.formatRgb()}},{key:"toString",value:function(){return this.color.formatRgb()}},{key:"toHex",value:function(){return this.color.formatHex()}},{key:"toHsl",value:function(){return this.color.formatHsl()}},{key:"brighter",value:function(t){var e=this.color,i=e.r,n=e.g,r=e.b;return this.color.r=Math.max(0,Math.min(255,Math.floor(i*t))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t))),this.color.b=Math.max(0,Math.min(255,Math.floor(r*t))),this}},{key:"add",value:function(t){var e=this.color,i=e.r,n=e.g,r=e.b;return this.color.r+=Math.min(255,i+t.color.r),this.color.g+=Math.min(255,n+t.color.g),this.color.b+=Math.min(255,r+t.color.b),this}},{key:"sub",value:function(t){return this.color.r=Math.max(0,this.color.r-t.color.r),this.color.g=Math.max(0,this.color.g-t.color.g),this.color.b=Math.max(0,this.color.b-t.color.b),this}},{key:"multiply",value:function(t){var e=this.color,i=e.r,n=e.g,r=e.b;return this.color.r=Math.max(0,Math.min(255,Math.floor(i*t.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(r*t.color.b))),this}},{key:"getHSVBrightness",value:function(){return Math.max(this.color.r,this.color.g,this.color.b)/255}},{key:"getHSLBrightness",value:function(){return.5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}},{key:"setHsl",value:function(t,e,i){var n=this.color.opacity,r=Xb(this.color.r,this.color.g,this.color.b),a=Hb(Cb(t)?r.h:Vb(t,0,360),Cb(e)?r.s:e>=0&&e<=1?100*e:e,Cb(i)?r.l:i<=1&&i>=0?100*i:i);return this.color=new e_(a.r,a.g,a.b,n),this}},{key:"setRGB",value:function(t,e,i){return!Cb(t)&&(this.color.r=t),!Cb(e)&&(this.color.g=e),!Cb(i)&&(this.color.b=i),this}},{key:"setHex",value:function(t){var e="".concat(t).trim().toLowerCase(),i=Yb.exec(e),n=parseInt(i[1],16),r=i[1].length;return 3===r?new e_((n>>8&15)+((n>>8&15)<<4),(n>>4&15)+((n>>4&15)<<4),(15&n)+((15&n)<<4),1):6===r?Jb(n):8===r?new e_(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):this}},{key:"setColorName",value:function(t){var e=qb[t.toLowerCase()];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}},{key:"setScalar",value:function(t){return this.color.r=t,this.color.g=t,this.color.b=t,this}},{key:"setOpacity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.color.opacity=t,this}},{key:"getLuminance",value:function(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}},{key:"getLuminance2",value:function(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}},{key:"getLuminance3",value:function(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}},{key:"clone",value:function(){return new t(this.color.toString())}},{key:"copyGammaToLinear",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return this.color.r=Math.pow(t.color.r,e),this.color.g=Math.pow(t.color.g,e),this.color.b=Math.pow(t.color.b,e),this}},{key:"copyLinearToGamma",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=e>0?1/e:1;return this.color.r=Math.pow(t.color.r,i),this.color.g=Math.pow(t.color.g,i),this.color.b=Math.pow(t.color.b,i),this}},{key:"convertGammaToLinear",value:function(t){return this.copyGammaToLinear(this,t),this}},{key:"convertLinearToGamma",value:function(t){return this.copyLinearToGamma(this,t),this}},{key:"copySRGBToLinear",value:function(t){return this.color.r=$b(t.color.r),this.color.g=$b(t.color.g),this.color.b=$b(t.color.b),this}},{key:"copyLinearToSRGB",value:function(t){return this.color.r=Qb(t.color.r),this.color.g=Qb(t.color.g),this.color.b=Qb(t.color.b),this}},{key:"convertSRGBToLinear",value:function(){return this.copySRGBToLinear(this),this}},{key:"convertLinearToSRGB",value:function(){return this.copyLinearToSRGB(this),this}}],[{key:"Brighter",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===i?e:new t(e).brighter(i).toRGBA()}},{key:"SetOpacity",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===i?e:new t(e).setOpacity(i).toRGBA()}},{key:"getColorBrightness",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hsl",n=e instanceof t?e:new t(e);switch(i){case"hsv":default:return n.getHSVBrightness();case"hsl":return n.getHSLBrightness();case"lum":return n.getLuminance();case"lum2":return n.getLuminance2();case"lum3":return n.getLuminance3()}}},{key:"parseColorString",value:function(t){if(Bb(Kb[t]))return function(t){return jb(t)?new e_(t>>>24,t>>>16&255,t>>>8&255,255&t):Ib(t)?new e_(t[0],t[1],t[2],t[3]):new e_(255,255,255,1)}(Kb[t]);if(Bb(qb[t]))return Jb(qb[t]);var e="".concat(t).trim().toLowerCase(),i=Yb.exec(e);if(i){var n=parseInt(i[1],16),r=i[1].length;return 3===r?new e_((n>>8&15)+((n>>8&15)<<4),(n>>4&15)+((n>>4&15)<<4),(15&n)+((15&n)<<4),1):6===r?Jb(n):8===r?new e_(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):void 0}if(/^(rgb|RGB|rgba|RGBA)/.test(e)){var a=e.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new e_(parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10),parseFloat(a[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(e)){var o=e.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),s=Hb(parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10));return new e_(s.r,s.g,s.b,parseFloat(o[3]))}}}])}(),e_=function(){return u((function t(e,i,n,r){o(this,t),this.r=isNaN(+e)?255:Math.max(0,Math.min(255,+e)),this.g=isNaN(+i)?255:Math.max(0,Math.min(255,+i)),this.b=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),Bb(r)?this.opacity=isNaN(+r)?1:Math.max(0,Math.min(1,+r)):this.opacity=1}),[{key:"formatHex",value:function(){return"#".concat(Zb(this.r)+Zb(this.g)+Zb(this.b)+(1===this.opacity?"":Zb(255*this.opacity)))}},{key:"formatRgb",value:function(){var t=this.opacity;return"".concat(1===t?"rgb(":"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b).concat(1===t?")":",".concat(t,")"))}},{key:"formatHsl",value:function(){var t=this.opacity,e=Xb(this.r,this.g,this.b),i=e.h,n=e.s,r=e.l;return"".concat(1===t?"hsl(":"hsla(").concat(i,",").concat(n,"%,").concat(r,"%").concat(1===t?")":",".concat(t,")"))}},{key:"toString",value:function(){return this.formatHex()}}])}();function i_(t){return{x:t.left,y:t.top,width:"width"in t?t.width:t.right-t.left,height:"height"in t?t.height:t.bottom-t.top}}class n_{get graphic(){return this._graphic}constructor(t,e){this.containsShapePoints=!1,this.type=t,this._character=e}getBounds(){return this._graphic.AABBBounds}release(){this._graphic&&(this._graphic.parent.removeChild(this._graphic),this._graphic=null)}getInitialAttributes(){return{x:0,y:0,width:120,height:80,angle:0,anchor:[60,40],lineWidth:2,stroke:"#000000",shapePoints:[]}}setAttributes(t){this._graphic&&this._graphic.setAttributes(t)}show(){this._graphic.setAttributes({visible:!0,visibleAll:!0})}hide(){this._graphic.setAttributes({visible:!1,visibleAll:!1})}getGraphicAttribute(){var t;return null===(t=this._graphic)||void 0===t?void 0:t.attribute}applyGraphicAttribute(t){this._graphic.setAttributes(this._transformAttributes(Object.assign({},t)))}getPositionData(){return{x:this._graphic.attribute.x,y:this._graphic.attribute.y,width:this._graphic.attribute.width,height:this._graphic.attribute.height,angle:this._graphic.attribute.angle,shapePoints:this._graphic.attribute.shapePoints}}applyLayoutData(t){this._graphic.setAttributes(this._transformAttributes(Object.assign(Object.assign({},i_(t)),{shapePoints:this._character.spec.options.shapePoints})))}getTextLayoutRatio(){return{left:0,right:1,top:0,bottom:1}}_transformAttributes(t){var e,i,n,r;const a=null!==(e=t.width)&&void 0!==e?e:null===(i=this._graphic)||void 0===i?void 0:i.attribute.width,o=null!==(n=t.height)&&void 0!==n?n:null===(r=this._graphic)||void 0===r?void 0:r.attribute.height,s=Object.assign({},t);return Object.keys(s).forEach((e=>{Bb(t[e])||delete s[e]})),s.anchor=[a/2,o/2],s.scaleCenter=[a/2,o/2],s.x=0,s.y=0,s}}class r_ extends n_{getInitialAttributes(){return{x:0,y:0,symbolType:"M649.6 812.8l-114.976 114.944a32 32 0 0 1-45.248 0L374.4 812.8H128a64 64 0 0 1-64-64V160a64 64 0 0 1 64-64h768a64 64 0 0 1 64 64v588.8a64 64 0 0 1-64 64h-246.4z",angle:0,size:40,lineWidth:2,stroke:"pink"}}init(){var t,e;this._graphic||(this._graphic=wl(Object.assign({},this._transformAttributes(Object.assign(Object.assign({},this.getInitialAttributes()),null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.graphic)&&void 0!==e?e:{})))),this._graphic.name=`graphic-qipao-${this._character.id}`,this._character.getGraphicParent().add(this._graphic))}}const a_=999999;class o_{constructor(t){this.updateAttribute=t=>{t&&(this._graphic.setAttributes(this._transformTextAttributes(t)),this._updateGraphicCharacterSize())},this._character=t}show(){this._graphic.setAttributes({visible:!0})}hide(){this._graphic.setAttributes({visible:!1})}init(){var t,e;this._graphic=Ys(this._transformTextAttributes(Object.assign(Object.assign({visible:!0,x:0,y:0,textAlign:"center",textBaseline:"middle",text:null,fontSize:16,whiteSpace:"normal",graphicAlign:"center",graphicBaseline:"middle",fill:"#000000",ignoreBuf:!0},null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.text)&&void 0!==e?e:{}),{maxLineWidth:a_,heightLimit:a_}))),this._character.getGraphicParent().add(this._graphic)}applyGraphicAttribute(t){this._graphic.setAttributes(Object.assign({},t))}getGraphicAttribute(){var t;return null===(t=this._graphic)||void 0===t?void 0:t.attribute}applyLayoutData(t){const e=i_(t),i=this._character.getTextLayoutRatio(),n=this._graphic.attribute.graphicAlign,r=this._graphic.attribute.graphicBaseline,a=e.width*i.left,o=e.width*i.right,s=(a+o)/2,u=e.height*i.top,l=e.height*i.bottom,c=(u+l)/2;let h=s,d="center",f=c,v="middle";switch(n){case"left":h=a,d="left";break;case"center":h=s,d="center";break;case"right":h=o,d="right"}switch(r){case"top":f=u,v="top";break;case"middle":f=c,v="middle";break;case"bottom":f=l,v="bottom"}this._graphic.setAttributes(this._transformTextAttributes({x:h,y:f,textAlign:d,textBaseline:v,angle:e.angle,anchor:[e.width/2,e.height/2],scaleCenter:[e.width/2,e.height/2],maxLineWidth:o-a,heightLimit:this._character.graphic.getGraphicAttribute().isResized?l-u:a_}))}_updateGraphicCharacterSize(){this._character.graphic.getGraphicAttribute().isResized||this.applyLayoutData(this._character.graphic.getPositionData())}_transformTextAttributes(t){return t}}class s_{get spec(){return this._spec}get option(){return this._option}constructor(t,e){this.id=t.id,this._spec=t,this._option=e}updateSpec(t){var e;t.position&&(this._spec.position=t.position),Bb(t.zIndex)&&(this._spec.zIndex=t.zIndex),t.options&&(this._spec.options=Ub(null!==(e=this._spec.options)&&void 0!==e?e:{},t.options))}setAttributes(t){throw new Error("请重载setAttributes函数")}tickTo(t){throw new Error("Method not implemented.")}init(){this._initRuntime(),this._parserSpec(),this._initGraphics()}reset(){this.clearCharacter(),this.init()}getPositionData(){}}class u_ extends s_{constructor(){super(...arguments),this.graphicType="rect"}get spec(){return this._spec}get graphic(){return this._graphic}get text(){return this._text}get group(){return this._group}_parserSpec(){}_initGraphics(){this._group=is(Object.assign(Object.assign({},i_(this._spec.position)),{angle:this._spec.options.angle,zIndex:this._spec.zIndex})),this.option.graphicParent.add(this._group),this._graphic=this._createGraphic(),this._text=new o_(this),this._graphic.init(),this._text.init(),this._graphic.applyGraphicAttribute(this._spec.options.graphic),this._text.applyGraphicAttribute(this._spec.options.text),this._graphic.applyLayoutData(this._spec.position),this._text.applyLayoutData(this._spec.position),this.hide()}setAttributes(t){this.group.setAttributes(t),this._graphic.setAttributes(Object.assign(Object.assign({},t),{x:0,y:0,angle:0})),this._text.updateAttribute({})}_initRuntime(){}show(){this._group.setAttributes({visible:!0}),this._text.show(),this._graphic.show()}hide(){this._group.setAttributes({visible:!1}),this._text.hide(),this._graphic.hide()}getTextLayoutRatio(){return this._graphic.getTextLayoutRatio()}clearCharacter(){var t;null===(t=this._group)||void 0===t||t.parent.removeChild(this._group),this._group=null}getGraphicParent(){return this._group}checkEvent(t){var e;return!!(null!==(e=t.detailPath)&&void 0!==e?e:t.path).some((t=>t===this._group))&&{part:t.path[t.path.length-1]===this._graphic.graphic?"graphic":"text",graphicType:this.graphicType}}}class l_ extends u_{constructor(){super(...arguments),this.graphicType="qipao"}_createGraphic(){return new r_("QipaoComponent",this)}}class c_ extends n_{getInitialAttributes(){return{x:0,y:0,width:120,height:80,angle:0,anchor:[60,40],lineWidth:2,stroke:"#000000",shapePoints:[]}}init(){var t,e;this._graphic||(this._graphic=Bl(this._transformAttributes(Object.assign(Object.assign({},this.getInitialAttributes()),null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.graphic)&&void 0!==e?e:{}))),this._graphic.name=`graphic-rect-${this._character.id}`,this._character.getGraphicParent().add(this._graphic))}}var h_,d_,f_;!function(t){t.CHARACTER_CHART="CharacterChart",t.BAR="BarChart",t.LINE="LineChart",t.AREA="AreaChart",t.HISTOGRAM="HistogramChart",t.PIE="PieChart",t.ROSE="RoseChart",t.RADAR="RadarChart",t.RANGE_COLUMN="RangeColumnChart",t.SCATTER="ScatterChart",t.WORD_CLOUD="WordCloudChart",t.TREE_MAP="TreeMapChart",t.SUNBURST="SunburstChart"}(h_||(h_={})),function(t){t.RECT="RectComponent",t.LINE="LineComponent",t.ARC="ArcComponent",t.PATH="PathComponent",t.TEXT="TextComponent",t.RICH_TEXT="RichTextComponent",t.QIPAO="QipaoComponent",t.IMAGE="ImageComponent"}(d_||(d_={})),function(t){t.MARK_POINT="markPoint",t.TITLE="title"}(f_||(f_={}));class v_ extends u_{constructor(){super(...arguments),this.graphicType="rect"}_createGraphic(){return new c_(d_.RECT,this)}}class p_{static registerCharacter(t,e){p_.characterMap[t]=e}static createCharacter(t,e){const i=p_.characterMap[t.type];if(!i)return console.error("获取模板失败",t),null;const n=new i(t,e);return n.init(),n}static registerGraphic(t,e){p_.graphicMap[t]=e}static createGraphic(t,e){const i=p_.graphicMap[t];return i?new i(t,e):null}static registerDataParser(t,e){p_.dataParserMap[t]=e}static createDataParser(t,e){const i=p_.dataParserMap[t];return i?new i(t,e):null}static registerChartTemp(t,e){p_.chartTempMap[t]=e}static createChartTemp(t,e){const i=p_.chartTempMap[t];return i?new i(e):null}}p_.characterMap={},p_.graphicMap={},p_.dataParserMap={},p_.chartTempMap={};function g_(t,e,i){return!!i&&(Bb(i.usrId)?t.id===i.usrId:!!Bb(i.specIndex)&&("all"===i.specIndex||e===i.specIndex))}var y_,m_,k_=function(t){return t};!function(t){t["desktop-browser"]="desktop-browser",t["mobile-browser"]="mobile-browser",t.node="node",t.worker="worker",t.miniApp="miniApp",t.wx="wx",t.tt="tt",t.harmony="harmony",t["desktop-miniApp"]="desktop-miniApp",t.lynx="lynx"}(y_||(y_={})),function(t){t.cartesianAxis="cartesianAxis",t.cartesianBandAxis="cartesianAxis-band",t.cartesianLinearAxis="cartesianAxis-linear",t.cartesianTimeAxis="cartesianAxis-time",t.cartesianLogAxis="cartesianAxis-log",t.cartesianSymlogAxis="cartesianAxis-symlog",t.polarAxis="polarAxis",t.polarBandAxis="polarAxis-band",t.polarLinearAxis="polarAxis-linear",t.crosshair="crosshair",t.cartesianCrosshair="cartesianCrosshair",t.polarCrosshair="polarCrosshair",t.dataZoom="dataZoom",t.geoCoordinate="geoCoordinate",t.indicator="indicator",t.discreteLegend="discreteLegend",t.continuousLegend="continuousLegend",t.colorLegend="colorLegend",t.sizeLegend="sizeLegend",t.mapLabel="mapLabel",t.markLine="markLine",t.markArea="markArea",t.markPoint="markPoint",t.polarMarkLine="polarMarkLine",t.polarMarkArea="polarMarkArea",t.polarMarkPoint="polarMarkPoint",t.geoMarkPoint="geoMarkPoint",t.tooltip="tooltip",t.title="title",t.player="player",t.scrollBar="scrollBar",t.label="label",t.totalLabel="totalLabel",t.brush="brush",t.poptip="poptip",t.customMark="customMark"}(m_||(m_={}));var b_,__=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return S_.apply(void 0,[Dt(t)].concat(i))};function x_(t,e,i){var n=e[i];if(void 0===n)t[i]=null;else if(gt(n))for(var r in gt(t[i])||(t[i]={}),n)x_(t[i],n,r);else t[i]=n}function w_(t,e){if(gt(e)&&t!==e)for(var i in e)x_(t,e,i)}function S_(t){t||(t={});for(var e=-1,i=arguments.length<=1?0:arguments.length-1;++e<i;)w_(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1]);return t}!function(t){t.DSV="dsv",t.TREE="tree",t.GEO="geo",t.BYTE="bytejson",t.HEX="hex",t.GRAPH="graph",t.TABLE="table",t.GEO_GRATICULE="geo-graticule"}(b_||(b_={}));var A_=function(t,e){var i,n;if(!(null==e?void 0:e.fields))return t;if(0===t.length)return t;var r=e.fields,a=t[0],o={},s=[],u=function(e){if(Object.prototype.hasOwnProperty.call(r,e)){var u,l=r[e];if(!l.type){var c=a;e in a||(c=null!==(i=t.find((function(t){return e in t})))&&void 0!==i?i:a),l.type="number"==typeof c[e]?"linear":"ordinal"}if("number"==typeof l.sortIndex&&(u={key:e,type:l.type,index:l.sortIndex,sortIndex:{},sortIndexCount:0,sortReverse:!0===l.sortReverse},s.push(u)),(null===(n=l.domain)||void 0===n?void 0:n.length)>0)if("ordinal"===l.type){l._domainCache={},o[e]=l;var h={};l.domain.forEach((function(t,e){h[t]=e,l._domainCache[t]=e})),u&&(u.sortIndex=h,u.sortIndexCount=l.domain.length)}else l.domain.length>=2&&(o[e]=l)}};for(var l in r)u(l);return Object.keys(o).length>0&&(t=t.filter((function(t){for(var e in o){var i=o[e];if("ordinal"===i.type){if(!(t[e]in i._domainCache))return!1}else if(i.domain[0]>t[e]||i.domain[1]<t[e])return!1}return!0}))),s.sort((function(t,e){return t.index-e.index})),t.sort((function(t,e){return function(t,e,i){for(var n=0;n<i.length;n++){var r=i[n],a=0;if("ordinal"===r.type?(void 0===r.sortIndex[e[r.key]]&&(r.sortIndex[e[r.key]]=r.sortIndexCount++),void 0===r.sortIndex[t[r.key]]&&(r.sortIndex[t[r.key]]=r.sortIndexCount++),a=r.sortIndex[t[r.key]]-r.sortIndex[e[r.key]]):"linear"===r.type&&(a=t[r.key]-e[r.key]),r.sortReverse&&(a=-a),0!==a)return a}return 0}(t,e,s)})),t};var T_={},E_={};function C_(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function B_(t){var e=Object.create(null),i=[];return t.forEach((function(t){for(var n in t)n in e||i.push(e[n]=n)})),i}function M_(t,e){var i=t+"",n=i.length;return n<e?new Array(e-n+1).join(0)+i:i}function R_(t){var e,i=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+M_(-e,6):e>9999?"+"+M_(e,6):M_(e,4))+"-"+M_(t.getUTCMonth()+1,2)+"-"+M_(t.getUTCDate(),2)+(a?"T"+M_(i,2)+":"+M_(n,2)+":"+M_(r,2)+"."+M_(a,3)+"Z":r?"T"+M_(i,2)+":"+M_(n,2)+":"+M_(r,2)+"Z":n||i?"T"+M_(i,2)+":"+M_(n,2)+"Z":"")}function P_(t){var e=new RegExp('["'+t+"\n\r]"),i=t.charCodeAt(0);function n(t,e){var n,r=[],a=t.length,o=0,s=0,u=a<=0,l=!1;function c(){if(u)return E_;if(l)return l=!1,T_;var e,n,r=o;if(34===t.charCodeAt(r)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?u=!0:10===(n=t.charCodeAt(o++))?l=!0:13===n&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(r+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(n=t.charCodeAt(e=o++)))l=!0;else if(13===n)l=!0,10===t.charCodeAt(o)&&++o;else if(n!==i)continue;return t.slice(r,e)}return u=!0,t.slice(r,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(n=c())!==E_;){for(var h=[];n!==T_&&n!==E_;)h.push(n),n=c();e&&null==(h=e(h,s++))||r.push(h)}return r}function r(e,i){return e.map((function(e){return i.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?R_(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var i,r,a=n(t,(function(t,n){if(i)return i(t,n-1);r=t,i=e?function(t,e){var i=C_(t);return function(n,r){return e(i(n),r,t)}}(t,e):C_(t)}));return a.columns=r||[],a},parseRows:n,format:function(e,i){return null==i&&(i=B_(e)),[i.map(o).join(t)].concat(r(e,i)).join("\n")},formatBody:function(t,e){return null==e&&(e=B_(t)),r(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var O_=P_(",").parse,I_=P_("\t").parse,L_={delimiter:","},D_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(arguments.length>2?arguments[2]:void 0).type=b_.DSV;var i=__(L_,e).delimiter;if(!bt(i))throw new TypeError("Invalid delimiter: must be a string!");return P_(i).parse(t)},j_=function(t){return(arguments.length>2?arguments[2]:void 0).type=b_.DSV,O_(t)},F_=function(t){return(arguments.length>2?arguments[2]:void 0).type=b_.DSV,I_(t)},N_=function(t,e,i){var n=!dt(null==e?void 0:e.dependencyUpdate)||(null==e?void 0:e.dependencyUpdate);if(!t||!_t(t))throw new TypeError("Invalid data: must be DataView array!");return _t(i.rawData)&&i.rawData.forEach((function(t){t.target&&(t.target.removeListener("change",i.reRunAllTransform),t.target.removeListener("markRunning",i.markRunning))})),n&&t.forEach((function(t){t.target.addListener("change",i.reRunAllTransform),t.target.addListener("markRunning",i.markRunning)})),t},z_=0;function G_(){return z_>1e8&&(z_=0),(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"dataset")+"_"+z_++}var U_=function(){return u((function t(e){var i,n;o(this,t),this.options=e,this.isDataSet=!0,this.transformMap={},this.parserMap={},this.dataViewMap={},this.target=new ct,n=(null==e?void 0:e.name)?e.name:G_("dataset"),this.name=n,this._logger=null!==(i=null==e?void 0:e.logger)&&void 0!==i?i:te.getInstance()}),[{key:"setLogger",value:function(t){this._logger=t}},{key:"getDataView",value:function(t){return this.dataViewMap[t]}},{key:"setDataView",value:function(t,e){var i;this.dataViewMap[t]&&(null===(i=this._logger)||void 0===i||i.error("Error: dataView ".concat(t," 之前已存在,请重新命名"))),this.dataViewMap[t]=e}},{key:"removeDataView",value:function(t){this.dataViewMap[t]=null,delete this.dataViewMap[t]}},{key:"registerParser",value:function(t,e){var i;this.parserMap[t]&&(null===(i=this._logger)||void 0===i||i.warn("Warn: transform ".concat(t," 之前已注册,执行覆盖逻辑"))),this.parserMap[t]=e}},{key:"removeParser",value:function(t){this.parserMap[t]=null,delete this.parserMap[t]}},{key:"getParser",value:function(t){return this.parserMap[t]||this.parserMap.default}},{key:"registerTransform",value:function(t,e){var i;this.transformMap[t]&&(null===(i=this._logger)||void 0===i||i.warn("Warn: transform ".concat(t," 之前已注册,执行覆盖逻辑"))),this.transformMap[t]=e}},{key:"removeTransform",value:function(t){this.transformMap[t]=null,delete this.transformMap[t]}},{key:"getTransform",value:function(t){return this.transformMap[t]}},{key:"multipleDataViewAddListener",value:function(t,e,i){this._callMap||(this._callMap=new Map);var n=this._callMap.get(i);n||(n=function(){t.some((function(t){return t.isRunning}))||i()}),t.forEach((function(t){t.target.addListener(e,n)})),this._callMap.set(i,n)}},{key:"allDataViewAddListener",value:function(t,e){this.multipleDataViewAddListener(Object.values(this.dataViewMap),t,e)}},{key:"multipleDataViewRemoveListener",value:function(t,e,i){if(this._callMap){var n=this._callMap.get(i);n&&t.forEach((function(t){t.target.removeListener(e,n)})),this._callMap.delete(i)}}},{key:"multipleDataViewUpdateInParse",value:function(t){var e=this;t.forEach((function(t){var i;return null===(i=e.getDataView(t.name))||void 0===i?void 0:i.markRunning()})),t.forEach((function(t){var i;return null===(i=e.getDataView(t.name))||void 0===i?void 0:i.parseNewData(t.data,t.options)}))}},{key:"multipleDataViewUpdateInRawData",value:function(t){var e=this;t.forEach((function(t){var i;return null===(i=e.getDataView(t.name))||void 0===i?void 0:i.markRunning()})),t.forEach((function(t){var i;return null===(i=e.getDataView(t.name))||void 0===i?void 0:i.updateRawData(t.data,t.options)}))}},{key:"destroy",value:function(){this.transformMap=null,this.parserMap=null,this.dataViewMap=null,this._callMap=null,this.target.removeAllListeners()}}])}(),W_="_data-view-diff-rank",V_=function(){function t(e,i){var n,r=this;o(this,t),this.dataSet=e,this.options=i,this.isDataView=!0,this.target=new ct,this.parseOption=null,this.transformsArr=[],this.isRunning=!1,this.rawData={},this.history=!1,this.parserData={},this.latestData={},this._fields=null,this.reRunAllTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pushHistory:!0,emitMessage:!0};return r.isRunning=!0,r.resetTransformData(),r.transformsArr.forEach((function(e){r.executeTransform(e,{pushHistory:t.pushHistory,emitMessage:!1}),r.isLastTransform(e)&&r.diffLastData()})),r.isRunning=!1,!1!==t.emitMessage&&r.target.emit("change",[]),r},this.markRunning=function(){r.isRunning=!0,r.target.emit("markRunning",[])},n=(null==i?void 0:i.name)?i.name:G_("dataview"),this.name=n,(null==i?void 0:i.history)&&(this.history=i.history,this.historyData=[]),this.dataSet.setDataView(n,this),this.setFields(null==i?void 0:i.fields)}return u(t,[{key:"parse",value:function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isRunning=!0,n&&this.target.emit("beforeParse",[]),e&&(this.parseOption=e);var r=this.cloneParseData(t,e);if(null==e?void 0:e.type){var a=(null!==(i=this.dataSet.getParser(e.type))&&void 0!==i?i:this.dataSet.getParser("bytejson"))(r,e.options,this);this.rawData=r,this.parserData=a,this.history&&this.historyData.push(r,a),this.latestData=a}else this.parserData=r,this.rawData=r,this.history&&this.historyData.push(r),this.latestData=r;return this.isRunning=!1,n&&this.target.emit("afterParse",[]),this}},{key:"transform",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isRunning=!0,t&&t.type){var i=!0;if("fields"===t.type){this._fields=t.options.fields;var n=this.transformsArr.findIndex((function(e){return e.type===t.type}));n>=0&&(i=!1,this.transformsArr[n].options.fields=this._fields)}if(i&&this.transformsArr.push(t),e){var r=this.isLastTransform(t);this.executeTransform(t),r&&this.diffLastData()}}return this.sortTransform(),this.isRunning=!1,this}},{key:"isLastTransform",value:function(t){return this.transformsArr[this.transformsArr.length-1]===t}},{key:"sortTransform",value:function(){this.transformsArr.length>=2&&this.transformsArr.sort((function(t,e){var i,n;return(null!==(i=t.level)&&void 0!==i?i:0)-(null!==(n=e.level)&&void 0!==n?n:0)}))}},{key:"executeTransform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{pushHistory:!0,emitMessage:!0},i=e.pushHistory,n=e.emitMessage,r=this.dataSet.getTransform(t.type)(this.latestData,t.options);this.history&&!1!==i&&this.historyData.push(r),this.latestData=r,!1!==n&&this.target.emit("change",[])}},{key:"resetTransformData",value:function(){this.latestData=this.parserData,this.history&&(this.historyData.length=0,this.historyData.push(this.rawData,this.parserData))}},{key:"enableDiff",value:function(t){this._diffData=!0,this._diffKeys=t,this._diffMap=new Map,this._diffRank=0}},{key:"disableDiff",value:function(){this._diffData=!1,this._diffMap=null,this._diffRank=null}},{key:"resetDiff",value:function(){this._diffMap=new Map,this._diffRank=0}},{key:"diffLastData",value:function(){var t,e=this;if(this._diffData&&this.latestData.forEach&&(null===(t=this._diffKeys)||void 0===t?void 0:t.length)){var i,n=this._diffRank+1;if(0===this._diffRank)this.latestData.forEach((function(t){t[W_]=n,e._diffMap.set(e._diffKeys.reduce((function(e,i){return e+t[i]}),""),t)})),this.latestDataAUD={add:Array.from(this.latestData),del:[],update:[]};else this.latestDataAUD={add:[],del:[],update:[]},this.latestData.forEach((function(t){t[W_]=n,i=e._diffKeys.reduce((function(e,i){return e+t[i]}),""),e._diffMap.get(i)?e.latestDataAUD.update.push(t):e.latestDataAUD.add.push(t),e._diffMap.set(i,t)})),this._diffMap.forEach((function(t,i){t[W_]<n&&(e.latestDataAUD.del.push(t),e._diffMap.delete(i))}));this._diffRank=n}}},{key:"cloneParseData",value:function(e,i){var n=!1;return e instanceof t||!0!==(null==i?void 0:i.clone)||(n=!0),n?Dt(e):e}},{key:"parseNewData",value:function(t,e){this.parse(t,e||this.parseOption),this.reRunAllTransform()}},{key:"updateRawData",value:function(t,e){var i=this.cloneParseData(t,e);this.rawData=i,this.parserData=i,this.latestData=i,this.reRunAllTransform()}},{key:"getFields",value:function(){var t;return this._fields?this._fields:"dataview"===(null===(t=this.parseOption)||void 0===t?void 0:t.type)&&1===this.rawData.length&&this.rawData[0].getFields?this.rawData[0].getFields():null}},{key:"setFields",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._fields=t&&e?zt({},this._fields,t):t;var i=this.transformsArr.find((function(t){return"fields"===t.type}));!vt(this._fields)&&vt(i)?(this.dataSet.registerTransform("fields",A_),this.transform({type:"fields",options:{fields:this._fields}},!1)):i&&(i.options.fields=this._fields)}},{key:"destroy",value:function(){this.dataSet.removeDataView(this.name),this._diffMap=null,this._diffRank=null,this.latestData=null,this.rawData=null,this.parserData=null,this.transformsArr=null,this.target=null}}])}(),H_=function(t,e){return ft(Y_.warnHandler)&&Y_.warnHandler.call(null,t,e),e?te.getInstance().warn("[VChart warn]: ".concat(t),e):te.getInstance().warn("[VChart warn]: ".concat(t))},X_=function(t,e,i){if(!ft(Y_.errorHandler))throw new Error(t);Y_.errorHandler.call(null,t,e)},Y_={silent:!1,warnHandler:!1,errorHandler:!1},K_=gv();function q_(t){return("desktop-browser"===t||"mobile-browser"===t)&&K_}function Z_(t){return J_(t)||"mobile-browser"===t}function J_(t){return t.includes("miniApp")||"lynx"===t||"wx"===t}var $_=0;function Q_(){return $_>=9999999&&($_=0),$_++}var tx=function(t,e,i){return t.fields=e||[],t.fname=i,t},ex=function(t){return function(e){return Ot(e,t)}},ix=function(t){te.getInstance().error(t)},nx=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(ft(t))return t;var n=function(t){var e,i,n,r=[],a=t.length,o=null,s=0,u="";t+="";var l=function(){r.push(u+t.substring(e,i)),u="",e=i+1};for(e=0,i=0;i<a;i+=1)if("\\"===(n=t[i]))u+=t.substring(e,i),u+=t.substring(++i,++i),e=i;else if(n===o)l(),o=null,s=-1;else{if(o)continue;e===s&&'"'===n||e===s&&"'"===n?(e=i+1,o=n):"."!==n||s?"["===n?(i>e&&l(),s=e=i+1):"]"===n&&(s||ix("Access path missing open bracket: "+t),s>0&&l(),s=0,e=i+1):i>e?l():e=i+1}return s&&ix("Access path missing closing bracket: "+t),o&&ix("Access path missing closing quote: "+t),i>e&&(i+=1,l()),r}(t),r=1===n.length?n[0]:t;return tx((i&&i.get||ex)(n),[r],e||r)},rx=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(_t(t)){var n=t.map((function(t){return nx(t,e,i)}));return function(t){return n.map((function(e){return e(t)}))}}return nx(t,e,i)};rx("id");var ax=tx((function(t){return t}),[],"identity");tx((function(){return 0}),[],"zero"),tx((function(){return 1}),[],"one"),tx((function(){return!0}),[],"true"),tx((function(){return!1}),[],"false"),tx((function(){return{}}),[],"emptyObject");var ox,sx=function t(e,i,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(i===n)return!0;if(vt(i)||vt(n))return vt(i)&&vt(n);if(!yt(i)&&!yt(n))return i===n;var a=_t(i)?i:i[e],o=_t(n)?n:n[e];return a===o||!1!==r&&(_t(o)?!(!_t(a)||o.length!==a.length||!o.every((function(t,e){return t===a[e]}))):!!gt(o)&&!(!gt(a)||Object.keys(o).length!==Object.keys(a).length||!Object.keys(o).every((function(e){return t(e,o,a)}))))},ux=function(t,e){return vt(t)?e:bt(t)?e*parseFloat(t)/100:t};!function(t){t.selected="selected",t.selectedReverse="selected_reverse",t.hover="hover",t.hoverReverse="hover_reverse"}(ox||(ox={})),l(l(l(l({},ox.selectedReverse,{}),ox.selected,{}),ox.hover,{}),ox.hoverReverse,{});var lx,cx={visible:!0,position:"auto",titleStyle:{fontSize:16,fill:"#08979c"},contentStyle:{fontSize:12,fill:"green"},panel:{visible:!0,fill:"#e6fffb",size:12,space:0,stroke:"#87e8de",lineWidth:1,cornerRadius:4}},hx={poptip:zt({},cx)};!function(t){t.Identity="identity",t.Linear="linear",t.Log="log",t.Pow="pow",t.Sqrt="sqrt",t.Symlog="symlog",t.Time="time",t.Quantile="quantile",t.Quantize="quantize",t.Threshold="threshold",t.Ordinal="ordinal",t.Point="point",t.Band="band"}(lx||(lx={}));var dx={};function fx(t){return!!dx[t]}function vx(t){switch(t){case lx.Ordinal:case lx.Point:case lx.Band:return!0;default:return!1}}function px(t){return t}function gx(t,e){if(t=Number(t),e=Number(e),e-=t)return function(i){return(i-t)/e};var i=Number.isNaN(e)?NaN:.5;return function(){return i}}function yx(t,e,i){var n,r,a=t[0],o=t[1],s=e[0],u=e[1];return o<a?(n=gx(o,a),r=i(u,s)):(n=gx(a,o),r=i(s,u)),function(t){return r(n(t))}}function mx(t,e,i){var n;return n=1===t?t+2*i:t-e+2*i,t?n>0?n:1:0}function kx(t,e){var i=(t[1]-t[0])/(e[1]-e[0]),n=t[0]-i*e[0];return[n,i+n]}function bx(t,e,i){var n=Math.min(t.length,e.length)-1,r=new Array(n),a=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)r[o]=gx(t[o],t[o+1]),a[o]=i(e[o],e[o+1]);return function(e){var i=ee(t,e,1,n)-1;return a[i](r[i](e))}}Object.values(lx).forEach((function(t){dx[t]=!0}));var _x=function(){return u((function t(){o(this,t),this._rangeFactorStart=null,this._rangeFactorEnd=null}),[{key:"_calculateWholeRange",value:function(t){return this._wholeRange?this._wholeRange:pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)&&2===t.length?(this._wholeRange=kx(t,[this._rangeFactorStart,this._rangeFactorEnd]),this._wholeRange):t}},{key:"rangeFactor",value:function(t,e,i){return t?(2===t.length&&t.every((function(t){return t>=0&&t<=1}))&&(this._wholeRange=null,0===t[0]&&1===t[1]?(this._rangeFactorStart=null,this._rangeFactorEnd=null):(this._rangeFactorStart=t[0],this._rangeFactorEnd=t[1])),this):i?(this._wholeRange=null,this._rangeFactorStart=null,this._rangeFactorEnd=null,this):pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)?[this._rangeFactorStart,this._rangeFactorEnd]:null}},{key:"rangeFactorStart",value:function(t,e){var i;return vt(t)?this._rangeFactorStart:(t>=0&&t<=1&&(this._wholeRange=null,0!==t||!vt(this._rangeFactorEnd)&&1!==this._rangeFactorEnd?(this._rangeFactorStart=t,this._rangeFactorEnd=null!==(i=this._rangeFactorEnd)&&void 0!==i?i:1):(this._rangeFactorStart=null,this._rangeFactorEnd=null)),this)}},{key:"rangeFactorEnd",value:function(t,e){var i;return vt(t)?this._rangeFactorEnd:(t>=0&&t<=1&&(this._wholeRange=null,0!==t||!vt(this._rangeFactorStart)&&0!==this._rangeFactorStart?(this._rangeFactorEnd=t,this._rangeFactorStart=null!==(i=this._rangeFactorStart)&&void 0!==i?i:0):(this._rangeFactorStart=null,this._rangeFactorEnd=null)),this)}},{key:"generateFishEyeTransform",value:function(){var t;if(this._fishEyeOptions){var e=this._fishEyeOptions,i=e.distortion,n=void 0===i?2:i,r=e.radiusRatio,a=void 0===r?.1:r,o=e.radius,s=this.range(),u=s[0],l=s[s.length-1],c=Math.min(u,l),h=Math.max(u,l),d=ue(null!==(t=this._fishEyeOptions.focus)&&void 0!==t?t:0,c,h),f=vt(o)?(h-c)*a:o,v=Math.exp(n);v=v/(v-1)*f;var p=n/f;this._fishEyeTransform=function(t){var e=Math.abs(t-d);if(e>=f)return t;if(e<=1e-6)return d;var i=v*(1-Math.exp(-e*p))/e*.75+.25;return d+(t-d)*i}}else this._fishEyeTransform=null}},{key:"unknown",value:function(t){return arguments.length?(this._unknown=t,this):this._unknown}}])}(),xx=Symbol("implicit"),wx=function(t){function i(){var t;return o(this,i),(t=e(this,i)).type=lx.Ordinal,t._index=new Map,t._domain=[],t._ordinalRange=[],t._unknown=xx,t}return c(i,t),u(i,[{key:"specified",value:function(t){var e;return t?(this._specified=Object.assign(null!==(e=this._specified)&&void 0!==e?e:{},t),this):Object.assign({},this._specified)}},{key:"_getSpecifiedValue",value:function(t){if(this._specified)return this._specified[t]}},{key:"clone",value:function(){var t=(new i).domain(this._domain).range(this._ordinalRange).unknown(this._unknown);return this._specified&&t.specified(this._specified),t}},{key:"calculateVisibleDomain",value:function(t){return pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)&&2===t.length?[this.invert(t[0]),this.invert(t[1])]:this._domain}},{key:"scale",value:function(t){var e="".concat(t),i=this._getSpecifiedValue(e);if(void 0!==i)return i;var n=this._index.get(e);if(!n){if(this._unknown!==xx)return this._unknown;n=this._domain.push(t),this._index.set(e,n)}var r=this._ordinalRange[(n-1)%this._ordinalRange.length];return this._fishEyeTransform?this._fishEyeTransform(r):r}},{key:"invert",value:function(t){for(var e=0;e<this._ordinalRange.length&&this._ordinalRange[e]!==t;)e++;return this._domain[(e-1)%this._domain.length]}},{key:"domain",value:function(t){if(!t)return this._domain.slice();this._domain=[],this._index=new Map;var e,i=b(t);try{for(i.s();!(e=i.n()).done;){var n=e.value,r="".concat(n);this._index.has(r)||this._index.set(r,this._domain.push(n))}}catch(t){i.e(t)}finally{i.f()}return this}},{key:"range",value:function(t){if(!t)return this._ordinalRange.slice();var e=Array.from(t);return this._ordinalRange=e,this}},{key:"index",value:function(t){var e;return this._index&&null!==(e=this._index.get("".concat(t)))&&void 0!==e?e:-1}}])}(_x);function Sx(t,e,i,n){var r,a,o=[];if(e=Math.floor(+e),t=Math.floor(+t),!(i=Math.floor(+i)))return[];if(t===e)return[t];if(r=e<t){var s=t;t=e,e=s}var u=le(1,e-t+1)(i);if(a=Math.floor((e-t+1)/u),!n)for(;Math.ceil((e-t+1)/a)>i&&u>1;)u-=1,a=Math.floor((e-t)/u);for(var l=t;l<=e;)o.push(l),l+=a;return r&&o.reverse(),o}var Ax=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).type=lx.Band,n._range=[0,1],n._step=void 0,n._bandwidth=void 0,n._isFixed=!1,n._round=!1,n._paddingInner=0,n._paddingOuter=0,n._align=.5,n._unknown=void 0,delete n.unknown,n.rescale(t),n}return c(i,t),u(i,[{key:"rescale",value:function(t,e){if(t)return this;this._wholeRange=null;var n=this._calculateWholeRange(this._range,e),r=p(h(i.prototype),"domain",this).call(this).length,a=n[1]<n[0],o=n[Number(a)-0],s=n[1-Number(a)],u=mx(r,this._paddingInner,this._paddingOuter);return this._step=(s-o)/Math.max(1,u||1),this._round&&(this._step=Math.floor(this._step)),o+=(s-o-this._step*(r-this._paddingInner))*this._align,this.isBandwidthFixed()||(this._bandwidth=this._step*(1-this._paddingInner)),this._round&&(o=Math.round(o),this.isBandwidthFixed()||(this._bandwidth=Math.round(this._bandwidth))),this._bandRangeState={reverse:a,start:a?o+this._step*(r-1):o,count:r},this.generateFishEyeTransform(),this}},{key:"scale",value:function(t){if(this._bandRangeState){var e="".concat(t),i=this._getSpecifiedValue(e);if(void 0!==i)return i;var n=this._index.get(e);if(!n){if(this._unknown!==xx)return this._unknown;n=this._domain.push(t),this._index.set(e,n)}var r=this._bandRangeState,a=r.count,o=r.start+(n-1)%a*(r.reverse?-1:1)*this._step;return this._fishEyeTransform?this._fishEyeTransform(o):o}}},{key:"_calculateWholeRange",value:function(t,e){if(this._wholeRange)return this._wholeRange;if((this._minBandwidth||this._maxBandwidth)&&!this._isBandwidthFixedByUser()){var n;if(pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)&&2===t.length){var r=kx(t,[this._rangeFactorStart,this._rangeFactorEnd]);n=Math.abs(r[1]-r[0])}else n=Math.abs(t[1]-t[0]);var a=function(t,e,i,n,r){var a=mx(t,i,n),o=e/Math.max(1,a||1);r&&(o=Math.floor(o));var s=o*(1-i);return r&&(s=Math.round(s)),s}(p(h(i.prototype),"domain",this).call(this).length,n,this._paddingInner,this._paddingOuter,this._round);a<this._minBandwidth?(this._bandwidth=this._minBandwidth,this._isFixed=!0):a>this._maxBandwidth?(this._bandwidth=this._maxBandwidth,this._isFixed=!0):(this._bandwidth=a,this._isFixed=!1)}if(this.isBandwidthFixed()){var o=(g=p(h(i.prototype),"domain",this).call(this).length,y=this._bandwidth,m=this._paddingInner,k=this._paddingOuter,1===m&&(m=0),mx(g,m,k)*(y/(1-m))*Math.sign(t[1]-t[0])),s=Math.min((t[1]-t[0])/o,1);if(pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)){if(o>0){var u=t[0]-o*this._rangeFactorStart,l=u+o;this._wholeRange=[u,l]}else{var c=t[1]+o*(1-this._rangeFactorEnd),d=c-o;this._wholeRange=[d,c]}var f=this._rangeFactorStart+s<=1,v=this._rangeFactorEnd-s>=0;"rangeFactorStart"===e&&f?this._rangeFactorEnd=this._rangeFactorStart+s:"rangeFactorEnd"===e&&v?this._rangeFactorStart=this._rangeFactorEnd-s:t[0]<=t[1]?f?this._rangeFactorEnd=this._rangeFactorStart+s:v?this._rangeFactorStart=this._rangeFactorEnd-s:(this._rangeFactorStart=0,this._rangeFactorEnd=s):v?this._rangeFactorStart=this._rangeFactorEnd-s:f?this._rangeFactorEnd=this._rangeFactorStart+s:(this._rangeFactorStart=1-s,this._rangeFactorEnd=1)}else this._rangeFactorStart=0,this._rangeFactorEnd=s,this._wholeRange=[t[0],t[0]+o];return this._wholeRange}var g,y,m,k;return p(h(i.prototype),"_calculateWholeRange",this).call(this,t)}},{key:"calculateWholeRangeSize",value:function(){var t=this._calculateWholeRange(this._range);return Math.abs(t[1]-t[0])}},{key:"calculateVisibleDomain",value:function(t){var e=this._domain;if(pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)&&e.length){var i=this._getInvertIndex(t[0]),n=this._getInvertIndex(t[1]);return e.slice(Math.min(i,n),Math.max(i,n)+1)}return e}},{key:"domain",value:function(t,e){return t?(p(h(i.prototype),"domain",this).call(this,t),this.rescale(e)):p(h(i.prototype),"domain",this).call(this)}},{key:"range",value:function(t,e){return t?(this._range=[Zt(t[0]),Zt(t[1])],this.rescale(e)):this._range}},{key:"rangeRound",value:function(t,e){return this._range=[Zt(t[0]),Zt(t[1])],this._round=!0,this.rescale(e)}},{key:"ticks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=this.calculateVisibleDomain(this._range);return-1===t?e:Sx(0,e.length-1,t,!1).map((function(t){return e[t]}))}},{key:"tickData",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.ticks(e).map((function(e,i){return{index:i,tick:e,value:(t.scale(e)-t._range[0]+t._bandwidth/2)/(t._range[1]-t._range[0])}}))}},{key:"forceTicks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=this.calculateVisibleDomain(this._range);return Sx(0,e.length-1,t,!0).filter((function(t){return t<e.length})).map((function(t){return e[t]}))}},{key:"stepTicks",value:function(t){var e=this.calculateVisibleDomain(this._range);return function(t,e,i){var n,r=[];if(i=le(1,(e=Math.floor(+e))-(t=Math.floor(+t))+1)(Math.floor(+i)),n=e<t){var a=t;t=e,e=a}for(var o=t;o<=e;)r.push(o),o+=i;return n&&r.reverse(),r}(0,e.length-1,t).map((function(t){return e[t]}))}},{key:"_getInvertIndex",value:function(t){var e=0,i=this.step()/2,n=this.bandwidth()/2,r=this._domain.length,a=this.range(),o=a[0]>a[a.length-1];for(e=0;e<r;e++){var s=this.scale(this._domain[e])+n;if(0===e&&(!o&&!ae(t,s+i)||o&&!oe(t,s-i)))break;if(e===r-1)break;if(!oe(t,s-i)&&!ae(t,s+i))break}return e>=0&&e<=r-1?e:r-1}},{key:"invert",value:function(t){return this._domain[this._getInvertIndex(t)]}},{key:"padding",value:function(t,e){return void 0!==t?(this._paddingOuter=Math.max(0,Math.min(Array.isArray(t)?Math.min.apply(null,t):t)),this._paddingInner=this._paddingOuter,this.rescale(e)):this._paddingInner}},{key:"paddingInner",value:function(t,e){return void 0!==t?(this._paddingInner=Math.max(0,Math.min(1,t)),this.rescale(e)):this._paddingInner}},{key:"paddingOuter",value:function(t,e){return void 0!==t?(this._paddingOuter=Math.max(0,Math.min(1,t)),this.rescale(e)):this._paddingOuter}},{key:"step",value:function(){return this._step}},{key:"round",value:function(t,e){return void 0!==t?(this._round=t,this.rescale(e)):this._round}},{key:"align",value:function(t,e){return void 0!==t?(this._align=Math.max(0,Math.min(1,t)),this.rescale(e)):this._align}},{key:"rangeFactor",value:function(t,e){return t?(p(h(i.prototype),"rangeFactor",this).call(this,t),this.rescale(e)):p(h(i.prototype),"rangeFactor",this).call(this)}},{key:"rangeFactorStart",value:function(t,e){return vt(t)?p(h(i.prototype),"rangeFactorStart",this).call(this):(p(h(i.prototype),"rangeFactorStart",this).call(this,t),this.rescale(e,"rangeFactorStart"))}},{key:"rangeFactorEnd",value:function(t,e){return vt(t)?p(h(i.prototype),"rangeFactorEnd",this).call(this):(p(h(i.prototype),"rangeFactorEnd",this).call(this,t),this.rescale(e,"rangeFactorEnd"))}},{key:"bandwidth",value:function(t,e){return t?("auto"===t?(this._bandwidth=void 0,this._isFixed=!1):(this._bandwidth=t,this._isFixed=!0),this._userBandwidth=t,this.rescale(e)):this._bandwidth}},{key:"maxBandwidth",value:function(t,e){return t?(this._maxBandwidth="auto"===t?void 0:t,this.rescale(e)):this._maxBandwidth}},{key:"minBandwidth",value:function(t,e){return t?(this._minBandwidth="auto"===t?void 0:t,this.rescale(e)):this._minBandwidth}},{key:"fishEye",value:function(t,e,i){return t||i?(this._fishEyeOptions=t,this._fishEyeTransform=null,this.rescale(e)):this._fishEyeOptions}},{key:"isBandwidthFixed",value:function(){return this._isFixed&&!!this._bandwidth}},{key:"_isBandwidthFixedByUser",value:function(){return this._isFixed&&this._userBandwidth&&St(this._userBandwidth)}},{key:"clone",value:function(){var t,e,n;return new i(!0).domain(this._domain,!0).range(this._range,!0).round(this._round,!0).paddingInner(this._paddingInner,!0).paddingOuter(this._paddingOuter,!0).align(this._align,!0).bandwidth(null!==(t=this._userBandwidth)&&void 0!==t?t:"auto",!0).maxBandwidth(null!==(e=this._maxBandwidth)&&void 0!==e?e:"auto",!0).minBandwidth(null!==(n=this._maxBandwidth)&&void 0!==n?n:"auto")}}])}(wx),Tx=function(t,e){var i=t.r,n=e.r,r=t.g,a=e.g,o=t.b,s=e.b,u=t.opacity,l=e.opacity;return function(t){var e=Math.round(i*(1-t)+n*t),c=Math.round(r*(1-t)+a*t),h=Math.round(o*(1-t)+s*t);return new si(e,c,h,u*(1-t)+l*t)}};function Ex(t,e){var i,n=a(e);if(vt(e)||"boolean"===n)return function(){return e};if("number"===n)return fe(t,e);if("string"===n){if(i=oi.parseColorString(e)){var r=Tx(oi.parseColorString(t),i);return function(t){return r(t).formatRgb()}}return fe(Number(t),Number(e))}return e instanceof si?Tx(t,e):e instanceof oi?Tx(t.color,e.color):e instanceof Date?function(t,e){var i=t.valueOf(),n=e.valueOf(),r=new Date;return function(t){return r.setTime(i*(1-t)+n*t),r}}(t,e):fe(Number(t),Number(e))}var Cx=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:px,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:px;return o(this,i),(t=e(this,i))._unknown=void 0,t.transformer=n,t.untransformer=r,t._forceAlign=!0,t._domain=[0,1],t._range=[0,1],t._clamp=px,t._piecewise=yx,t._interpolate=Ex,t}return c(i,t),u(i,[{key:"calculateVisibleDomain",value:function(t){var e;return pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)&&2===t.length?[this.invert(t[0]),this.invert(t[1])]:null!==(e=this._niceDomain)&&void 0!==e?e:this._domain}},{key:"fishEye",value:function(t,e,i){return t||i?(this._fishEyeOptions=t,this._fishEyeTransform=null,this.rescale(e)):this._fishEyeOptions}},{key:"scale",value:function(t){var e;if(t=Number(t),Number.isNaN(t)||this._domainValidator&&!this._domainValidator(t))return this._unknown;this._output||(this._output=this._piecewise((null!==(e=this._niceDomain)&&void 0!==e?e:this._domain).map(this.transformer),this._calculateWholeRange(this._range),this._interpolate));var i=this._output(this.transformer(this._clamp(t)));return this._fishEyeTransform?this._fishEyeTransform(i):i}},{key:"invert",value:function(t){var e;return this._input||(this._input=this._piecewise(this._calculateWholeRange(this._range),(null!==(e=this._niceDomain)&&void 0!==e?e:this._domain).map(this.transformer),fe)),this._clamp(this.untransformer(this._input(t)))}},{key:"domain",value:function(t,e){var i;if(!t)return(null!==(i=this._niceDomain)&&void 0!==i?i:this._domain).slice();this._domainValidator=null,this._niceType=null,this._niceDomain=null;var n=Array.from(t,Zt);return this._domain=n,this.rescale(e)}},{key:"range",value:function(t,e){if(!t)return this._range.slice();var i=Array.from(t);return this._range=i,this.rescale(e)}},{key:"rangeRound",value:function(t,e){var i=Array.from(t);return this._range=i,this._interpolate=ve,this.rescale(e)}},{key:"rescale",value:function(t){var e;if(t)return this;var i=null!==(e=this._niceDomain)&&void 0!==e?e:this._domain,n=i.length,r=this._range.length,a=Math.min(n,r);if(n&&n<r&&this._forceAlign){for(var o=r-n+1,s=i[n-1],u=n>=2?(s-i[n-2])/o:0,l=1;l<=o;l++)i[n-2+l]=s-u*(o-l);a=r}return this._autoClamp&&(this._clamp=le(i[0],i[a-1])),this._piecewise=a>2?bx:yx,this._output=this._input=null,this._wholeRange=null,this.generateFishEyeTransform(),this}},{key:"clamp",value:function(t,e,i){return arguments.length?(e?(this._autoClamp=!1,this._clamp=e):(this._autoClamp=!!t,this._clamp=t?void 0:px),this.rescale(i)):this._clamp!==px}},{key:"interpolate",value:function(t,e){return arguments.length?(this._interpolate=t,this.rescale(e)):this._interpolate}},{key:"ticks",value:function(){return[]}},{key:"tickData",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,i=this.ticks(e);return(null!=i?i:[]).map((function(e,i){return{index:i,tick:e,value:(t.scale(e)-t._range[0])/(t._range[1]-t._range[0])}}))}},{key:"rangeFactor",value:function(t,e){return t?(p(h(i.prototype),"rangeFactor",this).call(this,t),this._output=this._input=null,this):p(h(i.prototype),"rangeFactor",this).call(this)}},{key:"rangeFactorStart",value:function(t,e){return vt(t)?p(h(i.prototype),"rangeFactorStart",this).call(this):(p(h(i.prototype),"rangeFactorStart",this).call(this,t),this._output=this._input=null,this)}},{key:"rangeFactorEnd",value:function(t,e){return vt(t)?p(h(i.prototype),"rangeFactorEnd",this).call(this):(p(h(i.prototype),"rangeFactorEnd",this).call(this,t),this._output=this._input=null,this)}},{key:"forceAlignDomainRange",value:function(t){return arguments.length?(this._forceAlign=t,this):this._forceAlign}}])}(_x),Bx=Math.sqrt(50),Mx=Math.sqrt(10),Rx=Math.sqrt(2),Px=[1,2,5,10],Ox=function(t,e,i){var n=1,r=t,a=Math.floor((e-1)/2),o=Math.abs(t);return t>=0&&t<=Number.MIN_VALUE?r=0:t<0&&t>=-Number.MIN_VALUE?r=-(e-1):!i&&o<1?n=jx(o).step:(i||o>1)&&(r=Math.floor(t)-a*n),n>0?(t>0?r=Math.max(r,0):t<0&&(r=Math.min(r,-(e-1)*n)),function(t,e,i){pt(e)||(e=t,t=0),pt(i)||(i=1);for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/i)),a=new Array(r);++n<r;)a[n]=t+n*i;return a}(0,e).map((function(t){return r+t*n}))):t>0?Lx(0,-(e-1)/n,n):Lx((e-1)/n,0,n)},Ix=se((function(t,e,i,n){var r,a,o,s,u=-1;if(i=+i,(t=+t)==(e=+e))return[t];if(Math.abs(t-e)<=Number.MIN_VALUE&&i>0)return[t];if((r=e<t)&&(a=t,t=e,e=a),s=Fx(t,e,i).step,!isFinite(s))return[];if(s>0){var l=Math.round(t/s),c=Math.round(e/s);for(l*s<t&&++l,c*s>e&&--c,o=new Array(a=c-l+1);++u<a;)o[u]=(l+u)*s}else if(s<0&&(null==n?void 0:n.noDecimals)){s=1;var h=Math.ceil(t),d=Math.floor(e);if(!(h<=d))return[];for(o=new Array(a=d-h+1);++u<a;)o[u]=h+u}else{s=-s;var f=Math.round(t*s),v=Math.round(e*s);for(f/s<t&&++f,v/s>e&&--v,o=new Array(a=v-f+1);++u<a;)o[u]=(f+u)/s}return r&&o.reverse(),o})),Lx=function(t,e,i){var n,r,a=-1;if(i>0){var o=Math.floor(t/i),s=Math.ceil(e/i);for((o+1)*i<t&&++o,(s-1)*i>e&&--s,r=new Array(n=s-o+1);++a<n;)r[a]=(o+a)*i}else{i=-i;var u=Math.floor(t*i),l=Math.ceil(e*i);for((u+1)/i<t&&++u,(l-1)/i>e&&--l,r=new Array(n=l-u+1);++a<n;)r[a]=(u+a)/i}return r},Dx=se((function(t,e,i,n){var r,a,o;if(i=+i,(t=+t)==(e=+e))return Ox(t,i,null==n?void 0:n.noDecimals);if(Math.abs(t-e)<=Number.MIN_VALUE&&i>0)return Ox(t,i,null==n?void 0:n.noDecimals);(r=e<t)&&(o=t,t=e,e=o);var s=Fx(t,e,i),u=s.step;if(!isFinite(u))return[];if(u>0){for(var l=1,c=s.power,h=10===s.gap?2*Math.pow(10,c):1*Math.pow(10,c);l<=5&&(a=Lx(t,e,u)).length>i+1&&i>2;)u+=h,l+=1;i>2&&a.length<i-1&&(a=function(t,e,i){var n,r=t[0],a=t[t.length-1],o=e-t.length;if(a<=0){var s=[];for(n=o;n>=1;n--)s.push(r-n*i);return s.concat(t)}if(r>=0){for(n=1;n<=o;n++)t.push(a+n*i);return t}var u=[],l=[];for(n=1;n<=o;n++)n%2==0?u=[r-Math.floor(n/2)*i].concat(u):l.push(a+Math.ceil(n/2)*i);return u.concat(t).concat(l)}(a,i,u))}else(null==n?void 0:n.noDecimals)&&u<0&&(u=1),a=Lx(t,e,u);return r&&a.reverse(),a})),jx=function(t){var e=Math.floor(Math.log(t)/Math.LN10),i=t/Math.pow(10,e),n=Px[0];return i>=Bx?n=Px[3]:i>=Mx?n=Px[2]:i>=Rx&&(n=Px[1]),e>=0?{step:n*Math.pow(10,e),gap:n,power:e}:{step:-Math.pow(10,-e)/n,gap:n,power:e}};function Fx(t,e,i){var n=(e-t)/Math.max(0,i);return jx(n)}function Nx(t,e,i){var n;if(i=+i,(t=+t)==(e=+e)&&i>0)return[t];if(i<=0||0===(n=function(t,e,i){return(e-t)/Math.max(1,i-1)}(t,e,i))||!isFinite(n))return[];for(var r=new Array(i),a=0;a<i;a++)r[a]=t+a*n;return r}function zx(t){var e,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=0,a=t.length-1,o=t[r],s=t[a],u=10;for(s<o&&(i=o,o=s,s=i,i=r,r=a,a=i);u-- >0;){if((i=Fx(o,s,n).step)===e)return t[r]=o,t[a]=s,t;if(i>0)o=Math.floor(o/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;o=Math.ceil(o*i)/i,s=Math.floor(s*i)/i}e=i}}var Gx=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type=lx.Linear,t}return c(i,t),u(i,[{key:"clone",value:function(){return(new i).domain(this._domain,!0).range(this._range,!0).unknown(this._unknown).clamp(this.clamp(),null,!0).interpolate(this._interpolate)}},{key:"tickFormat",value:function(){return function(){}}},{key:"d3Ticks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=arguments.length>1?arguments[1]:void 0,i=this.calculateVisibleDomain(this._range);return Ix(i[0],i[i.length-1],t,e)}},{key:"ticks",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,i=arguments.length>1?arguments[1]:void 0;if(pt(this._rangeFactorStart)&&pt(this._rangeFactorEnd)&&(this._rangeFactorStart>0||this._rangeFactorEnd<1)&&2===this._range.length||!this._niceType)return this.d3Ticks(e,i);var n=null!==(t=this._niceDomain)&&void 0!==t?t:this._domain,r=this._domain,a=n[0],o=n[n.length-1],s=Dx(r[0],r[r.length-1],e,i);if(!s.length)return s;if(this._domainValidator)s=s.filter(this._domainValidator);else if((s[0]!==a||s[s.length-1]!==o)&&this._niceType){var u=n.slice();if("all"===this._niceType?(u[0]=s[0],u[u.length-1]=s[s.length-1],this._niceDomain=u,this.rescale()):"min"===this._niceType&&s[0]!==a?(u[0]=s[0],this._niceDomain=u,this.rescale()):"max"===this._niceType&&s[s.length-1]!==o&&(u[u.length-1]=s[s.length-1],this._niceDomain=u,this.rescale()),"all"!==this._niceType){var l=Math.min(u[0],u[u.length-1]),c=Math.max(u[0],u[u.length-1]);s=s.filter((function(t){return t>=l&&t<=c}))}}return s}},{key:"forceTicks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=this.calculateVisibleDomain(this._range);return Nx(e[0],e[e.length-1],t)}},{key:"stepTicks",value:function(t){var e=this.calculateVisibleDomain(this._range);return function(t,e,i){var n,r,a=-1;if(i=+i,(r=(e=+e)<(t=+t))&&(n=t,t=e,e=n),!isFinite(i)||e-t<=i)return[t];for(var o=Math.floor((e-t)/i+1),s=new Array(o);++a<o;)s[a]=t+a*i;return r&&s.reverse(),s}(e[0],e[e.length-1],t)}},{key:"nice",value:function(){var t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=arguments.length>1?arguments[1]:void 0,r=this._domain,a=[];if(n){var o=function(t,e){var i=St(e.forceMin),n=St(e.forceMax),r=null,a=[],o=null,s=i&&n?function(t){return t>=e.forceMin&&t<=e.forceMax}:i?function(t){return t>=e.forceMin}:n?function(t){return t<=e.forceMax}:null;return i?a[0]=e.forceMin:St(e.min)&&e.min<=Math.min(t[0],t[t.length-1])&&(a[0]=e.min),n?a[1]=e.forceMax:St(e.max)&&e.max>=Math.max(t[0],t[t.length-1])&&(a[1]=e.max),St(a[0])&&St(a[1])?((o=t.slice())[0]=a[0],o[o.length-1]=a[1]):r=St(a[0])||St(a[1])?St(a[0])?"max":"min":"all",{niceType:r,niceDomain:o,niceMinMax:a,domainValidator:s}}(r,n);if(a=o.niceMinMax,this._domainValidator=o.domainValidator,this._niceType=o.niceType,o.niceDomain)return this._niceDomain=o.niceDomain,this.rescale(),this}else this._niceType="all";if(this._niceType){var s=zx(r.slice(),i);"min"===this._niceType?s[s.length-1]=null!==(t=a[1])&&void 0!==t?t:s[s.length-1]:"max"===this._niceType&&(s[0]=null!==(e=a[0])&&void 0!==e?e:s[0]),this._niceDomain=s,this.rescale()}return this}},{key:"niceMin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;this._niceType="min";var e=this._domain[this._domain.length-1],i=zx(this.domain(),t);return i&&(i[i.length-1]=e,this._niceDomain=i,this.rescale()),this}},{key:"niceMax",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;this._niceType="max";var e=this._domain[0],i=zx(this._domain.slice(),t);return i&&(i[0]=e,this._niceDomain=i,this.rescale()),this}}])}(Cx),Ux=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[!1])).type=lx.Point,n._padding=0,n.paddingInner(1,t),n.padding=n.paddingOuter,n.paddingInner=void 0,n.paddingOuter=void 0,n}return c(i,t),u(i)}(Ax),Wx=function(){function t(){o(this,t),this.type=lx.Threshold,this._range=[0,1],this._domain=[.5],this.n=1}return u(t,[{key:"unknown",value:function(t){return arguments.length?(this._unknown=t,this):this._unknown}},{key:"scale",value:function(t){return!vt(t)&&At(+t)?this._range[ee(this._domain,t,0,this.n)]:this._unknown}},{key:"invertExtent",value:function(t){var e=this._range.indexOf(t);return[this._domain[e-1],this._domain[e]]}},{key:"domain",value:function(t){return t?(this._domain=Array.from(t),this.n=Math.min(this._domain.length,this._range.length-1),this):this._domain.slice()}},{key:"range",value:function(t){return t?(this._range=Array.from(t),this.n=Math.min(this._domain.length,this._range.length-1),this):this._range.slice()}},{key:"clone",value:function(){return(new t).domain(this._domain).range(this._range).unknown(this._unknown)}}])}();function Vx(t,e){var i=Hx(t),n=Hx(e),r=Math.asin((t.x*e.y-e.x*t.y)/i/n),a=Math.acos((t.x*e.x+t.y*e.y)/i/n);return r<0?-a:a}function Hx(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0};return Oe.distancePP(t,e)}var Xx,Yx,Kx=function(t,e){for(var i=0;i<t.length;i++)for(var n=t[i].getSeries(),r=0;r<n.length;r++){var a=n[r];if(e&&a&&a.coordinate===e)return a;if(!e&&a)return a}return null};!function(t){t.area="area",t.line="line",t.bar="bar",t.bar3d="bar3d",t.rangeColumn="rangeColumn",t.rangeColumn3d="rangeColumn3d",t.rangeArea="rangeArea",t.dot="dot",t.geo="geo",t.link="link",t.map="map",t.pie="pie",t.pie3d="pie3d",t.radar="radar",t.rose="rose",t.scatter="scatter",t.circularProgress="circularProgress",t.wordCloud="wordCloud",t.wordCloud3d="wordCloud3d",t.funnel="funnel",t.funnel3d="funnel3d",t.linearProgress="linearProgress",t.boxPlot="boxPlot",t.sankey="sankey",t.gaugePointer="gaugePointer",t.gauge="gauge",t.treemap="treemap",t.sunburst="sunburst",t.circlePacking="circlePacking",t.waterfall="waterfall",t.heatmap="heatmap",t.correlation="correlation",t.liquid="liquid",t.venn="venn"}(Xx||(Xx={})),function(t){t.label="label",t.point="point",t.line="line",t.area="area",t.bar="bar",t.bar3d="bar3d",t.boxPlot="boxPlot",t.outlier="outlier",t.circlePacking="circlePacking",t.group="group",t.gridBackground="gridBackground",t.grid="grid",t.dot="dot",t.title="title",t.subTitle="subTitle",t.symbol="symbol",t.funnel="funnel",t.funnel3d="funnel3d",t.transform="transform",t.transform3d="transform3d",t.transformLabel="transformLabel",t.outerLabel="outerLabel",t.outerLabelLine="outerLabelLine",t.pin="pin",t.pinBackground="pinBackground",t.pointer="pointer",t.segment="segment",t.track="track",t.cell="cell",t.cellBackground="cellBackground",t.link="link",t.arrow="arrow",t.pie="pie",t.pie3d="pie3d",t.labelLine="labelLine",t.progress="progress",t.minLabel="minLabel",t.maxLabel="maxLabel",t.rose="rose",t.node="node",t.sunburst="sunburst",t.nonLeaf="nonLeaf",t.leaf="leaf",t.nonLeafLabel="nonLeafLabel",t.leaderLine="leaderLine",t.stackLabel="stackLabel",t.word="word",t.fillingWord="fillingWord",t.nodePoint="nodePoint",t.ripplePoint="ripplePoint",t.centerPoint="centerPoint",t.centerLabel="centerLabel",t.barBackground="barBackground",t.lineLabel="lineLabel",t.areaLabel="areaLabel",t.liquid="liquid",t.liquidBackground="liquidBackground",t.liquidOutline="liquidOutline",t.circle="circle",t.overlap="overlap",t.overlapLabel="overlapLabel"}(Yx||(Yx={}));var qx,Zx,Jx,$x,Qx,tw,ew,iw,nw,rw,aw,ow,sw,uw,lw,cw="__VCHART";!function(t){t.enter="enter",t.update="update",t.exit="exit",t.group="group",t.connectNulls="connectNulls"}(qx||(qx={})),function(t){t.enter="enter",t.update="update",t.exit="exit",t.unChange="unChange"}(Zx||(Zx={})),function(t){t.arc="arc",t.arc3d="arc3d",t.area="area",t.image="image",t.line="line",t.path="path",t.rect="rect",t.rect3d="rect3d",t.rule="rule",t.shape="shape",t.symbol="symbol",t.text="text",t.richtext="richtext",t.polygon="polygon",t.pyramid3d="pyramid3d",t.circle="circle",t.cell="cell",t.interval="interval",t.group="group",t.glyph="glyph",t.component="component",t.largeRects="largeRects",t.largeSymbols="largeSymbols"}(Jx||(Jx={})),function(t){t.axis="axis",t.grid="grid",t.legend="legend",t.slider="slider",t.label="label",t.datazoom="datazoom",t.player="player",t.title="title",t.scrollbar="scrollbar"}($x||($x={})),function(t){t[t.player=1]="player",t[t.rollUp=2]="rollUp",t[t.drillDown=3]="drillDown",t[t.slider=4]="slider",t[t.datazoom=5]="datazoom",t[t.legend=6]="legend",t[t.scrollbar=7]="scrollbar",t[t.brush=8]="brush",t[t.normal=9]="normal"}(Qx||(Qx={})),function(t){t.lineAxis="lineAxis",t.circleAxis="circleAxis"}(tw||(tw={})),function(t){t.lineAxisGrid="lineAxisGrid",t.circleAxisGrid="circleAxisGrid"}(ew||(ew={})),function(t){t.discreteLegend="discreteLegend",t.colorLegend="colorLegend",t.sizeLegend="sizeLegend"}(iw||(iw={})),function(t){t.lineCrosshair="lineCrosshair",t.rectCrosshair="rectCrosshair",t.sectorCrosshair="sectorCrosshair",t.circleCrosshair="circleCrosshair",t.polygonCrosshair="polygonCrosshair",t.ringCrosshair="ringCrosshair"}(nw||(nw={})),function(t){t.symbolLabel="symbolLabel",t.rectLabel="rectLabel",t.lineLabel="lineLabel",t.dataLabel="dataLabel"}(rw||(rw={})),function(t){t.continuousPlayer="continuousPlayer",t.discretePlayer="discretePlayer"}(aw||(aw={})),function(t){t.before="before",t.layouting="layouting",t.reevaluate="reevaluate",t.after="after"}(ow||(ow={})),function(t){t.BEFORE_EVALUATE_DATA="beforeEvaluateData",t.AFTER_EVALUATE_DATA="afterEvaluateData",t.BEFORE_EVALUATE_SCALE="beforeEvaluateScale",t.AFTER_EVALUATE_SCALE="afterEvaluateScale",t.BEFORE_PARSE_VIEW="beforeParseView",t.AFTER_PARSE_VIEW="afterParseView",t.BEFORE_TRANSFORM="beforeTransform",t.AFTER_TRANSFORM="afterTransform",t.BEFORE_CREATE_VRENDER_STAGE="beforeCreateVRenderStage",t.AFTER_CREATE_VRENDER_STAGE="afterCreateVRenderStage",t.BEFORE_CREATE_VRENDER_LAYER="beforeCreateVRenderLayer",t.AFTER_CREATE_VRENDER_LAYER="afterCreateVRenderLayer",t.BEFORE_STAGE_RESIZE="beforeStageResize",t.AFTER_STAGE_RESIZE="afterStageResize",t.BEFORE_VRENDER_DRAW="beforeVRenderDraw",t.AFTER_VRENDER_DRAW="afterVRenderDraw",t.BEFORE_MARK_JOIN="beforeMarkJoin",t.AFTER_MARK_JOIN="afterMarkJoin",t.BEFORE_MARK_UPDATE="beforeMarkUpdate",t.AFTER_MARK_UPDATE="afterMarkUpdate",t.BEFORE_MARK_STATE="beforeMarkState",t.AFTER_MARK_STATE="afterMarkState",t.BEFORE_MARK_ENCODE="beforeMarkEncode",t.AFTER_MARK_ENCODE="afterMarkEncode",t.BEFORE_DO_LAYOUT="beforeDoLayout",t.AFTER_DO_LAYOUT="afterDoLayout",t.BEFORE_MARK_LAYOUT_END="beforeMarkLayoutEnd",t.AFTER_MARK_LAYOUT_END="afterMarkLayoutEnd",t.BEFORE_DO_RENDER="beforeDoRender",t.AFTER_DO_RENDER="afterDoRender",t.BEFORE_MARK_RENDER_END="beforeMarkRenderEnd",t.AFTER_MARK_RENDER_END="afterMarkRenderEnd",t.BEFORE_CREATE_VRENDER_MARK="beforeCreateVRenderMark",t.AFTER_CREATE_VRENDER_MARK="afterCreateVRenderMark",t.BEFORE_ADD_VRENDER_MARK="beforeAddVRenderMark",t.AFTER_ADD_VRENDER_MARK="afterAddVRenderMark",t.AFTER_VRENDER_NEXT_RENDER="afterVRenderNextRender",t.BEFORE_ELEMENT_UPDATE_DATA="beforeElementUpdateData",t.AFTER_ELEMENT_UPDATE_DATA="afterElementUpdateData",t.BEFORE_ELEMENT_STATE="beforeElementState",t.AFTER_ELEMENT_STATE="afterElementState",t.BEFORE_ELEMENT_ENCODE="beforeElementEncode",t.AFTER_ELEMENT_ENCODE="afterElementEncode",t.ANIMATION_START="animationStart",t.ANIMATION_END="animationEnd",t.ELEMENT_ANIMATION_START="elementAnimationStart",t.ELEMENT_ANIMATION_END="elementAnimationEnd",t.ALL_ANIMATION_START="allAnimationStart",t.ALL_ANIMATION_END="allAnimationEnd"}(sw||(sw={})),function(t){t.signal="signal",t.data="data",t.scale="scale",t.coordinate="coordinate",t.mark="mark"}(uw||(uw={})),function(t){t.active="active",t.selected="selected",t.highlight="highlight",t.blur="blur"}(lw||(lw={}));var hw="__vgrammar_scene_item__",dw=[Jx.line,Jx.area],fw=[Jx.arc3d,Jx.rect3d,Jx.pyramid3d],vw="key",pw=[{}],gw=["key"],yw="VGRAMMAR_IMMEDIATE_ANIMATION",mw=0,kw=1e3,bw=0,_w=0,xw=!1,ww=!1,Sw="quintInOut",Aw={stopWhenStateChange:!1,immediatelyApply:!0};function Tw(t,e){return Xt(t).reduce((function(t,i){var n=bt(i)?e.getGrammarById(i):i;return n&&t.push(n),t}),[])}function Ew(t,e){if(vt(t))return[];if(function(t){return!ft(t)&&!!(null==t?void 0:t.signal)}(t)){var i=t.signal;if(bt(i))return Xt(e.getGrammarById(i));if("signal"===(null==i?void 0:i.grammarType))return[i]}else if(function(t){return!ft(t)&&!!(null==t?void 0:t.callback)}(t))return Tw(t.dependency,e);return[]}function Cw(t){return ft(t)||(null==t?void 0:t.signal)||!!(null==t?void 0:t.callback)}function Bw(t,e,i,n){if(vt(t))return t;if(ft(t))return n?t.call(null,i,n,e):t.call(null,i,e);if(t.signal){var r=t.signal;return bt(r)?null==e?void 0:e[r]:r.output()}return t.callback?n?t.callback.call(null,i,n,e):t.callback.call(null,i,e):t}function Mw(t,e){return Rw(t)?t.output():e[t]}var Rw=function(t){return t&&!vt(t.grammarType)},Pw=function(t){return ft(t)?t:function(e){return e[t]}};function Ow(t){return!!(null==t?void 0:t.scale)}function Iw(t){return!!(null==t?void 0:t.field)}function Lw(t,e){if(!t)return[];var i=[];return t.scale&&(i=Rw(t.scale)?[t.scale]:Xt(e.getScaleById(t.scale))),i.concat(Ew(t,e))}function Dw(t,e){switch(e){case"line":return t.some((function(t){return["x","y","defined"].includes(t)}));case"area":return t.some((function(t){return["x","y","x1","y1","defined"].includes(t)}));case"largeRects":return t.some((function(t){return["x","y","width","y1"].includes(t)}));case"largeSymbols":return t.some((function(t){return["x","y"].includes(t)}))}return!1}function jw(t,e,i,n,r){i&&(Cw(i)?e.forEach((function(e){var r=Bw(i,n,e.datum,t);Object.assign(e.nextAttrs,r)})):Object.keys(i).forEach((function(a){var o,s,u=i[a],l=r&&!function(t,e){if(["x","y","dx","dy"].includes(e))return!0;switch(t){case Jx.arc:return["innerRadius","outerRadius","startAngle","endAngle"].includes(e);case Jx.group:case Jx.rect:case Jx.image:return["width","height","y1"].includes(e);case Jx.path:case Jx.shape:return["path","customPath"].includes(e);case Jx.line:return"defined"===e;case Jx.area:return["x1","y1","defined"].includes(e);case Jx.rule:return["x1","y1"].includes(e);case Jx.symbol:return"size"===e;case Jx.polygon:return"points"===e;case Jx.text:return"text"===e}return!1}(t.mark.markType,a)?[e[0]]:e;if(Ow(u)){var c=Mw(u.scale,n),h=null!==(o=null==u?void 0:u.offset)&&void 0!==o?o:0,d=!vt(u.band)&&c.bandwidth?c.bandwidth()*u.band:null,f=bt(null==u?void 0:u.field),v=f?rx(u.field):null,p=f?null:vt(null==u?void 0:u.value)?0:null===(s=c.scale)||void 0===s?void 0:s.call(c,u.value);l.forEach((function(t){var e;f&&(p=null===(e=c.scale)||void 0===e?void 0:e.call(c,v(t.datum))),t.nextAttrs[a]=St(p)||St(d)?p+h+d:p}))}else if(Iw(u)){var g=rx(u.field);l.forEach((function(t){t.nextAttrs[a]=g(t.datum)}))}else l.forEach((function(e){e.nextAttrs[a]=Bw(u,n,e.datum,t)}))})))}function Fw(t,e,i,n){if(!t)return null;if(Cw(t))return Bw(t,n,e,i);var r={};return Object.keys(t).forEach((function(a){var o,s,u,l=t[a];if(Ow(l)){var c=Mw(l.scale,n),h=null!==(o=null==l?void 0:l.offset)&&void 0!==o?o:0,d=!vt(l.band)&&c.bandwidth?c.bandwidth()*l.band:null,f=bt(null==l?void 0:l.field),v=f?rx(l.field):null,p=f?null===(s=c.scale)||void 0===s?void 0:s.call(c,v(e)):vt(null==l?void 0:l.value)?0:null===(u=c.scale)||void 0===u?void 0:u.call(c,l.value);r[a]=St(p)||St(d)?p+h+d:p}else if(Iw(l)){var g=rx(l.field);r[a]=g(e)}else r[a]=Bw(l,n,e,i)})),r}var Nw=function(){return u((function t(e,i,n,r){o(this,t),this.channelEncoder={},this.marks=e,i&&this.registerChannelEncoder(i),n&&this.registerDefaultEncoder(n),this.progressiveChannels&&this.registerProgressiveChannels(r)}),[{key:"getMarks",value:function(){return this.marks}},{key:"registerChannelEncoder",value:function(t,e){return bt(t)?this.channelEncoder[t]=e:Object.assign(this.channelEncoder,t),this}},{key:"registerFunctionEncoder",value:function(t){return this.functionEncoder=t,this}},{key:"registerDefaultEncoder",value:function(t){return this.defaultEncoder=t,this}},{key:"registerProgressiveChannels",value:function(t){return this.progressiveChannels=Xt(t),this}},{key:"getChannelEncoder",value:function(){return this.channelEncoder}},{key:"getFunctionEncoder",value:function(){return this.functionEncoder}},{key:"getDefaultEncoder",value:function(){return this.defaultEncoder}},{key:"getProgressiveChannels",value:function(){return this.progressiveChannels}}])}(),zw=function(){function t(){o(this,t)}return u(t,null,[{key:"registerPlotMarks",value:function(e,i){t._plotMarks[e]=i}},{key:"createPlotMark",value:function(e,i){return t._plotMarks[e]?new t._plotMarks[e](i):null}},{key:"registerMark",value:function(e,i){t._marks[e]=i}},{key:"createMark",value:function(e,i,n){return t._marks[e]?new t._marks[e](i,e,n):null}},{key:"hasMark",value:function(e){return!!t._marks[e]}},{key:"registerComponent",value:function(e,i){t._components[e]=i}},{key:"createComponent",value:function(e,i,n,r){var a=t._components[e];return a?new a(i,n,r):null}},{key:"hasComponent",value:function(e){return!!t._components[e]}},{key:"registerGraphicComponent",value:function(e,i){t._graphicComponents[e]=i}},{key:"createGraphicComponent",value:function(e,i,n){var r=t._graphicComponents[e];return r?r(i,n):null}},{key:"registerTransform",value:function(e,i,n){t._transforms[e]=Object.assign(i,{type:e,isBuiltIn:!!n})}},{key:"getTransform",value:function(e){return t._transforms[e]}},{key:"unregisterRuntimeTransforms",value:function(){Object.keys(t._transforms).forEach((function(e){t._transforms[e]&&!t._transforms[e].isBuiltIn&&(t._transforms[e]=null)}))}},{key:"registerGrammar",value:function(e,i,n){t._grammars[e]={grammarClass:i,specKey:null!=n?n:e}}},{key:"createGrammar",value:function(e,i,n){var r,a=null===(r=t._grammars[e])||void 0===r?void 0:r.grammarClass;return a?new a(i,n):null}},{key:"getGrammars",value:function(){return this._grammars}},{key:"getGlyph",value:function(e){return t._glyphs[e]}},{key:"createInteraction",value:function(e,i,n){var r=t._interactions[e];return r?new r(i,n):null}},{key:"hasInteraction",value:function(e){return!!t._interactions[e]}}])}();zw._plotMarks={},zw._marks={},zw._components={},zw._graphicComponents={},zw._transforms={},zw._grammars={},zw._glyphs={},zw._animations={},zw._interactions={},zw._graphics={},zw.registerGlyph=function(t,e,i,n,r){return zw._glyphs[t]=new Nw(e,i,n,r),zw._glyphs[t]},zw.registerAnimationType=function(t,e){zw._animations[t]=e},zw.getAnimationType=function(t){return zw._animations[t]},zw.registerInteraction=function(t,e){zw._interactions[t]=e},zw.registerGraphic=function(t,e){zw._graphics[t]=e},zw.getGraphicType=function(t){return zw._graphics[t]},zw.createGraphic=function(t,e){var i=zw._graphics[t];return i?i(e):null};var Gw=function(t){return!!Jx[t]};function Uw(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=zw.getGraphicType(e)?zw.createGraphic(e,n):zw.createGraphicComponent(e,n,{skipDefault:null===(i=null==t?void 0:t.spec)||void 0===i?void 0:i.skipTheme});return r||te.getInstance().error("create ".concat(e," graphic failed!")),r}var Ww=function(t){t&&(t[hw]=null,t.release(),t.parent&&t.parent.removeChild(t))},Vw=["fillOpacity"],Hw=function(t,e,i){var n;return"fillOpacity"===e?(t.fillOpacity=null!==(n=i.fillOpacity)&&void 0!==n?n:1,["fillOpacity"]):[]};var Xw=l(l(l({rect3d:[{channels:["x","y","z","x1","y1","width","height","length"],transform:function(t,e,i){var n,r,a,o,s,u,l,c,h,d,f,v;At(e.width)||!At(e.x1)&&At(i.width)?(t.x=Math.min(null!==(n=i.x)&&void 0!==n?n:0,null!==(r=i.x1)&&void 0!==r?r:1/0),t.width=i.width):At(e.x1)||!At(e.width)&&At(i.x1)?(t.x=Math.min(i.x,i.x1),t.width=Math.abs(i.x1-i.x)):(t.x=Math.min(null!==(a=i.x)&&void 0!==a?a:0,null!==(o=i.x1)&&void 0!==o?o:1/0),t.width=i.width),At(e.height)||!At(e.y1)&&At(i.height)?(t.y=Math.min(null!==(s=i.y)&&void 0!==s?s:0,null!==(u=i.y1)&&void 0!==u?u:1/0),t.height=i.height):At(e.y1)||!At(e.height)&&At(i.y1)?(t.y=Math.min(i.y,i.y1),t.height=Math.abs(i.y1-i.y)):(t.y=Math.min(null!==(l=i.y)&&void 0!==l?l:0,null!==(c=i.y1)&&void 0!==c?c:1/0),t.height=i.height),At(e.length)||!At(e.z1)&&At(i.length)?(t.z=Math.min(null!==(h=i.z)&&void 0!==h?h:0,null!==(d=i.z1)&&void 0!==d?d:1/0),t.length=i.length):At(e.z1)||!At(e.length)&&At(i.z1)?(t.z=Math.min(i.z,i.z1),t.length=Math.abs(i.z1-i.z)):(t.z=Math.min(null!==(f=i.z)&&void 0!==f?f:0,null!==(v=i.z1)&&void 0!==v?v:1/0),t.length=i.length)},storedAttrs:"sizeAttrs"}]},Jx.text,[{channels:["text","limit","autoLimit","maxLineWidth","textType"],transform:function(t,e,i){var n,r,a=null!==(n=i.limit)&&void 0!==n?n:1/0,o=null!==(r=i.autoLimit)&&void 0!==r?r:1/0,s=Math.min(a,o),u=mt(i.text)&&!vt(i.text.text),l=u?i.text.text:i.text;t.maxLineWidth=s===1/0?i.maxLineWidth:s,!u&&!i.textType||"rich"!==i.text.type&&"rich"!==i.textType?t.text=l:t.textConfig=l},storedAttrs:"limitAttrs"}]),Jx.rule,[{channels:["x","y","x1","y1"],transform:function(t,e,i){var n=function(t){var e=t.x,i=t.y,n=t.x1,r=t.y1;return At(e)&&At(i)&&At(n)&&At(r)?[{x:e,y:i},{x:n,y:r}]:[]}(i);t.points=n,t.x=0,t.y=0},storedAttrs:"pointAttrs"}]),Jx.symbol,[{channels:["shape","symbolType"],transform:function(t,e,i){var n;t.symbolType=null!==(n=e.shape)&&void 0!==n?n:e.symbolType}},{channels:["image","fill","background"],transform:function(t,e,i){e.image?(t.background=e.image,t.fill=!1):i.image?(t.background=i.image,t.fill=!1):(t.fill=i.fill,t.background=i.background)},storedAttrs:"imageAttrs"}]);var Yw=function(t,e,i,n){var r={},a=e?Object.keys(e):[],o=bt(t)?Xw[t]:t;if(o&&o.length){var s=[];a.forEach((function(t){var a=!1;o.forEach((function(o,u){if(o.channels.includes(t)){if(!s[u])if(o.storedAttrs){var l=function(t,e,i,n,r,a){var o=r.getGraphicAttribute(t,!1,a);if(o)return e.forEach((function(t){t in n&&(o[t]=n[t])})),o;var s={};return e.forEach((function(t){s[t]=n[t]})),i[t]=s,s}(o.storedAttrs,o.channels,r,e,i,n);o.transform(r,e,l)}else o.transform(r,e,null);s[u]=!0,a=!0}})),a||(Vw.includes(t)?Hw(r,t,e):r[t]=e[t])}))}else a.forEach((function(t){Vw.includes(t)?Hw(r,t,e):r[t]=e[t]}));return r},Kw=function(t,e,i){return!(!vt(t)||!vt(e))||!vt(t)&&!vt(e)&&("lineDash"===i?function(t,e){return t.length===e.length&&t.join("-")===e.join("-")}(t,e):"stroke"===i||"fill"===i?function(t,e){if(t===e)return!0;if(a(t)!=a(e))return!1;if(bt(t))return!1;if(t.gradient!==e.gradient)return!1;var i=Object.keys(t),n=Object.keys(e);return i.length===n.length&&i.every((function(i){return"stops"===i?function(t,e){var i,n;if(t===e)return!0;var r=null!==(i=t&&t.length)&&void 0!==i?i:0;return r===(null!==(n=e&&e.length)&&void 0!==n?n:0)&&0!==r&&t.every((function(t,i){return!t&&!e[i]||t&&e[i]&&t.color===e[i].color&&t.offset===e[i].offset}))}(t[i],e[i]):t[i]===e[i]}))}(t,e):t===e)},qw=["stroke","strokeOpacity","lineDash","lineDashOffset","lineCap","lineJoin","lineWidth","miterLimit"],Zw=["fill","fillOpacity","background","texture","texturePadding","textureSize","textureColor"].concat(qw);function Jw(t,e,i){var n;if(!t||t.length<=1)return null;var r="area"===(null===(n=null==i?void 0:i.mark)||void 0===n?void 0:n.markType)?Zw:qw,a=[],o=null;return t.forEach((function(t,e){o&&r.every((function(e){return Kw(o[e],t[e],e)}))||(a.length&&(a[a.length-1].endIndex=e),o=t,a.push({attrs:o,startIndex:e}))})),a.length>=2?a.map((function(t){var i=$w(t.attrs);return i.points=e.slice(t.startIndex,vt(t.endIndex)?e.length:t.endIndex),i})):null}function $w(t){var e={};return t?(Object.keys(t).forEach((function(i){"x"!==i&&"y"!==i&&"x1"!==i&&"y1"!==i&&"defined"!==i&&"size"!==i&&"width"!==i&&"height"!==i&&"context"!==i&&(e[i]=t[i])})),e):e}var Qw=function(){return u((function t(e){var i=this;o(this,t),this.data=null,this.states=[],this.diffState=Zx.enter,this.isReserved=!1,this.runtimeStatesEncoder=null,this.items=[],this.getStateAttrs=function(t,e){var n,r,a,o,s=!vt(null===(n=i.runtimeStatesEncoder)||void 0===n?void 0:n[t]),u=s?Object.assign(Object.assign({},null===(r=i.mark.getSpec().encode)||void 0===r?void 0:r[t]),i.runtimeStatesEncoder[t]):null===(a=i.mark.getSpec().encode)||void 0===a?void 0:a[t];if(!u)return{};if(ft(u))return u(i.getDatum(),i,t,e);if(!s&&(null===(o=i.graphicItem.states)||void 0===o?void 0:o[t]))return i.graphicItem.states[t];var c=i.items.map((function(t){return Object.assign({},t,{nextAttrs:{}})}));jw(i,c,u,i.mark.parameters());var h=i.transformElementItems(c,i.mark.markType);return i.graphicItem.states?i.graphicItem.states[t]||(i.graphicItem.states[t]=h):i.graphicItem.states=l({},t,h),h},this.mark=e}),[{key:"initGraphicItem",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.graphicItem){var i=this.mark.getAttributeTransforms();this.graphicItem=this.mark.addGraphicItem(i?Yw(i,e,this):e,this.groupKey),this.graphicItem&&(this.graphicItem[hw]=this,i&&(this.graphicItem.onBeforeAttributeUpdate=function(e){return t.mark?Yw(i,e,t):e}),this.clearGraphicAttributes(),this.mark.needAnimate()&&(this.setPrevGraphicAttributes(null),this.setNextGraphicAttributes(e),this.setFinalGraphicAttributes(e)))}}},{key:"updateGraphicItem",value:function(){if(this.graphicItem){this.diffState===Zx.exit?this.graphicItem.releaseStatus="willRelease":this.graphicItem.releaseStatus=void 0;var t=this.mark.animate.getAnimationConfigs("state");0!==t.length&&(this.graphicItem.stateAnimateConfig=t[0].originConfig)}}},{key:"getGraphicItem",value:function(){return this.graphicItem}},{key:"removeGraphicItem",value:function(){var t,e;this.graphicItem&&(null===(e=null===(t=this.graphicItem.animates)||void 0===t?void 0:t.forEach)||void 0===e||e.call(t,(function(t){return t.stop()}))),this.graphicItem&&(Ww(this.graphicItem),this.graphicItem[hw]=null,this.graphicItem=null)}},{key:"resetGraphicItem",value:function(){this.graphicItem&&(this.graphicItem=null)}},{key:"getBounds",value:function(){var t;return null===(t=this.graphicItem)||void 0===t?void 0:t.AABBBounds}},{key:"getStates",value:function(){return this.states}},{key:"updateData",value:function(t,e,i){var n,r=this;this.mark.emit(sw.BEFORE_ELEMENT_UPDATE_DATA,{groupKey:t,data:e,key:i},this),this.data=e;var a=Pw(i);return this.items=e.map((function(t){return{datum:t,key:a(t),view:r.mark.view,nextAttrs:{}}})),this.groupKey=t,this.key=this.mark.isCollectionMark()?t:null===(n=this.items)||void 0===n?void 0:n[0].key,this.mark.emit(sw.AFTER_ELEMENT_UPDATE_DATA,{groupKey:t,data:e,key:i},this),this.items}},{key:"state",value:function(t,e){var i,n=this.mark.isCollectionMark(),r=this.states,a=Xt(Bw(t,e,this.getDatum(),this)),o=null===(i=this.mark.getSpec())||void 0===i?void 0:i.stateSort;o&&a.length&&a.sort(o);var s=a.length!==r.length||a.some((function(t,e){return t!==r[e]}));this.states=a,!n&&s&&this.diffState===Zx.unChange&&(this.diffState=Zx.update)}},{key:"encodeGraphic",value:function(t){this.coordinateTransformEncode(this.items);var e=this.transformElementItems(this.items,this.mark.markType);t&&(this.mark.isCollectionMark()&&delete t.defined,Object.assign(e,t)),this.graphicItem?(this.graphicItem.clearStates(),this.graphicItem.states={},this.graphicItem.stateProxy=null,this.applyGraphicAttributes(e)):this.initGraphicItem(e),this.diffState!==Zx.enter&&this.diffState!==Zx.update||!this.states.length||this.useStates(this.states),this.mark.markType===Jx.shape&&(this.graphicItem.datum=this.items[0].datum),this.items.forEach((function(t){t.nextAttrs={}})),this._setCustomizedShape()}},{key:"_setCustomizedShape",value:function(){var t,e=this;if(this.graphicItem){var i=null===(t=this.mark.getSpec())||void 0===t?void 0:t.setCustomizedShape;i&&(this.graphicItem.pathProxy=function(t){return i(e.data,t,new yn)})}}},{key:"encodeItems",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0,r=this.mark.isCollectionMark(),a=e[qx.update],o=e[qx.enter],s=e[qx.exit],u=this.mark.isLargeMode()||r&&!this.mark.getSpec().enableSegments;this.diffState===Zx.enter?(o&&jw(this,t,o,n,u),a&&jw(this,t,a,n,u)):this.diffState===Zx.update?((r&&o||i)&&jw(this,t,o,n,u),a&&jw(this,t,a,n,u)):this.diffState===Zx.exit&&s&&(i&&jw(this,t,o,n,u),jw(this,t,s,n,u))}},{key:"coordinateTransformEncode",value:function(t){if(this.mark.coord&&"arc"!==this.mark.markType&&!0!==this.mark.disableCoordinateTransform){var e=this.mark.coord.output();t.forEach((function(t){var i=t.nextAttrs,n=e.convert(i);Object.assign(i,n)}))}}},{key:"clearStates",value:function(t){var e=dt(t)?t:0!==this.mark.animate.getAnimationConfigs("state").length;this.states=[],this.graphicItem&&this.graphicItem.clearStates(e),this.runtimeStatesEncoder&&(this.runtimeStatesEncoder={})}},{key:"_updateRuntimeStates",value:function(t,e){this.runtimeStatesEncoder||(this.runtimeStatesEncoder={}),this.runtimeStatesEncoder[t]=e}},{key:"hasState",value:function(t){return this.states&&t&&this.states.includes(t)}},{key:"updateStates",value:function(t){var e=this;if(!this.graphicItem)return!1;var i=this.states.slice(),n=this.mark.getSpec().encode,r=!1,a=!1;return Object.keys(t).forEach((function(o){var s;if(o){var u=t[o];if(gt(u)&&!Wt(u,null===(s=e.runtimeStatesEncoder)||void 0===s?void 0:s[o]))i.includes(o)?r=!0:i.push(o),e._updateRuntimeStates(o,u),a=!0;else if(u)!i.includes(o)&&(null==n?void 0:n[o])&&(i.push(o),a=!0);else if(i.length){var l=i.filter((function(t){return t!==o}));l.length!==i.length&&(a=!0,i=l),e.runtimeStatesEncoder&&e.runtimeStatesEncoder[o]&&(e.runtimeStatesEncoder[o]=null)}}})),r&&this.graphicItem.clearStates(),!!a&&(this.useStates(i),!0)}},{key:"addState",value:function(t,e){var i;if(!this.graphicItem)return!1;if(e&&bt(t)&&!Wt(e,null===(i=this.runtimeStatesEncoder)||void 0===i?void 0:i[t])){var n=this.states.slice();return n.includes(t)?this.graphicItem.clearStates():n.push(t),this._updateRuntimeStates(t,e),this.useStates(n),!0}var r=this.mark.getSpec().encode,a=Xt(t).reduce((function(t,e){return e&&!t.includes(e)&&(null==r?void 0:r[e])&&t.push(e),t}),this.states.slice());return a.length!==this.states.length&&(this.useStates(a),!0)}},{key:"removeState",value:function(t){var e=this;if(!this.graphicItem)return!1;var i=Xt(t);if(!i.length)return!1;var n=this.states.filter((function(t){return!i.includes(t)}));return n.length!==this.states.length&&(this.runtimeStatesEncoder&&i.forEach((function(t){e.runtimeStatesEncoder[t]=null})),this.useStates(n),!0)}},{key:"useStates",value:function(t,e){var i;if(!this.graphicItem)return!1;this.mark.emit(sw.BEFORE_ELEMENT_STATE,{states:t},this);var n=null===(i=this.mark.getSpec())||void 0===i?void 0:i.stateSort;n&&t.sort(n),this.states=t;var r=dt(e)?e:0!==this.mark.animate.getAnimationConfigs("state").length;return this.graphicItem.stateProxy=this.getStateAttrs,this.graphicItem.useStates(this.states,r),this.mark.emit(sw.AFTER_ELEMENT_STATE,{states:t},this),!0}},{key:"diffAttributes",value:function(t){var e={},i=this.getFinalGraphicAttributes();for(var n in t)sx(n,i,t)&&Lt(i,n)||(e[n]=t[n]);return e}},{key:"transformElementItems",value:function(t,e,i){var n,r,a,o,s,u=t[0];if(!u.nextAttrs||0===Object.keys(u.nextAttrs).length)return{};var l=u.nextAttrs;if(function(t){return[Jx.line,Jx.area,Jx.largeRects,Jx.largeSymbols].includes(t)}(e)&&t&&t.length&&vt(null===(n=u.nextAttrs)||void 0===n?void 0:n.points)&&(!0===i||Dw(Object.keys(u.nextAttrs),this.mark.markType))){var c=this.mark.getSpec(),h=this.getGraphicAttribute("points",!1),d=this.getGraphicAttribute("segments",!1),f=c.enableSegments,v=null===(r=this.mark.getSpec().encode)||void 0===r?void 0:r[qx.connectNulls],p=t.map((function(t){return t.nextAttrs})),g=this.mark.isProgressive();if(l=$w(l),e===Jx.line||e===Jx.area){var y=function(t,e,i,n){return t&&t.length&&(1!==t.length||e)?t.some((function(t){return Dw(Object.keys(t.nextAttrs),"line")}))?t.map((function(t,e){var r,a=t.nextAttrs,o=null!==(r=null==i?void 0:i[e])&&void 0!==r?r:{},s=o.x,u=o.y,l=o.x1,c=o.y1,h=o.defined;return vt(a.x)&&(a.x=s),vt(a.y)&&(a.y=u),vt(a.defined)&&!1===h&&(a.defined=!1),a.context=t.key,n&&(vt(a.x1)&&(a.x1=l),vt(a.y1)&&(a.y1=c)),a})):null!=i?i:[]:[]}(t,!0,h,e===Jx.area);if(g)l.segments=(null!==(s=null===(o=null===(a=this.graphicItem)||void 0===a?void 0:a.attribute)||void 0===o?void 0:o.segments)&&void 0!==s?s:[]).concat([{points:y}]);else if(v){if(l.segments=function(t,e,i){if(!t||t.length<=1)return null;var n,r,a=!!i&&i.mark.getSpec().enableSegments,o=[],s=null;if(t.forEach((function(t,i){(s=e[i])&&!1!==s.defined?(n||(r={items:[],points:[]},o.push(r)),r.points.push(s),r.items.push(t),!1===n&&(r.isConnect=!0,r={items:[],points:[]},o.push(r)),n=!0):n=!1})),(o=o.filter((function(t){return t.points.length>0}))).length>=2){var u=[];return o.forEach((function(t){if(t.isConnect)u.push({points:t.points,isConnect:!0});else{if(a){var e=Jw(t.items,t.points,i);if(e)return void e.forEach((function(t){u.push(t)}))}var n=$w(t.items[0]);n.points=t.points,u.push(n)}})),u}return a?Jw(t,e,i):null}(p,y,this),l.segments&&l.segments.some((function(t){return t.isConnect}))){var m=Fw(v,this.getDatum(),this,this.mark.parameters());m&&l.segments.forEach((function(t){t.isConnect&&Object.assign(t,m)}))}l.points=y}else if(f){var k=y&&0!==y.length?y:function(t){return t?t.reduce((function(t,e){return t.concat(e.points)}),[]):null}(d),b=Jw(p,k,this);b?(l.segments=b,l.points=null):(l.segments=null,l.points=k)}else l.points=y,l.segments=null}else e===Jx.largeRects?l.points=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t||!t.length||1===t.length&&!e)return[];var n=new Float32Array(4*t.length);return t.forEach((function(t,e){var r,a,o,s,u=t.nextAttrs,l=null!==(r=u.x)&&void 0!==r?r:i[4*e],c=null!==(a=u.y)&&void 0!==a?a:i[4*e+1],h=null!==(o=u.width)&&void 0!==o?o:i[4*e+2],d=null!==(s=u.y1)&&void 0!==s?s:i[4*e+3];n[4*e]=l,n[4*e+1]=c,n[4*e+2]=h,n[4*e+3]=d-c})),n}(t,!0,h):e===Jx.largeSymbols&&(l.points=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t||!t.length||1===t.length&&!e)return[];var n=new Float32Array(2*t.length);return t.forEach((function(t,e){var r,a,o=t.nextAttrs,s=null!==(r=o.x)&&void 0!==r?r:i[2*e],u=null!==(a=o.y)&&void 0!==a?a:i[2*e+1];n[2*e]=s,n[2*e+1]=u})),n}(t,!0,h))}return l}},{key:"applyGraphicAttributes",value:function(t){var e,i,n=this;if(!Pt(t))if(this.mark.needAnimate()){var r=this.diffAttributes(t),a=null!==(e=this.getPrevGraphicAttributes())&&void 0!==e?e:{},o=null!==(i=this.getFinalGraphicAttributes())&&void 0!==i?i:{};Object.keys(r).forEach((function(t){a[t]=n.getGraphicAttribute(t),o[t]=r[t]})),this.setNextGraphicAttributes(r),this.setPrevGraphicAttributes(a),this.setFinalGraphicAttributes(o);var s=this.mark.animate.getElementAnimators(this).reduce((function(t,e){return Object.assign(t,e.getEndAttributes())}),{}),u=Object.assign({},s,o);this.graphicItem.setAttributes(u)}else this.graphicItem.setAttributes(t)}},{key:"getGraphicAttribute",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.graphicItem){if(i){var n,r=this.getPrevGraphicAttributes();if(!vt(n=Ot(r,t)))return n}var a=this.mark.getAttributeTransforms(),o=[t];if(a&&a.length){var s=a.find((function(e){return e.storedAttrs&&e.channels.includes(t)}));s&&(o=[s.storedAttrs,t])}return Ot(null===(e=this.graphicItem)||void 0===e?void 0:e.attribute,o)}}},{key:"setGraphicAttribute",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.graphicItem){var n=this.getFinalGraphicAttributes(),r=this.getPrevGraphicAttributes();i&&n&&(n[t]=e),r&&!Lt(r,t)&&(r[t]=this.graphicItem.attribute[t]),this.graphicItem.setAttribute(t,e)}}},{key:"setGraphicAttributes",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.graphicItem){var n=this.getFinalGraphicAttributes(),r=this.getPrevGraphicAttributes();Object.keys(t).forEach((function(a){n&&i&&(n[a]=t[a]),r&&!Lt(r,a)&&(r[a]=e.graphicItem.attribute[a])})),this.graphicItem.setAttributes(t)}}},{key:"getFinalGraphicAttributes",value:function(){return this.graphicItem.finalAttrs}},{key:"setFinalGraphicAttributes",value:function(t){this.graphicItem.finalAttrs=t}},{key:"getPrevGraphicAttributes",value:function(){return this.graphicItem.prevAttrs}},{key:"setPrevGraphicAttributes",value:function(t){this.graphicItem.prevAttrs=t}},{key:"getNextGraphicAttributes",value:function(){return this.graphicItem.nextAttrs}},{key:"setNextGraphicAttributes",value:function(t){this.graphicItem.nextAttrs=t}},{key:"clearChangedGraphicAttributes",value:function(){this.graphicItem&&(this.setPrevGraphicAttributes(null),this.setNextGraphicAttributes(null))}},{key:"clearGraphicAttributes",value:function(){this.graphicItem&&(this.graphicItem.prevAttrs&&this.setPrevGraphicAttributes(null),this.graphicItem.nextAttrs&&this.setNextGraphicAttributes(null),this.graphicItem.finalAttrs&&this.setFinalGraphicAttributes(null))}},{key:"remove",value:function(){this.graphicItem&&(Ww(this.graphicItem),this.graphicItem=null)}},{key:"release",value:function(){this.removeGraphicItem(),this.mark=null,this.data=null,this.items=null}},{key:"getItemAttribute",value:function(t){var e,i;if(null===(e=this.items)||void 0===e?void 0:e.length)return this.mark.isCollectionMark()?vt(t)?this.items.map((function(t){return t.nextAttrs})):this.items.map((function(e){var i;return null===(i=e.nextAttrs)||void 0===i?void 0:i[t]})):vt(t)?this.items[0].nextAttrs:null===(i=this.items[0].nextAttrs)||void 0===i?void 0:i[t]}},{key:"setItemAttributes",value:function(t){var e;(null===(e=this.items)||void 0===e?void 0:e.length)&&(this.mark.isCollectionMark()?_t(t)&&this.items.forEach((function(e,i){Object.assign(e.nextAttrs,t[i])})):Object.assign(this.items[0].nextAttrs,t))}},{key:"getItem",value:function(){var t,e;return this.mark&&this.mark.isCollectionMark()?null!==(t=this.items)&&void 0!==t?t:[]:null===(e=this.items)||void 0===e?void 0:e[0]}},{key:"getDatum",value:function(){var t,e;return this.mark&&this.mark.isCollectionMark()?null!==(t=this.data)&&void 0!==t?t:[]:null===(e=this.data)||void 0===e?void 0:e[0]}}])}(),tS=function(){return u((function t(e,i){o(this,t),this.references=new Map,this.view=e,this.depend(null==i?void 0:i.dependency)}),[{key:"getStartState",value:function(){return null}},{key:"depend",value:function(t){var e=this;this.references.clear(),Xt(t).map((function(t){return bt(t)?e.view.getGrammarById(t):t})).filter((function(t){return!vt(t)})).forEach((function(t){var i;e.references.set(t,(null!==(i=e.references.get(t))&&void 0!==i?i:0)+1)}))}},{key:"parameters",value:function(){var t={};return this.references.forEach((function(e,i){pt(i.id())&&(t[i.id()]=i.output())})),t}},{key:"bind",value:function(){var t=this,e=this.getEvents();(null!=e?e:[]).forEach((function(e){e.type&&e.handler&&(_t(e.type)?e.type.forEach((function(i){i&&"none"!==i&&t.view.addEventListener(i,e.handler)})):"none"!==e.type&&t.view.addEventListener(e.type,e.handler))}))}},{key:"unbind",value:function(){var t=this,e=this.getEvents();(null!=e?e:[]).forEach((function(e){e.type&&e.handler&&(_t(e.type)?e.type.forEach((function(i){i&&"none"!==i&&t.view.removeEventListener(i,e.handler)})):"none"!==e.type&&t.view.removeEventListener(e.type,e.handler))}))}},{key:"start",value:function(t){}},{key:"reset",value:function(t){}},{key:"dispatchEvent",value:function(t,e){this.view.emit("".concat(this.type,":").concat(t),e),"start"===t&&this.options.onStart?this.options.onStart(e):"reset"===t&&this.options.onReset?this.options.onReset(e):"update"===t&&this.options.onUpdate?this.options.onUpdate(e):"end"===t&&this.options.onEnd&&this.options.onEnd(e)}}])}(),eS=function(t,e){if(!e||!t)return null;var i={};return t.forEach((function(t){var n=t&&t.getSpec(),r=n&&n.encode;r&&e.forEach((function(e){e&&r[e]&&(i[e]||(i[e]=[]),i[e].push(t))}))})),i},iS=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i,[t,n])).type=i.type,r._resetType=[],r.clearPrevElements=function(){var t=r.options,e=t.state,i=t.reverseState;r._statedElements&&r._statedElements.length&&(r.clearAllStates(e,i),r.dispatchEvent("reset",{elements:r._statedElements,options:r.options}),r._statedElements=[])},r.handleStart=function(t){r.start(t.element)},r.handleReset=function(t){r.reset(t.element)},r.options=Object.assign({},i.defaultOptions,n),r._marks=t.getMarksBySelector(r.options.selector),r._stateMarks=eS(r._marks,[r.options.state,r.options.reverseState]),r}return c(i,t),u(i,[{key:"getStartState",value:function(){return this.options.state}},{key:"getEvents",value:function(){var t=this,e=this.options.triggerOff,i=this.options.trigger,n=[{type:i,handler:this.handleStart}],r=function(t){var e=Xt(t),i=[],n=[];return e.forEach((function(t){"empty"===t?i.push("view"):bt(t)&&"none"!==t?t.includes("view:")?(n.push(t.replace("view:","")),i.push("view")):(n.push(t),i.push("self")):St(t)&&i.push("timeout")})),{eventNames:n,resetType:i}}(e),a=r.eventNames,o=r.resetType;return a.forEach((function(e){e&&(_t(i)?!i.includes(e):e!==i)&&n.push({type:e,handler:t.handleReset})})),this._resetType=o,n}},{key:"start",value:function(t){var e=this,i=this.options,n=i.state,r=i.reverseState,a=i.isMultiple;if(t&&this._marks&&this._marks.includes(t.mark))if(t.hasState(n)){if(this._resetType.includes("self")){var o=this._statedElements&&this._statedElements.filter((function(e){return e!==t}));o&&o.length?this._statedElements=this.updateStates(o,this._statedElements,n,r):this.clearPrevElements()}}else this._timer&&clearTimeout(this._timer),t.addState(n),this._statedElements=this.updateStates(a&&this._statedElements?[].concat(y(this._statedElements),[t]):[t],this._statedElements,n,r),this.dispatchEvent("start",{elements:this._statedElements,options:this.options}),this._resetType.includes("timeout")&&(this._timer=setTimeout((function(){e.clearPrevElements()}),this.options.triggerOff));else this._resetType.includes("view")&&this._statedElements&&this._statedElements.length&&this.clearPrevElements()}},{key:"reset",value:function(t){if(this._statedElements&&this._statedElements.length){var e=t&&this._marks&&this._marks.includes(t.mark);(this._resetType.includes("view")&&!e||this._resetType.includes("self")&&e)&&this.clearPrevElements()}}}])}(tS);iS.type="element-select",iS.defaultOptions={state:lw.selected,trigger:"click"};var nS=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i,[t,n])).type=i.type,r.handleStart=function(t){r.start(t.element)},r.handleReset=function(t){r.reset(t.element)},r.options=Object.assign({},i.defaultOptions,n),r._marks=t.getMarksBySelector(r.options.selector),r._stateMarks=eS(r._marks,[r.options.highlightState,r.options.blurState]),r}return c(i,t),u(i,[{key:"getStartState",value:function(){return this.options.highlightState}},{key:"getEvents",value:function(){var t=this.options.triggerOff,e=[{type:this.options.trigger,handler:this.handleStart}],i=t;return bt(t)&&t.includes("view:")?(i=t.replace("view:",""),this._resetType="view"):this._resetType="self",e.push({type:i,handler:this.handleReset}),e}},{key:"clearPrevElements",value:function(){var t=this.options,e=t.highlightState,i=t.blurState;this._lastElement&&(this.clearAllStates(e,i),this.dispatchEvent("reset",{elements:[this._lastElement],options:this.options}),this._lastElement=null,this._statedElements=null)}},{key:"start",value:function(t){if(t&&this._marks&&this._marks.includes(t.mark)){var e=this.options,i=e.highlightState,n=e.blurState;if(this._lastElement===t)return;this._statedElements=this.updateStates([t],this._statedElements,i,n),this._lastElement=t,this.dispatchEvent("start",{elements:[t],options:this.options})}else this._lastElement&&"view"===this._resetType&&this.clearPrevElements()}},{key:"reset",value:function(t){if(this._statedElements&&this._statedElements.length){var e=t&&this._marks&&this._marks.includes(t.mark);"view"!==this._resetType||e?"self"===this._resetType&&e&&this.clearPrevElements():this.clearPrevElements()}}}])}(tS);nS.type="element-highlight",nS.defaultOptions={highlightState:lw.highlight,blurState:lw.blur,trigger:"pointerover",triggerOff:"pointerout"};var rS=function(){return u((function t(){o(this,t)}),[{key:"updateStates",value:function(t,e,i,n){return t&&t.length?(i&&n?e&&e.length?(this.toggleReverseStateOfElements(t,e,n),this.toggleStateOfElements(t,e,i)):this.addBothStateOfElements(t,i,n):i&&(e&&e.length?this.toggleStateOfElements(t,e,i):this.addStateOfElements(t,i)),t):null}},{key:"toggleReverseStateOfElements",value:function(t,e,i){var n=this;e.forEach((function(t){i&&n._stateMarks[i]&&n._stateMarks[i].includes(t.mark)&&t.addState(i)})),t.forEach((function(t){i&&n._stateMarks[i]&&n._stateMarks[i].includes(t.mark)&&t.removeState(i)}))}},{key:"toggleStateOfElements",value:function(t,e,i){var n=this;e.forEach((function(t){i&&n._stateMarks[i]&&n._stateMarks[i].includes(t.mark)&&t.removeState(i)})),t.forEach((function(t){i&&n._stateMarks[i]&&n._stateMarks[i].includes(t.mark)&&t.addState(i)}))}},{key:"addBothStateOfElements",value:function(t,e,i){var n=this;this._marks.forEach((function(r){var a=i&&n._stateMarks[i]&&n._stateMarks[i].includes(r),o=e&&n._stateMarks[e]&&n._stateMarks[e].includes(r);(a||o)&&r.elements.forEach((function(n){t&&t.includes(n)?o&&n.addState(e):a&&n.addState(i)}))}))}},{key:"addStateOfElements",value:function(t,e){var i=this;this._marks.forEach((function(n){var r=e&&i._stateMarks[e]&&i._stateMarks[e].includes(n);r&&n.elements.forEach((function(i){t&&t.includes(i)&&r&&i.addState(e)}))}))}},{key:"clearAllStates",value:function(t,e){var i=this;this._statedElements&&this._statedElements.length&&this._marks.forEach((function(n){e&&i._stateMarks[e]&&i._stateMarks[e].includes(n)&&n.elements.forEach((function(t){t.removeState(e)})),t&&i._stateMarks[t]&&i._stateMarks[t].includes(n)&&n.elements.forEach((function(e){i._statedElements.includes(e)&&e.removeState(t)}))}))}}])}(),aS=function(t,e){return Rw(t)?t.output():t&&gt(t)?ft(t.callback)?function(i){return t.callback(i,e)}:ft(t.value)?t.value(e):t:t},oS=function(t,e){return t?gt(t)?Object.keys(t).reduce((function(i,n){var r=t[n];return i[n]=aS(r,e),i}),{}):t.map((function(t){return aS(t,e)})):t},sS=-1,uS=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).spec={},n.references=new Map,n.targets=[],n.transforms=[],n.view=t,n.uid=++sS,n}return c(i,t),u(i,[{key:"parse",value:function(t){return this.id(t.id),this.name(t.name),this.depend(t.dependency),this}},{key:"depend",value:function(t){var e,i=this;if(null===(e=this.spec)||void 0===e?void 0:e.dependency){var n=Xt(this.spec.dependency).map((function(t){return bt(t)?i.view.getGrammarById(t):t}));this.detach(n)}this.spec.dependency=t;var r=Xt(t).map((function(t){return bt(t)?i.view.getGrammarById(t):t}));return this.attach(r),this.commit(),this}},{key:"addEventListener",value:function(t,e,i){var n=e;return i&&!1===i.trap||((n=e).raw=e),i&&i.target&&(n.target=i.target),this.on(t,n),this}},{key:"removeEventListener",value:function(t,e){return e?this.off(t,e):this.off(t),this}},{key:"emit",value:function(t){for(var e,n,r,a,o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return null===(a=null===(r=this.view)||void 0===r?void 0:r.emit)||void 0===a||(e=a).call.apply(e,[r,t].concat(s)),(n=p(h(i.prototype),"emit",this)).call.apply(n,[this,t].concat(s))}},{key:"emitGrammarEvent",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return(e=p(h(i.prototype),"emit",this)).call.apply(e,[this,t].concat(r))}},{key:"evaluateTransform",value:function(t,e,i){if(!t||!t.length)return e;for(var n=e,r=0,a=t.length;r<a;){var o=t[r];this.emit(sw.BEFORE_TRANSFORM,o.type),n=o.transform(o.isRawOptions?o.options:oS(o.options,i),n,i,this.view),r++,this.emit(sw.AFTER_TRANSFORM,o.type)}return n}},{key:"set",value:function(t){return!1}},{key:"id",value:function(t){return arguments.length?(this.view.grammars.unrecord(this),this._id=t,this.view.grammars.record(this),this):this._id}},{key:"name",value:function(t){return arguments.length?(this._name=t,this):this._name}},{key:"attach",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Xt(t).filter((function(t){return!vt(t)})).forEach((function(n){var r;vt(t)||(n.targets.includes(e)||n.targets.push(e),e.references.set(n,(null!==(r=e.references.get(n))&&void 0!==r?r:0)+i))})),this}},{key:"detach",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Xt(t).filter((function(t){return!vt(t)})).forEach((function(t){var n=e.references.get(t)-i;n>0?e.references.set(t,n-1):(e.references.delete(t),t.targets.includes(e)&&(t.targets=t.targets.filter((function(t){return t!==e}))))})),this}},{key:"detachAll",value:function(){var t=this;this.references.forEach((function(e,i){t.detach(i,e)}))}},{key:"link",value:function(t){this.grammarSource=t}},{key:"run",value:function(){var t,e=null===(t=this.grammarSource)||void 0===t?void 0:t.output(),i=this.parameters();return this.evaluate(e,i)}},{key:"commit",value:function(){this.view.commit(this)}},{key:"parameters",value:function(){var t={};return this.references.forEach((function(e,i){pt(i.id())&&(t[i.id()]=i.output())})),t}},{key:"getSpec",value:function(){return this.spec}},{key:"reuse",value:function(t){return this}},{key:"clear",value:function(){this.spec=null,this.view=null}},{key:"release",value:function(){this.clear()}},{key:"setFunctionSpec",value:function(t,e){return vt(this.spec[e])||this.detach(Ew(this.spec[e],this.view)),this.spec[e]=t,this.attach(Ew(t,this.view)),this.commit(),this}}])}(ct),lS=function(t,e,i){var n,r;if("callback"===t&&ft(e))return{references:[],value:{callback:e,dependency:[]}};if(!vt(e.data)){var a=i.getDataById(e.data);return{references:[a],value:a}}if(!vt(e.customized)){var o=i.getCustomizedById(e.customized);return{references:[o],value:o}}if(!vt(e.scale)){var s=i.getScaleById(e.scale);return{references:[s],value:s}}if((r=e)&&(r.signal||r.callback)){var u=Ew(e,i);return{references:u,value:e.callback?{value:e.callback,dependency:u}:null!==(n=null==u?void 0:u[0])&&void 0!==n?n:e}}return{value:e}},cS=function(t,e){var i=zw.getTransform(t.type);if(i){var n={},r=[];return Object.keys(t).forEach((function(i){var a;if("type"!==i){var o=t[i];if("dependency"!==i){var s=function(t,e,i){if(vt(e))return{value:e};if(_t(e)){var n=e.map((function(e){return lS(t,e,i)}));return{references:n.reduce((function(t,e){return e.references&&t.concat(e.references),t}),[]),value:n.map((function(t){return t.value}))}}return lS(t,e,i)}(i,o,e);s&&((null===(a=s.references)||void 0===a?void 0:a.length)&&(r=r.concat(s.references)),n[i]=s.value)}else(null==o?void 0:o.length)&&(r=r.concat(Tw(o,e)))}})),{markPhase:i.markPhase,transform:i.transform,canProgressive:i.canProgressive,type:i.type,options:n,references:r}}},hS=function(t,e){if(null==t?void 0:t.length){var i=[],n=[];return t.forEach((function(t){var r,a=cS(t,e);a&&((null===(r=a.references)||void 0===r?void 0:r.length)&&(n=n.concat(a.references)),i.push(a))})),{transforms:i,refs:n}}return null},dS={csv:j_,dsv:D_,tsv:F_,json:function(t){if(!bt(t))return Xt(t);try{return Xt(JSON.parse(t))}catch(t){return[]}}},fS=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[t])).grammarType="data",a.spec={},a._dataIDKey="VGRAMMAR_DATA_ID_KEY_".concat(a.uid),a._loadTasks=[],a._postFilters=[],a.ingest=function(t){var e=function(t,e){if(vt(t))return t;if(ft(t))return t.call(null,e);if(t.signal){var i=t.signal;return bt(i)?null==e?void 0:e[i]:i.output()}return t.callback?t.callback.call(null,e):t}(t.format,a.parameters());return a._input=function(t,e){if(!e||!dS[e.type])return Xt(t);var i="dsv"===e.type?{delimiter:e.delimiter}:{};return dS[e.type](t,i,new V_(new U_))}(t.values,e),a._input},a.load=function(t){if(t.values)return a.ingest(t)},a.relay=function(t){return t[0]},a._loadTasks=[],vt(n)||a.values(n,r),a}return c(i,t),u(i,[{key:"parse",value:function(t){return p(h(i.prototype),"parse",this).call(this,t),this._isLoaded=!1,this.source(t.source,t.format,!1),this.url(t.url,t.format,!1),this.values(t.values,t.format,!1),this.transform(t.transform),this.parseLoad(t),this.commit(),this}},{key:"parseDataSource",value:function(t){var e=this,i=[],n=[],r=t.format?Ew(t.format,this.view)[0]:null;if(r&&i.push(r),t.values){var a=Ew(t.values,this.view)[0];a&&i.push(a),n.push({type:"ingest",transform:this.ingest,isRawOptions:!0,options:{values:t.values,format:t.format}})}else if(t.url){var o=Ew(t.url,this.view)[0];o&&i.push(o),n.push({type:"load",transform:this.load,options:{url:null!=o?o:t.url,format:null!=r?r:t.format}})}else if(t.source){var s=[];Xt(t.source).forEach((function(t){var n=Rw(t)?t:e.view.getDataById(t);n&&(i.push(n),s.push(n))})),s.length&&(n.push({type:"relay",transform:this.relay,options:s}),this.grammarSource=s[0])}return{transforms:n,refs:i}}},{key:"evaluate",value:function(t,e){this.view.emit(sw.BEFORE_EVALUATE_DATA);var i=this._isLoaded?this.transforms:this._loadTasks.concat(this.transforms);this.grammarSource&&(this._input=t);var n=this.evaluateTransform(i,this._input,e),r=this._evaluateFilter(n,e);return this.setValues(r),this._isLoaded=!0,this.view.emit(sw.AFTER_EVALUATE_DATA),this}},{key:"output",value:function(){return this._values}},{key:"getDataIDKey",value:function(){return this._dataIDKey}},{key:"values",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=Object.assign({},this.spec,{values:t,format:e});return vt(t)||(n.url=void 0,n.source=void 0),i?this.parseLoad(n):this}},{key:"url",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=Object.assign({},this.spec,{url:t,format:e});return vt(t)||(n.values=void 0,n.source=void 0),i?this.parseLoad(n):this}},{key:"source",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=Object.assign({},this.spec,{source:t,format:e});return vt(t)||(n.values=void 0,n.url=void 0),i?this.parseLoad(n):this}},{key:"parseLoad",value:function(t){this.detach(this.parseDataSource(this.spec).refs),this.spec=t;var e=this.parseDataSource(this.spec);return this.attach(e.refs),this._loadTasks=e.transforms,this._isLoaded=!1,this.commit(),this}},{key:"setValues",value:function(t){var e=this;this._values=Xt(t).map((function(t,i){var n=t===Object(t)?t:{data:t};return n[e._dataIDKey]=i,n}))}},{key:"field",value:function(t){return this._values.map((function(e){return e[t]}))}},{key:"transform",value:function(t){var e=hS(this.spec.transform,this.view);e&&(this.detach(e.refs),this.transforms=[]),this.spec.transform=t;var i=hS(this.spec.transform,this.view);return i&&(this.attach(i.refs),this.transforms=i.transforms),this.commit(),this}},{key:"getValue",value:function(){return this._values}},{key:"getInput",value:function(){return this._input}},{key:"addDataFilter",value:function(t){return this._postFilters=this._postFilters.concat(Xt(t)),this._postFilters.sort((function(t,e){var i,n;return(null!==(i=t.rank)&&void 0!==i?i:0)-(null!==(n=e.rank)&&void 0!==n?n:0)})),this}},{key:"removeDataFilter",value:function(t){var e=Xt(t);return this._postFilters=this._postFilters.filter((function(t){return!e.includes(t)})),this}},{key:"_evaluateFilter",value:function(t,e){return this._postFilters.reduce((function(t,i){return i.filter(t,e)}),t)}},{key:"reuse",value:function(t){return t.grammarType!==this.grammarType||(this._isLoaded=!1,this._values=t.output()),this}},{key:"clear",value:function(){p(h(i.prototype),"clear",this).call(this),this._input=null,this._values=null}}])}(uS),vS="window",pS="view",gS={trap:!1},yS="width",mS="height",kS="viewWidth",bS="viewHeight",_S="padding",xS="viewBox",wS="autoFit";function SS(t,e,i,n){for(var r,a,o=t[e];e>i&&(r=t[a=Math.floor((e-1)/2)],o&&r&&n(o,r)<0);)t[e]=r,e=a;return t[e]=o}function AS(t,e,i,n){for(var r,a=e,o=null!=i?i:t.length,s=t[e],u=2*e+1;u<o;)(r=u+1)<o&&n(t[u],t[r])>=0&&(u=r),t[e]=t[u],u=2*(e=u)+1;return t[e]=s,SS(t,e,a,n)}var TS=function(){return u((function t(e){o(this,t),this.compare=e,this.nodes=[]}),[{key:"size",value:function(){return this.nodes.length}},{key:"last",value:function(){return this.nodes[0]}},{key:"validate",value:function(){for(var t=this.nodes.length-1;t>0;t-=1){var e=Math.floor((t-1)/2);if(this.compare(this.nodes[e],this.nodes[t])>0)return!1}return!0}},{key:"push",value:function(t){if(this.nodes.includes(t)){var e=this.nodes.indexOf(t);return SS(this.nodes,e,0,this.compare),AS(this.nodes,e,null,this.compare)}return this.nodes.push(t),SS(this.nodes,this.nodes.length-1,0,this.compare)}},{key:"remove",value:function(t){if(this.nodes.includes(t)){var e=this.nodes.indexOf(t);this.nodes=this.nodes.slice(0,e).concat(this.nodes.slice(e+1)),SS(this.nodes,e,0,this.compare),AS(this.nodes,e,null,this.compare)}}},{key:"pop",value:function(){var t,e=this.nodes.pop();return this.nodes.length?(t=this.nodes[0],this.nodes[0]=e,AS(this.nodes,0,null,this.compare)):t=e,t}},{key:"clear",value:function(){this.nodes=[]}}])}(),ES=function(){return u((function t(e){o(this,t),this.list=[],this.ids={},this.idFunc=e||ax}),[{key:"add",value:function(t){var e=this.idFunc(t);return this.ids[e]||(this.ids[e]=1,this.list.push(t)),this}},{key:"remove",value:function(t){var e=this.idFunc(t);return this.ids[e]&&(this.ids[e]=0,this.list=this.list.filter((function(e){return e!==t}))),this}},{key:"forEach",value:function(t,e){e?this.list.slice().reverse().forEach(t):this.list.forEach(t)}},{key:"filter",value:function(t){return this.list.filter(t)}},{key:"length",get:function(){return this.list.length}},{key:"getElementByIndex",value:function(t){return this.list[t]}}])}(),CS=function(){return u((function t(){o(this,t),this.grammars=[],this.logger=te.getInstance(),this._curRank=0,this._committed=new ES((function(t){return t.uid})),this._heap=new TS((function(t,e){return(null==t?void 0:t.qrank)-(null==e?void 0:e.qrank)})),this._beforeRunner=null,this._afterRunner=null,this._updateCounter=0,this._finishFirstRender=!1}),[{key:"add",value:function(t){if(t)return this._setRankOfGrammar(t),this.commit(t),!this.grammars.includes(t)&&(this.grammars.push(t),!0)}},{key:"remove",value:function(t){t&&(this._committed.remove(t),this._heap.remove(t),this.grammars=this.grammars.filter((function(e){return e!==t})))}},{key:"_setRankOfGrammar",value:function(t){t&&(t.rank=++this._curRank)}},{key:"_reRank",value:function(t){for(var e=this,i=[t];i.length;){var n=i.pop();this._setRankOfGrammar(n);var r=n.targets;r&&r.forEach((function(n){i.push(n),n===t&&e.logger.error("Cycle detected in dataflow graph.")}))}}},{key:"_enqueue",value:function(t){t&&(t.qrank=t.rank,this._heap.push(t))}},{key:"_logGrammarRunInfo",value:function(t){if(this.logger.canLogError()){var e=[{key:"id",value:t.id()},{key:"name",value:t.name()}].reduce((function(t,e,i){return vt(e.value)?t:"".concat(t).concat(i?" , ":"").concat(e.key,": ").concat(e.value)}),"");this.logger.debug("Run Operator: ",t,e)}}},{key:"hasCommitted",value:function(){return!!this._committed.length}},{key:"commit",value:function(t){return this._committed.add(t),this}},{key:"_beforeEvaluate",value:function(){var t=this;this.grammars.forEach((function(e){e.targets.some((function(t){return(null==t?void 0:t.rank)<(null==e?void 0:e.rank)}))&&t._reRank(e)})),this._committed.forEach((function(e){return t._enqueue(e)})),this._committed=new ES((function(t){return t.uid}))}},{key:"_enqueueTargets",value:function(t){var e=this;t.targets&&t.targets.length&&this._finishFirstRender&&t.targets.forEach((function(t){return e._enqueue(t)}))}},{key:"evaluate",value:function(){if(this._beforeRunner&&this._beforeRunner(this),!this._committed.length)return this.logger.info("Dataflow invoked, but nothing to do."),!1;this._updateCounter+=1;var t,e,i=0;for(this.logger.canLogInfo()&&(e=Date.now(),this.logger.debug("-- START PROPAGATION (".concat(this._updateCounter,") -----"))),this._beforeEvaluate();this._heap.size()>0;)(t=this._heap.pop())&&(t.rank===t.qrank?(t.run(),this._logGrammarRunInfo(t),this._enqueueTargets(t),i+=1):this._enqueue(t));return this.logger.canLogInfo()&&(e=Date.now()-e,this.logger.info("> ".concat(i," grammars updated; ").concat(e," ms"))),this._afterRunner&&this._afterRunner(this),this._finishFirstRender=!0,!0}},{key:"runBefore",value:function(t){this._beforeRunner=t}},{key:"runAfter",value:function(t){this._afterRunner=t}},{key:"release",value:function(){this._heap&&(this._heap.clear(),this._heap=null),this.logger=null,this._committed=null}}])}(),BS=function(t,e,i,n,r){!function t(a){if(r||!a||n&&!n(a)||i.call(null,a),a.markType===Jx.group){var o=a[e];o&&o.forEach((function(e){t(e)}))}r&&(!a||n&&!n(a)||i.call(null,a))}(t)},MS=function(){return u((function t(e){var i=this;o(this,t),this.handleAfterNextRender=function(){i._stage&&!i._viewOptions.disableDirtyBounds&&i._stage.enableDirtyBounds(),i._view.emit(sw.AFTER_VRENDER_DRAW),i._view.emit(sw.AFTER_VRENDER_NEXT_RENDER)},this._view=e}),[{key:"initialize",value:function(t,e,i,n){return this._width=t,this._height=e,this._viewOptions=i,this._eventConfig=n,this.initStage(),this}},{key:"stage",value:function(){var t;return null!==(t=this._stage)&&void 0!==t?t:null}},{key:"gestureController",value:function(){var t;return null!==(t=this._gestureController)&&void 0!==t?t:null}},{key:"canvas",value:function(){return this._stage?this._stage.window.getNativeHandler().nativeCanvas:null}},{key:"context",value:function(){return this._stage?this._stage.window.getContext().nativeContext:null}},{key:"combineIncrementalLayers",value:function(){var t=this;return this._stage&&function(t){return Ao(this,void 0,void 0,n().mark((function e(){var i,r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=[],r=t.getChildren(),e.next=3,new Promise((function(t){Un.global.getRequestAnimationFrame()((function(){t(null)}))}));case 3:return r.forEach((function(t){t.subLayers.size&&t.subLayers.forEach((function(t){t.drawContribution&&t.drawContribution.hooks&&t.drawContribution.rendering&&i.push(new Promise((function(e){t.drawContribution.hooks.completeDraw.tap("outWait",(function(){t.drawContribution.hooks.completeDraw.taps=t.drawContribution.hooks.completeDraw.taps.filter((function(t){return"outWait"!==t.name})),e(null)}))})))}))})),e.next=6,Promise.all(i);case 6:case"end":return e.stop()}}),e)})))}(this._stage).then((function(){t._stage&&t._stage.defaultLayer.combineSubLayer()})),this}},{key:"background",value:function(t){if(this._stage)return this._stage.background=t,this}},{key:"setDpr",value:function(t,e){var i,n;return null===(n=null===(i=this._stage)||void 0===i?void 0:i.setDpr)||void 0===n||n.call(i,t),e&&this.renderNextFrame(),this}},{key:"shouldResize",value:function(t,e){return t!==this._width||e!==this._height}},{key:"resize",value:function(t,e){return this._view.emit(sw.BEFORE_STAGE_RESIZE),this.shouldResize(t,e)&&(this._width=t,this._height=e,this._stage&&this._stage.resize(t,e)),this._view.emit(sw.AFTER_STAGE_RESIZE),this}},{key:"setViewBox",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this._stage?(!t||this._viewBox&&t.x1===this._viewBox.x1&&t.x2===this._viewBox.x2&&t.y1===this._viewBox.y1&&t.y2===this._viewBox.y2||(this._viewBox=t,this._stage.setViewBox(t.x1,t.y1,t.x2-t.x1,t.y2-t.y1,e)),this):this}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._view.emit(sw.BEFORE_VRENDER_DRAW),this.initStage(),this._stage.disableDirtyBounds(),this._stage.afterNextRender(this.handleAfterNextRender),t&&(this._stage.render(),this._view.emit(sw.AFTER_VRENDER_DRAW)),this}},{key:"renderNextFrame",value:function(){return this.initStage(),this._stage.renderNextFrame(),this}},{key:"toCanvas",value:function(){return this._stage?this._stage.toCanvas():null}},{key:"preventRender",value:function(t){this._stage&&this._stage.preventRender(t)}},{key:"release",value:function(){var t;this._view.traverseMarkTree((function(t){t.release()})),this._dragController&&this._dragController.release(),this._gestureController&&this._gestureController.release(),this._stage!==(null===(t=this._viewOptions)||void 0===t?void 0:t.stage)&&this._stage.release(),this._stage=null,this._layer=null,this._dragController=null,this._gestureController=null}},{key:"createStage",value:function(){var t,e,i,n,r;this._view.emit(sw.BEFORE_CREATE_VRENDER_STAGE);var a=this._viewOptions,o=null!==(t=a.stage)&&void 0!==t?t:bv({width:this._width,height:this._height,renderStyle:a.renderStyle,viewBox:a.viewBox,dpr:a.dpr,canvas:a.renderCanvas,canvasControled:a.canvasControled,container:a.container,title:a.rendererTitle,beforeRender:a.beforeRender,afterRender:a.afterRender,disableDirtyBounds:!0,autoRender:!0,pluginList:a.pluginList,enableHtmlAttribute:a.enableHtmlAttribute,optimize:a.optimize,ticker:a.ticker,supportsTouchEvents:a.supportsTouchEvents,supportsPointerEvents:a.supportsPointerEvents,ReactDOM:a.ReactDOM});(null===(e=a.options3d)||void 0===e?void 0:e.enable)&&o.set3dOptions(a.options3d),o.enableIncrementalAutoRender(),this._viewBox=a.viewBox,this._view.emit(sw.AFTER_CREATE_VRENDER_STAGE),this._view.emit(sw.BEFORE_CREATE_VRENDER_LAYER);var s=null!==(i=a.layer)&&void 0!==i?i:o.defaultLayer;if(this._view.emit(sw.AFTER_CREATE_VRENDER_LAYER),(null===(n=this._eventConfig)||void 0===n?void 0:n.drag)&&(this._dragController=new Qp(o)),null===(r=this._eventConfig)||void 0===r?void 0:r.gesture){var u=gt(this._eventConfig.gesture)?this._eventConfig.gesture:{};this._gestureController=new ig(o,u)}return{stage:o,layer:s}}},{key:"initStage",value:function(){if(!this._stage){var t=this.createStage(),e=t.stage,i=t.layer;this._stage=e,this._layer=i;var n=this._view.background();this.background(n)}}}])}();function RS(t){return vt(t.offsetX)?vt(t.x)?t.changedTouches&&t.changedTouches.length?function(t){return{canvasX:t.changedTouches[0].x,canvasY:t.changedTouches[0].y}}(t):{canvasX:0,canvasY:0}:function(t){return{canvasX:t.x,canvasY:t.y}}(t):function(t){return{canvasX:t.offsetX,canvasY:t.offsetY}}(t)}function PS(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return At(e.canvasX)&&Object.defineProperty(t,"canvasX",{value:e.canvasX,writable:!0}),At(e.canvasY)&&Object.defineProperty(t,"canvasY",{value:e.canvasY,writable:!0}),i&&At(e.clientX)&&Object.defineProperty(t,"clientX",{value:e.clientX,writable:!0}),i&&At(e.clientY)&&Object.defineProperty(t,"clientY",{value:e.clientY,writable:!0}),[e.canvasX,e.canvasY]}function OS(t,e,i,n,r){r===vS&&function(t){["touches","changedTouches","targetTouches"].forEach((function(e){t[e]&&t[e].length&&Array.from(t[e]).forEach((function(t){PS(t,RS(t),!1)}))}));var e=RS(t);PS(t,e)}(e.changedTouches?e.changedTouches[0]:e);return e.element=i,e}var IS=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).grammarType="signal",t.spec={value:null,update:null},t}return c(i,t),u(i,[{key:"parse",value:function(t){return p(h(i.prototype),"parse",this).call(this,t),this.value(t.value),this.update(t.update),this.commit(),this}},{key:"evaluate",value:function(t,e){return this._signal=this.spec.update?Bw(this.spec.update,e,this._signal):this.spec.value,this.spec.value=this._signal,this}},{key:"output",value:function(){return this._signal}},{key:"getValue",value:function(){return this.output()}},{key:"set",value:function(t){if(_t(t)&&_t(this.value)&&t.length===this.value.length){for(var e=0;e<t.length;e++)if(this.value[e]!==t[e])return this._signal=t,this.spec.value=t,!0;return!1}return this._signal!==t&&(this._signal=t,this.spec.value=t,!0)}},{key:"update",value:function(t){return vt(t)||this.value(void 0),this.setFunctionSpec(t,"update")}},{key:"value",value:function(t){return vt(t)||this.update(void 0),this.spec.value=t,this.commit(),this}},{key:"reuse",value:function(t){return t.grammarType!==this.grammarType||(this._signal=t.output()),this}},{key:"clear",value:function(){p(h(i.prototype),"clear",this).call(this),this._signal=null}}])}(uS),LS=-1,DS=[yS,mS,_S,kS,bS,xS,wS],jS=function(t){var e,i,n,r;return St(t)?{top:t,bottom:t,left:t,right:t}:{top:null!==(e=null==t?void 0:t.top)&&void 0!==e?e:0,bottom:null!==(i=null==t?void 0:t.bottom)&&void 0!==i?i:0,left:null!==(n=null==t?void 0:t.left)&&void 0!==n?n:0,right:null!==(r=null==t?void 0:t.right)&&void 0!==r?r:0}},FS=function(t){var e,i=function t(e,i){var n,r;e.group=i;var a=null!==(n=e.id)&&void 0!==n?n:"VGRAMMAR_MARK_"+ ++LS;e.id=a,(null!==(r=e.marks)&&void 0!==r?r:[]).forEach((function(e){return t(e,a)}))};return(null!==(e=t.marks)&&void 0!==e?e:[]).forEach((function(t){return i(t,"root")})),t},NS=function(t,e){return e&&e.debounce?he(t,e.debounce):e&&e.throttle?de(t,e.throttle):t};var zS=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t])).getStateAttrs=function(t,e){var i,r,a,o,s=!vt(null===(i=n.runtimeStatesEncoder)||void 0===i?void 0:i[t]),u=s?Object.assign(Object.assign({},null===(r=n.mark.getSpec().encode)||void 0===r?void 0:r[t]),n.runtimeStatesEncoder[t]):null===(a=n.mark.getSpec().encode)||void 0===a?void 0:a[t],c={};if(!u)return c;if(ft(u))return c.attributes=u(n.getDatum(),f(n),t,e),c;if(!s&&(null===(o=n.graphicItem.glyphStates)||void 0===o?void 0:o[t]))return n.graphicItem.glyphStates[t];if(u){var h=n.items[0],d=[Object.assign({},h,{nextAttrs:{}})];return jw(f(n),d,u,n.mark.parameters()),n.coordinateTransformEncode(d),c.attributes=d[0].nextAttrs,n.graphicItem.glyphStates?n.graphicItem.glyphStates[t]||(n.graphicItem.glyphStates[t]=c):n.graphicItem.glyphStates=l({},t,c),c}return c},n.glyphMeta=n.mark.getGlyphMeta(),n}return c(i,t),u(i,[{key:"getGlyphGraphicItems",value:function(){return this.glyphGraphicItems}},{key:"initGraphicItem",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.graphicItem){this.graphicItem=this.mark.addGraphicItem(e,this.groupKey),this.graphicItem[hw]=this,this.graphicItem.onBeforeAttributeUpdate=this._onGlyphAttributeUpdate(!1);var i=this.glyphMeta.getMarks();this.glyphGraphicItems={},this.graphicItem.getSubGraphic().forEach((function(e){var n=i[e.name];t.glyphGraphicItems[e.name]=e,e.onBeforeAttributeUpdate=function(i){return t.mark?Yw(n,i,t,e.name):i}})),this.clearGraphicAttributes()}}},{key:"useStates",value:function(t,e){if(!this.graphicItem)return!1;this.mark.emit(sw.BEFORE_ELEMENT_STATE,{states:t},this),this.states=t.slice();var i=dt(e)?e:0!==this.mark.animate.getAnimationConfigs("state").length;return this.graphicItem.glyphStateProxy=this.getStateAttrs,this.graphicItem.useStates(this.states,i),this.mark.emit(sw.AFTER_ELEMENT_STATE,{states:t},this),!0}},{key:"encodeGraphic",value:function(){this.coordinateTransformEncode(this.items);var t=this.transformElementItems(this.items,this.mark.markType);this.graphicItem||this.initGraphicItem(),this.diffState===Zx.enter?(this.graphicItem.onBeforeAttributeUpdate=this._onGlyphAttributeUpdate(!0),this.applyGraphicAttributes(t),this.graphicItem.onBeforeAttributeUpdate=this._onGlyphAttributeUpdate(!1)):this.applyGraphicAttributes(t),this.diffState!==Zx.enter&&this.diffState!==Zx.update||!this.states.length||(Object.values(this.glyphGraphicItems).forEach((function(t){t.states={}})),this.useStates(this.states)),this.items.map((function(t){t.nextAttrs={}}))}},{key:"encodeCustom",value:function(t){var e,i,n=this,r={},a=this.glyphMeta.getChannelEncoder(),o=this.glyphMeta.getFunctionEncoder();(o&&(r=o.call(null,Object.assign({},null===(e=this.graphicItem)||void 0===e?void 0:e.attribute,t),this.getDatum(),this,this.mark.getGlyphConfig())),a)&&Object.keys(a).forEach((function(e){var o;if(!vt(t[e])){i||(i=Object.assign({},null===(o=n.graphicItem)||void 0===o?void 0:o.attribute,t));var s=a[e].call(null,e,t[e],i,n.getDatum(),n,n.mark.getGlyphConfig());Object.keys(null!=s?s:{}).forEach((function(t){var e;r[t]=Object.assign(null!==(e=r[t])&&void 0!==e?e:{},s[t])}))}}));return r}},{key:"encodeDefault",value:function(){var t={};if(this.diffState===Zx.enter&&this.glyphMeta.getDefaultEncoder()){var e=this.glyphMeta.getDefaultEncoder().call(null,this.getDatum(),this,this.mark.getGlyphConfig());Object.assign(t,e)}return t}},{key:"_onGlyphAttributeUpdate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(i){if(!t.mark)return i;var n=t.glyphMeta.getMarks(),r=Yw(t.mark.getAttributeTransforms(),i,t),a=e?t.encodeDefault():null,o=t.encodeCustom(i);return Object.keys(n).forEach((function(r){var s=n[r],u=t.glyphGraphicItems[r],l=null==o?void 0:o[r],c=Object.assign({},l);if(e){var h=null==a?void 0:a[r];Object.keys(null!=h?h:{}).forEach((function(e){Lt(t.items[0].nextAttrs,e)||Lt(c,e)||(c[e]=h[e])}))}var d=Object.assign({},function(t,e){var i;return(null!==(i=Xw[t])&&void 0!==i?i:[]).reduce((function(t,i){return i.channels.forEach((function(i){Lt(e,i)&&(t[i]=e[i])})),t}),{})}(s,i),c),f=t._generateGlyphItems(s,t.items,d);t.coordinateTransformEncode(f);var v=t.transformElementItems(f,s);t.applyGlyphGraphicAttributes(v,r,u),s===Jx.shape&&(u.datum=f[0].datum)})),r}}},{key:"_generateGlyphItems",value:function(t,e,i){var n=e.map((function(t){return Object.assign({},t,{nextAttrs:i})}));return dw.includes(t)&&this.mark.getSpec().enableSegments&&n.forEach((function(t,n){t.nextAttrs=Object.assign({},e[n].nextAttrs,i)})),n}},{key:"getGraphicAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(this.graphicItem){var n=this.getPrevGraphicAttributes(i);return e&&Lt(n,t)?n[t]:(i?this.glyphGraphicItems[i]:this.graphicItem).attribute[t]}}},{key:"setGraphicAttribute",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0;if(this.graphicItem){var r=n?this.glyphGraphicItems[n]:this.graphicItem,a=this.getFinalGraphicAttributes(n),o=this.getPrevGraphicAttributes(n);i&&(a[t]=e),Lt(o,t)||(o[t]=r.attribute[t]),r.setAttribute(t,e)}}},{key:"setGraphicAttributes",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;if(this.graphicItem){var n=i?this.glyphGraphicItems[i]:this.graphicItem,r=this.getFinalGraphicAttributes(i),a=this.getPrevGraphicAttributes(i);Object.keys(t).forEach((function(i){e&&(r[i]=t[i]),Lt(a,i)||(a[i]=n.attribute[i])})),n.setAttributes(t)}}},{key:"diffAttributes",value:function(t,e){var i={},n=this.getFinalGraphicAttributes(e);for(var r in t)sx(r,n,t)||(i[r]=t[r]);return i}},{key:"applyGlyphGraphicAttributes",value:function(t,e,i){var n,r;if(this.mark.needAnimate()){var a=this.diffAttributes(t,e),o=null!==(n=this.getPrevGraphicAttributes(e))&&void 0!==n?n:{},s=null!==(r=this.getFinalGraphicAttributes(e))&&void 0!==r?r:{};Object.keys(a).forEach((function(t){o[t]=i.attribute[t],s[t]=a[t]})),this.setNextGraphicAttributes(a,e),this.setPrevGraphicAttributes(o,e),this.setFinalGraphicAttributes(s,e),i.setAttributes(a)}else i.setAttributes(t)}},{key:"getFinalGraphicAttributes",value:function(t){return(t?this.glyphGraphicItems[t]:this.graphicItem).finalAttrs}},{key:"setFinalGraphicAttributes",value:function(t,e){(e?this.glyphGraphicItems[e]:this.graphicItem).finalAttrs=t}},{key:"getPrevGraphicAttributes",value:function(t){return(t?this.glyphGraphicItems[t]:this.graphicItem).prevAttrs}},{key:"setPrevGraphicAttributes",value:function(t,e){(e?this.glyphGraphicItems[e]:this.graphicItem).prevAttrs=t}},{key:"getNextGraphicAttributes",value:function(t){return(t?this.glyphGraphicItems[t]:this.graphicItem).nextAttrs}},{key:"setNextGraphicAttributes",value:function(t,e){(e?this.glyphGraphicItems[e]:this.graphicItem).nextAttrs=t}},{key:"clearChangedGraphicAttributes",value:function(){var t=this;this.setPrevGraphicAttributes(null),this.setNextGraphicAttributes(null),Object.keys(this.glyphGraphicItems).forEach((function(e){t.setPrevGraphicAttributes(null,e),t.setNextGraphicAttributes(null,e)}))}},{key:"clearGraphicAttributes",value:function(){var t=this;this.setPrevGraphicAttributes(null),this.setNextGraphicAttributes(null),this.setFinalGraphicAttributes(null),Object.keys(this.glyphGraphicItems).forEach((function(e){t.setPrevGraphicAttributes(null,e),t.setNextGraphicAttributes(null,e),t.setFinalGraphicAttributes(null,e)}))}},{key:"remove",value:function(){this.glyphGraphicItems=null,p(h(i.prototype),"remove",this).call(this)}},{key:"release",value:function(){this.glyphGraphicItems&&(Object.values(this.glyphGraphicItems).forEach((function(t){t[hw]=null})),this.glyphGraphicItems=null),p(h(i.prototype),"release",this).call(this)}}])}(Qw),GS=function(t){return t.markType===Jx.glyph?new zS(t):new Qw(t)};function US(t,e,i){var n=new Map;if(!t||0===t.length)return{keys:[],data:n};if(!e)return n.set(vw,i?t.slice().sort(i):t.slice()),{keys:gw,data:n};var r=Pw(e);if(1===t.length){var a=r(t[0]);return n.set(a,[t[0]]),{keys:[a],data:n}}var o=new Set;return t.forEach((function(t){var e,i=r(t),a=null!==(e=n.get(i))&&void 0!==e?e:[];a.push(t),n.set(i,a),o.add(i)})),i&&o.forEach((function(t){n.get(t).sort(i)})),{keys:Array.from(o),data:n}}var WS=function(){return u((function t(e,i,n){o(this,t),this.prevData=(null==e?void 0:e.length)?US(e,null!=i?i:null,n):null}),[{key:"setCurrentData",value:function(t){this.currentData=t}},{key:"getCurrentData",value:function(){return this.currentData}},{key:"doDiff",value:function(){var t=this;if(this.callback)if(this.currentData&&this.prevData){var e=new Map(this.prevData.data);this.currentData.keys.forEach((function(i){t.callback(i,t.currentData.data.get(i),e.get(i)),e.delete(i)})),this.prevData.keys.forEach((function(i){e.has(i)&&t.callback(i,null,e.get(i))}))}else this.currentData?this.currentData.keys.forEach((function(e){t.callback(e,t.currentData.data.get(e),null)})):this.prevData&&this.prevData.keys.forEach((function(e){t.callback(e,null,t.prevData.data.get(e))}))}},{key:"setCallback",value:function(t){this.callback=t}},{key:"updateToCurrent",value:function(){this.prevData=this.currentData,this.currentData=null}},{key:"reset",value:function(){this.prevData=null}}])}();var VS=function(t,e){if(!t)return null;if(t.from){var i=t.from,n=Object.keys(i);n.forEach((function(t){vt(i[t])&&delete i[t]}));var r=Dw(n,e.mark.markType)&&!pt(i.segments);if(r){var a=e.items.map((function(t){return Object.assign({},t,{nextAttrs:Object.assign({},i)})}));t.from=e.transformElementItems(a,e.mark.markType,r)}}if(t.to){var o=t.to,s=Object.keys(o);s.forEach((function(t){vt(o[t])&&delete o[t]}));var u=Dw(s,e.mark.markType)&&!pt(o.segments);if(u){var l=e.items.map((function(t){return Object.assign({},t,{nextAttrs:Object.assign({},o)})}));t.to=e.transformElementItems(l,e.mark.markType,u)}}return t};var HS=function(t,e,i,n,r){return ft(i)?i(t.getDatum(),t,r):i};var XS=function(t){function i(t,n,r,a,s){var u;return o(this,i),(u=e(this,i,[t,n,r,a,s]))._interpolator=null==s?void 0:s.interpolator,u._element=null==s?void 0:s.element,u}return c(i,t),u(i,[{key:"onBind",value:function(){var t,e;this.from=null!==(t=this.from)&&void 0!==t?t:{},this.to=null!==(e=this.to)&&void 0!==e?e:{}}},{key:"getEndProps",value:function(){return this.to}},{key:"onUpdate",value:function(t,e,i){this._interpolator&&this._element&&this._interpolator.call(this,e,this.from,this.to,i,this._element.getDatum(),this._element,this.params.parameters)}}])}(Zr),YS=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"getEndProps",value:function(){return this.to}},{key:"onBind",value:function(){var t,e=this,i=null!==(t=this.target.constructor.NOWORK_ANIMATE_ATTR)&&void 0!==t?t:fo,n=Object.keys(i).filter((function(t){return 0!==i[t]}));this.subAnimate.animate.preventAttrs(n);var r=Object.assign({},this.from),a=Object.assign({},this.to),o=[];Object.keys(a).forEach((function(t){n.includes(t)?(r[t]=a[t],e.from[t]=a[t]):vt(r[t])?r[t]=e.target.getComputedAttribute(t):o.push(t)})),this.target.animates.forEach((function(t){t!==e.subAnimate.animate&&t.preventAttrs(o)})),this._fromAttribute=r,this._toAttribute=a}},{key:"onStart",value:function(){var t=this;if(this._fromAttribute){var e={};Object.keys(this._fromAttribute).forEach((function(i){t.subAnimate.animate.validAttr(i)&&(e[i]=t._fromAttribute[i])})),this.target.setAttributes(e,!1,{type:xi.ANIMATE_UPDATE,animationState:{ratio:0,end:!1}})}}},{key:"onEnd",value:function(){var t=this;if(this._toAttribute){var e={};Object.keys(this._toAttribute).forEach((function(i){t.subAnimate.animate.validAttr(i)&&(e[i]=t._toAttribute[i])})),this.target.setAttributes(e,!1,{type:xi.ANIMATE_END})}}},{key:"update",value:function(t,e,i){var n=this;0===this.updateCount&&this.onFirstRun(),this.updateCount+=1;var r=this.step.getLastProps();Object.keys(r).forEach((function(t){n.subAnimate.animate.validAttr(t)&&(i[t]=r[t])})),this.onUpdate(t,e,i),t&&this.onEnd()}},{key:"onUpdate",value:function(t,e,i){this.target.stepInterpolate(this.subAnimate,this.subAnimate.animate,i,this.step,e,t,this._toAttribute,this._fromAttribute)}}])}(Zr);$r.mode|=Si.SET_ATTR_IMMEDIATELY;var KS=0,qS=function(t){return!vt(t)&&(t.prototype instanceof Zr||"onBind"in t.prototype&&"onStart"in t.prototype&&"onEnd"in t.prototype&&"onUpdate"in t.prototype)},ZS=function(){return u((function t(e,i,n){o(this,t),this.id=KS++,this.isAnimating=!1,this.runnings=[],this.element=e,this.animationOptions=n,this.unit=i}),[{key:"callback",value:function(t){return this.callbackFunction=t,this}},{key:"animate",value:function(t,e){return this.isAnimating=!0,this.animateElement(t,e),0===this.runnings.length&&this.animationEnd(),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end",e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.runnings.forEach((function(e){return e.stop(t)})),this.animationEnd(e),this}},{key:"pause",value:function(){return this.runnings.forEach((function(t){return t.pause()})),this}},{key:"resume",value:function(){return this.runnings.forEach((function(t){return t.resume()})),this}},{key:"startAt",value:function(t){var e=this;return this.runnings.forEach((function(i){var n=e.unit.initialDelay;i.startAt(n+t)})),this}},{key:"getTotalAnimationTime",value:function(){var t,e=this.unit.initialDelay+this.unit.loopDuration*this.unit.loopCount;return null!==(t=this.unit.totalTime)&&void 0!==t?t:e}},{key:"getEndAttributes",value:function(){return this.runnings.reduce((function(t,e){return Object.assign(t,e.getEndProps())}),{})}},{key:"animationEnd",value:function(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isAnimating=!1,this.runnings=null,e&&(null===(t=this.callbackFunction)||void 0===t||t.call(null))}},{key:"animateElement",value:function(t,e){var i=this,n=this.element.getGraphicItem();if(n){var r=n.animate();this.runnings.push(r),r.startAt(this.unit.initialDelay),r.wait(this.unit.loopDelay),this.unit.timeSlices.forEach((function(n){i.animateTimeSlice(r,n,t,e)})),r.wait(this.unit.loopDelayAfter),r.loop(this.unit.loopCount-1),At(this.unit.totalTime)&&setTimeout((function(){r&&r.stop("end")}),this.unit.totalTime),r.onEnd((function(){i.runnings=i.runnings.filter((function(t){return t!==r})),0===i.runnings.length&&i.animationEnd()}))}}},{key:"animateTimeSlice",value:function(t,e,i,n){var r=this,a=e.delay,o=e.delayAfter,s=e.duration,u=e.effects;if(a>0&&t.wait(a),u.length<0)t.wait(s);else{var l=u.map((function(t,e){var a,o=null!==(a=t.type?function(t,e,i,n){var r=ft(e.options)?e.options.call(null,t.getDatum(),t,n):e.options;if(!e.type||!zw.getAnimationType(e.type))return null;var a=zw.getAnimationType(e.type)(t,r,i);return VS(a,t)}(r.element,t,i,n):t.channel?function(t,e,i,n){var r=e.channel,a=null;return _t(r)?a=r.reduce((function(e,i){return e.from[i]=t.getGraphicAttribute(i,!0),e.to[i]=t.getGraphicAttribute(i,!1),e}),{from:{},to:{}}):gt(r)&&(a=Object.keys(r).reduce((function(e,i){var a,o,s=!vt(null===(a=r[i])||void 0===a?void 0:a.from),u=!vt(null===(o=r[i])||void 0===o?void 0:o.to);return(s||u)&&(e.from[i]=s?HS(t,0,r[i].from,0,n):void 0,e.to[i]=u?HS(t,0,r[i].to,0,n):t.getGraphicAttribute(i,!1)),e}),{from:{},to:{}})),VS(a,t)}(r.element,t,0,n):void 0)&&void 0!==a?a:{},u=o.custom||(null==t?void 0:t.custom),l=(null==o?void 0:o.customParameters)||(null==t?void 0:t.customParameters);o.from&&Object.keys(o.from).length&&r.unit&&r.animationOptions.timeline.controlOptions.immediatelyApply&&"component"!==r.element.mark.markType&&r.element.getGraphicItem().setAttributes(o.from);var c=qS(u);return vt(u)||qS(u)?c?new u(o.from,o.to,s,t.easing,l):o.to?new YS(o.from,o.to,s,t.easing):void 0:new XS(o.from,o.to,s,t.easing,{interpolator:u,element:r.element,parameters:l})})).filter((function(t){return!vt(t)}));1===l.length?t.play(l[0]):l.length>1&&t.play(new ba(s,l))}o>0&&t.wait(o)}}])}();function JS(t){var e=[];return Object.keys(t).forEach((function(i){e=e.concat($S(i,t[i]))})),e}function $S(t,e){var i=[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Xt(e).forEach((function(e){var r,a=function(t){var e,i,n,r,a,o,s,u,l,c,h,d;if(vt(t.timeSlices)){var f=t;return{startTime:null!==(e=f.startTime)&&void 0!==e?e:mw,totalTime:f.totalTime,oneByOne:null!==(i=f.oneByOne)&&void 0!==i?i:ww,loop:null!==(n=f.loop)&&void 0!==n?n:xw,controlOptions:zt({},Aw,null!==(r=f.controlOptions)&&void 0!==r?r:{}),timeSlices:[{duration:null!==(a=f.duration)&&void 0!==a?a:kw,delay:null!==(o=f.delay)&&void 0!==o?o:bw,delayAfter:null!==(s=f.delayAfter)&&void 0!==s?s:_w,effects:[{type:f.type,channel:f.channel,custom:f.custom,easing:null!==(u=f.easing)&&void 0!==u?u:Sw,customParameters:f.customParameters,options:f.options}]}]}}var v=Xt(t.timeSlices).filter((function(t){return t.effects&&Xt(t.effects).filter((function(t){return t.channel||t.type})).length}));if(v.length)return{startTime:null!==(l=t.startTime)&&void 0!==l?l:mw,totalTime:t.totalTime,oneByOne:null!==(c=t.oneByOne)&&void 0!==c?c:ww,loop:null!==(h=t.loop)&&void 0!==h?h:xw,controlOptions:zt({},Aw,null!==(d=t.controlOptions)&&void 0!==d?d:{}),timeSlices:v.map((function(t){var e,i;return{duration:t.duration,delay:null!==(e=t.delay)&&void 0!==e?e:bw,delayAfter:null!==(i=t.delayAfter)&&void 0!==i?i:_w,effects:Xt(t.effects).filter((function(t){return t.channel||t.type})).map((function(t){var e;return{type:t.type,channel:t.channel,custom:t.custom,easing:null!==(e=t.easing)&&void 0!==e?e:Sw,customParameters:t.customParameters,options:t.options}}))}})),partitioner:t.partitioner,sort:t.sort}}(e);a&&(i.push({state:t,id:null!==(r=a.id)&&void 0!==r?r:"".concat(t,"-").concat(n),timeline:a,originConfig:e}),n+=1)})),i}function QS(t,e,i){return ft(t)?t.call(null,e.getDatum(),e,i):t}var tA=function(){return u((function t(e){o(this,t),this.parallelArrangers=[this],this.totalTime=0,this.startTime=0,this.endTime=0,this.animators=e.filter((function(t){return!vt(t)})),this.totalTime=this.animators.reduce((function(t,e){return Math.max(t,e.getTotalAnimationTime())}),0)}),[{key:"parallel",value:function(t){var e=Array.from(new Set(this.parallelArrangers.concat(t.parallelArrangers)));return e.forEach((function(t){t.parallelArrangers=e})),this.arrangeTime(),this}},{key:"after",value:function(t){return this.afterArranger=t,this.arrangeTime(),this}},{key:"arrangeTime",value:function(){var t=this.parallelArrangers.reduce((function(t,e){return Math.max(t,e.totalTime)}),this.totalTime),e=this.parallelArrangers.reduce((function(t,e){var i,n;return Math.max(t,null!==(n=null===(i=e.afterArranger)||void 0===i?void 0:i.endTime)&&void 0!==n?n:0)}),0);this.parallelArrangers.forEach((function(i){i.startTime=e,i.endTime=e+t,i.animators.forEach((function(t){t.startAt(e)}))}))}}])}(),eA=function(){return u((function t(e,i){o(this,t),this.state=null,this.immediateConfigs=[],this.isEnabled=!0,this.disabledStates=[],this.animators=new Map,this.elementRecorder=new WeakMap,this.timelineCount={},this.mark=e,this.configs=JS(null!=i?i:{})}),[{key:"getAnimationConfigs",value:function(t){var e;return this.isEnabled?(null!==(e=this.configs)&&void 0!==e?e:[]).filter((function(e){return e.state===t})):[]}},{key:"updateConfig",value:function(t){this.configs=JS(null!=t?t:{})}},{key:"updateState",value:function(t){this.state=t}},{key:"animate",value:function(){var t=this;if(this.isEnabled&&this.configs&&this.configs.length){var e=this.mark.getAllElements(),i=this.mark.parameters();return e.forEach((function(e){var i;e.isReserved&&e.diffState!==Zx.exit&&(e.isReserved=!1);var n=null===(i=t.elementRecorder.get(e))||void 0===i?void 0:i.prevState;t.configs.some((function(t){return n!==e.diffState&&t.state===n&&t.timeline.controlOptions.stopWhenStateChange}))&&t.clearElementAnimation(e,!1)})),this.configs.forEach((function(n){t.animateByTimeline(n,e,i)})),this.mark.cleanExitElements(),this}}},{key:"runAnimationByState",value:function(t){var e=this;if(this.isEnabled){var i=this.configs.filter((function(e){return e.state===t})),n=this.mark.getAllElements(),r=this.mark.parameters(),a=i.reduce((function(t,i){return t.concat(e.animateByTimeline(i,n,r,!0))}),[]);return new tA(a)}}},{key:"stopAnimationByState",value:function(t){var e=this.animators.get(t);return e&&e.forEach((function(t){return t.stop()})),this}},{key:"pauseAnimationByState",value:function(t){var e=this.animators.get(t);return e&&e.forEach((function(t){return t.pause()})),this}},{key:"resumeAnimationByState",value:function(t){var e=this.animators.get(t);return e&&e.forEach((function(t){return t.resume()})),this}},{key:"run",value:function(t){var e=this;if(this.isEnabled){var i=$S(yw,t,this.immediateConfigs.length);this.immediateConfigs=this.immediateConfigs.concat(i);var n=this.mark.getAllElements(),r=this.mark.parameters(),a=i.reduce((function(t,i){return t.concat(e.animateByTimeline(i,n,r,!0))}),[]);return new tA(a)}}},{key:"stop",value:function(){return this.animators.forEach((function(t){t.forEach((function(t){return t.stop()}))})),this}},{key:"pause",value:function(){return this.animators.forEach((function(t){return t.forEach((function(t){return t.pause()}))})),this}},{key:"resume",value:function(){return this.animators.forEach((function(t){return t.forEach((function(t){return t.resume()}))})),this}},{key:"reverse",value:function(){return this}},{key:"restart",value:function(){return this}},{key:"record",value:function(){return this}},{key:"recordEnd",value:function(){return this}},{key:"isAnimating",value:function(){var t=!1;return this.animators.forEach((function(e){t=t||e.some((function(t){return t.isAnimating}))})),t}},{key:"isElementAnimating",value:function(t){var e,i=null===(e=this.elementRecorder.get(t))||void 0===e?void 0:e.count;return vt(i)||Object.values(i).every((function(t){return 0===t}))}},{key:"getAnimatorCount",value:function(){var t=0;return this.animators.forEach((function(e){return t+=e.length})),t}},{key:"getAllAnimators",value:function(){var t=[];return this.animators.forEach((function(e){t.push.apply(t,y(e))})),t}},{key:"getElementAnimators",value:function(t,e){var i,n=Xt(t),r=[];return e?r=null!==(i=this.animators.get(e))&&void 0!==i?i:[]:this.animators.forEach((function(t){r=r.concat(t)})),r.filter((function(t){return n.includes(t.element)}))}},{key:"enable",value:function(){return this.isEnabled=!0,this}},{key:"disable",value:function(){return this.isEnabled=!1,this.stop(),this.animators.clear(),this}},{key:"enableAnimationState",value:function(t){var e=Xt(t);return this.disabledStates=this.disabledStates.filter((function(t){return!e.includes(t)})),this}},{key:"disableAnimationState",value:function(t){var e=Xt(t);return this.disabledStates=this.disabledStates.concat(e),this}},{key:"release",value:function(){this.stop(),this.animators.clear(),this.configs=null,this.animators=null,this.elementRecorder=null,this.timelineCount=null}},{key:"animateByTimeline",value:function(t,e,i){var n,r=this,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[],s=e.filter((function(e){var n=!(e.isReserved&&e.diffState===Zx.exit),o=r.getAnimationState(e),s=!r.disabledStates.includes(o),u=a||o===t.state,l=!t.timeline.partitioner||t.timeline.partitioner(e.getDatum(),e,i);return n&&s&&u&&l}));if(s.length){vt(this.timelineCount[t.id])&&(this.timelineCount[t.id]=0),t.timeline.sort&&s.sort((function(e,n){return t.timeline.sort(e.getDatum(),n.getDatum(),e,n,i)}));var u={width:this.mark.view.width(),height:this.mark.view.height(),group:null!==(n=this.mark.group)&&void 0!==n?n:null,mark:this.mark,view:this.mark.view,elementCount:s.length,elementIndex:0};s.forEach((function(e,n){u.elementIndex=n;var a=Object.assign(l({},"VGRAMMAR_ANIMATION_PARAMETERS",u),i),c=r.getAnimationUnit(t.timeline,e,n,s.length,a);o.push(r.animateElement(t,c,e,u,a))}))}return o}},{key:"animateElement",value:function(t,e,i,n,r){var a,o,s=this,u=new ZS(i,e,t);if(u.animate(n,r),u.isAnimating){i.diffState===Zx.exit&&(i.isReserved=!0);var l=0===this.timelineCount[t.id];this.timelineCount[t.id]+=1;var c=null!==(a=this.elementRecorder.get(i))&&void 0!==a?a:{prevState:t.state,count:{}};c.prevState=t.state,c.count[t.state]=(null!==(o=c.count[t.state])&&void 0!==o?o:0)+1,this.elementRecorder.set(i,c);var h=this.animators.get(t.state);h?h.push(u):this.animators.set(t.state,[u]),u.callback((function(){s.handleAnimatorEnd(u)}));var d={mark:this.mark,animationState:t.state,animationConfig:t.originConfig};return l&&this.mark.emit(sw.ANIMATION_START,d),this.mark.emit(sw.ELEMENT_ANIMATION_START,d,i),u}}},{key:"getAnimationState",value:function(t){var e=Bw(this.state,this.mark.parameters(),t.getDatum(),t);return null!=e?e:t.diffState}},{key:"getAnimationUnit",value:function(t,e,i,n,r){var a=[],o=QS(t.startTime,e,r),s=QS(t.totalTime,e,r),u=QS(t.oneByOne,e,r),l=QS(t.loop,e,r),c=0;t.timeSlices.forEach((function(t){var i,o=QS(t.delay,e,r),u=QS(t.delayAfter,e,r),l=null!==(i=QS(t.duration,e,r))&&void 0!==i?i:s/n,h=Xt(t.effects).map((function(t){return Object.assign({},t,{customParameters:QS(t.customParameters,e,r)})}));a.push({effects:h,duration:l,delay:o,delayAfter:u}),c+=o+l+u}));var h=St(u)?u:!0===u?c:0;return{initialDelay:o,loopCount:St(l)?l:!0===l?1/0:1,loopDelay:h*i,loopDelayAfter:h*(n-i-1),loopAnimateDuration:c,loopDuration:c+h*(n-1),totalTime:s,timeSlices:a}}},{key:"clearElementAnimation",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.animators.forEach((function(n){n.forEach((function(n){n.element===t&&(n.animationOptions.state===Zx.exit?n.stop("start",!1):n.stop("end",!1),e.handleAnimatorEnd(n,i))}))})),this.elementRecorder.delete(t)}},{key:"clearAllElements",value:function(){var t=this,e=this.mark.getAllElements();e&&e.forEach((function(i,n){t.clearElement(i,n===e.length-1)}))}},{key:"clearElement",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clearElementAnimation(t),t.getGraphicItem()&&(t.clearGraphicAttributes(),t.diffState===Zx.exit&&(t.isReserved=!1),e&&this.mark.cleanExitElements())}},{key:"handleAnimatorEnd",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.element,n=t.animationOptions,r=n.state,a=r===yw,o=this.elementRecorder.get(i).count;o[r]-=1,this.animators.set(r,this.animators.get(r).filter((function(e){return e!==t}))),0===this.animators.get(r).length&&this.animators.delete(r),this.timelineCount[n.id]-=1;var s=0===this.timelineCount[n.id],u=a?this.immediateConfigs.find((function(t){return t.id===n.id})).originConfig:this.configs.find((function(t){return t.id===n.id})).originConfig;s&&(delete this.timelineCount[n.id],a&&(this.immediateConfigs=this.immediateConfigs.filter((function(t){return t.id!==n.id})))),e&&(0===Object.keys(this.timelineCount).length?this.clearAllElements():r===Zx.exit&&0===o[Zx.exit]&&this.clearElement(i));var l={mark:this.mark,animationState:r,animationConfig:u};s&&this.mark.emit(sw.ANIMATION_END,l),this.mark.emit(sw.ELEMENT_ANIMATION_END,l,i)}}])}(),iA=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[t])).grammarType="mark",a.elements=[],a.elementMap=new Map,a.isUpdated=!0,a._isReentered=!1,a.animate=new eA(f(a),{}),a.differ=new WS([]),a.markType=n,a.spec.type=n,a.spec.encode={update:{}},a.spec.group=r,r&&(a.group=r,a.attach(r),r.appendChild(f(a))),a}return c(i,t),u(i,[{key:"parse",value:function(t){var e,n,r,a=this;if(p(h(i.prototype),"parse",this).call(this,t),this.spec.group){var o=bt(this.spec.group)?this.view.getMarkById(this.spec.group):this.spec.group;this.detach(o)}var s=bt(t.group)?this.view.getMarkById(t.group):t.group;return this.attach(s),this.join(null===(e=t.from)||void 0===e?void 0:e.data,t.key,t.sort,t.groupBy,t.groupSort),this.coordinate(t.coordinate),this.state(t.state,this.spec.stateSort),Object.keys(null!==(n=this.spec.encode)&&void 0!==n?n:{}).forEach((function(t){a.encodeState(t,{},!0)})),Object.keys(null!==(r=t.encode)&&void 0!==r?r:{}).forEach((function(e){a.encodeState(e,t.encode[e])})),this.animation(t.animation),this.animationState(t.animationState),this.morph(t.morph,t.morphKey,t.morphElementKey),this.layout(t.layout),this.configure(t),this.transform(t.transform),this.parseAddition(t),this.spec=t,this.markType=t.type,this.commit(),this}},{key:"parameters",value:function(){var t;return null!==(t=this._finalParameters)&&void 0!==t?t:p(h(i.prototype),"parameters",this).call(this)}},{key:"parseAddition",value:function(t){return this}},{key:"reuse",value:function(t){var e=this;if(t.grammarType!==this.grammarType)return this;var i=t;return this.markType=i.markType,this.coord=i.coord,this.elementMap=i.elementMap,this.elements=i.elements,this.elementMap.forEach((function(t){return t.mark=e})),this.differ=i.differ,this.animate=i.animate,this.animate.mark=this,this._context=i._context,this.graphicItem=i.graphicItem,this.graphicIndex=i.graphicIndex,this.graphicParent=i.graphicParent,this.needClear=i.needClear,this.isUpdated=i.isUpdated,this}},{key:"needLayout",value:function(){return!vt(this.spec.layout)}},{key:"handleLayoutEnd",value:function(){}},{key:"handleRenderEnd",value:function(){this.needClear&&(this.cleanExitElements(),this.elementMap.forEach((function(t){t.diffState===Zx.exit?t.clearGraphicAttributes():t.clearChangedGraphicAttributes()})),this.differ.updateToCurrent(),this.needClear=!1)}},{key:"evaluateMainTasks",value:function(t,e){var i;if(this.needSkipBeforeLayout()&&this.view.getLayoutState()===ow.before)return this;var n=null===(i=this.view.renderer)||void 0===i?void 0:i.stage();this.init(n,e);var r=this.evaluateTransform(this._getTransformsBeforeJoin(),null!=t?t:pw,e),a=(null==r?void 0:r.progressive)?t:r;return this.evaluateGroup(a),this.renderContext=this.parseRenderContext(a,e),this.renderContext.progressive?(this.differ.reset(),this.elementMap.clear(),this.evaluateProgressive()):((null==r?void 0:r.progressive)&&(this.renderContext.parameters=e,this.renderContext.beforeTransformProgressive=r.progressive,a=r.progressive.output()),this.emit(sw.BEFORE_MARK_JOIN),this.evaluateJoin(a),this.emit(sw.AFTER_MARK_JOIN),this.emit(sw.BEFORE_MARK_STATE),this.evaluateState(this.elements,this.spec.state,e),this.emit(sw.AFTER_MARK_STATE),this.emit(sw.BEFORE_MARK_ENCODE),this.evaluateEncode(this.elements,this._getEncoders(),e),this.emit(sw.AFTER_MARK_ENCODE)),this.emit(sw.BEFORE_MARK_UPDATE),this.update(this.spec),this.emit(sw.AFTER_MARK_UPDATE),this}},{key:"evaluateGroup",value:function(t){if(this.markType!==Jx.group){var e=US(null!=t?t:pw,this.spec.groupBy,this.spec.groupSort),i=e.keys;this._groupKeys=i,this._groupEncodeResult=null,this.differ.setCurrentData(e)}}},{key:"_getTransformsAfterEncodeItems",value:function(){return this.transforms&&this.transforms.filter((function(t){return"afterEncodeItems"===t.markPhase}))}},{key:"_getTransformsAfterEncode",value:function(){return this.transforms&&this.transforms.filter((function(t){return vt(t.markPhase)||"afterEncode"===t.markPhase}))}},{key:"_getTransformsBeforeJoin",value:function(){return this.transforms?this.transforms.filter((function(t){return"beforeJoin"===t.markPhase})):[]}},{key:"evaluate",value:function(t,e){var i;return this.evaluateMainTasks(t,e),(null===(i=this.renderContext)||void 0===i?void 0:i.progressive)||this.evaluateTransform(this._getTransformsAfterEncode(),this.elements,e),this}},{key:"output",value:function(){return this}},{key:"join",value:function(t,e,i,n,r){return this.grammarSource&&(this.detach(this.grammarSource),this.grammarSource=null),this.spec.from=null,vt(t)||(bt(t)?this.grammarSource=this.view.getDataById(t):this.grammarSource=t,this.spec.from={data:t},this.attach(this.grammarSource)),this.spec.key=e,this.spec.sort=i,this.spec.groupBy=n,this.spec.groupSort=r,this.commit(),this}},{key:"coordinate",value:function(t){return bt(t)?this.coord=this.view.getCoordinateById(t):this.coord=t,this.attach(this.coord),this.commit(),this}},{key:"state",value:function(t,e){return this.spec.stateSort=e,this.setFunctionSpec(t,"state")}},{key:"encode",value:function(t,e,i){return this.encodeState(Zx.update,t,e,i)}},{key:"encodeState",value:function(t,e,i,n){var r=this;if(t===Zx.enter&&(this._isReentered=!0),this.spec.encode[t]){var a=this.spec.encode[t];if(Cw(a))this.detach(Lw(a,this.view));else{var o=bt(e);o&&n||!o&&i?(Object.keys(a).forEach((function(t){r.detach(Lw(a[t],r.view))})),this.spec.encode[t]={}):o?this.detach(Lw(a[e],this.view)):Object.keys(e).forEach((function(t){r.detach(Lw(a[t],r.view))}))}}return e&&(this.spec.encode[t]||(this.spec.encode[t]={}),bt(e)?(this.spec.encode[t][e]=i,this.attach(Lw(i,this.view))):Cw(e)?(this.spec.encode[t]=e,this.attach(Lw(e,this.view))):e&&(Object.assign(this.spec.encode[t],e),Object.values(e).forEach((function(t){r.attach(Lw(t,r.view))})))),this.commit(),this}},{key:"_getEncoders",value:function(){var t;return null!==(t=this.spec.encode)&&void 0!==t?t:{}}},{key:"animation",value:function(t){return this.spec.animation=t,this}},{key:"animationState",value:function(t){return this.setFunctionSpec(t,"animationState")}},{key:"layout",value:function(t){return this.spec.layout=t,this.commit(),this}},{key:"morph",value:function(t,e,i){return this.spec.morph=t,this.spec.morphKey=e,this.spec.morphElementKey=i,this}},{key:"transform",value:function(t){var e=hS(this.spec.transform,this.view);e&&(this.detach(e.refs),this.transforms=[]);var i=hS(t,this.view);return i&&(this.attach(i.refs),this.transforms=i.transforms),this.spec.transform=t,this.commit(),this}},{key:"configure",value:function(t){var e=this,i=["clip","clipPath","zIndex","interactive","context","setCustomizedShape","large","largeThreshold","progressiveStep","progressiveThreshold","support3d","morph","morphKey","morphElementKey","attributeTransforms","skipTheme","enableSegments","stateSort"];return null===t?(i.forEach((function(t){vt(e.spec[t])||(e.spec[t]=void 0)})),this):(i.forEach((function(i){vt(t[i])||(e.spec[i]=t[i])})),this)}},{key:"context",value:function(t){return this.spec.context=t,this._context=t,this}},{key:"isCollectionMark",value:function(){return dw.includes(this.markType)}},{key:"needAnimate",value:function(){var t;return!(null===(t=this.renderContext)||void 0===t?void 0:t.progressive)&&!vt(this.spec.animation)}},{key:"getAllElements",value:function(){var t=this,e=this.elements.slice();return this.elementMap.forEach((function(t){t.diffState!==Zx.exit||e.includes(t)||e.push(t)})),this.spec.sort&&e.sort((function(e,i){return t.spec.sort(e.getDatum(),i.getDatum())})),e}},{key:"getScales",value:function(){var t={};return this.references.forEach((function(e,i){i.grammarType===uw.scale&&(t[i.id()]=i.output())})),t}},{key:"getScalesByChannel",value:function(){var t=this.spec.encode;if(!t)return{};var e={},i=this.parameters();return Object.keys(t).forEach((function(n){var r=t[n];r&&!Cw(r)&&Object.keys(r).forEach((function(t){Ow(r[t])&&(e[t]=Mw(r[t].scale,i))}))})),e}},{key:"getFieldsByChannel",value:function(){var t=this.spec.encode;if(!t)return{};var e={};return Object.keys(t).forEach((function(i){var n=t[i];Cw(n)||Object.keys(n).forEach((function(t){Iw(n[t])&&(e[t]=n[t].field)}))})),e}},{key:"init",value:function(t,e){var i,n,r,a,o=this;if(this._delegateEvent||(this._delegateEvent=function(t,e){var i,n=null===(i=t.target)||void 0===i?void 0:i[hw];if((null==n?void 0:n.mark)===o){var r=OS(o.view,t,n,0,pS);o.emitGrammarEvent(e,r,n)}},this.initEvent()),this.animate||(this.animate=new eA(this,this.spec.animation),this.needAnimate()&&this.animate.updateState(this.spec.animationState)),!this.group){var s=Mw(this.spec.group,e);this.group=s,s&&s.appendChild(this)}var u=this.group?this.group.getGroupGraphicItem():t.defaultLayer,l=null!==(r=null===(n=null===(i=this.group)||void 0===i?void 0:i.children)||void 0===n?void 0:n.indexOf(this))&&void 0!==r?r:0;if(this.markType!==Jx.group){if(!this.graphicItem){var c=Uw(this,Jx.group,{pickable:!1,zIndex:null!==(a=this.spec.zIndex)&&void 0!==a?a:0});(this.spec.support3d||fw.includes(this.markType))&&c.setMode("3d"),c.name="".concat(this.id()||this.markType),this.graphicItem=c}this.graphicParent=this.graphicItem,!u||this.graphicIndex===l&&this.graphicItem.parent===u||u.insertIntoKeepIdx(this.graphicItem,l)}else this.graphicParent=u;this.graphicIndex=l}},{key:"update",value:function(t){if(this._context=this.spec.context,this.isUpdated=!0,this.renderContext.progressive||(t.animation&&this.animate.updateConfig(t.animation),this.animate.updateState(t.animationState)),this.markType!==Jx.group){if(vt(t.zIndex)||this.graphicItem.setAttribute("zIndex",t.zIndex),vt(t.clip)||this.graphicItem.setAttribute("clip",t.clip),!vt(t.clipPath)){var e=_t(t.clipPath)?t.clipPath:t.clipPath(this.elements);e&&e.length?this.graphicItem.setAttribute("path",e):this.graphicItem.setAttributes({path:e,clip:!1})}this.elementMap.forEach((function(t){t.updateGraphicItem()}))}else this.elementMap.forEach((function(t){t.updateGraphicItem()}))}},{key:"evaluateJoin",value:function(t){var e,i,n,r,a=this;this.needClear=!0;var o=Pw(null!==(n=null!==(e=this.spec.key)&&void 0!==e?e:null===(i=this.grammarSource)||void 0===i?void 0:i.getDataIDKey())&&void 0!==n?n:function(){return vw}),s=Pw(null!==(r=this.spec.groupBy)&&void 0!==r?r:function(){return vw}),u=this.spec.sort,l=this.isCollectionMark(),c=new Set(this.elements.filter((function(t){return t.diffState===Zx.enter}))),h=[];this.differ.setCallback((function(t,e,i){var n,r=t;if(vt(e))(n=a.elementMap.get(r))&&(n.diffState=Zx.exit);else if(vt(i)){(n=a.elementMap.has(r)?a.elementMap.get(r):GS(a)).diffState===Zx.exit&&(n.diffState=Zx.enter,a.animate.getElementAnimators(n,Zx.exit).forEach((function(t){return t.stop("start")}))),n.diffState=Zx.enter;var u=l?t:s(e[0]);n.updateData(u,e,o,a.view),a.elementMap.set(r,n),h.push(n)}else if(n=a.elementMap.get(r)){n.diffState=Zx.update;var d=l?t:s(e[0]);n.updateData(d,e,o,a.view),h.push(n)}c.delete(n)}));var d=null!=t?t:pw;l||this.differ.setCurrentData(US(d,(function(t){return"".concat(s(t),"-").concat(o(t))}),void 0)),this.differ.doDiff(),c.forEach((function(t){a.elementMap.delete(l?t.groupKey:"".concat(t.groupKey,"-").concat(t.key)),t.remove(),t.release()})),this.elements=h,u&&this.elements.length>=2&&this.elements.sort((function(t,e){return u(t.getDatum(),e.getDatum())}))}},{key:"evaluateState",value:function(t,e,i){e&&t.forEach((function(t){t.state(e,i)}))}},{key:"evaluateGroupEncode",value:function(t,e,i){if(this._groupKeys&&e){var n={};return this._groupKeys.forEach((function(r){var a=t.find((function(t){return t.groupKey===r}));a&&(n[r]=Fw(e,a.items&&a.items[0]&&a.items[0].datum,a,i))})),this._groupEncodeResult=n,n}}},{key:"getChannelsFromConfig",value:function(t){var e=this.spec;return vt(e.interactive)?null:{pickable:e.interactive}}},{key:"evaluateEncode",value:function(t,e,i,n){var r=this,a=this.getChannelsFromConfig();if(e){this.emit(sw.BEFORE_ELEMENT_ENCODE,{encoders:e,parameters:i},this);var o=n?null:this.evaluateGroupEncode(t,e[qx.group],i);t.forEach((function(t){r.markType===Jx.glyph&&r._groupEncodeResult?t.items.forEach((function(e){e.nextAttrs=Object.assign(e.nextAttrs,a,r._groupEncodeResult[t.groupKey])})):(null==o?void 0:o[t.groupKey])&&!r.isCollectionMark()?t.items.forEach((function(e){e.nextAttrs=Object.assign(e.nextAttrs,a,o[t.groupKey])})):a&&t.items.forEach((function(t){t.nextAttrs=Object.assign(t.nextAttrs,a)})),t.encodeItems(t.items,e,r._isReentered,i)})),this._isReentered=!1,this.evaluateTransform(this._getTransformsAfterEncodeItems(),t,i),t.forEach((function(t){t.encodeGraphic(r.isCollectionMark()?null==o?void 0:o[t.groupKey]:null)})),this.emit(sw.AFTER_ELEMENT_ENCODE,{encoders:e,parameters:i},this)}else t.forEach((function(t){t.initGraphicItem(a)}))}},{key:"addGraphicItem",value:function(t,e,i){var n,r=null!=i?i:Uw(this,this.markType,t);if(r){if(null===(n=this.renderContext)||void 0===n?void 0:n.progressive){var a;if(this._groupKeys){var o=this._groupKeys.indexOf(e);o>=0&&(a=this.graphicParent.getChildAt(o))}else a=this.graphicParent.at(0);this.isCollectionMark()?(r.incremental=1,a.appendChild(r)):a.incrementalAppendChild(r)}else this.graphicParent.appendChild(r);return r}}},{key:"parseRenderContext",value:function(t,e){var i=this,n=this.markType!==Jx.group&&this.spec.progressiveStep>0&&this.spec.progressiveThreshold>0&&this.spec.progressiveStep<this.spec.progressiveThreshold,r=this.spec.large&&this.spec.largeThreshold>0&&t.length>=this.spec.largeThreshold;if(n){var a=this.differ.getCurrentData();return a&&a.keys&&a.keys.some((function(t){return a.data.get(t).length>i.spec.progressiveThreshold}))?{large:r,parameters:e,progressive:{data:t,step:this.spec.progressiveStep,currentIndex:0,totalStep:a.keys.reduce((function(t,e){return Math.max(Math.ceil(a.data.get(e).length/i.spec.progressiveStep),t)}),1),groupedData:a.data}}:{large:r}}return{large:r}}},{key:"isProgressive",value:function(){return this.renderContext&&(!!this.renderContext.progressive||!!this.renderContext.beforeTransformProgressive)}},{key:"isDoingProgressive",value:function(){return this.renderContext&&(this.renderContext.progressive&&this.renderContext.progressive.currentIndex<this.renderContext.progressive.totalStep||this.renderContext.beforeTransformProgressive&&this.renderContext.beforeTransformProgressive.unfinished())}},{key:"clearProgressive",value:function(){this.renderContext&&this.renderContext.progressive&&(this.elements=[],this.graphicParent.children.forEach((function(t){t.incrementalClearChild()})),this.graphicParent.removeAllChild()),this.renderContext&&this.renderContext.beforeTransformProgressive&&this.renderContext.beforeTransformProgressive.release(),this.renderContext=null}},{key:"restartProgressive",value:function(){this.renderContext&&this.renderContext.progressive&&(this.renderContext.progressive.currentIndex=0)}},{key:"evaluateJoinProgressive",value:function(){var t,e,i,n=this,r=this.renderContext.progressive.currentIndex,a=Pw(null!==(i=null!==(t=this.spec.key)&&void 0!==t?t:null===(e=this.grammarSource)||void 0===e?void 0:e.getDataIDKey())&&void 0!==i?i:function(){return vw}),o=[];if(this.isCollectionMark())return this._groupKeys.forEach((function(t,e){var i=n.renderContext.progressive.groupedData.get(t),s=n.renderContext.progressive.step,u=i.slice(r*s,(r+1)*s);if(0===r){var l=GS(n);l.diffState=Zx.enter,l.updateData(t,u,a,n.view),o.push(l)}else{var c=n.elements[e];c.updateData(t,u,a,n.view),o.push(c)}})),o;var s={};return this._groupKeys.forEach((function(t){var e=n.renderContext.progressive.groupedData.get(t),i=n.renderContext.progressive.step,u=e.slice(r*i,(r+1)*i),l=[];u.forEach((function(e){var i=GS(n);i.diffState=Zx.enter,i.updateData(t,[e],a,n.view),l.push(i),o.push(i)})),s[t]=l})),{groupElements:s,elements:o}}},{key:"evaluateEncodeProgressive",value:function(t,e,i){var n=this.renderContext.progressive.currentIndex;if(0===n){if(this.evaluateEncode(t,e,i),0===n&&this._groupEncodeResult&&!this.isCollectionMark()&&this.markType!==Jx.glyph){var r=t[0],a=r.getGraphicItem(),o=null==a?void 0:a.parent;o&&this._groupEncodeResult[r.groupKey]&&o.setTheme({common:this._groupEncodeResult[r.groupKey]})}}else this.evaluateEncode(t,e,i,!0)}},{key:"evaluateProgressive",value:function(){var t,e,i,n=this;if(null===(t=this.renderContext)||void 0===t?void 0:t.beforeTransformProgressive){this.renderContext.beforeTransformProgressive.progressiveRun();var r=this.renderContext.beforeTransformProgressive.output();return this.emit(sw.BEFORE_MARK_JOIN),this.evaluateJoin(r),this.emit(sw.AFTER_MARK_JOIN),this.emit(sw.BEFORE_MARK_STATE),this.evaluateState(this.elements,this.spec.state,this.renderContext.parameters),this.emit(sw.AFTER_MARK_STATE),this.emit(sw.BEFORE_MARK_ENCODE),this.evaluateEncode(this.elements,this._getEncoders(),this.renderContext.parameters),void this.emit(sw.AFTER_MARK_ENCODE)}if(null===(e=this.renderContext)||void 0===e?void 0:e.progressive){var a=this.renderContext.parameters;this.emit(sw.BEFORE_MARK_JOIN);var o=this.evaluateJoinProgressive(),s=Array.isArray(o)?o:o.elements;if(this.emit(sw.AFTER_MARK_JOIN),0===this.renderContext.progressive.currentIndex?(this.graphicParent.removeAllChild(),this._groupKeys.forEach((function(t){var e=Uw(n,Jx.group,{pickable:!1,zIndex:n.spec.zIndex});e.incremental=n.renderContext.progressive.step,n.graphicParent.appendChild(e)})),this.elements=s):this.elements=this.elements.concat(s),this.emit(sw.BEFORE_MARK_STATE),this.evaluateState(s,this.spec.state,a),this.emit(sw.AFTER_MARK_STATE),this.emit(sw.BEFORE_MARK_ENCODE),Array.isArray(o))this.evaluateEncodeProgressive(s,this._getEncoders(),a);else{var u=o.groupElements;Object.keys(u).forEach((function(t){n.evaluateEncodeProgressive(u[t],n._getEncoders(),a)}))}this.emit(sw.AFTER_MARK_ENCODE);var l=null===(i=this._getTransformsAfterEncode())||void 0===i?void 0:i.filter((function(t){return!0===t.canProgressive}));(null==l?void 0:l.length)&&this.evaluateTransform(l,this.elements,a),this.renderContext.progressive.currentIndex+=1}}},{key:"isLargeMode",value:function(){return this.renderContext&&this.renderContext.large}},{key:"cleanExitElements",value:function(){var t=this;this.elementMap.forEach((function(e,i){e.diffState!==Zx.exit||e.isReserved||(t.elementMap.delete(i),e.remove(),e.release())}))}},{key:"getGroupGraphicItem",value:function(){if(this.elements&&this.elements[0]&&this.elements[0].getGraphicItem)return this.elements[0].getGraphicItem()}},{key:"getBounds",value:function(){var t;return this.graphicItem?this.graphicItem.AABBBounds:null===(t=this.getGroupGraphicItem())||void 0===t?void 0:t.AABBBounds}},{key:"getMorphConfig",value:function(){var t;return{morph:null!==(t=this.spec.morph)&&void 0!==t&&t,morphKey:this.spec.morphKey,morphElementKey:this.spec.morphElementKey}}},{key:"getAttributeTransforms",value:function(){var t;return null!==(t=this.spec.attributeTransforms)&&void 0!==t?t:Xw[this.markType]}},{key:"getContext",value:function(){return this._context}},{key:"needSkipBeforeLayout",value:function(){var t,e;if(!0===(null===(t=this.spec.layout)||void 0===t?void 0:t.skipBeforeLayouted))return!0;for(var i=this.group;i;){if(!0===(null===(e=i.getSpec().layout)||void 0===e?void 0:e.skipBeforeLayouted))return!0;i=i.group}return!1}},{key:"initEvent",value:function(){if(this._delegateEvent){var t=this.view.renderer.stage();t&&t.on("*",this._delegateEvent)}}},{key:"releaseEvent",value:function(){if(this._delegateEvent){var t=this.view.renderer.stage();t&&t.off("*",this._delegateEvent)}}},{key:"clear",value:function(){var t;this.releaseEvent(),this.transforms=null,this.elementMap=null,this.elements=null,this.graphicItem=null,this.animate=null,null===(t=this.group)||void 0===t||t.removeChild(this),this.group=null,p(h(i.prototype),"clear",this).call(this)}},{key:"prepareRelease",value:function(){this.animate.stop(),this.elementMap.forEach((function(t){return t.diffState=Zx.exit})),this._finalParameters=this.parameters()}},{key:"release",value:function(){this.releaseEvent(),this.elements.forEach((function(t){return t.release()})),this.elementMap.clear(),this._finalParameters=null,this.animate&&this.animate.release(),this.graphicItem&&Ww(this.graphicItem),this.detachAll(),p(h(i.prototype),"release",this).call(this)}}])}(uS),nA=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i,[t,Jx.group,n])).children=[],r}return c(i,t),u(i,[{key:"parseRenderContext",value:function(){return{large:!1}}},{key:"appendChild",value:function(t){return this.children.push(t),this}},{key:"removeChild",value:function(t){return this.children=this.children.filter((function(e){return e!==t})),this}},{key:"includesChild",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!!this.children.includes(t)||!!e&&this.children.some((function(e){return e.markType===Jx.group&&e.includesChild(t,!0)}))}},{key:"updateLayoutChildren",value:function(){return this.children.length?(this.layoutChildren||(this.layoutChildren=[]),this.layoutChildren=this.children.filter((function(t){return t.needLayout()})),this):this}},{key:"getAttributeTransforms",value:function(){return Xw.rect}},{key:"evaluateJoin",value:function(t){if(!this.elements.length){var e=GS(this);e.updateData(vw,pw,(function(){return""}),this.view),this.elements=[e],this.elementMap.set(vw,e)}}},{key:"getChannelsFromConfig",value:function(t){var e=this.spec,i={};if(vt(e.clip)||(i.clip=e.clip),vt(e.zIndex)||(i.zIndex=e.zIndex),!vt(e.clipPath)){var n=ft(e.clipPath)?e.clipPath([t]):e.clipPath;n&&n.length?i.path=n:(i.path=null,i.clip=!1)}return vt(e.interactive)||(i.pickable=e.interactive),i}},{key:"evaluateGroupEncode",value:function(t,e,i){var n,r=this.elements[0],a={};return jw(r,[Object.assign({},null===(n=r.items)||void 0===n?void 0:n[0],{nextAttrs:a})],e,i),this._groupEncodeResult=a,a}},{key:"evaluateEncode",value:function(t,e,i,n){var r=this,a=this.getChannelsFromConfig();if(e){this.emit(sw.BEFORE_ELEMENT_ENCODE,{encoders:e,parameters:i},this);var o=n?null:this.evaluateGroupEncode(t,e[qx.group],i);t.forEach((function(t){t.items.forEach((function(t){t.nextAttrs=Object.assign(t.nextAttrs,a,o)})),t.encodeItems(t.items,e,r._isReentered,i)})),this._isReentered=!1,this.evaluateTransform(this._getTransformsAfterEncodeItems(),t,i),t.forEach((function(t){t.encodeGraphic()})),this.emit(sw.AFTER_ELEMENT_ENCODE,{encoders:e,parameters:i},this)}else t.forEach((function(t){t.initGraphicItem(a)}))}},{key:"addGraphicItem",value:function(t,e,i){var n=null!=i?i:Uw(this,this.markType,t);if(n)return this.emit(sw.BEFORE_ADD_VRENDER_MARK,{graphicItem:n}),n.name="".concat(this.id()||this.markType),this.graphicParent.insertIntoKeepIdx(n,this.graphicIndex),this.emit(sw.AFTER_ADD_VRENDER_MARK,{graphicItem:n}),n}}])}(iA);function rA(t,e){if(At(t))return t;var i=t.trim();if("auto"===i)return 0;if(i.endsWith("%")){var n=parseFloat(i.substring(0,i.length-1));return At(n)?n*e:0}return 0}function aA(t,e){return Math.min(t<0?t+e:t-1,e)}function oA(t,e,i){var n=aA(t,i),r=aA(e,i);if(At(t)||At(e)?At(t)?At(e)||(n=aA(Math.max(0,r-1),i)):r=aA(n+1,i):(n=1,r=2),n>r){var a=r;r=n,n=a}return{start:n,end:r}}var sA=function(t,e,i,n){var r=function(t,e,i){var n,r,a,o,s=null!==(n=t.gridTemplateRows)&&void 0!==n?n:[i],u=null!==(r=t.gridTemplateColumns)&&void 0!==r?r:[e],l=null!==(a=t.gridRowGap)&&void 0!==a?a:0,c=null!==(o=t.gridColumnGap)&&void 0!==o?o:0,h=s.map((function(t){return rA(t,i)})),d=u.map((function(t){return rA(t,e)})),f=Math.max(0,h.reduce((function(t,e){return t-e}),i)-h.length*l)/s.filter((function(t){return"auto"===t})).length,v=Math.max(0,d.reduce((function(t,e){return t-e}),e)-d.length*c)/u.filter((function(t){return"auto"===t})).length,p=0,g=h.map((function(t,e){var i="auto"===s[e]?f:t,n=p;return p+=i+l,n}));g.push(p);var y=0,m=d.map((function(t,e){var i="auto"===u[e]?v:t,n=y;return y+=i+c,n}));return m.push(y),{rows:g,columns:m,rowGap:l,columnGap:c}}(t.getSpec().layout,i.width(),i.height());e&&e.forEach((function(t){var e=t.getSpec().layout;t.layoutBounds=function(t,e,i,n,r){var a=t.rows.length,o=t.columns.length,s=oA(e,i,a),u=s.start,l=s.end,c=oA(n,r,o),h=c.start,d=c.end,f=t.columns[u],v=t.columns[l]-(d===o?0:t.columnGap),p=t.rows[h],g=t.rows[d]-(l===a?0:t.rowGap);return(new Le).set(f,p,v,g)}(r,e.gridRowStart,e.gridRowEnd,e.gridColumnStart,e.gridColumnEnd),t.commit()}))},uA=l(l(l(l(l({},$x.axis,0),$x.legend,1),$x.slider,2),$x.player,3),$x.datazoom,4),lA=function(t){var e,i,n;return null!==(i=null===(e=t.getSpec().layout)||void 0===e?void 0:e.order)&&void 0!==i?i:"component"===t.markType&&null!==(n=uA[t.componentType])&&void 0!==n?n:1/0},cA=function(t,e,i,n){var r=i.clone(),a=t.getSpec().layout,o=ux(a.maxChildWidth,r.width()),s=ux(a.maxChildHeight,r.width()),u=0,l=0,c=0,h=0;e.forEach((function(t){var e=t.getSpec().layout,a=jS(e.padding),d=n.parseMarkBounds?n.parseMarkBounds(t.getBounds(),t):t.getBounds();if("top"===e.position||"bottom"===e.position){var f=Math.min(d.height()+a.top+a.bottom,s);"top"===e.position?r.y1+=f:r.y2-=f,d.x1<i.x1&&(u=Math.max(u,i.x1-d.x1)),d.x2>i.x2&&(l=Math.max(l,d.x2-i.x2))}if("left"===e.position||"right"===e.position){var v=Math.min(d.width()+a.left+a.right,o);"left"===e.position?r.x1+=v:r.x2-=v,d.y1<i.y1&&(c=Math.max(c,i.y1-d.y1)),d.y2>i.y2&&(h=Math.max(h,d.y2-i.y2))}"outside"===e.position&&(r.x1+=Math.max(i.x1-d.x1,0)+a.left,r.x2-=Math.max(d.x2-i.x2,0)+a.right,r.y1+=Math.max(i.y1-d.y1,0)+a.top,r.y2-=Math.max(d.y2-i.y2)+a.bottom)})),u>r.x1-i.x1&&u<i.width()&&(r.x1=i.x1+u),l>i.x2-r.x2&&l<i.width()&&(r.x2=i.x2-l),c>r.y1-i.y1&&c<i.height()&&(r.y1=i.y1+c),h>i.y2-r.y2&&h<i.height()&&(r.y2=i.y2-h);for(var d=r.y1,f=r.y2,v=r.x1,p=r.x2,g=e.slice().sort((function(t,e){return lA(t)-lA(e)})),y=0,m=g.length;y<m;y++){var k=g[y],b=k.getSpec().layout,_=jS(b.padding),x=n.parseMarkBounds?n.parseMarkBounds(k.getBounds(),k):k.getBounds();if("top"===b.position||"bottom"===b.position){var w=Math.min(x.height()+_.top+_.bottom,s);if("top"===b.position?(k.layoutBounds=(new Le).set(r.x1,d-w,r.x2,d),d-=w):(k.layoutBounds=(new Le).set(r.x1,f,r.x2,f+w),f+=w),k.relativePosition={top:k.layoutBounds.y1-r.y1,bottom:k.layoutBounds.y1-r.y2},b.align){var S=x.width()+_.left+_.right;S<r.width()&&("center"===b.align?(k.layoutBounds.x1=(r.x1+r.x2)/2-S/2,k.layoutBounds.x2=k.layoutBounds.x1+S,k.relativePosition.left=k.relativePosition.right=(r.width()-S)/2):"right"===b.align?(k.layoutBounds.x1=r.x2-S,k.layoutBounds.x2=r.x2,k.relativePosition.right=0,k.relativePosition.left=r.width()-S):"left"===b.align&&(k.layoutBounds.x1=r.x1,k.layoutBounds.x2=r.x1+S,k.relativePosition.left=0,k.relativePosition.right=r.width()-S))}}else if("left"===b.position||"right"===b.position){var A=Math.min(x.width()+_.left+_.right,o);if("left"===b.position?(k.layoutBounds=(new Le).set(v-A,r.y1,v,r.y2),v-=A):(k.layoutBounds=(new Le).set(p,r.y1,p+A,r.y2),p+=A),k.relativePosition={left:k.layoutBounds.x1-r.x1,right:k.layoutBounds.x1-r.x2},b.align){var T=x.height()+_.top+_.bottom;A<r.width()&&("middle"===b.align?(k.layoutBounds.y1=(r.y1+r.y2)/2-T/2,k.layoutBounds.y2=k.layoutBounds.y1+T,k.relativePosition.top=k.relativePosition.bottom=(r.height()-T)/2):"bottom"===b.align?(k.layoutBounds.y1=r.y2-T,k.layoutBounds.y2=r.y2,k.relativePosition.top=r.height()-T,k.relativePosition.bottom=0):"top"===b.align&&(k.layoutBounds.y1=r.y1,k.layoutBounds.y2=r.y1+T,k.relativePosition.bottom=r.height()-T,k.relativePosition.top=0))}}else"outside"===b.position?(v-=Math.max(i.x1-x.x1,0)+_.left,p-=Math.max(x.x2-i.x2,0)+_.right,d-=Math.max(i.y1-x.y1,0)+_.top,f+=Math.max(x.y2-i.y2)+_.bottom):k.layoutBounds=r}return r},hA=function t(e,i,n){null==e||e.forEach((function(e){var r;if(e.markType===Jx.group){var a=e.layoutChildren,o=e.getSpec().layout,s=null!==(r=e.layoutBounds)&&void 0!==r?r:e.getBounds();if(s){if(ft(o))o.call(null,e,a,s,i);else if(ft(o.callback))o.callback.call(null,e,a,s,i);else if("relative"===o.display)if(o.updateViewSignals){var u=n.getViewBox();u&&s.intersect(u);var l=cA(e,a,s,i),c=l.width(),h=l.height(),d={top:l.y1,right:n.width()-l.x2,left:l.x1,bottom:n.height()-l.y2};n.updateSignal(kS,c),n.updateSignal(bS,h),n.updateSignal(_S,d)}else cA(e,a,s,i);else"grid"===o.display&&sA(e,a,s);t(a,i,n)}}}))},dA=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[t,Jx.glyph,r])).glyphType=n,a.glyphMeta=zw.getGlyph(n),a}return c(i,t),u(i,[{key:"configureGlyph",value:function(t){return this.spec.glyphConfig=t,this.commit(),this}},{key:"getGlyphMeta",value:function(){return this.glyphMeta}},{key:"getGlyphConfig",value:function(){return this.spec.glyphConfig}},{key:"addGraphicItem",value:function(t,e){var n=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(zw.getGraphicType(Jx.glyph)){var n=zw.createGraphic(Jx.glyph,i),r=e.getMarks(),a=Object.keys(r).map((function(t){if(zw.getGraphicType(r[t])){var e=zw.createGraphic(r[t]);if(e)return e.name=t,e}}));return n.setSubGraphic(a),n}}(this,this.glyphMeta,t);return p(h(i.prototype),"addGraphicItem",this).call(this,t,e,n)}}])}(iA),fA=Symbol.for("key"),vA=function(){return u((function t(){o(this,t)}),[{key:"diffGrammar",value:function(t,e){return function(t,e,i){var n={enter:[],exit:[],update:[]},r=new WS(t,i);return r.setCallback((function(t,e,i){vt(e)?n.exit.push({prev:i[0]}):vt(i)?n.enter.push({next:e[0]}):n.update.push({next:e[0],prev:i[0]})})),r.setCurrentData(US(e,i)),r.doDiff(),n}(t,e,(function(t){var e;return null!==(e=t.id())&&void 0!==e?e:Symbol()}))}},{key:"diffMark",value:function(t,e,i){var n={enter:[],exit:[],update:[]},r=[],a=[];t.forEach((function(t){t.markType!==Jx.group&&(i.morph&&t.getMorphConfig().morph||i.morphAll||i.reuse)?r.push(t):n.exit.push({prev:[t]})})),e.forEach((function(t){t.markType!==Jx.group&&(i.morph&&t.getMorphConfig().morph||i.morphAll||i.reuse)?a.push(t):n.enter.push({next:[t]})}));var o=this.diffUpdateByGroup(r,a,(function(t){return t.getMorphConfig().morphKey}),(function(t){return t.getMorphConfig().morphKey}));r=o.prev,a=o.next,n.update=n.update.concat(o.update);var s=this.diffUpdateByGroup(r,a,(function(t){return t.id()}),(function(t){return t.id()}));r=s.prev,a=s.next,n.update=n.update.concat(s.update);var u=US(r,(function(t){var e,i;return null===(i=null===(e=t.group)||void 0===e?void 0:e.id)||void 0===i?void 0:i.call(e)})),l=US(a,(function(t){var e,i;return null===(i=null===(e=t.group)||void 0===e?void 0:e.id)||void 0===i?void 0:i.call(e)}));return Object.keys(l).forEach((function(t){var e=u.data.get(t),i=l.data.get(t);if(e&&i){for(var o=0;o<Math.max(e.length,i.length);o+=1){var s=e[o],c=i[o];s&&c?n.update.push({prev:[s],next:[c]}):s?n.exit.push({prev:[s]}):c&&n.enter.push({next:[c]})}r=r.filter((function(t){return!e.includes(t)})),a=a.filter((function(t){return!i.includes(t)}))}})),r.forEach((function(t){return n.exit.push({prev:[t]})})),a.forEach((function(t){return n.enter.push({next:[t]})})),n}},{key:"_appendMorphKeyToElements",value:function(t){var e=t.getMorphConfig();if(!vt(e.morphElementKey)){var i=Pw(e.morphElementKey);t.elements&&t.elements.forEach((function(t){t.morphKey=i(t.getDatum())}))}}},{key:"morph",value:function(t,e,i){var n=this,r=function(t,e,i){var n={enter:[],exit:[],update:[]},r=new WS(t,i);return r.setCallback((function(t,e,i){vt(e)?n.exit.push({prev:i}):vt(i)?n.enter.push({next:e}):n.update.push({next:e,prev:i})})),r.setCurrentData(US(e,i)),r.doDiff(),n}(t.reduce((function(t,e){return n._appendMorphKeyToElements(e),t.concat(e.elements)}),[]),e.reduce((function(t,e){return n._appendMorphKeyToElements(e),t.concat(e.elements)}),[]),(function(t){var e;return null!==(e=t.morphKey)&&void 0!==e?e:t.key}));t.forEach((function(t){var e,i;return null===(i=null===(e=t.animate)||void 0===e?void 0:e.disable)||void 0===i?void 0:i.call(e)})),e.forEach((function(t){var e,i;return null===(i=null===(e=t.animate)||void 0===e?void 0:e.disable)||void 0===i?void 0:i.call(e)}));var a=t.concat(e).reduce((function(t,e){return Object.assign(t,e.parameters()),t}),{}),o=0,s=function(){0===(o-=1)&&e.forEach((function(t){var e,i;null===(i=null===(e=t.animate)||void 0===e?void 0:e.enable)||void 0===i||i.call(e)}))};r.enter.forEach((function(t){t.next.forEach((function(t){n.doMorph([],[t],i,s,a)})),o+=1})),r.update.forEach((function(t){for(var e=Math.min(t.prev.length,t.next.length),r=n.divideElements(t.prev,e),u=n.divideElements(t.next,e),l=0;l<e;l++)n.doMorph(r[l],u[l],i,s,a),o+=1}))}},{key:"diffUpdateByGroup",value:function(t,e,i,n){var r=US(t,(function(t){var e;return null!==(e=i(t))&&void 0!==e?e:fA})),a=US(e,(function(t){var e;return null!==(e=n(t))&&void 0!==e?e:fA})),o=t,s=e,u=[];return a.keys.forEach((function(t){if(t!==fA){var e=r.data.get(t),i=a.data.get(t);e&&i&&(u.push({prev:e,next:i}),o=o.filter((function(t){return!e.includes(t)})),s=s.filter((function(t){return!i.includes(t)})))}})),{prev:o,next:s,update:u}}},{key:"doMorph",value:function(t,e,i,n,r){var a,o,s={prev:t.map((function(t){return t.getDatum()})),next:e.map((function(t){return t.getDatum()}))},u={prev:t.slice(),next:e.slice()},l=i.animation.easing,c=Bw(i.animation.delay,r,s,u),h=Bw(i.animation.duration,r,s,u),d=Bw(i.animation.oneByOne,r,s,u),f=Bw(i.animation.splitPath,r,s,u),v=At(d)&&d>0?function(t){return St(d)?t*d:!0===d?t*h:0}:void 0;1!==t.length&&0!==t.length||1!==e.length?1===t.length&&e.length>1?function(t,e,i){var n,r=e.filter((function(t){return t&&t.toCustomPath&&t.valid}));r.length||__DEV__&&console.error(r," is not validate"),t.valid&&t.toCustomPath||__DEV__&&console.error(t," is not validate");var a=("clone"===(null==i?void 0:i.splitPath)?eo:null!==(n=null==i?void 0:i.splitPath)&&void 0!==n?n:io)(t,r.length,!1),o=null==i?void 0:i.onEnd,s=r.length,u=function(){0==--s&&o&&o()};r.forEach((function(e,n){var o,s=a[n],l=(null!==(o=null==i?void 0:i.delay)&&void 0!==o?o:0)+((null==i?void 0:i.individualDelay)?i.individualDelay(n,r.length,s,e):0);Ja(s,e,Object.assign({},i,{onEnd:u,delay:l}),t.globalTransMatrix)}))}(t[0].getGraphicItem(),e.map((function(t){return t.getGraphicItem()})),{delay:c,duration:h,easing:l,onEnd:n,individualDelay:v,splitPath:f}):t.length>1&&1===e.length&&function(t,e,i){var n,r,a,o=t.filter((function(t){return t.toCustomPath&&t.valid}));o.length||__DEV__&&console.error(t," is not validate"),e.valid&&e.toCustomPath||__DEV__&&console.error(e," is not validate");var s=("clone"===(null==i?void 0:i.splitPath)?eo:null!==(n=null==i?void 0:i.splitPath)&&void 0!==n?n:io)(e,o.length,!0),u=e.attribute;e.setAttribute("visible",!1);var l=o.map((function(t,e){return Ya(t.toCustomPath(),s[e].toCustomPath(),{fromTransform:t.globalTransMatrix,toTransfrom:s[e].globalTransMatrix})})),c=o.map((function(t,e){return qa(t.attribute,u)}));if(null==i?void 0:i.individualDelay){var h=i.onEnd,d=o.length,f=function(){0==--d&&(e.setAttributes({visible:!0,ratio:null},!1,{type:xi.ANIMATE_END}),e.detachShadow(),h&&h())};s.forEach((function(e,n){var r,a,s,u=(null!==(r=i.delay)&&void 0!==r?r:0)+i.individualDelay(n,o.length,t[n],e),h=e.animate(Object.assign({},i,{onEnd:f}));h.wait(u),h.play(new Za({morphingData:l[n],saveOnEnd:!0,otherAttrs:c[n]},null!==(a=i.duration)&&void 0!==a?a:ra,null!==(s=i.easing)&&void 0!==s?s:aa))}))}else{var v=null==i?void 0:i.onEnd,p=i?Object.assign({},i):{};p.onEnd=function(){e.setAttribute("visible",!0,!1,{type:xi.ANIMATE_END}),e.detachShadow(),v&&v()};var g=e.animate(p);(null==i?void 0:i.delay)&&g.wait(i.delay),g.play(new $a({morphingData:l,otherAttrs:c},null!==(r=null==i?void 0:i.duration)&&void 0!==r?r:ra,null!==(a=null==i?void 0:i.easing)&&void 0!==a?a:aa))}}(t.map((function(t){return t.getGraphicItem()})),e[0].getGraphicItem(),{delay:c,duration:h,easing:l,onEnd:n,individualDelay:v,splitPath:f}):Ja(null===(o=null===(a=t[0])||void 0===a?void 0:a.getGraphicItem)||void 0===o?void 0:o.call(a),e[0].getGraphicItem(),{delay:c,duration:h,easing:l,onEnd:n})}},{key:"divideElements",value:function(t,e){var i=Math.floor(t.length/e);return new Array(e).fill(0).map((function(n,r){return t.slice(i*r,r===e-1?t.length:i*(r+1))}))}}])}(),pA=function(){return u((function t(e,i){o(this,t),this._grammars={signal:[],data:[],scale:[],coordinate:[],mark:[],customized:[]},this._grammarMap={signal:{},data:{},scale:{},coordinate:{},mark:{},customized:{}},this._size=0,this._mapKey=bt(e)?function(t){return t[e]}:e,this._warning=i}),[{key:"record",value:function(t){var e,i,n=t.grammarType,r=this._mapKey(t);return this._grammarMap[n]?(this._grammars[n].push(t),vt(r)||(this._grammarMap[n][r]?null===(e=this._warning)||void 0===e||e.call(this,r,t):this._grammarMap[n][r]=t)):(this._grammars.customized.push(t),vt(r)||(this._grammarMap.customized[r]?null===(i=this._warning)||void 0===i||i.call(this,r,t):this._grammarMap.customized[r]=t)),this._size+=1,this}},{key:"unrecord",value:function(t){var e=t.grammarType,i=this._mapKey(t);return this._grammarMap[e]?(this._grammars[e]=this._grammars[e].filter((function(e){return e!==t})),vt(i)||this._grammarMap[e][i]!==t||delete this._grammarMap[e][i]):(this._grammars.customized=this._grammars.customized.filter((function(e){return e!==t})),vt(i)||this._grammarMap.customized[i]!==t||delete this._grammarMap.customized[i]),this._size-=1,this}},{key:"size",value:function(){return this._size}},{key:"getSignal",value:function(t){var e;return null!==(e=this._grammarMap.signal[t])&&void 0!==e?e:null}},{key:"getData",value:function(t){var e;return null!==(e=this._grammarMap.data[t])&&void 0!==e?e:null}},{key:"getScale",value:function(t){var e;return null!==(e=this._grammarMap.scale[t])&&void 0!==e?e:null}},{key:"getCoordinate",value:function(t){var e;return null!==(e=this._grammarMap.coordinate[t])&&void 0!==e?e:null}},{key:"getMark",value:function(t){var e;return null!==(e=this._grammarMap.mark[t])&&void 0!==e?e:null}},{key:"getCustomized",value:function(t){var e;return null!==(e=this._grammarMap.customized[t])&&void 0!==e?e:null}},{key:"getGrammar",value:function(t){return this._grammarMap.data[t]?this._grammarMap.data[t]:this._grammarMap.signal[t]?this._grammarMap.signal[t]:this._grammarMap.scale[t]?this._grammarMap.scale[t]:this._grammarMap.coordinate[t]?this._grammarMap.coordinate[t]:this._grammarMap.mark[t]?this._grammarMap.mark[t]:this._grammarMap.customized[t]?this._grammarMap.customized[t]:null}},{key:"getAllSignals",value:function(){return this._grammars.signal}},{key:"getAllData",value:function(){return this._grammars.data}},{key:"getAllScales",value:function(){return this._grammars.scale}},{key:"getAllCoordinates",value:function(){return this._grammars.coordinate}},{key:"getAllMarks",value:function(){return this._grammars.mark}},{key:"getAllCustomized",value:function(){return this._grammars.customized}},{key:"traverse",value:function(t){var e;Object.values(null!==(e=this._grammars)&&void 0!==e?e:{}).forEach((function(e){return(null!=e?e:[]).forEach((function(e){t.call(null,e)}))}))}},{key:"find",value:function(t){var e=null;return this.traverse((function(i){return!0===t.call(null,i)&&(e=i,!0)})),e}},{key:"filter",value:function(t){var e=[];return this.traverse((function(i){!0===t.call(null,i)&&e.push(i)})),e}},{key:"clear",value:function(){this._size=0,this._grammars={signal:[],data:[],scale:[],coordinate:[],mark:[],customized:[]},this._grammarMap={signal:{},data:{},scale:{},coordinate:{},mark:{},customized:{}}}},{key:"release",value:function(){this._size=0,this._grammars=null,this._grammarMap=null}}])}(),gA=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments))._markNodes=[],t}return c(i,t),u(i,[{key:"record",value:function(t){if(p(h(i.prototype),"record",this).call(this,t),"mark"===t.grammarType){var e=t,n={mark:e,parent:null,children:[]};this._markNodes.forEach((function(t){var i=t.mark;i.markType===Jx.group&&i.includesChild(e,!1)?(t.children.push(n),n.parent=t):e.markType===Jx.group&&e.includesChild(i,!1)&&(n.children.push(t),t.parent=n)})),this._markNodes.push(n)}return this}},{key:"unrecord",value:function(t){if(p(h(i.prototype),"unrecord",this).call(this,t),"mark"===t.grammarType){var e=t,n=this._markNodes.find((function(t){return t.mark===e}));this._markNodes.forEach((function(t){var i=t.mark;i.markType===Jx.group&&i.includesChild(e,!1)?(t.children=t.children.filter((function(t){return t!==n})),n.parent=null):e.markType===Jx.group&&e.includesChild(i,!1)&&(n.children=n.children.filter((function(e){return e!==t})),t.parent=null)})),this._markNodes=this._markNodes.filter((function(t){return t!==n}))}return this}},{key:"getAllMarkNodes",value:function(){return this._markNodes}},{key:"clear",value:function(){p(h(i.prototype),"clear",this).call(this),this._markNodes=[]}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this),this._markNodes=null}}])}(pA),yA=function(){return u((function t(e){var i=this;o(this,t),this._animations=[],this._additionalAnimateMarks=[],this.isEnabled=!0,this._onAnimationStart=function(t){i._additionalAnimateMarks=i._additionalAnimateMarks.filter((function(t){var e;return null===(e=null==t?void 0:t.animate)||void 0===e?void 0:e.isAnimating()})),0===i._animations.length&&0===i._additionalAnimateMarks.length&&i._view.emit(sw.ALL_ANIMATION_START,{}),i._animations=i._animations.concat({config:t.animationConfig,mark:t.mark})},this._onAnimationEnd=function(t){i._additionalAnimateMarks=i._additionalAnimateMarks.filter((function(t){var e;return null===(e=null==t?void 0:t.animate)||void 0===e?void 0:e.isAnimating()})),i._animations=i._animations.filter((function(e){return e.config!==t.animationConfig||e.mark!==t.mark})),0===i._animations.length&&0===i._additionalAnimateMarks.length&&i._view.emit(sw.ALL_ANIMATION_END,{})},this._view=e,this._view.addEventListener(sw.ANIMATION_START,this._onAnimationStart),this._view.addEventListener(sw.ANIMATION_END,this._onAnimationEnd)}),[{key:"stop",value:function(){return this._view.traverseMarkTree((function(t){var e,i;t.animate&&(null===(i=(e=t.animate).stop)||void 0===i||i.call(e))})),this._additionalAnimateMarks.forEach((function(t){var e,i;t.view&&t.animate&&(null===(i=(e=t.animate).stop)||void 0===i||i.call(e))})),this._additionalAnimateMarks=[],this}},{key:"pause",value:function(){return this._view.traverseMarkTree((function(t){var e,i;t.animate&&(null===(i=(e=t.animate).pause)||void 0===i||i.call(e))})),this._additionalAnimateMarks.forEach((function(t){var e,i;t.view&&t.animate&&(null===(i=(e=t.animate).pause)||void 0===i||i.call(e))})),this}},{key:"resume",value:function(){return this._view.traverseMarkTree((function(t){var e,i;t.animate&&(null===(i=(e=t.animate).resume)||void 0===i||i.call(e))})),this._additionalAnimateMarks.forEach((function(t){var e,i;t.view&&t.animate&&(null===(i=(e=t.animate).resume)||void 0===i||i.call(e))})),this}},{key:"enable",value:function(){return this.isEnabled=!0,this._view.traverseMarkTree((function(t){var e,i;t.animate&&(null===(i=(e=t.animate).enable)||void 0===i||i.call(e))})),this}},{key:"disable",value:function(){return this.isEnabled=!1,this._view.traverseMarkTree((function(t){var e,i;t.animate&&(null===(i=(e=t.animate).disable)||void 0===i||i.call(e))})),this._additionalAnimateMarks.forEach((function(t){var e,i;t.view&&t.animate&&(null===(i=(e=t.animate).stop)||void 0===i||i.call(e))})),this._additionalAnimateMarks=[],this}},{key:"enableAnimationState",value:function(t){return this._view.traverseMarkTree((function(e){var i,n;e.animate&&(null===(n=(i=e.animate).enableAnimationState)||void 0===n||n.call(i,t))})),this}},{key:"disableAnimationState",value:function(t){return this._view.traverseMarkTree((function(e){var i,n;e.animate&&(null===(n=(i=e.animate).disableAnimationState)||void 0===n||n.call(i,t))})),this}},{key:"isAnimating",value:function(){return 0!==this._animations.length||this._additionalAnimateMarks.some((function(t){var e;return(null===(e=null==t?void 0:t.animate)||void 0===e?void 0:e.isAnimating())||!1}))}},{key:"animate",value:function(){return this.isEnabled?(this._view.traverseMarkTree((function(t){t.isUpdated&&t.animate&&t.animate.animate(),t.cleanExitElements(),t.isUpdated=!1}),null,!0),this):this}},{key:"animateAddition",value:function(t){var e=t.animate.animate();return e&&e.isAnimating()&&this._additionalAnimateMarks.push(t),this}},{key:"release",value:function(){this._additionalAnimateMarks=[],this._animations=[],this._view.removeEventListener(sw.ALL_ANIMATION_START,this._onAnimationStart),this._view.removeEventListener(sw.ALL_ANIMATION_END,this._onAnimationEnd),this._view=null}}])}(),mA=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"addGraphicItem",value:function(t,e){var n=t&&t.limitAttrs,r=Uw(this,n&&("rich"===n.textType||n.text&&"rich"===n.text.type)?Jx.richtext:Jx.text,t);return p(h(i.prototype),"addGraphicItem",this).call(this,t,e,r)}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this)}}])}(iA);mA.markType=Jx.text;var kA={axis:{label:{visible:!0,inside:!1,space:4,style:{fontSize:12,fill:"#89909d",fontWeight:"normal",fillOpacity:1}},tick:{visible:!0,inside:!1,alignWithLabel:!0,length:4,style:{lineWidth:1,stroke:"#D9DDE4",strokeOpacity:1}},subTick:{visible:!1,inside:!1,count:4,length:2,style:{lineWidth:1,stroke:"#D9DDE4",strokeOpacity:1}},line:{visible:!0,style:{lineWidth:1,stroke:"#D9DDE4",strokeOpacity:1}},items:[],start:{x:0,y:0},end:{x:100,y:0},x:0,y:0},circleAxis:{title:{space:4,padding:[0,0,0,0],textStyle:{fontSize:12,fill:"#333333",fontWeight:"normal",fillOpacity:1},text:"theta"},label:{visible:!0,inside:!1,space:4,style:{fontSize:12,fill:"#6F6F6F",fontWeight:"normal",fillOpacity:1}},tick:{visible:!0,inside:!1,alignWithLabel:!0,length:4,style:{lineWidth:1,stroke:"#D9DDE4",strokeOpacity:1}},subTick:{visible:!1,inside:!1,count:4,length:2,style:{lineWidth:1,stroke:"#D9DDE4",strokeOpacity:1}},line:{visible:!0,style:{lineWidth:1,stroke:"#D9DDE4",strokeOpacity:1}},items:[],startAngle:0,endAngle:2*Math.PI,radius:100,innerRadius:0,center:{x:0,y:0},x:0,y:0},grid:{style:{stroke:"#f1f2f5"}},circleGrid:{style:{stroke:"#f1f2f5"}},discreteLegend:{layout:"vertical",title:{align:"start",space:12,textStyle:{fontSize:12,fontWeight:"bold",fill:"#2C3542"}},item:{spaceCol:10,spaceRow:10,shape:{space:4,style:{size:10,cursor:"pointer"},state:{selectedHover:{opacity:.85},unSelected:{fill:"#D8D8D8",stroke:"#D8D8D8",fillOpacity:.5}}},label:{space:4,style:{fontSize:12,fill:"black",cursor:"pointer"},state:{selectedHover:{opacity:.85},unSelected:{fill:"#D8D8D8",fillOpacity:.5}}},value:{alignRight:!1,style:{fontSize:12,fill:"#ccc",cursor:"pointer"},state:{selectedHover:{opacity:.85},unSelected:{fill:"#D8D8D8"}}},background:{style:{cursor:"pointer"},state:{selectedHover:{fillOpacity:.7,fill:"gray"},unSelectedHover:{fillOpacity:.2,fill:"gray"}}},focus:!1,focusIconStyle:{size:10,fill:"#333",cursor:"pointer"},visible:!0,padding:{top:2,bottom:2,left:2,right:2}},autoPage:!0,pager:{space:12,handler:{style:{size:10},space:4}},hover:!0,select:!0,selectMode:"multiple",allowAllCanceled:!1,items:[{index:0,id:"",label:"",shape:{fill:"#6690F2",stroke:"#6690F2",symbolType:"circle"}}]},colorLegend:{title:{visible:!1,text:""},colors:[],layout:"horizontal",railWidth:200,railHeight:8,railStyle:{cornerRadius:5}},sizeLegend:{title:{visible:!1,text:""},trackStyle:{fill:"#ccc"},layout:"horizontal",align:"bottom",railWidth:200,railHeight:6,min:0,max:1,value:[0,1]},lineCrosshair:{start:{x:0,y:0},end:{x:0,y:0}},rectCrosshair:{start:{x:0,y:0},end:{x:0,y:0},rectStyle:{width:10,height:10}},sectorCrosshair:{center:{x:0,y:0},radius:100,startAngle:0,endAngle:Math.PI/6},circleCrosshair:{center:{x:0,y:0},radius:100,startAngle:0,endAngle:2*Math.PI},polygonCrosshair:{center:{x:0,y:0},radius:100,startAngle:0,endAngle:2*Math.PI,sides:6},slider:{layout:"horizontal",railWidth:200,railHeight:10,railStyle:{cornerRadius:5},range:{draggableTrack:!0},startText:{visible:!0,text:"",space:8},endText:{visible:!0,text:"",space:8},min:0,max:1,value:[0,1]},dataLabel:{size:{width:400,height:400},dataLabels:[]},pointLabel:{data:[{text:"",fill:"#606773",data:{}}],overlap:{avoidBaseMark:!1,clampForce:!1,size:{width:1e3,height:1e3}},smartInvert:!1},lineLabel:{type:"line",data:[{text:"",data:{}}],position:"start",overlap:{avoidBaseMark:!1,clampForce:!1,size:{width:1e3,height:1e3}},smartInvert:!1},areaLabel:{type:"area",data:[{text:"",data:{}}],position:"end",overlap:{avoidBaseMark:!1,clampForce:!1,size:{width:1e3,height:1e3}},smartInvert:!1},rectLabel:{type:"rect",data:[{text:"",fill:"#606773",data:{}}],position:"top",overlap:{size:{width:1e3,height:1e3},strategy:[{type:"position"}]},smartInvert:!1},symbolLabel:{type:"symbol",data:[{text:"",fill:"#606773",data:{}}],position:"top",overlap:{avoidBaseMark:!0,size:{width:1e3,height:1e3},strategy:[{type:"position"}]},smartInvert:!1},arcLabel:{type:"arc",data:[{text:"",fill:"#606773",data:{}}],width:800,height:600,position:"outside",zIndex:302},lineDataLabel:{type:"line-data",data:[{text:""}],position:"top",overlap:{avoidBaseMark:!1,clampForce:!1},smartInvert:!1},datazoom:{orient:"bottom",showDetail:"auto",brushSelect:!0,start:0,end:1,position:{x:0,y:0},size:{width:500,height:40},previewData:[]},continuousPlayer:{},discretePlayer:{},tooltip:{},title:{textStyle:{fill:"#21252c"},subtextStyle:{fill:"#606773"}},scrollbar:{width:12,height:12,padding:[2,2],railStyle:{fill:"rgba(0, 0, 0, .1)"}}},bA={symbol:{shape:"circle",size:8},text:{fontSize:14,fill:"#000000"}},_A=Object.assign({},kA);_A.axis=Object.assign({},_A.axis,{label:{style:{fill:"#bbbdc3"}},line:{style:{stroke:"#4b4f54"}},tick:{style:{stroke:"#4b4f54"}},subTick:{style:{stroke:"#4b4f54"}}}),_A.circleAxis=Object.assign({},_A.circleAxis,{label:{style:{fill:"#bbbdc3"}},line:{style:{stroke:"#4b4f54"}},tick:{style:{stroke:"#4b4f54"}},subTick:{style:{stroke:"#4b4f54"}}}),_A.grid=Object.assign({},_A.grid,{style:{stroke:"#404349"}}),_A.circleGrid=Object.assign({},_A.circleGrid,{style:{stroke:"#404349"}}),_A.rectLabel=Object.assign({},_A.rectLabel,{data:[{text:"",fill:"#888c93",data:{}}]}),_A.lineLabel=Object.assign({},_A.lineLabel,{data:[{text:"",fill:"#888c93",data:{}}]}),_A.symbolLabel=Object.assign({},_A.symbolLabel,{data:[{text:"",fill:"#888c93",data:{}}]}),_A.title=Object.assign({},_A.title,{textStyle:{fill:"#fdfdfd"},subtextStyle:{fill:"#888c93"}});var xA={name:"dark",padding:5,background:"#202226",palette:{default:["#5383F4","#7BCF8E","#FF9D2C","#FFDB26","#7568D9","#80D8FB","#1857A3","#CAB0E8","#FF8867","#B9E493","#2CB4A8","#B9E4E3"]},marks:bA,components:_A},wA={name:"default",padding:5,palette:{default:["#6690F2","#70D6A3","#B4E6E2","#63B5FC","#FF8F62","#FFDC83","#BCC5FD","#A29BFE","#63C4C7","#F68484"]},marks:bA,components:kA},SA=function(){function t(){o(this,t)}return u(t,null,[{key:"registerTheme",value:function(e,i){e&&t._themes.set(e,i)}},{key:"unregisterTheme",value:function(e){t._themes.delete(e)}},{key:"getTheme",value:function(e){return t._themes.get(e)}},{key:"getDefaultTheme",value:function(){return t.getTheme("default")}}])}();SA._themes=new Map,SA.registerTheme("default",wA),SA.registerTheme("dark",xA);var AA,TA,EA,CA,BA,MA,RA=function(t){function i(t,n,r,a){var s;return o(this,i),(s=e(this,i,[t,Jx.component,r]))._componentDatum=l({},vw,0),s.componentType=n,s.spec.type="component",s.spec.componentType=n,s.mode=a,s._updateComponentEncoders(),s}return c(i,t),u(i,[{key:"configureComponent",value:function(t){return this.spec.componentConfig=t,this.commit(),this}},{key:"addGraphicItem",value:function(t,e,i){var n=null!=i?i:zw.createGraphicComponent(this.componentType,t,{mode:this.mode,skipDefault:this.spec.skipTheme});return n&&(this.emit(sw.BEFORE_ADD_VRENDER_MARK,{graphicItem:n}),this.graphicParent.appendChild(n),this.emit(sw.AFTER_ADD_VRENDER_MARK,{graphicItem:n})),n}},{key:"join",value:function(t){return p(h(i.prototype),"join",this).call(this,t,vw)}},{key:"encodeState",value:function(t,e,n){return p(h(i.prototype),"encodeState",this).call(this,t,e,n),this._updateComponentEncoders(),this}},{key:"parseRenderContext",value:function(){return{large:!1}}},{key:"_prepareRejoin",value:function(){this._componentDatum[vw]+=1}},{key:"evaluateJoin",value:function(t){return this.spec.key=vw,t?(t[vw]=this._componentDatum[vw],this._componentDatum=t):this._componentDatum=l({},vw,this._componentDatum[vw]),p(h(i.prototype),"evaluateJoin",this).call(this,[this._componentDatum])}},{key:"_updateComponentEncoders",value:function(){this._encoders=this.spec.encode}},{key:"_getEncoders",value:function(){var t;return null!==(t=this._encoders)&&void 0!==t?t:{}}}])}(iA),PA=function(t){function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,i),(t=e(this,i))._observer=null,t._onResize=he((function(){var e=t._getContainerSize();e&&t.resize(e.width,e.height)}),100),t.delegateEvent=function(e,i){var n,r=null===(n=e.target)||void 0===n?void 0:n[hw],a=OS(f(t),e,r,0,pS);t.emit(i,a,r)},t.handleProgressiveFrame=function(){t._progressiveMarks.length&&t._progressiveMarks.forEach((function(t){t.isDoingProgressive()&&t.evaluateProgressive()})),t.doPreProgressive()},t._config=r,t._options=Object.assign({mode:"browser"},n),t.initialize(),t}return c(i,t),u(i,[{key:"getGrammarById",value:function(t){return this.grammars.getGrammar(t)}},{key:"getSignalById",value:function(t){return this.grammars.getSignal(t)}},{key:"getDataById",value:function(t){return this.grammars.getData(t)}},{key:"getScaleById",value:function(t){return this.grammars.getScale(t)}},{key:"getCoordinateById",value:function(t){return this.grammars.getCoordinate(t)}},{key:"getMarkById",value:function(t){return this.grammars.getMark(t)}},{key:"getCustomizedById",value:function(t){return this.grammars.getCustomized(t)}},{key:"getGrammarsByName",value:function(t){return this.grammars.filter((function(e){return e.name()===t}))}},{key:"getGrammarsByType",value:function(t){return this.grammars.filter((function(e){return e.grammarType===t}))}},{key:"getMarksByType",value:function(t){return this.grammars.getAllMarks().filter((function(e){return e.markType===t}))}},{key:"getMarksByName",value:function(t){return this.grammars.getAllMarks().filter((function(e){return e.name()===t}))}},{key:"getMarksBySelector",value:function(t){var e=this;if(!t)return null;var i=Xt(t),n=[];return i.forEach((function(t){if(Rw(t))n.push(t);else if("#"!==t[0]){var i="@"===t[0]?e.getMarksByName(t.slice(1)):Gw(t)?e.getMarksByType(t):null;i&&i.length&&i.forEach((function(t){n.push(t)}))}else{var r=e.getMarkById(t.slice(1));r&&n.push(r)}})),n}},{key:"updateSignal",value:function(t,e){bt(t)&&(t=this.getSignalById(t)),t.set(e),this.commit(t)}},{key:"signal",value:function(t,e){var i=new IS(this);return arguments.length>=1&&i.value(t),arguments.length>=2&&i.update(e),this.grammars.record(i),this._dataflow.add(i),i}},{key:"data",value:function(t){var e=new fS(this,t);return this.grammars.record(e),this._dataflow.add(e),e}},{key:"scale",value:function(t){var e=zw.createGrammar("scale",this,t);return e&&(this.grammars.record(e),this._dataflow.add(e)),e}},{key:"coordinate",value:function(t){var e=zw.createGrammar("coordinate",this,t);return e&&(this.grammars.record(e),this._dataflow.add(e)),e}},{key:"mark",value:function(t,e,i){var n,r=bt(e)?this.getMarkById(e):e;switch(t){case Jx.group:n=new nA(this,r);break;case Jx.glyph:n=new dA(this,null==i?void 0:i.glyphType,r);break;case Jx.component:n=zw.hasComponent(null==i?void 0:i.componentType)?zw.createComponent(null==i?void 0:i.componentType,this,r,null==i?void 0:i.mode):new RA(this,null==i?void 0:i.componentType,r,null==i?void 0:i.mode);break;case Jx.text:n=new mA(this,t,r);break;default:n=zw.hasMark(t)?zw.createMark(t,this,r):new iA(this,t,r)}return this.grammars.record(n),this._dataflow.add(n),n}},{key:"group",value:function(t){return this.mark(Jx.group,t)}},{key:"glyph",value:function(t,e){return this.mark(Jx.glyph,e,{glyphType:t})}},{key:"component",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"2d";return this.mark(Jx.component,e,{componentType:t,mode:i})}},{key:"axis",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2d";return this.mark(Jx.component,t,{componentType:$x.axis,mode:e})}},{key:"grid",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2d";return this.mark(Jx.component,t,{componentType:$x.grid,mode:e})}},{key:"legend",value:function(t){return this.mark(Jx.component,t,{componentType:$x.legend})}},{key:"slider",value:function(t){return this.mark(Jx.component,t,{componentType:$x.slider})}},{key:"label",value:function(t){return this.mark(Jx.component,t,{componentType:$x.label})}},{key:"datazoom",value:function(t){return this.mark(Jx.component,t,{componentType:$x.datazoom})}},{key:"player",value:function(t){return this.mark(Jx.component,t,{componentType:$x.player})}},{key:"title",value:function(t){return this.mark(Jx.component,t,{componentType:$x.title})}},{key:"scrollbar",value:function(t){return this.mark(Jx.component,t,{componentType:$x.scrollbar})}},{key:"customized",value:function(t,e){var i=zw.createGrammar(t,this,null==e?void 0:e.type);if(i)return i.parse(e),this.grammars.record(i),this._dataflow.add(i),i}},{key:"addGrammar",value:function(t){return this.grammars.find((function(e){return e.uid===t.uid}))||(this.grammars.record(t),this._dataflow.add(t),t.parse(t.getSpec()),this._needBuildLayoutTree=!0),this}},{key:"removeGrammar",value:function(t){var e=bt(t)?this.getGrammarById(t):t;return e&&this.grammars.find((function(t){return t.uid===e.uid}))?("mark"===e.grammarType&&e.prepareRelease(),this._cachedGrammars.record(e),this._dataflow.remove(e),this.grammars.unrecord(e),this._needBuildLayoutTree=!0,this):this}},{key:"removeAllGrammars",value:function(){var t=this;return this.grammars.traverse((function(e){"signal"===e.grammarType&&DS.includes(e.id())||"mark"===e.grammarType&&"root"===e.id()||t.removeGrammar(e)})),this}},{key:"removeAllGraphicItems",value:function(){return this.traverseMarkTree((function(t){t.graphicItem&&(Ww(t.graphicItem),t.elementMap.forEach((function(t){t.resetGraphicItem()})),t.graphicItem=null)})),this}},{key:"parseSpec",value:function(t){var e,i,n,r,a,o,s=this;if(this.emit(sw.BEFORE_PARSE_VIEW),this._spec=t,FS(t),t.theme?this.theme(t.theme):this.theme(SA.getDefaultTheme()),t.width&&this.width(t.width),t.height&&this.height(t.height),this.padding(null!==(i=null!==(e=t.padding)&&void 0!==e?e:this._options.padding)&&void 0!==i?i:this._theme.padding),!this.width()||!this.height()){var u=this._getContainerSize();u&&(this.updateSignal(yS,u.width),this.updateSignal(mS,u.height))}(null===(n=t.signals)||void 0===n?void 0:n.length)&&t.signals.forEach((function(t){s.signal().parse(t)})),(null===(r=t.data)||void 0===r?void 0:r.length)&&t.data.forEach((function(t){s.data(null).parse(t)})),(null===(a=t.coordinates)||void 0===a?void 0:a.length)&&t.coordinates.forEach((function(t){var e;null===(e=s.coordinate(t.type))||void 0===e||e.parse(t)})),(null===(o=t.scales)||void 0===o?void 0:o.length)&&t.scales.forEach((function(t){var e;null===(e=s.scale(t.type))||void 0===e||e.parse(t)}));var l=zw.getGrammars();return Object.keys(l).forEach((function(e){var i=l[e].specKey;t[i]&&t[i].length&&t[i].forEach((function(t){s.customized(e,t)}))})),t.marks&&t.marks.length&&t.marks.forEach((function(t){s.parseMarkSpec(t)})),t.events&&t.events.length&&t.events.forEach((function(t){s.event(t)})),t.interactions&&t.interactions.length&&t.interactions.forEach((function(t){s.interaction(t.type,t)})),!1===t.animation?this.animate.disable():this.animate.enable(),this.emit(sw.AFTER_PARSE_VIEW),this._needBuildLayoutTree=!0,this._layoutState=ow.before,this}},{key:"updateSpec",value:function(t){return this.removeAllInteractions(),this.removeAllGrammars(),this.parseSpec(t)}},{key:"parseBuiltIn",value:function(){var t=this;(function(t,e,i){var n,r,a,o,s;return[{id:yS,value:null!==(n=t[yS])&&void 0!==n?n:0},{id:mS,value:null!==(r=t[mS])&&void 0!==r?r:0},{id:_S,value:jS(null!==(o=null!==(a=t[_S])&&void 0!==a?a:e[_S])&&void 0!==o?o:null==i?void 0:i.padding)},{id:kS,update:{callback:function(t,e){var i=jS(e[_S]);return e[yS]-i.left-i.right},dependency:[yS,_S]}},{id:bS,update:{callback:function(t,e){var i=jS(e[_S]);return e[mS]-i.top-i.bottom},dependency:[mS,_S]}},{id:xS,update:{callback:function(t,e){var i=jS(e[_S]);return(t||new Le).setValue(i.left,i.top,i.left+e[kS],i.top+e[bS])},dependency:[kS,bS,_S]}},{id:wS,value:null!==(s=t[wS])&&void 0!==s?s:e[wS]}]})(this._options,this._config,this.getCurrentTheme()).forEach((function(e){var i=t.signal().parse(e);e.value&&i.set(e.value)})),this.parseMarkSpec({id:"root",type:"group",encode:{enter:{x:0,y:0},update:{width:{signal:"width"},height:{signal:"height"}}}}),this.rootMark=this.getMarkById("root")}},{key:"parseMarkSpec",value:function(t){var e,i=this,n=t.type===Jx.glyph?{glyphType:t.glyphType}:t.type===Jx.component?{componentType:t.componentType,mode:t.mode}:null;this.mark(t.type,t.group,n).parse(t),null===(e=t.marks)||void 0===e||e.forEach((function(t){i.parseMarkSpec(t)}))}},{key:"theme",value:function(t){var e,i,n,r,a,o;bt(t)?this._theme=null!==(e=SA.getTheme(t))&&void 0!==e?e:SA.getDefaultTheme():this._theme=t;var s=null!==(i=this._spec)&&void 0!==i?i:{},u=s.background,l=s.padding;return this._theme?(this.background(null!==(n=null!=u?u:this._options.background)&&void 0!==n?n:this._theme.background),this.padding(null!==(r=null!=l?l:this._options.padding)&&void 0!==r?r:this._theme.padding),null===(o=null===(a=this.renderer.stage())||void 0===a?void 0:a.setTheme)||void 0===o||o.call(a,Object.assign({},this._theme.marks))):(this.background(null!=u?u:this._options.background),this.padding(null!=l?l:this._options.padding)),this}},{key:"getCurrentTheme",value:function(){return this._theme}},{key:"setCurrentTheme",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.theme(t),this.grammars.getAllMarks().forEach((function(t){t.commit()})),e?(this.evaluate(),this.renderer.render(!0)):this._dataflow.evaluate(),this}},{key:"background",value:function(t){return arguments.length?(this._background=t,this.renderer.background(t),t):this._background}},{key:"width",value:function(t){var e=this.getSignalById(yS);return arguments.length?(this._options.width=t,this.updateSignal(e,t),t):e.output()}},{key:"height",value:function(t){var e=this.getSignalById(mS);return arguments.length?(this._options.height=t,this.updateSignal(e,t),t):e.output()}},{key:"viewWidth",value:function(t){var e=this.getSignalById(kS);if(arguments.length){var i=this.padding();return this.width(t+i.left+i.right),t}return e.output()}},{key:"viewHeight",value:function(t){var e=this.getSignalById(bS);if(arguments.length){var i=this.padding();return this.height(t+i.top+i.bottom),t}return e.output()}},{key:"padding",value:function(t){var e=this.getSignalById(_S);if(arguments.length){var i=jS(t);return this.updateSignal(e,i),i}return jS(e.output())}},{key:"autoFit",value:function(t){var e=this.getSignalById(wS);return arguments.length?(this.updateSignal(e,t),t):e.output()}},{key:"getViewBox",value:function(){var t=this.getSignalById(xS);return null==t?void 0:t.output()}},{key:"updateLayoutTag",value:function(){return this._layoutState=ow.before,this}},{key:"getLayoutState",value:function(){return this._layoutState}},{key:"buildLayoutTree",value:function(){var t={},e=[];this.traverseMarkTree((function(i){t[i.id()]=!0,i.group&&t[i.group.id()]||e.push(i),i.markType===Jx.group&&i.updateLayoutChildren()}),(function(t){return t.needLayout()})),this._layoutMarks=e}},{key:"doLayout",value:function(){var t,e=this._options.doLayout||hA;e&&(null===(t=this._layoutMarks)||void 0===t?void 0:t.length)&&(this.emit(sw.BEFORE_DO_LAYOUT),e(this._layoutMarks,this._options,this),this.emit(sw.AFTER_DO_LAYOUT))}},{key:"handleLayoutEnd",value:function(){this.emit(sw.BEFORE_MARK_LAYOUT_END),this._layoutMarks.forEach((function(t){BS(t,"layoutChildren",(function(t){t.handleLayoutEnd()}),(function(e){return e!==t}))})),this.emit(sw.AFTER_MARK_LAYOUT_END)}},{key:"handleRenderEnd",value:function(){this.emit(sw.BEFORE_MARK_RENDER_END),BS(this.rootMark,"children",(function(t){t.handleRenderEnd()})),this.emit(sw.AFTER_MARK_RENDER_END)}},{key:"commit",value:function(t){return this._dataflow.commit(t),this}},{key:"run",value:function(t){return this.evaluate(t),this}},{key:"doRender",value:function(t){this.emit(sw.BEFORE_DO_RENDER),this.renderer&&(this._progressiveMarks||this.animate.animate(),this.renderer.render(t),this.handleRenderEnd()),this.emit(sw.AFTER_DO_RENDER)}},{key:"evaluate",value:function(t){var e,i,n=this,r=function(t){var e,i,n,r,a,o=null!=t?t:{},s=o.reuse,u=void 0===s||s,l=o.morph,c=void 0===l||l,h=o.morphAll,d=void 0!==h&&h,f=o.animation,v=void 0===f?{}:f,p=o.enableExitAnimation,g=void 0===p||p;return{reuse:u,morph:c,morphAll:d,animation:{easing:null!==(e=v.easing)&&void 0!==e?e:Sw,delay:null!==(i=v.delay)&&void 0!==i?i:bw,duration:null!==(n=v.duration)&&void 0!==n?n:kw,oneByOne:null!==(r=v.oneByOne)&&void 0!==r?r:ww,splitPath:null!==(a=v.splitPath)&&void 0!==a?a:null},enableExitAnimation:g}}(t),a=this._cachedGrammars.size()>0;a&&(this.reuseCachedGrammars(r),this.detachCachedGrammar());var o=this._resizeRenderer(),s=this._dataflow.hasCommitted();return a||s||this._layoutState||o?(this.clearProgressive(),this._dataflow.evaluate(),this._needBuildLayoutTree&&(this.buildLayoutTree(),this._needBuildLayoutTree=!1),this._layoutState&&(this._layoutState=ow.layouting,this.doLayout(),this._dataflow.hasCommitted()&&(this._layoutState=ow.reevaluate,this._dataflow.evaluate()),this._layoutState=ow.after,(null===(e=this._layoutMarks)||void 0===e?void 0:e.length)&&this.handleLayoutEnd()),this._layoutState=null,this.findProgressiveMarks(),this._resizeRenderer(),null===(i=this._willMorphMarks)||void 0===i||i.forEach((function(t){n._morph.morph(t.prev,t.next,r)})),this._willMorphMarks=null,this.releaseCachedGrammars(r),this.doRender(!0),this.doPreProgressive(),this):this}},{key:"reuseCachedGrammars",value:function(t){var e=this;if(this._willMorphMarks||(this._willMorphMarks=[]),t.reuse){var i=function(t){t.next.reuse(t.prev),t.prev.detachAll(),t.prev.clear(),e._cachedGrammars.unrecord(t.prev)};this._morph.diffGrammar(this._cachedGrammars.getAllSignals(),this.grammars.getAllSignals().filter((function(t){return!DS.includes(t.id())}))).update.forEach(i),this._morph.diffGrammar(this._cachedGrammars.getAllData(),this.grammars.getAllData()).update.forEach(i),this._morph.diffGrammar(this._cachedGrammars.getAllScales(),this.grammars.getAllScales()).update.forEach(i),this._morph.diffGrammar(this._cachedGrammars.getAllCoordinates(),this.grammars.getAllCoordinates()).update.forEach(i)}this._morph.diffMark(this._cachedGrammars.getAllMarks(),this.grammars.getAllMarks().filter((function(t){return"root"!==t.id()})),t).update.forEach((function(i){var n=1===i.prev.length&&1===i.next.length&&i.prev[0].markType===i.next[0].markType,r=i.prev.every((function(t){return t.getMorphConfig().morph}))&&i.next.every((function(t){return t.getMorphConfig().morph}));n&&t.reuse?(i.next[0].reuse(i.prev[0]),i.prev[0].detachAll(),i.prev[0].clear(),e._cachedGrammars.unrecord(i.prev[0])):(t.morph&&r||t.morphAll)&&e._willMorphMarks.push({prev:i.prev,next:i.next})}))}},{key:"detachCachedGrammar",value:function(){this._cachedGrammars.traverse((function(t){var e,i;if(t.detachAll(),"mark"===t.grammarType){var n=t;null===(i=null===(e=n.group)||void 0===e?void 0:e.removeChild)||void 0===i||i.call(e,n)}}))}},{key:"releaseCachedGrammars",value:function(t){var e=this;this._cachedGrammars.traverse((function(t){"mark"!==t.grammarType&&t.release()}));var i=this._cachedGrammars.getAllMarkNodes();i.forEach((function(i){i.mark.animate.stop(),t.enableExitAnimation&&e.animate.animateAddition(i.mark)}));var n=function t(e){if(e.mark.view&&0===e.mark.animate.getAnimatorCount()&&(!e.children||0===e.children.length)){e.mark.release();var i=e.parent;i&&(e.parent.children=e.parent.children.filter((function(t){return t!==e})),e.parent=null,t(i))}};i.forEach((function(t){var e=t.mark;0===e.animate.getAnimatorCount()?n(t):e.addEventListener("animationEnd",(function(){0===e.animate.getAnimatorCount()&&n(t)}))})),this._cachedGrammars.clear()}},{key:"runAfter",value:function(t){var e=this;return this._dataflow.runAfter((function(){t.call(null,e)})),this}},{key:"runBefore",value:function(t){var e=this;return this._dataflow.runBefore((function(){t.call(null,e)})),this}},{key:"getImageBuffer",value:function(){var t,e;if("node"===this._options.mode){var i=null===(e=null===(t=this.renderer)||void 0===t?void 0:t.stage)||void 0===e?void 0:e.call(t);return i?(i.render(),i.window.getImageBuffer()):(this.logger.error(new ReferenceError("render is not defined")),null)}this.logger.error(new TypeError("getImageBuffer() now only support node environment."))}},{key:"traverseMarkTree",value:function(t,e,i){return BS(this.rootMark,"children",t,e,i),this}},{key:"_bindResizeEvent",value:function(){var t,e,i,n,r,a;if(this.autoFit()){var o=null===(r=null===(n=null===(i=null===(e=null===(t=this.renderer)||void 0===t?void 0:t.stage)||void 0===e?void 0:e.call(t))||void 0===i?void 0:i.window)||void 0===n?void 0:n.getContainer)||void 0===r?void 0:r.call(n);if(o){var s=window.ResizeObserver;this._observer=new s(this._onResize),null===(a=this._observer)||void 0===a||a.observe(o)}window.addEventListener("resize",this._onResize)}}},{key:"_unBindResizeEvent",value:function(){this.autoFit()&&(window.removeEventListener("resize",this._onResize),this._observer&&(this._observer.disconnect(),this._observer=null))}},{key:"_getContainerSize",value:function(){var t,e,i,n,r,a,o,s,u,l,c,h=null===(r=null===(n=null===(i=null===(e=null===(t=this.renderer)||void 0===t?void 0:t.stage)||void 0===e?void 0:e.call(t))||void 0===i?void 0:i.window)||void 0===n?void 0:n.getContainer)||void 0===r?void 0:r.call(n);if(h){var d=fi(h),f=d.width,v=d.height;return{width:null!==(s=null!==(o=null===(a=this._spec)||void 0===a?void 0:a.width)&&void 0!==o?o:this._options.width)&&void 0!==s?s:f,height:null!==(c=null!==(l=null===(u=this._spec)||void 0===u?void 0:u.height)&&void 0!==l?l:this._options.height)&&void 0!==c?c:v}}return null}},{key:"resize",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!1;return t!==this.width()&&(n=!0,this.updateSignal(yS,t)),e!==this.height()&&(n=!0,this.updateSignal(mS,e)),n&&(i?this.evaluate():this._dataflow.evaluate()),this}},{key:"_resizeRenderer",value:function(){var t=this.width(),e=this.height();return!!this.renderer.shouldResize(t,e)&&(this.renderer.resize(t,e),this.emit("resize",{},{width:t,height:e}),!0)}},{key:"bindEvents",value:function(t){var e=this;if(!this._eventConfig.disable){var i=t.type,n=t.filter,r=t.callback,a=t.throttle,o=t.debounce,s=t.consume,u=t.target,l=t.dependency,c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pS,i={},n=t.split(":");if(2===n.length){var r=g(n,2),a=r[0],o=r[1];"#"===a[0]?(i.markId=a.slice(1),i.source=e):"@"===a[0]?(i.markName=a.slice(1),i.source=e):Gw(a)?(i.markType=a,i.source=e):i.source=a===vS?vS:e,i.type=o}else 1===n.length&&(i.type=t,i.source=e);return i}(i);if(c){var h,d=c.source,f=c.type,v=vt((h=c).markId)?function(t){return t&&t.mark.id()===h.markId}:vt(h.markName)?function(t){return t&&t.mark.name()===h.markName}:vt(h.type)?function(t){return t&&t.mark.markType===h.type}:function(){return!0},p=(Array.isArray(u)&&u.length?u.map((function(t){return{signal:e.getSignalById(t.target),callback:t.callback}})):[{signal:bt(u)?this.getSignalById(u):null,callback:r}]).filter((function(t){return t.signal||t.callback})),y=Tw(l,this),m=NS((function(t,i){var r=d===pS&&function(t,e){var i=t.defaults,n=i.prevent,r=i.allow;return!1!==n&&!0!==r&&(!0===n||!1===r||(n?n[e]:!!r&&!r[e]))}(e._eventConfig,f)||s&&(void 0===t.cancelable||t.cancelable);d===vS&&(t=OS(0,t,i,0,vS));var a=!1;if((!n||n(t))&&(!v||v(i))&&p.length){var o=y.reduce((function(t,e){return t[e.id()]=e.output(),t}),{});p.forEach((function(i){i.callback&&i.signal?i.signal.set(i.callback(t,o))&&(e.commit(i.signal),a=!0):i.callback?i.callback(t,o):(e.commit(i.signal),a=!0)}))}r&&t.preventDefault(),s&&t.stopPropagation(),a&&e.run()}),{throttle:a,debounce:o});if(d===pS){if(function(t,e,i){var n=null==t?void 0:t[e];return!(!1===n||gt(n)&&!n[i])}(this._eventConfig,pS,f))return this.addEventListener(f,m,gS),function(){e.removeEventListener(f,m)}}else if(d===vS)return Zf.addEventListener(f,m),this._eventListeners.push({type:f,source:Zf,handler:m}),function(){Zf.removeEventListener(f,m);var t=e._eventListeners.findIndex((function(t){return t.type===f&&t.source===Zf&&t.handler===m}));t>=0&&e._eventListeners.splice(t,1)}}}}},{key:"event",value:function(t){var e=this;if("between"in t){var i,n=g(t.between,2),r=n[0],a=n[1],o="".concat(r.type,"-").concat(t.type,"-").concat(a.type);this.bindEvents(Object.assign({},r,{callback:function(){if(e._eventCache||(e._eventCache={}),!e._eventCache[o]){var n=e.bindEvents(t);e._eventCache[o]=n}i||(i=e.bindEvents(Object.assign({},a,{callback:function(){e._eventCache[o]&&(e._eventCache[o](),e._eventCache[o]=null)}})))}}))}else"merge"in t?t.merge.forEach((function(i){var n=Object.assign({},t);bt(i)?n.type=i:gt(i)&&Object.assign(n,i),n.debounce=50,e.bindEvents(n)})):this.bindEvents(t)}},{key:"interaction",value:function(t,e){var i=zw.createInteraction(t,this,e);return i&&(i.bind(),this._boundInteractions||(this._boundInteractions=[]),this._boundInteractions.push(i)),i}},{key:"removeInteraction",value:function(t,e){if(this._boundInteractions){var i=this._boundInteractions.filter((function(i){var n;return vt(e)?bt(t)?i.type===t:t?i===t:void 0:(null===(n=i.options)||void 0===n?void 0:n.id)===e}));i.length&&i.forEach((function(t){t.unbind()}))}return this}},{key:"removeAllInteractions",value:function(){return this._boundInteractions&&(this._boundInteractions.forEach((function(t){t.unbind()})),this._boundInteractions=null),this}},{key:"initEvent",value:function(){var t=this.renderer.stage();t&&t.on("*",this.delegateEvent)}},{key:"releaseStageEvent",value:function(){var t=this.renderer.stage();t&&t.off("*",this.delegateEvent)}},{key:"addEventListener",value:function(t,e,i){var n=e;return i&&!1===i.trap||((n=e).raw=e),i&&i.target&&(n.target=i.target),this.on(t,n),this}},{key:"removeEventListener",value:function(t,e){return e?this.off(t,e):this.off(t),this}},{key:"initializeRenderer",value:function(){var t=this._options.width,e=this._options.height;this.renderer=new MS(this),this.renderer.initialize(t,e,this._options,this._eventConfig).background(this._background)}},{key:"initialize",value:function(){var t,e,i=this;this.grammars=new pA((function(t){return t.id()}),(function(t,e){return i.logger.warn("Grammar id '".concat(t,"' has been occupied"),e)})),this._cachedGrammars=new gA((function(t){return t.id()})),this._options.logger&&te.setInstance(this._options.logger),this.logger=te.getInstance(null!==(t=this._options.logLevel)&&void 0!==t?t:0),this._dataflow=new CS,this.animate=new yA(this),this._morph=new vA,this._options.hooks&&(Object.keys(this._options.hooks).forEach((function(t){i.on(t,i._options.hooks[t])})),this.hooks=this._options.hooks),this.container=null,this.renderer=null,this._eventListeners=[],this._eventConfig=function(t){var e=Object.assign({defaults:{}},t),i=function(t,e){e.forEach((function(e){_t(t[e])&&(t[e]=t[e].reduce((function(t,e){return t[e]=!0,t}),{}))}))};return i(e.defaults,["prevent","allow"]),i(e,[pS,vS]),e}(this._options.eventConfig),this._theme=this._options.disableTheme?null:SA.getDefaultTheme(),this.parseBuiltIn(),(e=this._options).mode&&Zf.setEnv(e.mode,e.modeParams||{}),this.initializeRenderer(),this._eventConfig.disable||this.initEvent(),this._bindResizeEvent(),this._needBuildLayoutTree=!0,this._layoutState=ow.before,this.theme(this._theme)}},{key:"pauseProgressive",value:function(){return!1}},{key:"resumeProgressive",value:function(){return!1}},{key:"restartProgressive",value:function(){return!1}},{key:"findProgressiveMarks",value:function(){var t=[];return this.traverseMarkTree((function(e){t.push(e)}),(function(t){return t.markType!==Jx.group&&t.isProgressive()})),t.length?(this._progressiveMarks=t,this.renderer&&this.renderer.combineIncrementalLayers(),t):(this._progressiveMarks=null,null)}},{key:"doPreProgressive",value:function(){if(this._progressiveMarks&&this._progressiveMarks.some((function(t){return t.isDoingProgressive()}))){var t=Zf.getRequestAnimationFrame();this._progressiveRafId=t(this.handleProgressiveFrame)}}},{key:"clearProgressive",value:function(){this._progressiveRafId&&Zf.getCancelAnimationFrame()(this._progressiveRafId),this._progressiveMarks&&this._progressiveMarks.length&&(this._progressiveMarks.forEach((function(t){t.clearProgressive()})),this._progressiveMarks=null)}},{key:"release",value:function(){var t,e,i;this.removeAllInteractions(),this.releaseStageEvent(),this._unBindResizeEvent(),this.clearProgressive(),zw.unregisterRuntimeTransforms(),te.setInstance(null),this.animate.stop(),this.grammars.release(),this._cachedGrammars.release(),this._dataflow.release(),this._dataflow=null,null===(e=null===(t=this.renderer)||void 0===t?void 0:t.release)||void 0===e||e.call(t),this.renderer=null,this._boundInteractions=null,this.removeAllListeners(),null===(i=this._eventListeners)||void 0===i||i.forEach((function(t){t.source.removeEventListener(t.type,t.handler)})),this._eventListeners=null}}],[{key:"useRegisters",value:function(t){t.forEach((function(t){t()}))}}])}(ct),OA=function(t,e,i){return e.filter((function(e){return t.callback(e,i)}))},IA=function(t,e,i){var n=t.callback,r=t.as;if(!t.all)return e.forEach((function(t){var e=n(t,i);if(!vt(r)){if(vt(t))return;t[r]=e}return e})),e;var a=n(e,i);return vt(r)||vt(e)?a:(e[r]=a,e)},LA=function(t,e,i){var n,r,a,o,s=null!==(n=t.getFinalGraphicAttributes())&&void 0!==n?n:{};return{from:{opacity:0,fillOpacity:0,strokeOpacity:0},to:{opacity:null!==(r=s.opacity)&&void 0!==r?r:1,fillOpacity:null!==(a=s.fillOpacity)&&void 0!==a?a:1,strokeOpacity:null!==(o=s.strokeOpacity)&&void 0!==o?o:1}}},DA=function(t,e,i){var n,r,a;return{from:{opacity:null!==(n=t.getGraphicAttribute("opacity",!0))&&void 0!==n?n:1,fillOpacity:null!==(r=t.getGraphicAttribute("fillOpacity",!0))&&void 0!==r?r:1,strokeOpacity:null!==(a=t.getGraphicAttribute("strokeOpacity",!0))&&void 0!==a?a:1},to:{opacity:0,fillOpacity:0,strokeOpacity:0}}},jA=function(t,e,i){var n,r,a=null!=e?e:{},o=a.offset,s=void 0===o?0:o,u=a.orient,l=a.direction,c=a.point,h=0,d=0;"negative"===u&&(i.group?(h=null!==(n=i.groupWidth)&&void 0!==n?n:i.group.getBounds().width(),d=null!==(r=i.groupHeight)&&void 0!==r?r:i.group.getBounds().height(),i.groupWidth=h,i.groupHeight=d):(h=i.width,d=i.height)),h+=s,d+=s;var f=ft(c)?c.call(null,t.getDatum(),t,i):c,v=f&&At(f.x)?f.x:h,p=f&&At(f.y)?f.y:d,g=t.getFinalGraphicAttributes();switch(l){case"x":return{from:{x:v},to:{x:null==g?void 0:g.x}};case"y":return{from:{y:p},to:{y:null==g?void 0:g.y}};default:return{from:{x:v,y:p},to:{x:null==g?void 0:g.x,y:null==g?void 0:g.y}}}},FA=function(t,e,i){var n,r,a=null!=e?e:{},o=a.offset,s=void 0===o?0:o,u=a.orient,l=a.direction,c=a.point,h=i.group?i.group.getBounds():null,d=null!==(n=null==h?void 0:h.width())&&void 0!==n?n:i.width,f=null!==(r=null==h?void 0:h.height())&&void 0!==r?r:i.height,v=("negative"===u?d:0)+s,p=("negative"===u?f:0)+s,g=ft(c)?c.call(null,t.getDatum(),t,i):c,y=g&&At(g.x)?g.x:v,m=g&&At(g.y)?g.y:p;switch(l){case"x":return{from:{x:t.getGraphicAttribute("x",!0)},to:{x:y}};case"y":return{from:{y:t.getGraphicAttribute("y",!0)},to:{y:m}};default:return{from:{x:t.getGraphicAttribute("x",!0),y:t.getGraphicAttribute("y",!0)},to:{x:y,y:m}}}},NA=function(t,e,i){var n,r,a,o,s=t.getFinalGraphicAttributes();switch(null==e?void 0:e.direction){case"x":return{from:{scaleX:0},to:{scaleX:null!==(n=null==s?void 0:s.scaleX)&&void 0!==n?n:1}};case"y":return{from:{scaleY:0},to:{scaleY:null!==(r=null==s?void 0:s.scaleY)&&void 0!==r?r:1}};default:return{from:{scaleX:0,scaleY:0},to:{scaleX:null!==(a=null==s?void 0:s.scaleX)&&void 0!==a?a:1,scaleY:null!==(o=null==s?void 0:s.scaleY)&&void 0!==o?o:1}}}},zA=function(t,e,i){var n,r,a,o;switch(null==e?void 0:e.direction){case"x":return{from:{scaleX:null!==(n=t.getGraphicAttribute("scaleX",!0))&&void 0!==n?n:1},to:{scaleX:0}};case"y":return{from:{scaleY:null!==(r=t.getGraphicAttribute("scaleY",!0))&&void 0!==r?r:1},to:{scaleY:0}};default:return{from:{scaleX:null!==(a=t.getGraphicAttribute("scaleX",!0))&&void 0!==a?a:1,scaleY:null!==(o=t.getGraphicAttribute("scaleY",!0))&&void 0!==o?o:1},to:{scaleX:0,scaleY:0}}}},GA={symbol:["_mo_hide_","visible"]},UA=function(t,e,i){var n,r=Object.assign({},t.getPrevGraphicAttributes()),a=Object.assign({},t.getNextGraphicAttributes());e&&Xt(e.excludeChannels).forEach((function(t){delete r[t],delete a[t]})),t.mark&&t.mark.markType&&(n=GA[t.mark.markType])&&n.forEach((function(t){delete r[t],delete a[t]})),Object.keys(a).forEach((function(t){sx(t,r,a)&&(delete r[t],delete a[t])}));var o=t.getFinalGraphicAttributes();return Object.keys(r).forEach((function(t){vt(a[t])&&(vt(o[t])||Wt(r[t],o[t])?delete r[t]:a[t]=o[t])})),{from:r,to:a}},WA=function(t,e,i){var n,r,a=null!==(r=null===(n=t.getFinalGraphicAttributes())||void 0===n?void 0:n.angle)&&void 0!==r?r:0;return{from:{angle:re(a/(2*Math.PI),0)?Math.round(a/(2*Math.PI))*Math.PI*2:At(null==e?void 0:e.angle)?e.angle:"anticlockwise"===(null==e?void 0:e.orient)?Math.ceil(a/(2*Math.PI))*Math.PI*2:Math.floor(a/(2*Math.PI))*Math.PI*2},to:{angle:a}}},VA=function(t,e,i){var n,r=null!==(n=t.getGraphicAttribute("angle",!0))&&void 0!==n?n:0;return{from:{angle:r},to:{angle:re(r/(2*Math.PI),0)?Math.round(r/(2*Math.PI))*Math.PI*2:At(null==e?void 0:e.angle)?e.angle:"anticlockwise"===(null==e?void 0:e.orient)?Math.ceil(r/(2*Math.PI))*Math.PI*2:Math.floor(r/(2*Math.PI))*Math.PI*2}}},HA=function(){zw.registerAnimationType("fadeIn",LA)},XA=function(){zw.registerAnimationType("fadeOut",DA)},YA=function(){zw.registerAnimationType("moveIn",jA)},KA=function(){zw.registerAnimationType("moveOut",FA)},qA=function(){zw.registerAnimationType("scaleIn",NA)},ZA=function(){zw.registerAnimationType("scaleOut",zA)},JA=function(){zw.registerAnimationType("rotateIn",WA)},$A=function(){zw.registerAnimationType("rotateOut",VA)},QA=function(){zw.registerAnimationType("update",UA)},tT=["pointerdown","pointerup","pointerupoutside","pointertap","pointerover","pointermove","pointerenter","pointerleave","pointerout","mousedown","mouseup","mouseupoutside","rightdown","rightup","rightupoutside","click","dblclick","mousemove","mouseover","mouseout","mouseenter","mouseleave","wheel","touchstart","touchend","touchendoutside","touchmove","touchcancel","tap","dragstart","drag","dragenter","dragleave","dragover","dragend","drop","pan","panstart","panend","press","pressup","pressend","pinch","pinchstart","pinchend","swipe"];!function(t){t.initialized="initialized",t.rendered="rendered",t.renderFinished="renderFinished",t.animationFinished="animationFinished",t.regionSeriesDataFilterOver="regionSeriesDataFilterOver",t.afterInitData="afterInitData",t.afterInitEvent="afterInitEvent",t.afterInitMark="afterInitMark",t.rawDataUpdate="rawDataUpdate",t.viewDataFilterOver="viewDataFilterOver",t.viewDataUpdate="viewDataUpdate",t.viewDataStatisticsUpdate="viewDataStatisticsUpdate",t.markDeltaYUpdate="markDeltaYUpdate",t.viewDataLabelUpdate="viewDataLabelUpdate",t.scaleDomainUpdate="scaleDomainUpdate",t.scaleUpdate="scaleUpdate",t.dataZoomChange="dataZoomChange",t.drill="drill",t.layoutStart="layoutStart",t.layoutEnd="layoutEnd",t.layoutRectUpdate="layoutRectUpdate",t.playerPlay="playerPlay",t.playerPause="playerPause",t.playerEnd="playerEnd",t.playerChange="playerChange",t.playerForward="playerForward",t.playerBackward="playerBackward",t.scrollBarChange="scrollBarChange",t.brushStart="brushStart",t.brushChange="brushChange",t.brushEnd="brushEnd",t.brushClear="brushClear",t.legendSelectedDataChange="legendSelectedDataChange",t.legendFilter="legendFilter",t.legendItemClick="legendItemClick",t.legendItemHover="legendItemHover",t.legendItemUnHover="legendItemUnHover",t.tooltipShow="tooltipShow",t.tooltipHide="tooltipHide",t.tooltipRelease="tooltipRelease",t.afterResize="afterResize",t.afterRender="afterRender",t.afterLayout="afterLayout"}(AA||(AA={})),function(t){t.chart="chart",t.window="window",t.canvas="canvas"}(TA||(TA={})),function(t){t.vchart="vchart",t.chart="chart",t.model="model",t.mark="mark"}(EA||(EA={})),function(t){t[t.Default=0]="Default",t[t.Theme=1]="Theme",t[t.Chart=2]="Chart",t[t.Base_Series=3]="Base_Series",t[t.Series=4]="Series",t[t.Mark=5]="Mark",t[t.User_Chart=6]="User_Chart",t[t.User_Series=7]="User_Series",t[t.User_Mark=8]="User_Mark",t[t.Built_In=99]="Built_In"}(CA||(CA={})),function(t){t[t.Axis_Grid=50]="Axis_Grid",t[t.CrossHair_Grid=100]="CrossHair_Grid",t[t.Region=450]="Region",t[t.Mark=300]="Mark",t[t.Node=400]="Node",t[t.Axis=100]="Axis",t[t.MarkLine=500]="MarkLine",t[t.MarkArea=100]="MarkArea",t[t.MarkPoint=500]="MarkPoint",t[t.DataZoom=500]="DataZoom",t[t.ScrollBar=500]="ScrollBar",t[t.Player=500]="Player",t[t.Legend=500]="Legend",t[t.CrossHair=500]="CrossHair",t[t.Indicator=500]="Indicator",t[t.Title=500]="Title",t[t.Label=500]="Label",t[t.Brush=500]="Brush",t[t.CustomMark=500]="CustomMark",t[t.Interaction=700]="Interaction"}(BA||(BA={})),function(t){t[t.Indicator=10]="Indicator",t[t.Region=20]="Region",t[t.Axis=30]="Axis",t[t.DataZoom=40]="DataZoom",t[t.Player=40]="Player",t[t.ScrollBar=40]="ScrollBar",t[t.Legend=50]="Legend",t[t.Title=70]="Title",t[t.CustomMark=70]="CustomMark"}(MA||(MA={}));var eT,iT,nT=["linear","radial","conical"],rT={linear:{x0:0,y0:0,x1:1,y1:1},radial:{x0:0,y0:0,x1:1,y1:1,r0:0,r1:1},conical:{x:.5,y:.5,startAngle:0,endAngle:2*Math.PI}},aT={label:{name:"label",type:"text"}},oT=Object.assign(Object.assign({},aT),{bar:{name:"bar",type:"rect"},barBackground:{name:"barBackground",type:"rect"}}),sT=Object.assign(Object.assign({},aT),{bar3d:{name:"bar3d",type:"rect3d"}}),uT={point:{name:"point",type:"symbol"},line:{name:"line",type:"line"}},lT=Object.assign(Object.assign({},aT),uT),cT=Object.assign(Object.assign({},aT),{point:{name:"point",type:"symbol"}}),hT=Object.assign(Object.assign(Object.assign({},aT),uT),{area:{name:"area",type:"area"}}),dT=Object.assign(Object.assign(Object.assign({},aT),uT),{area:{name:"area",type:"area"}}),fT=Object.assign(Object.assign({},aT),{pie:{name:"pie",type:"arc"},labelLine:{name:"labelLine",type:"path"}}),vT=Object.assign(Object.assign({},aT),{pie3d:{name:"pie3d",type:"arc3d"},labelLine:{name:"labelLine",type:"path"}}),pT=Object.assign(Object.assign({},aT),{rose:{name:"rose",type:"arc"}}),gT=Object.assign(Object.assign({},aT),{area:{name:"area",type:"path"}}),yT=Object.assign(Object.assign({},aT),{group:{name:"group",type:"group"}}),mT=Object.assign(Object.assign({},yT),{track:{name:"track",type:"arc"},progress:{name:"progress",type:"arc"}}),kT=Object.assign(Object.assign({},aT),{group:{name:"group",type:"group"},link:{name:"link",type:"rule"},arrow:{name:"arrow",type:"symbol"}}),bT=Object.assign(Object.assign({},aT),{group:{name:"group",type:"group"},grid:{name:"grid",type:"rule"},gridBackground:{name:"gridBackground",type:"rect"},dot:{name:"dot",type:"symbol"},title:{name:"title",type:"text"},subTitle:{name:"subTitle",type:"text"},symbol:{name:"symbol",type:"symbol"}}),_T=Object.assign(Object.assign({},aT),{word:{name:"word",type:"text"},fillingWord:{name:"fillingWord",type:"text"}}),xT=Object.assign(Object.assign({},aT),{funnel:{name:"funnel",type:"polygon"},transform:{name:"transform",type:"polygon"},transformLabel:{name:"transformLabel",type:"text"},outerLabel:{name:"outerLabel",type:"text"},outerLabelLine:{name:"outerLabelLine",type:"rule"}}),wT=Object.assign(Object.assign({},aT),{funnel3d:{name:"funnel3d",type:"pyramid3d"},transform3d:{name:"transform3d",type:"pyramid3d"},transformLabel:{name:"transformLabel",type:"text"},outerLabel:{name:"outerLabel",type:"text"},outerLabelLine:{name:"outerLabelLine",type:"rule"}}),ST=Object.assign(Object.assign({},aT),{track:{name:"track",type:"rect"},progress:{name:"progress",type:"rect"},group:{name:"group",type:"group"}}),AT=Object.assign(Object.assign({},oT),{leaderLine:{name:"leaderLine",type:"rule"},stackLabel:{name:"stackLabel",type:"text"}}),TT=Object.assign(Object.assign({},aT),{boxPlot:{name:"boxPlot",type:"boxPlot"},outlier:{name:"outlier",type:"symbol"}}),ET=Object.assign(Object.assign({},aT),{nonLeaf:{name:"nonLeaf",type:"rect"},leaf:{name:"leaf",type:"rect"},nonLeafLabel:{name:"nonLeafLabel",type:"text"}}),CT=Object.assign(Object.assign({},aT),{node:{name:"node",type:"rect"},link:{name:"link",type:"linkPath"}}),BT=Object.assign(Object.assign({},yT),{segment:{name:"segment",type:"arc"},track:{name:"track",type:"arc"}}),MT=Object.assign(Object.assign({},aT),{pin:{name:"pin",type:"path"},pinBackground:{name:"pinBackground",type:"path"},pointer:{name:"pointer",type:["path","rect"]}}),RT=Object.assign(Object.assign({},aT),{sunburst:{name:"sunburst",type:"arc"}}),PT=Object.assign(Object.assign({},oT),{minLabel:{name:"minLabel",type:"text"},maxLabel:{name:"maxLabel",type:"text"}}),OT=Object.assign(Object.assign({},sT),{minLabel:{name:"minLabel",type:"text"},maxLabel:{name:"maxLabel",type:"text"}}),IT=Object.assign(Object.assign({},aT),{circlePacking:{name:"circlePacking",type:"arc"}}),LT=Object.assign(Object.assign({},aT),{cell:{name:"cell",type:"cell"},cellBackground:{name:"cellBackground",type:"cell"}}),DT=Object.assign(Object.assign({},aT),{nodePoint:{name:"nodePoint",type:"symbol"},ripplePoint:{name:"ripplePoint",type:"ripple"},centerPoint:{name:"centerPoint",type:"symbol"},centerLabel:{name:"centerLabel",type:"text"}}),jT=Object.assign({},hT),FT=Object.assign(Object.assign({},aT),{liquid:{name:"liquid",type:"liquid"},liquidBackground:{name:"liquidBackground",type:"group"},liquidOutline:{name:"liquidOutline",type:"symbol"}}),NT=Object.assign(Object.assign({},aT),{circle:{name:"circle",type:"arc"},overlap:{name:"overlap",type:"path"},overlapLabel:{name:"overlapLabel",type:"text"}});!function(t){t.area_horizontal="area_horizontal",t.area_vertical="area_vertical",t.area_stack="area_stack",t.line_horizontal="line_horizontal",t.line_vertical="line_vertical",t.line_stack="line_stack",t.bar_horizontal="bar_horizontal",t.bar_vertical="bar_vertical",t.bar_stack="bar_stack",t.bar3d_horizontal="bar3d_horizontal",t.bar3d_vertical="bar3d_vertical",t.bar3d_stack="bar3d_stack",t.rangeColumn_horizontal="rangeColumn_horizontal",t.rangeColumn_vertical="rangeColumn_vertical",t.rangeColumn3d_horizontal="rangeColumn3d_horizontal",t.rangeColumn3d_vertical="rangeColumn3d_vertical",t.rangeArea_horizontal="rangeArea_horizontal",t.rangeArea_vertical="rangeArea_vertical",t.linearProgress_horizontal="linearProgress_horizontal",t.linearProgress_vertical="linearProgress_vertical",t.linearProgress_stack="linearProgress_stack",t.boxPlot_horizontal="boxPlot_horizontal",t.boxPlot_vertical="boxPlot_vertical",t.sankey_horizontal="sankey_horizontal",t.sankey_vertical="sankey_vertical",t.waterfall_horizontal="waterfall_horizontal",t.waterfall_vertical="waterfall_vertical",t.circularProgress_stack="circularProgress_stack",t.radar_stack="radar_stack",t.rose_stack="rose_stack"}(iT||(iT={}));var zT=(l(l(l(l(l(l(l(l(l(l(eT={},Xx.bar,oT),Xx.bar3d,sT),Xx.line,lT),Xx.scatter,cT),Xx.area,hT),Xx.radar,dT),Xx.pie,fT),Xx.pie3d,vT),Xx.rose,pT),Xx.geo,aT),l(l(l(l(l(l(l(l(l(l(eT,Xx.map,gT),Xx.circularProgress,mT),Xx.link,kT),Xx.dot,bT),Xx.wordCloud,_T),Xx.wordCloud3d,_T),Xx.funnel,xT),Xx.funnel3d,wT),Xx.linearProgress,ST),Xx.waterfall,AT),l(l(l(l(l(l(l(l(l(l(eT,Xx.boxPlot,TT),Xx.treemap,ET),Xx.sankey,CT),Xx.gauge,BT),Xx.gaugePointer,MT),Xx.sunburst,RT),Xx.rangeColumn,PT),Xx.rangeColumn3d,OT),Xx.circlePacking,IT),Xx.heatmap,LT),l(l(l(l(eT,Xx.correlation,DT),Xx.rangeArea,jT),Xx.liquid,FT),Xx.venn,NT));var GT={primaryFontColor:"titleFontColor",tertiaryFontColor:"labelFontColor",axisLabelFontColor:"axisFontColor",axisMarkerFontColor:"labelReverseFontColor",dataZoomHandleStrokeColor:"dataZoomHandlerStrokeColor",sliderHandleColor:"dataZoomHandlerFillColor",sliderRailColor:"dataZoomBackgroundColor",sliderTrackColor:"dataZoomSelectedColor",playerControllerColor:"dataZoomSelectedColor",popupBackgroundColor:"tooltipBackgroundColor",hoverBackgroundColor:"axisGridColor"},UT={titleFontColor:"primaryFontColor",labelFontColor:"tertiaryFontColor",axisFontColor:"axisLabelFontColor",labelReverseFontColor:"axisMarkerFontColor",dataZoomHandlerStrokeColor:"dataZoomHandleStrokeColor",dataZoomHandlerFillColor:"sliderHandleColor",dataZoomBackgroundColor:"sliderRailColor",dataZoomSelectedColor:"sliderTrackColor",tooltipBackgroundColor:"popupBackgroundColor"};function WT(t,e){var i;if(!t)return[];var n=KT(t,e);if(!n||_t(n))return null!==(i=n)&&void 0!==i?i:[];if(gt(n)){var r=n.dataScheme;return r?YT(r)?r.map((function(i){return Object.assign(Object.assign({},i),{scheme:i.scheme.map((function(i){return XT(i)?HT(t,i,e):i})).filter(pt)})})):r.map((function(i){return XT(i)?HT(t,i,e):i})).filter(pt):[]}return[]}function VT(t,e){var i,n;return YT(t)?null!==(n=null===(i=t.find((function(t){return pt(t.isAvailable)?ft(t.isAvailable)?t.isAvailable(e):!!t.isAvailable:!pt(t.maxDomainLength)||(null==e?void 0:e.length)<=t.maxDomainLength})))||void 0===i?void 0:i.scheme)&&void 0!==n?n:t[t.length-1].scheme:t}function HT(t,e,i){var n,r=KT(t,i);if(r){var a,o=r.palette;if(gt(o)&&(a=null!==(n=function(t,e){var i=GT[e];if(i&&t[i])return t[i];if(t[e])return t[e];var n=UT[e];return n?t[n]:void 0}(o,e.key))&&void 0!==n?n:e.default),a){if(vt(e.a)&&vt(e.l)||!bt(a))return a;var s=new oi(a);if(pt(e.l)){var u=s.color,l=We(u.r,u.g,u.b),c=Ue(l.h,l.s,e.l),h=new oi("rgb(".concat(c.r,", ").concat(c.g,", ").concat(c.b,")"));h.setOpacity(s.color.opacity),s=h}return pt(e.a)&&s.setOpacity(e.a),s.toRGBA()}}}function XT(t){return t&&"palette"===t.type&&!!t.key}function YT(t){return!(!_t(t)||0===t.length)&&t.every((function(t){return pt(t.scheme)}))}function KT(t,e){var i,n,r,a=(null!=e?e:{}).type;if(!e||vt(a))r=null==t?void 0:t.default;else{var o=function(t){var e,i;return t.type===Xx.sankey?null!==(e=t.direction)&&void 0!==e?e:"horizontal":null!==(i=t.direction)&&void 0!==i?i:"vertical"}(e);r=null!==(n=null!==(i=null==t?void 0:t["".concat(a,"_").concat(o)])&&void 0!==i?i:null==t?void 0:t[a])&&void 0!==n?n:null==t?void 0:t.default}return r}var qT=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"range",value:function(t){return t?(this._range=t,this._resetRange(),this):p(h(i.prototype),"range",this).call(this)}},{key:"domain",value:function(t){return t?(p(h(i.prototype),"domain",this).call(this,t),this._resetRange(),this):p(h(i.prototype),"domain",this).call(this)}},{key:"_resetRange",value:function(){if(YT(this._range)){var t=VT(this._range,this._domain);p(h(i.prototype),"range",this).call(this,t)}else p(h(i.prototype),"range",this).call(this,this._range)}}])}(wx),ZT={linear:Gx,band:Ax,point:Ux,ordinal:wx,threshold:Wx,colorOrdinal:qT};function JT(t,e){if("scale"in t&&t.scale)return bt(t.scale)&&(null==e?void 0:e.globalScale)?e.globalScale.registerMarkAttributeScale(t,e.seriesId):t.scale;var i,n,r=(i=t.type,(n=ZT[i])?new n:null);return r&&function(t,e){t&&e&&(e.domain&&t.domain(e.domain),e.range&&t.range(e.range),e.specified&&t.specified&&t.specified(e.specified))}(r,t),r}function $T(t){return!!bt(t)&&!!t.endsWith("%")&&function(t){return null!=t&&""!==t&&(!!St(t)||+t==+t)}(t.substring(0,t.length-1))}function QT(t,e,i){var n,r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return St(t)?t:$T(t)?Number(t.substring(0,t.length-1))*e/100:ft(t)?t(i):gt(t)?e*(null!==(n=t.percent)&&void 0!==n?n:0)+(null!==(r=t.offset)&&void 0!==r?r:0):a}function tE(t){var e,i={};return _t(t)?(vt(t[0])||(i.top=i.left=i.bottom=i.right=t[0]),vt(t[1])||(i.left=i.right=t[1]),vt(t[2])||(i.bottom=t[2]),vt(t[3])||(i.left=t[3]),i):St(t)||$T(t)||ft(t)||gt(e=t)&&("percent"in e||"offset"in e)?(i.top=i.left=i.bottom=i.right=t,i):gt(t)?i=Object.assign({},t):i}function eE(t,e,i){return i?{x:t.x+e.x,y:t.y+e.y}:t}var iE=[{maxDomainLength:10,scheme:["#1664FF","#1AC6FF","#FF8A00","#3CC780","#7442D4","#FFC400","#304D77","#B48DEB","#009488","#FF7DDA"]},{scheme:["#1664FF","#B2CFFF","#1AC6FF","#94EFFF","#FF8A00","#FFCE7A","#3CC780","#B9EDCD","#7442D4","#DDC5FA","#FFC400","#FAE878","#304D77","#8B959E","#B48DEB","#EFE3FF","#009488","#59BAA8","#FF7DDA","#FFCFEE"]}],nE={default:{dataScheme:iE,palette:{backgroundColor:"#ffffff",borderColor:"#e3e5e8",shadowColor:"rgba(33,37,44,0.1)",hoverBackgroundColor:"#f1f2f5",sliderRailColor:"#f1f3f4",sliderHandleColor:"#ffffff",sliderTrackColor:"#0040ff",popupBackgroundColor:"#ffffff",primaryFontColor:"#21252c",secondaryFontColor:"#606773",tertiaryFontColor:"#89909d",axisLabelFontColor:"#89909d",disableFontColor:"#bcc1cb",axisMarkerFontColor:"#ffffff",axisGridColor:"#f1f2f5",axisDomainColor:"#d9dde4",dataZoomHandleStrokeColor:"#aeb5be",dataZoomChartColor:"#c9ced8",playerControllerColor:"#0040ff",scrollBarSliderColor:"rgba(0,0,0,0.3)",axisMarkerBackgroundColor:"#21252c",markLabelBackgroundColor:"#f1f2f5",markLineStrokeColor:"#606773",dangerColor:"#e33232",warningColor:"#ffc528",successColor:"#07a35a",infoColor:"#3073f2",discreteLegendPagerTextColor:"rgb(51, 51, 51)",discreteLegendPagerHandlerColor:"rgb(47, 69, 84)",discreteLegendPagerHandlerDisableColor:"rgb(170, 170, 170)"}}},rE="M1 0 C1 0.55228 0.55228 1 0 1 C-0.552285 1 -1 0.55228 -1 0 C-1 -0.552285 -0.552285 -1 0 -1 C0.55228 -1 1 -0.552285 1 0Z",aE={scatter:{point:{style:{size:8,symbolType:"circle",lineWidth:0,fillOpacity:.8}},label:{visible:!1,offset:5,position:"top",style:{lineWidth:2,stroke:{type:"palette",key:"backgroundColor"}}}},line:{label:{visible:!1,position:"top",offset:5,style:{lineWidth:2,stroke:{type:"palette",key:"backgroundColor"}}},point:{style:{symbolType:"circle"}}},area:{label:{visible:!1,offset:5,position:"top",style:{stroke:{type:"palette",key:"backgroundColor"},lineWidth:2}},point:{style:{symbolType:"circle"}},seriesMark:"area"},bar:{label:{visible:!1,position:"outside",offset:5,style:{lineWidth:2,stroke:{type:"palette",key:"backgroundColor"}}}},bar3d:{bar3d:{style:{length:3}},label:{visible:!1,style:{offset:12,position:"outside"}}},pie:{outerRadius:.6,pie:{style:{fillOpacity:1}},label:{visible:!1,position:"outside",style:{fontWeight:"normal",stroke:{type:"palette",key:"backgroundColor"},fillOpacity:1}},innerLabel:{style:{lineWidth:2}}},pie3d:{outerRadius:.6,pie3d:{style:{height:10,fillOpacity:1}},label:{visible:!1,position:"outside"}},map:{defaultFillColor:"#f3f3f3",area:{style:{lineWidth:.5,strokeOpacity:1,stroke:"black",fillOpacity:1}},label:{interactive:!1,style:{fontSize:{type:"token",key:"l6FontSize"},lineHeight:{type:"token",key:"l6LineHeight"},textBaseline:"middle",fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"},stroke:{type:"palette",key:"backgroundColor"}}}},radar:{label:{visible:!1,offset:5,style:{lineWidth:2,stroke:{type:"palette",key:"backgroundColor"}}},point:{style:{symbolType:"circle"}}},dot:{dot:{style:{size:10,fillOpacity:1}},symbol:{style:{size:10}},title:{style:{textAlign:"left",textBaseline:"middle",fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"}}},subTitle:{style:{textAlign:"left",textBaseline:"top",fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"}}}},link:{arrow:{style:{size:10}}},wordCloud:{word:{padding:1,style:{textAlign:"center",textBaseline:"alphabetic"}}},wordCloud3d:{word:{padding:1,style:{textAlign:"center",textBaseline:"alphabetic"}}},funnel:{transform:{style:{fill:{type:"palette",key:"axisGridColor"}}},label:{style:{fill:"white",textBaseline:"middle",lineWidth:2}},outerLabel:{style:{fontSize:{type:"token",key:"l4FontSize"},fill:{type:"palette",key:"secondaryFontColor"}},line:{style:{stroke:{type:"palette",key:"axisDomainColor"}}}},transformLabel:{style:{fontSize:{type:"token",key:"l4FontSize"},fill:{type:"palette",key:"secondaryFontColor"},textBaseline:"middle"}}},funnel3d:{transform3d:{style:{fill:"#f5f5f5"}},label:{style:{fill:"white",textBaseline:"middle",lineWidth:2}},outerLabel:{style:{fontSize:{type:"token",key:"l4FontSize"},fill:"#707070"},line:{style:{stroke:{type:"palette",key:"axisDomainColor"}}}},transformLabel:{style:{fontSize:{type:"token",key:"l4FontSize"},fill:"#707070",textBaseline:"middle"}}},linearProgress:{bandWidth:30,progress:{style:{fillOpacity:1}},track:{style:{fill:"#E7EBED",fillOpacity:1}}},circularProgress:{outerRadius:.8,innerRadius:.6,progress:{style:{fillOpacity:1}},track:{style:{fillOpacity:.2}},tickMask:{visible:!1,angle:3,offsetAngle:0,forceAlign:!0}},waterfall:{seriesFieldName:{total:"total",increase:"increase",decrease:"decrease"},leaderLine:{style:{stroke:"black",lineWidth:1,lineDash:[4,4]}},stackLabel:{visible:!0,offset:12,position:"withChange",style:{fill:"black",fontSize:{type:"token",key:"l4FontSize"}}},label:{visible:!1,offset:12,position:"inside",style:{lineWidth:2}}},gauge:{outerRadius:.8,innerRadius:.6,padAngle:1.146,segment:{style:{fillOpacity:1}},tickMask:{visible:!1,angle:3,offsetAngle:0,forceAlign:!0}},gaugePointer:{pointer:{type:"path",width:.4,height:.4,style:{path:"M-0.020059 -0.978425 C-0.018029 -0.9888053 -0.013378 -1 0 -1 C0.01342 -1 0.01812 -0.989146 0.0201 -0.978425 C0.02161 -0.9702819 0.0692 -0.459505 0.09486 -0.184807 C0.10298 -0.097849 0.1089 -0.034548 0.11047 -0.018339 C0.11698 0.04908 0.07373 0.11111 0.00002 0.11111 C-0.07369 0.11111 -0.117184 0.04991 -0.110423 -0.018339 C-0.103662 -0.086591 -0.022089 -0.9680447 -0.020059 -0.978425Z"}},pin:{width:.025,height:.025,style:{path:rE,fill:"#888"}},pinBackground:{width:.06,height:.06,style:{path:rE,fill:"#ddd"}}},treemap:{gapWidth:1,nodePadding:[5],nonLeaf:{visible:!1,style:{fillOpacity:.5}},label:{style:{fill:"white",textBaseline:"middle",textAlign:"center",fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"}}},nonLeafLabel:{padding:24,style:{fill:"black",stroke:{type:"palette",key:"backgroundColor"},lineWidth:2,fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},textBaseline:"middle",textAlign:"center"}}},sunburst:{innerRadius:0,outerRadius:1,startAngle:-90,endAngle:270,gap:0,labelLayout:{align:"center",offset:0,rotate:"radial"},sunburst:{style:{stroke:{type:"palette",key:"backgroundColor"},fillOpacity:1,cursor:"pointer"}},label:{visible:!0,style:{cursor:"pointer",fill:{type:"palette",key:"primaryFontColor"},fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"}}}},rangeColumn:{label:{visible:!1,offset:5,position:"inside",style:{lineWidth:2,fill:{type:"palette",key:"axisMarkerFontColor"}},minLabel:{position:"end"},maxLabel:{position:"start"}}},circlePacking:{layoutPadding:5,circlePacking:{visible:!0,style:{cursor:"pointer",stroke:{type:"palette",key:"backgroundColor"}}},label:{visible:!0,style:{cursor:"pointer",fill:"black",stroke:{type:"palette",key:"backgroundColor"},lineWidth:2,fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"}}}},heatmap:{cell:{style:{shape:"square",fillOpacity:1}},cellBackground:{visible:!1}},sankey:{link:{style:{fillOpacity:.15,round:!0}}},rose:{rose:{style:{fillOpacity:1}},label:{style:{lineWidth:2,stroke:{type:"palette",key:"backgroundColor"},textAlign:"center",textBaseline:"middle"}}},boxPlot:{boxPlot:{style:{lineWidth:1}},label:{style:{lineWidth:2}}},correlation:{centerLabel:{visible:!0,position:"center",style:{fill:"#fff",text:""}},label:{visible:!0,position:"bottom",style:{fill:"#000"}}},liquid:{outlinePadding:10,liquidBackground:{style:{lineWidth:0,fillOpacity:.2}},liquidOutline:{style:{lineWidth:2}}},venn:{circle:{style:{opacity:.8},state:{hover:{opacity:1}}},overlap:{style:{opacity:.8},state:{hover:{opacity:1,stroke:"white",lineWidth:2}}},label:{visible:!0,style:{fill:"white",textBaseline:"middle",textAlign:"center",fontSize:{type:"token",key:"l4FontSize"},lineHeight:{type:"token",key:"l4LineHeight"}}},overlapLabel:{visible:!0,style:{textBaseline:"middle",textAlign:"center",fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"}}}}},oE={label:{space:8},title:{space:8},maxHeight:"30%",unit:{visible:!1,style:{fontSize:{type:"token",key:"l5FontSize"},fill:{type:"palette",key:"axisLabelFontColor"},fontWeight:"normal",fillOpacity:1}}},sE=Object.assign(Object.assign({},oE),{label:{space:0}}),uE="M-0.5-2.4h0.9c0.4,0,0.7,0.3,0.7,0.7v3.3c0,0.4-0.3,0.7-0.7,0.7h-0.9c-0.4,0-0.7-0.3-0.7-0.7v-3.3\nC-1.2-2-0.9-2.4-0.5-2.4z M-0.4-1.4L-0.4-1.4c0,0,0,0.1,0,0.1v2.6c0,0.1,0,0.1,0,0.1l0,0c0,0,0-0.1,0-0.1v-2.6\nC-0.4-1.4-0.4-1.4-0.4-1.4z M0.3-1.4L0.3-1.4c0,0,0,0.1,0,0.1v2.6c0,0.1,0,0.1,0,0.1l0,0c0,0,0-0.1,0-0.1v-2.6\nC0.3-1.4,0.3-1.4,0.3-1.4z;",lE={padding:[12,0],showDetail:"auto",brushSelect:!1,middleHandler:{visible:!1,background:{size:6,style:{stroke:{type:"palette",key:"dataZoomHandleStrokeColor"},cornerRadius:2}},icon:{style:{size:4,fill:{type:"palette",key:"sliderHandleColor"},stroke:{type:"palette",key:"dataZoomHandleStrokeColor"},symbolType:"M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",lineWidth:.5}}},background:{size:20,style:{fill:{type:"palette",key:"sliderRailColor"},lineWidth:0}},selectedBackground:{style:{fill:{type:"palette",key:"sliderTrackColor"},fillOpacity:.1,outerBorder:{stroke:{type:"palette",key:"sliderTrackColor"},strokeOpacity:.2,distance:-.5,lineWidth:1}}},selectedBackgroundChart:{area:{style:{visible:!1,stroke:!1,fill:{type:"palette",key:"dataZoomChartColor"}}},line:{style:{visible:!1,stroke:{type:"palette",key:"dataZoomChartColor"},lineWidth:1}}},startHandler:{style:{symbolType:uE,fill:{type:"palette",key:"sliderHandleColor"},scaleX:1.2,scaleY:1.2,stroke:{type:"palette",key:"dataZoomHandleStrokeColor"},lineWidth:1}},endHandler:{style:{symbolType:uE,fill:{type:"palette",key:"sliderHandleColor"},scaleX:1.2,scaleY:1.2,stroke:{type:"palette",key:"dataZoomHandleStrokeColor"},lineWidth:1}},startText:{padding:8,style:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"}}},endText:{padding:8,style:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"}}},backgroundChart:{area:{style:{stroke:!1,fill:{type:"palette",key:"dataZoomChartColor"}}},line:{style:{stroke:{type:"palette",key:"dataZoomChartColor"},lineWidth:1}}}},cE={orient:"right",position:"middle",padding:[16,24],title:{visible:!1,padding:0,textStyle:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fontWeight:"normal",fill:{type:"palette",key:"primaryFontColor"}},space:12},handler:{visible:!0},startText:{style:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fontWeight:"normal",fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"}},space:6},endText:{style:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fontWeight:"normal",fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"}},space:6},handlerText:{style:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fontWeight:"normal",fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"}},space:6}},hE={style:{symbolType:"circle",lineWidth:0,outerBorder:{lineWidth:2,distance:.8,stroke:"#ffffff"},shadowBlur:12,shadowOffsetX:0,shadowOffsetY:4,shadowColor:{type:"palette",key:"shadowColor"}}},dE={horizontal:Object.assign(Object.assign({},cE),{rail:{width:200,height:8,style:{fill:{type:"palette",key:"sliderRailColor"}}},handler:hE}),vertical:Object.assign(Object.assign({},cE),{rail:{width:8,height:200,style:{fill:{type:"palette",key:"sliderRailColor"}}},handler:hE})},fE={style:{symbolType:"circle",lineWidth:0,outerBorder:{lineWidth:2,distance:.8,stroke:{type:"palette",key:"sliderTrackColor"}},fill:{type:"palette",key:"sliderHandleColor"}}},vE={horizontal:Object.assign(Object.assign({},cE),{sizeBackground:{fill:{type:"palette",key:"dataZoomChartColor"}},track:{style:{fill:{type:"palette",key:"sliderTrackColor",a:.8}}},rail:{width:200,height:4,style:{fill:{type:"palette",key:"sliderRailColor"}}},handler:fE}),vertical:Object.assign(Object.assign({},cE),{sizeBackground:{fill:{type:"palette",key:"dataZoomChartColor"}},track:{style:{fill:{type:"palette",key:"sliderTrackColor",a:.8}}},rail:{width:4,height:200,style:{fill:{type:"palette",key:"sliderRailColor"}}},handler:fE})},pE={area:{style:{fill:{type:"palette",key:"axisDomainColor",a:.25}}},label:{style:{fontSize:{type:"token",key:"l4FontSize"},fontWeight:"normal",fontStyle:"normal",fill:{type:"palette",key:"primaryFontColor"}},labelBackground:{padding:{top:2,bottom:2,right:4,left:4},style:{cornerRadius:3,fill:{type:"palette",key:"markLabelBackgroundColor"}}}}},gE={line:{style:{lineDash:[3,3],stroke:{type:"palette",key:"markLineStrokeColor"}}},startSymbol:{visible:!1,symbolType:"triangle",size:10,style:{fill:{type:"palette",key:"markLineStrokeColor"},stroke:null,lineWidth:0}},endSymbol:{visible:!0,symbolType:"triangle",size:10,style:{fill:{type:"palette",key:"markLineStrokeColor"},stroke:null,lineWidth:0}},label:{refY:5,style:{fontSize:{type:"token",key:"l4FontSize"},fontWeight:"normal",fontStyle:"normal",fill:{type:"palette",key:"primaryFontColor"}},labelBackground:{padding:{top:2,bottom:2,right:4,left:4},style:{cornerRadius:3,fill:{type:"palette",key:"markLabelBackgroundColor"}}}}},yE={itemLine:{decorativeLine:{visible:!1},startSymbol:{size:5,visible:!0,style:{fill:{type:"palette",key:"markLineStrokeColor"},stroke:null,lineWidth:0}},endSymbol:{style:{fill:{type:"palette",key:"markLineStrokeColor"},stroke:null,lineWidth:0}},line:{style:{stroke:{type:"palette",key:"markLineStrokeColor"}}}},itemContent:{offsetY:-50}};var mE={fontFamily:"PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",fontSize:14,l1FontSize:32,l1LineHeight:"150%",l2FontSize:20,l2LineHeight:"140%",l3FontSize:16,l3LineHeight:"150%",l4FontSize:14,l4LineHeight:"150%",l5FontSize:12,l5LineHeight:"130%",l6FontSize:10,l6LineHeight:"120%"},kE={name:"light",background:{type:"palette",key:"backgroundColor"},padding:20,fontFamily:{type:"token",key:"fontFamily"},colorScheme:nE,token:mE,mark:{text:{style:{fontSize:{type:"token",key:"l4FontSize"},fontWeight:"normal",fillOpacity:1}}},markByName:{label:{style:{fontSize:{type:"token",key:"l4FontSize"},fontWeight:"normal",fillOpacity:1,lineJoin:"bevel"}},area:{style:{fillOpacity:.2}},line:{style:{lineWidth:2,lineCap:"round",lineJoin:"round"}},point:{style:{size:8,stroke:{type:"palette",key:"backgroundColor"},lineWidth:1,fillOpacity:1}},word:{style:{fontSize:null}},fillingWord:{style:{fontSize:null}},sunburst:{style:{lineWidth:1,stroke:{type:"palette",key:"backgroundColor"}}},circlePacking:{style:{lineWidth:1,stroke:{type:"palette",key:"backgroundColor"}}},funnel3d:{style:{stroke:!1}},barBackground:{visible:!1,style:{fill:{type:"palette",key:"primaryFontColor",a:.06},stroke:"transparent"}}},series:aE,component:{discreteLegend:{orient:"bottom",position:"middle",padding:[16,24],title:{visible:!1,padding:0,textStyle:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fill:{type:"palette",key:"primaryFontColor"},fontWeight:"normal"},space:12},pager:{textStyle:{fill:{type:"palette",key:"discreteLegendPagerTextColor"}},handler:{style:{fill:{type:"palette",key:"discreteLegendPagerHandlerColor"}},state:{disable:{fill:{type:"palette",key:"discreteLegendPagerHandlerDisableColor"}}}}},item:{visible:!0,spaceCol:10,spaceRow:6,padding:2,background:{state:{selectedHover:{fill:{type:"palette",key:"hoverBackgroundColor"}},unSelectedHover:{fill:{type:"palette",key:"hoverBackgroundColor"}}}},shape:{space:6,style:{lineWidth:0,fillOpacity:1,opacity:1},state:{unSelected:{fillOpacity:.2,opacity:1}}},label:{space:6,style:{fill:{type:"palette",key:"secondaryFontColor",default:"#89909d"},fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},opacity:1},state:{unSelected:{fill:{type:"palette",key:"disableFontColor"},opacity:1}}}},allowAllCanceled:!1},colorLegend:dE,sizeLegend:vE,axis:{domainLine:{visible:!0,style:{lineWidth:1,stroke:{type:"palette",key:"axisDomainColor"},strokeOpacity:1}},grid:{visible:!0,style:{lineWidth:1,stroke:{type:"palette",key:"axisGridColor"},strokeOpacity:1,lineDash:[]}},subGrid:{visible:!1,style:{lineWidth:1,stroke:{type:"palette",key:"axisGridColor"},strokeOpacity:1,lineDash:[4,4]}},tick:{visible:!0,inside:!1,tickSize:4,alignWithLabel:!0,style:{lineWidth:1,stroke:{type:"palette",key:"axisDomainColor"},strokeOpacity:1}},subTick:{visible:!1,tickSize:2,style:{lineWidth:1,stroke:{type:"palette",key:"axisDomainColor"},strokeOpacity:1}},label:{visible:!0,inside:!1,space:10,style:{fontSize:{type:"token",key:"l5FontSize"},fill:{type:"palette",key:"axisLabelFontColor"},fontWeight:"normal",fillOpacity:1}},title:{space:10,padding:0,style:{fontSize:{type:"token",key:"l5FontSize"},lineHeight:{type:"token",key:"l5LineHeight"},fill:{type:"palette",key:"secondaryFontColor"},fontWeight:"normal",fillOpacity:1}}},axisBand:{domainLine:{visible:!0},grid:{visible:!1},subGrid:{visible:!1},tick:{visible:!0},subTick:{visible:!1}},axisLinear:{domainLine:{visible:!1},grid:{visible:!0},subGrid:{visible:!1},tick:{visible:!1},subTick:{visible:!1}},axisX:oE,axisY:{label:{space:12,autoLimit:!0},title:{space:12,autoRotate:!0},maxWidth:"30%",unit:{visible:!1,style:{fontSize:{type:"token",key:"l5FontSize"},fill:{type:"palette",key:"axisLabelFontColor"},fontWeight:"normal",fillOpacity:1}}},axisZ:sE,axisAngle:{grid:{visible:!0,style:{lineDash:[6,6]}},label:{space:5}},axisRadius:{grid:{smooth:!0,visible:!0},subGrid:{smooth:!0,visible:!1}},markLine:gE,markArea:pE,markPoint:yE,polarMarkLine:gE,polarMarkArea:pE,polarMarkPoint:yE,geoMarkPoint:yE,tooltip:{offset:{x:10,y:10},panel:{padding:{top:10,left:10,right:10,bottom:10},backgroundColor:{type:"palette",key:"popupBackgroundColor"},border:{color:{type:"palette",key:"popupBackgroundColor"},width:0,radius:3},shadow:{x:0,y:4,blur:12,spread:0,color:{type:"palette",key:"shadowColor"}}},spaceRow:6,titleLabel:{fontSize:{type:"token",key:"l4FontSize"},lineHeight:{type:"token",key:"l4LineHeight"},fontColor:{type:"palette",key:"primaryFontColor"},fontWeight:"bold",textBaseline:"middle",spacing:0},shape:{size:8,spacing:6},keyLabel:{fontSize:{type:"token",key:"l4FontSize"},lineHeight:{type:"token",key:"l4LineHeight"},fontColor:{type:"palette",key:"secondaryFontColor"},textBaseline:"middle",spacing:26},valueLabel:{fontSize:{type:"token",key:"l4FontSize"},lineHeight:{type:"token",key:"l4LineHeight"},fontColor:{type:"palette",key:"primaryFontColor"},fontWeight:"bold",textBaseline:"middle",spacing:0}},dataZoom:lE,crosshair:{trigger:"hover",bandField:{visible:!1,line:{type:"rect",visible:!0,style:{fill:{type:"palette",key:"axisGridColor"},opacity:.7,lineWidth:0,stroke:{type:"palette",key:"markLineStrokeColor"},lineDash:[2,3]}},label:{visible:!1,style:{fontWeight:"normal",fill:{type:"palette",key:"axisMarkerFontColor"},fontSize:{type:"token",key:"l5FontSize"}},labelBackground:{padding:{bottom:0,top:0,left:2,right:2},style:{fill:{type:"palette",key:"axisMarkerBackgroundColor"},cornerRadius:1}}}},linearField:{visible:!1,line:{type:"line",visible:!0,style:{stroke:{type:"palette",key:"markLineStrokeColor"},fill:"transparent",opacity:.7,lineDash:[2,3]}},label:{visible:!1,style:{fontWeight:"normal",fill:{type:"palette",key:"axisMarkerFontColor"},fontSize:{type:"token",key:"l5FontSize"}},labelBackground:{padding:{bottom:0,top:0,left:2,right:2},style:{fill:{type:"palette",key:"axisMarkerBackgroundColor"},cornerRadius:1}}}}},player:{visible:!0,position:"start",padding:{top:20,bottom:20},slider:{space:10,trackStyle:{fill:{type:"palette",key:"sliderTrackColor"},fillOpacity:.8},railStyle:{fill:{type:"palette",key:"sliderRailColor"}},handlerStyle:{size:15,stroke:{type:"palette",key:"backgroundColor"},lineWidth:2,fill:{type:"palette",key:"playerControllerColor"}}},controller:{start:{order:0,space:0,style:{size:25,fill:{type:"palette",key:"playerControllerColor"},fillOpacity:.8}},pause:{order:0,space:0,style:{size:25,fill:{type:"palette",key:"playerControllerColor"},fillOpacity:.8}},backward:{order:0,space:10,position:"start",style:{size:12,fill:{type:"palette",key:"playerControllerColor"},fillOpacity:.8}},forward:{order:0,space:10,position:"end",style:{size:12,fill:{type:"palette",key:"playerControllerColor"},fillOpacity:.8}}}},brush:{style:{fill:"#B0C8F9",fillOpacity:.2,stroke:"#B0C8F9",lineWidth:2},brushMode:"single",brushType:"rect",brushMoved:!0,removeOnClick:!0,delayType:"throttle",delayTime:0},indicator:{title:{visible:!0,autoLimit:!1,autoFit:!1,style:{fontSize:{type:"token",key:"l1FontSize"},fill:{type:"palette",key:"primaryFontColor"},fontWeight:"normal",fillOpacity:1,textBaseline:"top",textAlign:"center"}},content:{visible:!0,style:{fontSize:{type:"token",key:"l2FontSize"},fill:{type:"palette",key:"tertiaryFontColor"},fontWeight:"normal",fillOpacity:1,textBaseline:"top",textAlign:"center"}}},title:{padding:{top:4,bottom:20},textStyle:{fontSize:{type:"token",key:"l3FontSize"},lineHeight:{type:"token",key:"l3LineHeight"},fill:{type:"palette",key:"primaryFontColor"}},subtextStyle:{fontSize:{type:"token",key:"l4FontSize"},lineHeight:{type:"token",key:"l4LineHeight"},fill:{type:"palette",key:"tertiaryFontColor"}}},mapLabel:{visible:!0,offset:12,position:"top",space:10,nameLabel:{visible:!0,style:{textBaseline:"middle",textAlign:"left",fill:"black",fontSize:{type:"token",key:"l6FontSize"}}},valueLabel:{visible:!0,style:{textBaseline:"middle",textAlign:"left",fill:"black",fontSize:{type:"token",key:"l6FontSize"}}},background:{visible:!0,padding:{top:4,bottom:4,left:6,right:6},style:{cornerRadius:2,lineWidth:1,fill:"white",stroke:"grey"}},leader:{visible:!1,style:{lineWidth:1,stroke:"red"}}},poptip:{visible:!0,position:"auto",padding:8,titleStyle:{fontSize:{type:"token",key:"l5FontSize"},fontWeight:"bold",fill:{type:"palette",key:"primaryFontColor"}},contentStyle:{fontSize:{type:"token",key:"l5FontSize"},fill:{type:"palette",key:"primaryFontColor"}},panel:{visible:!0,fill:{type:"palette",key:"popupBackgroundColor"},cornerRadius:3,lineWidth:0,shadowBlur:12,shadowOffsetX:0,shadowOffsetY:4,shadowColor:{type:"palette",key:"shadowColor"},size:0,space:12}},totalLabel:{visible:!1,offset:5,overlap:{clampForce:!0,strategy:[]},smartInvert:!1,animation:!1,style:{fontSize:{type:"token",key:"l4FontSize"},fill:{type:"palette",key:"primaryFontColor"}}},scrollBar:{horizontal:{height:10,slider:{style:{fill:{type:"palette",key:"scrollBarSliderColor"}}}},vertical:{width:10,slider:{style:{fill:{type:"palette",key:"scrollBarSliderColor"}}}}}},animationThreshold:2e3},bE={name:"dark",colorScheme:{default:{dataScheme:iE,palette:{backgroundColor:"#202226",borderColor:"#404349",shadowColor:"rgba(0,0,0,0.1)",hoverBackgroundColor:"#404349",sliderRailColor:"#404349",sliderHandleColor:"#202226",sliderTrackColor:"#4284FF",popupBackgroundColor:"#404349",primaryFontColor:"#fdfdfd",secondaryFontColor:"#bbbdc3",tertiaryFontColor:"#888c93",axisLabelFontColor:"#888c93",disableFontColor:"#55595f",axisMarkerFontColor:"#202226",axisGridColor:"#404349",axisDomainColor:"#4b4f54",dataZoomHandleStrokeColor:"#bbbdc3",dataZoomChartColor:"#55595F",playerControllerColor:"#4284FF",scrollBarSliderColor:"rgba(255,255,255,0.3)",axisMarkerBackgroundColor:"#fdfdfd",markLabelBackgroundColor:"#404349",markLineStrokeColor:"#bbbdc3",dangerColor:"#eb4b4b",warningColor:"#f0bd30",successColor:"#14b267",infoColor:"#4284ff",discreteLegendPagerTextColor:"#BBBDC3",discreteLegendPagerHandlerColor:"#BBBDC3",discreteLegendPagerHandlerDisableColor:"#55595F"}}},component:{dataZoom:{selectedBackground:{style:{fillOpacity:.4,outerBorder:{strokeOpacity:.4}}}}}};function _E(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(t===e)return;if(pt(e)&&"object"==a(e)){var n=Object(e),r=[];for(var o in n)r.push(o);for(var s=r.length,u=-1;s--;){var l=r[++u];pt(n[l])&&"object"==a(n[l])&&!_t(t[l])?xE(t,e,l,i):wE(t,l,n[l])}}}}function xE(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=t[i],o=e[i],s=e[i],u=!0;if(_t(o)){if(n)s=[];else if(_t(r))s=r;else if(xt(r)){s=new Array(r.length);for(var l=-1,c=r.length;++l<c;)s[l]=r[l]}}else mt(o)?(s=null!=r?r:{},"function"!=typeof r&&"object"==a(r)||(s={})):u=!1;u&&_E(s,o,n),wE(t,i,s)}function wE(t,e,i){(void 0!==i&&!function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t[e],i)||void 0===i&&!(e in t))&&(t[e]=i)}function SE(t){for(var e=-1,i=arguments.length<=1?0:arguments.length-1;++e<i;)_E(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1],!0);return t}function AE(t,e,i,n){Object.keys(t).forEach((function(r){if(gt(e))e.type===r&&(_t(t[r])?t[r].length>=e.index&&(t[r][e.index]=n?SE({},t[r][e.index],i):i):t[r]=n?SE({},t[r],i):i);else if(_t(t[r])){var a=t[r].findIndex((function(t){return t.id===e}));a>=0&&(t[r][a]=n?SE({},t[r][a],i):i)}else t.id===e&&(t[r]=n?SE({},t[r],i):i)}))}function TE(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return SE.apply(void 0,[EE(t)].concat(y(i.map(EE))))}function EE(t){var e;if(!t)return t;var i,n=function(t){return t&&(t=Object.keys(t).reduce((function(e,i){var n=t[i];return e[i]=function(t){return _t(t)?{dataScheme:t}:t}(n),e}),{})),t}(t.colorScheme),r=t.series,a=t.mark,o=t.markByName;return(a||o)&&(i=Object.keys(zT).reduce((function(t,e){var i,n=null!==(i=null==r?void 0:r[e])&&void 0!==i?i:{};return t[e]=function(t,e,i,n){if(!zT[e])return t;var r={};return Object.values(zT[e]).forEach((function(e){var a=e.type,o=e.name;r[o]=SE({},null==i?void 0:i[Xt(a)[0]],null==n?void 0:n[o],null==t?void 0:t[o])})),Object.assign(Object.assign({},t),r)}(n,e,a,o),t}),{})),Object.assign({},t,{colorScheme:n,token:null!==(e=t.token)&&void 0!==e?e:{},series:Object.assign({},t.series,i)})}var CE=["animationThreshold","colorScheme","name","padding"];function BE(t,e,i,n){if(!t)return t;e||(e=t.colorScheme),i||(i=t.token);var r={};return Object.keys(t).forEach((function(a){var o=t[a];CE.includes(a)?r[a]=o:mt(o)?XT(o)?r[a]=function(t,e,i){if(e&&XT(t)){var n=HT(e,t,i);if(n)return n}return t}(o,e,n):function(t){return t&&"token"===t.type&&!!t.key}(o)?r[a]=function(t,e){return t&&e.key in t?t[e.key]:e.default}(i,o):r[a]=BE(o,e,i,n):r[a]=o})),r}var ME=l({},kE.name,kE),RE=kE.name,PE=new Map(Object.keys(ME).map((function(t){return[t,ME[t]]}))),OE=new Map(Object.keys(ME).map((function(t){return[t,BE(ME[t])]}))),IE=new Map(Object.keys(ME).map((function(t){return[t,t===RE]}))),LE=function(t,e){if(t){var i=jE(e);PE.set(t,i),OE.set(t,BE(i)),IE.set(t,!0)}},DE=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:RE,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return IE.has(t)&&!IE.get(t)&&LE(t,PE.get(t)),e?OE.get(t):PE.get(t)},jE=function(t){var e,i=null!==(e=t.type)&&void 0!==e?e:RE;return TE({},DE(i),t)},FE=function(){function t(){o(this,t)}return u(t,null,[{key:"registerInstance",value:function(e){t.instances.set(e.id,e)}},{key:"unregisterInstance",value:function(e){t.instances.delete(e.id)}},{key:"getInstance",value:function(e){return t.instances.get(e)}},{key:"instanceExist",value:function(e){return t.instances.has(e)}},{key:"forEach",value:function(e){var i=arguments.length>2?arguments[2]:void 0,n=Xt(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]);return t.instances.forEach((function(t,i,r){n.includes(i)||e(t,i,r)}),i)}}])}();FE.instances=new Map;var NE=function(){function t(){o(this,t)}return u(t,null,[{key:"registerTheme",value:function(t,e){LE(t,e)}},{key:"getTheme",value:function(t){return DE(t,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"removeTheme",value:function(t){return function(t){return PE.delete(t)&&OE.delete(t)&&IE.delete(t)}(t)}},{key:"themeExist",value:function(t){return function(t){return!!bt(t)&&PE.has(t)}(t)}},{key:"getDefaultTheme",value:function(){return t.themes.get(RE)}},{key:"setCurrentTheme",value:function(e){t.themeExist(e)&&(t._currentThemeName=e,FE.forEach((function(t){return null==t?void 0:t.setCurrentTheme(e)})))}},{key:"getCurrentTheme",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.getTheme(t._currentThemeName,e)}},{key:"getCurrentThemeName",value:function(){return t._currentThemeName}}])}();function zE(t,e){return bt(t)?NE.themeExist(t)?NE.getTheme(t,e):{}:gt(t)?t:{}}function GE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{data:function(t){return t}};if(!t)return t;if(t.constructor===Object){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e[n]){i[n]=e[n](t[n]);continue}i[n]=GE(t[n],e)}return i}return _t(t)?t.map((function(t){return GE(t,e)})):t}function UE(t,e){if(!t)return t;if(mt(t)){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(bt(t[n])&&e.getFunction(t[n])){i[n]=e.getFunction(t[n]);continue}i[n]=UE(t[n],e)}return i}return _t(t)?t.map((function(t){return UE(t,e)})):t}NE.themes=PE,NE._currentThemeName=RE;var WE=function(t,e,i){return function(t,e,i,n){return new di(Object.assign({defaultFontParams:Object.assign({fontFamily:"PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",fontSize:14},n),getTextBounds:i?void 0:Tc,specialCharSet:"-/: .,@%'\"~"+di.ALPHABET_CHAR_SET+di.ALPHABET_CHAR_SET.toUpperCase()},null!=e?e:{}),t)}(t,e,i,{fontFamily:mE.fontFamily,fontSize:mE.fontSize})},VE=function(){function t(){o(this,t)}return u(t,null,[{key:"registerChart",value:function(e,i){t._charts[e]=i}},{key:"registerSeries",value:function(e,i){t._series[e]=i}},{key:"registerComponent",value:function(e,i,n){t._components[e]={cmp:i,alwaysCheck:n}}},{key:"registerMark",value:function(e,i){t._marks[e]=i}},{key:"registerRegion",value:function(e,i){t._regions[e]=i}},{key:"registerTransform",value:function(e,i){t.transforms[e]=i}},{key:"registerLayout",value:function(e,i){t._layout[e]=i}},{key:"registerAnimation",value:function(e,i){t._animations[e]=i}},{key:"registerImplement",value:function(e,i){t._implements[e]=i}},{key:"registerChartPlugin",value:function(e,i){t._chartPlugin[e]=i}},{key:"registerComponentPlugin",value:function(e,i){t._componentPlugin[e]=i}},{key:"createChart",value:function(e,i,n){return t._charts[e]?new t._charts[e](i,n):null}},{key:"createChartSpecTransformer",value:function(e,i){if(!t._charts[e])return null;var n=t._charts[e];return new n.transformerConstructor(Object.assign({seriesType:n.seriesType},i))}},{key:"createRegion",value:function(e,i,n){return t._regions[e]?new t._regions[e](i,n):null}},{key:"createRegionSpecTransformer",value:function(e,i){return t._regions[e]?new t._regions[e].transformerConstructor(i):null}},{key:"createSeries",value:function(e,i,n){return t._series[e]?new t._series[e](i,n):null}},{key:"createSeriesSpecTransformer",value:function(e,i){return t._series[e]?new t._series[e].transformerConstructor(i):null}},{key:"createMark",value:function(e,i,n){if(!t._marks[e])return null;var r=new t._marks[e](i,n);return"group"===r.type&&r.setInteractive(!1),r}},{key:"getComponents",value:function(){return Object.values(t._components)}},{key:"getComponentInKey",value:function(e){return t._components[e].cmp}},{key:"getLayout",value:function(){return Object.values(t._layout)}},{key:"getLayoutInKey",value:function(e){return t._layout[e]}},{key:"getSeries",value:function(){return Object.values(t._series)}},{key:"getSeriesInType",value:function(e){return t._series[e]}},{key:"getRegionInType",value:function(e){return t._regions[e]}},{key:"getAnimationInKey",value:function(e){return t._animations[e]}},{key:"getImplementInKey",value:function(e){return t._implements[e]}},{key:"getSeriesMarkMap",value:function(e){return t._series[e]?t._series[e].mark:{}}},{key:"getChartPlugins",value:function(){return Object.values(t._chartPlugin)}},{key:"getComponentPlugins",value:function(){return Object.values(t._componentPlugin)}},{key:"getComponentPluginInType",value:function(e){return t._componentPlugin[e]}},{key:"registerFormatter",value:function(t){this._formatter=t}},{key:"getFormatter",value:function(){return this._formatter}}])}();VE._charts={},VE._series={},VE._components={},VE._marks={},VE._regions={},VE._animations={},VE._implements={},VE._chartPlugin={},VE._componentPlugin={},VE.transforms={fields:A_,filter:function(t,e){var i=e.callback;return i&&(t=t.filter(i)),t},fold:function(t,e){for(var i=e.fields,n=e.key,r=e.value,a=e.retains,o=[],s=function(e){i.forEach((function(s){var u={};if(u[n]=s,u[r]=t[e][s],a)a.forEach((function(i){u[i]=t[e][i]}));else for(var l in t[e])-1===i.indexOf(l)&&(u[l]=t[e][l]);o.push(u)}))},u=0;u<t.length;u++)s(u);return o}},VE.dataParser={csv:j_,dsv:D_,tsv:F_},VE._layout={};var HE=function(t,e,i,n){var r,a,o=vx(e.getScale().type),s=[],u=b(e.getOption().getChart().getSeriesInIndex(e.getSpecInfo().seriesIndexes));try{var l=function(){var u=a.value;if(u.coordinate===i){var l=Xt(n(u)),c=null===(r=u.getViewData())||void 0===r?void 0:r.latestData;if(l&&c)if(o){var h=[],d=[];c.forEach((function(e,i){var n;(null===(n=e[l[0]])||void 0===n?void 0:n.toString())===(null==t?void 0:t.toString())&&(h.push(e),d.push(i))})),s.push({series:u,datum:h,key:XE(u,d)})}else if(pt(l[1])){var f=[],v=[];c.forEach((function(e,i){var n;((null===(n=e[l[0]])||void 0===n?void 0:n.toString())===(null==t?void 0:t.toString())||pt(e[l[0]])&&pt(e[l[1]])&&t>=e[l[0]]&&t<e[l[1]])&&(f.push(e),v.push(i))})),s.push({series:u,datum:f,key:XE(u,v)})}else{var p=e.getSpec().tooltipFilterRange,g=At(p)?[-p,p]:p,y=[],m=[];if(g)c.forEach((function(e,i){if(pt(e[l[0]])){var n=e[l[0]]-t;n>=g[0]&&n<=g[1]&&(y.push(e),m.push(i))}}));else{var k=1/0,b=0;c.forEach((function(e,i){if(pt(e[l[0]])){var n=Math.abs(e[l[0]]-t),r=Math.sign(e[l[0]]-t);n<k?(k=n,y=[e],m=[i],b=r):n===k&&r===b&&(y.push(e),m.push(i))}}))}s.push({series:u,datum:y,key:XE(u,m)})}}};for(u.s();!(a=u.n()).done;)l()}catch(t){u.e(t)}finally{u.f()}return s},XE=function(t,e){return"".concat(t.id,"_").concat(e.join("_"))},YE=function(t,e,i){var n=t.getAllComponents().filter((function(n){return"axes"===n.specKey&&e(n)&&function(t,e,i){var n=t.getRegionsInIds(Xt(e.layout.layoutBindRegionID));return null==n?void 0:n.some((function(t){var e=t.getLayoutRect(),n=t.getLayoutStartPoint();return function(t,e,i){return t.x>=e.x&&t.x<=i.x&&t.y>=e.y&&t.y<=i.y}(i,{x:n.x,y:n.y},{x:e.width+n.x,y:e.height+n.y})}))}(t,n,i)}));return n.length?n:null},KE=function(t,e){if(!t)return null;if(!Kx(t.getRegionsInIndex(),"polar"))return null;var i=e.x,n=e.y,r=YE(t,(function(t){return"angle"===t.getOrient()}),e),a=YE(t,(function(t){return"radius"===t.getOrient()}),e),o=[],s=function(t){return t.getDimensionField()[0]};return r&&r.forEach((function(t){var e,r=t.getScale();if(r&&vx(r.type)){var u=r.domain(),l=r.range(),c=t.getCenter(),h={x:i-t.getLayoutStartPoint().x-c.x,y:n-t.getLayoutStartPoint().y-c.y},d=Vx({x:1,y:0},h);d=function(t,e){var i=2*Math.PI,n=function(t,e){var i;if(0!==t.length){for(var n=t[0],r=1;r<t.length;r++){var a=t[r];(null!==(i=null==e?void 0:e(a,n))&&void 0!==i?i:a-n<0)&&(n=a)}return n}}(e),r=function(t,e){var i;if(0!==t.length){for(var n=t[0],r=1;r<t.length;r++){var a=t[r];(null!==(i=null==e?void 0:e(a,n))&&void 0!==i?i:a-n>0)&&(n=a)}return n}}(e);return t<n?t+=Math.ceil((n-t)/i)*i:t>r&&(t-=Math.ceil((t-r)/i)*i),t}(d,l);var f=Hx(h),v=null===(e=a[0])||void 0===e?void 0:e.getScale(),p=null==v?void 0:v.range();if((d-(null==l?void 0:l[0]))*(d-(null==l?void 0:l[1]))>0||(f-(null==p?void 0:p[0]))*(f-(null==p?void 0:p[1]))>0)return;var g=t.invert(d);if(vt(g))return;var y=u.findIndex((function(t){return(null==t?void 0:t.toString())===g.toString()}));y<0&&(y=void 0);var m=HE(g,t,"polar",s);o.push({index:y,value:g,position:r.scale(g),axis:t,data:m})}})),a&&a.forEach((function(t){var e,a=t.getScale(),u=null==a?void 0:a.range();if(a&&vx(a.type)){var l=t.getCenter(),c={x:i-t.getLayoutStartPoint().x-l.x,y:n-t.getLayoutStartPoint().y-l.y},h=Vx({x:1,y:0},c);h<-Math.PI/2&&(h=2*Math.PI+h);var d=Hx(c),f=null===(e=r[0])||void 0===e?void 0:e.getScale(),v=null==f?void 0:f.range();if((h-(null==v?void 0:v[0]))*(h-(null==v?void 0:v[1]))>0||(d-(null==u?void 0:u[0]))*(d-(null==u?void 0:u[1]))>0)return;var p=a.invert(d);if(vt(p))return;var g=a.domain().findIndex((function(t){return(null==t?void 0:t.toString())===p.toString()}));g<0&&(g=void 0);var y=HE(p,t,"polar",s);o.push({index:g,value:p,position:a.scale(p),axis:t,data:y})}})),o.length?o:null};function qE(t){return"bottom"===t||"top"===t}var ZE,JE=function(t){return t.fieldX[0]},$E=function(t){return t.fieldY[0]},QE=function(t){var e;return[t.fieldX[0],null!==(e=t.fieldX2)&&void 0!==e?e:t.fieldX[1]]},tC=function(t){var e;return[t.fieldY[0],null!==(e=t.fieldY2)&&void 0!==e?e:t.fieldY[1]]},eC=function(t,e){return t?e?JE:QE:e?$E:tC},iC=function(t,e,i,n){var r=t.getScale(),a=e-t.getLayoutStartPoint()[i];if((a-r.range()[0])*(a-r.range()[1])>0)return null;var o=r.invert(a);return nC(t,o,n)},nC=function(t,e,i){var n=t.getScale();if(vt(e))return null;var r=n.domain().findIndex((function(t){return(null==t?void 0:t.toString())===e.toString()}));r<0&&(r=void 0);var a=HE(e,t,"cartesian",null!=i?i:qE(t.getOrient())?JE:$E);return{index:r,value:e,position:n.scale(e),axis:t,data:a}},rC=function(){return u((function t(e,i){o(this,t),this._eventDispatcher=e,this._mode=i}),[{key:"chart",get:function(){var t,e;return this._chart||(this._chart=null===(e=(t=this._eventDispatcher.globalInstance).getChart)||void 0===e?void 0:e.call(t)),this._chart}},{key:"register",value:function(t,e){var i,n;(null!==(n=null===(i=this.chart)||void 0===i?void 0:i.getOption().onError)&&void 0!==n?n:X_)("Method not implemented.")}},{key:"unregister",value:function(){var t,e;(null!==(e=null===(t=this.chart)||void 0===t?void 0:t.getOption().onError)&&void 0!==e?e:X_)("Method not implemented.")}},{key:"getTargetDimensionInfo",value:function(t,e){var i,n,r=null!==(i=function(t,e,i){var n,r;if(!t)return null;if(!Kx(t.getRegionsInIndex(),"cartesian"))return null;var a=e.x,o=e.y,s=null!==(n=YE(t,(function(t){return qE(t.getOrient())}),e))&&void 0!==n?n:[],u=null!==(r=YE(t,(function(t){return"left"===(e=t.getOrient())||"right"===e;var e}),e))&&void 0!==r?r:[],l=new Set,c=new Set,h=new Set;[s,u].forEach((function(t){return t.forEach((function(t){vx(t.getScale().type)?l.add(t):c.add(t),i&&t.getSpec().hasDimensionTooltip&&h.add(t)}))}));var d=[],f=function(t){var e="x"===t,i=e?a:o;(e?s:u).forEach((function(n){if(h.size>0){if(h.has(n)){var r=iC(n,i,t,eC(e,vx(n.getScale().type)));r&&d.push(r)}}else{var a=l.size>0;if((a?l:c).has(n)){var o=iC(n,i,t,eC(e,a));o&&d.push(o)}}}))};return"horizontal"===t.getSpec().direction?(f("y"),0===d.length&&f("x")):(f("x"),0===d.length&&f("y")),d.length?d:null}(this.chart,{x:t,y:e}))&&void 0!==i?i:[],a=null!==(n=KE(this.chart,{x:t,y:e}))&&void 0!==n?n:[],o=[].concat(r,a);return 0===o.length?null:o}},{key:"dispatch",value:function(t,e){var i,n=null===(i=this.chart)||void 0===i?void 0:i.getAllComponents().filter((function(t){return"axes"===t.specKey&&(!(null==e?void 0:e.filter)||e.filter(t))})),r=n.filter((function(t){return vx(t.getScale().type)})),a=r.length?r:n.filter((function(t){var e=t.getOrient();return qE(e)||"angle"===e})),o=[];return a.forEach((function(e){var i=nC(e,t);i&&o.push(i)})),this._callback.call(null,{action:"enter",dimensionInfo:o}),o}}])}(),aC=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).onClick=function(e){if(e){var i=e.event.viewX,n=e.event.viewY,r=t.getTargetDimensionInfo(i,n);r&&t._callback.call(null,Object.assign(Object.assign({},e),{action:"click",dimensionInfo:r.slice()}))}},t}return c(i,t),u(i,[{key:"register",value:function(t,e){this._callback=e.callback,this._eventDispatcher.register("pointertap",{query:Object.assign(Object.assign({},e.query),{source:TA.chart}),callback:this.onClick})}},{key:"unregister",value:function(){this._eventDispatcher.unregister("pointertap",{query:null,callback:this.onClick})}}])}(rC),oC=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments))._cacheDimensionInfo=null,t.onMouseMove=function(e){if(e){var i=e.event.viewX,n=e.event.viewY,r=t.getTargetDimensionInfo(i,n);null===r&&null!==t._cacheDimensionInfo?(t._callback.call(null,Object.assign(Object.assign({},e),{action:"leave",dimensionInfo:t._cacheDimensionInfo.slice()})),t._cacheDimensionInfo=r):null===r||null!==t._cacheDimensionInfo&&r.length===t._cacheDimensionInfo.length&&!r.some((function(e,i){return n=e,r=t._cacheDimensionInfo[i],!(n===r||!vt(n)&&!vt(r)&&n.value===r.value&&(null===(a=n.axis)||void 0===a?void 0:a.id)===(null===(o=r.axis)||void 0===o?void 0:o.id));var n,r,a,o}))?null!==r&&t._callback.call(null,Object.assign(Object.assign({},e),{action:"move",dimensionInfo:r.slice()})):(t._callback.call(null,Object.assign(Object.assign({},e),{action:"enter",dimensionInfo:r.slice()})),t._cacheDimensionInfo=r)}},t.onMouseOut=function(e){e&&(t._callback.call(null,Object.assign(Object.assign({},e),{action:"leave",dimensionInfo:t._cacheDimensionInfo?t._cacheDimensionInfo.slice():[]})),t._cacheDimensionInfo=null)},t}return c(i,t),u(i,[{key:"register",value:function(t,e){this._callback=e.callback,this._eventDispatcher.register("pointermove",{query:Object.assign(Object.assign({},e.query),{source:TA.chart}),callback:this.onMouseMove}),this._eventDispatcher.register("pointerout",{query:Object.assign(Object.assign({},e.query),{source:TA.canvas}),callback:this.onMouseOut}),Z_(this._mode)&&this._eventDispatcher.register("pointerdown",{query:Object.assign(Object.assign({},e.query),{source:TA.chart}),callback:this.onMouseMove})}},{key:"unregister",value:function(){this._eventDispatcher.unregister("pointermove",{query:null,callback:this.onMouseMove}),Z_(this._mode)&&this._eventDispatcher.unregister("pointerdown",{query:null,callback:this.onMouseMove})}}])}(rC);!function(t){t.dimensionHover="dimensionHover",t.dimensionClick="dimensionClick"}(ZE||(ZE={}));var sC=l(l({},ZE.dimensionHover,oC),ZE.dimensionClick,aC),uC=function(){return u((function t(e,i){o(this,t),this._composedEventMap=new Map,this._eventDispatcher=e,this._mode=i}),[{key:"getComposedEventMap",value:function(){return this._composedEventMap}},{key:"on",value:function(t,e,i){var n="function"==typeof e?{query:null,callback:e}:{query:e,callback:i};if(sC[t]){var r=new sC[t](this._eventDispatcher,this._mode);r.register(t,n),this._composedEventMap.set(i,{eventType:t,event:r})}else this._eventDispatcher.register(t,n);return this}},{key:"off",value:function(t,e,i){var n,r,a=null!=i?i:e;if(sC[t])if(a)null===(n=this._composedEventMap.get(a))||void 0===n||n.event.unregister(),this._composedEventMap.delete(a);else{var o,s=b(this._composedEventMap.entries());try{for(s.s();!(o=s.n()).done;){var u=o.value;u[1].eventType===t&&(null===(r=this._composedEventMap.get(u[0]))||void 0===r||r.event.unregister(),this._composedEventMap.delete(u[0]))}}catch(t){s.e(t)}finally{s.f()}}else if(a){var l={callback:a,query:null,filter:{nodeName:null,type:t,level:null,source:e.source,markName:null,filter:null,userId:null}};this._eventDispatcher.unregister(t,l)}else this._eventDispatcher.unregister(t);return this}},{key:"emit",value:function(t,e,i){return this._eventDispatcher.dispatch(t,e,i),this}},{key:"release",value:function(){this._eventDispatcher.clear(),this._composedEventMap.clear()}}])}(),lC=function(){return u((function t(){o(this,t),this._map=new Map,this._levelNodes=new Map,this._levelNodes.set(EA.vchart,[]),this._levelNodes.set(EA.chart,[]),this._levelNodes.set(EA.model,[]),this._levelNodes.set(EA.mark,[])}),[{key:"addHandler",value:function(t,e){var i,n={level:e,handler:t};return null===(i=this._levelNodes.get(e))||void 0===i||i.push(n),this._map.set(t.callback,n),this}},{key:"removeHandler",value:function(t){var e=this._map.get(t.callback);if(!e)return this;this._map.delete(t.callback);var i=this._levelNodes.get(e.level),n=null==i?void 0:i.findIndex((function(e){return e.handler.callback===t.callback}));return void 0!==n&&n>=0&&(null==i||i.splice(n,1)),this}},{key:"getHandlers",value:function(t){var e;return(null===(e=this._levelNodes.get(t))||void 0===e?void 0:e.map((function(t){return t.handler})))||[]}},{key:"getCount",value:function(){return this._map.size}},{key:"release",value:function(){this._map.clear(),this._levelNodes.clear()}}])}(),cC={cartesianAxis:"axis","cartesianAxis-band":"axis","cartesianAxis-linear":"axis","cartesianAxis-time":"axis",polarAxis:"axis","polarAxis-band":"axis","polarAxis-linear":"axis",discreteLegend:"legend",continuousLegend:"legend",colorLegend:"legend",sizeLegend:"legend",label:"label",markLine:"markLine",markArea:"markArea",markPoint:"markPoint",polarMarkLine:"polarMarkLine",polarMarkArea:"polarMarkArea",polarMarkPoint:"polarMarkPoint",geoMarkPoint:"geoMarkPoint"},hC=function(){return u((function t(e,i){var n=this;o(this,t),this._viewBubbles=new Map,this._windowBubbles=new Map,this._canvasBubbles=new Map,this._viewListeners=new Map,this._windowListeners=new Map,this._canvasListeners=new Map,this._onDelegate=function(t){var e,i=n.globalInstance.getChart(),r=pt(t.modelId)&&(null==i?void 0:i.getModelById(t.modelId))||void 0,a=pt(t.markId)&&(null==i?void 0:i.getMarkById(t.markId))||null,o=new Map,s=null===(e=t.item)||void 0===e?void 0:e.mark;for(s&&pt(s.id())&&o.set(s.id(),t.item);null==s?void 0:s.elements;){var u=s.id();pt(u)&&!o.has(u)&&o.set(u,s.elements[0]),s=s.group}var l={event:t.event,item:t.item,datum:t.datum,source:t.source,itemMap:o,chart:i,model:r,mark:null!=a?a:void 0,node:Ot(t.event,"target")};n.dispatch(t.type,l)},this._onDelegateInteractionEvent=function(t){var e=n.globalInstance.getChart(),i=t.event,r=null;i.elements&&(r=i.elements);var a={event:t.event,chart:e,items:r,datums:r&&r.map((function(t){return t.getDatum()}))};n.dispatch(t.type,a)},this.globalInstance=e,this._compiler=i}),[{key:"register",value:function(t,e){var i,n,r,a,o;this._parseQuery(e);var s=this.getEventBubble((null===(i=e.filter)||void 0===i?void 0:i.source)||TA.chart),u=this.getEventListeners((null===(n=e.filter)||void 0===n?void 0:n.source)||TA.chart);if(s.get(t)||s.set(t,new lC),s.get(t).addHandler(e,null===(r=e.filter)||void 0===r?void 0:r.level),this._isValidEvent(t)&&!u.has(t)){var l=this._onDelegate.bind(this);this._compiler.addEventListener(null===(a=e.filter)||void 0===a?void 0:a.source,t,l),u.set(t,l)}else if(this._isInteractionEvent(t)&&!u.has(t)){var c=this._onDelegateInteractionEvent.bind(this);this._compiler.addEventListener(null===(o=e.filter)||void 0===o?void 0:o.source,t,c),u.set(t,c)}return this}},{key:"unregister",value:function(t,e){var i,n,r,a,o=!1,s=this.getEventBubble((null===(i=null==e?void 0:e.filter)||void 0===i?void 0:i.source)||TA.chart),u=this.getEventListeners((null===(n=null==e?void 0:e.filter)||void 0===n?void 0:n.source)||TA.chart);if(e){var l=s.get(t);null==l||l.removeHandler(e),0===(null==l?void 0:l.getCount())&&(null==l||l.release(),s.delete(t),o=!0),(null===(r=null==e?void 0:e.wrappedCallback)||void 0===r?void 0:r.cancel)&&e.wrappedCallback.cancel()}else{var c=s.get(t);null==c||c.release(),s.delete(t),o=!0}if(o&&this._isValidEvent(t)){var h=u.get(t);this._compiler.removeEventListener((null===(a=null==e?void 0:e.filter)||void 0===a?void 0:a.source)||TA.chart,t,h),u.delete(t)}return this}},{key:"dispatch",value:function(t,e,i){var n=this.getEventBubble(e.source||TA.chart).get(t);if(!n)return this;var r=!1;if(i){var a=n.getHandlers(i);r=this._invoke(a,t,e)}else{var o=n.getHandlers(EA.mark);if(!(r=this._invoke(o,t,e))){var s=n.getHandlers(EA.model);r=this._invoke(s,t,e)}if(!r){var u=n.getHandlers(EA.chart);r=this._invoke(u,t,e)}if(!r){var l=n.getHandlers(EA.vchart);r=this._invoke(l,t,e)}}return this}},{key:"clear",value:function(){var t,e=b(this._viewListeners.entries());try{for(e.s();!(t=e.n()).done;){var i=t.value;this._compiler.removeEventListener(TA.chart,i[0],i[1])}}catch(t){e.e(t)}finally{e.f()}this._viewListeners.clear();var n,r=b(this._windowListeners.entries());try{for(r.s();!(n=r.n()).done;){var a=n.value;this._compiler.removeEventListener(TA.window,a[0],a[1])}}catch(t){r.e(t)}finally{r.f()}this._windowListeners.clear();var o,s=b(this._canvasListeners.entries());try{for(s.s();!(o=s.n()).done;){var u=o.value;this._compiler.removeEventListener(TA.canvas,u[0],u[1])}}catch(t){s.e(t)}finally{s.f()}this._canvasListeners.clear();var l,c=b(this._viewBubbles.values());try{for(c.s();!(l=c.n()).done;){l.value.release()}}catch(t){c.e(t)}finally{c.f()}this._viewBubbles.clear();var h,d=b(this._windowBubbles.values());try{for(d.s();!(h=d.n()).done;){h.value.release()}}catch(t){d.e(t)}finally{d.f()}this._windowBubbles.clear();var f,v=b(this._canvasBubbles.values());try{for(v.s();!(f=v.n()).done;){f.value.release()}}catch(t){v.e(t)}finally{v.f()}this._canvasBubbles.clear()}},{key:"release",value:function(){this.clear(),this.globalInstance=null,this._compiler=null}},{key:"_filter",value:function(t,e,i){var n,r,a;if(ft(t.filter)&&!t.filter(i))return!1;if(t.nodeName&&Ot(i,"node.name")!==t.nodeName)return!1;if(t.markName&&(null===(n=null==i?void 0:i.mark)||void 0===n?void 0:n.name)!==t.markName)return!1;var o=null===(r=i.model)||void 0===r?void 0:r.type;return cC[o]&&(o=cC[o]),!(t.type&&o!==t.type||"mark"===t.level&&!t.type&&!(null==i?void 0:i.mark)||"model"===t.level&&!t.type&&!(null==i?void 0:i.model)||pt(t.userId)&&(null===(a=i.model)||void 0===a?void 0:a.userId)!==t.userId)}},{key:"_prepareParams",value:function(t,e){if(t.markName&&e.mark&&e.itemMap){var i=e.mark.getProductId(),n=e.itemMap.get(i),r=null==n?void 0:n.getDatum();return Object.assign(Object.assign({},e),{item:n,datum:r})}return Object.assign({},e)}},{key:"_invoke",value:function(t,e,i){var n=this;return t.map((function(t){var r,a,o,s=t.filter;if(!t.query||n._filter(s,e,i)){var u=(t.wrappedCallback||t.callback).call(null,n._prepareParams(s,i)),l=null!=u?u:null===(r=t.query)||void 0===r?void 0:r.consume;return l&&(null===(a=i.event)||void 0===a||a.stopPropagation(),null===(o=i.event)||void 0===o||o.preventDefault()),!!l}})).some((function(t){return!0===t}))}},{key:"_getQueryLevel",value:function(t){return t?t.level?t.level:pt(t.id)?EA.model:EA.vchart:EA.vchart}},{key:"_parseQuery",value:function(t){var e,i=t.query;(null==i?void 0:i.throttle)?t.wrappedCallback=de(t.callback,i.throttle):(null==i?void 0:i.debounce)&&(t.wrappedCallback=he(t.callback,i.debounce));var n=this._getQueryLevel(i),r=null,a=TA.chart,o=null,s=null,u=null;return(null==i?void 0:i.nodeName)&&(o=i.nodeName),(null==i?void 0:i.markName)&&(s=i.markName),!(null==i?void 0:i.type)||n!==EA.model&&n!==EA.mark||(r=i.type),(null==i?void 0:i.source)&&(a=i.source),pt(null==i?void 0:i.id)&&(u=null==i?void 0:i.id,n=EA.model),t.filter={level:n,markName:s,type:r,source:a,nodeName:o,userId:u,filter:null!==(e=null==i?void 0:i.filter)&&void 0!==e?e:null},t}},{key:"getEventBubble",value:function(t){switch(t){case TA.chart:return this._viewBubbles;case TA.window:return this._windowBubbles;case TA.canvas:return this._canvasBubbles;default:return this._viewBubbles}}},{key:"getEventListeners",value:function(t){switch(t){case TA.chart:return this._viewListeners;case TA.window:return this._windowListeners;case TA.canvas:return this._canvasListeners;default:return this._viewListeners}}},{key:"_isValidEvent",value:function(t){return tT.includes(t)||Object.values(sw).includes(t)}},{key:"_isInteractionEvent",value:function(t){var e;return t&&(e=t.split(":")[0])&&zw.hasInteraction(e)}}])}();function dC(t,e,i){t.getTransform(e)||t.registerTransform(e,i)}function fC(t,e,i){t.getParser(e)||t.registerParser(e,i)}var vC=new Map;function pC(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.latestData instanceof V_&&(e=!1),e?Dt(t.latestData):t.latestData.slice()}var gC,yC=function(t,e){return 0===t.length?[]:1===t.length?pC(t[0],null==e?void 0:e.deep):t.map((function(t){return pC(t,null==e?void 0:e.deep)}))};!function(t){t[t.copyDataView=-10]="copyDataView",t[t.treemapFilter=-8]="treemapFilter",t[t.treemapFlatten=-7]="treemapFlatten",t[t.dotObjFlat=-7]="dotObjFlat",t[t.linkDotInfo=-7]="linkDotInfo",t[t.sankeyLayout=-7]="sankeyLayout",t[t.dataZoomFilter=-6]="dataZoomFilter",t[t.legendFilter=-5]="legendFilter"}(gC||(gC={}));var mC,kC,bC=function(t,e){var i={nodes:{}},n=e.fields;if(!(null==n?void 0:n.length))return i;var r,a=n.length-1,o=i;return t.forEach((function(t){t.latestData.forEach((function(t){o=i;for(var e=0;e<n.length;e++){var s=t[n[e]];if(vt(s))break;o.nodes[s]||(e===a?o.nodes[s]={values:[]}:(r={nodes:{}},o.nodes[s]=r)),e===a?o.nodes[s].values.push(t):o=o.nodes[s]}}))})),i};function _C(t){switch(t){case y_["desktop-browser"]:case y_["mobile-browser"]:return"browser";case y_.node:case y_.worker:return"node";case y_.miniApp:case y_["desktop-miniApp"]:return"feishu";case y_.lynx:return"lynx";case y_.wx:return"wx";case y_.tt:return"tt";case y_.harmony:return"harmony"}return"browser"}!function(t){t.appear="appear",t.disappear="disappear",t.enter="enter",t.update="update",t.state="state",t.exit="exit",t.normal="normal",t.none="none"}(mC||(mC={})),function(t){t.data="data",t.signal="signal",t.mark="mark"}(kC||(kC={}));var xC,wC,SC=function(){return u((function t(e,i){var n=this;o(this,t),this._viewListeners=new Map,this._windowListeners=new Map,this._canvasListeners=new Map,this.isInited=!1,this._isRunning=!1,this._released=!1,this._model=l(l(l({},kC.signal,{}),kC.data,{}),kC.mark,{}),this._compileChart=null,this.handleStageRender=function(){var t,e;null===(e=null===(t=n._compileChart)||void 0===t?void 0:t.getEvent())||void 0===e||e.emit(AA.afterRender,{chart:n._compileChart})},this._container=e,this._option=i}),[{key:"getVGrammarView",value:function(){return this._view}},{key:"getModel",value:function(){return this._model}},{key:"getRenderer",value:function(){var t;return null===(t=this._view)||void 0===t?void 0:t.renderer}},{key:"getCanvas",value:function(){var t;return null===(t=this._view)||void 0===t?void 0:t.renderer.canvas()}},{key:"getStage",value:function(){var t;return null===(t=this._view)||void 0===t?void 0:t.renderer.stage()}},{key:"initView",value:function(){var t,e,i,n,r=this;if(!this._released&&(this.isInited=!0,!this._view)){var a=new te(null!==(t=this._option.logLevel)&&void 0!==t?t:Jt.Error);(null===(e=this._option)||void 0===e?void 0:e.onError)&&a.addErrorHandler((function(){for(var t,e,i,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];null===(i=null===(e=r._option)||void 0===e?void 0:e.onError)||void 0===i||(t=i).call.apply(t,[e].concat(a))})),this._view=new PA(Object.assign(Object.assign({width:this._width,height:this._height,container:null!==(i=this._container.dom)&&void 0!==i?i:null,renderCanvas:null!==(n=this._container.canvas)&&void 0!==n?n:null,hooks:this._option.performanceHook},this._option),{mode:_C(this._option.mode),autoFit:!1,eventConfig:{gesture:Z_(this._option.mode),disable:!1===this._option.interactive},doLayout:function(){var t;null===(t=r._compileChart)||void 0===t||t.onLayout(r._view)},logger:a,logLevel:a.level()})),this._setCanvasStyle(),this.getStage().hooks.afterRender.tap("chart-event",this.handleStageRender),!1!==this._option.interactive&&this._viewListeners.forEach((function(t){var e;null===(e=r._view)||void 0===e||e.addEventListener(t.type,t.callback)}))}}},{key:"_setCanvasStyle",value:function(){if(this._view&&this._container.dom&&!bt(this._container.dom)){this._container.dom.style.display="block",this._container.dom.style.position="relative";var t=this.getCanvas();t&&(t.style.display="block")}}},{key:"compileInteractions",value:function(){var t,e=this;if(this._view.removeAllInteractions(),null===(t=this._interactions)||void 0===t?void 0:t.length){var i={};this._interactions.forEach((function(t){var n;if(t.regionId){var r="".concat(t.regionId,"-").concat(t.type,"-").concat(null!==(n=t.id)&&void 0!==n?n:""),a=i[r];i[r]=a?Object.assign(Object.assign(Object.assign({},a),t),{selector:[].concat(y(a.selector),y(t.selector))}):t}else e._view.interaction(t.type,t)})),Object.keys(i).forEach((function(t){var n=e._view.interaction(i[t].type,i[t]);if(e._compileChart){var r=e._compileChart.getRegionsInIds([i[t].regionId])[0];r&&r.interaction.addVgrammarInteraction(n.getStartState(),n)}}))}}},{key:"compile",value:function(t,e){if(!this._released){var i=t.chart;this._compileChart=i,this.initView(),this._view&&(i.compile(),i.afterCompile(),this.updateDepend(),this.compileInteractions())}}},{key:"clear",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.chart.clear(),this.releaseGrammar(e)}},{key:"renderNextTick",value:function(t){var e=this;this._released||this._nextRafId||(this._nextRafId=Zf.getRequestAnimationFrame()((function(){e._nextRafId=null,e.render(t)})))}},{key:"render",value:function(t){var e,i;this._released||(this._nextRafId&&(Zf.getCancelAnimationFrame()(this._nextRafId),this._nextRafId=null),this._isRunning||(this.initView(),this._view&&(this._isRunning=!0,null===(e=this._view)||void 0===e||e.run(t),this._isRunning=!1,this._nextRafId&&(Zf.getCancelAnimationFrame()(this._nextRafId),this._nextRafId=null,this._isRunning=!0,null===(i=this._view)||void 0===i||i.run(t),this._isRunning=!1))))}},{key:"updateViewBox",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._view&&this._view.renderer.setViewBox(t,e)}},{key:"resize",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._view&&(this._width=t,this._height=e,this._view.resize(t,e),i&&this.render({morph:!1}))}},{key:"setBackground",value:function(t){var e;null===(e=this._view)||void 0===e||e.background(t)}},{key:"setSize",value:function(t,e){this._width=t,this._height=e,this._view&&(this._view.width(t),this._view.height(e))}},{key:"setViewBox",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._view&&this._view.renderer.setViewBox(t,e)}},{key:"addEventListener",value:function(t,e,i){var n,r;if(!1!==this._option.interactive)if(t===TA.chart){var a=function(n,r){var a,o,s,u=null!==(o=null===(a=null==r?void 0:r.mark)||void 0===a?void 0:a.getContext())&&void 0!==o?o:{},l=pt(u.modelId)?u.modelId:null,c=pt(u.markId)?u.markId:null,h=pt(u.modelUserId)?u.modelUserId:null,d=pt(u.markUserId)?u.markUserId:null,f={event:n,type:e,source:t,item:r,datum:(null===(s=null==r?void 0:r.getDatum)||void 0===s?void 0:s.call(r))||null,markId:c,modelId:l,markUserId:d,modelUserId:h};i.call(null,f)}.bind(this);this._viewListeners.set(i,{type:e,callback:a}),null===(n=this._view)||void 0===n||n.addEventListener(e,a)}else if(t===TA.window){var o=function(n){var r={event:n,type:e,source:t,item:null,datum:null,markId:null,modelId:null,markUserId:null,modelUserId:null};i.call(null,r)}.bind(this);this._windowListeners.set(i,{type:e,callback:o});var s=this._getGlobalThis();null==s||s.addEventListener(e,o)}else if(t===TA.canvas){var u=function(n){var r={event:n,type:e,source:t,item:null,datum:null,markId:null,modelId:null,markUserId:null,modelUserId:null};i.call(null,r)}.bind(this);this._canvasListeners.set(i,{type:e,callback:u});var l=null===(r=this.getStage())||void 0===r?void 0:r.window;null==l||l.addEventListener(e,u)}}},{key:"removeEventListener",value:function(t,e,i){var n,r,a,o,s;if(!1!==this._option.interactive)if(t===TA.chart){var u=null===(n=this._viewListeners.get(i))||void 0===n?void 0:n.callback;u&&(null===(r=this._view)||void 0===r||r.removeEventListener(e,u)),this._viewListeners.delete(i)}else if(t===TA.window){var l=this._getGlobalThis(),c=null===(a=this._windowListeners.get(i))||void 0===a?void 0:a.callback;c&&(null==l||l.removeEventListener(e,c)),this._windowListeners.delete(i)}else if(t===TA.canvas){var h=null===(o=this.getStage())||void 0===o?void 0:o.window,d=null===(s=this._canvasListeners.get(i))||void 0===s?void 0:s.callback;h&&d&&(null==h||h.removeEventListener(e,d)),this._canvasListeners.delete(i)}}},{key:"releaseEvent",value:function(){var t=this.getStage();t&&t.hooks.afterRender.unTap("chart-event",this.handleStageRender),this._viewListeners.clear(),this._windowListeners.clear(),this._canvasListeners.clear()}},{key:"release",value:function(){var t;this.releaseEvent(),this._option=this._container=null,this._releaseModel(),null===(t=this._view)||void 0===t||t.release(),this._view=null,this.isInited=!1,this._compileChart=null,this._released=!0}},{key:"releaseGrammar",value:function(){var t,e,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._releaseModel(),i&&(null===(t=this._view)||void 0===t||t.removeAllGraphicItems()),null===(e=this._view)||void 0===e||e.removeAllGrammars()}},{key:"_releaseModel",value:function(){var t=this;Object.keys(this._model).forEach((function(e){Object.values(t._model[e]).forEach((function(t){Object.values(t).forEach((function(t){t.removeProduct(!0)}))})),t._model[e]={}}))}},{key:"addGrammarItem",value:function(t){var e=t.getProduct();if(!vt(e)){var i=e.id(),n=t.grammarType;vt(this._model[n][i])&&(this._model[n][i]={}),this._model[n][i][t.id]=t}}},{key:"removeGrammarItem",value:function(t,e){var i,n=t.getProduct();if(!vt(n)){var r=n.id(),a=t.grammarType,o=this._model[a][r];pt(o)&&(delete o[t.id],0===Object.keys(o).length&&delete this._model[a][r]),e||null===(i=this._view)||void 0===i||i.removeGrammar(n)}}},{key:"addInteraction",value:function(t){this._interactions||(this._interactions=[]),this._interactions.push(t)}},{key:"removeInteraction",value:function(t){this._interactions&&(this._interactions=this._interactions.filter((function(e){return e.seriesId!==t})))}},{key:"updateDepend",value:function(t){return pt(t)&&t.length>0?t.every((function(t){return t.updateDepend()})):(Object.values(this._model).forEach((function(t){Object.values(t).forEach((function(t){var e=Object.values(t),i=e[0].getProduct(),n=e.reduce((function(t,e){return e.getDepend().length>0?t.concat(e.getDepend()):t}),[]).filter((function(t){return!!t})).map((function(t){return t.getProduct()}));i.depend(n)}))})),!0)}},{key:"_getGlobalThis",value:function(){var t;return q_(this._option.mode)?globalThis:null===(t=this.getStage())||void 0===t?void 0:t.window}}])}(),AC=function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};function TC(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vchart",e=arguments.length>1?arguments[1]:void 0,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("target","_blank"),i.setAttribute("download","".concat(t,".png")),i.dispatchEvent(new MouseEvent("click"))}function EC(t){return new Promise((function(e){t.convertToBlob().then((function(t){var i=new FileReader;i.readAsDataURL(t),i.onload=function(){e(i.result)}}))}))}function CC(t,e){var i;return AC(this,void 0,void 0,n().mark((function r(){return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t){n.next=2;break}return n.abrupt("return","");case 2:if(n.prev=2,!(void 0!==OffscreenCanvas&&t instanceof OffscreenCanvas)){n.next=5;break}return n.abrupt("return",EC(t));case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),(null!==(i=null==e?void 0:e.onError)&&void 0!==i?i:X_)("getCanvasDataURL error : ".concat(n.t0.toString()));case 10:return n.abrupt("return",t.toDataURL());case 11:case"end":return n.stop()}}),r,null,[[2,7]])})))}!function(t){t.STATE_NORMAL="normal",t.STATE_HOVER="hover",t.STATE_HOVER_REVERSE="hover_reverse",t.STATE_DIMENSION_HOVER="dimension_hover",t.STATE_DIMENSION_HOVER_REVERSE="dimension_hover_reverse",t.STATE_SELECTED="selected",t.STATE_SELECTED_REVERSE="selected_reverse",t.STATE_SANKEY_EMPHASIS="selected",t.STATE_SANKEY_EMPHASIS_REVERSE="blur"}(xC||(xC={})),function(t){t.STATE_HOVER_REVERSE="hover_reverse",t.STATE_DIMENSION_HOVER_REVERSE="dimension_hover_reverse",t.STATE_SELECTED_REVERSE="selected_reverse"}(wC||(wC={}));var BC=function(){function t(){o(this,t),this._children=[],this._markNameMap={},this._infoMap=new Map}return u(t,[{key:"getMarkNameMap",value:function(){return this._markNameMap}},{key:"addMark",value:function(e,i){vt(e)||(this._children.push(e),this._markNameMap[e.name]=e,this._infoMap.set(e,zt({},t.defaultMarkInfo,i)))}},{key:"removeMark",value:function(t){var e=this._children.findIndex((function(e){return e.name===t}));e>=0&&(this._infoMap.delete(this._children[e]),delete this._markNameMap[t],this._children.splice(e,1))}},{key:"clear",value:function(){this._children=[],this._markNameMap={},this._infoMap.clear()}},{key:"forEach",value:function(t){this._children.forEach(t)}},{key:"includes",value:function(t,e){return this._children.includes(t,e)}},{key:"get",value:function(t){return isNaN(Number(t))?this._markNameMap[t]:this._children[t]}},{key:"getMarks",value:function(){return this._children.slice()}},{key:"getMarksInType",value:function(t){var e=Xt(t);return this._children.filter((function(t){return e.includes(t.type)}))}},{key:"getMarkInId",value:function(t){return this._children.find((function(e){return e.id===t}))}},{key:"getMarkWithInfo",value:function(t){var e=this;return this._children.find((function(i){return Object.keys(t).every((function(n){return t[n]===e._infoMap.get(i)[n]}))}))}}])}();BC.defaultMarkInfo={};var MC=function(){return u((function t(e){var i=this;o(this,t),this._marks=new BC,this._markReverse=new BC,this.onHover=function(t){switch(t.action){case"enter":i.interaction.getEventElement(xC.STATE_DIMENSION_HOVER).forEach((function(t){return i.interaction.addEventElement(xC.STATE_DIMENSION_HOVER_REVERSE,t)})),i.interaction.clearEventElement(xC.STATE_DIMENSION_HOVER,!1),i.getEventElement(t).forEach((function(t){return i.interaction.addEventElement(xC.STATE_DIMENSION_HOVER,t)})),i.interaction.reverseEventElement(xC.STATE_DIMENSION_HOVER);break;case"leave":i.interaction.clearEventElement(xC.STATE_DIMENSION_HOVER,!0),t=null}},this._option=e,this.event=this._option.model.getOption().getChart().getEvent(),this.interaction=e.interaction,this.initConfig(e.mode)}),[{key:"hover",get:function(){return this._hover}},{key:"select",get:function(){return this._select}},{key:"setStateKeys",value:function(t){}},{key:"registerMark",value:function(t){Pt(t.stateStyle[xC.STATE_DIMENSION_HOVER])||this._marks.addMark(t),Pt(t.stateStyle[xC.STATE_DIMENSION_HOVER_REVERSE])||this._markReverse.addMark(t)}},{key:"init",value:function(){this.initEvent()}},{key:"release",value:function(){this.releaseEvent()}},{key:"initEvent",value:function(){this.event.on(ZE.dimensionHover,this.onHover)}},{key:"releaseEvent",value:function(){this.event.release()}},{key:"initConfig",value:function(t){}},{key:"getEventElement",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];return t.dimensionInfo.forEach((function(t){t.data.forEach((function(t){(i?e._markReverse:e._marks).getMarks().filter((function(e){return e.model===t.series&&e.getVisible()})).forEach((function(e){var r=e.getProduct();if(r&&r.elements){var a=r.elements.filter((function(e){var n,r=e.getDatum();return n=_t(r)?r.every((function(e,i){return e===t.datum[i]})):t.datum.some((function(t){return t===r})),i?!n:n}));n.push.apply(n,y(a))}}))}))})),n}}])}();var RC={};Object.values(xC).forEach((function(t){RC[t]=!0}));var PC=l(l(l({},xC.STATE_HOVER,xC.STATE_HOVER_REVERSE),xC.STATE_SELECTED,xC.STATE_SELECTED_REVERSE),xC.STATE_DIMENSION_HOVER,xC.STATE_DIMENSION_HOVER_REVERSE);function OC(t){return PC[t]}var IC=function(){return u((function t(){o(this,t),this._stateMarks=new Map,this._stateElements=new Map,this._vgrammarInteractions=new Map,this._disableTriggerEvent=!1}),[{key:"addVgrammarInteraction",value:function(t,e){t&&(this._vgrammarInteractions.get(t)?this._vgrammarInteractions.get(t).push(e):this._vgrammarInteractions.set(t,[e]))}},{key:"setDisableActiveEffect",value:function(t){this._disableTriggerEvent=t}},{key:"registerMark",value:function(t,e){var i;this._stateMarks.has(t)||this._stateMarks.set(t,[]),null===(i=this._stateMarks.get(t))||void 0===i||i.push(e)}},{key:"getStateMark",value:function(t){return this._stateMarks.get(t)}},{key:"filterEventMark",value:function(t,e){var i;return!(!t.mark||!(null===(i=this._stateMarks.get(e))||void 0===i?void 0:i.includes(t.mark)))}},{key:"getEventElement",value:function(t){var e;return null!==(e=this._stateElements.get(t))&&void 0!==e?e:[]}},{key:"getEventElementData",value:function(t){return this.getEventElement(t).map((function(t){return t.getDatum()}))}},{key:"exchangeEventElement",value:function(t,e){var i,n=this;if(!this._disableTriggerEvent){var r=OC(t);null===(i=this._stateElements.get(t))||void 0===i||i.forEach((function(e){e.removeState(t),r&&n.addEventElement(r,e)})),e.getStates().includes(t)||(e.addState(t),r&&e.removeState(r)),this._stateElements.set(t,[e])}}},{key:"removeEventElement",value:function(t,e){var i,n;if(!this._disableTriggerEvent){e.removeState(t);var r=null!==(n=null===(i=this._stateElements.get(t))||void 0===i?void 0:i.filter((function(t){return t!==e})))&&void 0!==n?n:[];this._stateElements.set(t,r);var a=OC(t);a&&(0===r.length?this.clearEventElement(a,!1):this.addEventElement(a,e))}}},{key:"addEventElement",value:function(t,e){var i;if(!this._disableTriggerEvent){e.getStates().includes(t)||e.addState(t);var n=null!==(i=this._stateElements.get(t))&&void 0!==i?i:[];n.push(e),this._stateElements.set(t,n)}}},{key:"clearEventElement",value:function(t,e){var i;if(!this._disableTriggerEvent&&(null===(i=this._stateElements.get(t))||void 0===i||i.forEach((function(e){e.removeState(t)})),this._stateElements.set(t,[]),e)){var n=OC(t);n&&this.clearEventElement(n,!1)}}},{key:"reverseEventElement",value:function(t){var e=this;if(!this._disableTriggerEvent){var i=OC(t);if(i){var n=this.getStateMark(i);if(n){var r=this.getEventElement(t);r.length&&(this.getEventElement(i).length||(1===r.length?n.forEach((function(t){t.getProduct().elements.filter((function(t){return t!==r[0]})).forEach((function(t){e.addEventElement(i,t)}))})):n.forEach((function(t){t.getProduct().elements.filter((function(t){return!r.includes(t)})).forEach((function(t){e.addEventElement(i,t)}))}))))}}}}},{key:"startInteraction",value:function(t,e){var i=this._vgrammarInteractions.get(t);i&&i.forEach((function(t){t.start(e)}))}},{key:"resetInteraction",value:function(t,e){var i=this._vgrammarInteractions.get(t);i&&i.forEach((function(t){t.reset(e)}))}}],[{key:"markStateEnable",value:function(t,e){return!Pt(t.stateStyle[e])}}])}(),LC=function(){return u((function t(e){o(this,t),this._option=e,this.getCompiler=this._option.getCompiler}),[{key:"getOption",value:function(){return this._option}},{key:"getVGrammarView",value:function(){var t;return null===(t=this.getCompiler())||void 0===t?void 0:t.getVGrammarView()}},{key:"release",value:function(){this._option=null,this.getCompiler=null}}])}(),DC=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).id=Q_(),t._compiledProductId=null,t._depend=[],t}return c(i,t),u(i,[{key:"getProduct",value:function(){if(pt(this._product))return this._product;var t=this.getVGrammarView(),e=this.getProductId();return pt(e)&&pt(t)&&(this._product=this._lookupGrammar(e)),this._product}},{key:"getProductId",value:function(){var t;return null!==(t=this._compiledProductId)&&void 0!==t?t:this.generateProductId()}},{key:"getDepend",value:function(){return this._depend}},{key:"setDepend",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._depend=e}},{key:"compile",value:function(t){this._compileProduct(t),this._afterCompile(t)}},{key:"_afterCompile",value:function(t){var e;pt(this._product)&&(null===(e=this.getCompiler())||void 0===e||e.addGrammarItem(this))}},{key:"updateDepend",value:function(){if(pt(this._product)){var t=this.getDepend().map((function(t){return t.getProduct()})).filter(pt);return this._product.depend(t),t.length===this.getDepend().length}return!1}},{key:"release",value:function(){this.removeProduct(),p(h(i.prototype),"release",this).call(this),this._depend=[]}},{key:"removeProduct",value:function(t){this.getCompiler().removeGrammarItem(this,t),this._product=null,this._compiledProductId=null}}])}(LC),jC=function(t){function i(t,n,r,a){var s;return o(this,i),(s=e(this,i,[t])).grammarType=kC.signal,s.name=n,s._value=r,s._updateFunc=a,s}return c(i,t),u(i,[{key:"getValue",value:function(){return this._value}},{key:"getUpdateFunc",value:function(){return this._updateFunc}},{key:"updateSignal",value:function(t,e){this._value=t,this._updateFunc=e,this.compile()}},{key:"_compileProduct",value:function(){var t=this.getVGrammarView();if(t){if(!this.getProduct()){var e=this.getProductId();this._product=t.signal().id(e),this._compiledProductId=e}pt(this._value)&&this._product.value(this._value),pt(this._updateFunc)&&this._product.update(this._updateFunc)}}},{key:"generateProductId",value:function(){return this.name}},{key:"_lookupGrammar",value:function(t){var e;return null===(e=this.getCompiler().getVGrammarView())||void 0===e?void 0:e.getSignalById(t)}}])}(DC),FC=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments))._signalMap={},t}return c(i,t),u(i,[{key:"getSignalMap",value:function(){return this._signalMap}},{key:"getSignal",value:function(t){return this._signalMap[t]}},{key:"updateSignal",value:function(t,e,i){this._signalMap[t]?this._signalMap[t].updateSignal(e,i):(this._signalMap[t]=new jC(this._option,t,e,i),this._signalMap[t].compile())}},{key:"compile",value:function(){Object.values(this._signalMap).forEach((function(t){t.compile()}))}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this),Object.values(this._signalMap).forEach((function(t){t.release()})),this._signalMap={}}}])}(LC),NC=function(t){function i(t){var n;return o(this,i),n=e(this,i,[t]),t.stateKeyToSignalName?n.stateKeyToSignalName=t.stateKeyToSignalName:n.stateKeyToSignalName=function(){return"state_signal"},n.initStateMap(),n}return c(i,t),u(i,[{key:"getStateMap",value:function(){return this._stateMap}},{key:"_getDefaultStateMap",value:function(){return{}}},{key:"initStateMap",value:function(t){this._stateMap=null!=t?t:this._getDefaultStateMap()}},{key:"compile",value:function(t){var e=this,i=null!=t?t:this._stateMap;Object.keys(i).forEach((function(t){var n=e.stateKeyToSignalName(t),r=i[t];e.updateSignal(n,r)}))}},{key:"updateState",value:function(t,e){if(t&&(zt(this._stateMap,t),this.compile(t),!e))return this.getCompiler().renderNextTick()}}])}(FC),zC=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).id=Q_(),t.stateKeyToSignalName=function(e){return"".concat(cw,"_animate_").concat(t.id,"_").concat(e)},t}return c(i,t),u(i,[{key:"getAnimationStateSignalName",value:function(){return this.stateKeyToSignalName("animationState")}},{key:"updateAnimateState",value:function(t,e){t===mC.update?this.updateState({animationState:{callback:function(t,e){return e.diffState}}},e):t===mC.appear?this.updateState({animationState:{callback:function(t,e){return"exit"===e.diffState?mC.none:mC.appear}}},e):this.updateState({animationState:{callback:function(e,i){return t}}},e)}},{key:"_getDefaultStateMap",value:function(){return{animationState:{callback:function(t,e){return"exit"===e.diffState?mC.exit:mC.appear}}}}}])}(NC),GC=function(){return u((function t(e){o(this,t),this._option=e,this.type=e.type}),[{key:"_initTheme",value:function(t,e){return this._theme=this.getTheme(t,e),this._mergeThemeToSpec(t,e)}},{key:"getTheme",value:function(t,e){}},{key:"transformSpec",value:function(t,e,i){this._transformSpecBeforeMergingTheme(t,e,i);var n=this._initTheme(t,e);return this._transformSpecAfterMergingTheme(n.spec,e,i),n}},{key:"_transformSpecBeforeMergingTheme",value:function(t,e,i){}},{key:"_transformSpecAfterMergingTheme",value:function(t,e,i){}},{key:"_mergeThemeToSpec",value:function(t,e){var i=this._theme;if(this._shouldMergeThemeToSpec()){var n=this._getDefaultSpecFromChart(e),r=function(t){return SE({},i,n,t)};return _t(t)?{spec:t.map((function(t){return r(t)})),theme:i}:{spec:r(t),theme:i}}return{spec:t,theme:i}}},{key:"_shouldMergeThemeToSpec",value:function(){return!0}},{key:"_getDefaultSpecFromChart",value:function(t){}}])}(),UC=function(t){function i(t,n){var r,a;return o(this,i),(r=e(this,i,[n])).transformerConstructor=GC,r.type="null",r.modelType="null",r.userId=void 0,r._data=null,r._layout=null,r.specKey="",r._marks=new BC,r._lastLayoutRect=null,r.id=Q_(),r.userId=t.id,r._spec=t,r.effect={},r.event=new uC(n.eventDispatcher,n.mode),null===(a=n.map)||void 0===a||a.set(r.id,f(r)),r}return c(i,t),u(i,[{key:"getSpec",value:function(){return this._spec||{}}},{key:"getSpecPath",value:function(){var t;return null===(t=this._option)||void 0===t?void 0:t.specPath}},{key:"getSpecInfoPath",value:function(){var t,e,i;return null!==(e=null===(t=this._option)||void 0===t?void 0:t.specInfoPath)&&void 0!==e?e:null===(i=this._option)||void 0===i?void 0:i.specPath}},{key:"getData",value:function(){return this._data}},{key:"layout",get:function(){return this._layout}},{key:"getOption",value:function(){return this._option}},{key:"getMarks",value:function(){var t,e;return null!==(e=null===(t=this._marks)||void 0===t?void 0:t.getMarks())&&void 0!==e?e:[]}},{key:"getMarkNameMap",value:function(){var t;return null===(t=this._marks)||void 0===t?void 0:t.getMarkNameMap()}},{key:"getMarkSet",value:function(){return this._marks}},{key:"getMarkInfoList",value:function(){return this.getMarks().map((function(t){return{type:t.type,name:t.name}}))}},{key:"getChart",value:function(){return this._option.getChart()}},{key:"_theme",get:function(){var t;return null===(t=this.getSpecInfo())||void 0===t?void 0:t.theme}},{key:"_releaseEvent",value:function(){this.event.release()}},{key:"created",value:function(){this.setAttrFromSpec()}},{key:"init",value:function(t){}},{key:"afterInit",value:function(){}},{key:"getVisible",value:function(){var t;return!1!==(null===(t=this._spec)||void 0===t?void 0:t.visible)}},{key:"onLayoutStart",value:function(t,e,i){var n;null===(n=this._layout)||void 0===n||n.onLayoutStart(t,e,i)}},{key:"onLayoutEnd",value:function(t){var e;null===(e=this._layout)||void 0===e||e.onLayoutEnd(t),this.getMarks().forEach((function(t){return t.updateLayoutState(!0,!0)}))}},{key:"onEvaluateEnd",value:function(t){}},{key:"onDataUpdate",value:function(){}},{key:"beforeRelease",value:function(){}},{key:"release",value:function(){var t;this._releaseEvent(),this._spec=void 0,this.getMarks().forEach((function(t){return t.release()})),null===(t=this._data)||void 0===t||t.release(),this._data=null,this._marks.clear(),p(h(i.prototype),"release",this).call(this)}},{key:"updateSpec",value:function(t){var e=this._compareSpec(t,this._spec);return this._spec=t,e}},{key:"_compareSpec",value:function(t,e){return{change:!1,reMake:!1,reRender:!1,reSize:!1,reCompile:!1}}},{key:"reInit",value:function(t){t&&(this._spec=t),this.setAttrFromSpec()}},{key:"updateLayoutAttribute",value:function(){}},{key:"setAttrFromSpec",value:function(){var t;null===(t=this._layout)||void 0===t||t.setAttrFromSpec(this._spec,this._option.getChartViewRect())}},{key:"_convertMarkStyle",value:function(t){return Object.assign({},t)}},{key:"setMarkStyle",value:function(t,e,i,n){pt(t)&&pt(e)&&t.setStyle(this._convertMarkStyle(e),i,n)}},{key:"initMarkStyleWithSpec",value:function(t,e,i){var n=this;if(pt(t)&&pt(e)){var r=e.style,a=e.state,o=Object.assign({},e);r&&(o.style=this._convertMarkStyle(r)),a&&(o.state={},Object.keys(a).forEach((function(t){o.state[t]=n._convertMarkStyle(a[t])}))),t.initStyleWithSpec(o,i)}}},{key:"stateKeyToSignalName",value:function(t,e){var i="".concat(cw,"_").concat(this.modelType,"_").concat(this.type,"_").concat(this.id,"_").concat(t);return e&&(i+="_".concat(e)),i}},{key:"compileData",value:function(){var t;null===(t=this._data)||void 0===t||t.compile()}},{key:"compileMarks",value:function(t){this.getMarks().forEach((function(e){e.compile({group:t})}))}},{key:"_createMark",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.type,n=t.name,r=VE.createMark(i,n,Object.assign({model:this,map:this._option.map,getCompiler:this.getCompiler,globalScale:this._option.globalScale},e));return null==r||r.created(),r}},{key:"_getDataIdKey",value:function(){}},{key:"getColorScheme",value:function(){var t,e;return null===(e=(t=this._option).getTheme)||void 0===e?void 0:e.call(t).colorScheme}},{key:"getSpecInfo",value:function(){var t,e,i;return function(t,e,i){if(!vt(e))return Ot(t,e,i)}(null!==(i=null===(e=(t=this._option).getSpecInfo)||void 0===e?void 0:e.call(t))&&void 0!==i?i:{},this.getSpecInfoPath())}},{key:"getSpecIndex",value:function(){var t=this.getSpecPath();if(!(null==t?void 0:t.length))return 0;var e=Number(t[t.length-1]);return isNaN(e)?0:e}}])}(LC),WC=function(){return u((function t(e,i){var n,r=this;o(this,t),this.layoutClip=!1,this.autoIndent=!1,this._layoutStartPoint={x:0,y:0},this._layoutRect={width:0,height:0},this._layoutRectLevelMap={width:0,height:0},this._minWidth=null,this._maxWidth=null,this._minHeight=null,this._maxHeight=null,this._lastComputeRect=null,this._lastComputeOutBounds={x1:0,x2:0,y1:0,y2:0},this.getLayoutRect=function(){return r._layoutRect},this.layoutType="normal",this._layoutOrient="left",this.layoutPaddingLeft=0,this.layoutPaddingTop=0,this.layoutPaddingRight=0,this.layoutPaddingBottom=0,this.layoutOffsetX=0,this.layoutOffsetY=0,this.layoutLevel=MA.Region,this._model=e,this._option=i,this.layoutLevel=i.layoutLevel,this.layoutType=i.layoutType,i.layoutOrient&&(this.layoutOrient=i.layoutOrient),this._spec=null===(n=null==e?void 0:e.getSpec)||void 0===n?void 0:n.call(e)}),[{key:"getSpec",value:function(){return this._spec||{}}},{key:"getLayoutStartPoint",value:function(){return this._layoutStartPoint}},{key:"layoutRectLevelMap",get:function(){return this._layoutRectLevelMap}},{key:"minWidth",get:function(){return this._minWidth},set:function(t){this._minWidth=t}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth=t}},{key:"minHeight",get:function(){return this._minHeight},set:function(t){this._minHeight=t}},{key:"maxHeight",get:function(){return this._maxHeight},set:function(t){this._maxHeight=t}},{key:"getLastComputeOutBounds",value:function(){return this._lastComputeOutBounds}},{key:"layoutOrient",get:function(){return this._layoutOrient},set:function(t){this._layoutOrient=t}},{key:"model",get:function(){return this._model}},{key:"type",get:function(){return this._model.type}},{key:"_setLayoutAttributeFromSpec",value:function(t,e){var i,n,r,a;if(this._spec&&!1!==this._spec.visible){var o=function(t,e,i){var n,r,a,o,s={top:0,bottom:0,left:0,right:0};return Object.values(t).every((function(t){return St(t)}))?(s.top=null!==(n=t.top)&&void 0!==n?n:0,s.right=null!==(r=t.right)&&void 0!==r?r:0,s.bottom=null!==(a=t.bottom)&&void 0!==a?a:0,s.left=null!==(o=t.left)&&void 0!==o?o:0,s):([{orients:["left","right"],size:e.width},{orients:["top","bottom"],size:e.height}].forEach((function(e){e.orients.forEach((function(n){s[n]=QT(t[n],e.size,i)}))})),s)}(tE(t.padding),e,e);this.layoutPaddingLeft=o.left,this.layoutPaddingRight=o.right,this.layoutPaddingTop=o.top,this.layoutPaddingBottom=o.bottom,this._minHeight=vt(t.minHeight)?null!==(i=this._minHeight)&&void 0!==i?i:null:QT(t.minHeight,e.height,e),this._maxHeight=vt(t.maxHeight)?null!==(n=this._maxHeight)&&void 0!==n?n:null:QT(t.maxHeight,e.height,e),this._minWidth=vt(t.minWidth)?null!==(r=this._minWidth)&&void 0!==r?r:null:QT(t.minWidth,e.width,e),this._maxWidth=vt(t.maxWidth)?null!==(a=this._maxWidth)&&void 0!==a?a:null:QT(t.maxWidth,e.width,e),t.width&&this.setLayoutRect({width:QT(t.width,e.width,e)},{width:9}),t.height&&this.setLayoutRect({height:QT(t.height,e.height,e)},{height:9}),vt(t.offsetX)||(this.layoutOffsetX=QT(t.offsetX,e.width,e)),vt(t.offsetY)||(this.layoutOffsetY=QT(t.offsetY,e.height,e)),t.alignSelf&&(this.alignSelf=t.alignSelf)}}},{key:"setAttrFromSpec",value:function(t,e){var i,n,r,a;this._spec=t,this.layoutType=null!==(i=t.layoutType)&&void 0!==i?i:this.layoutType,this.layoutLevel=null!==(n=t.layoutLevel)&&void 0!==n?n:this.layoutLevel,this.layoutOrient=null!==(r=t.orient)&&void 0!==r?r:this.layoutOrient,this._setLayoutAttributeFromSpec(t,e),this.layoutClip=null!==(a=t.clip)&&void 0!==a?a:this.layoutClip}},{key:"onLayoutStart",value:function(t,e,i){this._setLayoutAttributeFromSpec(this._spec,e)}},{key:"onLayoutEnd",value:function(t){}},{key:"_getAbsoluteSpecValue",value:function(t){var e=this,i={top:null,bottom:null,left:null,right:null};return["top","bottom","left","right"].forEach((function(n){vt(e._spec[n])||(i[n]=QT(e._spec[n],"top"===n||"bottom"===n?t.height:t.width,t))})),i}},{key:"absoluteLayoutInRect",value:function(t){var e=this._getAbsoluteSpecValue(t),i=e.top,n=e.bottom,r=e.left,a=e.right,o={width:t.width-this.layoutPaddingLeft-this.layoutPaddingRight,height:t.height-this.layoutPaddingTop-this.layoutPaddingBottom};vt(r)||(o.width-=r),vt(a)||(o.width-=a),vt(i)||(o.height-=i),vt(n)||(o.height-=n),this.setLayoutRect(o);var s=this.computeBoundsInRect(this.getLayoutRect()),u=s.width,l=s.height;this.setLayoutRect({width:u,height:l});var c={x:t.x,y:t.y};!0===this._spec.center?(c.x=t.x+.5*t.width-.5*u,c.y=t.y+.5*t.height-.5*l):(vt(r)?vt(a)||(c.x=t.x+t.width-this.layoutPaddingRight-a-u):c.x=t.x+r+this.layoutPaddingLeft,vt(i)?vt(n)||(c.y=t.y+t.height-this.layoutPaddingBottom-n-l):c.y=t.y+i+this.layoutPaddingTop),this.setLayoutStartPosition(c)}},{key:"setLayoutStartPosition",value:function(t){var e,i;this._option.transformLayoutPosition&&(t=this._option.transformLayoutPosition(t)),At(t.x)&&(this._layoutStartPoint.x=t.x),At(t.y)&&(this._layoutStartPoint.y=t.y),null===(i=(e=this._model).afterSetLayoutStartPoint)||void 0===i||i.call(e,this._layoutStartPoint)}},{key:"setLayoutRect",value:function(t,e){var i,n,r,a,o=t.width,s=t.height;At(o)&&(null!==(i=null==e?void 0:e.width)&&void 0!==i?i:0)>=this._layoutRectLevelMap.width&&(this._layoutRect.width=o,this._layoutRectLevelMap.width=null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0),At(s)&&(null!==(r=null==e?void 0:e.height)&&void 0!==r?r:0)>=this._layoutRectLevelMap.height&&(this._layoutRect.height=s,this._layoutRectLevelMap.height=null!==(a=null==e?void 0:e.height)&&void 0!==a?a:0),this.setRectInSpec(this._layoutRect)}},{key:"getLayout",value:function(){return{x:this._layoutStartPoint.x,y:this._layoutStartPoint.y,width:this._layoutRect.width,height:this._layoutRect.height}}},{key:"mergeLayoutRect",value:function(t){var e={width:t.width,height:t.height};return this._layoutRectLevelMap.width>0&&(e.width=this._layoutRect.width),this._layoutRectLevelMap.height>0&&(e.height=this._layoutRect.height),e}},{key:"getOrientPosAttribute",value:function(){return"bottom"===this._layoutOrient||"top"===this._layoutOrient?"x":"y"}},{key:"getOrientSizeAttribute",value:function(){return"bottom"===this._layoutOrient||"top"===this._layoutOrient?"width":"height"}},{key:"changeBoundsBySetting",value:function(t){return this._layoutRectLevelMap.width>0&&(t.x2=t.x1+this._layoutRect.width),this._layoutRectLevelMap.height>0&&(t.y2=t.y1+this._layoutRect.height),t.x1-=this._layoutStartPoint.x,t.x2-=this._layoutStartPoint.x,t.y1-=this._layoutStartPoint.y,t.y2-=this._layoutStartPoint.y,t}},{key:"setRectInSpec",value:function(t){var e=Object.assign({},t);return this._layoutRectLevelMap.width<9?(vt(this._minWidth)||(e.width=Math.max(e.width,this._minWidth)),vt(this._maxWidth)||(e.width=Math.min(e.width,this._maxWidth))):e.width=this._layoutRect.width,this._layoutRectLevelMap.height<9?(vt(this._minHeight)||(e.height=Math.max(e.height,this._minHeight)),vt(this._maxHeight)||(e.height=Math.min(e.height,this._maxHeight))):e.height=this._layoutRect.height,e}},{key:"computeBoundsInRect",value:function(t){if(this._lastComputeRect=t,!("region-relative"!==this.layoutType&&"region-relative-overlap"!==this.layoutType||(9!==this._layoutRectLevelMap.width||"left"!==this.layoutOrient&&"right"!==this.layoutOrient)&&(9!==this._layoutRectLevelMap.height||"bottom"!==this.layoutOrient&&"top"!==this.layoutOrient)))return this._layoutRect;var e=Object.assign({},this._model.getBoundsInRect(this.setRectInSpec(t),t));this.changeBoundsBySetting(e),this.autoIndent&&e.x2-e.x1>0&&e.y2-e.y1>0&&(this._lastComputeOutBounds.x1=Math.ceil(-e.x1),this._lastComputeOutBounds.x2=Math.ceil(e.x2-t.width),this._lastComputeOutBounds.y1=Math.ceil(-e.y1),this._lastComputeOutBounds.y2=Math.ceil(e.y2-t.height));var i=this.setRectInSpec(function(t,e){return t?{width:Math.ceil(Math.min(t.x2-t.x1,e.width)),height:Math.ceil(Math.min(t.y2-t.y1,e.height))}:{width:0,height:0}}(e,t));return this._option.transformLayoutRect&&(i=this._option.transformLayoutRect(i)),i}},{key:"getModelId",value:function(){return this._model.id}},{key:"getModelVisible",value:function(){return this._model.getVisible()}}])}(),VC=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).layoutType="normal",t.layoutLevel=0,t.layoutZIndex=0,t._forceLayoutTag=!1,t._layout=null,t._orient=null,t._layoutRect={width:0,height:0},t._layoutStartPos={x:0,y:0},t._isLayout=!0,t.getGraphicBounds=function(){return t._layout?{x1:t._layout.getLayoutStartPoint().x,y1:t._layout.getLayoutStartPoint().y,x2:t._layout.getLayoutStartPoint().x+t._layout.getLayoutRect().width,y2:t._layout.getLayoutStartPoint().y+t._layout.getLayoutRect().height}:{x1:0,x2:0,y1:0,y2:0}},t._transformLayoutRect=null,t._transformLayoutPosition=null,t}return c(i,t),u(i,[{key:"layoutOrient",get:function(){return this._orient},set:function(t){this._orient=t,this._layout&&(this._layout.layoutOrient=t)}},{key:"initLayout",value:function(){"none"!==this.layoutType&&(this._layout=new WC(this,{layoutType:this.layoutType,layoutLevel:this.layoutLevel,layoutOrient:this._orient,transformLayoutRect:this._transformLayoutRect,transformLayoutPosition:this._transformLayoutPosition}),this._orient&&"radius"!==this._orient&&"angle"!==this._orient&&this._layout&&(this._layout.layoutOrient=this._orient))}},{key:"onLayoutStart",value:function(t,e,n){this._isLayout=!0,p(h(i.prototype),"onLayoutStart",this).call(this,t,e,n)}},{key:"onLayoutEnd",value:function(t){p(h(i.prototype),"onLayoutEnd",this).call(this,t),this.updateLayoutAttribute();var e=this.getLayoutRect();!this._forceLayoutTag&&Wt(this._lastLayoutRect,e)||(this._lastLayoutRect=Object.assign({},e)),this._forceLayoutTag=!1,this._isLayout=!1}},{key:"afterSetLayoutStartPoint",value:function(t){}},{key:"_forceLayout",value:function(){var t;this._isLayout||(this._forceLayoutTag=!0,null===(t=this._option.globalInstance.getChart())||void 0===t||t.setLayoutTag(!0))}},{key:"getLayoutStartPoint",value:function(){return this._layout?this._layout.getLayoutStartPoint():this._layoutStartPos}},{key:"setLayoutStartPosition",value:function(t){return this._layout?this._layout.setLayoutStartPosition(t):this._layoutStartPos=zt(this._layoutStartPos,t)}},{key:"getLayoutRect",value:function(){return this._layout?this._layout.getLayoutRect():this._layoutRect}},{key:"setLayoutRect",value:function(t,e){return this._layout?this._layout.setLayoutRect(t):this._lastLayoutRect=zt(this._layoutRect,t)}},{key:"getLastComputeOutBounds",value:function(){var t;return null===(t=this._layout)||void 0===t?void 0:t.getLastComputeOutBounds()}},{key:"setAttrFromSpec",value:function(){var t,e,n,r,a;p(h(i.prototype),"setAttrFromSpec",this).call(this),this.layoutClip=null!==(t=this._spec.clip)&&void 0!==t?t:this.layoutClip,this.layoutZIndex=null!==(e=this._spec.zIndex)&&void 0!==e?e:this.layoutZIndex,this.layoutType=null!==(n=this._spec.layoutType)&&void 0!==n?n:this.layoutType,this._orient=null!==(r=this._spec.orient)&&void 0!==r?r:this._orient,this.layoutLevel=null!==(a=this._spec.layoutLevel)&&void 0!==a?a:this.layoutLevel}}])}(UC),HC=function(t){function i(){return o(this,i),e(this,i,arguments)}return c(i,t),u(i,[{key:"_initTheme",value:function(t,e){return{spec:t,theme:this._theme}}}])}(GC),XC=function(t){function i(t,n){var r,a;return o(this,i),(r=e(this,i,[t,n])).transformerConstructor=HC,r.modelType="region",r.specKey="region",r.type=i.type,r._series=[],r.layoutType="region",r.layoutZIndex=BA.Region,r.interaction=new IC,r.seriesDataFilterOver=function(){r.event.emit(AA.regionSeriesDataFilterOver,{model:f(r),chart:r.getChart()}),r._series.forEach((function(t){t.getViewDataFilter()&&t.reTransformViewData()}))},r.getBoundsInRect=function(){return{x1:r._layout.getLayoutStartPoint().x,y1:r._layout.getLayoutStartPoint().y,x2:r._layout.getLayoutStartPoint().x+r._layout.getLayoutRect().width,y2:r._layout.getLayoutStartPoint().y+r._layout.getLayoutRect().height}},r.userId=t.id,r.coordinate=null!==(a=t.coordinate)&&void 0!==a?a:"cartesian",r._option.animation&&(r.animate=new zC({getCompiler:n.getCompiler})),r.interaction.setDisableActiveEffect(r._option.disableTriggerEvent),r}return c(i,t),u(i,[{key:"getMaxWidth",value:function(){return this._layout.maxWidth}},{key:"setMaxWidth",value:function(t){this._layout.maxWidth=t}},{key:"getMaxHeight",value:function(){return this._layout.maxHeight}},{key:"setMaxHeight",value:function(t){this._layout.maxHeight=t}},{key:"getGroupMark",value:function(){return this._groupMark}},{key:"getInteractionMark",value:function(){return this._interactionMark}},{key:"getStackInverse",value:function(){return!0===this._spec.stackInverse}},{key:"getStackSort",value:function(){return!0===this._spec.stackSort}},{key:"_getClipDefaultValue",value:function(){var t,e,i,n,r=this._option.getChart().getSpec(),a=null===(e=null===(t=r.dataZoom)||void 0===t?void 0:t.some)||void 0===e?void 0:e.call(t,(function(t){var e;return"axis"===(null!==(e=t.filterMode)&&void 0!==e?e:"filter")})),o=null===(n=null===(i=r.scrollBar)||void 0===i?void 0:i.some)||void 0===n?void 0:n.call(i,(function(t){var e;return"axis"===(null!==(e=t.filterMode)&&void 0!==e?e:"axis")}));return!(!a&&!o)||this._layout.layoutClip}},{key:"created",value:function(){var t,e=this;this.initLayout(),p(h(i.prototype),"created",this).call(this);var n=null!==(t=this._spec.clip)&&void 0!==t?t:this._getClipDefaultValue();this._groupMark=this._createGroupMark("regionGroup",this.userId,this.layoutZIndex),this._interactionMark=this._createGroupMark("regionInteractionGroup",this.userId+"_interaction",BA.Interaction),Pt(this._spec.style)||(this._backgroundMark=this._createMark({type:"rect",name:"regionBackground"}),n&&(this._foregroundMark=this._createMark({type:"rect",name:"regionForeground"})),[this._backgroundMark,this._foregroundMark].forEach((function(t){t&&(t.created(),e.setMarkStyle(t,{width:function(){return e.getLayoutRect().width},height:function(){return e.getLayoutRect().height}},"normal",CA.Built_In),e._groupMark.addMark(t))})),this._backgroundMark&&this._backgroundMark.setZIndex(0),this._foregroundMark&&this._foregroundMark.setZIndex(BA.Mark+1)),this.createTrigger()}},{key:"_createGroupMark",value:function(t,e,i){var n,r,a=this,o=this._createMark({type:"group",name:t});o.setUserId(e),o.setZIndex(i);var s=null!==(n=this._spec.clip)&&void 0!==n?n:this._getClipDefaultValue();return this.setMarkStyle(o,{x:function(){return a.getLayoutStartPoint().x},y:function(){return a.getLayoutStartPoint().y},width:function(){return a.getLayoutRect().width},height:function(){return a.getLayoutRect().height},clip:s},"normal",CA.Built_In),this.setMarkStyle(o,{cornerRadius:null===(r=this._spec.style)||void 0===r?void 0:r.cornerRadius},"normal",CA.User_Mark),this._marks.addMark(o),o}},{key:"init",value:function(t){p(h(i.prototype),"init",this).call(this,t),this.initMark(),this.initSeriesDataflow(),this.initInteraction(),this.initTrigger()}},{key:"initMark",value:function(){this._initBackgroundMarkStyle(),this._initForegroundMarkStyle()}},{key:"_initBackgroundMarkStyle",value:function(){var t,e;this._backgroundMark&&(this.setMarkStyle(this._backgroundMark,Object.assign({fillOpacity:(null===(t=this._spec.style)||void 0===t?void 0:t.fill)?1:0},this._spec.style),"normal",CA.User_Mark),(null!==(e=this._spec.clip)&&void 0!==e?e:this._getClipDefaultValue())&&this.setMarkStyle(this._backgroundMark,{strokeOpacity:0},"normal",CA.Built_In))}},{key:"_initForegroundMarkStyle",value:function(){this._foregroundMark&&this.setMarkStyle(this._foregroundMark,Object.assign(Object.assign({},this._spec.style),{fillOpacity:0}),"normal",CA.User_Mark)}},{key:"_compareSpec",value:function(t,e){var n=p(h(i.prototype),"_compareSpec",this).call(this,t,e);return Wt(null==e?void 0:e.style,null==t?void 0:t.style)||(n.reMake=!0),n}},{key:"reInit",value:function(t){p(h(i.prototype),"reInit",this).call(this,t),this._initBackgroundMarkStyle(),this._initForegroundMarkStyle()}},{key:"addSeries",value:function(t){t&&(this._series.includes(t)||this._series.push(t))}},{key:"removeSeries",value:function(t){if(t){var e=this._series.findIndex((function(e){return e===t}));e>=0&&this._series.splice(e,1)}}},{key:"getSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._series.filter((function(e){var i,n;return(!t.name||(null==e?void 0:e.name)===t.name)&&(!t.userId||Xt(t.userId).includes(e.userId))&&(!pt(t.specIndex)||Xt(t.specIndex).includes(e.getSpecIndex()))&&(!t.id||e.id===t.id)&&(!t.type||e.type===t.type)&&(!t.coordinateType||e.coordinate===t.coordinateType)&&(!t.dataName||(null===(n=null===(i=e.getRawData)||void 0===i?void 0:i.call(e))||void 0===n?void 0:n.name)===t.dataName)}))}},{key:"getSeriesInName",value:function(t){return this.getSeries({name:t})[0]}},{key:"getSeriesInUserId",value:function(t){return this.getSeries({userId:t})[0]}},{key:"getSeriesInId",value:function(t){return this.getSeries({id:t})[0]}},{key:"getSeriesInType",value:function(t){return this.getSeries({type:t})}},{key:"getSeriesInCoordinateType",value:function(t){return this.getSeries({coordinateType:t})}},{key:"getSeriesInDataName",value:function(t){return this.getSeries({dataName:t})}},{key:"onRender",value:function(t){}},{key:"initSeriesDataflow",value:function(){var t=this._series.map((function(t){var e;return null!==(e=t.getViewDataFilter())&&void 0!==e?e:t.getViewData()})).filter((function(t){return!!t}));this._option.dataSet.multipleDataViewAddListener(t,"change",this.seriesDataFilterOver)}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this),this._series=[]}},{key:"createTrigger",value:function(){var t=Object.assign(Object.assign({},this._option),{model:this,interaction:this.interaction});this._trigger=new MC(t)}},{key:"initTrigger",value:function(){var t=this;this._series.forEach((function(e){e.getMarksWithoutRoot().forEach((function(e){t._trigger.registerMark(e)}))})),this._trigger.init()}},{key:"initInteraction",value:function(){var t=this;this._option.disableTriggerEvent||this._series.forEach((function(e){e.getMarksWithoutRoot().forEach((function(e){for(var i in wC)Pt(e.stateStyle[wC[i]])||t.interaction.registerMark(wC[i],e)}))}))}},{key:"compileMarks",value:function(t){var e=this;this.getMarks().forEach((function(i){var n;i.compile({group:t}),null===(n=i.getProduct())||void 0===n||n.configure({context:{model:e}}).layout((function(t,e,i,n){}))}))}},{key:"compile",value:function(){var t;null===(t=this.animate)||void 0===t||t.compile(),this.compileMarks()}},{key:"onLayoutEnd",value:function(t){this._series.forEach((function(e){return e.onLayoutEnd(t)})),p(h(i.prototype),"onLayoutEnd",this).call(this,t)}}])}(VC);function YC(t){var e=[],i=[],n=[];return t.forEach((function(t){vt(t.getSpec().position)||"start"===t.getSpec().position?e.push(t):"middle"===t.getSpec().position?i.push(t):"end"===t.getSpec().position&&n.push(t)})),{startItems:e,endItems:n,middleItems:i}}function KC(t,e,i){e?t.forEach((function(t){var e=Yt(t),n=e.getLayoutStartPoint().y+e.getLayoutRect().height-t[0].getLayoutStartPoint().y,r=(i-n)/2;t.forEach((function(t){t.setLayoutStartPosition({x:t.getLayoutStartPoint().x,y:t.getLayoutStartPoint().y+r})}))})):t.forEach((function(t){var e=Yt(t),n=e.getLayoutStartPoint().x+e.getLayoutRect().width-t[0].getLayoutStartPoint().x,r=(i-n)/2;t.forEach((function(t){t.setLayoutStartPosition({x:t.getLayoutStartPoint().x+r,y:t.getLayoutStartPoint().y})}))}))}function qC(t,e,i,n){var r;t.forEach((function(t,a){t.length>1&&(r=i[a],t.forEach((function(t){if(t.alignSelf&&"start"!==t.alignSelf){var i=t.getLayoutStartPoint(),a="middle"===t.alignSelf?.5:1,o=e?r-(t.getLayoutRect().width+t.layoutPaddingLeft+t.layoutPaddingRight):r-(t.getLayoutRect().height+t.layoutPaddingTop+t.layoutPaddingBottom);e?t.setLayoutStartPosition({x:i.x+n*o*a,y:i.y}):t.setLayoutStartPosition({x:i.x,y:i.y+n*o*a})}})))}))}function ZC(t,e,i,n,r){if(t.length){var a=0,o="right"===r,s=o?-1:1,u=o?e.rightCurrent:e.leftCurrent,l=e.topCurrent,c=[],h=[],d=[];t.forEach((function(t){var n=e.getItemComputeLayoutRect(t),r=t.computeBoundsInRect(n);t.setLayoutRect(r);var f=r.height+t.layoutPaddingTop+t.layoutPaddingBottom,v=r.width+t.layoutPaddingLeft+t.layoutPaddingRight,p=o?-r.width-t.layoutPaddingRight:t.layoutPaddingLeft;t.setLayoutStartPosition({x:u+t.layoutOffsetX+p,y:l+t.layoutOffsetY+t.layoutPaddingTop}),(l+=f)>i&&h.length?(d.push(a),u+=s*a,a=v,l=e.topCurrent+f,t.setLayoutStartPosition({x:u+t.layoutOffsetX+p,y:e.topCurrent+t.layoutOffsetY+t.layoutPaddingTop}),c.push(h),h=[t]):(a=Math.max(a,v),h.push(t))})),d.push(a),c.push(h),qC(c,!0,d,s),n&&KC(c,!0,i),o?e.rightCurrent=u+s*a:e.leftCurrent=u+s*a}}function JC(t,e,i,n){if(t.length){var r=0,a="right"===n,o=a?-1:1,s=a?e.rightCurrent:e.leftCurrent,u=e.bottomCurrent,l=[],c=[],h=[];t.forEach((function(t){var i=e.getItemComputeLayoutRect(t),n=t.computeBoundsInRect(i);t.setLayoutRect(n);var d=n.height+t.layoutPaddingTop+t.layoutPaddingBottom,f=n.width+t.layoutPaddingLeft+t.layoutPaddingRight,v=a?-n.width-t.layoutPaddingRight:t.layoutPaddingLeft;u<d&&c.length?(h.push(r),s+=o*r,r=f,u=e.bottomCurrent,t.setLayoutStartPosition({x:s+t.layoutOffsetX+v,y:u+t.layoutOffsetY-n.height-t.layoutPaddingBottom}),l.push(c),c=[t]):(t.setLayoutStartPosition({x:s+t.layoutOffsetX+v,y:u+t.layoutOffsetY-n.height-t.layoutPaddingBottom}),r=Math.max(r,f),u-=d,c.push(t))})),h.push(r),l.push(c),qC(l,!0,h,o),a?e.rightCurrent=s+o*r:e.leftCurrent=s+o*r}}function $C(t,e,i,n,r){if(t.length){var a="top"===r,o=a?1:-1,s=0,u=e.leftCurrent,l=a?e.topCurrent:e.bottomCurrent,c=[],h=[],d=[];t.forEach((function(t){var n=e.getItemComputeLayoutRect(t),r=t.computeBoundsInRect(n);t.setLayoutRect(r);var f=r.height+t.layoutPaddingTop+t.layoutPaddingBottom,v=r.width+t.layoutPaddingLeft+t.layoutPaddingRight,p=a?t.layoutPaddingTop:-r.height-t.layoutPaddingBottom;t.setLayoutStartPosition({x:u+t.layoutOffsetX+t.layoutPaddingLeft,y:l+t.layoutOffsetY+p}),(u+=v)>i&&h.length?(d.push(s),u=e.leftCurrent+v,l+=o*s,s=f,t.setLayoutStartPosition({x:e.leftCurrent+t.layoutOffsetX+t.layoutPaddingLeft,y:l+t.layoutOffsetY+p}),c.push(h),h=[t]):(s=Math.max(s,f),h.push(t))})),d.push(s),c.push(h),qC(c,!1,d,o),n&&KC(c,!1,i),a?e.topCurrent=l+o*s:e.bottomCurrent=l+o*s}}function QC(t,e,i,n){if(t.length){var r="top"===n,a=r?1:-1,o=0,s=e.rightCurrent,u=r?e.topCurrent:e.bottomCurrent,l=[],c=[],h=[];t.forEach((function(t){var i=e.getItemComputeLayoutRect(t),n=t.computeBoundsInRect(i);t.setLayoutRect(n);var h=n.height+t.layoutPaddingTop+t.layoutPaddingBottom,d=n.width+t.layoutPaddingLeft+t.layoutPaddingRight,f=r?t.layoutPaddingTop:-n.height-t.layoutPaddingBottom;s<d&&c.length?(s=e.rightCurrent,u+=a*o,o=h,t.setLayoutStartPosition({x:e.rightCurrent+t.layoutOffsetX-n.width-t.layoutPaddingRight,y:u+t.layoutOffsetY+f}),l.push(c),c=[t]):(c.push(t),t.setLayoutStartPosition({x:s+t.layoutOffsetX-n.width-t.layoutPaddingRight,y:u+t.layoutOffsetY+f}),o=Math.max(o,h),s-=d)})),h.push(o),l.push(c),qC(l,!1,h,a),r?e.topCurrent=u+a*o:e.bottomCurrent=u+a*o}}XC.type="region",XC.transformerConstructor=HC,XC.specKey="region";var tB=function(){return u((function t(e,i){o(this,t),this.leftCurrent=0,this.topCurrent=0,this.rightCurrent=0,this.bottomCurrent=0,this._onError=null==i?void 0:i.onError}),[{key:"_layoutInit",value:function(t,e,i,n){this._chartLayoutRect=i,this._chartViewBox=n,this.leftCurrent=i.x,this.topCurrent=i.y,this.rightCurrent=i.x+i.width,this.bottomCurrent=i.height+i.y,e.sort((function(t,e){return e.layoutLevel-t.layoutLevel}))}},{key:"_layoutNormalItems",value:function(t){this.layoutNormalInlineItems(t.filter((function(t){return"normal-inline"===t.layoutType}))),this.layoutNormalItems(t.filter((function(t){return"normal"===t.layoutType})))}},{key:"_groupItems",value:function(t){var e=t.filter((function(t){return"region"===t.layoutType})),i=t.filter((function(t){return"region-relative"===t.layoutType})),n=t.filter((function(t){return"region-relative-overlap"===t.layoutType})),r=i.concat(n),a={left:{items:[],rect:{width:0,height:0}},right:{items:[],rect:{width:0,height:0}},top:{items:[],rect:{width:0,height:0}},bottom:{items:[],rect:{width:0,height:0}},z:{items:[],rect:{width:0,height:0}}};return n.forEach((function(t){a[t.layoutOrient].items.push(t)})),{regionItems:e,relativeItems:i,relativeOverlapItems:n,allRelatives:r,overlapItems:a}}},{key:"layoutItems",value:function(t,e,i,n){this._layoutInit(t,e,i,n),this._layoutNormalItems(e);var r={left:this.leftCurrent,top:this.topCurrent,right:this.rightCurrent,bottom:this.bottomCurrent},a=this._groupItems(e),o=a.regionItems,s=a.relativeItems,u=a.relativeOverlapItems,l=a.allRelatives,c=a.overlapItems;this.layoutRegionItems(o,s,u,c),this._processAutoIndent(o,s,u,c,l,r),this.layoutAbsoluteItems(e.filter((function(t){return"absolute"===t.layoutType})))}},{key:"_processAutoIndent",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{left:{items:[],rect:{width:0,height:0}},right:{items:[],rect:{width:0,height:0}},top:{items:[],rect:{width:0,height:0}},bottom:{items:[],rect:{width:0,height:0}},z:{items:[],rect:{width:0,height:0}}},r=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(r.some((function(t){return t.autoIndent}))){var o=this._checkAutoIndent(r,a),s=o.top,u=o.bottom,l=o.left,c=o.right;(s||u||l||c)&&(this.topCurrent=a.top+s,this.bottomCurrent=a.bottom-u,this.leftCurrent=a.left+l,this.rightCurrent=a.right-c,this.layoutRegionItems(t,e,i,n))}}},{key:"layoutNormalItems",value:function(t){var e=this;t.forEach((function(t){var i=e.getItemComputeLayoutRect(t),n=t.computeBoundsInRect(i);t.setLayoutRect(n),"left"===t.layoutOrient?(t.setLayoutStartPosition({x:e.leftCurrent+t.layoutOffsetX+t.layoutPaddingLeft,y:e.topCurrent+t.layoutOffsetY+t.layoutPaddingTop}),e.leftCurrent+=n.width+t.layoutPaddingLeft+t.layoutPaddingRight):"top"===t.layoutOrient?(t.setLayoutStartPosition({x:e.leftCurrent+t.layoutOffsetX+t.layoutPaddingLeft,y:e.topCurrent+t.layoutOffsetY+t.layoutPaddingTop}),e.topCurrent+=n.height+t.layoutPaddingTop+t.layoutPaddingBottom):"right"===t.layoutOrient?(t.setLayoutStartPosition({x:e.rightCurrent+t.layoutOffsetX-n.width-t.layoutPaddingRight,y:e.topCurrent+t.layoutOffsetY+t.layoutPaddingTop}),e.rightCurrent-=n.width+t.layoutPaddingLeft+t.layoutPaddingRight):"bottom"===t.layoutOrient&&(t.setLayoutStartPosition({x:e.leftCurrent+t.layoutOffsetX+t.layoutPaddingRight,y:e.bottomCurrent+t.layoutOffsetY-n.height-t.layoutPaddingBottom}),e.bottomCurrent-=n.height+t.layoutPaddingTop+t.layoutPaddingBottom)}))}},{key:"layoutNormalInlineItems",value:function(t){var e=t.filter((function(t){return"left"===t.layoutOrient})),i=t.filter((function(t){return"right"===t.layoutOrient})),n=t.filter((function(t){return"top"===t.layoutOrient})),r=t.filter((function(t){return"bottom"===t.layoutOrient})),a=this._chartLayoutRect.width+this._chartLayoutRect.x,o=this._chartLayoutRect.height+this._chartLayoutRect.y;e.length&&function(t,e,i){var n=YC(t),r=n.startItems,a=n.middleItems,o=n.endItems;r.length&&ZC(r,e,i,!1,"left"),a.length&&ZC(a,e,i,!0,"left"),o.length&&JC(o,e,0,"left")}(e,this,o),n.length&&function(t,e,i){var n=YC(t),r=n.startItems,a=n.middleItems,o=n.endItems;r.length&&$C(r,e,i,!1,"top"),a.length&&$C(a,e,i,!0,"top"),o.length&&QC(o,e,0,"top")}(n,this,a),i.length&&function(t,e,i){var n=YC(t),r=n.startItems,a=n.middleItems,o=n.endItems;r.length&&ZC(r,e,i,!1,"right"),a.length&&ZC(a,e,i,!0,"right"),o.length&&JC(o,e,0,"right")}(i,this,o),r.length&&function(t,e,i){var n=YC(t),r=n.startItems,a=n.middleItems,o=n.endItems;r.length&&$C(r,e,i,!1,"bottom"),a.length&&$C(a,e,i,!0,"bottom"),o.length&&QC(o,e,0,"bottom")}(r,this,a)}},{key:"_layoutRelativeOverlap",value:function(t,e){var i=this;e.items.forEach((function(t){var n=i.getItemComputeLayoutRect(t),r=t.computeBoundsInRect(n);e.rect.width=Math.max(r.width+t.layoutPaddingLeft+t.layoutPaddingRight,e.rect.width),e.rect.height=Math.max(r.height+t.layoutPaddingTop+t.layoutPaddingBottom,e.rect.height)})),e.items.forEach((function(n){n.setLayoutRect(e.rect),"left"===t?n.setLayoutStartPosition({x:i.leftCurrent+n.layoutOffsetX}):"right"===t?n.setLayoutStartPosition({x:i.rightCurrent-e.rect.width+n.layoutOffsetX}):"top"===t?n.setLayoutStartPosition({x:i.topCurrent+n.layoutOffsetY}):n.setLayoutStartPosition({x:i.bottomCurrent-e.rect.height+n.layoutOffsetY})})),"left"===t?this.leftCurrent+=e.rect.width:"right"===t?this.rightCurrent-=e.rect.width:"top"===t?this.topCurrent+=e.rect.height:this.bottomCurrent-=e.rect.height}},{key:"_layoutRelativeItem",value:function(t,e){var i=t.computeBoundsInRect(e);"left"===t.layoutOrient||"right"===t.layoutOrient?t.setLayoutRect({width:i.width}):t.setLayoutRect({height:i.height}),"left"===t.layoutOrient?(t.setLayoutStartPosition({x:this.leftCurrent+t.layoutOffsetX+t.layoutPaddingLeft}),this.leftCurrent+=i.width+t.layoutPaddingLeft+t.layoutPaddingRight):"right"===t.layoutOrient?(this.rightCurrent-=i.width+t.layoutPaddingLeft+t.layoutPaddingRight,t.setLayoutStartPosition({x:this.rightCurrent+t.layoutOffsetX+t.layoutPaddingLeft})):"top"===t.layoutOrient?(t.setLayoutStartPosition({y:this.topCurrent+t.layoutOffsetY+t.layoutPaddingTop}),this.topCurrent+=i.height+t.layoutPaddingTop+t.layoutPaddingBottom):"bottom"===t.layoutOrient&&(this.bottomCurrent-=i.height+t.layoutPaddingTop+t.layoutPaddingBottom,t.setLayoutStartPosition({y:this.bottomCurrent+t.layoutOffsetY+t.layoutPaddingTop}))}},{key:"_layoutRegionItem",value:function(t,e,i){var n=this,r=Math.max(Math.min.apply(Math,[e].concat(y(t.map((function(t){var e;return null!==(e=t.maxWidth)&&void 0!==e?e:Number.MAX_VALUE}))))),0),a=Math.max(Math.min.apply(Math,[i].concat(y(t.map((function(t){var e;return null!==(e=t.maxHeight)&&void 0!==e?e:Number.MAX_VALUE}))))),0);return t.forEach((function(t){t.setLayoutRect({width:r,height:a}),t.setLayoutStartPosition({x:n.leftCurrent+t.layoutOffsetX+t.layoutPaddingLeft,y:n.topCurrent+t.layoutOffsetY+t.layoutPaddingTop})})),{regionHeight:a,regionWidth:r}}},{key:"layoutRegionItems",value:function(t,e,i){var n=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{left:{items:[],rect:{width:0,height:0}},right:{items:[],rect:{width:0,height:0}},top:{items:[],rect:{width:0,height:0}},bottom:{items:[],rect:{width:0,height:0}},z:{items:[],rect:{width:0,height:0}}},a=(this.rightCurrent,this.leftCurrent),o=(this.bottomCurrent,this.topCurrent);e.filter((function(t){return"left"===t.layoutOrient||"right"===t.layoutOrient})).forEach((function(t){n._layoutRelativeItem(t,n.getItemComputeLayoutRect(t))})),this._layoutRelativeOverlap("left",r.left),this._layoutRelativeOverlap("right",r.right),a=this.rightCurrent-this.leftCurrent,e.filter((function(t){return"top"===t.layoutOrient||"bottom"===t.layoutOrient})).forEach((function(t){n._layoutRelativeItem(t,n.getItemComputeLayoutRect(t))})),this._layoutRelativeOverlap("top",r.top),this._layoutRelativeOverlap("bottom",r.bottom),o=this.bottomCurrent-this.topCurrent;var s=this._layoutRegionItem(t,a,o),u=s.regionWidth,l=s.regionHeight;e.concat(i).forEach((function(e){if(["left","right"].includes(e.layoutOrient)){var i=n.filterRegionsWithID(t,e.layoutBindRegionID[0]);e.setLayoutRect({height:i.getLayoutRect().height}),e.setLayoutStartPosition({y:i.getLayoutStartPoint().y+e.layoutOffsetY+e.layoutPaddingTop}),"right"===e.layoutOrient&&e.setLayoutStartPosition({x:e.getLayoutStartPoint().x+u-a})}else if(["top","bottom"].includes(e.layoutOrient)){var r=n.filterRegionsWithID(t,e.layoutBindRegionID[0]);e.setLayoutRect({width:r.getLayoutRect().width}),e.setLayoutStartPosition({x:r.getLayoutStartPoint().x+e.layoutOffsetX+e.layoutPaddingLeft}),"bottom"===e.layoutOrient&&e.setLayoutStartPosition({y:e.getLayoutStartPoint().y+l-o})}}))}},{key:"layoutAbsoluteItems",value:function(t){var e=this;t.forEach((function(t){t.absoluteLayoutInRect(e._chartLayoutRect)}))}},{key:"filterRegionsWithID",value:function(t,e){var i,n=t.find((function(t){return t.getModelId()===e}));return n||(null!==(i=this._onError)&&void 0!==i?i:X_)("can not find target region item, invalid id"),n}},{key:"getItemComputeLayoutRect",value:function(t){return{width:this.rightCurrent-this.leftCurrent-t.layoutPaddingLeft-t.layoutPaddingRight,height:this.bottomCurrent-this.topCurrent-t.layoutPaddingTop-t.layoutPaddingBottom}}},{key:"_checkAutoIndent",value:function(t,e){var i=this,n={top:0,left:0,bottom:0,right:0};return t.forEach((function(t){if(t.getModelVisible()&&t.autoIndent){var r="left"===t.layoutOrient||"right"===t.layoutOrient,a=t.getLastComputeOutBounds(),o=i._getOutInLayout(a,t,e);r?(n.top=Math.max(n.top,o.top),n.bottom=Math.max(n.bottom,o.bottom)):(n.left=Math.max(n.left,o.left),n.right=Math.max(n.right,o.right))}})),n}},{key:"_getOutInLayout",value:function(t,e,i){var n=e.getLayoutStartPoint(),r=n.x,a=n.y,o=e.getLayoutRect(),s=o.width,u=o.height;return{left:i.left-(r-t.x1),right:r+s+t.x2-i.right,top:i.top-(a-t.y1),bottom:a+u+t.y2-i.bottom}}}])}();tB.type="base";var eB=["line","area","trail"];function iB(t){return eB.includes(t)}var nB=function(t){function i(t,n){var r;return o(this,i),(r=e(this,i,[t]))._stateInfoList=[],r._mark=n,r}return c(i,t),u(i,[{key:"getStateInfoList",value:function(){return this._stateInfoList}},{key:"_getDefaultStateMap",value:function(){return{markUpdateRank:1}}},{key:"getStateInfo",value:function(t){return this._stateInfoList.find((function(e){return e.stateValue===t}))}},{key:"addStateInfo",value:function(t){if(!this.getStateInfo(t.stateValue)){t.level=t.level||0;for(var e=!0,i=0;i<this._stateInfoList.length;i++){var n=this._stateInfoList[i].level;if(n&&n>t.level){this._stateInfoList.splice(i,0,t),e=!1;break}}e&&this._stateInfoList.push(t)}}},{key:"_clearStateBeforeSet",value:function(t){t.datums=null,t.items=null,t.fields=null,t.filter=null}},{key:"changeStateInfo",value:function(t){var e=this.getStateInfo(t.stateValue);if(e){if(void 0!==t.datums&&(this._clearStateBeforeSet(e),e.datums=t.datums,e.datumKeys=t.datumKeys),void 0!==t.items&&(this._clearStateBeforeSet(e),e.items=t.items),void 0!==t.fields)if(this._clearStateBeforeSet(e),null===t.fields)e.fields=t.fields;else for(var i in e.fields=e.fields||{},t.fields){var n=t.fields[i];e.fields[i]=e.fields[i]||{};var r=e.fields[i];pt(n.domain)&&(r.domain=n.domain),pt(n.type)&&(r.type=n.type)}t.filter&&(this._clearStateBeforeSet(e),e.filter=t.filter)}else this.addStateInfo(t)}},{key:"clearStateInfo",value:function(t){var e=this;t.forEach((function(t){e.getStateInfo(t)&&e.changeStateInfo({stateValue:t,datumKeys:null,datums:null,fields:null,items:null,filter:null,cache:{}})}))}},{key:"checkOneState",value:function(t,e,i,n){var r;n=dt(iB)?n:!t.mark||iB(t.mark.markType);var a=!1,o=!1;if(pt(i.datums)&&i.datums.length>0)a=this.checkDatumState(i,e,n),o=!0;else if(i.items)a=null!==(r=this.checkItemsState(i,t))&&void 0!==r&&r,o=!0;else if(i.fields)a=this.checkFieldsState(i,e,t,n),o=!0;else if(!a&&i.filter){var s={mark:this._mark,renderNode:t,type:t.mark.markType};a=i.filter(e,s),o=!0}return o?a?"in":"out":"skip"}},{key:"checkState",value:function(t,e){for(var i=t.getStates().filter((function(t){return function(t){return!!RC[t]}(t)})).map((function(t){return[t,10]})),n=!t.mark||iB(t.mark.markType),r=0;r<this._stateInfoList.length;r++){var a=this._stateInfoList[r],o=this.checkOneState(t,e,a,n);"skip"!==o&&"in"===o&&i.push([a.stateValue,a.level])}return i.map((function(t){return t[0]}))}},{key:"checkDatumState",value:function(t,e,i){var n=!1,r=i?e[0]:e;if(_t(t.datums)){var a=t.datumKeys||Object.keys(t.datums[0]).filter((function(t){return!t.startsWith(cw)}));n=t.datums.some((function(t){return i&&_t(null==t?void 0:t.items)?a.every((function(e){var i,n;return(null===(n=null===(i=null==t?void 0:t.items)||void 0===i?void 0:i[0])||void 0===n?void 0:n[e])===(null==r?void 0:r[e])})):a.every((function(e){return(null==t?void 0:t[e])===(null==r?void 0:r[e])}))}))}else n=gt(t.datums)?(t.datumKeys||Object.keys(t.datums).filter((function(t){return!t.startsWith(cw)}))).every((function(e){var n,a;return i?(null===(n=t.datums.items)||void 0===n?void 0:n[0][e])===r[e]:(null===(a=t.datums)||void 0===a?void 0:a[e])===r[e]})):e===t.datums;return n}},{key:"checkItemsState",value:function(t,e){var i;return null===(i=t.items)||void 0===i?void 0:i.includes(e)}},{key:"checkFieldsState",value:function(t,e,i,n){var r,a=this,o=!0,s=function(){var s=t.fields[u],l=s.type,c=s.domain,h=n?null===(r=e[0])||void 0===r?void 0:r[u]:e[u];if(function(t){switch(t){case lx.Linear:case lx.Log:case lx.Pow:case lx.Sqrt:case lx.Symlog:case lx.Time:return!0;default:return!1}}(l)&&c.length>1){if(a.checkLinearFieldState(c,u,e,i,n))return o=!1,0;o=!0}else{if(!c.some((function(t){return t===h})))return o=!1,0;o=!0}};for(var u in t.fields)if(0===s())break;return o}},{key:"checkLinearFieldState",value:function(t,e,i,n,r){var a,o=r?null===(a=i[0])||void 0===a?void 0:a[e]:i[e];return o<t[0]||o>t[t.length-1]}},{key:"updateLayoutState",value:function(t){return this._stateMap.markUpdateRank++,this.updateState({markUpdateRank:this._stateMap.markUpdateRank},t)}},{key:"compileState",value:function(t,e){var i=this;t.state({callback:function(t,e){return i.checkState(e,t)}},e)}}])}(NC),rB=function(t){function i(t){var n;return o(this,i),(n=e(this,i,[t]))._mark=t.mark,n}return c(i,t),u(i,[{key:"setCompiledProductId",value:function(t){this._compiledProductId=t}},{key:"generateProductId",value:function(){var t=p(h(i.prototype),"generateProductId",this).call(this);return pt(t)?t:"".concat(cw,"_markData_").concat(this._mark.id)}},{key:"_compileProduct",value:function(){var t,e=null===(t=this._data)||void 0===t?void 0:t.latestData;vt(e)||pt(this.getProduct())||this._initProduct(e)}}])}(function(t){function i(t,n){var r;return o(this,i),(r=e(this,i,[t])).grammarType=kC.data,r._data=null,r._data=n,r}return c(i,t),u(i,[{key:"getDataView",value:function(){return this._data}},{key:"setDataView",value:function(t){this._data=t}},{key:"getLatestData",value:function(){var t;return null===(t=this._data)||void 0===t?void 0:t.latestData}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this),this._data=null}},{key:"updateData",value:function(t){var e=this.getProduct(),i=this.getLatestData();if(e&&i&&(e.values(i),!t))return this.getCompiler().renderNextTick()}},{key:"_compileProduct",value:function(){var t=this.getLatestData();vt(t)||(vt(this.getProduct())?this._initProduct(t):this._product.values(t))}},{key:"_initProduct",value:function(t){var e,i,n=this.getVGrammarView();if(n&&t){var r=this.getProductId();this._product=null===(i=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.call(n,t))||void 0===i?void 0:i.id(r),this._compiledProductId=r}}},{key:"generateProductId",value:function(){var t;return"".concat(null===(t=this.getDataView())||void 0===t?void 0:t.name)}},{key:"_lookupGrammar",value:function(t){var e,i;return null===(i=null===(e=this.getCompiler().getVGrammarView())||void 0===e?void 0:e.getDataById)||void 0===i?void 0:i.call(e,t)}}])}(DC)),aB=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i},oB=function(t){function i(t,n,r){var a;return o(this,i),(a=e(this,i,[t])).grammarType=kC.mark,a.type=void 0,a.name="mark",a._interactive=!0,a._zIndex=BA.Mark,a._visible=!0,a.stateStyle={},a._unCompileChannel={},a._skipBeforeLayouted=!1,a._morph=!1,a.name=n,a.model=r,a.key=t.key,a.state=new nB(Object.assign(Object.assign({},t),{stateKeyToSignalName:a.stateKeyToSignalName.bind(f(a))}),f(a)),a._option.support3d&&a.setSupport3d(!0),a._option.skipTheme&&a.setSkipTheme(!0),a._event=new uC(r.getOption().eventDispatcher,r.getOption().mode),a}return c(i,t),u(i,[{key:"getSkipTheme",value:function(){return this._skipTheme}},{key:"setSkipTheme",value:function(t){this._skipTheme=t}},{key:"getSupport3d",value:function(){return this._support3d}},{key:"setSupport3d",value:function(t){this._support3d=t}},{key:"getFacet",value:function(){return this._facet}},{key:"setFacet",value:function(t){this._facet=t}},{key:"getInteractive",value:function(){return this._interactive}},{key:"setInteractive",value:function(t){this._interactive=t}},{key:"getZIndex",value:function(){return this._zIndex}},{key:"setZIndex",value:function(t){this._zIndex=t}},{key:"getVisible",value:function(){return this._visible}},{key:"setVisible",value:function(t){this._visible=t}},{key:"getUserId",value:function(){return this._userId}},{key:"setUserId",value:function(t){pt(t)&&(this._userId=t)}},{key:"getDataView",value:function(){var t;return null===(t=this._data)||void 0===t?void 0:t.getDataView()}},{key:"setDataView",value:function(t,e){vt(this._data)&&this.initMarkData(Object.assign(Object.assign({},this._option),{mark:this})),pt(e)&&this._data.setCompiledProductId(e),this._data.setDataView(t)}},{key:"getData",value:function(){return this._data}},{key:"setData",value:function(t){this._data=t}},{key:"hasState",value:function(t){return t in this.state.getStateMap()}},{key:"getState",value:function(t){return this.state.getStateMap()[t]}},{key:"getAnimationConfig",value:function(){return this._animationConfig}},{key:"setAnimationConfig",value:function(t){this._animationConfig=t}},{key:"setSkipBeforeLayouted",value:function(t){this._skipBeforeLayouted=t}},{key:"getSkipBeforeLayouted",value:function(){return this._skipBeforeLayouted}},{key:"getMorph",value:function(){return this._morph}},{key:"setMorph",value:function(t){this._morph=t}},{key:"getMorphKey",value:function(){return this._morphKey}},{key:"setMorphKey",value:function(t){this._morphKey=t}},{key:"getMorphElementKey",value:function(){return this._morphElementKey}},{key:"setMorphElementKey",value:function(t){this._morphElementKey=t}},{key:"getGroupKey",value:function(){return this._groupKey}},{key:"setGroupKey",value:function(t){this._groupKey=t}},{key:"getProgressiveConfig",value:function(){return this._progressiveConfig}},{key:"setProgressiveConfig",value:function(t){this._progressiveConfig=t}},{key:"setCustomizedShapeCallback",value:function(t){this._setCustomizedShape=t}},{key:"setEnableSegments",value:function(t){this._enableSegments=t}},{key:"getClip",value:function(){return this._clip}},{key:"setClip",value:function(t){this._clip=t}},{key:"setStateSortCallback",value:function(t){this._stateSort=t}},{key:"setTransform",value:function(t){this._transform=t}},{key:"initMarkData",value:function(t){this._data=new rB(t)}},{key:"stateKeyToSignalName",value:function(t){return"".concat(cw,"_").concat(this.type,"_").concat(this.id,"_").concat(t)}},{key:"getAttribute",value:function(t,e,i,n){}},{key:"_compileProduct",value:function(t){var e=this.getProduct();this.getVisible()?pt(e)||this.getCompiler().isInited&&(this._initProduct(null==t?void 0:t.group),vt(this._product)||(this.compileSignal(),this.compileData(),this.compileState(),this.compileEncode(),this.compileAnimation(),this.compileContext(),this.compileTransform())):pt(e)&&this.removeProduct()}},{key:"_initProduct",value:function(t){var e=this.getVGrammarView(),i=this.getProductId();this._product=e.mark(this.type,null!=t?t:e.rootMark).id(i),this._compiledProductId=i}},{key:"generateProductId",value:function(){return this._userId?"".concat(this._userId):"".concat(this.name,"_").concat(this.id)}},{key:"compileData",value:function(){var t;if(!vt(this._data)){this._data.compile();var e=this._data.getProduct();pt(this._product)&&pt(e)&&this._product.join(e,this.key,void 0,null!==(t=this._groupKey)&&void 0!==t?t:this._facet)}}},{key:"updateStaticEncode",value:function(){if(this._product){var t=this._separateStyle(),e=t.enterStyles,i=t.updateStyles;this._product.encodeState("group",e,!0),this._product.encode(i,!0)}}},{key:"_separateStyle",value:function(){var t=this,e=this.stateStyle,i=xC.STATE_NORMAL,n=e[i],r=(aB(e,["symbol"==a(i)?i:i+""]),this._option.noSeparateStyle?null:{}),o={};return Object.keys(n).forEach((function(e){t._unCompileChannel[e]||(t._option.noSeparateStyle||function(t,e,i){var n,r=null===(n=e[t])||void 0===n?void 0:n.style;return!!function(t,e){return("fill"===t||"stroke"===t)&&(null==e?void 0:e.gradient)&&(null==e?void 0:e.stops)}(t,r)||!!ft(r)||!(!(null==r?void 0:r.scale)||r.field===i)}(e,n,t.getFacet())?o[e]={callback:t.compileCommonAttributeCallback(e,"normal"),dependency:[t.stateKeyToSignalName("markUpdateRank")]}:r[e]=t.compileCommonAttributeCallback(e,"normal"))})),{enterStyles:r,updateStyles:o}}},{key:"compileEncode",value:function(){var t=this,e=this.stateStyle,i=xC.STATE_NORMAL,n=(e[i],aB(e,["symbol"==a(i)?i:i+""])),r=this._separateStyle(),o=r.enterStyles,s=r.updateStyles;this._product.encode(s,!0),this._product.encodeState("group",o,!0),Object.keys(n).forEach((function(e){var i={};Object.keys(n[e]).forEach((function(n){t._unCompileChannel[n]||(i[n]={callback:t.compileCommonAttributeCallback(n,e),dependency:[t.stateKeyToSignalName("markUpdateRank")]})})),t._product.encodeState(e,i,!0)})),this._skipBeforeLayouted&&this._product.layout({skipBeforeLayouted:this._skipBeforeLayouted})}},{key:"compileState",value:function(){this.state.compileState(this._product,this._stateSort)}},{key:"compileAnimation",value:function(){var t,e,i,n,r=this;if(this._animationConfig){var a;if("component"===this.type)a=null===(t=this.model.animate)||void 0===t?void 0:t.getAnimationStateSignalName();else{var o=null===(i=(e=this.model).getRegion)||void 0===i?void 0:i.call(e);a=null===(n=null==o?void 0:o.animate)||void 0===n?void 0:n.getAnimationStateSignalName()}this._product.animation(this._animationConfig),this._product.animationState({callback:function(t,e,i){var n;return null===(n=i[a])||void 0===n?void 0:n.callback(t,e)},dependency:a}),this._animationConfig.normal&&(this._animationConfig.appear?this._event.on(sw.ANIMATION_END,(function(t){var e=t.event;e.mark===r.getProduct()&&e.animationState===mC.appear&&r.runAnimationByState(mC.normal)})):this._event.on(sw.AFTER_DO_RENDER,(function(){r.runAnimationByState(mC.normal)})))}}},{key:"compileContext",value:function(){var t={interactive:this.getInteractive(),zIndex:this.getZIndex(),context:{markId:this.id,modelId:this.model.id,markUserId:this._userId,modelUserId:this.model.userId},skipTheme:this.getSkipTheme(),support3d:this.getSupport3d(),enableSegments:!!this._enableSegments,clip:!!this._clip||!1!==this._clip&&void 0,clipPath:this._clip||void 0};this._progressiveConfig&&(t.progressiveStep=this._progressiveConfig.progressiveStep,t.progressiveThreshold=this._progressiveConfig.progressiveThreshold,t.large=this._progressiveConfig.large,t.largeThreshold=this._progressiveConfig.largeThreshold),this._morph&&this._morphKey&&(t.morph=this._morph,t.morphKey=this._morphKey,t.morphElementKey=this._morphElementKey),this._setCustomizedShape&&(t.setCustomizedShape=this._setCustomizedShape),this._product.configure(t)}},{key:"compileSignal",value:function(){this.state.compile()}},{key:"_computeAttribute",value:function(t,e){return function(t,e){}}},{key:"compileCommonAttributeCallback",value:function(t,e){var i=this._computeAttribute(t,e),n={mark:null,parent:null,element:null};return function(t,e){return n.mark=e.mark,n.parent=e.mark.group,n.element=e,i(t,n)}}},{key:"compileTransform",value:function(){var t;(null===(t=this._transform)||void 0===t?void 0:t.length)&&this.getProduct().transform(this._transform)}},{key:"_lookupGrammar",value:function(t){var e;return null===(e=this.getCompiler().getVGrammarView())||void 0===e?void 0:e.getMarkById(t)}},{key:"updateState",value:function(t,e){return this.state.updateState(t,e)}},{key:"updateLayoutState",value:function(t,e){return e&&this.getMarks().length>0&&this.getMarks().forEach((function(t){return t.state.updateLayoutState(!0)})),this.state.updateLayoutState(t)}},{key:"updateMarkState",value:function(t){var e=this;if(this._product){var i=this.state.getStateInfo(t);this._product.elements.forEach((function(n){"in"===e.state.checkOneState(n,n.getDatum(),i)?n.addState(t):n.removeState(t)}))}}},{key:"getMarks",value:function(){return[]}},{key:"runAnimationByState",value:function(t){var e,i;return null===(i=null===(e=this.getProduct())||void 0===e?void 0:e.animate)||void 0===i?void 0:i.runAnimationByState(t)}},{key:"stopAnimationByState",value:function(t){var e,i;return null===(i=null===(e=this.getProduct())||void 0===e?void 0:e.animate)||void 0===i?void 0:i.stopAnimationByState(t)}},{key:"pauseAnimationByState",value:function(t){var e,i;return null===(i=null===(e=this.getProduct())||void 0===e?void 0:e.animate)||void 0===i?void 0:i.pauseAnimationByState(t)}},{key:"resumeAnimationByState",value:function(t){var e,i;return null===(i=null===(e=this.getProduct())||void 0===e?void 0:e.animate)||void 0===i?void 0:i.resumeAnimationByState(t)}},{key:"getProductElements",value:function(){var t=this.getProduct();if(t)return t.elements}},{key:"release",value:function(){p(h(i.prototype),"release",this).call(this),this.state.release()}}])}(DC),sB=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i},uB=function(t){function i(t,n){var r,a;return o(this,i),(r=e(this,i,[n,t,n.model]))._extensionChannel={},r._computeExChannel={},r._attributeContext=n.attributeContext,null===(a=n.map)||void 0===a||a.set(r.id,f(r)),r}return c(i,t),u(i,[{key:"created",value:function(){this._initStyle()}},{key:"initStyleWithSpec",value:function(t,e){t&&(pt(t.id)&&(this._userId=t.id),dt(t.interactive)&&(this._interactive=t.interactive),pt(t.zIndex)&&this.setZIndex(t.zIndex),dt(t.visible)&&this.setVisible(t.visible),this._initSpecStyle(t,this.stateStyle,e))}},{key:"_transformStyleValue",value:function(t,e){if(t.scale){var i=t.scale,n=i.range();return i.range(n.map(e)),t}return"function"==typeof t?function(){return e(t.apply(void 0,arguments))}:e(t)}},{key:"convertAngleToRadian",value:function(t){return this._transformStyleValue(t,je)}},{key:"isUserLevel",value:function(t){return[CA.User_Mark,CA.User_Series,CA.User_Chart].includes(t)}},{key:"setStyle",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.stateStyle;if(!vt(t)){void 0===r[i]&&(r[i]={});var a=this.isUserLevel(n);Object.keys(t).forEach((function(o){var s=t[o];vt(s)||(s=e._filterAttribute(o,s,i,n,a,r),e.setAttribute(o,s,i,n,r))}))}}},{key:"getStyle",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";return null===(e=this.stateStyle[i][t])||void 0===e?void 0:e.style}},{key:"_filterAttribute",value:function(t,e,i,n,r){arguments.length>5&&void 0!==arguments[5]||this.stateStyle;var a=this._styleConvert(e);if(r)switch(t){case"angle":a=this.convertAngleToRadian(a);break;case"innerPadding":case"outerPadding":a=this._transformStyleValue(a,(function(t){return-t}))}return a}},{key:"setReferer",value:function(t,e,i){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.stateStyle;if(t)if(e&&i){var a=null!==(n=r[i])&&void 0!==n?n:l({},e,{});r[i][e]=Object.assign(Object.assign({},a[e]),{referer:t})}else Object.entries(r).forEach((function(e){var i=g(e,2),n=i[0],a=i[1];Object.entries(a).forEach((function(e){var i=g(e,2),a=i[0];i[1],r[n][a].referer=t}))}))}},{key:"setPostProcess",value:function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";(null===(i=this.stateStyle[n])||void 0===i?void 0:i[t])&&(this.stateStyle[n][t].postProcess=e)}},{key:"getAttribute",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal",n=arguments.length>3?arguments[3]:void 0;return this._computeAttribute(t,i)(e,n)}},{key:"setAttribute",value:function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.stateStyle;void 0===a[n]&&(a[n]={}),void 0===a[n][t]&&(a[n][t]={level:r,style:e,referer:void 0});var o=null===(i=a[n][t])||void 0===i?void 0:i.level;pt(o)&&o<=r&&SE(a[n][t],{style:e,level:r}),"normal"!==n&&t in this._extensionChannel&&this._extensionChannel[t].forEach((function(t){void 0===a[n][t]&&(a[n][t]=a.normal[t])}))}},{key:"_getDefaultStyle",value:function(){return{visible:!0,x:0,y:0}}},{key:"_styleConvert",value:function(t){if(!t)return t;if(fx(t.type)||t.scale){var e=JT(t,{globalScale:this._option.globalScale,seriesId:this._option.seriesId});if(e)return{scale:e,field:t.field,changeDomain:t.changeDomain}}return t}},{key:"_computeAttribute",value:function(t,e){var i,n=this,r=null===(i=this.stateStyle[e])||void 0===i?void 0:i[t];r||(r=this.stateStyle.normal[t]);var a=this._computeStateAttribute(r,t,e),o=ft(null==r?void 0:r.postProcess),s=t in this._computeExChannel;if(o&&s){var u=this._computeExChannel[t];return function(i,o){var s=a(i,o);return s=r.postProcess(s,i,n._attributeContext,o,n.getDataView()),u(t,i,e,o,s)}}if(o)return function(t,e){return r.postProcess(a(t,e),t,n._attributeContext,e,n.getDataView())};if(s){var l=this._computeExChannel[t];return function(i,n){return l(t,i,e,n,a(i,n))}}return a}},{key:"_computeStateAttribute",value:function(t,e,i){var n,r=this;return t?t.referer?t.referer._computeAttribute(e,i):t.style?"function"==typeof t.style?function(e,i){return t.style(e,r._attributeContext,i,r.getDataView())}:nT.includes(t.style.gradient)?this._computeGradientAttr(t.style):["outerBorder","innerBorder"].includes(e)?this._computeBorderAttr(t.style):fx(null===(n=t.style.scale)||void 0===n?void 0:n.type)?function(e,i){return t.style.scale.scale(e[t.style.field])}:function(e,i){return t.style}:function(e,i){return t.style}:function(t,e){}}},{key:"_initStyle",value:function(){var t=this._getDefaultStyle();this.setStyle(t,"normal",0)}},{key:"_initSpecStyle",value:function(t,e,i){var n=this;t.style&&this.setStyle(t.style,"normal",CA.User_Mark,e);var r=t.state;r&&Object.keys(r).forEach((function(t){var i=r[t];if("style"in i){var a=i.style,o={stateValue:t};"level"in i&&(o.level=i.level),"filter"in i&&(o=ft(i.filter)?Object.assign({filter:i.filter},o):Object.assign(Object.assign({},i.filter),o)),n.state.addStateInfo(o),n.setStyle(a,t,CA.User_Mark,e)}else n.setStyle(i,t,CA.User_Mark,e)}))}},{key:"_computeGradientAttr",value:function(t){var e,i,n=this,r=t.gradient,a=t.scale,o=t.field,s=sB(t,["gradient","scale","field"]),u=a,l=o;if(!(a&&o||"series"!==this.model.modelType)){var c=this.model.getColorAttribute(),h=c.scale,d=c.field;a||(u=h),l||(l=d)}var f=VT(WT(this.model.getColorScheme(),"series"===this.model.modelType?null===(i=(e=this.model).getSpec)||void 0===i?void 0:i.call(e):void 0),this.model.getDefaultColorDomain()),v=Object.assign(Object.assign({},rT[r]),s);return function(t,e){var i={},a=n.getDataView();return Object.keys(v).forEach((function(r){var o=v[r];"stops"===r?i.stops=o.map((function(i){var r=i.opacity,o=i.color,s=i.offset,c=null!=o?o:null==u?void 0:u.scale(t[l]);return ft(o)&&(c=o(t,n._attributeContext,e,a)),pt(r)&&(c=oi.SetOpacity(c,r)),{offset:ft(s)?s(t,n._attributeContext,e,a):s,color:c||f[0]}})):ft(o)?i[r]=o(t,n._attributeContext,e,a):i[r]=o})),i.gradient=r,i}}},{key:"_computeBorderAttr",value:function(t){var e=this,i=t.scale,n=t.field,r=sB(t,["scale","field"]);return function(t,a){var o,s,u,l={};if(Object.keys(r).forEach((function(i){var n=r[i];ft(n)?l[i]=n(t,e._attributeContext,a,e.getDataView()):l[i]=n})),"stroke"in l)nT.includes(null===(u=r.stroke)||void 0===u?void 0:u.gradient)&&(l.stroke=e._computeGradientAttr(r.stroke)(t,a));else{var c=VT(WT(e.model.getColorScheme(),"series"===e.model.modelType?null===(s=(o=e.model).getSpec)||void 0===s?void 0:s.call(o):void 0),e.model.getDefaultColorDomain()),h=i,d=n;if(!(i&&n||"series"!==e.model.modelType)){var f=e.model.getColorAttribute(),v=f.scale,p=f.field;i||(h=v),d||(d=p),l.stroke=(null==h?void 0:h.scale(t[d]))||c[0]}}return l}}}])}(oB),lB=function(t){function i(){var t;return o(this,i),(t=e(this,i,arguments)).type=i.type,t._marks=[],t}return c(i,t),u(i,[{key:"getMarks",value:function(){return this._marks}},{key:"_getDefaultStyle",value:function(){return Object.assign({},p(h(i.prototype),"_getDefaultStyle",this).call(this))}},{key:"isMarkExist",value:function(t){return void 0!==this._marks.find((function(e){return e.id===t.id||e.name===t.name}))}},{key:"addMark",value:function(t){return this.isMarkExist(t)?(H_("Mark already exists, add mark failed."),!1):(this._marks.push(t),!0)}},{key:"removeMark",value:function(t){var e=this._marks.findIndex((function(e){return e.id===t.id||e.name===t.name}));return-1===e?(H_("Mark does not exists, removeMark failed."),!1):(this._marks.splice(e,1),!0)}},{key:"getMarkInType",value:function(t){return this._marks.filter((function(e){return e.type===t}))}},{key:"getMarkInId",value:function(t){return this._marks.find((function(e){return e.id===t}))}},{key:"getMarkInName",value:function(t){return this._marks.find((function(e){return e.name===t}))}},{key:"_compileProduct",value:function(t){var e=this;p(h(i.prototype),"_compileProduct",this).call(this,t),this._product.configure({zIndex:this.getZIndex()}),(null==t?void 0:t.ignoreChildren)||this.getMarks().forEach((function(t){t.getProduct()&&t.removeProduct(),t.compile({group:e._product})}))}}])}(uB);lB.type="group";var cB={measureText:function(t,e,i,n){return WE(e,i,n).measure(t)}},hB=function(){function t(){o(this,t),this.functions={}}return u(t,[{key:"registerFunction",value:function(t,e){t&&e&&(this.functions[t]=e)}},{key:"unregisterFunction",value:function(t){t&&delete this.functions[t]}},{key:"getFunction",value:function(t){return this.functions[t]||null}},{key:"getFunctionNameList",value:function(){return Object.keys(this.functions)}}],[{key:"instance",value:function(){return t.instance_||(t.instance_=new t),t.instance_}}])}(),dB=function(t){function i(t){var n;return o(this,i),(n=e(this,i)).globalInstance=t,n}return c(i,t),u(i,[{key:"onInit",value:function(t){var e=this;this._plugins.forEach((function(i){i.onInit&&i.onInit(e,t)}))}},{key:"onBeforeResize",value:function(t,e){var i=this;this._plugins.forEach((function(n){n.onBeforeResize&&n.onBeforeResize(i,t,e)}))}},{key:"onAfterChartSpecTransform",value:function(t,e){var i=this;this._plugins.forEach((function(n){n.onAfterChartSpecTransform&&n.onAfterChartSpecTransform(i,t,e)}))}},{key:"onBeforeInitChart",value:function(t,e){var i=this;this._plugins.forEach((function(n){n.onBeforeInitChart&&n.onBeforeInitChart(i,t,e)}))}},{key:"releaseAll",value:function(){p(h(i.prototype),"releaseAll",this).call(this),this.globalInstance=null}}])}(function(){return u((function t(){o(this,t),this.id=Q_(),this._plugins=[]}),[{key:"add",value:function(t){var e=this;if(!t||0===t.length)return null;var i=[];return t.forEach((function(t){e._plugins.find((function(e){return e.id===t.id}))?H_("不要重复添加相同的plugin"):(e._plugins.push(t),i.push(t),t.onAdd&&t.onAdd(e))})),i}},{key:"load",value:function(t){var e=this.add(t);e&&e.length&&this.activate(t)}},{key:"activate",value:function(t){t.length&&t.forEach((function(t){t.init&&t.init()}))}},{key:"get",value:function(t){return this._plugins.find((function(e){return e.id===t}))}},{key:"getAll",value:function(){return this._plugins.slice()}},{key:"release",value:function(t){var e=this.get(t);e&&(e.release(this),this._plugins=this._plugins.filter((function(t){return t!==e})))}},{key:"releaseAll",value:function(){var t=this;this._plugins.forEach((function(e){e.release(t)})),this._plugins=[]}},{key:"clear",value:function(t){var e=this.get(t);e&&e.clear(this)}},{key:"clearAll",value:function(){var t=this;this._plugins.forEach((function(e){var i;null===(i=e.clear)||void 0===i||i.call(e,t)}))}}])}()),fB=function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))},vB=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i},pB=function(){function t(e,i){var n,r,a,s,u,l,c,h=this;o(this,t),this.id=Q_(),this._userEvents=[],this._autoSize=!0,this._option={mode:y_["desktop-browser"],onError:function(t){throw new Error(t)},optimize:{disableCheckGraphicWidthOutRange:!0}},this._observer=null,this._context={},this._onResize=he((function(){h._doResize()}),100),this._option=zt(this._option,{animation:!1!==e.animation},i),this._onError=null===(n=this._option)||void 0===n?void 0:n.onError;var d=this._option,f=d.dom,v=d.renderCanvas,p=d.mode,g=d.stage,y=d.poptip,m=vB(d,["dom","renderCanvas","mode","stage","poptip"]),k=q_(p);k&&f&&(this._container=bt(f)?null===document||void 0===document?void 0:document.getElementById(f):f),v&&(this._canvas=v),g&&(this._stage=g),"node"===p||this._container||this._canvas||this._stage?(k?Pg(nr):"node"===p&&am(nr),this._viewBox=this._option.viewBox,this._currentThemeName=NE.getCurrentThemeName(),this._setNewSpec(e),this._updateCurrentTheme(),this._currentSize=this.getCurrentSize(),this._compiler=new SC({dom:null!==(a=this._container)&&void 0!==a?a:"none",canvas:v},Object.assign(Object.assign({mode:this._option.mode,stage:g,pluginList:!1!==y?["poptipForText"]:[]},m),{background:this._getBackground(),onError:this._onError})),this._compiler.setSize(this._currentSize.width,this._currentSize.height),this._eventDispatcher=new hC(this,this._compiler),this._event=new uC(this._eventDispatcher,p),this._compiler.initView(),null===(s=this.getStage())||void 0===s||s.setTheme({text:{fontFamily:null===(u=this._currentTheme)||void 0===u?void 0:u.fontFamily}}),this._initDataSet(this._option.dataSet),this._autoSize=!!k&&(null===(c=null!==(l=e.autoFit)&&void 0!==l?l:this._option.autoFit)||void 0===c||c),this._bindResizeEvent(),this._bindVGrammarViewEvent(),this._initChartPlugin(),FE.registerInstance(this)):null===(r=this._option)||void 0===r||r.onError("please specify container or renderCanvas!")}return u(t,[{key:"getSpec",value:function(){return this._spec}},{key:"getSpecInfo",value:function(){return this._specInfo}},{key:"getDataSet",value:function(){return this._dataSet}},{key:"_setNewSpec",value:function(t,e){return!!t&&(bt(t)&&(t=JSON.parse(t)),e&&this._originalSpec&&(t=SE({},this._originalSpec,t)),this._originalSpec=t,this._spec=this._getSpecFromOriginalSpec(),!0)}},{key:"_getSpecFromOriginalSpec",value:function(){var t,e=GE(this._originalSpec);return e.data=null!==(t=e.data)&&void 0!==t?t:[],e}},{key:"_initChartSpec",value:function(e,i){var n,r;t.getFunctionList()&&t.getFunctionList().length&&(e=UE(e,t)),this._spec=e,this._chartSpecTransformer||(this._chartSpecTransformer=VE.createChartSpecTransformer(this._spec.type,this._getChartOption(this._spec.type))),null===(n=this._chartSpecTransformer)||void 0===n||n.transformSpec(this._spec),this._chartPluginApply("onAfterChartSpecTransform",this._spec,i),this._specInfo=null===(r=this._chartSpecTransformer)||void 0===r?void 0:r.transformModelSpec(this._spec),this._chartPluginApply("onAfterModelSpecTransform",this._spec,this._specInfo,i)}},{key:"_updateSpecInfo",value:function(){var t;this._chartSpecTransformer||(this._chartSpecTransformer=VE.createChartSpecTransformer(this._spec.type,this._getChartOption(this._spec.type))),this._specInfo=null===(t=this._chartSpecTransformer)||void 0===t?void 0:t.createSpecInfo(this._spec)}},{key:"_initChart",value:function(t){var e,i,n;if(this._compiler)if(this._chart)null===(i=this._option)||void 0===i||i.onError("chart is already initialized");else{var r=VE.createChart(t.type,t,this._getChartOption(t.type));r?(this._chart=r,this._chart.setCanvasRect(this._currentSize.width,this._currentSize.height),this._chart.created(),this._chart.init(),this._event.emit(AA.initialized,{chart:r,vchart:this})):null===(n=this._option)||void 0===n||n.onError("init chart fail")}else null===(e=this._option)||void 0===e||e.onError("compiler is not initialized")}},{key:"_releaseData",value:function(){this._dataSet&&(this._dataSet.dataViewMap={},this._dataSet=null)}},{key:"_bindVGrammarViewEvent",value:function(){var t=this;this._compiler&&(this._compiler.getVGrammarView().addEventListener(sw.ALL_ANIMATION_END,(function(){t._event.emit(AA.animationFinished,{chart:t._chart,vchart:t})})),this._compiler.getVGrammarView().addEventListener(sw.AFTER_VRENDER_NEXT_RENDER,(function(){t._event.emit(AA.renderFinished,{chart:t._chart,vchart:t})})))}},{key:"_bindResizeEvent",value:function(){var t;if(this._autoSize){if(this._container){var e=window.ResizeObserver;e&&(this._observer=new e(this._onResize),null===(t=this._observer)||void 0===t||t.observe(this._container))}window.addEventListener("resize",this._onResize)}}},{key:"_unBindResizeEvent",value:function(){this._autoSize&&(window.removeEventListener("resize",this._onResize),this._observer&&(this._observer.disconnect(),this._observer=null))}},{key:"getCurrentSize",value:function(){var t,e,i,n;return function(t,e,i){var n,r=t.width,a=t.height;if(pt(r)&&pt(a))return{width:r,height:a};var o=i.width,s=i.height,u=e.container,l=e.canvas;if(u){var c=fi(u,i.width,i.height);o=c.width,s=c.height}else if(l&&q_(e.mode)){var h=fi(bt(l)?null===document||void 0===document?void 0:document.getElementById(l):l,i.width,i.height);o=h.width,s=h.height}else if(J_(e.mode)&&(null===(n=e.modeParams)||void 0===n?void 0:n.domref)){var d=e.modeParams.domref;o=d.width,s=d.height}return{width:o=null!=r?r:o,height:s=null!=a?a:s}}(this._spec,{container:this._container,canvas:this._canvas,mode:this._getMode(),modeParams:this._option.modeParams},{width:null!==(e=null===(t=this._currentSize)||void 0===t?void 0:t.width)&&void 0!==e?e:500,height:null!==(n=null===(i=this._currentSize)||void 0===i?void 0:i.height)&&void 0!==n?n:500})}},{key:"_doResize",value:function(){var t=this.getCurrentSize(),e=t.width,i=t.height;this._currentSize.width===e&&this._currentSize.height===i||(this._currentSize={width:e,height:i},this.resizeSync(e,i))}},{key:"_initDataSet",value:function(t){for(var e in this._dataSet=t instanceof U_?t:new U_,fC(this._dataSet,"dataview",N_),fC(this._dataSet,"array",k_),dC(this._dataSet,"stackSplit",bC),dC(this._dataSet,"copyDataView",yC),VE.transforms)dC(this._dataSet,e,VE.transforms[e]);for(var i in VE.dataParser)fC(this._dataSet,i,VE.dataParser[i])}},{key:"updateCustomConfigAndRerender",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this._isReleased&&t)return ft(t)&&(t=t()),this._reCompile(t),e?this._renderSync(i):this._renderAsync(i)}},{key:"_updateCustomConfigAndRecompile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!t&&(this._reCompile(t),this._beforeRender(e))}},{key:"_reCompile",value:function(t,e){var i,n,r,a,o,s,u=this;if(t.reMake)this._releaseData(),this._initDataSet(),this._chartSpecTransformer=null,null===(i=this._chart)||void 0===i||i.release(),this._chart=null,null===(n=this._compiler)||void 0===n||n.releaseGrammar(!1===(null===(r=this._option)||void 0===r?void 0:r.animation)||!1===(null===(a=this._spec)||void 0===a?void 0:a.animation)),this._userEvents.forEach((function(t){var e;return null===(e=u._event)||void 0===e?void 0:e.on(t.eType,t.query,t.handler)})),t.reSize&&this._doResize();else if(t.reCompile&&(null===(o=this._compiler)||void 0===o||o.clear({chart:this._chart,vChart:this},!this._option.animation||!this._spec.animation),null===(s=this._compiler)||void 0===s||s.compile({chart:this._chart,vChart:this},{})),t.reSize){var l=this.getCurrentSize(),c=l.width,h=l.height;this._chart.onResize(c,h,!1),this._compiler.resize(c,h,!1)}}},{key:"_beforeRender",value:function(){var t,e,i,n,r,a,o,s,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isReleased)return!1;if(this._chart)return!0;var l=u.transformSpec,c=u.actionSource;return l&&this._initChartSpec(this._spec,"render"),this._chartPluginApply("onBeforeInitChart",this._spec,c),null===(e=null===(t=this._option.performanceHook)||void 0===t?void 0:t.beforeInitializeChart)||void 0===e||e.call(t),this._initChart(this._spec),null===(n=null===(i=this._option.performanceHook)||void 0===i?void 0:i.afterInitializeChart)||void 0===n||n.call(i),!(!this._chart||!this._compiler||(null===(a=null===(r=this._option.performanceHook)||void 0===r?void 0:r.beforeCompileToVGrammar)||void 0===a||a.call(r),this._compiler.compile({chart:this._chart,vChart:this},{performanceHook:this._option.performanceHook}),null===(s=null===(o=this._option.performanceHook)||void 0===o?void 0:o.afterCompileToVGrammar)||void 0===s||s.call(o),0))}},{key:"_afterRender",value:function(){return!this._isReleased&&(this._updateAnimateState(),this._event.emit(AA.rendered,{chart:this._chart,vchart:this}),!0)}},{key:"renderSync",value:function(t){return this._renderSync({morphConfig:t,transformSpec:!0,actionSource:"render"})}},{key:"renderAsync",value:function(t){return fB(this,void 0,void 0,n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._renderAsync({morphConfig:t,transformSpec:!0,actionSource:"render"}));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"_renderSync",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._beforeRender(e)?(null===(t=this._compiler)||void 0===t||t.render(e.morphConfig),this._afterRender(),this):this}},{key:"_renderAsync",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return fB(this,void 0,void 0,n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._renderSync(t));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"_updateAnimateState",value:function(){var t,e;this._option.animation&&(null===(t=this._chart)||void 0===t||t.getAllRegions().forEach((function(t){var e;null===(e=t.animate)||void 0===e||e.updateAnimateState(mC.update,!0)})),null===(e=this._chart)||void 0===e||e.getAllComponents().forEach((function(t){var e;null===(e=t.animate)||void 0===e||e.updateAnimateState(mC.update,!0)})))}},{key:"release",value:function(){var t,e,i,n;(null===(t=this._onResize)||void 0===t?void 0:t.cancel)&&this._onResize.cancel(),this._chartPluginApply("releaseAll"),this._chartPlugin=null,this._chartSpecTransformer=null,null===(e=this._chart)||void 0===e||e.release(),null===(i=this._eventDispatcher)||void 0===i||i.release(),null===(n=this._compiler)||void 0===n||n.release(),this._unBindResizeEvent(),this._releaseData(),this._onError=null,this._onResize=null,this._container=null,this._currentTheme=null,this._option=null,this._chart=null,this._compiler=null,this._spec=null,this._specInfo=null,this._originalSpec=null,this._userEvents=null,this._event=null,this._eventDispatcher=null,this._isReleased=!0,FE.unregisterInstance(this)}},{key:"updateData",value:function(t,e,i){return fB(this,void 0,void 0,n().mark((function r(){return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this.updateDataSync(t,e,i));case 1:case"end":return n.stop()}}),r,this)})))}},{key:"_updateDataById",value:function(t,e,i){var n=this._spec.data.find((function(e){return e.name===t||e.id===t}));n?n.id===t?n.values=e:n.name===t&&n.parse(e,i):_t(e)?this._spec.data.push({id:t,values:e}):this._spec.data.push(e)}},{key:"updateDataInBatches",value:function(t){return fB(this,void 0,void 0,n().mark((function e(){var i=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._chart?(this._chart.updateFullData(t.map((function(t){return{id:t.id,values:t.data,parser:t.options}}))),this._chart.updateGlobalScaleDomain(),this._compiler.render(),this):(this._spec.data=Xt(this._spec.data),t.forEach((function(t){var e=t.id,n=t.data,r=t.options;i._updateDataById(e,n,r)})),this));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"updateDataSync",value:function(t,e,i){return vt(this._dataSet)?this:this._chart?(this._chart.updateData(t,e,!0,i),this._compiler.render(),this):(this._spec.data=Xt(this._spec.data),this._updateDataById(t,e,i),this)}},{key:"updateFullDataSync",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._chart)return this._chart.updateFullData(t),i&&this._compiler.render(),this;var n=Xt(this._spec.data);return Xt(t).forEach((function(t){var i,r=t.id,a=t.values,o=t.parser,s=t.fields,u=n.find((function(t){return t.name===r}));if(u)u instanceof V_?(u.setFields(Dt(s)),u.parse(a,Dt(o))):(u.values=a,pt(o)&&(u.parser=o),pt(s)&&(u.fields=s));else{var l=function(t,e){var i,n,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t instanceof V_)return t;var s,u=t.id,l=t.values,c=void 0===l?[]:l,h=t.fromDataIndex,d=t.fromDataId,f=t.transforms,v=void 0===f?[]:f,p=t.parser?Dt(t.parser):{clone:!0},g=Dt(t.fields);p.clone=!(!1===p.clone);var y=a.find((function(t){return t.name===u}));if(y)s=y;else{var m={name:u};if(g&&(m.fields=g),s=new V_(e,m),"string"==typeof d){var k=a.find((function(t){return t.name===d}));if(!k)return(null!==(i=o.onError)&&void 0!==i?i:X_)("no data matches fromDataId ".concat(d)),null;s.parse([k],{type:"dataview"}),s.transform({type:"copyDataView"})}else if("number"==typeof h){var b=a[h];if(!b)return(null!==(n=o.onError)&&void 0!==n?n:X_)("no data matches fromDataIndex ".concat(h)),null;s.parse([b],{type:"dataview"}),s.transform({type:"copyDataView"})}else Array.isArray(c)?s.parse(c,p):!bt(c)||p&&!["csv","dsv","tsv"].includes(p.type)?(s.parse([]),H_("values should be array")):s.parse(c,null!==(r=p)&&void 0!==r?r:{type:"csv"});v&&v.length&&v.forEach((function(t){e.getTransform(t.type)&&s.transform(t)}))}return s}(t,e._dataSet,n,{onError:null===(i=e._option)||void 0===i?void 0:i.onError});_t(e._spec.data)&&e._spec.data.push(l)}})),this}},{key:"updateFullData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return fB(this,void 0,void 0,n().mark((function i(){return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",this.updateFullDataSync(t,e));case 1:case"end":return i.stop()}}),i,this)})))}},{key:"updateSpec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;return fB(this,void 0,void 0,n().mark((function r(){var a;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a=this._updateSpec(t,e))){n.next=7;break}return n.next=4,this.updateCustomConfigAndRerender(a,!1,{morphConfig:i,transformSpec:a.reTransformSpec,actionSource:"updateSpec"});case 4:n.t0=this,n.next=8;break;case 7:n.t0=this;case 8:return n.abrupt("return",n.t0);case 9:case"end":return n.stop()}}),r,this)})))}},{key:"updateSpecSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,n=this._updateSpec(t,e);return n?(this.updateCustomConfigAndRerender(n,!0,{morphConfig:i,transformSpec:n.reTransformSpec,actionSource:"updateSpec"}),this):this}},{key:"updateSpecAndRecompile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._updateSpec(t,e);return this._updateCustomConfigAndRecompile(n,Object.assign({actionSource:"updateSpecAndRecompile"},i))}},{key:"_updateSpec",value:function(t){var e,i,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this._spec;if(this._setNewSpec(t,n)){Wt(r.theme,this._spec.theme)||this._setCurrentTheme();var a=this._shouldChartResize(r);return null===(i=null===(e=this._compiler)||void 0===e?void 0:e.getVGrammarView())||void 0===i||i.updateLayoutTag(),this._spec.type!==r.type?{reTransformSpec:!0,change:!0,reMake:!0,reCompile:!1,reSize:a}:(this._initChartSpec(this._spec,"render"),function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=function(e){return i.reduce((function(t,i){return t||(null==i?void 0:i[e])}),t[e])};return Object.assign(t,{change:r("change"),reCompile:r("reCompile"),reMake:r("reMake"),reRender:r("reRender"),reSize:r("reSize"),reTransformSpec:r("reTransformSpec")}),t}(this._chart.updateSpec(this._spec),{reTransformSpec:!1,change:a,reMake:!1,reCompile:!1,reSize:a}))}}},{key:"updateModelSpec",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return fB(this,void 0,void 0,n().mark((function a(){var o;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e&&this._spec){n.next=2;break}return n.abrupt("return",this);case 2:if(bt(e)&&(e=JSON.parse(e)),ft(t)||AE(this._spec,t,e,i),!this._chart){n.next=6;break}if(!(o=this._chart.getModelInFilter(t))){n.next=6;break}return n.abrupt("return",this._updateModelSpec(o,e,!1,i,r));case 6:return n.abrupt("return",this);case 7:case"end":return n.stop()}}),a,this)})))}},{key:"updateModelSpecSync",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;if(!e||!this._spec)return this;if(bt(e)&&(e=JSON.parse(e)),ft(t)||AE(this._spec,t,e,i),this._chart){var r=this._chart.getModelInFilter(t);if(r)return this._updateModelSpec(r,e,!0,i,n)}return this}},{key:"_updateModelSpec",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>4?arguments[4]:void 0;arguments.length>3&&void 0!==arguments[3]&&arguments[3]&&(e=SE({},t.getSpec(),e));var r=t.updateSpec(e);return t.reInit(e),(r.change||r.reCompile||r.reMake||r.reSize||r.reRender)&&this._chart.reDataFlow(),this.updateCustomConfigAndRerender(r,i,{morphConfig:n,transformSpec:!1,actionSource:"updateModelSpec"})}},{key:"resize",value:function(t,e){return fB(this,void 0,void 0,n().mark((function i(){return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",this.resizeSync(t,e));case 1:case"end":return i.stop()}}),i,this)})))}},{key:"resizeSync",value:function(t,e){var i,n;return this._beforeResize(t,e)?(null===(n=(i=this._compiler).resize)||void 0===n||n.call(i,t,e),this._afterResize()):this}},{key:"_beforeResize",value:function(t,e){var i,n,r,a;if(!this._chart||!this._compiler)return!1;var o=this._chart.getCanvasRect();return!(o&&o.width===t&&o.height===e||(this._chartPluginApply("onBeforeResize",t,e),null===(n=null===(i=this._option.performanceHook)||void 0===i?void 0:i.beforeResizeWithUpdate)||void 0===n||n.call(i),this._chart.onResize(t,e,!1),null===(a=null===(r=this._option.performanceHook)||void 0===r?void 0:r.afterResizeWithUpdate)||void 0===a||a.call(r),0))}},{key:"_afterResize",value:function(){return this._isReleased||this._event.emit(AA.afterResize,{chart:this._chart}),this}},{key:"updateViewBox",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this._chart&&this._compiler?(this._viewBox=t,this._chart.updateViewBox(t,i),i&&(this._compiler.render(),this._chart.onEvaluateEnd()),this._compiler.updateViewBox(t,e),this):this}},{key:"on",value:function(t,e,i){var n;this._userEvents&&(this._userEvents.push({eType:t,query:"function"==typeof e?null:e,handler:"function"==typeof e?e:i}),null===(n=this._event)||void 0===n||n.on(t,e,i))}},{key:"off",value:function(t,e){var i,n=this;if(this._userEvents&&0!==this._userEvents.length)if(e){var r=this._userEvents.findIndex((function(i){return i.eType===t&&i.handler===e}));r>=0&&(this._userEvents.splice(r,1),null===(i=this._event)||void 0===i||i.off(t,e))}else this._userEvents.forEach((function(e){var i;e.eType===t&&(null===(i=n._event)||void 0===i||i.off(t,e.handler))})),this._userEvents=this._userEvents.filter((function(e){return e.eType!==t}))}},{key:"updateState",value:function(t,e){this._chart&&this._chart.updateState(t,e)}},{key:"setSelected",value:function(t,e,i){this._chart&&this._chart.setSelected(t,e,i)}},{key:"setHovered",value:function(t,e,i){this._chart&&this._chart.setHovered(t,e,i)}},{key:"clearState",value:function(t){this._chart&&this._chart.clearState(t)}},{key:"clearSelected",value:function(){this._chart&&this._chart.clearSelected()}},{key:"clearHovered",value:function(){this._chart&&this._chart.clearHovered()}},{key:"_updateCurrentTheme",value:function(t){var e,i,n,r=this._option.theme,a=null===(e=this._spec)||void 0===e?void 0:e.theme;if(t&&(this._currentThemeName=t),Pt(r)&&Pt(a))this._currentTheme=zE(this._currentThemeName,!0);else if(bt(r)&&(!a||bt(a))||bt(a)&&(!r||bt(r))){var o=TE({},zE(this._currentThemeName,!0),zE(r,!0),zE(a,!0));this._currentTheme=o}else{var s=TE({},zE(this._currentThemeName),zE(r),zE(a));this._currentTheme=BE(s)}n=Ot(this._currentTheme,"component.poptip"),zt(hx.poptip,cx,n),null===(i=this._compiler)||void 0===i||i.setBackground(this._getBackground())}},{key:"_shouldChartResize",value:function(t){var e,i,n=!1;vt(this._spec.width)?!vt(t.width)&&(this._spec.width=t.width):this._spec.width!==t.width&&(n=!0),vt(this._spec.height)?!vt(t.height)&&(this._spec.height=t.height):this._spec.height!==t.height&&(n=!0);var r=this._autoSize;return this._autoSize=!!q_(this._option.mode)&&(null===(i=null!==(e=this._spec.autoFit)&&void 0!==e?e:this._option.autoFit)||void 0===i||i),this._autoSize!==r&&(n=!0),n}},{key:"_getBackground",value:function(){return("string"==typeof this._spec.background?this._spec.background:null)||this._currentTheme.background||this._option.background}},{key:"getCurrentTheme",value:function(){return zE(this._currentThemeName)}},{key:"getCurrentThemeName",value:function(){return this._currentThemeName}},{key:"setCurrentTheme",value:function(t){return fB(this,void 0,void 0,n().mark((function e(){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(NE.themeExist(t)){e.next=2;break}return e.abrupt("return",this);case 2:return i=this._setCurrentTheme(t),e.next=5,this.updateCustomConfigAndRerender(i,!1,{transformSpec:!1,actionSource:"setCurrentTheme"});case 5:return e.abrupt("return",this);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"setCurrentThemeSync",value:function(t){if(!NE.themeExist(t))return this;var e=this._setCurrentTheme(t);return this.updateCustomConfigAndRerender(e,!0,{transformSpec:!1,actionSource:"setCurrentTheme"}),this}},{key:"_setCurrentTheme",value:function(t){var e;return this._updateCurrentTheme(t),this._initChartSpec(this._getSpecFromOriginalSpec(),"setCurrentTheme"),null===(e=this._chart)||void 0===e||e.setCurrentTheme(),{change:!0,reMake:!1}}},{key:"_getTooltipComponent",value:function(){var t;return null===(t=this._chart)||void 0===t?void 0:t.getComponentsByType(m_.tooltip)[0]}},{key:"setTooltipHandler",value:function(t){var e,i;this._context.tooltipHandler=t;var n=this._getTooltipComponent();n&&(null===(i=null===(e=n.tooltipHandler)||void 0===e?void 0:e.release)||void 0===i||i.call(e),n.tooltipHandler=t)}},{key:"getTooltipHandlerByUser",value:function(){var t;return null===(t=this._context)||void 0===t?void 0:t.tooltipHandler}},{key:"getTooltipHandler",value:function(){var t=this._getTooltipComponent();return t?t.tooltipHandler:this._context.tooltipHandler}},{key:"showTooltip",value:function(t,e){var i,n=this._getTooltipComponent();return null!==(i=pt(t)&&"none"!==(null==n?void 0:n.showTooltip(t,e)))&&void 0!==i&&i}},{key:"hideTooltip",value:function(){var t,e=this._getTooltipComponent();return null!==(t=null==e?void 0:e.hideTooltip())&&void 0!==t&&t}},{key:"getLegendDataById",value:function(t){var e,i=null===(e=this._chart)||void 0===e?void 0:e.getComponentByUserId(t);return i?i.getLegendData():[]}},{key:"getLegendDataByIndex",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=null===(t=this._chart)||void 0===t?void 0:t.getComponentsByType(m_.discreteLegend);return i&&i[e]?i[e].getLegendData():[]}},{key:"getLegendSelectedDataById",value:function(t){var e,i=null===(e=this._chart)||void 0===e?void 0:e.getComponentByUserId(t);return i?i.getSelectedData():[]}},{key:"getLegendSelectedDataByIndex",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=null===(t=this._chart)||void 0===t?void 0:t.getComponentsByType(m_.discreteLegend);return i&&i[e]?i[e].getSelectedData():[]}},{key:"setLegendSelectedDataById",value:function(t,e){var i,n=null===(i=this._chart)||void 0===i?void 0:i.getComponentByUserId(t);n&&n.setSelectedData(e)}},{key:"setLegendSelectedDataByIndex",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1?arguments[1]:void 0,n=null===(t=this._chart)||void 0===t?void 0:t.getComponentsByType(m_.discreteLegend);n&&n[e]&&n[e].setSelectedData(i)}},{key:"getDataURL",value:function(){var t;return fB(this,void 0,void 0,n().mark((function e(){var i,r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.getStage(),!this._chart||!i){e.next=7;break}return i.render(),r=this._chart.getCanvas(),e.next=6,CC(r,{onError:this._onError});case 6:return e.abrupt("return",e.sent);case 7:return e.abrupt("return",(null===(t=this._option)||void 0===t||t.onError(new ReferenceError("render is not defined")),null));case 8:case"end":return e.stop()}}),e,this)})))}},{key:"exportImg",value:function(t){var e,i;return fB(this,void 0,void 0,n().mark((function r(){var a;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(q_(this._option.mode)){n.next=2;break}return n.abrupt("return",void(null===(e=this._option)||void 0===e||e.onError(new TypeError("non-browser environment can not export img"))));case 2:return n.next=4,this.getDataURL();case 4:(a=n.sent)?TC(t,a):null===(i=this._option)||void 0===i||i.onError(new ReferenceError("render is not defined"));case 6:case"end":return n.stop()}}),r,this)})))}},{key:"exportCanvas",value:function(){var t,e=this.getStage();if(this._chart&&e)return e.toCanvas();null===(t=this._option)||void 0===t||t.onError(new ReferenceError("render is not defined"))}},{key:"getImageBuffer",value:function(){var t,e;if("node"===this._option.mode){var i=this.getStage();return i?(i.render(),i.window.getImageBuffer()):(null===(e=this._option)||void 0===e||e.onError(new ReferenceError("render is not defined")),null)}null===(t=this._option)||void 0===t||t.onError(new TypeError("getImageBuffer() now only support node environment."))}},{key:"setLayout",value:function(t){var e;this._option.layout=t,null===(e=this._chart)||void 0===e||e.setLayout(t)}},{key:"reLayout",value:function(){var t;null===(t=this._chart)||void 0===t||t.setLayoutTag(!0)}},{key:"getCompiler",value:function(){return this._compiler}},{key:"getChart",value:function(){return this._chart}},{key:"getStage",value:function(){return this._compiler.getStage()}},{key:"getCanvas",value:function(){var t;return null===(t=this._compiler)||void 0===t?void 0:t.getCanvas()}},{key:"getContainer",value:function(){var t,e;return pt(this._container)?this._container:(e=bt(this._canvas)?null===document||void 0===document?void 0:document.getElementById(this._canvas):this._canvas,pt(e)?e.parentElement:null===(t=this.getCanvas())||void 0===t?void 0:t.parentElement)}},{key:"getComponents",value:function(){return this._chart.getAllComponents()}},{key:"getScale",value:function(t){var e,i=null===(e=this._chart)||void 0===e?void 0:e.getGlobalScale();return null==i?void 0:i.getScale(t)}},{key:"setDimensionIndex",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null===(e=this._chart)||void 0===e?void 0:e.setDimensionIndex(t,i)}},{key:"stopAnimation",value:function(){var t,e,i;null===(i=null===(e=null===(t=this._compiler)||void 0===t?void 0:t.getVGrammarView())||void 0===e?void 0:e.animate)||void 0===i||i.stop()}},{key:"pauseAnimation",value:function(){var t,e,i;null===(i=null===(e=null===(t=this._compiler)||void 0===t?void 0:t.getVGrammarView())||void 0===e?void 0:e.animate)||void 0===i||i.pause()}},{key:"resumeAnimation",value:function(){var t,e,i;null===(i=null===(e=null===(t=this._compiler)||void 0===t?void 0:t.getVGrammarView())||void 0===e?void 0:e.animate)||void 0===i||i.resume()}},{key:"convertDatumToPosition",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;if(!this._chart)return null;if(Pt(t))return null;var a,o=i.seriesId,s=i.seriesIndex,u=void 0===s?0:s;if(pt(o)?a=this._chart.getSeriesInUserId(o):pt(u)&&(a=null===(e=this._chart.getSeriesInIndex([u]))||void 0===e?void 0:e[0]),a){var l,c=Object.keys(t),h=a.getViewData().latestData.find((function(e){return c.every((function(i){return e[i]==t[i]}))})),d=a.getRegion().getLayoutStartPoint();return(l=h?a.dataToPosition(h,r):a.dataToPosition(t,r))?eE(l,d,n):null}return null}},{key:"convertValueToPosition",value:function(t,e){var i,n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this._chart||vt(t)||Pt(e))return null;if(!_t(t)){var a,o=e.axisId,s=e.axisIndex;if(pt(o)?a=this._chart.getComponentsByKey("axes").find((function(t){return t.userId===o})):pt(s)&&(a=null===(i=this._chart.getComponentsByKey("axes"))||void 0===i?void 0:i[s]),!a)return H_("Please check whether the `axisId` or `axisIndex` is set!"),null;var u=null==a?void 0:a.valueToPosition(t);if(r){var l=a.getLayoutStartPoint(),c=a.getOrient();return u+("bottom"===c||"top"===c?l.x:l.y)}return u}var h,d=e.seriesId,f=e.seriesIndex;return pt(d)?h=this._chart.getSeriesInUserId(d):pt(f)&&(h=null===(n=this._chart.getSeriesInIndex([f]))||void 0===n?void 0:n[0]),h?eE(h.valueToPosition(t[0],t[1]),h.getRegion().getLayoutStartPoint(),r):(H_("Please check whether the `seriesId` or `seriesIndex` is set!"),null)}},{key:"getFunction",value:function(t){return hB.instance().getFunction(t)}},{key:"registerFunction",value:function(t,e){t&&e&&hB.instance().registerFunction(t,e)}},{key:"unregisterFunction",value:function(t){t&&hB.instance().unregisterFunction(t)}},{key:"getFunctionList",value:function(){return hB.instance().getFunctionNameList()}},{key:"setRuntimeSpec",value:function(t){this._spec=t,this._updateSpecInfo()}},{key:"_initChartPlugin",value:function(){var t=VE.getChartPlugins();t.length>0&&(this._chartPlugin=new dB(this),this._chartPlugin.load(t.map((function(t){return new t}))),this._chartPluginApply("onInit",this._spec))}},{key:"_chartPluginApply",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];this._chartPlugin&&this._chartPlugin[t]&&this._chartPlugin[t].apply(this._chartPlugin,i)}},{key:"_getMode",value:function(){return this._option.mode||y_["desktop-browser"]}},{key:"_getChartOption",value:function(t){var e=this;return{type:t,globalInstance:this,eventDispatcher:this._eventDispatcher,dataSet:this._dataSet,container:this._container,canvas:this._canvas,map:new Map,mode:this._getMode(),modeParams:this._option.modeParams,getCompiler:function(){return e._compiler},performanceHook:this._option.performanceHook,viewBox:this._viewBox,animation:this._option.animation,getTheme:function(){var t;return null!==(t=e._currentTheme)&&void 0!==t?t:{}},getSpecInfo:function(){var t;return null!==(t=e._specInfo)&&void 0!==t?t:{}},layout:this._option.layout,onError:this._onError,disableTriggerEvent:!0===this._option.disableTriggerEvent}}}],[{key:"useRegisters",value:function(t){t.forEach((function(t){"function"==typeof t?t():console.error("Invalid function:",t)}))}},{key:"useChart",value:function(t){t.forEach((function(t){return VE.registerChart(t.type,t)}))}},{key:"useSeries",value:function(t){t.forEach((function(t){return VE.registerSeries(t.type,t)}))}},{key:"useComponent",value:function(t){t.forEach((function(t){return VE.registerComponent(t.type,t)}))}},{key:"useMark",value:function(t){t.forEach((function(t){var e;return VE.registerMark(null!==(e=t.constructorType)&&void 0!==e?e:t.type,t)}))}},{key:"useLayout",value:function(t){t.forEach((function(t){return VE.registerLayout(t.type,t)}))}},{key:"registerDataSetTransform",value:function(t,e){VE.registerTransform(t,e)}},{key:"registerFunction",value:function(t,e){t&&e&&hB.instance().registerFunction(t,e)}},{key:"unregisterFunction",value:function(t){t&&hB.instance().unregisterFunction(t)}},{key:"getFunction",value:function(t){return t?hB.instance().getFunction(t):null}},{key:"getFunctionList",value:function(){return hB.instance().getFunctionNameList()}},{key:"registerMap",value:function(t,e,i){var n=VE.getImplementInKey("registerMap");n&&n(t,e,i)}},{key:"unregisterMap",value:function(t){var e=VE.getImplementInKey("unregisterMap");e&&e(t)}},{key:"getMap",value:function(t){return e=t,vC.get(e);var e}},{key:"hideTooltip",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];FE.forEach((function(t){var e;return null===(e=null==t?void 0:t.hideTooltip)||void 0===e?void 0:e.call(t)}),t)}},{key:"getLogger",value:function(){return te.getInstance()}}])}();pB.InstanceManager=FE,pB.ThemeManager=NE,pB.globalConfig={uniqueTooltip:!0},pB.Utils=cB,pB.vglobal=Zf,VE.registerRegion("region",XC),VE.registerLayout("base",tB),kb(),eb(),zw.registerGraphic(Jx.group,is),VE.registerMark(lB.type,lB),PA.useRegisters([function(){zw.registerTransform("filter",{transform:OA,markPhase:"beforeJoin"},!0)},function(){zw.registerTransform("map",{transform:IA,markPhase:"beforeJoin"},!0)}]),PA.useRegisters([qA,ZA,HA,XA,YA,KA,JA,$A,QA]),Ht(nS,rS),zw.registerInteraction(nS.type,nS),Ht(iS,rS),zw.registerInteraction(iS.type,iS),LE(bE.name,bE),te.getInstance(Jt.Error);const gB=Bo();class yB extends es{get vchart(){return this._vchart}get vProduct(){return this._vchart}constructor(t){var e;super(t),this.type="chart",this.drawTag=!1,this.numberType=gB,t.vchart?this._vchart=t.vchart:t.vchart=this._vchart=new t.ClassType(t.spec,Object.assign({renderCanvas:t.renderCanvas,mode:t.mode,modeParams:t.modeParams,canvasControled:!1,dpr:t.dpr,interactive:t.interactive,animation:t.animation,autoFit:!1,disableTriggerEvent:t.disableTriggerEvent,disableDirtyBounds:t.disableDirtyBounds,ticker:t.ticker,beforeRender:()=>{var t;if(!this.stage)return;const e=this._vchart.getStage();e._editor_needRender||(e.pauseRender(),null===(t=this.stage.dirtyBounds)||void 0===t||t.union(this.globalAABBBounds),this.stage.renderNextFrame())},afterRender:()=>{this._vchart&&this.stage&&(this._vchart.getStage()._editor_needRender=!1,this._vchart.getStage().stage.resumeRender())}},null!==(e=t.chartInitOptions)&&void 0!==e?e:{})),this._vchart.renderSync();const i=this._vchart.getStage();i&&(i.background=!1,i.pauseTriggerEvent()),t.viewBox&&this.updateViewBox(t.viewBox)}updateSpec(t,e=!1,i=!1){this._vchart.updateSpecSync(t,e,i)}updateViewBox(t){this._updateViewBox(t)}_updateViewBox(t){const e=Object.assign({},t);this.setAttributes({x:e.x1,y:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}),e.x2-=e.x1,e.y2-=e.y1,e.x1=0,e.y1=0,this._vchart.resize(e.x2-e.x1,e.y2-e.y1),this._vchart.updateViewBox(e)}}class mB extends s_{get specProcess(){return this._specProcess}get dataTempTransform(){return this._specProcess.dataTempTransform}get chartType(){var t;return null===(t=this._specProcess.dataTempTransform.specTemp)||void 0===t?void 0:t.getChartType()}get tempType(){var t;return null===(t=this._specProcess.dataTempTransform.specTemp)||void 0===t?void 0:t.type}get graphic(){return this._graphic}constructor(t,e){super(t,e),this._runtime=[],this.onSpecReady=()=>{var t;console.log("onSpecReady !"),this._runtime.forEach((t=>{var e;return null===(e=t.onSpecReady)||void 0===e?void 0:e.call(t)})),null===(t=this._specProcess.dataTempTransform.specTemp)||void 0===t||t.standardizedSpec(this._specProcess.getVisSpec(),{character:this}),this._updateVisactorSpec(),this._afterRender()},this._initSpecProcess()}_initRuntime(){}clearConfig(t){}show(){this._graphic.setAttribute("visibleAll",!0)}hide(){this._graphic.setAttribute("visibleAll",!1)}getGraphicParent(){return this._graphic}tickTo(t){}release(){var t,e;this._specProcess.release(),null===(e=null===(t=this._graphic)||void 0===t?void 0:t.parent)||void 0===e||e.removeChild(this._graphic),this._specProcess=this._graphic=null}}class kB{get dataTempTransform(){return this._dataTempTransform}constructor(t,e,i){this._onSpecReadyCall=null,this._character=null,this.emitter=new ct,this._dataUpdateSuccess=t=>{this.emitter.emit("beforeTempChange"),this._characterSpec.options.data=this._dataTempTransform.dataParser.getSave(),this.emitter.emit("afterDataChange")},this._tempUpdateSuccess=(t,e)=>{const i=!1!==(null==t?void 0:t.triggerHistory);this.emitter.emit("beforeTempChange",i,e),this._characterSpec.type=this._dataTempTransform.specTemp.type,this.emitter.emit("afterTempChange",e)},this._dataTempUpdateSuccess=(t,e)=>{const i=!1!==(null==t?void 0:t.triggerHistory);this.emitter.emit("beforeTempChange",i,e),this._characterSpec.options.data=this._dataTempTransform.dataParser.getSave(),this._characterSpec.type=this._dataTempTransform.specTemp.type,this.emitter.emit("afterTempChange",e)},this.transformSpec=()=>{this._visSpec=this._dataTempTransform.getBaseSpec(),this._mergeConfig(),this._onSpecReadyCall()},this._character=t,this._dataTempTransform=new e({character:t,specProcess:this}),this._onSpecReadyCall=i,this._dataTempTransform.emitter.on("specReady",this.transformSpec),this._dataTempTransform.emitter.on("tempUpdate",this._tempUpdateSuccess),this._dataTempTransform.emitter.on("dataUpdate",this._dataUpdateSuccess)}getVisSpec(){return this._visSpec}getCharacterSpec(){return this._characterSpec}release(){this._onSpecReadyCall=null,this._dataTempTransform.release(),this._dataTempTransform=null,this._characterSpec=null,this._visSpec=null,this._character=null}getCharacterType(){return this._characterSpec.type}}const bB={type:null,zIndex:0,id:"",position:void 0,options:{data:null,theme:null,color:null,layout:{viewBox:{x:0,y:0,width:0,height:0},data:[]},marker:{markLine:[],markArea:[]},markStyle:null}};class _B extends kB{constructor(){super(...arguments),this._characterSpec=Fb(bB)}updateConfig(t){this._characterSpec=t,this._dataTempTransform.updateChartTemp(this._characterSpec.type)}_mergeConfig(){}}class xB{get specTemp(){return this._specTemp}get nextTemp(){return this._nextTemp}constructor({specProcess:t,character:e}){this._state="alive",this._specTemp=null,this._nextTemp=null,this._changeType="none",this._updateOption={},this.emitter=new ct,this._character=e,this._specProcess=t}_setNoHistoryState(){this._updateOption=this._updateOption||{},this._updateOption.triggerHistory&&(this._updateOption.saveData=!0,this._updateOption.triggerHistory=!1)}updateChartTemp(t){if(this._createNextTemp(t)){if(this._changeType="temp",this._checkEnable(this._nextTemp)){const t=this._specTemp;this._setTempToNext(),this.emitter.emit("tempUpdate",this._updateOption,{currentTemp:t,nextTemp:this._specTemp}),this.emitter.emit("specReady")}this._changeType="none"}}_setTempToNext(){var t;null===(t=this._specTemp)||void 0===t||t.clear(),this._specTemp=this._nextTemp,this._nextTemp=null}_createNextTemp(t){var e,i;return t===(null===(e=this._specTemp)||void 0===e?void 0:e.type)?(console.warn("same temp type:",t),!1):(null===(i=this._nextTemp)||void 0===i||i.clear(),this._nextTemp=p_.createChartTemp(t,this._specProcess.getCharacterSpec()),!!this._nextTemp)}_checkEnable(t){return!!t&&!!t.checkDataEnable(this._specProcess.getCharacterSpec().options.data)}getBaseSpec(){return this._specTemp.getSpec(this._specProcess.getCharacterSpec().options.data,{character:this._character})}release(){var t,e;this._state="release",null===(t=this._specTemp)||void 0===t||t.clear(),null===(e=this._nextTemp)||void 0===e||e.clear(),this.emitter.removeAllListeners(),this.emitter=this._specTemp=null}}class wB extends xB{get specTemp(){return this._specTemp}get nextTemp(){return this._nextTemp}}class SB extends mB{get spec(){return this._spec}_initSpecProcess(){this._specProcess=new _B(this,wB,this.onSpecReady)}_initRuntime(){SB.RunTime.forEach((t=>{this._runtime.push(new t(this))}))}_parserSpec(){this._specProcess.updateConfig(this._spec)}_initGraphics(){var t,e;const i=i_(this._spec.position),n={x1:i.x,x2:i.x+i.width,y1:i.y,y2:i.y+i.height},r=Fb(null!==(t=this._specProcess.getVisSpec())&&void 0!==t?t:this._spec.options.spec);r.width=i.width,r.height=i.height,this._graphic=new yB(Object.assign(Object.assign({renderCanvas:this._option.canvas.getCanvas(),spec:r,ClassType:pB,vchart:null,zIndex:this._spec.zIndex,mode:"desktop-browser",dpr:window.devicePixelRatio,interactive:!1,autoRender:!1,disableDirtyBounds:!0,viewBox:n,ticker:this._option.canvas.getStage().ticker,visibleAll:!1},null!==(e=this._spec.options.panel)&&void 0!==e?e:{}),{chartInitOptions:{animation:!0,disableTriggerEvent:!0,performanceHook:{afterInitializeChart:()=>{var t,e;null===(e=null===(t=this.specProcess.dataTempTransform)||void 0===t?void 0:t.specTemp)||void 0===e||e.afterInitializeChart({character:this}),this._runtime.forEach((t=>{var e;return null===(e=t.afterInitializeChart)||void 0===e?void 0:e.call(t)}))},afterVRenderDraw:()=>{this._runtime.forEach((t=>{var e;return null===(e=t.afterVRenderDraw)||void 0===e?void 0:e.call(t)}))}}}})),this.option.graphicParent.add(this._graphic)}_afterRender(){}_updateVisactorSpec(){var t;null===(t=this._graphic)||void 0===t||t.updateSpec(this._specProcess.getVisSpec())}clearCharacter(){this._graphic.vProduct.release(),this._graphic.parent.removeChild(this._graphic)}tickTo(t){this._ticker.tickAt(t)}checkEvent(t){return!1}}function AB(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"===("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}function TB(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))}SB.type="CharacterChart",SB.RunTime=[class{constructor(t){this.type="ComponentSpec",this._character=t}onSpecReady(){const t=this._character.specProcess.getVisSpec(),e=this._character.specProcess.getCharacterSpec().options;if(!e)return;const i=e.componentSpec;null==i||i.forEach((e=>{"axes"===e.specKey&&this._mergeAxesSpec(t,e)}))}_mergeAxesSpec(t,e){if(t.axes){const i=t.axes.find(((t,i)=>!!g_(t,i,e.matchInfo)||t.orient===e.matchInfo.orient));i?Ub(i,e.spec):t.axes.push(e.spec)}else t.axes=[Object.assign({},e)]}afterInitializeChart(){}afterVRenderDraw(){}},class{constructor(t){this.type="CommonSpec",this._character=t}onSpecReady(){const t=this._character.specProcess.getVisSpec(),e=this._character.specProcess.getCharacterSpec().options;e&&Ub(t,{color:e.color,theme:e.theme,padding:e.padding,title:e.title})}afterInitializeChart(){}afterVRenderDraw(){}},class{constructor(t){this.type="SeriesSpec",this._character=t}onSpecReady(){var t;const e=this._character.specProcess.getVisSpec(),i=this._character.specProcess.getCharacterSpec().options;i&&(e.series||1!==(null===(t=i.seriesSpec)||void 0===t?void 0:t.length)?i.seriesSpec.forEach((t=>{if(!e.series)return void(e.series=[Object.assign({},t.spec)]);const i=e.series.find(((e,i)=>g_(e,i,t.matchInfo)));i?Ub(i,t.spec):e.series.push(Object.assign({},t.spec))})):Ub(e,i.seriesSpec[0].spec))}afterInitializeChart(){}afterVRenderDraw(){}}];const EB=Symbol.for("ChartRender");let CB=class extends Vh{constructor(){super(...arguments),this.numberType=gB}drawShape(t,e,i,n,r,a,o,s){var u;const{baseOpacity:l=1}=t.attribute;if(l<=0)return;e.baseGlobalAlpha*=l,super.drawShape(t,e,i,n,r,a,o,s),e.baseGlobalAlpha/=l;const c=t.vchart.getStage(),h=c.window.getContext();h.baseGlobalAlpha*=l,c._editor_needRender=!0;const d=t.globalTransMatrix.clone(),f=t.stage.window.getViewBoxTransform();d.multiply(f.a,f.b,f.c,f.d,f.e,f.f),c.window.setViewBoxTransform(d.a,d.b,d.c,d.d,d.e,d.f),null===(u=c.dirtyBounds)||void 0===u||u.clear(),c.render(),h.baseGlobalAlpha/=l}draw(t,e,i,n){this._draw(t,{},!1,i,n)}};CB=AB([L()],CB);const BB="BarChart",MB="AreaChart",RB="LineChart",PB="PieChart",OB="ScatterChart",IB="RangeColumnChart",LB="RoseChart",DB="RadarChart",jB="WordCloudChart",FB="TreeMapChart",NB="SunburstChart";class zB{clear(){}getChartType(){return this.type}afterInitializeChart(){}standardizedSpec(t,e){}}function GB(t,e=!1,i=!1){return"vertical"===t?[{orient:"left",id:"axis-left",type:"linear",autoIndent:!1,maxWidth:null,maxHeight:null},{orient:"bottom",id:"axis-bottom",type:"band",autoIndent:!1,maxWidth:null,maxHeight:null,trimPadding:i,paddingInner:[.2,0],paddingOuter:[.2,0]}]:[{orient:"left",id:"axis-left",type:"band",autoIndent:!1,maxWidth:null,maxHeight:null,trimPadding:i},{orient:"bottom",id:"axis-bottom",type:"linear",autoIndent:!1,maxWidth:null,maxHeight:null}]}function UB(t){return 0!==(t=Wb(t)).length}function WB(t,e=!0){return{visible:e,position:"vertical"===t?"end":"start",label:{style:{lineHeight:"100%",lineWidth:1,stroke:"#ffffff",fontSize:16,fontWeight:"bold"},space:10}}}class VB extends zB{constructor(t){var e;super(),this.direction="vertical",this.multiDimensionField=!1,this.stack=!0,this.defaultTotalLabel=!1,this.percent=!1,this.trimPadding=!1,this.defaultLegendVisible=!1,this.direction=null!==(e=t.options.direction)&&void 0!==e?e:"vertical"}checkDataEnable(t,e){return!!t}getSpec(t,e){const i=function(t,e=!1,i=!1){return Object.assign(Object.assign({direction:t},{type:"common",series:[],region:[{id:"region-0"}]}),{axes:GB(t,e,i)})}(this.direction,this.percent,this.trimPadding);return i.legends&&(i.legends.visible=this.defaultLegendVisible),function(t,e,i,n,r){return e.data=Wb(n),e.series=e.data.map((e=>function(t,e,i,n){return t.xField=n.xField,t.yField=n.yField,t.dataId=i.id,t.id=`series-${i.id}`,t.seriesField=n.seriesField,t.stack=!0===n.stack,t}(t(),0,e,r))),e}(this._getSeriesSpec.bind(this),i,this.direction,t,{multiDimensionField:this.multiDimensionField,stack:this.stack,xField:e.character.specProcess.getCharacterSpec().options.xField,yField:e.character.specProcess.getCharacterSpec().options.yField,seriesField:e.character.specProcess.getCharacterSpec().options.seriesField})}}class HB extends VB{constructor(){super(...arguments),this.type=HB.type,this.seriesType="bar",this.defaultTotalLabel=!0}_getSeriesSpec(){return{type:"bar",stack:!0,direction:this.direction}}afterInitializeChart(){console.log("afterInitializeChart")}}HB.type=BB,p_.registerChartTemp(HB.type,HB);class XB extends SB{}XB.type="BarChart";class YB extends VB{constructor(){super(...arguments),this.type=YB.type,this.seriesType="line",this.stack=!1,this.trimPadding=!0}_getSeriesSpec(){return{direction:this.direction,type:"line",stack:!1,line:{style:{lineCap:"butt"}},label:{visible:!0,position:"top",style:{lineHeight:"100%",fontSize:16,fontWeight:"bold"},overlap:!0,smartInvert:!0},seriesLabel:WB(this.direction)}}}YB.type=RB,p_.registerChartTemp(YB.type,YB);class KB extends SB{}KB.type="LineChart";class qB extends VB{constructor(){super(...arguments),this.type=qB.type,this.seriesType="area",this.trimPadding=!0}_getSeriesSpec(){return{type:"area",stack:!0,direction:this.direction,line:{style:{lineCap:"butt"}}}}}qB.type=MB,p_.registerChartTemp(qB.type,qB);class ZB extends SB{}ZB.type="AreaChart";const JB="_editor_dimension_field",$B="_editor_value_field";var QB;!function(t){t.vertical="vertical",t.horizontal="horizontal"}(QB||(QB={}));class tM extends zB{constructor(){super(...arguments),this.type=tM.type}checkDataEnable(t,e){return UB(t)}getSpec(t,e){const i={type:"common",series:[],region:[{id:"region-0"}]};return i.series=[{type:"pie"}],i.data=Wb(t),i.series[0].valueField=$B,i.series[0].categoryField=JB,i.series[0].dataId=i.data[0].id,i.series[0].seriesField=JB,i.series[0].id=`series-${i.data[0].id}`,i}}tM.type=PB,p_.registerChartTemp(tM.type,tM);class eM extends SB{}eM.type="PieChart";class iM extends zB{constructor(t){super(),this.defaultLegendVisible=!1}checkDataEnable(t,e){return!!t}getSpec(t,e){const i=Object.assign(Object.assign({},{type:"common",series:[],region:[{id:"region-0"}]}),{axes:[{orient:"radius"},{orient:"angle"}]});return i.legends&&(i.legends.visible=this.defaultLegendVisible),function(t,e,i,n){return e.data=Wb(i),e.series=e.data.map((e=>function(t,e,i){return t.dataId=e.id,t.id=`series-${e.id}`,t.seriesField=i.seriesField,t}(t(),e,n))),e}(this._getSeriesSpec.bind(this),i,t,{categoryField:e.character.specProcess.getCharacterSpec().options.categoryField,valueField:e.character.specProcess.getCharacterSpec().options.valueField,seriesField:e.character.specProcess.getCharacterSpec().options.seriesField})}}class nM extends iM{constructor(){super(...arguments),this.type=nM.type}_getSeriesSpec(){return{type:"rose"}}}nM.type=LB,p_.registerChartTemp(nM.type,nM);class rM extends SB{}rM.type="RoseChart";class aM extends iM{constructor(){super(...arguments),this.type=aM.type}checkDataEnable(t,e){return UB(t)}_getSeriesSpec(){return{type:"radar"}}}aM.type=DB,p_.registerChartTemp(aM.type,aM);class oM extends SB{}oM.type="RadarChart";class sM extends zB{constructor(){super(...arguments),this.type=sM.type}checkDataEnable(t,e){return UB(t)}getSpec(t,e){const i={type:"common",series:[],region:[{id:"region-0"}]};return i.series=[{type:"wordCloud"}],i.data=Wb(t),i.series[0].valueField=$B,i.series[0].nameField=JB,i.series[0].dataId=i.data[0].id,i.series[0].seriesField=JB,i.series[0].id=`series-${i.data[0].id}`,i}}sM.type=jB,p_.registerChartTemp(sM.type,sM);class uM extends SB{}uM.type="WordCloudChart";class lM extends zB{constructor(){super(...arguments),this.type=lM.type}checkDataEnable(t,e){return UB(t)}getSpec(t,e){const i={type:"common",series:[],region:[{id:"region-0"}]};return i.series=[{type:"treemap"}],i.data=Wb(t),i.series[0].valueField=$B,i.series[0].categoryField=JB,i.series[0].dataId=i.data[0].id,i.series[0].seriesField=JB,i.series[0].id=`series-${i.data[0].id}`,i}}lM.type=FB,p_.registerChartTemp(lM.type,lM);class cM extends SB{}cM.type="TreeMapChart";class hM extends zB{constructor(){super(...arguments),this.type=hM.type}checkDataEnable(t,e){return UB(t)}getSpec(t,e){const i={type:"common",series:[],region:[{id:"region-0"}]};return i.series=[{type:"sunburst"}],i.data=Wb(t),i.series[0].valueField=$B,i.series[0].categoryField=JB,i.series[0].dataId=i.data[0].id,i.series[0].seriesField=JB,i.series[0].id=`series-${i.data[0].id}`,i}}hM.type=NB,p_.registerChartTemp(hM.type,hM);class dM extends SB{}dM.type="SunburstChart";class fM extends VB{constructor(){super(...arguments),this.type=fM.type,this.seriesType="scatter",this.trimPadding=!0}_getSeriesSpec(){return{type:"scatter",stack:!1,direction:this.direction}}}fM.type=OB,p_.registerChartTemp(fM.type,fM);class vM extends SB{}vM.type="ScatterChart";class pM extends VB{constructor(){super(...arguments),this.type=pM.type,this.seriesType="rangeColumn",this.trimPadding=!0}_getSeriesSpec(){return{type:"rangeColumn",stack:!1,direction:this.direction}}standardizedSpec(t,e){t.series&&t.series.forEach((t=>{t.minField&&t.maxField&&("vertical"===this.direction?t.yField||(t.yField=[t.minField,t.maxField]):t.xField||(t.xField=[t.minField,t.maxField]))}))}}pM.type=IB,p_.registerChartTemp(pM.type,pM);class gM extends SB{}gM.type="RangeColumnChart";class yM extends n_{getInitialAttributes(){return{x:0,y:0,width:120,height:80,angle:0,fontSize:16,textAlign:"center",textBaseline:"middle",fill:"#000000",lineWidth:2,ignoreBuf:!0,stroke:!1,shapePoints:[]}}init(){var t,e;this._graphic||(this._graphic=Ys(this._transformAttributes(Object.assign(Object.assign({},this.getInitialAttributes()),null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.graphic)&&void 0!==e?e:{}))),this._graphic.name=`graphic-text-${this._character.id}`,this._character.getGraphicParent().add(this._graphic))}applyLayoutData(t){const{x:e,y:i,width:n,height:r,angle:a}=i_(t);this._graphic.setAttributes(this._transformAttributes({x:e,y:i,angle:a,width:n,height:r,maxLineWidth:n,heightLimit:r}))}}class mM extends u_{constructor(){super(...arguments),this.graphicType="text"}_createGraphic(){return new yM(d_.TEXT,this)}}class kM extends n_{getInitialAttributes(){return{x:0,y:0,width:120,height:80,maxWidth:120,maxHeight:80,angle:0,fontSize:16,textAlign:"center",textBaseline:"middle",fill:"#000000",lineWidth:2,ignoreBuf:!0,stroke:!1,ellipsis:!0,textConfig:[]}}init(){var t,e;this._graphic||(this._graphic=Hl(this._transformAttributes(Object.assign(Object.assign({},this.getInitialAttributes()),null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.graphic)&&void 0!==e?e:{}))),this._graphic.name=`graphic-richtext-${this._character.id}`,this._character.getGraphicParent().add(this._graphic))}applyLayoutData(t){const{x:e,y:i,width:n,height:r,angle:a}=i_(t);this._graphic.setAttributes(this._transformAttributes({x:e,y:i,angle:a,maxWidth:n,maxHeight:r}))}}class bM extends u_{constructor(){super(...arguments),this.graphicType="richtext"}_createGraphic(){return new kM(d_.RICH_TEXT,this)}}let _M=class{constructor(){this.type="chart",this.numberType=gB}contains(t,e,i){var n;const r=t.vchart.getStage();r._editor_needRender=!0;const a=t.globalTransMatrix.clone(),o=t.stage.window.getViewBoxTransform();a.multiply(o.a,o.b,o.c,o.d,o.e,o.f),r.window.setViewBoxTransform(a.a,a.b,a.c,a.d,a.e,a.f),null===(n=r.dirtyBounds)||void 0===n||n.clear();const s={x:0,y:0};a.transformPoint(e,s);return r.pick(s.x,s.y)}};_M=AB([L()],_M);class xM extends n_{getInitialAttributes(){return{x:0,y:0,points:[],angle:0,lineWidth:2,stroke:"#000000",shapePoints:[]}}init(){var t,e;this._graphic||(this._graphic=Tl(this._transformAttributes(Object.assign(Object.assign({},this.getInitialAttributes()),null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.graphic)&&void 0!==e?e:{}))),this._graphic.name=`graphic-line-${this._character.id}`,this._character.getGraphicParent().add(this._graphic))}}class wM extends u_{constructor(){super(...arguments),this.graphicType="line"}_createGraphic(){return new xM(d_.RECT,this)}}class SM extends n_{getInitialAttributes(){return{x:0,y:0,width:120,height:80,image:"",angle:0,anchor:[60,40],shapePoints:[]}}init(){var t,e;this._graphic||(this._graphic=Nl(this._transformAttributes(Object.assign(Object.assign({},this.getInitialAttributes()),null!==(e=null===(t=this._character.spec.options)||void 0===t?void 0:t.graphic)&&void 0!==e?e:{}))),this._graphic.name=`graphic-image-${this._character.id}`,this._character.getGraphicParent().add(this._graphic))}}class AM extends u_{constructor(){super(...arguments),this.graphicType="image"}_createGraphic(){return new SM(d_.IMAGE,this)}}qf(),Pg(nr),Zf.setEnv("browser");class TM{getStage(){return this._stage}getCanvas(){return this._canvas}get container(){return this._container}constructor(t,e){this._story=t,this._container=e,this._initCanvas()}_initCanvas(){const t=document.createElement("canvas");t.width=this._container.clientWidth*window.devicePixelRatio,t.height=this._container.clientHeight*window.devicePixelRatio,t.style.width=this._container.clientWidth+"px",t.style.height=this._container.clientHeight+"px",t.style.position="absolute",t.id=`_visactor_story_canvas_${this._story.id}`,this._container.appendChild(t),this._canvas=t;const e=bv({canvas:this._canvas,width:this._canvas.clientWidth,height:this._canvas.clientHeight,canvasControled:!0,autoRender:!1,disableDirtyBounds:!0,ticker:new Xr([]),dpr:window.devicePixelRatio,event:{clickInterval:300}});this._stage=e,e.on("*",((t,e)=>{"click"===e&&console.log("canvas",t)}))}getEventDetail(t){const e=this._story.getCharacters();let i,n;return Object.keys(this._story.getCharacters()).find((r=>{const a=e[r],o=a.checkEvent(t);return!!o&&(i=o,n=a,!0)})),{character:n,characterInfo:i}}release(){this._stage.release()}}class EM{constructor(t){return EM._instance||(this.init(t),EM._instance=this),EM._instance}init(t){if(this._processorMap=new Map,t)for(const e in t)console.log(`register ${e} processor.`),this.registerProcessor(e,t[e])}registerProcessor(t,e){return!!this._processorMap&&(this._processorMap.set(t,e),!0)}getProcessorList(t){return this._processorMap&&this._processorMap.get(t)}getProcessor(t,e){var i;return this._processorMap&&(null===(i=this._processorMap.get(t))||void 0===i?void 0:i[e])}doAction(t,e,i){return TB(this,void 0,void 0,(function*(){const n=this.getProcessor(t,e);if(n){console.log(`Execute action => ${e}, character => ${t}`);const r=yield n(...i);return console.log("Action Executed:",r),r}console.error(`Action not found: character => ${t}, action => ${e} `)}))}release(){EM._instance=null,this._processorMap&&(this._processorMap.clear(),this._processorMap=null)}}EM._instance=null;const CM=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,{id:o,values:s}=a,u=Fb(n._dataSet.getDataView(o).rawData),l=Ib(s)?s:[s];u.push(...l),yield r.updateDataSync(o,u)}));function BM(t){if(!t)return null;const e=t.getChart();return e?e.getAllSeries().map((t=>t.getMarksWithoutRoot())).flat():null}const MM=(t,e)=>{const i=Ib(t)?t:[t],n=e;return i.some((t=>((t,e)=>{const i=Object.keys(t),n=Object.keys(e),r=i.filter((t=>n.includes(t)));return r.every((i=>t[i]===e[i]))})(t,n)))},RM=t=>(e,i,n)=>TB(void 0,void 0,void 0,(function*(){var i;const r=n,{payload:a}=r;if(e){const n=null===(i=BM(e))||void 0===i?void 0:i.filter((e=>e.type===t));if(!n||!n.length)return;const o=Object.keys(r.payload),s=t=>(e,i)=>{var n,o;return MM(e,r.payload.data)&&Bb(null==a?void 0:a[t])?a[t]:null===(o=null===(n=i.graphicItem)||void 0===n?void 0:n.attribute)||void 0===o?void 0:o[t]};n.forEach((t=>{t.getProduct().encode(o.reduce(((t,e)=>(t[e]=s(e),t)),{}))})),e.renderSync()}})),PM=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,{id:o,data:s,values:u}=a;if(u)r.updateDataSync(o,u);else{const t=Fb(n._dataSet.getDataView(o).rawData);(Ib(s)?s:[s]).forEach((e=>{const{sourceValue:i,targetValue:n}=e,r=t.findIndex((t=>((t,e)=>{for(const i in e)if(e.hasOwnProperty(i)&&(!t.hasOwnProperty(i)||t[i]!==e[i]))return!1;return!0})(t,i)));-1!==r&&t.splice(r,1,n)})),r.updateDataSync(o,t)}}));var OM;!function(t){t[t.LEFT_TO_RIGHT=0]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=1]="RIGHT_TO_LEFT",t[t.TOP_TO_BOTTOM=2]="TOP_TO_BOTTOM",t[t.BOTTOM_TO_TOP=3]="BOTTOM_TO_TOP",t[t.STROKE=4]="STROKE"}(OM||(OM={}));class IM extends Zr{constructor(t,e,i,n,r){super(t,e,i,n,r);const{direction:a=OM.LEFT_TO_RIGHT,fill:o=!0,stroke:s=!0}=r||{};this.direction=a,this.fill=o,this.stroke=s,this.fillGradient={gradient:"linear",stops:[]},this.strokeGradient={gradient:"linear",stops:[]}}getEndProps(){return{fill:this.toFill,stroke:this.toStroke}}onBind(){this.toFill=this.target.getComputedAttribute("fill"),this.toStroke=this.target.getComputedAttribute("stroke")}onEnd(){}onUpdate(t,e,i){if(this.toFill&&this.toStroke){switch(this.direction){case OM.RIGHT_TO_LEFT:this.rightToLeft(t,e,i);break;case OM.TOP_TO_BOTTOM:this.topToBottom(t,e,i);break;case OM.BOTTOM_TO_TOP:this.bottomToTop(t,e,i);break;case OM.STROKE:this.strokePath(t,e,i);break;default:this.leftToRight(t,e,i)}if(t)i.fill=this.toFill,i.stroke=this.toStroke;else{if(this.fill){const t=this.toFill;this.fillGradient.stops=[{offset:0,color:t},{offset:e,color:t},{offset:Math.min(1,2*e),color:"white"}],i.fill=this.fillGradient}if(this.stroke){const t=this.toStroke;this.strokeGradient.stops=[{offset:0,color:t},{offset:e,color:t},{offset:Math.min(1,2*e),color:"white"}],i.stroke=this.strokeGradient}}}}leftToRight(t,e,i){this.fill&&(this.fillGradient.x0=0,this.fillGradient.y0=0,this.fillGradient.x1=1,this.fillGradient.y1=0),this.stroke&&(this.strokeGradient.x0=0,this.strokeGradient.y0=0,this.strokeGradient.x1=1,this.strokeGradient.y1=0)}strokePath(t,e,i){if(this.fill&&(this.fillGradient.x0=0,this.fillGradient.y0=0,this.fillGradient.x1=1,this.fillGradient.y1=0),this.stroke){const t=300,n=e*t;i.lineDash=[n,t-n]}}rightToLeft(t,e,i){this.fill&&(this.fillGradient.x0=1,this.fillGradient.y0=0,this.fillGradient.x1=0,this.fillGradient.y1=0),this.stroke&&(this.strokeGradient.x0=1,this.strokeGradient.y0=0,this.strokeGradient.x1=0,this.strokeGradient.y1=0)}topToBottom(t,e,i){this.fill&&(this.fillGradient.x0=0,this.fillGradient.y0=0,this.fillGradient.x1=0,this.fillGradient.y1=1),this.stroke&&(this.strokeGradient.x0=0,this.strokeGradient.y0=0,this.strokeGradient.x1=0,this.strokeGradient.y1=1)}bottomToTop(t,e,i){this.fill&&(this.fillGradient.x0=0,this.fillGradient.y0=1,this.fillGradient.x1=0,this.fillGradient.y1=0),this.stroke&&(this.strokeGradient.x0=0,this.strokeGradient.y0=1,this.strokeGradient.x1=0,this.strokeGradient.y1=0)}}wp();class LM extends Zr{constructor(){super(...arguments),this.fromText="",this.toText=""}getEndProps(){return!1===this.valid?{}:{text:this.to}}onBind(){var t,e,i,n;if(this.fromText=null!==(e=null===(t=this.from)||void 0===t?void 0:t.text)&&void 0!==e?e:"",this.toText=null!==(n=null===(i=this.to)||void 0===i?void 0:i.text)&&void 0!==n?n:"",!this.toText||Ib(this.toText))this.valid=!1;else{this.toText=this.toText.toString();const t=this.target.attachShadow(),e=this.target.getComputedAttribute("fontSize"),i=Tl({x:0,y:0,dy:-e/2,points:[{x:0,y:0},{x:0,y:e}],stroke:"black"});t.add(i)}}onEnd(){this.target.detachShadow()}onUpdate(t,e,i){var n;if(!1===this.valid)return;const r=this.fromText.length,a=this.toText.length,o=Math.ceil(r+(a-r)*e);i.text=this.toText.substr(0,o);const s=null===(n=this.target.shadowRoot)||void 0===n?void 0:n.at(0),u=Tc(Object.assign(Object.assign({},this.target.attribute),i)).width()/2+2;s.setAttribute("x",u)}}function DM(t){return t.getGraphicParent().getChildren()}function jM(t){return t.getGraphicParent()}function FM(t,e){return"chart"===t._graphic.type||"move"===e?[jM(t)]:DM(t)}const NM=(t,e)=>t&&e.duration&&e.duration>0;const zM={fade:function(t,e){var i,n,r,a,o;if(!NM(t,e))return!1;const{fade:s={}}=e,u=null!==(n=null!==(i=s.opacity)&&void 0!==i?i:e.opacity)&&void 0!==n?n:1,l=null!==(r=s.duration)&&void 0!==r?r:e.duration,c=null!==(a=s.easing)&&void 0!==a?a:e.easing,h=null!==(o=s.isBaseOpacity)&&void 0!==o&&o?"baseOpacity":"opacity";return t.setAttributes({[h]:0}),t.animate().to({[h]:u},l,c),!0},scale:function(t,e){var i,n,r,a;if(!NM(t,e))return!1;const{scale:o={}}=e,s=null!==(n=null!==(i=o.ratio)&&void 0!==i?i:e.ratio)&&void 0!==n?n:1,u=null!==(r=o.duration)&&void 0!==r?r:e.duration,l=null!==(a=o.easing)&&void 0!==a?a:e.easing;return t.setAttributes({scaleX:0,scaleY:0}),t.animate().to({scaleX:s,scaleY:s},u,l),!0},move:function(t,e){var i,n,r,a,o;if(!NM(t,e))return!1;const{move:s={}}=e,u=null!==(n=null!==(i=s.from)&&void 0!==i?i:e.from)&&void 0!==n?n:1,l=null!==(r=s.duration)&&void 0!==r?r:e.duration,c=null!==(a=s.easing)&&void 0!==a?a:e.easing,h=null===(o=s.isVariableSpeed)||void 0===o||o,d=Math.abs(t.AABBBounds.x2-t.AABBBounds.x1),f=Math.abs(t.AABBBounds.y2-t.AABBBounds.y1);let v=t.attribute.x,p=t.attribute.y;if(h)switch(u){case"right":v=t.parent.width;break;case"left":v=-d;break;case"bottom":p=t.parent.height+f;break;case"top":p=-f;break;case"top-right":p=-f,v=t.parent.width;break;case"top-left":p=-f,v=-d;break;case"bottom-left":p=t.parent.height+f,v=-d;break;case"bottom-right":p=t.parent.height+f,v=t.parent.width}else{const e=Math.max(t.parent.width,t.parent.height);switch(u){case"right":v+=e;break;case"left":v+=-e;break;case"bottom":p+=e;break;case"top":p+=-e;break;case"top-right":v+=e,p+=-e;break;case"top-left":v+=-e,p+=-e;break;case"bottom-left":p+=e,v+=-e;break;case"bottom-right":v+=e,p+=e}}return t.animate().from({x:v,y:p},l,c),!0},wipe:function(t,e){var i,n,r,a;if(!NM(t,e))return!1;const{wipe:o={}}=e,s=null!==(n=null!==(i=o.from)&&void 0!==i?i:e.from)&&void 0!==n?n:1,u=null!==(r=o.duration)&&void 0!==r?r:e.duration,l=null!==(a=o.easing)&&void 0!==a?a:e.easing,{fill:c}=t.attribute;return Ob(c)?t.animate().play(new IM({},{},u,l,{direction:GM[s]})):Mb(c),!0},typewriter:function(t,e){if(t&&"text"===t.type){const{duration:i,easing:n}=e,{text:r}=t.attribute;Ob(r)&&t.animate().play(new LM({text:""},{text:r},i,n))}}},GM={left:0,right:1,top:2,bottom:3,stroke:4},UM=(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{animation:n}=null!==(e=i.payload)&&void 0!==e?e:{},{effect:r}=null!=n?n:{};(r&&zM[r]?[r]:Object.keys(zM)).forEach((e=>{if(n.effect===e||n[e]){const i=zM[e];FM(t,e).forEach((t=>i(t,n)))}return!1}))})),WM=(t,e,i)=>{switch(e.effect){case"grow":return VM(t,e,Object.assign(Object.assign({},i),{center:!1}));case"centerGrow":return VM(t,e,Object.assign(Object.assign({},i),{center:!0}));case"fade":return HM(t,e,Object.assign(Object.assign({},i),{center:!1}))}},VM=(t,e,i={center:!1,disappear:!1})=>{var n;const{duration:r,loop:a,oneByOne:o,easing:s}=e,{center:u,disappear:l}=i,c=null!==(n=t.getChart().getSpec().direction)&&void 0!==n?n:"vertical",h=t.getChart().getSpec().xField,d=t.getChart().getSpec().yField,[f,v]=XM(t);return{type:l?u?"growCenterOut":"growHeightOut":u?"growCenterIn":"growHeightIn",duration:r,loop:a,oneByOne:o,easing:s,options:(t,e,i)=>{const n=null==t?void 0:t["vertical"===c?d:h];return"vertical"===c?{overall:null==v?void 0:v.getScale(0).scale(0),orient:n>0?"negative":"positive"}:{overall:null==f?void 0:f.getScale(0).scale(0),orient:n>0?"negative":"positive"}}}},HM=(t,e,i={center:!1,disappear:!1})=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"fadeOut":"fadeIn",duration:n,loop:r,oneByOne:a,easing:o}};const XM=t=>{const e=t.getChart().getComponentsByKey("axes"),i=e.find((t=>{if(function(t){return"bottom"===t||"top"===t}(t.getOrient()))return!0})),n=e.find((t=>{if(function(t){return"left"===t||"right"===t}(t.getOrient()))return!0}));return[i,n]},YM=t=>t.getChart().getAllSeries(),KM=(t,e)=>t.getMarksWithoutRoot().filter((t=>t.type===e)),qM=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},ZM,a);YM(r).forEach(((t,e)=>{const i=KM(t,"rect");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=WM(r,o.animation,{index:e+i,disappear:!1});n&&n.animate.run(a)}))}))})),ZM={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},JM=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},$M,a);YM(r).forEach(((t,e)=>{const i=KM(t,"rect");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=WM(r,o.animation,{index:e+i,disappear:!0});n&&n.animate.run(a)}))}))})),$M={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},QM=(t,e,i)=>"grow"===e.effect?tR(t,e,i):eR(t,e,i),tR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"scaleOut":"scaleIn",duration:n,loop:r,oneByOne:a,easing:o}},eR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"fadeOut":"fadeIn",duration:n,loop:r,oneByOne:a,easing:o}},iR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},nR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"symbol");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=QM(r,o.animation,{disappear:!1,markIndex:e+i});n&&n.animate.run(a)}))}))})),nR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},rR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},aR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"symbol");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=QM(r,o.animation,{disappear:!0,markIndex:e+i});n&&n.animate.run(a)}))}))})),aR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},oR=(t,e,i)=>"grow"===e.effect?sR(t,e,i):uR(t,e,i),sR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{markIndex:s,disappear:u}=i;return{type:u?"clipOut":"clipIn",duration:n,loop:r,oneByOne:a,easing:o}},uR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"fadeOut":"fadeIn",duration:n,loop:r,oneByOne:a,easing:o}},lR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},cR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"area");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=oR(r,o.animation,{disappear:!1,markIndex:e+i});n&&n.animate.run(a)}))}))})),cR={animation:{effect:"fade",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},hR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},dR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"area");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=oR(r,o.animation,{disappear:!0,markIndex:e+i});n&&n.animate.run(a)}))}))})),dR={animation:{effect:"fade",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},fR=(t,e,i)=>"grow"===e.effect?vR(t,e,i):pR(t,e,i),vR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"clipOut":"clipIn",duration:n,loop:r,oneByOne:a,easing:o}},pR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"fadeOut":"fadeIn",duration:n,loop:r,oneByOne:a,easing:o}},gR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},yR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"line");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=fR(r,o.animation,{disappear:!1,markIndex:e+i});n&&n.animate.run(a)}))}))})),yR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},mR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},kR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"line");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=fR(r,o.animation,{disappear:!0,markIndex:e+i});n&&n.animate.run(a)}))}))})),kR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},bR=(t,e,i)=>{switch(e.effect){case"grow":case"growRadius":return _R(t,e,i);case"growAngle":return xR(t,e,i);default:return wR(t,e,i)}},_R=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"growRadiusOut":"growRadiusIn",duration:n,loop:r,oneByOne:a,easing:o}},xR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"growAngleOut":"growAngleIn",duration:n,loop:r,oneByOne:a,easing:o}},wR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"fadeOut":"fadeIn",duration:n,loop:r,oneByOne:a,easing:o}},SR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},AR,a);YM(r).forEach(((t,e)=>{const i=KM(t,"arc");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=bR(r,o.animation,{disappear:!1,index:e+i});n&&n.animate.run(a)}))}))})),AR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},TR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=null==e?void 0:e._vchart,r=n||t;if(!r)return;const{payload:a}=i,o=Ub({},ER,a);YM(r).forEach(((t,e)=>{const i=KM(t,"arc");i.length&&i.forEach(((t,i)=>{const n=t.getProduct(),a=bR(r,o.animation,{disappear:!0,index:e+i});n&&n.animate.run(a)}))}))})),ER={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},CR=(t,e,i)=>"grow"===e.effect?BR(t,e,i):MR(t,e,i),BR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"scaleOut":"scaleIn",duration:n,loop:r,oneByOne:a,easing:o}},MR=(t,e,i)=>{const{duration:n,loop:r,oneByOne:a,easing:o}=e,{disappear:s}=i;return{type:s?"fadeOut":"fadeIn",duration:n,loop:r,oneByOne:a,easing:o}},RR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},PR={animation:{effect:"grow",duration:2e3,easing:"cubicOut",oneByOne:!1,loop:!1}},OR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){qM(t,0,i),delete i.payload.animation.effect,UM(t,e,i)}));function IR(t,e){var i,n,r,a,o;if(!NM(t,e))return!1;const{fade:s={}}=e,u=null!==(n=null!==(i=s.opacity)&&void 0!==i?i:e.opacity)&&void 0!==n?n:0,l=null!==(r=s.duration)&&void 0!==r?r:e.duration,c=null!==(a=s.easing)&&void 0!==a?a:e.easing,h=null!==(o=s.isBaseOpacity)&&void 0!==o&&o?"baseOpacity":"opacity";return t.setAttributes({[h]:1}),t.animate().to({[h]:u},l,c),!0}function LR(t,e){var i,n,r,a,o;if(!NM(t,e))return!1;const{scale:s={}}=e,u=null!==(n=null!==(i=s.ratio)&&void 0!==i?i:e.ratio)&&void 0!==n?n:0,l=null!==(r=s.scaleCenter)&&void 0!==r?r:e.scaleCenter,c=null!==(a=s.duration)&&void 0!==a?a:e.duration,h=null!==(o=s.easing)&&void 0!==o?o:e.easing,d=t.attribute.scaleCenter;return l&&t.setAttributes({scaleCenter:l}),t.animate().to({scaleX:u,scaleY:u},c,h).onEnd((()=>{d&&t.setAttributes({scaleCenter:d})})),!0}function DR(t,e){var i,n,r,a,o;if(!NM(t,e))return!1;const{move:s={}}=e,u=null!==(n=null!==(i=s.to)&&void 0!==i?i:e.to)&&void 0!==n?n:1,l=null!==(r=s.duration)&&void 0!==r?r:e.duration,c=null!==(a=s.easing)&&void 0!==a?a:e.easing,h=null===(o=s.isVariableSpeed)||void 0===o||o,d=Math.abs(t.AABBBounds.x2-t.AABBBounds.x1),f=Math.abs(t.AABBBounds.y2-t.AABBBounds.y1);let v=t.attribute.x,p=t.attribute.y;if(h)switch(u){case"right":v=t.parent.width;break;case"left":v=-d;break;case"bottom":p=t.parent.height+f;break;case"top":p=-f}else{const e=Math.max(t.parent.width,t.parent.height);switch(u){case"right":v+=e;break;case"left":v+=-e;break;case"bottom":p+=e;break;case"top":p+=-e}}return t.animate().to({x:v,y:p},l,c),!0}const jR={fade:IR,scale:LR,move:DR};const FR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var e;const n=t.getGraphicParent(),r=(null==n?void 0:n._vchart)?null==n?void 0:n._vchart:t;if(!r)return;const a=null===(e=r.getChart().getComponentsByType("title")[0])||void 0===e?void 0:e._titleComponent;if(!a)return;const{payload:o}=i,s=Ub({},NR,o),{animation:u}=s;u?a.getElementsByType("text").forEach((t=>{!function(t,e,i){let n=!0;switch(e){case"scale":LR(t,i);break;case"fade":IR(t,i);break;case"move":DR(t,i);break;default:n=!1}}(t,u.effect,u)})):a.getElementsByType("text").forEach((t=>{t.setAttributes({visible:!1})}))})),NR={animation:{effect:"fade",duration:300,easing:"linear"}},zR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),i=(null==e?void 0:e._vchart)?null==e?void 0:e._vchart:t;if(!i)return;const n=i.getChart().getComponentsByKey("axes");n&&(n.forEach((t=>{t.getMarks().forEach((t=>{t.getProduct().encode({title:{visible:!1},label:{visible:!1},tick:{visible:!1},subTick:{visible:!1},line:{visible:!1},style:{visible:!1},subGrid:{visible:!1}})}))})),i.renderSync())})),GR=(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{animation:n}=null!==(e=i.payload)&&void 0!==e?e:{},{effect:r}=null!=n?n:{};(r&&jR[r]?[r]:Object.keys(jR)).forEach((e=>{if(n.effect===e||n[e]){const i=jR[e];FM(t,e).forEach((t=>i(t,n)))}}))})),UR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const n=t.getGraphicParent(),r=null==n?void 0:n._vchart;(r||t)&&(JM(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{effect:"fade",duration:i.payload.animation.duration,easing:i.payload.animation.easing}}}),GR(t,e,i),zR(t),n.setAttributes({visible:!1}))})),WR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n;const r=i,a=null!==(n=e.markPoint)&&void 0!==n?n:[];a.push({id:r.elementId,coordinate:r.data,itemContent:r.payload.itemContent,itemLine:r.payload.itemLine}),e.markPoint=a,t.updateSpecSync(e)})),VR=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const{elementId:n,payload:r,data:a}=i,o=e.title;o.push(Object.assign({id:n,text:a},r)),e.title=o,t.updateSpecSync(e)}));function HR(t,e){if(1===e)return t;const i=new t_(t),{h:n,s:r,l:a}=Xb(i.color.r,i.color.g,i.color.b),o=Math.max(0,Math.min(100,a*e));return i.setHsl(n,r,o),i.toRGBA()}
2
+ /*!
3
+ * paths 3.12.5
4
+ * https://gsap.com
5
+ *
6
+ * Copyright 2008-2024, GreenSock. All rights reserved.
7
+ * Subject to the terms at https://gsap.com/standard-license or for
8
+ * Club GSAP members, the agreement issued with that membership.
9
+ * @author: Jack Doyle, jack@greensock.com
10
+ */
11
+ let XR=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,YR=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,KR=Math.PI/180,qR=Math.sin,ZR=Math.cos,JR=Math.abs,$R=Math.sqrt,QR=1e5,tP=t=>Math.round(t*QR)/QR||0;function eP(t,e,i,n,r,a,o,s,u){if(t===s&&e===u)return;i=JR(i),n=JR(n);let l=r%360*KR,c=ZR(l),h=qR(l),d=Math.PI,f=2*d,v=(t-s)/2,p=(e-u)/2,g=c*v+h*p,y=-h*v+c*p,m=g*g,k=y*y,b=m/(i*i)+k/(n*n);b>1&&(i=$R(b)*i,n=$R(b)*n);let _=i*i,x=n*n,w=(_*x-_*k-x*m)/(_*k+x*m);w<0&&(w=0);let S=(a===o?-1:1)*$R(w),A=S*(i*y/n),T=S*(-n*g/i),E=(t+s)/2+(c*A-h*T),C=(e+u)/2+(h*A+c*T),B=(g-A)/i,M=(y-T)/n,R=(-g-A)/i,P=(-y-T)/n,O=B*B+M*M,I=(M<0?-1:1)*Math.acos(B/$R(O)),L=(B*P-M*R<0?-1:1)*Math.acos((B*R+M*P)/$R(O*(R*R+P*P)));isNaN(L)&&(L=d),!o&&L>0?L-=f:o&&L<0&&(L+=f),I%=f,L%=f;let D,j=Math.ceil(JR(L)/(f/4)),F=[],N=L/j,z=4/3*qR(N/2)/(1+ZR(N/2)),G=c*i,U=h*i,W=h*-n,V=c*n;for(D=0;D<j;D++)g=ZR(r=I+D*N),y=qR(r),B=ZR(r+=N),M=qR(r),F.push(g-z*y,y+z*g,B+z*M,M-z*B,B,M);for(D=0;D<F.length;D+=2)g=F[D],y=F[D+1],F[D]=g*G+y*W+E,F[D+1]=g*U+y*V+C;return F[D-2]=s,F[D-1]=u,F}
12
+ /*!
13
+ * CustomEase 3.12.5
14
+ * https://gsap.com
15
+ *
16
+ * @license Copyright 2008-2024, GreenSock. All rights reserved.
17
+ * Subject to the terms at https://gsap.com/standard-license or for
18
+ * Club GSAP members, the agreement issued with that membership.
19
+ * @author: Jack Doyle, jack@greensock.com
20
+ */
21
+ let iP,nP,rP=()=>iP||"undefined"!=typeof window&&(iP=window.gsap)&&iP.registerPlugin&&iP,aP=()=>{iP=rP(),iP?(iP.registerEase("_CE",cP.create),nP=1):console.warn("Please gsap.registerPlugin(CustomEase)")},oP=t=>~~(1e3*t+(t<0?-.5:.5))/1e3,sP=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,uP=/[cLlsSaAhHvVtTqQ]/g,lP=function(t,e,i,n,r,a,o,s,u,l,c){let h,d=(t+i)/2,f=(e+n)/2,v=(i+r)/2,p=(n+a)/2,g=(r+o)/2,y=(a+s)/2,m=(d+v)/2,k=(f+p)/2,b=(v+g)/2,_=(p+y)/2,x=(m+b)/2,w=(k+_)/2,S=o-t,A=s-e,T=Math.abs((i-o)*A-(n-s)*S),E=Math.abs((r-o)*A-(a-s)*S);return l||(l=[{x:t,y:e},{x:o,y:s}],c=1),l.splice(c||l.length-1,0,{x:x,y:w}),(T+E)*(T+E)>u*(S*S+A*A)&&(h=l.length,lP(t,e,d,f,m,k,x,w,u,l,c),lP(x,w,b,_,g,y,o,s,u,l,c+1+(l.length-h))),l};class cP{constructor(t,e,i){nP||aP(),this.id=t,this.setData(e,i)}setData(t,e){e=e||{};let i,n,r,a,o,s,u,l,c,h=(t=t||"0,0,1,1").match(sP),d=1,f=[],v=[],p=e.precision||1,g=p<=1;if(this.data=t,(uP.test(t)||~t.indexOf("M")&&t.indexOf("C")<0)&&(h=function(t){let e,i,n,r,a,o,s,u,l,c,h,d,f,v,p,g=(t+"").replace(YR,(t=>{let e=+t;return e<1e-4&&e>-1e-4?0:e})).match(XR)||[],y=[],m=0,k=0,b=2/3,_=g.length,x=0,w="ERROR: malformed path: "+t,S=function(t,e,i,n){c=(i-t)/3,h=(n-e)/3,s.push(t+c,e+h,i-c,n-h,i,n)};if(!t||!isNaN(g[0])||isNaN(g[1]))return console.log(w),y;for(e=0;e<_;e++)if(f=a,isNaN(g[e])?(a=g[e].toUpperCase(),o=a!==g[e]):e--,n=+g[e+1],r=+g[e+2],o&&(n+=m,r+=k),e||(u=n,l=r),"M"===a)s&&(s.length<8?y.length-=1:x+=s.length),m=u=n,k=l=r,s=[n,r],y.push(s),e+=2,a="L";else if("C"===a)s||(s=[0,0]),o||(m=k=0),s.push(n,r,m+1*g[e+3],k+1*g[e+4],m+=1*g[e+5],k+=1*g[e+6]),e+=6;else if("S"===a)c=m,h=k,"C"!==f&&"S"!==f||(c+=m-s[s.length-4],h+=k-s[s.length-3]),o||(m=k=0),s.push(c,h,n,r,m+=1*g[e+3],k+=1*g[e+4]),e+=4;else if("Q"===a)c=m+(n-m)*b,h=k+(r-k)*b,o||(m=k=0),m+=1*g[e+3],k+=1*g[e+4],s.push(c,h,m+(n-m)*b,k+(r-k)*b,m,k),e+=4;else if("T"===a)c=m-s[s.length-4],h=k-s[s.length-3],s.push(m+c,k+h,n+(m+1.5*c-n)*b,r+(k+1.5*h-r)*b,m=n,k=r),e+=2;else if("H"===a)S(m,k,m=n,k),e+=1;else if("V"===a)S(m,k,m,k=n+(o?k-m:0)),e+=1;else if("L"===a||"Z"===a)"Z"===a&&(n=u,r=l,s.closed=!0),("L"===a||JR(m-n)>.5||JR(k-r)>.5)&&(S(m,k,n,r),"L"===a&&(e+=2)),m=n,k=r;else if("A"===a){if(v=g[e+4],p=g[e+5],c=g[e+6],h=g[e+7],i=7,v.length>1&&(v.length<3?(h=c,c=p,i--):(h=p,c=v.substr(2),i-=2),p=v.charAt(1),v=v.charAt(0)),d=eP(m,k,+g[e+1],+g[e+2],+g[e+3],+v,+p,(o?m:0)+1*c,(o?k:0)+1*h),e+=i,d)for(i=0;i<d.length;i++)s.push(d[i]);m=s[s.length-2],k=s[s.length-1]}else console.log(w);return e=s.length,e<6?(y.pop(),e=0):s[0]===s[e-2]&&s[1]===s[e-1]&&(s.closed=!0),y.totalPoints=x+e,y}(t)[0]),i=h.length,4===i)h.unshift(0,0),h.push(1,1),i=8;else if((i-2)%6)throw"Invalid CustomEase";for(0==+h[0]&&1==+h[i-2]||((t,e,i)=>{i||0===i||(i=Math.max(+t[t.length-1],+t[1]));let n,r=-1*+t[0],a=-i,o=t.length,s=1/(+t[o-2]+r),u=-e||(Math.abs(+t[o-1]-+t[1])<.01*(+t[o-2]-+t[0])?(t=>{let e,i=t.length,n=1e20;for(e=1;e<i;e+=6)+t[e]<n&&(n=+t[e]);return n})(t)+a:+t[o-1]+a);for(u=u?1/u:-s,n=0;n<o;n+=2)t[n]=(+t[n]+r)*s,t[n+1]=(+t[n+1]+a)*u})(h,e.height,e.originY),this.segment=h,a=2;a<i;a+=6)n={x:+h[a-2],y:+h[a-1]},r={x:+h[a+4],y:+h[a+5]},f.push(n,r),lP(n.x,n.y,+h[a],+h[a+1],+h[a+2],+h[a+3],r.x,r.y,1/(2e5*p),f,f.length-1);for(i=f.length,a=0;a<i;a++)u=f[a],l=f[a-1]||u,(u.x>l.x||l.y!==u.y&&l.x===u.x||u===l)&&u.x<=1?(l.cx=u.x-l.x,l.cy=u.y-l.y,l.n=u,l.nx=u.x,g&&a>1&&Math.abs(l.cy/l.cx-f[a-2].cy/f[a-2].cx)>2&&(g=0),l.cx<d&&(l.cx?d=l.cx:(l.cx=.001,a===i-1&&(l.x-=.001,d=Math.min(d,.001),g=0)))):(f.splice(a--,1),i--);if(i=1/d+1|0,o=1/i,s=0,u=f[0],g){for(a=0;a<i;a++)c=a*o,u.nx<c&&(u=f[++s]),n=u.y+(c-u.x)/u.cx*u.cy,v[a]={x:c,cx:o,y:n,cy:0,nx:9},a&&(v[a-1].cy=n-v[a-1].y);v[i-1].cy=f[f.length-1].y-n}else{for(a=0;a<i;a++)u.nx<a*o&&(u=f[++s]),v[a]=u;s<f.length-1&&(v[a-1]=f[f.length-2])}return this.ease=t=>{let e=v[t*i|0]||v[i-1];return e.nx<t&&(e=e.n),e.y+(t-e.x)/e.cx*e.cy},this.ease.custom=this,this.id&&iP&&iP.registerEase(this.id,this.ease),this}getSVGData(t){return cP.getSVGData(this,t)}static create(t,e,i){return new cP(t,e,i).ease}static register(t){iP=t,aP()}static get(t){return iP.parseEase(t)}static getSVGData(t,e){let i,n,r,a,o,s,u,l,c,h,d=(e=e||{}).width||100,f=e.height||100,v=e.x||0,p=(e.y||0)+f,g=iP.utils.toArray(e.path)[0];if(e.invert&&(f=-f,p=0),"string"==typeof t&&(t=iP.parseEase(t)),t.custom&&(t=t.custom),t instanceof cP)i=function(t){"number"==typeof t[0]&&(t=[t]);let e,i,n,r,a="",o=t.length;for(i=0;i<o;i++){for(r=t[i],a+="M"+tP(r[0])+","+tP(r[1])+" C",e=r.length,n=2;n<e;n++)a+=tP(r[n++])+","+tP(r[n++])+" "+tP(r[n++])+","+tP(r[n++])+" "+tP(r[n++])+","+tP(r[n])+" ";r.closed&&(a+="z")}return a}(function(t,e,i,n,r,a,o){let s,u,l,c,h,d=t.length;for(;--d>-1;)for(s=t[d],u=s.length,l=0;l<u;l+=2)c=s[l],h=s[l+1],s[l]=c*e+h*n+a,s[l+1]=c*i+h*r+o;return t._dirty=1,t}([t.segment],d,0,0,-f,v,p));else{for(i=[v,p],u=Math.max(5,200*(e.precision||1)),a=1/u,u+=2,l=5/u,c=oP(v+a*d),h=oP(p+t(a)*-f),n=(h-p)/(c-v),r=2;r<u;r++)o=oP(v+r*a*d),s=oP(p+t(r*a)*-f),(Math.abs((s-h)/(o-c)-n)>l||r===u-1)&&(i.push(c,h),n=(s-h)/(o-c)),c=o,h=s;i="M"+i.join(",")}return g&&g.setAttribute("d",i),i}}rP()&&iP.registerPlugin(cP);class hP extends Zr{constructor(t,e,i,n,r){super(t,e,i,n,r);const{dy:a=20,customEase:o}=r||{};this.dy=a,o&&(this.customEase=o)}getEndProps(){return this.to}getFromProps(){return this.from}onBind(){this.target&&this.target.setAttributes(this.from)}onUpdate(t,e,i){const n=this.customEase?this.customEase(e):e;i.dy=-this.dy*n}}const dP=(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent();if(e){const{payload:t}=null!=i?i:{};!function(t,e){if(t){const{dy:i}=e;let{customEase:n}=e;const{y1:r,y2:a}=t.AABBBounds,o=Math.abs(r-a);n||(n=cP.create("bounce","M0,0 C0,0 0.058,1 0.2,1 0.346,1 0.41,0 0.53,0 0.559,0 0.681,-0.002 0.702,0.011 0.788,0.065 0.774,0.212 0.853,0.212 0.928,0.212 1,0 1,0 ",{})),t.animate().play(new hP({},{},3e3,"linear",{dy:null!=i?i:.2*o,customEase:n}))}}(e,t.animation)}})),fP={add:CM,addPatch:CM,updateProcessor:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){SR(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n,r,a,o;const s=t.getGraphicParent(),u=null==s?void 0:s._vchart;(u||t)&&(TR(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:null===(r=null===(n=i.payload)||void 0===n?void 0:n.animation)||void 0===r?void 0:r.duration,easing:null===(o=null===(a=i.payload)||void 0===a?void 0:a.animation)||void 0===o?void 0:o.easing,effect:"fade"}}}),zR(t),GR(t,e,i),s.setAttributes({visible:!1}))})),arcStyle:RM("arc")},vP={add:CM,addPatch:CM,update:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){iR(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const n=t.getGraphicParent(),r=null==n?void 0:n._vchart;(r||t)&&(rR(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:i.payload.animation.duration,easing:i.payload.animation.easing,effect:"fade"}}}),zR(t),GR(t,e,i),n.setAttributes({visible:!1}))})),symbolStyle:RM("symbol")},pP={add:CM,addPatch:CM,updateProcessor:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:OR,disappear:UR,barStyle:RM("rect")},gP={add:CM,addPatch:CM,updateProcessor:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const n=t.getGraphicParent(),r=null==n?void 0:n._vchart;(r||t)&&(iR(t,0,i),lR(t,0,i),gR(t,0,i),UM(t,e,i))})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n,r,a,o;const s=t.getGraphicParent(),u=null==s?void 0:s._vchart;(u||t)&&(rR(t,0,i),hR(t,0,i),mR(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:null===(r=null===(n=null==i?void 0:i.payload)||void 0===n?void 0:n.animation)||void 0===r?void 0:r.duration,easing:null===(o=null===(a=null==i?void 0:i.payload)||void 0===a?void 0:a.animation)||void 0===o?void 0:o.easing,effect:"fade"}}}),zR(t),GR(t,e,i),s.setAttributes({visible:!1}))})),areaStyle:RM("area")},yP={add:CM,addPatch:CM,updateProcessor:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){((t,e,i)=>{TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=(null==e?void 0:e._vchart)||t;if(!n)return;const{payload:r}=i,a=Ub({},RR,r);YM(n).forEach(((t,e)=>{const i=KM(t,"text");i.length&&i.forEach(((t,i)=>{const r=t.getProduct(),o=CR(n,a.animation,{index:e+i,disappear:!1});r&&r.animate.run(o)}))}))}))})(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const n=t.getGraphicParent(),r=null==n?void 0:n._vchart;(r||t)&&(((t,e,i)=>{TB(void 0,void 0,void 0,(function*(){const e=t.getGraphicParent(),n=(null==e?void 0:e._vchart)||t;if(!n)return;const{payload:r}=i,a=Ub({},PR,r);YM(n).forEach(((t,e)=>{const i=KM(t,"text");i.length&&i.forEach(((t,i)=>{const r=t.getProduct(),o=CR(n,a.animation,{index:e+i,disappear:!0});r&&r.animate.run(o)}))}))}))})(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:i.payload.animation.duration,easing:i.payload.animation.easing,effect:"fade"}}}),zR(t),GR(t,e,i),n.setAttributes({visible:!1}))})),symbolStyle:RM("symbol")},mP={add:CM,addPatch:CM,updateProcessor:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){SR(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n,r,a,o;const s=t.getGraphicParent(),u=null==s?void 0:s._vchart;(u||t)&&(TR(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:null===(r=null===(n=i.payload)||void 0===n?void 0:n.animation)||void 0===r?void 0:r.duration,easing:null===(o=null===(a=i.payload)||void 0===a?void 0:a.animation)||void 0===o?void 0:o.easing,effect:"fade"}}}),zR(t),GR(t,e,i),s.setAttributes({visible:!1}))})),symbolStyle:RM("symbol")},kP={add:CM,addPatch:CM,updateProcessor:PM,bounce:dP,createMarkPoint:WR,createTitle:VR,appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){qM(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n,r,a,o;const s=t.getGraphicParent(),u=null==s?void 0:s._vchart;(u||t)&&(JM(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:null===(r=null===(n=i.payload)||void 0===n?void 0:n.animation)||void 0===r?void 0:r.duration,easing:null===(o=null===(a=i.payload)||void 0===a?void 0:a.animation)||void 0===o?void 0:o.easing,effect:"fade"}}}),zR(t),GR(t,e,i),s.setAttributes({visible:!1}))})),rectStyle:RM("rect")},bP={appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){delete i.payload.animation.effect,UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const n=t.getGraphicParent(),r=null==n?void 0:n._vchart;(r||t)&&(mR(t,0,i),hR(t,0,i),zR(t),GR(t,e,i),n.setAttributes({visible:!1}))}))},_P={add:CM,addPatch:CM,update:PM},xP={bounce:dP},wP={createMarkPoint:WR,createTitle:VR},SP={CharacterChart:bP,BarChart:Object.assign(Object.assign(Object.assign({},_P),xP),{createMarkPoint:WR,createTitle:VR,barStyle:RM("rect"),appear:OR,disappear:UR,dance:(t,e,i)=>{if(!t)return;const n=BM(t).filter((t=>"rect"===t.type));n.length&&n.forEach((t=>{const e=t.getProduct(),{elements:n}=e,r=n.find((t=>MM(t.data,i.data)));if(Cb(r))return;const a=[{dy:-50,scaleY:.5,fill:"red"},{dy:0,scaleY:.5,fill:"red"},{dy:-30,scaleY:.7,fill:"red"},{dy:0,scaleY:.7,fill:"red"},{dy:-18,scaleY:.9,fill:"red"},{dy:0,scaleY:1,fill:"red"}];a.forEach((t=>{r.getGraphicItem().animate().to(t,500/a.length,"elasticIn")}))}))}}),LineChart:Object.assign(Object.assign(Object.assign(Object.assign({},_P),xP),wP),{lineStyle:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const e=i,{payload:n}=e;if(t){const i=BM(t).filter((t=>"line"===t.type));if(!i.length)return;const r=Object.keys(e.payload);i.forEach((t=>{t.getProduct().encode(r.reduce(((t,i)=>{var r;return t[i]=(r=i,(t,i)=>{var a;return i.data.some((t=>MM(t,e.payload.data)))&&Bb(null==n?void 0:n[r])?n[r]:null===(a=i.graphicItem.attribute)||void 0===a?void 0:a[r]}),t}),{})),t.getProduct()})),t.renderSync()}})),appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){gR(t,0,i),iR(t,0,i),UM(t,e,i)})),symbolStyle:RM("symbol")}),PieChart:Object.assign(Object.assign(Object.assign(Object.assign({},_P),xP),wP),{arcStyle:RM("arc"),appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){SR(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n,r,a,o;const s=t.getGraphicParent(),u=null==s?void 0:s._vchart;(u||t)&&(TR(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:null===(r=null===(n=i.payload)||void 0===n?void 0:n.animation)||void 0===r?void 0:r.duration,easing:null===(o=null===(a=i.payload)||void 0===a?void 0:a.animation)||void 0===o?void 0:o.easing,effect:"fade"}}}),zR(t),GR(t,e,i),s.setAttributes({visible:!1}))}))}),AreaChart:Object.assign(Object.assign(Object.assign(Object.assign({},_P),xP),wP),{appear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){lR(t,0,i),UM(t,e,i)})),disappear:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){var n,r,a,o;const s=t.getGraphicParent(),u=null==s?void 0:s._vchart;(u||t)&&(hR(t,0,i),FR(t,0,{action:"disappear",payload:{animation:{duration:null===(r=null===(n=i.payload)||void 0===n?void 0:n.animation)||void 0===r?void 0:r.duration,easing:null===(o=null===(a=i.payload)||void 0===a?void 0:a.animation)||void 0===o?void 0:o.easing,effect:"fade"}}}),zR(t),GR(t,e,i),s.setAttributes({visible:!1}))})),arcStyle:RM("arc")}),RangeColumnChart:pP,ScatterChart:vP,RoseChart:fP,RadarChart:gP,WordCloudChart:yP,TreeMapChart:kP,SunburstChart:mP},AP={markPoint:{flicker:(t,e,i)=>TB(void 0,void 0,void 0,(function*(){const{elementId:e}=i,n=(a=e,(r=t)?r.getComponents().find((t=>t.userId===a)):null);var r,a,o;if(n&&n._markerComponent){const t=n._markerComponent._item;t&&(o=t)&&0!==o.childrenCount&&o.forEachChildren((t=>{t.animate().to({opacity:0},120,"linear").to({opacity:1},120,"linear").loop(1)}))}}))}},TP={appear:UM,disappear:GR,flicker:(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{animation:n}=null!==(e=i.payload)&&void 0!==e?e:{};DM(t).forEach((t=>{!function(t,e){if(t){const{duration:i,easing:n,frequency:r=2}=e,a=i/r;t.animate().from({opacity:0},a,n).loop(r)}}(t,n)}))})),darken:(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{animation:n}=null!==(e=i.payload)&&void 0!==e?e:{};DM(t).forEach((t=>{!function(t,e){if(t){const{duration:i,easing:n,ratio:r=.8}=e,{fill:a,visible:o,opacity:s}=t.attribute;Ob(a)&&!1!==o&&0!==s&&t.animate().to({fill:HR(a,Math.min(1,r))},i,n)}}(t,n)}))})),brighten:(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{animation:n}=null!==(e=i.payload)&&void 0!==e?e:{};DM(t).forEach((t=>{!function(t,e){if(t){const{duration:i,easing:n,ratio:r=1.2}=e,{fill:a,visible:o,opacity:s}=t.attribute;Ob(a)&&!1!==o&&0!==s&&t.animate().to({fill:HR(a,Math.max(1,r))},i,n)}}(t,n)}))})),moveTo:(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{destination:n}=i,{animation:r}=null!==(e=i.payload)&&void 0!==e?e:{};return function(t,e){if(t){const{duration:i,easing:n,destination:r}=e;r&&t.animate().to(r,i,n)}}(jM(t),Object.assign(Object.assign({},r),{destination:n})),{totalTime:r.duration}})),style:(t,e={},i)=>TB(void 0,void 0,void 0,(function*(){var e;const{animation:n,graphic:r,text:a}=null!==(e=i.payload)&&void 0!==e?e:{},{duration:o,easing:s}=n,u=DM(t)[0],l=DM(t)[1];return u&&r&&u.animate().to(r,o,s),l&&a&&u.animate().to(a,o,s),{totalTime:o}})),bounce:dP},EP={[d_.RECT]:Object.assign({},TP),[d_.QIPAO]:Object.assign({},TP),[d_.TEXT]:Object.assign({},TP),[d_.RICH_TEXT]:Object.assign({},TP),[d_.LINE]:Object.assign({},TP),[d_.IMAGE]:Object.assign({},TP)},CP=Object.assign(Object.assign(Object.assign({},SP),AP),EP);class BP{constructor(){this.rafIdx=0,this._tick=t=>{const e=Date.now();this.cb&&this.cb(0===t?0:e-t),this.rafIdx=requestAnimationFrame((()=>this._tick(e)))}}start(t){this.stop(),this.cb=t,this._tick(0)}stop(){this.rafIdx&&cancelAnimationFrame(this.rafIdx),this.rafIdx=0}}class MP{constructor(t){this._canvas=t,this._acts=[],this._ticker=new BP,this._currTime=0,this._actionProcessor=new EM(CP)}addAct(t,e){const i=[],n=new Set;t.scenes.forEach((t=>{var r;const a={scene:[],delay:null!==(r=t.delay)&&void 0!==r?r:0};t.actions.forEach((({characterActions:t,characterId:i})=>{const r=t.slice();r.sort(((t,e)=>t.startTime-e.startTime)),r.forEach((t=>{const r=e[i];a.scene.push({character:r,action:t}),n.add(r)}))})),i.push(a)})),this._acts.push({id:t.id,scenes:i,characters:Array.from(n.values())})}setCurrentAct(t){jb(t)?this._currAct=this._acts[t]:this._currAct=this._acts.filter((e=>e.id===t))[0]}getCurrentAct(){var t;return null===(t=this._currAct)||void 0===t?void 0:t.id}reset(){this._currAct.characters.forEach((t=>{t.reset()}))}tickTo(t){const e=this._currTime;e>t&&(this.reset(),this._currTime=0,this.tickTo(0));const i=new Set;let n=0;for(let r=0;r<this._currAct.scenes.length;r++){const a=this._currAct.scenes[r];n+=a.delay,n<=t&&a.scene.forEach((({character:r,action:a})=>{const{startTime:o}=a,s=o+n;if(!(s>t)){if(i.add(r),s>e&&s<=t){const{type:t}=r.spec;this._actionProcessor.doAction(t,a.action,[r,{},a])}r.show()}}));let o=0;a.scene.forEach((({action:t})=>{const{startTime:e,duration:i}=t;o=Math.max(e+i,e)})),n+=o}this._currTime=t,this._canvas.getStage().ticker.tickAt(t),this._canvas.getStage().render()}play(){this._currAct&&(this._ticker.stop(),this._currTime=0,this.reset(),this._ticker.start((t=>{this.tickTo(this._currTime+t)})))}encodeToVideo(t,e){return TB(this,void 0,void 0,(function*(){return null}))}pause(){this._ticker.stop()}resume(){this._ticker._tick(this._currTime)}release(){}}lv.remTimeline(qr);class RP{get canvas(){return this._canvas}constructor(t,e){this._characters={},this.id="test-mvp_"+RP._id_++,this._canvas=new TM(this,Ob(e.dom)?document.getElementById(e.dom):e.dom),this._player=new MP(this._canvas),t&&this.load(t)}load(t){t.characters.forEach((t=>{this._createCharacter(t)})),t.acts.forEach((t=>{this._createAct(t)}))}getCharacters(){return this._characters}_createCharacter(t){const e={story:this,canvas:this._canvas,graphicParent:this._canvas.getStage().defaultLayer};return t.id?(this._characters[t.id]||(this._characters[t.id]=p_.createCharacter(t,e)),this._characters[t.id]):null}_createAct(t){this._player.addAct(t,this._characters)}play(t=0){this._player.setCurrentAct(t),this._player.play()}pause(){return this._player.pause(),this._player.getCurrentAct()}encodeToVideo(t,e,i){return TB(this,void 0,void 0,(function*(){return this._player.setCurrentAct(t),this._player.encodeToVideo(e,i)}))}getPlayer(){return this._player}release(){this._player.release(),this._canvas.release()}}RP._id_=0;const PP=new x((t=>{t(CB).toSelf().inSingletonScope(),t(EB).toService(CB),t(_d).toService(EB),t(_M).to(_M).inSingletonScope(),t($p).toService(_M)}));let OP=!1;function IP(){OP||(OP=!0,p_.registerCharacter(XB.type,XB),p_.registerCharacter(KB.type,SB),p_.registerCharacter(SB.type,SB),p_.registerCharacter(ZB.type,ZB),p_.registerCharacter(eM.type,eM),p_.registerCharacter(rM.type,rM),p_.registerCharacter(oM.type,oM),p_.registerCharacter(uM.type,uM),p_.registerCharacter(cM.type,cM),p_.registerCharacter(dM.type,dM),p_.registerCharacter(vM.type,vM),p_.registerCharacter(gM.type,gM),p_.registerCharacter(d_.RECT,v_),p_.registerCharacter(d_.TEXT,mM),p_.registerCharacter(d_.RICH_TEXT,bM),p_.registerCharacter(d_.QIPAO,l_),p_.registerCharacter(d_.LINE,wM),p_.registerCharacter(d_.IMAGE,AM),nr.load(PP))}IP();const LP={pointerup:!0,click:!0,dblclick:!0};var DP;t.EditActionEnum=void 0,(DP=t.EditActionEnum||(t.EditActionEnum={})).singleSelection="singleSelect",DP.multipleSelection="multipleSelect";class jP{get actionInProgress(){return this._actionInProgress}constructor(t){this.story=t,this.emitter=new ct,this._actionInProgress=null}onStoryEvent(e,i){if(e.detailPath&&e.path[e.path.length-1]!==e.detailPath[e.path.length-1]&&delete e.detailPath,!LP[i])return this.dispatchAction({type:i,event:e});const{characterInfo:n,character:r}=this.story.canvas.getEventDetail(e);return this.dispatchAction({type:"click"===i&&r?t.EditActionEnum.singleSelection:i,characterId:null==r?void 0:r.id,character:r,event:e,detail:n})}dispatchAction(t){this.emitter.emit("dispatchAction",t)}}class FP{static registerEditComponent(t,e){FP.componentConstructorMap[t]=e}constructor(t){this.story=t,this._componentMap={},this.emitter=new ct,this.editAction=new jP(t),this.editAction.emitter.on("dispatchAction",this.onAction.bind(this)),this.story.canvas.getStage().addEventListener("*",this.onStoryEvent.bind(this)),this._initEditGroup(),this._initComponent()}_initEditGroup(){this._editGroup=is({});this.story.canvas.getStage().createLayer().add(this._editGroup)}getEditGroup(){return this._editGroup}_initComponent(){this._componentMap={},Object.keys(FP.componentConstructorMap).forEach((t=>{this._componentMap[t]=new FP.componentConstructorMap[t](this)})),this._componentList=Object.values(this._componentMap).sort(((t,e)=>t.level-e.level)).reverse()}onStoryEvent(t,e){this.editAction.onStoryEvent(t,e)}onAction(t){if(!this._currentComponent||!this._currentComponent.checkAction(t))for(let e=0;e<this._componentList.length;e++){const i=this._componentList[e];if(i.checkAction(t))return this.stopEdit(),void(this._currentComponent=i)}}startEdit(t){this.emitter.emit("startEdit",t)}triggerEditWithEvent(t){}triggerEditWithComponent(t,e){}stopEdit(){var t;null===(t=this._currentComponent)||void 0===t||t.editEnd(),this._currentComponent=null}release(){var t,e;null===(e=null===(t=this.story.canvas)||void 0===t?void 0:t.getStage)||void 0===e||e.call(t).removeEventListener("*",this.onStoryEvent)}}FP.componentConstructorMap={},IP(),t.Edit=FP,t.Story=RP,t.registerCharacter=IP}));