@orangelogic/design-system 2.69.0 → 2.70.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 (220) hide show
  1. package/library/chunks/AxisLabelRadial.BTpA5dYy.js +11 -0
  2. package/library/chunks/BaseColumnSeries.hIO71GLG.js +304 -0
  3. package/library/chunks/CandlestickSeries.w9C0GR9v.js +362 -0
  4. package/library/chunks/Circle.tOnnO-F-.js +17 -0
  5. package/library/chunks/ColumnSeries.Ckz75x1M.js +54 -0
  6. package/library/chunks/EditableAxisLabel.CCMTJT7K.js +445 -0
  7. package/library/chunks/EditableLabel.DPmicdjK.js +119 -0
  8. package/library/chunks/Gradient.BrDBLm8v.js +40 -0
  9. package/library/chunks/LinearGradient.CxfXxvMw.js +37 -0
  10. package/library/chunks/MonotoneXTension.CJMEHHj3.js +139 -0
  11. package/library/chunks/Picture.BNASYM-P.js +49 -0
  12. package/library/chunks/Polygon.Dr-GV2hn.js +70 -0
  13. package/library/chunks/ProgressPie.4mPA6xqm.js +234 -0
  14. package/library/chunks/RadialLabel.HfsGiN4x.js +88 -0
  15. package/library/chunks/Scrollbar.Bgg-RhjP.js +118 -0
  16. package/library/chunks/Slice.Dm56LTKj.js +120 -0
  17. package/library/chunks/Slider.FKJwoPq2.js +19 -0
  18. package/library/chunks/SpriteResizer.-qJDgug8.js +446 -0
  19. package/library/chunks/Triangle.BECgi7mc.js +21 -0
  20. package/library/chunks/ZoomTools.cgwuIB0e.js +199 -0
  21. package/library/chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js +8 -0
  22. package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
  23. package/library/chunks/{_commonjsHelpers.ByX85dGu.js → _commonjsHelpers.DQNKXVTB.js} +2 -2
  24. package/library/chunks/accessors.BHk36ecy.js +11 -0
  25. package/library/chunks/am-chart.oZVBmpnn.js +18435 -0
  26. package/library/chunks/{animation.DfUHRQry.js → animation.DU8t6mrk.js} +1 -1
  27. package/library/chunks/{button.SoX-7UYy.js → button.CAAJPQFu.js} +3 -3
  28. package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
  29. package/library/chunks/cardinal.BCA_LB0u.js +64 -0
  30. package/library/chunks/{color-swatch-group.Dx1fbSJx.js → color-swatch-group.CKHyWM8K.js} +6 -6
  31. package/library/chunks/{color-swatch.B7XXHxx1.js → color-swatch.BkpPCXd6.js} +2 -2
  32. package/library/chunks/colorPicker.C4w_vDjh.js +527 -0
  33. package/library/chunks/{confirm-popover.327ATuQH.js → confirm-popover.ZD74yDWw.js} +3 -3
  34. package/library/chunks/{content-builder.Bxi6k2LA.js → content-builder.B4Tqoc6M.js} +40 -34
  35. package/library/chunks/{cropper.BraEEykE.js → cropper.CQB3_qqG.js} +6937 -6935
  36. package/library/chunks/{dialog.eN3RUbwx.js → dialog.qSV5AjOE.js} +2 -2
  37. package/library/chunks/{dom.CZrJ64Dm.js → dom.BQVKDNd8.js} +1 -1
  38. package/library/chunks/{dot-pagination.Bek4w4zz.js → dot-pagination.BN_0ljfc.js} +2 -2
  39. package/library/chunks/exporting.BdjsEGF8.js +1407 -0
  40. package/library/chunks/{file-on-demand.BiC4cymk.js → file-on-demand.CXE4zf0J.js} +448 -386
  41. package/library/chunks/flow.D0FqdfOy.js +1594 -0
  42. package/library/chunks/{folder-select.DVEFgexx.js → folder-select.CPALQK22.js} +4 -4
  43. package/library/chunks/{form.CO12-VK0.js → form.DgwYWi0O.js} +1 -1
  44. package/library/chunks/gantt.DfUM7Gvb.js +2459 -0
  45. package/library/chunks/{header.Da5yvwdy.js → header.DXZ_5gLY.js} +2 -2
  46. package/library/chunks/hierarchy.5kfBCoGt.js +3561 -0
  47. package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
  48. package/library/chunks/{i18n.BMRLOAZR.js → i18n.C0iakJkV.js} +19 -11
  49. package/library/chunks/{iframe.BJizUE1A.js → iframe.BlzVfeBc.js} +2 -2
  50. package/library/chunks/{image.bndP5q2c.js → image.B3WjaCXP.js} +2 -2
  51. package/library/chunks/index.BkoLctE9.js +533 -0
  52. package/library/chunks/index.CZJTjkLp.js +142 -0
  53. package/library/chunks/{index.Bhnf0N8Q.js → index.CmVKj_wl.js} +7 -7
  54. package/library/chunks/index.DU0XUO4k.js +176 -0
  55. package/library/chunks/index.DcjJFMlq.js +1520 -0
  56. package/library/chunks/isObjectLike.z36Fu426.js +34 -0
  57. package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
  58. package/library/chunks/json.BjaT7cyo.js +119 -0
  59. package/library/chunks/{list-editor.Du1h2Ms0.js → list-editor.CIAAFPco.js} +251 -222
  60. package/library/chunks/map.DbgNAGxD.js +3037 -0
  61. package/library/chunks/markerjs2.esm.B_9kjmye.js +1912 -0
  62. package/library/chunks/{option.Ce_wlnZj.js → option.ByVbmxUQ.js} +2 -2
  63. package/library/chunks/{pagination.DXu-mFAk.js → pagination.DPQn2fKX.js} +4 -4
  64. package/library/chunks/pdfmake.Bs7cMDH0.js +41224 -0
  65. package/library/chunks/percent.DO4FjAdu.js +902 -0
  66. package/library/chunks/{purify.es.BGaRrCfO.js → purify.es.BIuh5IAZ.js} +115 -115
  67. package/library/chunks/radar.Dd5fJVMg.js +789 -0
  68. package/library/chunks/{responsive.DgQTIrna.js → responsive.DL-wBD4P.js} +1 -1
  69. package/library/chunks/sliceGrouper.DA3aeuJ-.js +93 -0
  70. package/library/chunks/stock.BfI5MUyK.js +12684 -0
  71. package/library/chunks/{string.Cp_XNbnV.js → string.B_rEG27K.js} +1 -1
  72. package/library/chunks/{tab-group.B2pW__9H.js → tab-group.1h51o_Ly.js} +4 -4
  73. package/library/chunks/{table.5eWm9FfN.js → table.wVHv1Xze.js} +348 -327
  74. package/library/chunks/timeline.BxMLjB5J.js +837 -0
  75. package/library/chunks/timer.B39XOBYL.js +123 -0
  76. package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
  77. package/library/chunks/transform.BuqENXeT.js +50 -0
  78. package/library/chunks/{tree.Zls5YZ8z.js → tree.Bx0IGsWm.js} +2 -2
  79. package/library/chunks/venn.CxFupTb9.js +966 -0
  80. package/library/chunks/vfs_fonts.VJpdcrR6.js +9 -0
  81. package/library/chunks/watch.BCJD77bD.js +547 -0
  82. package/library/chunks/wc.ThQubbN2.js +255 -0
  83. package/library/chunks/xlsx.v-qkA-dg.js +25118 -0
  84. package/library/chunks/xy.q6e68du3.js +333 -0
  85. package/library/components/alert.js +2 -2
  86. package/library/components/am-chart.d.ts +3 -0
  87. package/library/components/am-chart.js +11 -0
  88. package/library/components/animated-image.js +1 -1
  89. package/library/components/animation.js +2 -2
  90. package/library/components/array-line-clamp.js +1 -1
  91. package/library/components/asset-link-format.js +7 -7
  92. package/library/components/atoms.js +166 -162
  93. package/library/components/avatar.js +1 -1
  94. package/library/components/border-input-group.js +1 -1
  95. package/library/components/breadcrumb-item.js +1 -1
  96. package/library/components/breadcrumb.js +1 -1
  97. package/library/components/button.js +4 -4
  98. package/library/components/checkbox.js +2 -2
  99. package/library/components/color-picker.js +4 -4
  100. package/library/components/color-swatch-group.js +7 -7
  101. package/library/components/color-swatch.js +3 -3
  102. package/library/components/confirm-popover.js +4 -4
  103. package/library/components/copy-button.js +2 -2
  104. package/library/components/corner-position-input-group.js +2 -2
  105. package/library/components/cropper.js +1 -1
  106. package/library/components/details.js +3 -2
  107. package/library/components/dialog.js +3 -3
  108. package/library/components/divider.js +1 -1
  109. package/library/components/dot-pagination.js +3 -3
  110. package/library/components/drawer.js +3 -3
  111. package/library/components/dropdown.js +2 -2
  112. package/library/components/dynamic-select.js +32 -30
  113. package/library/components/e-chart.d.ts +3 -0
  114. package/library/components/e-chart.js +47908 -0
  115. package/library/components/element-clamp.js +3 -3
  116. package/library/components/file-on-demand.js +10 -10
  117. package/library/components/folder-select.js +4 -4
  118. package/library/components/format-bytes.js +1 -1
  119. package/library/components/format-date.js +1 -1
  120. package/library/components/format-number.js +1 -1
  121. package/library/components/format-time.js +2 -2
  122. package/library/components/grid-item.js +1 -1
  123. package/library/components/header.js +3 -3
  124. package/library/components/hub-connection.js +2 -2
  125. package/library/components/icon-button.js +1 -1
  126. package/library/components/icon.js +1 -1
  127. package/library/components/iframe.js +3 -3
  128. package/library/components/image-comparer.js +2 -2
  129. package/library/components/image.js +3 -3
  130. package/library/components/include.js +1 -1
  131. package/library/components/input.js +3 -3
  132. package/library/components/line-clamp.js +1 -1
  133. package/library/components/list-editor.js +11 -8
  134. package/library/components/markdown.js +2 -2
  135. package/library/components/masonry.js +2 -2
  136. package/library/components/menu-item.js +2 -2
  137. package/library/components/menu.js +1 -1
  138. package/library/components/molecules.js +5 -5
  139. package/library/components/mutation-observer.js +1 -1
  140. package/library/components/option.js +3 -3
  141. package/library/components/organisms.js +2 -2
  142. package/library/components/pagination.js +5 -5
  143. package/library/components/popup.js +1 -1
  144. package/library/components/position-picker.js +1 -1
  145. package/library/components/progress-bar.js +1 -1
  146. package/library/components/progress-ring.js +1 -1
  147. package/library/components/qr-code.js +1 -1
  148. package/library/components/radio-button.js +1 -1
  149. package/library/components/radio-card.js +1 -1
  150. package/library/components/radio-group.js +2 -2
  151. package/library/components/radio.js +1 -1
  152. package/library/components/range.js +3 -3
  153. package/library/components/rating.js +2 -2
  154. package/library/components/relative-time.js +1 -1
  155. package/library/components/resize-observer.js +1 -1
  156. package/library/components/select.js +4 -4
  157. package/library/components/share-option-list.js +3 -3
  158. package/library/components/sidebar.js +1 -1
  159. package/library/components/size-input-group.js +2 -2
  160. package/library/components/spinner.js +1 -1
  161. package/library/components/split-panel.js +2 -2
  162. package/library/components/stepper.js +1 -1
  163. package/library/components/switch.js +2 -2
  164. package/library/components/tab-group.js +5 -5
  165. package/library/components/tab-panel.js +1 -1
  166. package/library/components/tab.js +2 -2
  167. package/library/components/table.js +5 -5
  168. package/library/components/tag.js +1 -1
  169. package/library/components/textarea.js +2 -2
  170. package/library/components/timecode.js +2 -2
  171. package/library/components/tooltip.js +2 -2
  172. package/library/components/tree-item.js +3 -3
  173. package/library/components/tree.js +3 -3
  174. package/library/components/typeface.js +2 -2
  175. package/library/components/types.js +27684 -27970
  176. package/library/components/video.js +1107 -1110
  177. package/library/package.json +1 -1
  178. package/library/packages/atoms/src/components/am-chart/am-chart.d.ts +45 -0
  179. package/library/packages/atoms/src/components/am-chart/am-chart.styles.d.ts +2 -0
  180. package/library/packages/atoms/src/components/am-chart/am-chart.utils.d.ts +23 -0
  181. package/library/packages/atoms/src/components/e-chart/e-chart-controller.d.ts +30 -0
  182. package/library/packages/atoms/src/components/e-chart/e-chart.d.ts +38 -0
  183. package/library/packages/atoms/src/components/e-chart/e-chart.styles.d.ts +2 -0
  184. package/library/packages/atoms/src/components/table/table.d.ts +21 -0
  185. package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
  186. package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
  187. package/library/packages/atoms/src/index.d.ts +2 -0
  188. package/library/packages/events/src/cx-chart-plan-change.d.ts +10 -0
  189. package/library/packages/events/src/cx-dashboard-filter-change.d.ts +6 -0
  190. package/library/packages/events/src/cx-dashboard-table-load-more.d.ts +9 -0
  191. package/library/packages/events/src/cx-e-chart-drill-down.d.ts +16 -0
  192. package/library/packages/events/src/events.d.ts +4 -0
  193. package/library/packages/molecules/src/index.d.ts +1 -0
  194. package/library/packages/molecules/src/list-editor/list-editor.d.ts +7 -0
  195. package/library/packages/molecules/src/stat-card/stat-card.d.ts +81 -0
  196. package/library/packages/molecules/src/stat-card/stat-card.styles.d.ts +2 -0
  197. package/library/packages/molecules/src/storybook/storybook.d.ts +1 -0
  198. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +1 -1
  199. package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.d.ts +88 -0
  200. package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.styles.d.ts +2 -0
  201. package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-schema.d.ts +100 -0
  202. package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -2
  203. package/library/packages/organisms/src/dashboard-filter/dashboard-filter.d.ts +83 -0
  204. package/library/packages/organisms/src/dashboard-filter/dashboard-filter.styles.d.ts +2 -0
  205. package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +45 -0
  206. package/library/packages/organisms/src/dashboard-table/dashboard-table.styles.d.ts +2 -0
  207. package/library/packages/organisms/src/index.d.ts +3 -0
  208. package/library/packages/services/src/api/endpoints.d.ts +3 -0
  209. package/library/packages/types/src/am-chart.d.ts +22 -0
  210. package/library/packages/types/src/content-builder.d.ts +1 -0
  211. package/library/packages/types/src/stat-card.d.ts +19 -0
  212. package/library/packages/types/src/table.d.ts +4 -0
  213. package/library/packages/utils/src/custom-element/i18n.d.ts +8 -0
  214. package/library/react-web-component.d.ts +280 -4
  215. package/library/utils.js +8 -8
  216. package/package.json +1 -1
  217. package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
  218. package/library/chunks/identity.ByMq8VxU.js +0 -6
  219. package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
  220. package/library/chunks/watch.q1sEjPWL.js +0 -501
@@ -0,0 +1,902 @@
1
+ import { D as gt, x as P, al as dt, H as et, q as b, am as pt, aF as ot, J as ht, C as tt, e as v, _ as V, a as G, v as _t, b1 as rt, P as ft, b2 as mt, r as A, L as R, T as M, m as W, aG as ct, p as yt, j as w, h as T, G as $, aj as J, b3 as k, b as bt } from "./am-chart.oZVBmpnn.js";
2
+ import { S as xt } from "./Slice.Dm56LTKj.js";
3
+ import { R as kt } from "./RadialLabel.HfsGiN4x.js";
4
+ class vt extends gt {
5
+ setupDefaultRules() {
6
+ super.setupDefaultRules();
7
+ const e = this._root.interfaceColors, t = this.rule.bind(this);
8
+ t("PercentSeries").setAll({
9
+ legendLabelText: "{category}",
10
+ legendValueText: "{valuePercentTotal.formatNumber('0.00p')}",
11
+ colors: dt.new(this._root, {}),
12
+ width: P,
13
+ height: P
14
+ }), t("PieChart").setAll({
15
+ radius: et(80),
16
+ startAngle: -90,
17
+ endAngle: 270
18
+ }), t("PieSeries").setAll({
19
+ alignLabels: !0,
20
+ startAngle: -90,
21
+ endAngle: 270
22
+ }), t("PieSeries").states.create("hidden", { endAngle: -90, opacity: 0 }), t("Slice", ["pie"]).setAll({
23
+ position: "absolute",
24
+ isMeasured: !1,
25
+ x: 0,
26
+ y: 0,
27
+ toggleKey: "active",
28
+ tooltipText: "{category}: {valuePercentTotal.formatNumber('0.00p')}",
29
+ strokeWidth: 1,
30
+ strokeOpacity: 1,
31
+ role: "figure",
32
+ lineJoin: "round"
33
+ }), t("Slice", ["pie"]).states.create("active", { shiftRadius: 20, scale: 1 }), t("Slice", ["pie"]).states.create("hoverActive", { scale: 1.04 }), t("Slice", ["pie"]).states.create("hover", { scale: 1.04 }), t("RadialLabel", ["pie"]).setAll({
34
+ textType: "aligned",
35
+ radius: 10,
36
+ text: "{category}: {valuePercentTotal.formatNumber('0.00p')}",
37
+ paddingTop: 5,
38
+ paddingBottom: 5,
39
+ populateText: !0
40
+ }), t("Tick", ["pie"]).setAll({
41
+ location: 1
42
+ }), t("SlicedChart").setAll({
43
+ paddingLeft: 10,
44
+ paddingRight: 10,
45
+ paddingTop: 10,
46
+ paddingBottom: 10
47
+ }), t("FunnelSeries").setAll({
48
+ startLocation: 0,
49
+ endLocation: 1,
50
+ orientation: "vertical",
51
+ alignLabels: !0,
52
+ sequencedInterpolation: !0
53
+ }), t("FunnelSlice").setAll({
54
+ interactive: !0,
55
+ expandDistance: 0
56
+ //tooltipText: "{category}: {valuePercentTotal.formatNumber('0.00p')}"
57
+ }), t("FunnelSlice").states.create("hover", { expandDistance: 0.15 }), t("Label", ["funnel"]).setAll({
58
+ populateText: !0,
59
+ text: "{category}: {valuePercentTotal.formatNumber('0.00p')}",
60
+ centerY: b
61
+ }), t("Label", ["funnel", "horizontal"]).setAll({
62
+ centerX: 0,
63
+ centerY: b,
64
+ rotation: -90
65
+ }), t("Label", ["funnel", "vertical"]).setAll({
66
+ centerY: b,
67
+ centerX: 0
68
+ }), t("Tick", ["funnel"]).setAll({
69
+ location: 1
70
+ }), t("FunnelSlice", ["funnel", "link"]).setAll({
71
+ fillOpacity: 0.5,
72
+ strokeOpacity: 0,
73
+ expandDistance: -0.1
74
+ }), t("FunnelSlice", ["funnel", "link", "vertical"]).setAll({
75
+ height: 10
76
+ }), t("FunnelSlice", ["funnel", "link", "horizontal"]).setAll({
77
+ width: 10
78
+ }), t("PyramidSeries").setAll({
79
+ valueIs: "area"
80
+ }), t("FunnelSlice", ["pyramid", "link"]).setAll({
81
+ fillOpacity: 0.5
82
+ }), t("FunnelSlice", ["pyramid", "link", "vertical"]).setAll({
83
+ height: 0
84
+ }), t("FunnelSlice", ["pyramid", "link", "horizontal"]).setAll({
85
+ width: 0
86
+ }), t("FunnelSlice", ["pyramid"]).setAll({
87
+ interactive: !0,
88
+ expandDistance: 0
89
+ }), t("FunnelSlice", ["pyramid"]).states.create("hover", { expandDistance: 0.15 }), t("Label", ["pyramid"]).setAll({
90
+ populateText: !0,
91
+ text: "{category}: {valuePercentTotal.formatNumber('0.00p')}",
92
+ centerY: b
93
+ }), t("Label", ["pyramid", "horizontal"]).setAll({
94
+ centerX: 0,
95
+ centerY: b,
96
+ rotation: -90
97
+ }), t("Label", ["pyramid", "vertical"]).setAll({
98
+ centerY: b,
99
+ centerX: 0
100
+ }), t("Tick", ["pyramid"]).setAll({
101
+ location: 1
102
+ }), t("FunnelSlice", ["pictorial"]).setAll({
103
+ interactive: !0,
104
+ tooltipText: "{category}: {valuePercentTotal.formatNumber('0.00p')}"
105
+ }), t("Label", ["pictorial"]).setAll({
106
+ populateText: !0,
107
+ text: "{category}: {valuePercentTotal.formatNumber('0.00p')}",
108
+ centerY: b
109
+ }), t("Label", ["pictorial", "horizontal"]).setAll({
110
+ centerX: 0,
111
+ centerY: b,
112
+ rotation: -90
113
+ }), t("Label", ["pictorial", "vertical"]).setAll({
114
+ centerY: b,
115
+ centerX: 0
116
+ }), t("FunnelSlice", ["pictorial", "link"]).setAll({
117
+ fillOpacity: 0.5,
118
+ width: 0,
119
+ height: 0
120
+ }), t("Tick", ["pictorial"]).setAll({
121
+ location: 0.5
122
+ });
123
+ {
124
+ const s = t("Graphics", ["pictorial", "background"]);
125
+ s.setAll({
126
+ fillOpacity: 0.2
127
+ }), pt(s, "fill", e, "alternativeBackground");
128
+ }
129
+ }
130
+ }
131
+ class H extends ot {
132
+ _afterNew() {
133
+ this._defaultThemes.push(vt.new(this._root)), super._afterNew(), this.chartContainer.children.push(this.seriesContainer), this.seriesContainer.children.push(this.bulletsContainer);
134
+ }
135
+ _processSeries(e) {
136
+ super._processSeries(e), this.seriesContainer.children.moveValue(this.bulletsContainer, this.seriesContainer.children.length - 1);
137
+ }
138
+ }
139
+ H.className = "PercentChart";
140
+ H.classNames = ot.classNames.concat([H.className]);
141
+ class X extends ht {
142
+ constructor() {
143
+ super(...arguments), this.slicesContainer = this.children.push(tt.new(this._root, { position: "absolute", isMeasured: !1 })), this.labelsContainer = this.children.push(tt.new(this._root, { position: "absolute", isMeasured: !1 })), this.ticksContainer = this.children.push(tt.new(this._root, { position: "absolute", isMeasured: !1 })), this._lLabels = [], this._rLabels = [], this._hLabels = [], this.slices = this.addDisposer(this._makeSlices()), this.labels = this.addDisposer(this._makeLabels()), this.ticks = this.addDisposer(this._makeTicks());
144
+ }
145
+ _applyThemes(e = !1) {
146
+ const t = this.get("colors");
147
+ return t && t.reset(), super._applyThemes(e);
148
+ }
149
+ /**
150
+ * @ignore
151
+ */
152
+ makeSlice(e) {
153
+ const t = this.slicesContainer.children.push(this.slices.make());
154
+ return t.on("fill", () => {
155
+ this.updateLegendMarker(e);
156
+ }), t.on("fillPattern", () => {
157
+ this.updateLegendMarker(e);
158
+ }), t.on("stroke", () => {
159
+ this.updateLegendMarker(e);
160
+ }), t._setDataItem(e), e.set("slice", t), this.slices.push(t), t;
161
+ }
162
+ /**
163
+ * @ignore
164
+ */
165
+ makeLabel(e) {
166
+ const t = this.labelsContainer.children.push(this.labels.make());
167
+ return t._setDataItem(e), e.set("label", t), this.labels.push(t), t;
168
+ }
169
+ _shouldMakeBullet(e) {
170
+ return e.get("value") != null;
171
+ }
172
+ /**
173
+ * @ignore
174
+ */
175
+ makeTick(e) {
176
+ const t = this.ticksContainer.children.push(this.ticks.make());
177
+ return t._setDataItem(e), e.set("tick", t), this.ticks.push(t), t;
178
+ }
179
+ _afterNew() {
180
+ this.fields.push("category", "fill"), super._afterNew();
181
+ }
182
+ _onDataClear() {
183
+ const e = this.get("colors");
184
+ e && e.reset();
185
+ const t = this.get("patterns");
186
+ t && t.reset();
187
+ }
188
+ _prepareChildren() {
189
+ if (super._prepareChildren(), this._lLabels = [], this._rLabels = [], this._hLabels = [], this._valuesDirty) {
190
+ let e = 0, t = 0, s = 0, i = 1 / 0, l = 0;
191
+ v(this._dataItems, (a) => {
192
+ let n = a.get("valueWorking", 0);
193
+ e += n, t += Math.abs(n);
194
+ }), v(this._dataItems, (a) => {
195
+ let n = a.get("valueWorking", 0);
196
+ n > s && (s = n), n < i && (i = n), l++;
197
+ let r = n / t;
198
+ t == 0 && (r = 0), a.setRaw("valuePercentTotal", r * 100);
199
+ }), this.setPrivateRaw("valueLow", i), this.setPrivateRaw("valueHigh", s), this.setPrivateRaw("valueSum", e), this.setPrivateRaw("valueAverage", e / l), this.setPrivateRaw("valueAbsoluteSum", t);
200
+ }
201
+ }
202
+ /**
203
+ * Shows hidden series.
204
+ *
205
+ * @param duration Animation duration in milliseconds
206
+ * @return Animation promise
207
+ */
208
+ show(e) {
209
+ const t = Object.create(null, {
210
+ show: { get: () => super.show }
211
+ });
212
+ return V(this, void 0, void 0, function* () {
213
+ let s = [];
214
+ s.push(t.show.call(this, e)), s.push(this._sequencedShowHide(!0, e)), yield Promise.all(s);
215
+ });
216
+ }
217
+ /**
218
+ * Hide whole series.
219
+ *
220
+ * @param duration Animation duration in milliseconds
221
+ * @return Animation promise
222
+ */
223
+ hide(e) {
224
+ const t = Object.create(null, {
225
+ hide: { get: () => super.hide }
226
+ });
227
+ return V(this, void 0, void 0, function* () {
228
+ let s = [];
229
+ s.push(t.hide.call(this, e)), s.push(this._sequencedShowHide(!1, e)), yield Promise.all(s);
230
+ });
231
+ }
232
+ /**
233
+ * @ignore
234
+ */
235
+ _updateChildren() {
236
+ super._updateChildren(), this._valuesDirty && v(this._dataItems, (e) => {
237
+ e.get("label").text.markDirtyText();
238
+ }), (this.isDirty("legendLabelText") || this.isDirty("legendValueText")) && v(this._dataItems, (e) => {
239
+ this.updateLegendValue(e);
240
+ }), this._arrange();
241
+ }
242
+ _arrange() {
243
+ this._arrangeDown(this._lLabels), this._arrangeUp(this._lLabels), this._arrangeDown(this._rLabels), this._arrangeUp(this._rLabels), this._arrangeLeft(this._hLabels), this._arrangeRight(this._hLabels), v(this.dataItems, (e) => {
244
+ this._updateTick(e);
245
+ });
246
+ }
247
+ _afterChanged() {
248
+ super._afterChanged(), this._arrange();
249
+ }
250
+ processDataItem(e) {
251
+ if (super.processDataItem(e), e.get("fill") == null) {
252
+ let t = this.get("colors");
253
+ t && e.setRaw("fill", t.next());
254
+ }
255
+ if (e.get("fillPattern") == null) {
256
+ let t = this.get("patterns");
257
+ t && e.setRaw("fillPattern", t.next());
258
+ }
259
+ }
260
+ /**
261
+ * Shows series's data item.
262
+ *
263
+ * @param dataItem Data item
264
+ * @param duration Animation duration in milliseconds
265
+ * @return Promise
266
+ */
267
+ showDataItem(e, t) {
268
+ const s = Object.create(null, {
269
+ showDataItem: { get: () => super.showDataItem }
270
+ });
271
+ return V(this, void 0, void 0, function* () {
272
+ const i = [s.showDataItem.call(this, e, t)];
273
+ G(t) || (t = this.get("stateAnimationDuration", 0));
274
+ const l = this.get("stateAnimationEasing");
275
+ let a = e.get("value");
276
+ const n = e.animate({ key: "valueWorking", to: a, duration: t, easing: l });
277
+ n && i.push(n.waitForStop());
278
+ const r = e.get("tick");
279
+ r && i.push(r.show(t));
280
+ const c = e.get("label");
281
+ c && i.push(c.show(t));
282
+ const o = e.get("slice");
283
+ o && i.push(o.show(t)), o.get("active") && o.states.applyAnimate("active"), yield Promise.all(i);
284
+ });
285
+ }
286
+ /**
287
+ * Hides series's data item.
288
+ *
289
+ * @param dataItem Data item
290
+ * @param duration Animation duration in milliseconds
291
+ * @return Promise
292
+ */
293
+ hideDataItem(e, t) {
294
+ const s = Object.create(null, {
295
+ hideDataItem: { get: () => super.hideDataItem }
296
+ });
297
+ return V(this, void 0, void 0, function* () {
298
+ const i = [s.hideDataItem.call(this, e, t)], l = this.states.create("hidden", {});
299
+ G(t) || (t = l.get("stateAnimationDuration", this.get("stateAnimationDuration", 0)));
300
+ const a = l.get("stateAnimationEasing", this.get("stateAnimationEasing")), n = e.animate({ key: "valueWorking", to: 0, duration: t, easing: a });
301
+ n && i.push(n.waitForStop());
302
+ const r = e.get("tick");
303
+ r && i.push(r.hide(t));
304
+ const c = e.get("label");
305
+ c && i.push(c.hide(t));
306
+ const o = e.get("slice");
307
+ o.hideTooltip(), o && i.push(o.hide(t)), yield Promise.all(i);
308
+ });
309
+ }
310
+ /**
311
+ * @ignore
312
+ */
313
+ disposeDataItem(e) {
314
+ super.disposeDataItem(e);
315
+ let t = e.get("label");
316
+ t && (this.labels.removeValue(t), t.dispose());
317
+ let s = e.get("tick");
318
+ s && (this.ticks.removeValue(s), s.dispose());
319
+ let i = e.get("slice");
320
+ i && (this.slices.removeValue(i), i.dispose());
321
+ }
322
+ /**
323
+ * Triggers hover on a series data item.
324
+ *
325
+ * @since 5.0.7
326
+ * @param dataItem Target data item
327
+ */
328
+ hoverDataItem(e) {
329
+ const t = e.get("slice");
330
+ t && !t.isHidden() && t.hover();
331
+ }
332
+ /**
333
+ * Triggers un-hover on a series data item.
334
+ *
335
+ * @since 5.0.7
336
+ * @param dataItem Target data item
337
+ */
338
+ unhoverDataItem(e) {
339
+ const t = e.get("slice");
340
+ t && t.unhover();
341
+ }
342
+ /**
343
+ * @ignore
344
+ */
345
+ updateLegendMarker(e) {
346
+ if (e) {
347
+ const t = e.get("slice");
348
+ if (t) {
349
+ const s = e.get("legendDataItem");
350
+ if (s) {
351
+ const i = s.get("markerRectangle");
352
+ v(_t, (l) => {
353
+ t.get(l) != null && i.set(l, t.get(l));
354
+ });
355
+ }
356
+ }
357
+ }
358
+ }
359
+ _arrangeDown(e) {
360
+ if (e) {
361
+ let t = this._getNextDown();
362
+ e.sort((s, i) => s.y > i.y ? 1 : s.y < i.y ? -1 : 0), v(e, (s) => {
363
+ const i = s.label.adjustedLocalBounds();
364
+ let l = i.top;
365
+ s.y + l < t && (s.y = t - l), s.label.set("y", s.y), t = s.y + i.bottom;
366
+ });
367
+ }
368
+ }
369
+ _getNextUp() {
370
+ return this.labelsContainer.maxHeight();
371
+ }
372
+ _getNextDown() {
373
+ return 0;
374
+ }
375
+ _arrangeUp(e) {
376
+ if (e) {
377
+ let t = this._getNextUp();
378
+ e.sort((s, i) => s.y < i.y ? 1 : s.y > i.y ? -1 : 0), v(e, (s) => {
379
+ const i = s.label.adjustedLocalBounds();
380
+ let l = i.bottom;
381
+ s.y + l > t && (s.y = t - l), s.label.set("y", s.y), t = s.y + i.top;
382
+ });
383
+ }
384
+ }
385
+ _arrangeRight(e) {
386
+ if (e) {
387
+ let t = 0;
388
+ e.sort((s, i) => s.y > i.y ? 1 : s.y < i.y ? -1 : 0), v(e, (s) => {
389
+ const i = s.label.adjustedLocalBounds();
390
+ let l = i.left;
391
+ s.y + l < t && (s.y = t - l), s.label.set("x", s.y), t = s.y + i.right;
392
+ });
393
+ }
394
+ }
395
+ _arrangeLeft(e) {
396
+ if (e) {
397
+ let t = this.labelsContainer.maxWidth();
398
+ e.sort((s, i) => s.y < i.y ? 1 : s.y > i.y ? -1 : 0), v(e, (s) => {
399
+ const i = s.label.adjustedLocalBounds();
400
+ let l = i.right;
401
+ s.y + l > t && (s.y = t - l), s.label.set("x", s.y), t = s.y + i.left;
402
+ });
403
+ }
404
+ }
405
+ _updateSize() {
406
+ super._updateSize(), this.markDirty();
407
+ }
408
+ _updateTick(e) {
409
+ }
410
+ _dispose() {
411
+ super._dispose();
412
+ const e = this.chart;
413
+ e && e.series.removeValue(this);
414
+ }
415
+ }
416
+ X.className = "PercentSeries";
417
+ X.classNames = ht.classNames.concat([X.className]);
418
+ class st extends H {
419
+ constructor() {
420
+ super(...arguments), this._maxRadius = 1;
421
+ }
422
+ _afterNew() {
423
+ super._afterNew(), this.seriesContainer.setAll({ x: b, y: b });
424
+ }
425
+ _prepareChildren() {
426
+ super._prepareChildren();
427
+ const e = this.chartContainer, t = e.innerWidth(), s = e.innerHeight(), i = this.get("startAngle", 0), l = this.get("endAngle", 0), a = this.get("innerRadius");
428
+ let n = rt(0, 0, i, l, 1);
429
+ const r = t / (n.right - n.left), c = s / (n.bottom - n.top);
430
+ let o = { left: 0, right: 0, top: 0, bottom: 0 };
431
+ if (a instanceof ft) {
432
+ let g = a.value, d = Math.min(r, c);
433
+ g = Math.max(d * g, d - Math.min(s, t)) / d, o = rt(0, 0, i, l, g), this.setPrivateRaw("irModifyer", g / a.value);
434
+ }
435
+ n = mt([n, o]);
436
+ const p = this._maxRadius;
437
+ this._maxRadius = Math.min(r, c);
438
+ const h = A(this.get("radius", 0), this._maxRadius);
439
+ this.seriesContainer.setAll({
440
+ dy: -h * (n.bottom + n.top) / 2,
441
+ dx: -h * (n.right + n.left) / 2
442
+ }), (this.isDirty("startAngle") || this.isDirty("endAngle") || p != this._maxRadius) && this.series.each((g) => {
443
+ g._markDirtyKey("startAngle");
444
+ }), (this.isDirty("innerRadius") || this.isDirty("radius")) && this.series.each((g) => {
445
+ g._markDirtyKey("innerRadius");
446
+ });
447
+ }
448
+ /**
449
+ * Returns outer radius in pixels.
450
+ *
451
+ * If optional series parameter is passed in, it will return outer radius
452
+ * of that particular series.
453
+ *
454
+ * @param series Series
455
+ * @return Radius in pixels
456
+ */
457
+ radius(e) {
458
+ let t = A(this.get("radius", 0), this._maxRadius), s = A(this.get("innerRadius", 0), t);
459
+ if (e) {
460
+ let i = this.series.indexOf(e), l = this.series.length, a = e.get("radius");
461
+ return a != null ? s + A(a, t - s) : s + (t - s) / l * (i + 1);
462
+ }
463
+ return t;
464
+ }
465
+ /**
466
+ * Returns inner radius in pixels.
467
+ *
468
+ * If optional series parameter is passed in, it will return inner radius
469
+ * of that particular series.
470
+ *
471
+ * @param series Series
472
+ * @return Radius in pixels
473
+ */
474
+ innerRadius(e) {
475
+ const t = this.radius();
476
+ let s = A(this.get("innerRadius", 0), t);
477
+ if (s < 0 && (s = t + s), e) {
478
+ let i = this.series.indexOf(e), l = this.series.length, a = e.get("innerRadius");
479
+ return a != null ? s + A(a, t - s) : s + (t - s) / l * i;
480
+ }
481
+ return s;
482
+ }
483
+ _updateSize() {
484
+ super._updateSize(), this.markDirtyKey("radius");
485
+ }
486
+ }
487
+ st.className = "PieChart";
488
+ st.classNames = H.classNames.concat([st.className]);
489
+ class it extends X {
490
+ _makeSlices() {
491
+ return new R(M.new({}), () => xt._new(this._root, {
492
+ themeTags: W(this.slices.template.get("themeTags", []), ["pie", "series"])
493
+ }, [this.slices.template]));
494
+ }
495
+ _makeLabels() {
496
+ return new R(M.new({}), () => kt._new(this._root, {
497
+ themeTags: W(this.labels.template.get("themeTags", []), ["pie", "series"])
498
+ }, [this.labels.template]));
499
+ }
500
+ _makeTicks() {
501
+ return new R(M.new({}), () => ct._new(this._root, {
502
+ themeTags: W(this.ticks.template.get("themeTags", []), ["pie", "series"])
503
+ }, [this.ticks.template]));
504
+ }
505
+ processDataItem(e) {
506
+ super.processDataItem(e);
507
+ const t = this.makeSlice(e);
508
+ t.on("scale", () => {
509
+ this._updateTick(e);
510
+ }), t.on("shiftRadius", () => {
511
+ this._updateTick(e);
512
+ }), t.events.on("positionchanged", () => {
513
+ this._updateTick(e);
514
+ });
515
+ const s = this.makeLabel(e);
516
+ s.events.on("positionchanged", () => {
517
+ this._updateTick(e);
518
+ }), this.makeTick(e), t.events.on("positionchanged", () => {
519
+ s.markDirty();
520
+ });
521
+ }
522
+ _getNextUp() {
523
+ const e = this.chart;
524
+ return e ? e._maxRadius : this.labelsContainer.maxHeight() / 2;
525
+ }
526
+ _getNextDown() {
527
+ const e = this.chart;
528
+ return e ? -e._maxRadius : -this.labelsContainer.maxHeight() / 2;
529
+ }
530
+ _prepareChildren() {
531
+ super._prepareChildren();
532
+ const e = this.chart;
533
+ if (e) {
534
+ if (this.isDirty("alignLabels")) {
535
+ let t = this.labels.template;
536
+ if (this.get("alignLabels"))
537
+ t.set("textType", "aligned");
538
+ else {
539
+ let s = t.get("textType");
540
+ (s == null || s == "aligned") && t.set("textType", "adjusted");
541
+ }
542
+ }
543
+ if (this._valuesDirty || this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle") || this.isDirty("alignLabels")) {
544
+ this.markDirtyBounds();
545
+ const t = this.get("startAngle", e.get("startAngle", -90)), i = this.get("endAngle", e.get("endAngle", 270)) - t;
546
+ let l = t;
547
+ const a = e.radius(this);
548
+ this.setPrivateRaw("radius", a);
549
+ let n = e.innerRadius(this) * e.getPrivate("irModifyer", 1);
550
+ n < 0 && (n = a + n), v(this._dataItems, (r) => {
551
+ this.updateLegendValue(r);
552
+ let c = i * r.get("valuePercentTotal") / 100;
553
+ const o = r.get("slice");
554
+ if (o) {
555
+ o.set("radius", a), o.set("innerRadius", n), o.set("startAngle", l), o.set("arc", c);
556
+ const g = r.get("fill");
557
+ o._setDefault("fill", g), o._setDefault("stroke", g);
558
+ const d = r.get("fillPattern");
559
+ o._setDefault("fillPattern", d);
560
+ }
561
+ let p = yt(l + c / 2);
562
+ const h = r.get("label");
563
+ if (h && (h.setPrivate("radius", a), h.setPrivate("innerRadius", n), h.set("labelAngle", p), h.get("textType") == "aligned")) {
564
+ let g = a + h.get("radius", 0), d = a * w(p);
565
+ p > 90 && p <= 270 ? (!h.isHidden() && !h.isHiding() && this._lLabels.push({ label: h, y: d }), g *= -1, g -= this.labelsContainer.get("paddingLeft", 0), h.set("centerX", P), h.setPrivateRaw("left", !0)) : (!h.isHidden() && !h.isHiding() && this._rLabels.push({ label: h, y: d }), g += this.labelsContainer.get("paddingRight", 0), h.set("centerX", 0), h.setPrivateRaw("left", !1)), h.set("x", g), h.set("y", a * w(p));
566
+ }
567
+ l += c, this._updateTick(r);
568
+ });
569
+ }
570
+ }
571
+ }
572
+ _updateTick(e) {
573
+ const t = e.get("tick"), s = e.get("label"), i = e.get("slice"), l = t.get("location", 1);
574
+ if (t && s && i) {
575
+ const a = (i.get("shiftRadius", 0) + i.get("radius", 0)) * i.get("scale", 1) * l, n = s.get("labelAngle", 0), r = T(n), c = w(n), o = this.labelsContainer, p = o.get("paddingLeft", 0), h = o.get("paddingRight", 0);
576
+ let g = 0, d = 0;
577
+ g = s.x(), d = s.y();
578
+ let u = [];
579
+ if (g != 0 || d != 0) {
580
+ if (s.get("textType") == "circular") {
581
+ const m = s.radius() - s.get("paddingBottom", 0), y = s.get("labelAngle", 0);
582
+ g = m * T(y), d = m * w(y);
583
+ }
584
+ let _ = -h;
585
+ s.getPrivate("left") && (_ = p), u = [{ x: i.x() + a * r, y: i.y() + a * c }, { x: g + _, y: d }, { x: g, y: d }];
586
+ }
587
+ t.set("points", u);
588
+ }
589
+ }
590
+ _positionBullet(e) {
591
+ const t = e.get("sprite");
592
+ if (t) {
593
+ const i = t.dataItem.get("slice");
594
+ if (i) {
595
+ const l = i.get("innerRadius", 0), a = i.get("radius", 0), n = i.get("startAngle", 0), r = i.get("arc", 0), c = e.get("locationX", 0.5), o = e.get("locationY", 0.5), p = n + r * c, h = l + (a - l) * o;
596
+ t.setAll({ x: T(p) * h, y: w(p) * h });
597
+ }
598
+ }
599
+ }
600
+ }
601
+ it.className = "PieSeries";
602
+ it.classNames = X.classNames.concat([it.className]);
603
+ class U extends $ {
604
+ constructor() {
605
+ super(...arguments), this._projectionDirty = !1, this._tlx = 0, this._tly = 0, this._trx = 0, this._try = 0, this._blx = 0, this._bly = 0, this._brx = 0, this._bry = 0, this._cprx = 0, this._cplx = 0, this._cpry = 0, this._cply = 0;
606
+ }
607
+ _afterNew() {
608
+ super._afterNew(), this.set("draw", (e) => {
609
+ const t = this.width(), s = this.height();
610
+ let i = Math.min(t, s) / 2, l = A(this.get("cornerRadiusTL", 0), i), a = A(this.get("cornerRadiusTR", 0), i), n = A(this.get("cornerRadiusBR", 0), i), r = A(this.get("cornerRadiusBL", 0), i), c = this._trx, o = this._try, p = this._tlx, h = this._tly, g = this._brx, d = this._bry, u = this._blx, _ = this._bly;
611
+ o == h && (o = o - 0.01), d == _ && (d = d - 0.01);
612
+ let m = J({ x: p, y: h }, { x: c, y: o }), y = J({ x: c, y: o }, { x: g, y: d }), x = J({ x: g, y: d }, { x: u, y: _ }), f = J({ x: u, y: _ }, { x: p, y: h });
613
+ this.get("orientation") == "horizontal" ? (l = Math.min(l, Math.abs(h - o) / 2), a = Math.min(a, Math.abs(h - o) / 2), n = Math.min(n, Math.abs(_ - d) / 2), r = Math.min(r, Math.abs(_ - d) / 2)) : (l = Math.min(l, Math.abs(p - c) / 2), a = Math.min(a, Math.abs(p - c) / 2), n = Math.min(n, Math.abs(u - g) / 2), r = Math.min(r, Math.abs(u - g) / 2));
614
+ const D = p - l * k((m - f) / 2) * T(f), L = h - l * k((m - f) / 2) * w(f), z = p - l * k((f - m) / 2) * T(m), F = h - l * k((f - m) / 2) * w(m), S = c - a * k((y - m) / 2) * T(m), Q = o - a * k((y - m) / 2) * w(m), N = c - a * k((m - y) / 2) * T(y), Y = o - a * k((m - y) / 2) * w(y), O = g - n * k((x - y) / 2) * T(y), B = d - n * k((x - y) / 2) * w(y), j = g - n * k((y - x) / 2) * T(x), q = d - n * k((y - x) / 2) * w(x), nt = u - r * k((f - x) / 2) * T(x), Z = _ - r * k((f - x) / 2) * w(x), I = u - r * k((x - f) / 2) * T(f), ut = _ - r * k((x - f) / 2) * w(f);
615
+ e.moveTo(z, F), e.lineTo(S, Q), e.arcTo(c, o, N, Y, a), e.quadraticCurveTo(this._cprx, this._cpry, O, B), e.arcTo(g, d, j, q, n), e.lineTo(nt, Z), e.arcTo(u, _, I, ut, r), e.quadraticCurveTo(this._cplx, this._cply, D, L), e.arcTo(p, h, z, F, l);
616
+ });
617
+ }
618
+ getPoint(e, t) {
619
+ let s = this.width(), i = this.height();
620
+ const l = this.get("topWidth", 0), a = this.get("bottomWidth", 0);
621
+ if (this.get("orientation") == "vertical") {
622
+ let n = -l / 2, r = l / 2, c = a / 2, o = -a / 2, p = n + (o - n) * t, h = r + (c - r) * t;
623
+ return { x: p + (h - p) * e, y: i * t };
624
+ } else {
625
+ let n = -l / 2, r = l / 2, c = a / 2, o = -a / 2, p = n + (o - n) * e, h = r + (c - r) * e;
626
+ return { x: s * e, y: p + (h - p) * t };
627
+ }
628
+ }
629
+ _changed() {
630
+ if (this.isDirty("topWidth") || this.isDirty("bottomWidth") || this.isDirty("expandDistance") || this.isDirty("orientation") || this.isDirty("width") || this.isDirty("height")) {
631
+ const e = this.width(), t = this.height(), s = this.get("topWidth", 0), i = this.get("bottomWidth", 0);
632
+ this._clear = !0;
633
+ let l = this.get("expandDistance", 0);
634
+ this.get("orientation") == "vertical" ? (this._tlx = -s / 2, this._tly = 0, this._trx = s / 2, this._try = 0, this._brx = i / 2, this._bry = t, this._blx = -i / 2, this._bly = t, this._cprx = this._trx + (this._brx - this._trx) / 2 + l * t, this._cpry = this._try + 0.5 * t, this._cplx = this._tlx + (this._blx - this._tlx) / 2 - l * t, this._cply = this._tly + 0.5 * t) : (this._tly = s / 2, this._tlx = 0, this._try = -s / 2, this._trx = 0, this._bry = -i / 2, this._brx = e, this._bly = i / 2, this._blx = e, this._cpry = this._try + (this._bry - this._try) / 2 - l * e, this._cprx = this._trx + 0.5 * e, this._cply = this._tly + (this._bly - this._tly) / 2 + l * e, this._cplx = this._tlx + 0.5 * e);
635
+ }
636
+ super._changed();
637
+ }
638
+ }
639
+ U.className = "FunnelSlice";
640
+ U.classNames = $.classNames.concat([U.className]);
641
+ class K extends X {
642
+ constructor() {
643
+ super(...arguments), this._tag = "funnel", this.links = this.addDisposer(this._makeLinks()), this._total = 0, this._count = 0, this._nextCoord = 0, this._opposite = !1;
644
+ }
645
+ _makeSlices() {
646
+ return new R(M.new({}), () => U._new(this._root, {
647
+ themeTags: W(this.slices.template.get("themeTags", []), [this._tag, "series", "slice", this.get("orientation")])
648
+ }, [this.slices.template]));
649
+ }
650
+ _makeLabels() {
651
+ return new R(M.new({}), () => bt._new(this._root, {
652
+ themeTags: W(this.labels.template.get("themeTags", []), [this._tag, "series", "label", this.get("orientation")])
653
+ }, [this.labels.template]));
654
+ }
655
+ _makeTicks() {
656
+ return new R(M.new({}), () => ct._new(this._root, {
657
+ themeTags: W(this.ticks.template.get("themeTags", []), [this._tag, "series", "tick", this.get("orientation")])
658
+ }, [this.ticks.template]));
659
+ }
660
+ _makeLinks() {
661
+ return new R(M.new({}), () => U._new(this._root, {
662
+ themeTags: W(this.links.template.get("themeTags", []), [this._tag, "series", "link", this.get("orientation")])
663
+ }, [this.links.template]));
664
+ }
665
+ /**
666
+ * @ignore
667
+ */
668
+ makeLink(e) {
669
+ const t = this.slicesContainer.children.push(this.links.make());
670
+ return t._setDataItem(e), e.set("link", t), this.links.push(t), t;
671
+ }
672
+ _afterNew() {
673
+ super._afterNew();
674
+ const e = this.slicesContainer;
675
+ e.setAll({ isMeasured: !0, position: "relative", width: et(100), height: et(100) }), e.onPrivate("width", () => {
676
+ this.markDirtySize();
677
+ }), e.onPrivate("height", () => {
678
+ this.markDirtySize();
679
+ }), this.get("orientation") == "vertical" ? this.set("layout", this._root.horizontalLayout) : this.set("layout", this._root.verticalLayout);
680
+ }
681
+ processDataItem(e) {
682
+ super.processDataItem(e);
683
+ const t = this.makeSlice(e);
684
+ t._setDataItem(e), e.set("slice", t), this.makeLink(e);
685
+ const s = this.makeLabel(e);
686
+ s.on("x", () => {
687
+ this._updateTick(e);
688
+ }), s.on("y", () => {
689
+ this._updateTick(e);
690
+ }), this.makeTick(e), t.events.on("positionchanged", () => {
691
+ s.markDirty();
692
+ }), t.events.on("boundschanged", () => {
693
+ const i = t.dataItem;
694
+ i && this._updateTick(i);
695
+ });
696
+ }
697
+ _updateChildren() {
698
+ this._opposite = !1, this.children.indexOf(this.labelsContainer) == 0 && (this._opposite = !0);
699
+ let e = 0, t = 0;
700
+ if (v(this.dataItems, (s) => {
701
+ const i = s.get("value");
702
+ G(i) && (t++, i > 0 ? e += Math.abs(s.get("valueWorking", i) / i) : this.get("ignoreZeroValues", !1) || s.isHidden() ? t-- : e += 1);
703
+ }), this._total = 1 / t * e, this._count = t, this.isDirty("alignLabels") && this._fixLayout(), this._total > 0 && (this._valuesDirty || this._sizeDirty)) {
704
+ const s = this.slicesContainer;
705
+ let i;
706
+ this.get("orientation") == "vertical" ? i = s.innerHeight() : i = s.innerWidth(), this._nextCoord = this.get("startLocation", 0) * i, this.markDirtyBounds();
707
+ let l = 0;
708
+ v(this._dataItems, (a) => {
709
+ this.updateLegendValue(a), a.set("index", l), l++;
710
+ const n = a.get("slice"), r = a.get("tick"), c = a.get("label"), o = a.get("link"), p = a.get("fill"), h = a.get("fillPattern");
711
+ n._setDefault("fill", p), n._setDefault("stroke", p), n._setDefault("fillPattern", h), o._setDefault("fill", p), o._setDefault("stroke", p);
712
+ const g = a.get("value");
713
+ G(g) && (g == 0 && this.get("ignoreZeroValues") ? (n.setPrivate("visible", !1), r.setPrivate("visible", !1), c.setPrivate("visible", !1)) : (n.setPrivate("visible", !0), r.setPrivate("visible", !0), c.setPrivate("visible", !0), this.decorateSlice(a), this.isLast(a) ? o.setPrivate("visible", !1) : a.isHidden() || o.setPrivate("visible", !0)));
714
+ });
715
+ }
716
+ super._updateChildren();
717
+ }
718
+ _fixLayout() {
719
+ const e = this.get("orientation"), t = this.labelsContainer, s = this.labels.template;
720
+ this.get("alignLabels") ? (t.set("position", "relative"), t.setAll({ isMeasured: !0 }), e == "vertical" ? (this.set("layout", this._root.horizontalLayout), s.setAll({ centerX: P, x: P })) : (this.set("layout", this._root.verticalLayout), s.setAll({ centerX: 0, x: 0 }))) : (t.setAll({ isMeasured: !1, position: "absolute" }), e == "vertical" ? (t.setAll({ x: b }), s.setAll({ centerX: b, x: 0 })) : (t.setAll({ y: b }), s.setAll({ centerX: b, y: 0 }))), this.markDirtySize();
721
+ }
722
+ getNextValue(e) {
723
+ let t = e.get("index"), s = e.get("valueWorking", 0);
724
+ if (t < this.dataItems.length - 1) {
725
+ let i = this.dataItems[t + 1];
726
+ if (s = i.get("valueWorking", 0), i.isHidden() || i.get("value") == 0 && this.get("ignoreZeroValues"))
727
+ return this.getNextValue(i);
728
+ }
729
+ return s;
730
+ }
731
+ isLast(e) {
732
+ let t = e.get("index");
733
+ if (t == this.dataItems.length - 1)
734
+ return !0;
735
+ for (let s = t + 1; s < this.dataItems.length; s++)
736
+ if (!this.dataItems[s].isHidden())
737
+ return !1;
738
+ return !0;
739
+ }
740
+ decorateSlice(e) {
741
+ const t = this.get("orientation"), s = e.get("slice"), i = e.get("label"), l = e.get("link"), a = this.slicesContainer;
742
+ let n = a.innerWidth(), r = a.innerHeight(), c = n;
743
+ t == "horizontal" && (c = r);
744
+ const o = this.getNextValue(e), p = e.get("value", 0), h = Math.abs(e.get("valueWorking", p)), g = this.get("bottomRatio", 0), d = this.getPrivate("valueHigh", 0);
745
+ let u = 1;
746
+ p != 0 ? u = h / Math.abs(p) : e.isHidden() && (u = 1e-6), this._nextCoord == 1 / 0 && (this._nextCoord = 0);
747
+ let _ = h / d * c, m = (h - (h - o) * g) / d * c;
748
+ s.setAll({ topWidth: _, bottomWidth: m, orientation: t }), l.setAll({ topWidth: m, bottomWidth: (h - (h - o)) / d * c, orientation: t });
749
+ const y = this.get("startLocation", 0), x = this.get("endLocation", 1);
750
+ if (t == "vertical") {
751
+ let f = l.height() * u;
752
+ r = r * (x - y) + f, s.set("y", this._nextCoord);
753
+ let D = Math.min(1e5, Math.max(0, r / this._count * u / this._total - f));
754
+ s.setAll({ height: D, x: n / 2 });
755
+ let L = this._nextCoord + D / 2;
756
+ i.set("y", L), this._nextCoord += D + f, l.setAll({ y: this._nextCoord - f, x: n / 2 });
757
+ } else {
758
+ let f = l.width() * u;
759
+ n = n * (x - y) + f, s.set("x", this._nextCoord);
760
+ let D = Math.min(1e5, Math.max(0, n / this._count * u / this._total - f));
761
+ s.setAll({ width: D, y: r / 2 });
762
+ const L = this._nextCoord + D / 2;
763
+ i.set("x", L), this._nextCoord += D + f, l.setAll({ x: this._nextCoord - f, y: r / 2 });
764
+ }
765
+ }
766
+ /**
767
+ * Hides series's data item.
768
+ *
769
+ * @param dataItem Data item
770
+ * @param duration Animation duration in milliseconds
771
+ * @return Promise
772
+ */
773
+ hideDataItem(e, t) {
774
+ const s = Object.create(null, {
775
+ hideDataItem: { get: () => super.hideDataItem }
776
+ });
777
+ return V(this, void 0, void 0, function* () {
778
+ return e.get("link").hide(t), s.hideDataItem.call(this, e, t);
779
+ });
780
+ }
781
+ /**
782
+ * Shows series's data item.
783
+ *
784
+ * @param dataItem Data item
785
+ * @param duration Animation duration in milliseconds
786
+ * @return Promise
787
+ */
788
+ showDataItem(e, t) {
789
+ const s = Object.create(null, {
790
+ showDataItem: { get: () => super.showDataItem }
791
+ });
792
+ return V(this, void 0, void 0, function* () {
793
+ return e.get("link").show(t), s.showDataItem.call(this, e, t);
794
+ });
795
+ }
796
+ _updateTick(e) {
797
+ if (this.get("alignLabels")) {
798
+ const t = e.get("tick"), s = e.get("label"), i = e.get("slice");
799
+ if (t && i && s) {
800
+ const l = this.labelsContainer, a = this.slicesContainer;
801
+ let n = t.get("location", 0.5);
802
+ const r = l.width(), c = l.height(), o = l.get("paddingLeft", 0), p = l.get("paddingRight", 0), h = l.get("paddingTop", 0), g = l.get("paddingBottom", 0);
803
+ let d = { x: 0, y: 0 }, u = { x: 0, y: 0 }, _ = { x: 0, y: 0 };
804
+ this._opposite && (n = 1 - n), this.get("orientation") == "vertical" ? (d = i.getPoint(n, 0.5), d.x += i.x() + a.x(), d.y += i.y() + a.y(), this._opposite ? (u.x = r, u.y = s.y(), _.x = r - o, _.y = u.y) : (u.x = a.x() + a.width(), u.y = s.y(), _.x = u.x + r - s.width() - p, _.y = u.y)) : (d = i.getPoint(0.5, n), d.x += i.x() + a.x(), d.y += i.y() + a.y(), this._opposite ? (u.y = c, u.x = s.x(), _.y = c - h, _.x = u.x) : (u.y = a.y() + a.height(), u.x = s.x(), _.y = u.y + c - s.height() - g, _.x = u.x)), t.set("points", [d, u, _]);
805
+ }
806
+ }
807
+ }
808
+ /**
809
+ * @ignore
810
+ */
811
+ disposeDataItem(e) {
812
+ super.disposeDataItem(e);
813
+ let t = e.get("link");
814
+ t && (this.links.removeValue(t), t.dispose());
815
+ }
816
+ _positionBullet(e) {
817
+ const t = e.get("sprite");
818
+ if (t) {
819
+ const i = t.dataItem.get("slice");
820
+ if (i) {
821
+ const l = i.width(), a = i.height(), n = e.get("locationX", 0.5), r = e.get("locationY", 0.5);
822
+ let c = 0, o = 0;
823
+ this.get("orientation") == "horizontal" ? o = a / 2 : c = l / 2, t.setAll({ x: i.x() + l * n - c, y: i.y() - o + a * r });
824
+ }
825
+ }
826
+ }
827
+ }
828
+ K.className = "FunnelSeries";
829
+ K.classNames = X.classNames.concat([K.className]);
830
+ class E extends K {
831
+ constructor() {
832
+ super(...arguments), this._tag = "pyramid";
833
+ }
834
+ _prepareChildren() {
835
+ super._prepareChildren(), this._nextSize = void 0;
836
+ }
837
+ decorateSlice(e) {
838
+ const t = this.get("orientation"), s = this.slicesContainer, i = e.get("slice"), l = e.get("label"), a = e.get("link"), n = this.get("valueIs", "area"), r = this.getPrivate("valueAbsoluteSum", 0);
839
+ if (r == 0)
840
+ return;
841
+ const c = this.get("startLocation", 0), o = this.get("endLocation", 1), p = this.get("topWidth", 0), h = this.get("bottomWidth", P), g = Math.abs(e.get("valueWorking", 0)), d = e.get("value", 0);
842
+ let u, _, m = s.innerHeight(), y = s.innerWidth(), x = a.width(), f = a.height();
843
+ t == "horizontal" && ([y, m] = [m, y], [x, f] = [f, x]);
844
+ const D = y / 2;
845
+ let L = 1;
846
+ d != 0 ? L = g / Math.abs(d) : e.isHidden() && (L = 1e-6), f *= L, m = m * (o - c) - f * (this._count * this._total - 1);
847
+ let z = A(p, y);
848
+ G(this._nextSize) || (this._nextSize = z);
849
+ let F = A(h, y), S = this._nextSize, Q = Math.atan2(m, z - F), N = Math.tan(Math.PI / 2 - Q);
850
+ if (N == 0 && (N = 1e-8), n == "area") {
851
+ let Z = (z + F) / 2 * m * g / r, I = Math.abs(S * S - 2 * Z * N);
852
+ u = (S - Math.sqrt(I)) / N, u > 0 ? _ = (2 * Z - u * S) / u : _ = S;
853
+ } else
854
+ u = m * g / r, _ = S - u * N;
855
+ let Y = this._nextCoord + u / 2, O = D, B = this._nextCoord, j = D, q = B + u;
856
+ t == "vertical" ? (l.set("y", Y), l.get("opacity") > 0 && this._rLabels.push({ label: l, y: Y }), i.set("height", u)) : (l.set("x", Y), l.get("opacity") > 0 && this._hLabels.push({ label: l, y: Y }), [O, B] = [B, O], [j, q] = [q, j], i.set("width", u)), i.setAll({ orientation: t, bottomWidth: _, topWidth: S, x: O, y: B }), a.setAll({ orientation: t, x: j, y: q, topWidth: _, bottomWidth: _ }), this._nextSize = _, this._nextCoord += u + f;
857
+ }
858
+ }
859
+ E.className = "PyramidSeries";
860
+ E.classNames = K.classNames.concat([E.className]);
861
+ class lt extends E {
862
+ constructor() {
863
+ super(...arguments), this._tag = "pictorial", this.seriesMask = $.new(this._root, { position: "absolute", x: b, y: b, centerX: b, centerY: b }), this.seriesGraphics = this.slicesContainer.children.push($.new(this._root, { themeTags: ["pictorial", "background"], position: "absolute", x: b, y: b, centerX: b, centerY: b }));
864
+ }
865
+ _afterNew() {
866
+ super._afterNew(), this.set("topWidth", P), this.set("bottomWidth", P), this.set("valueIs", "height"), this.slicesContainer.set("mask", this.seriesMask);
867
+ }
868
+ _updateScale() {
869
+ let e = this.slicesContainer, t = e.innerWidth(), s = e.innerHeight(), i = this.seriesMask, l = this.seriesGraphics, a = i.get("scale", 1);
870
+ const n = i.localBounds();
871
+ let r = n.right - n.left, c = n.bottom - n.top;
872
+ this.get("orientation") == "horizontal" ? a = t / r : a = s / c, a != 1 / 0 && a != NaN && (i.set("scale", a), i.set("x", t / 2), i.set("y", s / 2), l.set("scale", a), l.set("x", t / 2), l.set("y", s / 2));
873
+ }
874
+ _prepareChildren() {
875
+ if (super._prepareChildren(), this.isDirty("svgPath")) {
876
+ const e = this.get("svgPath");
877
+ this.seriesMask.set("svgPath", e), this.seriesGraphics.set("svgPath", e);
878
+ }
879
+ this._updateScale();
880
+ }
881
+ }
882
+ lt.className = "PictorialStackedSeries";
883
+ lt.classNames = E.classNames.concat([lt.className]);
884
+ class at extends H {
885
+ _afterNew() {
886
+ super._afterNew(), this.seriesContainer.setAll({ isMeasured: !0, layout: this._root.horizontalLayout });
887
+ }
888
+ }
889
+ at.className = "SlicedChart";
890
+ at.classNames = H.classNames.concat([at.className]);
891
+ export {
892
+ vt as DefaultTheme,
893
+ K as FunnelSeries,
894
+ U as FunnelSlice,
895
+ H as PercentChart,
896
+ X as PercentSeries,
897
+ lt as PictorialStackedSeries,
898
+ st as PieChart,
899
+ it as PieSeries,
900
+ E as PyramidSeries,
901
+ at as SlicedChart
902
+ };