@bino-bi/bn-template-engine 1.0.0-alpha.16 → 1.0.0-alpha.18

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 (326) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-0107f0cc.entry.js +1 -0
  3. package/dist/bn-template-engine/p-209351c9.entry.js +1 -0
  4. package/dist/bn-template-engine/p-22d0fb7a.entry.js +1 -0
  5. package/dist/bn-template-engine/p-2e6dc267.entry.js +1 -0
  6. package/dist/bn-template-engine/p-485d23d7.entry.js +1 -0
  7. package/dist/bn-template-engine/p-5651417d.entry.js +1 -0
  8. package/dist/bn-template-engine/p-5bfdc1e5.entry.js +1 -0
  9. package/dist/bn-template-engine/p-6b75762d.entry.js +1 -0
  10. package/dist/bn-template-engine/{p-ff659485.entry.js → p-7bdc0e28.entry.js} +1 -1
  11. package/dist/bn-template-engine/p-9879c9b2.entry.js +1 -0
  12. package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
  13. package/dist/bn-template-engine/p-BWKdb9ym.js +1 -0
  14. package/dist/bn-template-engine/p-BZV1b5VH.js +1 -0
  15. package/dist/bn-template-engine/p-Bdfxd_Ke.js +1 -0
  16. package/dist/bn-template-engine/p-BqhIhYr1.js +1 -0
  17. package/dist/bn-template-engine/p-C0Pwqx-O.js +1 -0
  18. package/dist/bn-template-engine/p-CBqUr7I8.js +1 -0
  19. package/dist/bn-template-engine/{p-BPDZcex5.js → p-CPzF3Q2m.js} +1 -1
  20. package/dist/bn-template-engine/p-CiudZRQr.js +1 -0
  21. package/dist/bn-template-engine/p-Dg9OcXAO.js +1 -0
  22. package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
  23. package/dist/bn-template-engine/p-X6CxL6W-.js +1 -0
  24. package/dist/bn-template-engine/p-a130cb43.entry.js +1 -0
  25. package/dist/bn-template-engine/p-aakBGfzL.js +1 -0
  26. package/dist/bn-template-engine/p-dc745c32.entry.js +1 -0
  27. package/dist/bn-template-engine/p-e96da91f.entry.js +1 -0
  28. package/dist/bn-template-engine/p-f3d1fa06.entry.js +1 -0
  29. package/dist/bn-template-engine/p-fcb43f2c.entry.js +1 -0
  30. package/dist/bn-template-engine/p-rdqTC0_5.js +1 -0
  31. package/dist/cjs/AxisConfig-VnVelfSV.js +233 -0
  32. package/dist/cjs/LabelCollisionManager-nfD5P__k.js +412 -0
  33. package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
  34. package/dist/cjs/Order-DobBozQC.js +87 -0
  35. package/dist/cjs/SVGStyle-BQOmGWLX.js +8209 -0
  36. package/dist/cjs/SVGVariancesStyleGroup-DCGfHrqh.js +50 -0
  37. package/dist/cjs/VarianceMeasure-NY9yhiNV.js +372 -0
  38. package/dist/cjs/XYChartDataRow-B7OKrAcC.js +829 -0
  39. package/dist/cjs/bn-asset_21.cjs.entry.js +1614 -9670
  40. package/dist/cjs/bn-chart-bubble.cjs.entry.js +762 -0
  41. package/dist/cjs/bn-chart-bullet.cjs.entry.js +785 -0
  42. package/dist/cjs/bn-chart-scatter.cjs.entry.js +658 -0
  43. package/dist/cjs/bn-grid.cjs.entry.js +5 -3
  44. package/dist/cjs/bn-image.cjs.entry.js +5 -3
  45. package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
  46. package/dist/cjs/bn-ruleset.cjs.entry.js +41 -0
  47. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  48. package/dist/cjs/bn-template.cjs.entry.js +1 -1
  49. package/dist/cjs/bn-text.cjs.entry.js +8 -79
  50. package/dist/cjs/bn-tree.cjs.entry.js +4 -2
  51. package/dist/cjs/{context-protocol-Cn5PL928.js → context-protocol-BDrMkhc4.js} +272 -1
  52. package/dist/cjs/editor-companion.cjs.entry.js +2 -2
  53. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +624 -0
  54. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +673 -0
  55. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +667 -0
  56. package/dist/cjs/layoutObserver-p0wXIWFg.js +350 -0
  57. package/dist/cjs/loader.cjs.js +1 -1
  58. package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
  59. package/dist/cjs/{scaling-DM2UILdF.js → scaling-BmqxcNOf.js} +1 -1
  60. package/dist/cjs/withScalingGroup-BmcRlWBs.js +73 -0
  61. package/dist/cjs/{withStyled-Dx3uRw9g.js → withStyled-CRiC9fzc.js} +44 -383
  62. package/dist/collection/collection-manifest.json +7 -0
  63. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +10 -0
  64. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +1110 -0
  65. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +9 -0
  66. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +653 -0
  67. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +472 -0
  68. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +10 -0
  69. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +1014 -0
  70. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +9 -0
  71. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +538 -0
  72. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +440 -0
  73. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +132 -0
  74. package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +89 -0
  75. package/dist/collection/components/bn-chart-bullet/utils/model/index.js +2 -0
  76. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +10 -0
  77. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +965 -0
  78. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +9 -0
  79. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +580 -0
  80. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +409 -0
  81. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +23 -2
  82. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +29 -4
  83. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +3 -0
  84. package/dist/collection/components/bn-chart-time/bn-chart-time.js +27 -4
  85. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +29 -4
  86. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +16 -4
  87. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
  88. package/dist/collection/components/bn-component-style/bn-component-style.js +1 -1
  89. package/dist/collection/components/bn-context/bn-context.js +1 -1
  90. package/dist/collection/components/bn-dataset/bn-dataset.js +1 -1
  91. package/dist/collection/components/bn-datasource/bn-datasource.js +1 -1
  92. package/dist/collection/components/bn-footer/bn-footer.js +1 -1
  93. package/dist/collection/components/bn-grid/bn-grid.js +1 -1
  94. package/dist/collection/components/bn-image/bn-image.js +1 -1
  95. package/dist/collection/components/bn-internationalization/bn-internationalization.js +1 -1
  96. package/dist/collection/components/bn-layout-card/bn-layout-card.js +26 -3
  97. package/dist/collection/components/bn-layout-page/bn-layout-page.js +33 -4
  98. package/dist/collection/components/bn-message/bn-message.css +6 -2
  99. package/dist/collection/components/bn-message/bn-message.js +3 -2
  100. package/dist/collection/components/bn-page/bn-page.js +1 -1
  101. package/dist/collection/components/bn-ruleset/bn-ruleset.css +3 -0
  102. package/dist/collection/components/bn-ruleset/bn-ruleset.js +68 -0
  103. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +1 -1
  104. package/dist/collection/components/bn-table/bn-table.js +146 -14
  105. package/dist/collection/components/bn-table/ibcs-table.css +8 -0
  106. package/dist/collection/components/bn-table/ibcs-table.js +64 -8
  107. package/dist/collection/components/bn-table/utils/Table.js +43 -5
  108. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +13 -8
  109. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -2
  110. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +47 -0
  111. package/dist/collection/components/bn-table/utils/elements/index.js +1 -0
  112. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +87 -15
  113. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +284 -3
  114. package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +140 -0
  115. package/dist/collection/components/bn-table/utils/helper/WaterfallCalculator.js +166 -0
  116. package/dist/collection/components/bn-table/utils/helper/index.js +2 -0
  117. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +10 -0
  118. package/dist/collection/components/bn-template/bn-template.js +1 -1
  119. package/dist/collection/components/bn-text/bn-text.js +2 -75
  120. package/dist/collection/components/bn-title/bn-title.js +27 -3
  121. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +4 -0
  122. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +29 -3
  123. package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +3 -0
  124. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  125. package/dist/collection/stores/componentStyles.js +67 -0
  126. package/dist/collection/stores/createScopedStores.js +6 -1
  127. package/dist/collection/stores/internationalization.js +68 -0
  128. package/dist/collection/stores/ruleSets.js +46 -0
  129. package/dist/collection/utils/constants.js +5 -0
  130. package/dist/collection/utils/ibcsRuleSet.js +14 -26
  131. package/dist/collection/utils/sanitizeHtml.js +81 -0
  132. package/dist/collection/utils/validate.js +24 -0
  133. package/dist/collection/utils/withComponentStyle.js +3 -5
  134. package/dist/collection/utils/withInheritedProps.js +1 -1
  135. package/dist/collection/utils/withRuleSet.js +105 -0
  136. package/dist/collection/utils/withScalingGroup.js +3 -0
  137. package/dist/collection/utils/xy/FacetGrid.js +36 -0
  138. package/dist/collection/utils/xy/IsoCurves.js +156 -0
  139. package/dist/collection/utils/xy/NumericScale.js +103 -0
  140. package/dist/collection/utils/xy/PointLabeler.js +96 -0
  141. package/dist/collection/utils/xy/RadiusScale.js +42 -0
  142. package/dist/collection/utils/xy/SeriesPalette.js +80 -0
  143. package/dist/collection/utils/xy/VarianceMeasure.js +76 -0
  144. package/dist/collection/utils/xy/XYFrame.js +120 -0
  145. package/dist/collection/utils/xy/XYLegend.js +107 -0
  146. package/dist/collection/utils/xy/model/AxisConfig.js +221 -0
  147. package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +69 -0
  148. package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
  149. package/dist/collection/utils/xy/model/XYChartStyle.js +52 -0
  150. package/dist/components/AxisConfig.js +1 -0
  151. package/dist/components/CompareUtil.js +1 -0
  152. package/dist/components/DataFormatDigits.js +1 -1
  153. package/dist/components/LabelCollisionManager.js +1 -0
  154. package/dist/components/NumericScale.js +1 -0
  155. package/dist/components/Order.js +1 -1
  156. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  157. package/dist/components/SiPrefix.js +1 -0
  158. package/dist/components/StringAdapter.js +1 -0
  159. package/dist/components/VarianceMeasure.js +1 -0
  160. package/dist/components/XYChartDataRow.js +1 -0
  161. package/dist/components/bn-chart-bubble.d.ts +11 -0
  162. package/dist/components/bn-chart-bubble.js +1 -0
  163. package/dist/components/bn-chart-bullet.d.ts +11 -0
  164. package/dist/components/bn-chart-bullet.js +1 -0
  165. package/dist/components/bn-chart-scatter.d.ts +11 -0
  166. package/dist/components/bn-chart-scatter.js +1 -0
  167. package/dist/components/bn-chart-structure.js +1 -1
  168. package/dist/components/bn-chart-time.js +1 -1
  169. package/dist/components/bn-component-style.js +1 -1
  170. package/dist/components/bn-context.js +1 -1
  171. package/dist/components/bn-dataset.js +1 -1
  172. package/dist/components/bn-datasource.js +1 -1
  173. package/dist/components/bn-footer2.js +1 -1
  174. package/dist/components/bn-grid.js +1 -1
  175. package/dist/components/bn-image.js +1 -1
  176. package/dist/components/bn-internationalization.js +1 -1
  177. package/dist/components/bn-layout-card.js +1 -1
  178. package/dist/components/bn-layout-page.js +1 -1
  179. package/dist/components/bn-message2.js +1 -1
  180. package/dist/components/bn-page2.js +1 -1
  181. package/dist/components/bn-ruleset.d.ts +11 -0
  182. package/dist/components/bn-ruleset.js +1 -0
  183. package/dist/components/bn-scaling-group.js +1 -1
  184. package/dist/components/bn-table.js +1 -1
  185. package/dist/components/bn-template.js +1 -1
  186. package/dist/components/bn-text.js +1 -1
  187. package/dist/components/bn-title2.js +1 -1
  188. package/dist/components/bn-tree.js +1 -1
  189. package/dist/components/context-protocol.js +1 -1
  190. package/dist/components/editor-companion.js +1 -1
  191. package/dist/components/formatter.js +1 -0
  192. package/dist/components/ibcs-chart-bubble.d.ts +11 -0
  193. package/dist/components/ibcs-chart-bubble.js +1 -0
  194. package/dist/components/ibcs-chart-bubble2.js +1 -0
  195. package/dist/components/ibcs-chart-bullet.d.ts +11 -0
  196. package/dist/components/ibcs-chart-bullet.js +1 -0
  197. package/dist/components/ibcs-chart-bullet2.js +1 -0
  198. package/dist/components/ibcs-chart-scatter.d.ts +11 -0
  199. package/dist/components/ibcs-chart-scatter.js +1 -0
  200. package/dist/components/ibcs-chart-scatter2.js +1 -0
  201. package/dist/components/ibcs-chart-structure2.js +1 -1
  202. package/dist/components/ibcs-chart-time2.js +1 -1
  203. package/dist/components/ibcs-table2.js +1 -1
  204. package/dist/components/ibcs-title2.js +1 -1
  205. package/dist/components/layoutObserver.js +1 -1
  206. package/dist/components/luxon.js +1 -1
  207. package/dist/components/main.js +1 -0
  208. package/dist/components/merge.js +1 -0
  209. package/dist/components/sanitizeHtml.js +1 -0
  210. package/dist/components/stackColors.js +1 -0
  211. package/dist/components/validate.js +1 -1
  212. package/dist/components/withComponentStyle.js +1 -1
  213. package/dist/components/withDataset.js +1 -0
  214. package/dist/components/withRuleSet.js +1 -0
  215. package/dist/components/withScalingGroup.js +1 -0
  216. package/dist/components/withStyled.js +1 -1
  217. package/dist/esm/AxisConfig-C_zWCKlL.js +224 -0
  218. package/dist/esm/LabelCollisionManager-8swVQHKA.js +404 -0
  219. package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
  220. package/dist/esm/Order-BPeWfygb.js +83 -0
  221. package/dist/esm/SVGStyle-BxEDw9zh.js +8199 -0
  222. package/dist/esm/SVGVariancesStyleGroup-DRQYvSDD.js +48 -0
  223. package/dist/esm/VarianceMeasure-DnwNKspZ.js +364 -0
  224. package/dist/esm/XYChartDataRow-DeV4r-Wm.js +820 -0
  225. package/dist/esm/bn-asset_21.entry.js +1127 -9183
  226. package/dist/esm/bn-chart-bubble.entry.js +760 -0
  227. package/dist/esm/bn-chart-bullet.entry.js +783 -0
  228. package/dist/esm/bn-chart-scatter.entry.js +656 -0
  229. package/dist/esm/bn-grid.entry.js +5 -3
  230. package/dist/esm/bn-image.entry.js +5 -3
  231. package/dist/esm/bn-internationalization.entry.js +2 -2
  232. package/dist/esm/bn-ruleset.entry.js +39 -0
  233. package/dist/esm/bn-template-engine.js +1 -1
  234. package/dist/esm/bn-template.entry.js +1 -1
  235. package/dist/esm/bn-text.entry.js +7 -78
  236. package/dist/esm/bn-tree.entry.js +4 -2
  237. package/dist/esm/{context-protocol-BB-4Onmw.js → context-protocol-1Yj1uKvh.js} +268 -2
  238. package/dist/esm/editor-companion.entry.js +2 -2
  239. package/dist/esm/ibcs-chart-bubble.entry.js +622 -0
  240. package/dist/esm/ibcs-chart-bullet.entry.js +671 -0
  241. package/dist/esm/ibcs-chart-scatter.entry.js +665 -0
  242. package/dist/esm/layoutObserver-DCbmpGrz.js +345 -0
  243. package/dist/esm/loader.js +1 -1
  244. package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
  245. package/dist/esm/{scaling-h4KcBet3.js → scaling-B_k50v9z.js} +2 -2
  246. package/dist/esm/withScalingGroup-Br70pAv9.js +71 -0
  247. package/dist/esm/{withStyled-BBvU2f-A.js → withStyled-Br2DGTPs.js} +30 -367
  248. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +193 -0
  249. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +58 -0
  250. package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +91 -0
  251. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +172 -0
  252. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +52 -0
  253. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +91 -0
  254. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +70 -0
  255. package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +43 -0
  256. package/dist/types/components/bn-chart-bullet/utils/model/index.d.ts +2 -0
  257. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +172 -0
  258. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +53 -0
  259. package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +66 -0
  260. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +7 -0
  261. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +2 -0
  262. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +1 -0
  263. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +10 -1
  264. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +2 -0
  265. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +1 -0
  266. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +10 -0
  267. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +14 -0
  268. package/dist/types/components/bn-message/bn-message.d.ts +5 -2
  269. package/dist/types/components/bn-ruleset/bn-ruleset.d.ts +8 -0
  270. package/dist/types/components/bn-table/bn-table.d.ts +38 -5
  271. package/dist/types/components/bn-table/ibcs-table.d.ts +8 -1
  272. package/dist/types/components/bn-table/utils/Table.d.ts +8 -0
  273. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
  274. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +33 -0
  275. package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +2 -1
  276. package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +21 -0
  277. package/dist/types/components/bn-table/utils/elements/index.d.ts +1 -0
  278. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +13 -7
  279. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +17 -0
  280. package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +37 -0
  281. package/dist/types/components/bn-table/utils/helper/WaterfallCalculator.d.ts +55 -0
  282. package/dist/types/components/bn-table/utils/helper/index.d.ts +2 -0
  283. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +4 -0
  284. package/dist/types/components/bn-table/utils/model/index.d.ts +21 -0
  285. package/dist/types/components/bn-title/bn-title.d.ts +11 -1
  286. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +2 -0
  287. package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
  288. package/dist/types/components.d.ts +1383 -82
  289. package/dist/types/context/context-protocol.d.ts +2 -0
  290. package/dist/types/stores/componentStyles.d.ts +41 -0
  291. package/dist/types/stores/createScopedStores.d.ts +2 -0
  292. package/dist/types/stores/ruleSets.d.ts +40 -0
  293. package/dist/types/utils/constants.d.ts +5 -0
  294. package/dist/types/utils/ibcsRuleSet.d.ts +6 -1
  295. package/dist/types/utils/model/ChartStyles.d.ts +2 -1
  296. package/dist/types/utils/sanitizeHtml.d.ts +6 -0
  297. package/dist/types/utils/validate.d.ts +12 -0
  298. package/dist/types/utils/withInheritedProps.d.ts +11 -0
  299. package/dist/types/utils/withRuleSet.d.ts +24 -0
  300. package/dist/types/utils/xy/FacetGrid.d.ts +27 -0
  301. package/dist/types/utils/xy/IsoCurves.d.ts +46 -0
  302. package/dist/types/utils/xy/NumericScale.d.ts +41 -0
  303. package/dist/types/utils/xy/PointLabeler.d.ts +58 -0
  304. package/dist/types/utils/xy/RadiusScale.d.ts +26 -0
  305. package/dist/types/utils/xy/SeriesPalette.d.ts +59 -0
  306. package/dist/types/utils/xy/VarianceMeasure.d.ts +37 -0
  307. package/dist/types/utils/xy/XYFrame.d.ts +44 -0
  308. package/dist/types/utils/xy/XYLegend.d.ts +43 -0
  309. package/dist/types/utils/xy/model/AxisConfig.d.ts +96 -0
  310. package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +36 -0
  311. package/dist/types/utils/xy/model/XYChartDataRow.d.ts +157 -0
  312. package/dist/types/utils/xy/model/XYChartStyle.d.ts +31 -0
  313. package/package.json +1 -1
  314. package/readme.md +7 -3
  315. package/dist/bn-template-engine/p-19f49fbc.entry.js +0 -1
  316. package/dist/bn-template-engine/p-3465fcdc.entry.js +0 -1
  317. package/dist/bn-template-engine/p-67746414.entry.js +0 -1
  318. package/dist/bn-template-engine/p-6b469808.entry.js +0 -1
  319. package/dist/bn-template-engine/p-86ca2d5e.entry.js +0 -1
  320. package/dist/bn-template-engine/p-Tx6omDWp.js +0 -1
  321. package/dist/bn-template-engine/p-d724ab88.entry.js +0 -1
  322. package/dist/bn-template-engine/p-efd3b67a.entry.js +0 -1
  323. package/dist/bn-template-engine/p-z9bPNFYF.js +0 -1
  324. package/dist/components/ibcsRuleSet.js +0 -1
  325. package/dist/components/scaling.js +0 -1
  326. package/dist/components/withInheritedProps.js +0 -1
@@ -1 +1 @@
1
- import{p as e,B as a,c as t,w as i,N as r,a as l,b as n}from"./p-B_d-jp99.js";export{s as setNonce}from"./p-B_d-jp99.js";import{g as o}from"./p-DQuL1Twl.js";var d=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const t=a.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{a.isDev&&!a.isTesting&&t("Running in development mode."),a.cloneNodeFix&&d(l.prototype);const s=a.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,n=import.meta.url,o=a.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(o.resourcesUrl=new URL(".",n).href),e(o)})().then((async e=>(await o(),n(JSON.parse('[["p-3465fcdc",[[257,"bn-grid",{"chartTitle":[1,"chart-title"],"rowHeaders":[1,"row-headers"],"columnHeaders":[1,"column-headers"],"showRowHeaders":[1,"show-row-headers"],"showColumnHeaders":[1,"show-column-headers"],"showBorders":[1,"show-borders"],"rowHeaderWidth":[1,"row-header-width"],"cellGap":[1,"cell-gap"],"gridConfig":[32]},null,{"rowHeaders":[{"validateRowHeaders":0}],"columnHeaders":[{"validateColumnHeaders":0}],"showRowHeaders":[{"validateShowRowHeaders":0}],"showColumnHeaders":[{"validateShowColumnHeaders":0}],"showBorders":[{"validateShowBorders":0}]}]]],["p-d724ab88",[[1,"bn-image",{"source":[1]}]]],["p-67746414",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-6b469808",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-efd3b67a",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-19f49fbc",[[257,"bn-tree",{"edges":[1],"direction":[1],"levelSpacing":[2,"level-spacing"],"nodeSpacing":[2,"node-spacing"],"edgeStyle":[1,"edge-style"],"showOperators":[1,"show-operators"],"treeConfig":[32],"layout":[32],"nodeRects":[32],"svgWidth":[32],"svgHeight":[32]},null,{"edges":[{"validateEdgesProp":0}],"direction":[{"validateDirection":0}],"levelSpacing":[{"validateLevelSpacing":0}],"nodeSpacing":[{"validateNodeSpacing":0}],"edgeStyle":[{"validateEdgeStyle":0}],"showOperators":[{"validateShowOperators":0}]}]]],["p-ff659485",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-86ca2d5e",[[257,"bn-layout-page",{"styles":[1],"selectedStyle":[1,"selected-style"],"messageText":[1,"message-text"],"messageImage":[1,"message-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"pageFormat":[1,"page-format"],"pageOrientation":[1,"page-orientation"],"pageNumber":[1,"page-number"],"footerText":[1,"footer-text"],"footerDisplayPageNumber":[4,"footer-display-page-number"],"pageLayout":[1,"page-layout"],"pageCustomTemplate":[1,"page-custom-template"],"pageGridGap":[1,"page-grid-gap"],"pageFitToContent":[4,"page-fit-to-content"],"getNumberOfSlot":[64]}],[257,"bn-layout-card",{"styles":[1],"selectedStyle":[1,"selected-style"],"titleImage":[1,"title-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"footerText":[1,"footer-text"],"cardLayout":[1,"card-layout"],"cardCustomTemplate":[1,"card-custom-template"],"cardGridGap":[1,"card-grid-gap"],"cardFitToContent":[4,"card-fit-to-content"],"cardShowBorder":[4,"card-show-border"],"getNumberOfSlot":[64]}],[1,"bn-chart-structure",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"measureUnit":[1,"measure-unit"],"stack":[1],"scale":[1],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}]}],[1,"bn-chart-time",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"syncSpaceLeft":[2,"sync-space-left"],"limit":[2],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"dateInterval":[1,"date-interval"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stack":[1],"scale":[1],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"lineFullWidth":[1,"line-full-width"],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"showOverlayAvg":[1,"show-overlay-avg"],"showOverlayMedian":[1,"show-overlay-median"],"measureUnit":[1,"measure-unit"],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"syncSpaceLeft":[{"validateLeftSync":0}],"limit":[{"validateLimit":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"dateInterval":[{"validateDateInterval":0}],"chartMode":[{"validateChartMode":0}],"maxBars":[{"validateMaxBars":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}],"axisLabelsMode":[{"validateAxisLabelsMode":0}],"lineFullWidth":[{"validateLineFullWidth":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showOverlayAvg":[{"validateShowOverlayAvg":0}],"showOverlayMedian":[{"validateShowOverlayMedian":0}]}],[1,"bn-table",{"scale":[1],"tableTitle":[1,"table-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"barColumnWidth":[1,"bar-column-width"],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"dataFormat":[1,"data-format"],"grouped":[1],"showMeasureScale":[1,"show-measure-scale"],"showGroupTitle":[1,"show-group-title"],"type":[1],"limit":[2],"thereof":[1],"partof":[1],"order":[1],"orderDirection":[1,"order-direction"],"measureType":[1,"measure-type"],"measureScale":[1,"measure-scale"],"dataFormatDigitsDecimal":[2,"data-format-digits-decimal"],"dataFormatDigitsPercent":[2,"data-format-digits-percent"],"categoryWidth":[1,"category-width"],"columnthereof":[1],"tableAttributes":[1,"attributes"],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scale":[{"validateScaling":0}],"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"barColumns":[{"validateBarColumns":0}],"barColumnWidth":[{"validateBarColumnWidth":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"dataFormat":[{"validateDataFormat":0}],"grouped":[{"validateGrouped":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showGroupTitle":[{"validateShowGroupTitle":0}],"type":[{"validateType":0}],"limit":[{"validateLimit":0}],"thereof":[{"validateThereOf":0}],"partof":[{"validatePartOf":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"measureType":[{"validateMeasureType":0}],"measureScale":[{"validateMeasureScale":0}],"dataFormatDigitsDecimal":[{"validateDataFormatDigitsDecimal":0}],"dataFormatDigitsPercent":[{"validateDateFormatDigitsPercent":0}],"categoryWidth":[{"validateCategoryWidth":0}],"columnthereof":[{"validateColumnThereOf":0}],"tableAttributes":[{"validateTableAttributes":0}]}],[1,"bn-asset",{"name":[1]}],[0,"bn-component-style",{"name":[1]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4],"raw":[4],"interval":[2]},null,{"name":[{"nameUpdated":0}],"interval":[{"onIntervalChange":0}]}],[0,"bn-datasource",{"name":[1],"raw":[4],"interval":[2]},null,{"interval":[{"onIntervalChange":0}]}],[0,"bn-scaling-group",{"name":[1],"value":[2]},null,{"name":[{"onNameChange":0}],"value":[{"onValueChange":0}]}],[257,"bn-card"],[1,"bn-message",{"text":[1025],"image":[1]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[1,"ibcs-chart-structure",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideCategories":[4,"hide-categories"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"dataFormatDigits":[16],"stackConfig":[16],"parentDimensions":[16]}],[1,"ibcs-chart-time",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideAxisLabels":[4,"hide-axis-labels"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"leftSideOffsetForHorizontalSync":[2,"left-side-offset-for-horizontal-sync"],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"dateInterval":[1,"date-interval"],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"showOverlayMedian":[4,"show-overlay-median"],"showOverlayAvg":[4,"show-overlay-avg"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stackConfig":[16],"lineFullWidth":[4,"line-full-width"],"containerWidth":[2,"container-width"],"dataFormatDigits":[16],"parentDimensions":[16]}],[1,"ibcs-table",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"tableTitle":[1,"table-title"],"scenarios":[16],"scenariosDataFormat":[1,"scenarios-data-format"],"grouped":[4],"limit":[2],"showGroupTitle":[4,"show-group-title"],"thereof":[16],"partof":[16],"order":[16],"categorythereof":[16],"attributeColumns":[16],"type":[1],"categoryWidth":[1,"category-width"],"dataFormatDigits":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"measureType":[1,"measure-type"],"filter":[1],"barColumns":[16],"barColumnMaxWidth":[2,"bar-column-max-width"],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}],[1,"bn-title",{"businessUnit":[1,"business-unit"],"scenarios":[1],"variances":[1],"order":[1],"orderDirection":[1,"order-direction"],"measures":[1],"dateStart":[1,"date-start"],"dateEnd":[1,"date-end"],"dateFormat":[1,"date-format"],"dateLink":[1,"date-link"]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"measures":[{"validateMeasures":0}],"dateStart":[{"validateDateStart":0}],"dateEnd":[{"validateDateEnd":0}],"dateFormat":[{"validateDateFormat":0}],"dateLink":[{"validateDateLink":0}]}],[257,"bn-body"],[1,"bn-footer",{"pageNumber":[1026,"page-number"],"text":[1025],"code":[1025],"displayPageNumber":[4,"display-page-number"]}],[1,"ibcs-title",{"businessUnit":[1537,"business-unit"],"scenarios":[16],"measures":[16],"timeperiod":[16],"intervalSpanLimit":[2,"interval-span-limit"],"order":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"setBusinessUnit":[64],"setProps":[64]}]]]]'),e))));
1
+ import{p as e,B as a,c as t,w as i,N as r,a as l,b as n}from"./p-B_d-jp99.js";export{s as setNonce}from"./p-B_d-jp99.js";import{g as o}from"./p-DQuL1Twl.js";var d=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const t=a.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{a.isDev&&!a.isTesting&&t("Running in development mode."),a.cloneNodeFix&&d(l.prototype);const s=a.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,n=import.meta.url,o=a.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(o.resourcesUrl=new URL(".",n).href),e(o)})().then((async e=>(await o(),n(JSON.parse('[["p-fcb43f2c",[[1,"bn-chart-bubble",{"ruleset":[513],"chartTitle":[1,"chart-title"],"filter":[1],"x":[1],"y":[1],"size":[1],"share":[1],"compareWith":[1,"compare-with"],"level":[1],"seriesLevel":[1,"series-level"],"facet":[1],"labels":[1],"legend":[1],"aspect":[1],"limit":[2],"scale":[1],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"x":[{"validateX":0}],"y":[{"validateY":0}],"size":[{"validateSize":0}],"share":[{"validateShare":0}],"compareWith":[{"validateCompareWith":0}],"level":[{"validateLevel":0}],"seriesLevel":[{"validateSeriesLevel":0}],"facet":[{"validateFacet":0}],"labels":[{"validateLabels":0}],"legend":[{"validateLegend":0}],"aspect":[{"validateAspect":0}],"limit":[{"validateLimit":0}],"scale":[{"validateScale":0}]}]]],["p-5bfdc1e5",[[1,"bn-chart-bullet",{"ruleset":[513],"chartTitle":[1,"chart-title"],"filter":[1],"actual":[1],"target":[1],"ranges":[1],"normalize":[1],"variances":[1],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"labels":[1],"scale":[1],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"actual":[{"validateActual":0}],"target":[{"validateTarget":0}],"ranges":[{"validateRanges":0}],"normalize":[{"validateNormalize":0}],"variances":[{"validateVariances":0}],"level":[{"validateLevel":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"labels":[{"validateLabels":0}],"scale":[{"validateScale":0}]}]]],["p-0107f0cc",[[1,"bn-chart-scatter",{"ruleset":[513],"chartTitle":[1,"chart-title"],"filter":[1],"x":[1],"y":[1],"iso":[1],"level":[1],"seriesLevel":[1,"series-level"],"facet":[1],"labels":[1],"legend":[1],"aspect":[1],"limit":[2],"scale":[1],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"x":[{"validateX":0}],"y":[{"validateY":0}],"iso":[{"validateIso":0}],"level":[{"validateLevel":0}],"seriesLevel":[{"validateSeriesLevel":0}],"facet":[{"validateFacet":0}],"labels":[{"validateLabels":0}],"legend":[{"validateLegend":0}],"aspect":[{"validateAspect":0}],"limit":[{"validateLimit":0}],"scale":[{"validateScale":0}]}]]],["p-209351c9",[[257,"bn-grid",{"chartTitle":[1,"chart-title"],"rowHeaders":[1,"row-headers"],"columnHeaders":[1,"column-headers"],"showRowHeaders":[1,"show-row-headers"],"showColumnHeaders":[1,"show-column-headers"],"showBorders":[1,"show-borders"],"rowHeaderWidth":[1,"row-header-width"],"cellGap":[1,"cell-gap"],"gridConfig":[32]},null,{"rowHeaders":[{"validateRowHeaders":0}],"columnHeaders":[{"validateColumnHeaders":0}],"showRowHeaders":[{"validateShowRowHeaders":0}],"showColumnHeaders":[{"validateShowColumnHeaders":0}],"showBorders":[{"validateShowBorders":0}]}]]],["p-e96da91f",[[1,"bn-image",{"source":[1]}]]],["p-dc745c32",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-f3d1fa06",[[0,"bn-ruleset",{"name":[1]}]]],["p-6b75762d",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-5651417d",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-22d0fb7a",[[257,"bn-tree",{"edges":[1],"direction":[1],"levelSpacing":[2,"level-spacing"],"nodeSpacing":[2,"node-spacing"],"edgeStyle":[1,"edge-style"],"showOperators":[1,"show-operators"],"treeConfig":[32],"layout":[32],"nodeRects":[32],"svgWidth":[32],"svgHeight":[32]},null,{"edges":[{"validateEdgesProp":0}],"direction":[{"validateDirection":0}],"levelSpacing":[{"validateLevelSpacing":0}],"nodeSpacing":[{"validateNodeSpacing":0}],"edgeStyle":[{"validateEdgeStyle":0}],"showOperators":[{"validateShowOperators":0}]}]]],["p-7bdc0e28",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-9879c9b2",[[1,"ibcs-chart-bubble",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"x":[16],"y":[16],"size":[16],"share":[16],"compareFamily":[1,"compare-family"],"labels":[16],"legend":[16],"facet":[16],"pointLevel":[1,"point-level"],"seriesLevel":[1,"series-level"],"aspect":[2],"limit":[2],"filter":[1],"sizeAreaPerUnit":[2,"size-area-per-unit"],"styles":[16],"i18n":[16],"containerWidth":[2,"container-width"],"ruleSetConfig":[16],"errors":[16],"translate":[16]}]]],["p-2e6dc267",[[1,"ibcs-chart-bullet",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"actual":[16],"target":[16],"ranges":[16],"normalize":[1],"showVariances":[4,"show-variances"],"level":[1],"order":[16],"limit":[2],"labels":[16],"filter":[1],"styles":[16],"i18n":[16],"containerWidth":[2,"container-width"],"ruleSetConfig":[16],"errors":[16],"translate":[16]}]]],["p-485d23d7",[[1,"ibcs-chart-scatter",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"x":[16],"y":[16],"iso":[16],"labels":[16],"legend":[16],"facet":[16],"pointLevel":[1,"point-level"],"seriesLevel":[1,"series-level"],"aspect":[2],"limit":[2],"filter":[1],"styles":[16],"i18n":[16],"containerWidth":[2,"container-width"],"ruleSetConfig":[16],"errors":[16],"translate":[16]}]]],["p-a130cb43",[[257,"bn-layout-page",{"styles":[1],"selectedStyle":[1,"selected-style"],"ruleset":[1],"messageText":[1,"message-text"],"messageImage":[1,"message-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"pageFormat":[1,"page-format"],"pageOrientation":[1,"page-orientation"],"pageNumber":[1,"page-number"],"footerText":[1,"footer-text"],"footerDisplayPageNumber":[4,"footer-display-page-number"],"pageLayout":[1,"page-layout"],"pageCustomTemplate":[1,"page-custom-template"],"pageGridGap":[1,"page-grid-gap"],"pageFitToContent":[4,"page-fit-to-content"],"getNumberOfSlot":[64]}],[257,"bn-layout-card",{"styles":[1],"selectedStyle":[1,"selected-style"],"ruleset":[1],"titleImage":[1,"title-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"footerText":[1,"footer-text"],"cardLayout":[1,"card-layout"],"cardCustomTemplate":[1,"card-custom-template"],"cardGridGap":[1,"card-grid-gap"],"cardFitToContent":[4,"card-fit-to-content"],"cardShowBorder":[4,"card-show-border"],"getNumberOfSlot":[64]}],[1,"bn-chart-structure",{"chartTitle":[1,"chart-title"],"ruleset":[513],"filter":[1],"scenarios":[1],"variances":[1],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"measureUnit":[1,"measure-unit"],"stack":[1],"scale":[1],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}]}],[1,"bn-chart-time",{"ruleset":[513],"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"syncSpaceLeft":[2,"sync-space-left"],"limit":[2],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"dateInterval":[1,"date-interval"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stack":[1],"scale":[1],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"lineFullWidth":[1,"line-full-width"],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"showOverlayAvg":[1,"show-overlay-avg"],"showOverlayMedian":[1,"show-overlay-median"],"measureUnit":[1,"measure-unit"],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"syncSpaceLeft":[{"validateLeftSync":0}],"limit":[{"validateLimit":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"dateInterval":[{"validateDateInterval":0}],"chartMode":[{"validateChartMode":0}],"maxBars":[{"validateMaxBars":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}],"axisLabelsMode":[{"validateAxisLabelsMode":0}],"lineFullWidth":[{"validateLineFullWidth":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showOverlayAvg":[{"validateShowOverlayAvg":0}],"showOverlayMedian":[{"validateShowOverlayMedian":0}]}],[1,"bn-table",{"scale":[1],"ruleset":[513],"sumTitle":[1,"sum-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"barColumnWidth":[1,"bar-column-width"],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"dataFormat":[1,"data-format"],"grouped":[1],"showMeasureScale":[1,"show-measure-scale"],"showGroupTitle":[1,"show-group-title"],"type":[1],"limit":[2],"thereof":[1],"partof":[1],"order":[1],"orderDirection":[1,"order-direction"],"measureType":[1,"measure-type"],"measureScale":[1,"measure-scale"],"dataFormatDigitsDecimal":[2,"data-format-digits-decimal"],"dataFormatDigitsPercent":[2,"data-format-digits-percent"],"categoryWidth":[1,"category-width"],"columnthereof":[1],"interval":[1],"tableAttributes":[1,"attributes"],"datasetName":[32],"dataVersion":[32],"datasetMeta":[32],"appliedScaleFactor":[32],"hasBlankSetnames":[32]},null,{"scale":[{"validateScaling":0}],"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"barColumns":[{"validateBarColumns":0}],"barColumnWidth":[{"validateBarColumnWidth":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"dataFormat":[{"validateDataFormat":0}],"grouped":[{"validateGrouped":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showGroupTitle":[{"validateShowGroupTitle":0}],"type":[{"validateType":0}],"limit":[{"validateLimit":0}],"thereof":[{"validateThereOf":0}],"partof":[{"validatePartOf":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"measureType":[{"validateMeasureType":0}],"measureScale":[{"validateMeasureScale":0}],"dataFormatDigitsDecimal":[{"validateDataFormatDigitsDecimal":0}],"dataFormatDigitsPercent":[{"validateDateFormatDigitsPercent":0}],"categoryWidth":[{"validateCategoryWidth":0}],"columnthereof":[{"validateColumnThereOf":0}],"interval":[{"validateInterval":0}],"tableAttributes":[{"validateTableAttributes":0}]}],[1,"bn-asset",{"name":[1]}],[0,"bn-component-style",{"name":[1]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4],"raw":[4],"interval":[2]},null,{"name":[{"nameUpdated":0}],"interval":[{"onIntervalChange":0}]}],[0,"bn-datasource",{"name":[1],"raw":[4],"interval":[2]},null,{"interval":[{"onIntervalChange":0}]}],[0,"bn-scaling-group",{"name":[1],"value":[2]},null,{"name":[{"onNameChange":0}],"value":[{"onValueChange":0}]}],[257,"bn-card"],[1,"bn-message",{"text":[1025],"image":[1]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[1,"ibcs-chart-structure",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideCategories":[4,"hide-categories"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"dataFormatDigits":[16],"stackConfig":[16],"parentDimensions":[16],"ruleSetConfig":[16]}],[1,"ibcs-chart-time",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideAxisLabels":[4,"hide-axis-labels"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"leftSideOffsetForHorizontalSync":[2,"left-side-offset-for-horizontal-sync"],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"dateInterval":[1,"date-interval"],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"showOverlayMedian":[4,"show-overlay-median"],"showOverlayAvg":[4,"show-overlay-avg"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stackConfig":[16],"lineFullWidth":[4,"line-full-width"],"containerWidth":[2,"container-width"],"dataFormatDigits":[16],"parentDimensions":[16],"ruleSetConfig":[16]}],[1,"ibcs-table",{"tableName":[1,"table-name"],"dataVersion":[2,"data-version"],"sumTitle":[1,"sum-title"],"scenarios":[16],"scenariosDataFormat":[1,"scenarios-data-format"],"grouped":[4],"limit":[2],"showGroupTitle":[4,"show-group-title"],"thereof":[16],"partof":[16],"order":[16],"categorythereof":[16],"attributeColumns":[16],"type":[1],"categoryWidth":[1,"category-width"],"dataFormatDigits":[16],"ruleSetConfig":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"measureType":[1,"measure-type"],"filter":[1],"barColumns":[16],"interval":[1],"barColumnMaxWidth":[2,"bar-column-max-width"],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}],[1,"bn-title",{"ruleset":[513],"businessUnit":[1,"business-unit"],"scenarios":[1],"variances":[1],"order":[1],"orderDirection":[1,"order-direction"],"measures":[1],"dateStart":[1,"date-start"],"dateEnd":[1,"date-end"],"dateFormat":[1,"date-format"],"dateLink":[1,"date-link"]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"measures":[{"validateMeasures":0}],"dateStart":[{"validateDateStart":0}],"dateEnd":[{"validateDateEnd":0}],"dateFormat":[{"validateDateFormat":0}],"dateLink":[{"validateDateLink":0}]}],[257,"bn-body"],[1,"bn-footer",{"pageNumber":[1026,"page-number"],"text":[1025],"code":[1025],"displayPageNumber":[4,"display-page-number"]}],[1,"ibcs-title",{"businessUnit":[1537,"business-unit"],"scenarios":[16],"measures":[16],"timeperiod":[16],"intervalSpanLimit":[2,"interval-span-limit"],"order":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"ruleSetConfig":[16],"setBusinessUnit":[64],"setProps":[64]}]]]]'),e))));
@@ -0,0 +1 @@
1
+ import{r as t,d as s,f as i,h as e,H as a,g as r}from"./p-B_d-jp99.js";import{a as n}from"./p-BqhIhYr1.js";import{w as o,a as l,g as h,p as u}from"./p-CPzF3Q2m.js";import{w as c,o as d}from"./p-CBqUr7I8.js";import{i as p,a as v,w as f,b as m,c as g}from"./p-C0Pwqx-O.js";import{w as y,a as b}from"./p-B4JfKvVT.js";import{r as x,s as w}from"./p-BZV1b5VH.js";import{f as _,c as $,d as R,e as L,p as E,t as S}from"./p-Dg9OcXAO.js";import"./p-Bdfxd_Ke.js";const A={rowGroup:0,category:1,subCategory:2},j=class{validateX(t){this.validateAxisSpec("x",t)}validateY(t){this.validateAxisSpec("y",t)}validateIso(t){this.validateObjectSpec("iso",t,null,(t=>_(t)))}validateLevel(t){const s="ERR_level",i=["auto","category","subcategory"];p(t)||i.includes(t.trim().toLowerCase())?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:`level: invalid value '${t}' — expected ${i.join("/")}; using 'auto'.`})}validateSeriesLevel(t){const s="ERR_seriesLevel",i=["auto","rowgroup","category","none"];p(t)||i.includes(t.trim().toLowerCase())?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:`series-level: invalid value '${t}' — expected ${i.join("/")}; using 'auto'.`})}validateFacet(t){this.validateObjectSpec("facet",t,null,(t=>$(t)))}validateLabels(t){this.validateObjectSpec("labels",t,null,(t=>R(t,this.labelDefaults())))}validateLegend(t){this.validateObjectSpec("legend",t,null,(t=>L(t)))}validateAspect(t){const s="ERR_aspect";p(t)||null!==this.parseAspect(t)?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:`aspect: invalid value '${t}' — expected "w:h" (e.g. "16:9"); using the default.`})}validateLimit(t){const s="ERR_limit";v(t)&&Number(t)>=0?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:`limit: invalid value '${t}' — expected a non-negative integer; using 0.`})}validateScale(t){const s="ERR_scale";if(p(t))return void this.errors.remove(s);const{mode:i,factor:e}=u(t);"factor"===i&&(void 0===e||e<=0)?this.errors.addOrReplace({id:s,type:"warning",message:`scale: invalid value '${t}' — expected none/auto or a positive number.`}):this.errors.remove(s)}constructor(s){t(this,s),this.datasetName="",this.dataVersion=0,this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this.activeErrors=new Set,this.chartTitle="",this.filter="",this.iso="",this.level="auto",this.seriesLevel="auto",this.facet="",this.labels="",this.legend="",this.aspect="16:9",this.limit=0,this._autoScaleGuard=!1,this._lastObservedWidth=0,this.translateForInner=(t,s)=>this.t(t,s),f(this),y(this),o(this,(t=>{this.datasetName=(null==t?void 0:t.startsWith("$"))?t.substring(1):t||"",this.dataVersion=this.dataVersion+1}),((t,s)=>{this.datasetMeta=s})),this.errors=b(this),this.componentStyle=m(this),this.ruleSetConfig=c(this),this.t=l(this).t}componentWillLoad(){this.validateX(this.x),this.validateY(this.y),this.validateIso(this.iso),this.validateLevel(this.level),this.validateSeriesLevel(this.seriesLevel),this.validateFacet(this.facet),this.validateLabels(this.labels),this.validateLegend(this.legend),this.validateAspect(this.aspect),this.validateLimit(this.limit),this.validateScale(this.scale)}componentDidRender(){const{mode:t}=u(this.scale);if("auto"!==t&&"empty"!==t){this._autoScaleGuard=!1;const t=h(this.element),s="WARN_overflow";return void(t.width>0&&this.element.scrollWidth>t.width+1?this.errors.addOrReplace({id:s,type:"warning",message:"Chart exceeds available space and will be cut off. Check the scale value."}):this.errors.remove(s))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const i=this.element,{width:e}=h(i);if(e<=0)return;this._lastObservedWidth=e;const a=this.componentStyle((t=>{var s;return(null===(s=t.global)||void 0===s?void 0:s.fontSizePx)||13.3333})),r=i.scrollWidth,n=this.appliedScaleFactor;if(!Number.isFinite(r)||r<=e+1)return void this.errors.remove("AUTO_scale");const o=Math.max(.3,n*(e-1)/r);Math.abs(o-n)<.01||(i.style.setProperty("--bn-font-size",a*o+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${o.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,s((()=>{this.appliedScaleFactor=o})))}componentDidLoad(){this.layoutObserver=d(this.element,(()=>{if(this._autoScaleGuard)return;const{width:t}=h(this.element);t>0&&Math.abs(t-this._lastObservedWidth)>2&&(this._lastObservedWidth=t,i(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{width:t}=h(this.element);this._lastObservedWidth=t,i(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}labelDefaults(){return{points:"auto",values:!1,max:12}}setBlockingError(t,s){null===s?(this.errors.remove(t),this.activeErrors.delete(t)):(this.errors.addOrReplace({id:t,type:"error",message:s}),this.activeErrors.add(t))}hasBlockingErrors(){return this.activeErrors.size>0}validateAxisSpec(t,s){var i;const e=`ERR_xy_json_${t}`,a=`ERR_xy_measure_${t}`,r=`WARN_xy_fields_${t}`,n="x"===t||"y"===t||"size"===t,{data:o,parseError:l}=E(s,"measure");if(l)return this.setBlockingError(e,this.t(".xy-prop-json",{prop:t})),this.setBlockingError(a,null),void this.errors.remove(r);if(this.setBlockingError(e,null),null===o)return this.setBlockingError(a,n?this.t(".xy-measure-invalid",{prop:t,measure:""}):null),void this.errors.remove(r);const h="share"===t?null:S(o),u=null!==(i=o.measure)&&void 0!==i?i:"";g(u)?this.setBlockingError(a,null):this.setBlockingError(a,this.t(".xy-measure-invalid",{prop:t,measure:u})),this.reportSpecIssues(r,t,h)}validateObjectSpec(t,s,i,e){const a=`ERR_xy_json_${t}`,r=`WARN_xy_fields_${t}`,{data:n,parseError:o}=E(s,i);if(o)return this.setBlockingError(a,this.t(".xy-prop-json",{prop:t})),void this.errors.remove(r);this.setBlockingError(a,null),null!==n?this.reportSpecIssues(r,t,e(n)):this.errors.remove(r)}reportSpecIssues(t,s,i){const e=[];null!==i&&i.invalidFields.length>0&&e.push(`invalid: ${i.invalidFields.join(", ")}`),null!==i&&i.unknownKeys.length>0&&e.push(`unknown: ${i.unknownKeys.join(", ")}`),e.length>0?this.errors.addOrReplace({id:t,type:"warning",message:`${s}: ignored sub-fields (${e.join("; ")}).`}):this.errors.remove(t)}prepareAxis(t,s){const{data:i,parseError:e}=E(s,"measure");if(e||null===i)return null;const{config:a}=S(i);return null!==a&&g(a.measure)?(void 0!==a.min&&void 0!==a.max&&a.min>=a.max?(this.errors.addOrReplace({id:`WARN_xy_domain_${t}`,type:"warning",message:`${t}: min must be smaller than max; the override is ignored.`}),a.min=void 0,a.max=void 0):this.errors.remove(`WARN_xy_domain_${t}`),a):null}prepareIso(){const{data:t,parseError:s}=E(this.iso,null);return s||null===t?null:_(t).config}prepareLabels(){const t=this.labelDefaults(),{data:s,parseError:i}=E(this.labels,null);return i||null===s?{points:t.points,values:t.values,max:t.max}:R(s,t).config}prepareLegend(){const{data:t,parseError:s}=E(this.legend,null);return s||null===t?{show:!0,position:"right"}:L(t).config}prepareFacet(){const{data:t,parseError:s}=E(this.facet,null);return s||null===t?null:$(t).config}preparePointLevel(){var t,s;const i=null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase();if("category"===i)return"category";if("subcategory"===i)return"subCategory";const e=null===(s=this.datasetMeta)||void 0===s?void 0:s.suggestedLevel;return"rowGroup"===e||"category"===e||"subCategory"===e?e:"category"}prepareSeriesLevel(t){var s;const i=null===(s=this.seriesLevel)||void 0===s?void 0:s.trim().toLowerCase();return"none"===i?null:"rowgroup"===i?"rowGroup":"category"===i||"subCategory"===t?"category":"category"===t?"rowGroup":null}validateCrossProp(t,s){const i=new Set;for(const s of t){if(void 0===s)continue;const t=x(s);null!==t&&"scenario"===t.kind&&i.add(w(t.slot))}this.setBlockingError("ERR_xy_family",i.size>1?this.t(".xy-family-mixed",{families:[...i].join(", ")}):null);const e=this.preparePointLevel(),a=this.prepareSeriesLevel(e),r=null!==s?"rowgroup"===s.level?"rowGroup":"category":null;let n=null;if(null!==a&&A[a]>=A[e]&&(n=`series '${a}' vs point '${e}'`),null!==r){const t=null!=a?a:e;A[r]>=A[t]&&(n=`facet '${r}' vs '${t}'`)}this.setBlockingError("ERR_xy_level_order",null!==n?this.t(".xy-level-order",{detail:n}):null)}parseAspect(t){const s=/^\s*(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)\s*$/.exec(null!=t?t:"");if(null===s)return null;const i=Number(s[1]),e=Number(s[2]);return i<=0||e<=0?null:i/e}prepareAspect(){var t;return null!==(t=this.parseAspect(this.aspect))&&void 0!==t?t:16/9}prepareLimit(){const t=Math.floor(Number(this.limit)||0);return t>0?t:0}i18nLocalKeys(){return["no-data","axis.in","legend.title"]}prepareI18n(){const t=new Map(this.i18nLocalKeys().map((t=>[t,this.t(".".concat(t))]))),s=new Map(n.map((t=>[t,this.t("global.".concat(t))])));return new Map([...s.entries(),...t.entries()])}prepareStyle(){const t=this.getEffectiveScaleFactor(),s=this.element.localName;return this.componentStyle((i=>{const e=i.global.fontSizePx*t;return{scaleFactors:i[s].scaleFactors,fontStyles:{font:`${e}px ${i.global.fontFamily}`,size:e,color:i.global.fontColor,background:i.global.fontBackgroundColor,leading:1.8},axisStyles:i[s].axisStyles,seriesColors:i[s].seriesColors,padding:i[s].padding}}))}getEffectiveScaleFactor(){const{mode:t,factor:s}=u(this.scale);return"factor"===t?s:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((s=>{var i,e,a,r;const n=(null===(i=s.global)||void 0===i?void 0:i.fontSizePx)||13.3333;return{"--bn-font-family":(null===(e=s.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*t+"px","--bn-font-color":(null===(a=s.global)||void 0===a?void 0:a.fontColor)||"#000000","--bn-font-background":(null===(r=s.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}getDataStructure(){const t={};for(const s of["ac","pp","fc","pl"])for(const i of[1,2,3,4])t[`${s}${i}`]={type:"number",isOptional:!0,description:""};for(const[s,i]of Object.entries(this.mappedAxes())){if(null===i)continue;const e=x(i.measure);null!==e&&("scenario"===e.kind?t[e.slot].description=`${s}: ${"label"in i&&void 0!==i.label?i.label:i.measure}`:(t[e.measure.base].description=`${s}: ${i.measure} (base)`,t[e.measure.delta].description=`${s}: ${i.measure} (delta)`))}return{[this.dataStructureName()]:Object.assign({operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!0,description:""},rowGroupIndex:{type:"number",isOptional:!0,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!0,description:""},subCategoryIndex:{type:"number",isOptional:!0,description:""}},t)}}mappedAxes(){return{x:this.prepareAxis("x",this.x),y:this.prepareAxis("y",this.y)}}dataStructureName(){return"IScatterChartDataRow"}chartTemplate(){const t=this.prepareAxis("x",this.x),s=this.prepareAxis("y",this.y),i=this.prepareFacet();if(this.validateCrossProp([null==t?void 0:t.measure,null==s?void 0:s.measure],i),this.hasBlockingErrors()||null===t||null===s)return null;const a=this.preparePointLevel(),r=this.prepareI18n(),n=this.prepareStyle(),o=h(this.element).width;return e("ibcs-chart-scatter",{tableName:this.datasetName,dataVersion:this.dataVersion,chartTitle:this.chartTitle,x:t,y:s,iso:this.prepareIso(),labels:this.prepareLabels(),legend:this.prepareLegend(),facet:i,pointLevel:a,seriesLevel:this.prepareSeriesLevel(a),aspect:this.prepareAspect(),limit:this.prepareLimit(),filter:this.filter,styles:n,i18n:r,containerWidth:o,ruleSetConfig:this.ruleSetConfig(),errors:this.errors,translate:this.translateForInner})}render(){return e(a,{key:"ed677e73aa37e238651a64cff1ca8d59b5d73f06",style:this.getFontStyles()},e("div",{key:"575065fb76228cc3d5a7a45af7009ea590437fa1",class:"container"},this.chartTemplate()))}get element(){return r(this)}static get watchers(){return{x:[{validateX:0}],y:[{validateY:0}],iso:[{validateIso:0}],level:[{validateLevel:0}],seriesLevel:[{validateSeriesLevel:0}],facet:[{validateFacet:0}],labels:[{validateLabels:0}],legend:[{validateLegend:0}],aspect:[{validateAspect:0}],limit:[{validateLimit:0}],scale:[{validateScale:0}]}}};j.style=":host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:column}";export{j as bn_chart_scatter}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as r,g as s}from"./p-B_d-jp99.js";import{e as i,w as o,b as n}from"./p-C0Pwqx-O.js";import{w as a,a as d}from"./p-B4JfKvVT.js";import"./p-BqhIhYr1.js";import"./p-BZV1b5VH.js";import"./p-Bdfxd_Ke.js";function l(e){if(!e||""===e.trim()||"[]"===e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(((e,t)=>{var r,s,i;return"string"==typeof e?{label:e,id:String(t)}:"object"==typeof e&&null!==e?{label:null!==(s=null!==(r=e.label)&&void 0!==r?r:e.name)&&void 0!==s?s:String(t),id:null!==(i=e.id)&&void 0!==i?i:String(t)}:{label:String(e),id:String(t)}})):[]}catch(e){return console.error("parseHeaders: failed to parse JSON",e),[]}}function h(e){if(!e||""===e.trim()||"[]"===e)return[];try{const t=JSON.parse(e);if(!Array.isArray(t))return["Headers must be an array"];const r=[],s=new Set;return t.forEach(((e,t)=>{"object"==typeof e&&null!==e&&void 0!==e.id&&("string"!=typeof e.id?r.push(`Header[${t}]: 'id' must be a string`):s.has(e.id)?r.push(`Header[${t}]: duplicate id '${e.id}'`):s.add(e.id),void 0!==e.label&&"string"!=typeof e.label&&r.push(`Header[${t}]: 'label' must be a string`))})),r}catch(e){return console.error("validateHeadersJson: failed to parse JSON",e),["Invalid JSON structure"]}}const u=class{validateRowHeaders(e){const t="ERR_rowHeaders",r=h(e);r.length>0?this.errors.addOrReplace({id:t,type:"error",message:`row-headers: ${r.join("; ")}`}):this.errors.remove(t),this.updateGridConfig()}validateColumnHeaders(e){const t="ERR_columnHeaders",r=h(e);r.length>0?this.errors.addOrReplace({id:t,type:"error",message:`column-headers: ${r.join("; ")}`}):this.errors.remove(t),this.updateGridConfig()}validateShowRowHeaders(e){const t="ERR_showRowHeaders";i(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:`show-row-headers: invalid value '${e}', must be 'true' or 'false'`})}validateShowColumnHeaders(e){const t="ERR_showColumnHeaders";i(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:`show-column-headers: invalid value '${e}', must be 'true' or 'false'`})}validateShowBorders(e){const t="ERR_showBorders";i(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:`show-borders: invalid value '${e}', must be 'true' or 'false'`})}constructor(t){e(this,t),this.gridConfig={rows:[],columns:[]},this.chartTitle="",this.rowHeaders="[]",this.columnHeaders="[]",this.showRowHeaders="true",this.showColumnHeaders="true",this.showBorders="true",this.rowHeaderWidth="auto",this.cellGap="0px",o(this),a(this),this.errors=d(this),this.componentStyle=n(this)}getGridStyle(){return this.componentStyle((e=>e["bn-grid"]))}componentWillLoad(){this.validateRowHeaders(this.rowHeaders),this.validateColumnHeaders(this.columnHeaders),this.validateShowRowHeaders(this.showRowHeaders),this.validateShowColumnHeaders(this.showColumnHeaders),this.validateShowBorders(this.showBorders)}updateGridConfig(){var e;this.gridConfig=(e=this.columnHeaders,{rows:l(this.rowHeaders),columns:l(e)})}shouldShowRowHeaders(){return"true"===this.showRowHeaders&&this.gridConfig.rows.length>0}shouldShowColumnHeaders(){return"true"===this.showColumnHeaders&&this.gridConfig.columns.length>0}shouldShowBorders(){return"true"===this.showBorders}getGridTemplateColumns(){const e=[];this.shouldShowRowHeaders()&&e.push(this.rowHeaderWidth);const t=this.gridConfig.columns.length||1;for(let r=0;r<t;r++)e.push("auto");return e.join(" ")}getGridTemplateRows(){const e=[];this.chartTitle&&e.push("auto"),this.shouldShowColumnHeaders()&&e.push("auto");const t=this.gridConfig.rows.length||1;for(let r=0;r<t;r++)e.push("auto");return e.join(" ")}renderTitle(){if(!this.chartTitle)return null;const e=(this.shouldShowRowHeaders()?1:0)+this.gridConfig.columns.length;return t("div",{class:"grid-title",style:{"grid-column":`1 / span ${e}`,"grid-row":"1"}},this.chartTitle)}renderColumnHeaders(){if(!this.shouldShowColumnHeaders())return null;const e=this.getGridStyle(),r=this.shouldShowBorders()?`${e.borderWidth}px solid ${e.borderColor}`:"none",s=this.shouldShowRowHeaders()?2:1,i=this.chartTitle?2:1;return this.gridConfig.columns.map(((o,n)=>{const a=n>0;return t("div",{key:`col-header-${o.id}`,class:"grid-header grid-header-col",style:{"grid-column":String(s+n),"grid-row":String(i),"border-left":a?r:"none",padding:`${e.cellPadding}px`,"padding-left":a?`${e.cellPadding+4}px`:`${e.cellPadding}px`}},o.label)}))}renderDataCells(){const e=this.getGridStyle(),r=this.shouldShowBorders()?`${e.borderWidth}px solid ${e.borderColor}`:"none",s=this.shouldShowRowHeaders()?2:1,i=(this.chartTitle?1:0)+(this.shouldShowColumnHeaders()?1:0)+1,o=[];return this.gridConfig.rows.length>0&&this.gridConfig.columns.length>0&&this.gridConfig.rows.forEach(((n,a)=>{if(this.shouldShowRowHeaders()){const s=a>0;o.push(t("div",{key:`row-header-${n.id}`,class:"grid-header grid-header-row",style:{"grid-column":"1","grid-row":String(i+a),"border-top":s?r:"none",padding:`${e.cellPadding}px`,"padding-top":s?`${e.cellPadding+4}px`:`${e.cellPadding}px`}},n.label))}this.gridConfig.columns.forEach(((d,l)=>{const h=function(e,t){return`${e.id}-${t.id}`}(n,d),u=l>0,c=a>0;o.push(t("div",{key:`cell-${h}`,class:"grid-cell",style:{"grid-column":String(s+l),"grid-row":String(i+a),"border-left":u?r:"none","border-top":c?r:"none","padding-left":u?`${e.cellPadding+4}px`:"0","padding-top":c?`${e.cellPadding+4}px`:"0"}},t("slot",{name:h})))}))})),o}getFontStyles(){return this.componentStyle((e=>{var t,r,s,i;return{"--bn-font-family":(null===(t=e.global)||void 0===t?void 0:t.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(r=e.global)||void 0===r?void 0:r.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=e.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(i=e.global)||void 0===i?void 0:i.fontBackgroundColor)||"#ffffff"}}))}render(){const e={display:"inline-grid","grid-template-columns":this.getGridTemplateColumns(),"grid-template-rows":this.getGridTemplateRows(),gap:this.cellGap};return t(r,{key:"05d4b729414b87446a98ea2f98552e8c17e3f4e1",style:this.getFontStyles()},t("div",{key:"dd2325babb734553c8661e2e18c0ab12f59e0c9f",class:"grid-container",style:e},this.renderTitle(),this.renderColumnHeaders(),this.renderDataCells()),t("slot",{key:"30cab0c8effc88704e781ff48e9295aa3cc9c954"}))}get element(){return s(this)}static get watchers(){return{rowHeaders:[{validateRowHeaders:0}],columnHeaders:[{validateColumnHeaders:0}],showRowHeaders:[{validateShowRowHeaders:0}],showColumnHeaders:[{validateShowColumnHeaders:0}],showBorders:[{validateShowBorders:0}]}}};u.style=':host{display:inline-block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.grid-container{display:inline-grid;box-sizing:border-box}.grid-title{font-weight:normal;padding-bottom:8px}.grid-header{display:flex;align-items:flex-end;box-sizing:border-box}.grid-header-row{justify-content:flex-end;padding-right:8px}.grid-header-col{white-space:nowrap;justify-content:flex-start}.grid-cell{position:relative;box-sizing:border-box}';export{u as bn_grid}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as n,g as s}from"./p-B_d-jp99.js";import{f as r,e as i,w as o,b as a}from"./p-C0Pwqx-O.js";import{w as l,a as c}from"./p-B4JfKvVT.js";import"./p-BqhIhYr1.js";import"./p-BZV1b5VH.js";import"./p-Bdfxd_Ke.js";const d=["*","/","+","-","x","÷","none"];function u(t){switch(t){case"*":case"x":return"×";case"/":case"÷":return"÷";case"+":return"+";case"-":return"−";default:return""}}function h(t,e,n){return t.find((t=>t.from===e&&t.to===n))}function f(t){return 2*(t-1)+1}function p(t){return 2*(t-1)+1}function g(t,e){const n=t.getBoundingClientRect(),s=n.left-e.left,r=n.top-e.top;return{left:s,top:r,width:n.width,height:n.height,centerX:s+n.width/2,centerY:r+n.height/2}}function v(t,e,n){switch(n){case"ltr":return e?{x:t.left+t.width,y:t.centerY}:{x:t.left,y:t.centerY};case"rtl":return e?{x:t.left,y:t.centerY}:{x:t.left+t.width,y:t.centerY};case"ttb":return e?{x:t.centerX,y:t.top+t.height}:{x:t.centerX,y:t.top};case"btt":return e?{x:t.centerX,y:t.top}:{x:t.centerX,y:t.top+t.height}}}function y(t,e,n,s,r=8){const i=-(s-1)*r/2+n*r;switch(e){case"ltr":return{x:t.left,y:t.centerY+i};case"rtl":return{x:t.left+t.width,y:t.centerY+i};case"ttb":return{x:t.centerX+i,y:t.top};case"btt":return{x:t.centerX+i,y:t.top+t.height}}}function m(t,e,n,s){switch(n){case"straight":return function(t,e){return{path:`M ${t.x} ${t.y} L ${e.x} ${e.y}`,midpoint:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}(t,e);case"curved":return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=(t.x+e.x)/2;s={x:n,y:t.y},r={x:n,y:e.y}}else{const n=(t.y+e.y)/2;s={x:t.x,y:n},r={x:e.x,y:n}}return{path:`M ${t.x} ${t.y} C ${s.x} ${s.y}, ${r.x} ${r.y}, ${e.x} ${e.y}`,midpoint:{x:.125*t.x+.375*s.x+.375*r.x+.125*e.x,y:.125*t.y+.375*s.y+.375*r.y+.125*e.y}}}(t,e,s);default:return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=t.x+.7*(e.x-t.x);s=`M ${t.x} ${t.y} L ${n} ${t.y} L ${n} ${e.y} L ${e.x} ${e.y}`,r={x:n,y:(t.y+e.y)/2}}else{const n=t.y+.7*(e.y-t.y);s=`M ${t.x} ${t.y} L ${t.x} ${n} L ${e.x} ${n} L ${e.x} ${e.y}`,r={x:(t.x+e.x)/2,y:n}}return{path:s,midpoint:r}}(t,e,s)}}function b(t,e,n,s){const r=.7;switch(s){case"ltr":{const s=t.left+t.width;return{x:s+(Math.min(e.left,n.left)-s)*r,y:t.centerY}}case"rtl":{const s=t.left,i=Math.max(e.left+e.width,n.left+n.width);return{x:i+(s-i)*r,y:t.centerY}}case"ttb":{const s=t.top+t.height,i=Math.min(e.top,n.top);return{x:t.centerX,y:s+(i-s)*r}}case"btt":{const s=t.top,i=Math.max(e.top+e.height,n.top+n.height);return{x:t.centerX,y:i+(s-i)*r}}}}function $(t,e,n){var s,r;return Object.assign({stroke:null!==(s=null==n?void 0:n.color)&&void 0!==s?s:t,strokeWidth:null!==(r=null==n?void 0:n.width)&&void 0!==r?r:e},(null==n?void 0:n.dasharray)?{strokeDasharray:n.dasharray}:{})}const x=class{validateEdgesProp(t){const e="ERR_edges",n=function(t){const e=[];if(!t||""===t.trim())return e.push("edges: value is required"),e;let n;try{n=JSON.parse(t)}catch(t){return e.push("edges: invalid JSON structure"),e}if(!Array.isArray(n))return e.push("edges: must be an array"),e;if(0===n.length)return e.push("edges: array must not be empty"),e;const s=new Set,r=new Set;n.forEach(((t,n)=>{if("object"!=typeof t||null===t)return void e.push(`edges[${n}]: must be an object`);const i=t;if("string"!=typeof i.from||""===i.from.trim()?e.push(`edges[${n}]: 'from' is required and must be a non-empty string`):s.add(i.from),"string"!=typeof i.to||""===i.to.trim()?e.push(`edges[${n}]: 'to' is required and must be a non-empty string`):(s.add(i.to),r.add(i.to)),void 0!==i.operator&&("string"==typeof i.operator&&d.includes(i.operator)||e.push(`edges[${n}]: 'operator' must be one of: ${d.join(", ")}`)),void 0!==i.label&&"string"!=typeof i.label&&e.push(`edges[${n}]: 'label' must be a string`),void 0!==i.style)if("object"!=typeof i.style||null===i.style)e.push(`edges[${n}]: 'style' must be an object`);else{const t=i.style;void 0!==t.color&&"string"!=typeof t.color&&e.push(`edges[${n}]: 'style.color' must be a string`),void 0!==t.width&&"number"!=typeof t.width&&e.push(`edges[${n}]: 'style.width' must be a number`),void 0!==t.dasharray&&"string"!=typeof t.dasharray&&e.push(`edges[${n}]: 'style.dasharray' must be a string`)}}));const i=Array.from(s).filter((t=>!r.has(t)));return 0===i.length?e.push("edges: tree has no root node (circular reference detected)"):i.length>1&&e.push(`edges: tree has multiple root nodes: ${i.join(", ")}`),e}(t);n.length>0?(this.errors.addOrReplace({id:e,type:"error",message:`edges: ${n.join("; ")}`}),this.treeConfig=null):(this.errors.remove(e),this.treeConfig=function(t){if(!t||""===t.trim())return null;try{const e=JSON.parse(t);if(!Array.isArray(e))return null;const n=e,s=function(t){const e=new Map;for(const n of t){const t=e.get(n.from)||[];t.push(n.to),e.set(n.from,t)}return e}(n),r=function(t){const e=new Set;for(const n of t)e.add(n.from),e.add(n.to);return e}(n),i=function(t,e){const n=new Set;for(const e of t)n.add(e.to);const s=Array.from(e).filter((t=>!n.has(t)));return 1===s.length?s[0]:null}(n,r);return{edges:n,adjacencyList:s,rootNode:i,allNodes:r}}catch(t){return console.error("parseTreeConfig: failed to parse tree configuration",t),null}}(t)),this.recalculateLayout()}validateDirection(t){const e="ERR_direction",n=["ltr","rtl","ttb","btt"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`direction: invalid value '${t}', must be one of: ${n.join(", ")}`}),this.recalculateLayout()}validateLevelSpacing(t){const e="ERR_levelSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`level-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateNodeSpacing(t){const e="ERR_nodeSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`node-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateEdgeStyle(t){const e="ERR_edgeStyle",n=["straight","orthogonal","curved"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`edge-style: invalid value '${t}', must be one of: ${n.join(", ")}`})}validateShowOperators(t){const e="ERR_showOperators";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-operators: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.treeConfig=null,this.layout=null,this.nodeRects=new Map,this.svgWidth=0,this.svgHeight=0,this.resizeObserver=null,this.gridContainer=null,this.direction="ltr",this.levelSpacing=60,this.nodeSpacing=20,this.edgeStyle="orthogonal",this.showOperators="true",o(this),l(this),this.errors=c(this),this.componentStyle=a(this)}getTreeStyle(){return this.componentStyle((t=>({edgeColor:t["bn-tree"].edgeColor,edgeWidth:t["bn-tree"].edgeWidth,operatorCircleRadius:t["bn-tree"].operatorCircleRadius,operatorFontSize:t.global.fontSizePx*t["bn-tree"].operatorFontSizeScale,operatorColor:t["bn-tree"].operatorColor})))}componentWillLoad(){this.validateEdgesProp(this.edges),this.validateDirection(this.direction),this.validateLevelSpacing(this.levelSpacing),this.validateNodeSpacing(this.nodeSpacing),this.validateEdgeStyle(this.edgeStyle),this.validateShowOperators(this.showOperators)}componentDidLoad(){this.setupResizeObserver(),requestAnimationFrame((()=>{this.updateNodeRects()}))}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}setupResizeObserver(){var t;this.gridContainer=null===(t=this.element.shadowRoot)||void 0===t?void 0:t.querySelector(".tree-grid"),this.gridContainer&&(this.resizeObserver=new ResizeObserver((()=>{this.updateNodeRects()})),this.resizeObserver.observe(this.gridContainer),this.element.querySelectorAll("[slot]").forEach((t=>{this.resizeObserver.observe(t)})))}recalculateLayout(){this.layout=this.treeConfig?function(t,e,n,s){if(!t.rootNode)return{positions:new Map,gridTemplateColumns:"",gridTemplateRows:"",maxLevel:0,maxIndex:0};const r=function(t){const e=new Map;if(!t.rootNode)return e;const n=[{node:t.rootNode,level:0}],s=new Set;for(;n.length>0;){const{node:r,level:i}=n.shift();if(s.has(r))continue;s.add(r),e.set(r,i);const o=t.adjacencyList.get(r)||[];for(const t of o)s.has(t)||n.push({node:t,level:i+1})}return e}(t),i=function(t){const e=new Map;if(!t.rootNode)return e;let n=0;return function s(r){const i=e.get(r);if(i)return i;const o=t.adjacencyList.get(r)||[];if(0===o.length){const t={startIndex:n,endIndex:n};return e.set(r,t),n++,t}let a=1/0,l=-1/0;for(const t of o){const e=s(t);a=Math.min(a,e.startIndex),l=Math.max(l,e.endIndex)}const c={startIndex:a,endIndex:l};return e.set(r,c),c}(t.rootNode),e}(t),o=function(t,e,n,s){var r,i;const o=new Map,a=Math.max(...Array.from(e.values()));for(const l of t.allNodes){const t=null!==(r=e.get(l))&&void 0!==r?r:0,c=null!==(i=n.get(l))&&void 0!==i?i:{startIndex:0,endIndex:0};let d,u,h;switch(s){case"ltr":d=t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"rtl":d=a-t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"ttb":u=t+1,d=c.startIndex+1,h=1;break;case"btt":u=a-t+1,d=c.startIndex+1,h=1}o.set(l,{nodeId:l,level:t,index:c.startIndex,gridColumn:d,gridRow:u,gridRowSpan:h})}return o}(t,r,i,e),a=Math.max(...Array.from(r.values())),l=Math.max(...Array.from(i.values()).map((t=>t.endIndex))),{gridTemplateColumns:c,gridTemplateRows:d}=function(t,e,n,s,r){const i=t+1,o=e+1;if("ltr"===n||"rtl"===n){const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:t.join(" "),gridTemplateRows:e.join(" ")}}{const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:e.join(" "),gridTemplateRows:t.join(" ")}}}(a,l,e,n,s);return{positions:o,gridTemplateColumns:c,gridTemplateRows:d,maxLevel:a,maxIndex:l}}(this.treeConfig,this.direction,this.levelSpacing,this.nodeSpacing):null}updateNodeRects(){if(!this.treeConfig||!this.gridContainer)return;const t=this.gridContainer.getBoundingClientRect(),e=new Map;for(const n of this.treeConfig.allNodes){const s=this.element.querySelector(`[slot="${n}"]`);s&&e.set(n,g(s,t))}this.nodeRects=e,this.svgWidth=t.width,this.svgHeight=t.height}getSlotStyle(t){if(!this.layout)return{};const e=this.layout.positions.get(t);return e?"ltr"===this.direction||"rtl"===this.direction?{"grid-column":String(f(e.gridColumn)),"grid-row":`${p(e.gridRow)} / span ${n=e.gridRowSpan,n<=1?1:2*(n-1)+1}`,"align-self":"center"}:{"grid-row":String(p(e.gridRow)),"grid-column":String(f(e.gridColumn)),"justify-self":"center"}:{};var n}renderEdges(){var t;if(!this.treeConfig||0===this.nodeRects.size)return null;const n=this.getTreeStyle(),s=[],r=[],i=new Map;for(const t of this.treeConfig.edges){const e=i.get(t.to)||[];e.push(t.from),i.set(t.to,e)}for(const t of this.treeConfig.edges){const r=this.nodeRects.get(t.from),o=this.nodeRects.get(t.to);if(!r||!o)continue;const a=v(r,!0,this.direction),l=i.get(t.to)||[];let c;if(l.length>1){const e=l.indexOf(t.from);c=y(o,this.direction,e,l.length)}else c=v(o,!1,this.direction);const{path:d}=m(a,c,this.edgeStyle,this.direction),u=$(n.edgeColor,n.edgeWidth,t.style);s.push(e("path",{key:`edge-${t.from}-${t.to}`,d,fill:"none",stroke:u.stroke,"stroke-width":u.strokeWidth,"stroke-dasharray":u.strokeDasharray}))}if("true"===this.showOperators)for(const[s,i]of this.treeConfig.adjacencyList.entries()){const o=this.nodeRects.get(s);if(o)for(let a=0;a<i.length-1;a++){const l=i[a],c=i[a+1],d=h(this.treeConfig.edges,s,l);if(!(null==d?void 0:d.operator)||"none"===d.operator)continue;const f=this.nodeRects.get(l),p=this.nodeRects.get(c);if(!f||!p)continue;const g=null!==(t=d.label)&&void 0!==t?t:u(d.operator),v=b(o,f,p,this.direction);r.push(e("g",{key:`operator-${s}-${l}`,class:"operator-group"},e("circle",{cx:v.x,cy:v.y,r:n.operatorCircleRadius,fill:"white",stroke:n.edgeColor,"stroke-width":n.edgeWidth}),e("text",{x:v.x,y:v.y,"text-anchor":"middle","dominant-baseline":"central",style:{fontSize:`${n.operatorFontSize}px`,fill:n.operatorColor,fontWeight:"bold"}},g)))}}return e("svg",{class:"edge-layer",width:this.svgWidth,height:this.svgHeight,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none"}},s,r)}renderSlots(){return this.treeConfig&&this.layout?Array.from(this.treeConfig.allNodes).map((t=>e("div",{key:t,class:"tree-node",style:this.getSlotStyle(t)},e("slot",{name:t})))):null}getFontStyles(){return this.componentStyle((t=>{var e,n,s,r;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(n=t.global)||void 0===n?void 0:n.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles();return e(n,{style:t},this.treeConfig&&this.layout?e("div",{class:"tree-container"},e("div",{class:"tree-grid",style:{display:"grid","grid-template-columns":this.layout.gridTemplateColumns,"grid-template-rows":this.layout.gridTemplateRows,position:"relative"}},this.renderEdges(),this.renderSlots())):e("div",{class:"tree-container tree-error"},e("slot",null)))}get element(){return s(this)}static get watchers(){return{edges:[{validateEdgesProp:0}],direction:[{validateDirection:0}],levelSpacing:[{validateLevelSpacing:0}],nodeSpacing:[{validateNodeSpacing:0}],edgeStyle:[{validateEdgeStyle:0}],showOperators:[{validateShowOperators:0}]}}};x.style=':host{display:inline-block;position:relative;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.tree-container{position:relative;display:inline-block}.tree-grid{position:relative;display:grid;align-items:center}.tree-node{position:relative;z-index:1;border:1px solid #404040;background:var(--bn-font-background, white)}.edge-layer{position:absolute;top:0;left:0;z-index:0;pointer-events:none;overflow:visible}.tree-error{display:flex;flex-wrap:wrap;gap:20px}';export{x as bn_tree}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as s,g as h}from"./p-B_d-jp99.js";import{g as n,b as e}from"./p-BqhIhYr1.js";import{A as r,s as a,C as o}from"./p-BZV1b5VH.js";import{C as l,F as u,S as c,I as d,a as p,b as v,c as f,P as g}from"./p-X6CxL6W-.js";import{S as m}from"./p-aakBGfzL.js";import{b as w}from"./p-Bdfxd_Ke.js";import{N as b}from"./p-DsTzlzxQ.js";class ${constructor(t,i,s,h,n,e){this.ruleSet=t,this.config=h,this.styles=n,this.availableWidth=e,this.rows=[],this.warnings=[],this.i18nMap=new Map,this.populateModel(i,s),this.normalized="target"===this.config.normalize&&this.rows.some((t=>null!==t.fraction)),null!==this.config.target&&this.rows.length>0&&!this.rows.some((t=>null!==t.target))&&this.warnings.push({code:"bullet-target-none",data:{}})}populateModel(t,i){var s,h,n;if(""===i)return;const e=this.config.level,r=this.config.order,a=this.config.actual.measure,o=null!==(h=null===(s=this.config.target)||void 0===s?void 0:s.measure)&&void 0!==h?h:null,l=[a,...null!==o?[o]:[]].map((t=>`SUM(${t}) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(", ");let u;try{u=t.exec(`SELECT ${this.createSelectString(e,r)}, ${l},\n MIN(transformOperator(operation)) as opMin, MAX(transformOperator(operation)) as opMax\n FROM ${i}\n GROUP BY ${this.createGroupByStr(e,r)}\n ORDER BY ${this.createOrderStr(e,r)}`)}catch(t){return void console.error("BulletChart: populateModel query failed",t)}let c=null!=u?u:[];this.config.limit>0&&(c=c.slice(0,this.config.limit));let d=0,p=0,v=0;for(const t of c){const i=this.readValue(t,a),s=null!==o?this.readValue(t,o):null,h="number"==typeof t.opMin?t.opMin:1,e="number"==typeof t.opMax?t.opMax:1;let r=-1===h&&-1===e?"-":"+";h!==e&&(r="+",d++);let l=null;"target"===this.config.normalize&&(null===s?null!==o&&p++:s<=0?v++:null!==i&&(i<0?v++:l=i/s)),this.rows.push({category:String(null!==(n=t.category)&&void 0!==n?n:""),actual:i,target:s,operation:r,sentiment:this.sentiment(i,s,r),fraction:l})}d>0&&this.warnings.push({code:"bullet-mixed-operation",data:{count:String(d)}}),p>0&&this.warnings.push({code:"bullet-target-missing",data:{count:String(p)}}),v>0&&this.warnings.push({code:"bullet-target-invalid",data:{count:String(v)}})}readValue(t,i){if(0===t[`${i}_cnt`])return null;const s=t[i];return"number"==typeof s&&isFinite(s)?s:null}sentiment(t,i,s){return null===t||null===i||t===i?"neu":t>i!=("-"===s)?"pos":"neg"}createSelectString(t,i){return t===r.CATEGORY&&i.hierarchy.includes(w.CATEGORYINDEX)?`${w.CATEGORYINDEX}, ${r.CATEGORY} as category`:t===r.ROWGROUP&&i.hierarchy.includes(w.ROWGROUPINDEX)?`${w.ROWGROUPINDEX}, ${r.ROWGROUP} as category`:t===r.SUBCATEGORY&&i.hierarchy.includes(w.SUBCATEGORYINDEX)?`${w.SUBCATEGORYINDEX}, ${r.SUBCATEGORY} as category`:`${t.toString()} as category`}createGroupByStr(t,i){return t===r.CATEGORY&&i.hierarchy.includes(w.CATEGORYINDEX)?`${w.CATEGORYINDEX}, ${r.CATEGORY}`:t===r.ROWGROUP&&i.hierarchy.includes(w.ROWGROUPINDEX)?`${w.ROWGROUPINDEX}, ${r.ROWGROUP}`:t===r.SUBCATEGORY&&i.hierarchy.includes(w.SUBCATEGORYINDEX)?`${w.SUBCATEGORYINDEX}, ${r.SUBCATEGORY}`:`${t.toString()}`}createOrderStr(t,i){let s=`${t.toLowerCase()}`;return i.hierarchy.length>=1&&(s=`${i.hierarchy.toString()} ${null==i?void 0:i.direction}`),s}get em(){return this.styles.fontStyles.size}fontFamily(){return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/,"")}textWidth(t,i=!1){const s=l(t,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px",fontWeight:i?"bold":"normal"}).width;return Number.isFinite(s)&&s>0?s:.6*t.length*this.em}drawText(t,i,s,h,n={}){var e,r,a;t.text(i).font({size:null!==(e=n.size)&&void 0!==e?e:this.styles.fontStyles.size,weight:n.bold?"bold":"normal",anchor:null!==(r=n.anchor)&&void 0!==r?r:"start"}).fill(null!==(a=n.color)&&void 0!==a?a:this.styles.fontStyles.color).attr({x:s,y:h,"font-family":this.fontFamily()})}setI18n(t){this.i18nMap=t}hasNoData(){return 0===this.rows.length}getWarnings(){return this.warnings}getAllocatedCanvasWidth(){return this.availableWidth}getAllocatedCanvasHeight(){return this.styles.padding.top+this.titleHeight()+this.headerHeight()+this.rows.length*this.rowBlockHeight()+this.styles.padding.bottom}titleHeight(){return""!==this.config.chartTitle?1.6*this.em:0}headerHeight(){return this.rows.length>0?1.2*this.em:0}rowBlockHeight(){const t=this.em,i=this.styles.scaleFactors.rowHeight*t;return this.normalized?i:i+this.styles.scaleFactors.tickStripHeight*t}valueLabel(t){return null===t||"none"===this.config.labels.show?"":u.number(t,"decimal",this.config.labels.decimals,0)}targetFamily(){var t,i,s;const h=null!==(i=null===(t=this.config.target)||void 0===t?void 0:t.measure)&&void 0!==i?i:"pl1";return null!==(s={10:"ac",20:"pp",30:"fc",50:"pl"}[this.ruleSet.getScenarioColorIndex(h)])&&void 0!==s?s:a(h)}actualLabel(){var t;return null!==(t=this.config.actual.label)&&void 0!==t?t:u.translateScenarioLabel(this.config.actual.measure,this.i18nMap)}targetLabel(){return null===this.config.target?"":void 0!==this.config.target.label?this.config.target.label:this.normalized?this.i18nMap.get("target")||"Target":u.translateScenarioLabel(this.config.target.measure,this.i18nMap)}toString(){const t=new c;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}draw(t){var i,s;const h=this.em,n=this.styles.scaleFactors,e=this.styles.padding,r=t.group();if(""!==this.config.chartTitle&&this.drawText(r,this.config.chartTitle,e.left,e.top+h,{bold:!0}),0===this.rows.length)return void t.group().addClass("annotations");const a=n.rowHeight*h,o=this.rowBlockHeight(),l=e.top+this.titleHeight()+this.headerHeight(),u=l+(this.rows.length-1)*o+a,c=Math.max(...this.rows.map((t=>this.textWidth(t.category,!0))),h),d=this.rows.map((t=>this.valueLabel(t.actual))),p="none"===this.config.labels.show?0:Math.max(...d.map((t=>this.textWidth(t))),0),v=e.left+c+n.labelToAxis*h,f=Math.max(10,this.availableWidth-v-e.right-p-(p>0?n.labelToBar*h:0)),g=null!==(i=this.config.actual.unit)&&void 0!==i?i:null===(s=this.config.target)||void 0===s?void 0:s.unit,m=this.i18nMap.get("axis.in")||"in",w=l-.35*h;void 0!==g&&""!==g&&this.drawText(r,`${m} ${g}`,e.left,w,{}),this.drawText(r,this.actualLabel(),v+.2*h,w,{}),this.normalized?this.drawNormalized(r,v,f,l,u,a,o,d):this.drawClassic(r,v,f,l,a,o,d),this.rows.forEach(((t,i)=>{this.drawText(r,t.category,v-n.labelToAxis*h,l+i*o+a/2+.35*h,{anchor:"end",bold:!0})})),r.line(v,l-.2*h,v,u+.2*h).stroke({color:this.styles.axisStyles.ac.stroke,width:n.axisLineWidth}),t.group().addClass("annotations")}drawNormalized(t,i,s,h,n,e,r,a){const o=this.em,l=this.styles.scaleFactors,u=1.05*Math.max(1,...this.rows.map((t=>{var i;return null!==(i=t.fraction)&&void 0!==i?i:0}))),c=t=>i+t/u*s,d=c(1),p=this.styles.barStyles.getSVGStyle(this.targetFamily()),v=t.line(d,h-.3*o,d,n+.3*o).stroke({color:p.stroke,width:l.targetLineWidth});void 0!==p.dasharray&&v.attr("stroke-dasharray",p.dasharray),this.drawText(t,this.targetLabel(),d,h-.35*o,{anchor:"middle",bold:!0}),this.rows.forEach(((s,n)=>{const u=h+n*r+e/2;if(null===s.fraction)return void this.drawValueText(t,a[n],i+l.labelToBar*o,u);const p=l.barHeight*o,v=c(s.fraction);if(t.rect(Math.max(0,v-i),p).move(i,u-p/2).fill(this.styles.barStyles.ac.fill).stroke({color:this.styles.barStyles.ac.stroke,width:this.styles.barStyles.ac.width}),this.config.showVariances&&"neu"!==s.sentiment){const i=l.varianceHeight*o,h=this.styles.varianceStyles.getSVGStyle(s.sentiment);t.rect(Math.abs(v-d),i).move(Math.min(v,d),u-i/2).fill(h.fill).stroke({color:h.stroke,width:h.width})}this.drawValueText(t,a[n],Math.max(v,d)+l.labelToBar*o,u)}))}drawClassic(t,i,s,h,n,e,r){const a=this.em,o=this.styles.scaleFactors,l=o.barHeight*a,c=this.config.ranges.length>0;this.rows.forEach(((d,p)=>{var v,f;const g=h+p*e,m=g+n/2,w=c&&null!==d.target?this.config.ranges.map((t=>t*d.target)):[],$=Math.max(null!==(v=d.actual)&&void 0!==v?v:0,null!==(f=d.target)&&void 0!==f?f:0,...w);if($<=0)return void this.drawValueText(t,r[p],i+o.labelToBar*a,m);const M=b.niceStep($,4),y=Math.ceil($/M-1e-9*M)*M,S=new b(0,y,i,i+s);let x=i;w.forEach(((i,s)=>{const h=.8*n;t.rect(Math.max(0,S.scale(i)-x),h).move(x,m-h/2).fill(this.styles.rangeColors[Math.min(s,this.styles.rangeColors.length-1)]).stroke("none"),x=S.scale(i)}));let N=i;if(null!==d.actual&&d.actual>0){const s=S.scale(d.actual);t.rect(s-i,l).move(i,m-l/2).fill(this.styles.barStyles.ac.fill).stroke({color:this.styles.barStyles.ac.stroke,width:this.styles.barStyles.ac.width}),N=s}if(null!==d.target&&d.target>0){const i=S.scale(d.target),s=o.targetTickHeight*a,n=this.styles.barStyles.getSVGStyle(this.targetFamily()),e=t.line(i,m-s/2,i,m+s/2).stroke({color:n.stroke,width:o.targetLineWidth});void 0!==n.dasharray&&e.attr("stroke-dasharray",n.dasharray),0===p&&this.drawText(t,this.targetLabel(),i,h-.35*a,{anchor:"middle"}),N=Math.max(N,i)}N=Math.max(N,x),this.drawValueText(t,r[p],N+o.labelToBar*a,m);const B=S.ticks(4),C=b.tickDecimals(B),L=g+n;for(const i of B){const s=S.scale(i);t.line(s,L,s,L+o.axisTickLength*a).stroke({color:this.styles.axisStyles.ac.stroke,width:o.axisLineWidth}),this.drawText(t,u.number(i,"decimal",C,C),s,L+o.tickStripHeight*a-.2*a,{anchor:"middle"})}}))}drawValueText(t,i,s,h){""!==i&&this.drawText(t,i,s,h+.35*this.em,{})}}class M{constructor(){this.rowHeight=1.9,this.barHeight=.66,this.varianceHeight=.4,this.targetTickHeight=1.1,this.targetLineWidth=2,this.axisLineWidth=1,this.labelToBar=.3,this.labelToAxis=.3,this.axisTickLength=.35,this.tickStripHeight=1.2}}class y{adapt(t){const i=new M;return o.isNumber(t.rowHeight)&&(i.rowHeight=t.rowHeight),o.isNumber(t.barHeight)&&(i.barHeight=t.barHeight),o.isNumber(t.varianceHeight)&&(i.varianceHeight=t.varianceHeight),o.isNumber(t.targetTickHeight)&&(i.targetTickHeight=t.targetTickHeight),o.isNumber(t.targetLineWidth)&&(i.targetLineWidth=t.targetLineWidth),o.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),o.isNumber(t.labelToBar)&&(i.labelToBar=t.labelToBar),o.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),o.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),o.isNumber(t.tickStripHeight)&&(i.tickStripHeight=t.tickStripHeight),i}default(){return new M}}class S{constructor(t,i,s,h,n,e){this.scaleFactors=t,this.fontStyles=i,this.axisStyles=s,this.barStyles=h,this.varianceStyles=n,this.padding=e,this.rangeColors=["#D9D9D9","#EFEFEF"]}}class x{constructor(t,i,s,h,n){this.scaleFactorsBulletChartAdapter=t,this.fontStyleAdapter=i,this.svgStyleGroupAdapter=s,this.svgVariancesStyleGroupAdapter=h,this.paddingAdapter=n}adapt(t){const i=this.default();return o.isExisting(t)&&(o.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsBulletChartAdapter.adapt(t.scaleFactors)),o.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),o.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),o.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),o.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),o.isExisting(t.padding)&&(i.padding=this.paddingAdapter.adapt(t.padding)),Array.isArray(t.rangeColors)&&t.rangeColors.length>0&&(i.rangeColors=t.rangeColors)),i}default(){return new S(this.scaleFactorsBulletChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingAdapter.default())}}const N=["bullet-target-missing","bullet-target-invalid","bullet-mixed-operation","bullet-target-none"],B=class{constructor(i){t(this,i),this.tableName="",this.dataVersion=0,this.chartTitle="",this.target=null,this.ranges=[],this.normalize="target",this.showVariances=!0,this.level=r.CATEGORY,this.limit=0,this.filter="",this.i18n=new Map,this.containerWidth=0,this.svgMarkup=""}getDb(){return this.stores||(this.stores=n(this.element)),this.stores.db.db}componentWillLoad(){this.rebuild()}componentWillUpdate(){this.rebuild()}rebuild(){const t=this.prepareStyle(),i=this.tableName?e(this.tableName,this.filter):"";this.chart=new $(new d(this.ruleSetConfig),this.getDb(),i,{chartTitle:this.chartTitle,actual:this.actual,target:this.target,ranges:this.ranges,normalize:this.normalize,showVariances:this.showVariances,level:this.level,order:this.order,limit:this.limit,labels:this.labels},t,this.containerWidth||0),this.chart.setI18n(this.i18n),this.svgMarkup=this.chart.hasNoData()?"":this.chart.toString(),this.syncWarnings(this.chart.getWarnings())}syncWarnings(t){if(void 0===this.errors)return;const i=new Map(t.map((t=>[t.code,t.data])));for(const t of N){const s=`WARN_${t}`;if(i.has(t)){const h=void 0!==this.translate?this.translate(`.${t}`,i.get(t)):t;this.errors.addOrReplace({id:s,type:"warning",message:h})}else this.errors.remove(s)}}prepareStyle(){return new x(new y,new p,new v(new f),new m(new f),new g).adapt(this.styles)}render(){if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const t=this.i18n.get("no-data")||"==No Data==";return i(s,null,i("p",{class:"warning"},t))}return i(s,null,i("div",{innerHTML:this.svgMarkup}))}get element(){return h(this)}};B.style=':host{position:relative;display:inline-block}.warning{font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}';export{B as ibcs_chart_bullet}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as s,g as h}from"./p-B_d-jp99.js";import{r as n,m as o,g as e,b as r}from"./p-BqhIhYr1.js";import{C as l,S as a,F as c,I as u,a as d,b as v,c as m,P as f}from"./p-X6CxL6W-.js";import{X as w,r as p,a as x,b as g,P as y,F as M,c as b,S as $}from"./p-rdqTC0_5.js";import{N as L}from"./p-DsTzlzxQ.js";import{r as k}from"./p-BZV1b5VH.js";import"./p-BWKdb9ym.js";class S{constructor(t,i){this.xScale=t,this.yScale=i}isPositiveDomain(){return this.xScale.domainMin>0&&this.yScale.domainMin>0}static autoK(t){const i=t.filter((t=>t>0)).sort(((t,i)=>t-i));if(0===i.length)return[];const s=t=>i[Math.min(i.length-1,Math.floor(t*i.length))];let h=S.ladderValues(s(.25),s(.75));if(h.length<2&&(h=S.ladderValues(i[0],i[i.length-1])),0===h.length)return[];if(1===h.length)return h;if(h.length<=4)return h;const n=[];for(let t=0;t<4;t++)n.push(h[Math.round(t*(h.length-1)/3)]);return[...new Set(n)]}static ladderValues(t,i){if(t<=0||i<t)return[];const s=[];for(let h=Math.floor(Math.log10(t))-1;h<=Math.ceil(Math.log10(i));h++)for(const n of[1,2,5]){const o=n*Math.pow(10,h);o>=t&&o<=i&&s.push(o)}return s}visibleRange(t){if(!this.isPositiveDomain()||t<=0)return null;const i=Math.max(this.xScale.domainMin,t/this.yScale.domainMax),s=Math.min(this.xScale.domainMax,t/this.yScale.domainMin);return i>=s?null:[i,s]}samples(t){const i=this.visibleRange(t);if(null===i)return null;const[s,h]=i,n=[];for(let i=0;i<64;i++){const o=s*Math.pow(h/s,i/63);n.push({x:this.xScale.scale(o),y:this.yScale.scale(t/o)})}return n}path(t){const i=this.samples(t);return null===i?null:i.map(((t,i)=>`${0===i?"M":"L"} ${t.x} ${t.y}`)).join(" ")}exitPoint(t){const i=this.visibleRange(t);if(null===i)return null;const s=i[1],h=s>=this.xScale.domainMax-1e-9*Math.abs(this.xScale.domainMax);return{x:this.xScale.scale(s),y:this.yScale.scale(t/s),edge:h?"right":"bottom"}}regionPath(t){if(!this.isPositiveDomain()||t<=0)return null;const i=this.xScale.domainMin,s=this.xScale.domainMax,h=this.yScale.domainMin,n=this.yScale.domainMax,o=this.xScale.scale(i),e=this.xScale.scale(s),r=this.yScale.scale(n),l=this.yScale.scale(h);if(t>=s*n)return null;if(t<=i*h)return`M ${o} ${r} L ${e} ${r} L ${e} ${l} L ${o} ${l} Z`;const a=this.samples(t),[c,u]=this.visibleRange(t),d=c>i,v=u>=s-1e-9*Math.abs(s),m=a.map(((t,i)=>`${0===i?"M":"L"} ${t.x} ${t.y}`));return v||m.push(`L ${e} ${l}`),m.push(`L ${e} ${r}`),d||m.push(`L ${o} ${r}`),m.push("Z"),m.join(" ")}}class T{constructor(t,i,s,h,n,o){var e,r;this.ruleSet=t,this.config=h,this.styles=n,this.availableWidth=o,this.warnings=[],this.canvasHeight=0,this.i18nMap=new Map;const l=new w,a=""!==s?i.exec(`SELECT * FROM ${s}`):[],c=(null!=a?a:[]).map((t=>l.adapt(t)));this.data=p(c,{pointLevel:h.pointLevel,seriesLevel:h.seriesLevel,facetLevel:null!==h.facet?"rowgroup"===h.facet.level?"rowGroup":"category":null,measures:{x:null!==(e=k(h.x.measure))&&void 0!==e?e:{kind:"scenario",slot:"ac1"},y:null!==(r=k(h.y.measure))&&void 0!==r?r:{kind:"scenario",slot:"ac2"}},domains:{x:{min:h.x.min,max:h.x.max},y:{min:h.y.min,max:h.y.max}},limit:h.limit,limitBy:"order"}),this.warnings.push(...this.data.warnings)}get em(){return this.styles.fontStyles.size}fontFamily(){return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/,"")}textWidth(t,i=!1){const s=l(t,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px",fontWeight:i?"bold":"normal"}).width;return Number.isFinite(s)&&s>0?s:.6*t.length*this.em}drawText(t,i,s,h,n={}){var o,e,r;t.text(i).font({size:null!==(o=n.size)&&void 0!==o?o:this.styles.fontStyles.size,weight:n.bold?"bold":"normal",anchor:null!==(e=n.anchor)&&void 0!==e?e:"start"}).fill(null!==(r=n.color)&&void 0!==r?r:this.styles.fontStyles.color).attr({x:s,y:h,"font-family":this.fontFamily()})}hasNoData(){return 0===this.data.totalPoints}getWarnings(){return this.warnings}getAllocatedCanvasWidth(){return this.availableWidth}getAllocatedCanvasHeight(){return this.canvasHeight}axisTitle(t,i){var s;const h=null!==(s=t.label)&&void 0!==s?s:"";return""===h?"":void 0===t.unit||""===t.unit?h:`${h} ${i} ${t.unit}`}setI18n(t){this.i18nMap=t}legendModel(){const t=this.data.series.map((t=>{var i;return{label:""===t.key?null!==(i=this.ruleSet.getScenario("").name)&&void 0!==i?i:"Series":t.key,treatment:this.seriesTreatment(t.index)}}));return{sizeCaption:[],title:this.i18nMap.get("legend.title")||null,compareEntries:[],entries:t}}primaryColorIndex(){const t=k(this.config.x.measure);return null===t||"variance"===t.kind?10:this.ruleSet.getScenarioColorIndex(t.slot)}seriesTreatment(t){const{color:i,overflowed:s}=n(t,this.styles.seriesColors);return s&&this.addWarningOnce("xy-series-overflow",{}),o(this.primaryColorIndex(),i,"dot")}addWarningOnce(t,i){this.warnings.some((i=>i.code===t))||this.warnings.push({code:t,data:i})}toString(){const t=new a;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}draw(t){var i,s,h,n,o,e,r,l,a,c;this.warnings=this.data.warnings.slice();const u=this.em,d=this.styles.padding,v=this.i18nMap.get("axis.in")||"in",m=t.group(),f=new x(this.styles),w=this.legendModel(),p=this.config.legend.show&&w.entries.length>0,g=p?f.measure(w,this.config.legend.position):{width:0,height:0},y=null!==this.config.iso,b=y?Math.max(3*u,this.textWidth(null!==(i=this.config.iso.label)&&void 0!==i?i:"",!0)+u,this.textWidth(void 0!==this.config.iso.unit&&""!==this.config.iso.unit?`${v} ${this.config.iso.unit}`:"")+u):0,$="right"===this.config.legend.position?Math.max(p?g.width+u:0,b):b,k=""!==this.config.chartTitle?1.6*u:0,S=this.axisTitle(this.config.y,v),T=this.axisTitle(this.config.x,v),W=""!==S?1.4*u:.4*u,C=1.4*u+(""!==T?1.3*u:0);let j,N=3*u,P={x:0,y:0,width:0,height:0},D=[];const H=Math.max(1,this.data.facets.length),z=null===(s=this.config.facet)||void 0===s?void 0:s.columns,B=L.domain(null!==(n=null===(h=this.data.extents)||void 0===h?void 0:h.xMin)&&void 0!==n?n:0,null!==(e=null===(o=this.data.extents)||void 0===o?void 0:o.xMax)&&void 0!==e?e:1,{min:this.config.x.min,max:this.config.x.max}),I=L.domain(null!==(l=null===(r=this.data.extents)||void 0===r?void 0:r.yMin)&&void 0!==l?l:0,null!==(c=null===(a=this.data.extents)||void 0===a?void 0:a.yMax)&&void 0!==c?c:1,{min:this.config.y.min,max:this.config.y.max});for(let t=0;t<2;t++){const t=Math.max(10,this.availableWidth-d.left-d.right-N-$);P={x:d.left+N,y:d.top+k+W,width:t,height:t/this.config.aspect},j=new M(H,z,P,this.styles.scaleFactors.panelGap*u);const i=j.panelRect(0).height,s=Math.max(4,Math.min(8,Math.round(i/(4*u)))),h=new L(I[0],I[1],i,0);D=h.ticks(s);const n=L.tickDecimals(D);N=Math.max(...D.map((t=>this.textWidth(this.formatTick(t,n)))),u)+this.styles.scaleFactors.axisTickLength*u+.4*u}this.canvasHeight=P.y+P.height+C+("bottom"===this.config.legend.position&&p?g.height+u:0)+d.bottom,""!==this.config.chartTitle&&this.drawText(m,this.config.chartTitle,d.left,d.top+u,{bold:!0}),""!==S&&this.drawAxisTitleText(m,this.config.y,v,d.left,P.y-.6*u,"start");const _=this.buildPanels(j,B,I),A=_[0].xScale.ticks(Math.max(3,Math.min(8,Math.round(_[0].rect.width/(7*u))))),F=L.tickDecimals(A),X=L.tickDecimals(D);let E=!1;y&&(B[0]>0&&I[0]>0?E=!0:this.addWarningOnce("xy-iso-domain",{})),0===this.data.facets.length?this.drawPanel(m,_[0],{key:"",points:[]},A,D,F,X,!0,!0,E):this.data.facets.forEach(((t,i)=>{this.drawPanel(m,_[i],t,A,D,F,X,j.isOuterLeft(i),j.isOuterBottom(i),E,this.data.facets.length>1?t.key:"")})),""!==T&&this.drawAxisTitleText(m,this.config.x,v,P.x+P.width,P.y+P.height+2.6*u,"end"),p&&("right"===this.config.legend.position?f.draw(m,w,P.x+P.width+u,P.y,"right"):f.draw(m,w,P.x,P.y+P.height+C,"bottom")),t.group().addClass("annotations")}drawAxisTitleText(t,i,s,h,n,o){var e;const r=null!==(e=i.label)&&void 0!==e?e:"",l=void 0!==i.unit&&""!==i.unit?`${s} ${i.unit}`:"",a=.3*this.em;"start"===o?(this.drawText(t,r,h,n,{bold:!0}),""!==l&&this.drawText(t,l,h+this.textWidth(r,!0)+a,n,{})):""!==l?(this.drawText(t,l,h,n,{anchor:"end"}),this.drawText(t,r,h-this.textWidth(l)-a,n,{anchor:"end",bold:!0})):this.drawText(t,r,h,n,{anchor:"end",bold:!0})}buildPanels(t,i,s){const h=[];for(let n=0;n<t.count;n++){const o=t.panelRect(n),e=new L(i[0],i[1],o.x,o.x+o.width),r=new L(s[0],s[1],o.y+o.height,o.y);h.push({rect:o,xScale:e,yScale:r,frame:new g(e,r,o,this.styles)})}return h}drawPanel(t,i,s,h,n,o,e,r,l,a,c=""){var u,d;const v=t.group(),m=this.em;i.frame.drawBands(v,this.config.x.highlight,this.config.y.highlight),i.frame.drawGrid(v,n,void 0===this.config.x.refLine&&void 0===this.config.y.refLine&&i.rect.width>30*m?h:void 0),a&&null!==this.config.iso&&this.drawIso(v,i),i.frame.drawRefLines(v,this.config.x.refLine,this.config.y.refLine),i.frame.drawFrame(v);const f=this.styles.scaleFactors.pointRadius*m,w=new y(i.rect,this.styles.scaleFactors.labelToMark*m),p=[];for(const t of s.points){const s=null!==(d=null===(u=this.data.series.find((i=>i.key===t.seriesKey)))||void 0===u?void 0:u.index)&&void 0!==d?d:0,h=this.seriesTreatment(s),n=i.xScale.scale(t.x),o=i.yScale.scale(t.y);p.push({point:t,cx:n,cy:o,treatment:h});const e=v.circle(2*f).center(n,o).fill(h.fill).stroke({color:h.stroke,width:h.strokeWidth});void 0!==h.dasharray&&e.attr("stroke-dasharray",h.dasharray),w.registerMark(n,o,f)}this.drawPointLabels(v,w,p,f),i.frame.drawTickLabels(v,{ticksX:h,ticksY:n,xDecimals:o,yDecimals:e,showXLabels:l,showYLabels:r}),""!==c&&i.frame.drawPanelTitle(v,c)}drawPointLabels(t,i,s,h){const n=s.reduce(((t,i)=>t+i.cx),0)/Math.max(1,s.length),o=s.reduce(((t,i)=>t+i.cy),0)/Math.max(1,s.length),e=[...s].sort(((t,i)=>Math.hypot(i.cx-n,i.cy-o)-Math.hypot(t.cx-n,t.cy-o))),{selected:r,unknownNames:l}=i.selectCandidates(e,this.config.labels.points,this.config.labels.max,(t=>t.point.name));l.length>0&&this.addWarningOnce("xy-label-unknown",{names:l.join(", ")});const a=r.map((t=>({name:t.point.name,cx:t.cx,cy:t.cy,r:h,width:this.textWidth(t.point.name),height:1.1*this.em})));for(const s of i.place(a))this.drawText(t,s.candidate.name,s.x,s.y+.9*s.candidate.height,{})}drawIso(t,i){const s=this.config.iso,h=new S(i.xScale,i.yScale),n=this.i18nMap.get("axis.in")||"in",o=this.data.facets.flatMap((t=>t.points.map((t=>t.x*t.y)))),e="auto"===s.values?S.autoK(o):s.values;if(void 0!==s.highlight){const i=h.regionPath(s.highlight.from);null!==i&&t.path(i).fill(this.styles.axisStyles.pl.fill).stroke("none")}const r={color:this.styles.axisStyles.fc.stroke,width:this.styles.scaleFactors.gridLineWidth};let l=null;for(const i of e){const s=h.path(i);if(null===s)continue;t.path(s).fill("none").stroke(r);const n=h.exitPoint(i);null!==n&&(this.drawText(t,this.formatTick(i,0),n.x+.4*this.em,"right"===n.edge?n.y+.35*this.em:n.y-.5*this.em,{}),(null===l||n.y<l.y)&&(l=n))}if(null!==l&&void 0!==s.label&&""!==s.label){const i=void 0!==s.unit&&""!==s.unit?`${n} ${s.unit}`:"";this.drawText(t,s.label,l.x+.4*this.em,l.y-1.6*this.em,{bold:!0}),""!==i&&this.drawText(t,i,l.x+.4*this.em,l.y-.5*this.em,{})}}formatTick(t,i){return c.number(t,"decimal",i,i)}}const W=["xy-duplicate-point","xy-point-clipped","xy-variance-nodata","xy-iso-domain","xy-label-unknown","xy-series-overflow","xy-point-budget"],C=class{constructor(i){t(this,i),this.tableName="",this.dataVersion=0,this.chartTitle="",this.iso=null,this.facet=null,this.pointLevel="category",this.seriesLevel=null,this.aspect=16/9,this.limit=0,this.filter="",this.i18n=new Map,this.containerWidth=0,this.svgMarkup=""}getDb(){return this.stores||(this.stores=e(this.element)),this.stores.db.db}componentWillLoad(){this.rebuild()}componentWillUpdate(){this.rebuild()}rebuild(){const t=this.prepareStyle(),i=this.tableName?r(this.tableName,this.filter):"";this.chart=new T(new u(this.ruleSetConfig),this.getDb(),i,{chartTitle:this.chartTitle,x:this.x,y:this.y,iso:this.iso,labels:this.labels,legend:this.legend,facet:this.facet,pointLevel:this.pointLevel,seriesLevel:this.seriesLevel,aspect:this.aspect,limit:this.limit},t,this.containerWidth||0),this.chart.setI18n(this.i18n),this.svgMarkup=this.chart.hasNoData()?"":this.chart.toString(),this.syncWarnings(this.chart.getWarnings())}syncWarnings(t){if(void 0===this.errors)return;const i=new Map(t.map((t=>[t.code,t.data])));for(const t of W){const s=`WARN_${t}`;if(i.has(t)){const h=void 0!==this.translate?this.translate(`.${t}`,i.get(t)):t;this.errors.addOrReplace({id:s,type:"warning",message:h})}else this.errors.remove(s)}}prepareStyle(){return new b(new $,new d,new v(new m),new f).adapt(this.styles)}render(){if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const t=this.i18n.get("no-data")||"==No Data==";return i(s,null,i("p",{class:"warning"},t))}return i(s,null,i("div",{innerHTML:this.svgMarkup}))}get element(){return h(this)}};C.style=':host{position:relative;display:inline-block}.warning{font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}';export{C as ibcs_chart_scatter}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as e,g as o}from"./p-B_d-jp99.js";import{a as n,w as s,g as a,p as l}from"./p-CPzF3Q2m.js";import{w as r,a as d}from"./p-B4JfKvVT.js";import{w as v,b as h}from"./p-C0Pwqx-O.js";import{s as f}from"./p-BA48JiHe.js";import"./p-BqhIhYr1.js";import"./p-BZV1b5VH.js";import"./p-Bdfxd_Ke.js";const c=/\b(__proto__|globalThis)\b|\.constructor\b/,u=class{constructor(i){t(this,i),this.data={},v(this),r(this),this.errors=d(this),this.t=n(this).t,s(this,((t,i)=>{this.data=Object.assign(Object.assign({},this.data),{[t]:i})})),this.componentStyle=h(this)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"no_value",type:"warning",message:"Empty value"}):this.errors.remove("no_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const i=Number(t);isNaN(i)||i<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}evalTemplate(t){if(!t)return"";if(c.test(t))return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:"Template contains forbidden pattern"}),"";try{const i=new Proxy({data:this.data,t:this.t},{has:()=>!0,get:(t,i)=>i===Symbol.unscopables?void 0:t[i],set:()=>!0}),e=new Function("sandbox","with(sandbox){try{return`"+t+'`}catch(e){return""}}').call(i,i);return this.errors.remove("ERR_value_eval"),null!=e?String(e):""}catch(t){return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:`Template evaluation failed: ${t instanceof Error?t.message:String(t)}`}),""}}prepareStyle(){return this.componentStyle((t=>{var i,e,o,n,s,a,l,r,d,v,h,f,c,u,p,b,m,g,y,w,_,$;return{fontStyles:{font:`${null!==(n=null!==(e=null===(i=t["bn-text"])||void 0===i?void 0:i.fontSizePx)&&void 0!==e?e:null===(o=t.global)||void 0===o?void 0:o.fontSizePx)&&void 0!==n?n:13.3333}px ${null!==(r=null!==(a=null===(s=t["bn-text"])||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:null===(l=t.global)||void 0===l?void 0:l.fontFamily)&&void 0!==r?r:"'Noto Sans', sans-serif"}`,size:null!==(f=null!==(v=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==v?v:null===(h=t.global)||void 0===h?void 0:h.fontSizePx)&&void 0!==f?f:13.3333,color:null!==(b=null!==(u=null===(c=t["bn-text"])||void 0===c?void 0:c.fontColor)&&void 0!==u?u:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==b?b:"#000000",background:null!==(w=null!==(g=null===(m=t["bn-text"])||void 0===m?void 0:m.fontBackgroundColor)&&void 0!==g?g:null===(y=t.global)||void 0===y?void 0:y.fontBackgroundColor)&&void 0!==w?w:"#ffffff",leading:null!==($=null===(_=t["bn-text"])||void 0===_?void 0:_.leading)&&void 0!==$?$:1.8}}}))}applyScaling(t){const i=this.element,{mode:e,factor:o}=l(this.scale),{width:n,height:s}=a(i),r=i.scrollHeight>i.clientHeight+1?i.clientHeight:s,d=n,v=d>0&&i.scrollWidth>d+1,h=r>0&&i.scrollHeight>r+1,f=v||h;if(d<=0&&r<=0)return;if("none"===e){if(f){const t=[];v&&t.push(`w:${i.scrollWidth}>${Math.round(d)}`),h&&t.push(`h:${i.scrollHeight}>${Math.round(r)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===e){if(f){const t=[];v&&t.push(`w:${i.scrollWidth}>${Math.round(d)}`),h&&t.push(`h:${i.scrollHeight}>${Math.round(r)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${o} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}i.style.setProperty("--bn-font-size",`${t}px`);const c=i.scrollWidth,u=i.scrollHeight,p=i.clientHeight,b=u>p+1?p:s,m=d<=0||c<=d+1,g=b<=0||u<=b+1;if(m&&g)return void this.errors.remove("AUTO_scale");const y=Math.min(1,!m&&d>0?d/c:1,!g&&b>0?b/u:1);i.style.setProperty("--bn-font-size",t*y+"px"),"empty"===e?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${y.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){this.container.innerHTML=f(this.evalTemplate(this.value)),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:o,factor:n}=l(this.scale),s="factor"===o?t.size*n+"px":`${t.size}px`,a={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":s,"--bn-font-color":t.color,"--bn-font-background":t.background};return i(e,{key:"ad7a7d348a04b9de6b2bf6c41deab93208125dab",style:a},i("div",{key:"e499179166458f02cf603b22fe8fccad03b2b716"},i("span",{key:"6a7894feacdb9274a79cee391dd7e416c5aa87e6",class:"container",ref:t=>{this.container=t}})))}get element(){return o(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};u.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{u as bn_text}
@@ -0,0 +1 @@
1
+ import{r as t,d as i,f as e,h as s,H as r,g as a}from"./p-B_d-jp99.js";import{a as n}from"./p-BqhIhYr1.js";import{C as l,r as o,A as u}from"./p-BZV1b5VH.js";import{w as h,o as d}from"./p-CBqUr7I8.js";import{O as c,a as p,b as v}from"./p-Bdfxd_Ke.js";import{w as g,a as m,g as f,p as b}from"./p-CPzF3Q2m.js";import{v as _,i as y,d as w,a as O,w as R,b as A}from"./p-C0Pwqx-O.js";import{w as $,a as E}from"./p-B4JfKvVT.js";import{p as j}from"./p-Dg9OcXAO.js";const T=["measure","label","unit"];function x(t){const i=[],e=L(t,"measure",i);if(void 0===e||""===e.trim())return i.push("measure"),{config:null,unknownKeys:k(t,T),invalidFields:i};const s={measure:e.trim()};return s.label=L(t,"label",i),s.unit=L(t,"unit",i),{config:s,unknownKeys:k(t,T),invalidFields:i}}const N=["show","decimals"];function S(t,i){const e=[],s={show:i.show,decimals:i.decimals};return l.isExisting(t.show)&&("auto"===t.show||"none"===t.show?s.show=t.show:e.push("show")),l.isExisting(t.decimals)&&(l.isNumber(t.decimals)&&t.decimals>=0&&t.decimals<=4?s.decimals=Math.floor(t.decimals):e.push("decimals")),{config:s,unknownKeys:k(t,N),invalidFields:e}}function U(t){var i;const e=null!==(i=null==t?void 0:t.trim())&&void 0!==i?i:"";if(""===e||"null"===e)return{ranges:[],parseError:!1,issues:[]};let s;try{s=JSON.parse(e)}catch(t){return{ranges:[],parseError:!0,issues:[]}}if(!Array.isArray(s)||0===s.length)return{ranges:[],parseError:!0,issues:[]};if(!s.every((t=>l.isNumber(t)&&isFinite(t)&&t>0)))return{ranges:[],parseError:!0,issues:[]};const r=[];let a=s;const n=[...a].sort(((t,i)=>t-i));return n.some(((t,i)=>t!==a[i]))&&r.push("not ascending, sorted"),a=n,a.length>2&&(r.push(`${a.length} entries, first 2 kept`),a=a.slice(0,2)),{ranges:a,parseError:!1,issues:r}}function k(t,i){return Object.keys(t).filter((t=>!i.includes(t)))}function L(t,i,e){if(l.isExisting(t[i]))return l.isString(t[i])?t[i]:void e.push(i)}const z=["pl1","pp1","fc1"],W=class{validateActual(t){this.validateMeasureSpec("actual",t)}validateTarget(t){this.validateMeasureSpec("target",t)}validateRanges(t){const i="ERR_bullet_json_ranges",e="WARN_bullet_ranges",s=U(t);if(s.parseError)return this.setBlockingError(i,this.t(".bullet-prop-json",{prop:"ranges"})),void this.errors.remove(e);this.setBlockingError(i,null),s.issues.length>0?this.errors.addOrReplace({id:e,type:"warning",message:this.t(".bullet-ranges-invalid",{detail:s.issues.join("; ")})}):this.errors.remove(e)}validateNormalize(t){this.validateEnum("normalize","ERR_normalize",t,["target","none"],"target")}validateVariances(t){this.validateEnum("variances","ERR_variances",t,["auto","none"],"auto")}validateLevel(t){this.validateEnum("level","ERR_level",t,["auto","rowgroup","category","subcategory"],"auto")}validateOrder(t){const i="ERR_order",e=_(t).filter((t=>""!==t));0===e.length?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`order: invalid value(s) '${e.join(", ")}'; using the dataset order.`})}validateOrderDirection(t){const i="ERR_orderDirection";y(t)||w(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`order-direction: invalid value '${t}' — expected asc/desc; using asc.`})}validateLimit(t){const i="ERR_limit";O(t)&&Number(t)>=0?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`limit: invalid value '${t}' — expected a non-negative integer; using 0.`})}validateLabels(t){const i="ERR_bullet_json_labels",e="WARN_bullet_fields_labels",{data:s,parseError:r}=j(t,null);if(r)return this.setBlockingError(i,this.t(".bullet-prop-json",{prop:"labels"})),void this.errors.remove(e);this.setBlockingError(i,null),null!==s?this.reportSpecIssues(e,"labels",S(s,this.labelDefaults())):this.errors.remove(e)}validateScale(t){const i="ERR_scale";if(y(t))return void this.errors.remove(i);const{mode:e,factor:s}=b(t);"factor"===e&&(void 0===s||s<=0)?this.errors.addOrReplace({id:i,type:"warning",message:`scale: invalid value '${t}' — expected none/auto or a positive number.`}):this.errors.remove(i)}constructor(i){t(this,i),this.datasetName="",this.dataVersion=0,this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this.activeErrors=new Set,this.chartTitle="",this.filter="",this.actual="",this.target="",this.ranges="",this.normalize="target",this.variances="auto",this.level="auto",this.order="",this.orderDirection="",this.limit=0,this.labels="",this._autoScaleGuard=!1,this._lastScaledParentHeight=0,this.translateForInner=(t,i)=>this.t(t,i),R(this),$(this),g(this,(t=>{this.datasetName=(null==t?void 0:t.startsWith("$"))?t.substring(1):t||"",this.dataVersion=this.dataVersion+1}),((t,i)=>{this.datasetMeta=i})),this.errors=E(this),this.componentStyle=A(this),this.ruleSetConfig=h(this),this.t=m(this).t}componentWillLoad(){this.validateActual(this.actual),this.validateTarget(this.target),this.validateRanges(this.ranges),this.validateNormalize(this.normalize),this.validateVariances(this.variances),this.validateLevel(this.level),this.validateOrder(this.order),this.validateOrderDirection(this.orderDirection),this.validateLimit(this.limit),this.validateLabels(this.labels),this.validateScale(this.scale)}componentDidRender(){const{mode:t}=b(this.scale);if("auto"!==t&&"empty"!==t)return void(this._autoScaleGuard=!1);if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const e=this.element,{height:s}=f(e);if(s<=0)return;this._lastScaledParentHeight=s;const r=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333})),a=e.scrollHeight,n=this.appliedScaleFactor;if(a<=s+1)return void this.errors.remove("AUTO_scale");const l=Math.max(.3,n*(s-1)/a);Math.abs(l-n)<.01||(e.style.setProperty("--bn-font-size",r*l+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${l.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,i((()=>{this.appliedScaleFactor=l})))}componentDidLoad(){this.layoutObserver=d(this.element,(()=>{if(this._autoScaleGuard)return;const{height:t}=f(this.element);t>0&&Math.abs(t-this._lastScaledParentHeight)>2&&(this._lastScaledParentHeight=t,e(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{height:t}=f(this.element);this._lastScaledParentHeight=t,e(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}labelDefaults(){return{show:"auto",decimals:1}}setBlockingError(t,i){null===i?(this.errors.remove(t),this.activeErrors.delete(t)):(this.errors.addOrReplace({id:t,type:"error",message:i}),this.activeErrors.add(t))}hasBlockingErrors(){return this.activeErrors.size>0}validateMeasureSpec(t,i){var e;const s=`ERR_bullet_json_${t}`,r=`ERR_bullet_measure_${t}`,a=`WARN_bullet_fields_${t}`,{data:n,parseError:l}=j(i,"measure");if(l)return this.setBlockingError(s,this.t(".bullet-prop-json",{prop:t})),this.setBlockingError(r,null),void this.errors.remove(a);if(this.setBlockingError(s,null),null===n)return this.setBlockingError(r,null),void this.errors.remove(a);const u=(null!==(e=n.measure)&&void 0!==e?e:"").trim(),h=o(u);"auto"===u.toLowerCase()||null!==h&&"scenario"===h.kind?this.setBlockingError(r,null):this.setBlockingError(r,this.t(".bullet-measure-invalid",{prop:t,measure:u})),this.reportSpecIssues(a,t,x(n))}validateEnum(t,i,e,s,r){y(e)||s.includes(e.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`${t}: invalid value '${e}' — expected ${s.join("/")}; using '${r}'.`})}reportSpecIssues(t,i,e){const s=[];null!==e&&e.invalidFields.length>0&&s.push(`invalid: ${e.invalidFields.join(", ")}`),null!==e&&e.unknownKeys.length>0&&s.push(`unknown: ${e.unknownKeys.join(", ")}`),s.length>0?this.errors.addOrReplace({id:t,type:"warning",message:`${i}: ignored sub-fields (${s.join("; ")}).`}):this.errors.remove(t)}prepareActual(){var t,i,e,s,r;const{data:a,parseError:n}=j(this.actual,"measure");if(n)return null;const l=null!==a?x(a).config:null;if(null===l||"auto"===l.measure.toLowerCase()){const r=null!==l,a=null!==(i=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)&&void 0!==i?i:[],n=null!==(s=a.includes("ac1")?"ac1":null!==(e=a.find((t=>t.startsWith("ac"))))&&void 0!==e?e:a[0])&&void 0!==s?s:"ac1";return r||null===this.datasetMeta?this.errors.remove("AUTO_actual"):this.errors.addOrReplace({id:"AUTO_actual",type:"warning",message:`actual: not set, auto-detected: ${n}`}),null===l?{measure:n}:Object.assign(Object.assign({},l),{measure:n})}return this.errors.remove("AUTO_actual"),"scenario"===(null===(r=o(l.measure))||void 0===r?void 0:r.kind)?l:null}prepareTarget(){var t,i,e;const{data:s,parseError:r}=j(this.target,"measure");if(r)return null;const a=null!==s?x(s).config:null;if(null===a||"auto"===a.measure.toLowerCase()){const e=null!==a,s=null!==(i=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)&&void 0!==i?i:[],r=z.find((t=>s.includes(t)));return void 0===r?(this.errors.remove("AUTO_target"),null!==this.datasetMeta?this.errors.addOrReplace({id:"WARN_bullet_target_unavailable",type:"warning",message:this.t(".bullet-target-none")}):this.errors.remove("WARN_bullet_target_unavailable"),null):(this.errors.remove("WARN_bullet_target_unavailable"),e||null===this.datasetMeta?this.errors.remove("AUTO_target"):this.errors.addOrReplace({id:"AUTO_target",type:"warning",message:`target: not set, auto-detected: ${r}`}),null===a?{measure:r}:Object.assign(Object.assign({},a),{measure:r}))}return this.errors.remove("AUTO_target"),this.errors.remove("WARN_bullet_target_unavailable"),"scenario"===(null===(e=o(a.measure))||void 0===e?void 0:e.kind)?a:null}prepareNormalize(){var t;return"none"===(null===(t=this.normalize)||void 0===t?void 0:t.trim().toLowerCase())?"none":"target"}prepareShowVariances(){var t;return"none"!==(null===(t=this.variances)||void 0===t?void 0:t.trim().toLowerCase())}prepareLevel(){var t,i;const e=null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase();if("rowgroup"===e)return u.ROWGROUP;if("category"===e)return u.CATEGORY;if("subcategory"===e)return u.SUBCATEGORY;const s=null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedLevel;if(void 0!==s&&""!==s){const t=u[s.toUpperCase()];if(void 0!==t)return t}return u.CATEGORY}prepareOrder(){var t,i,e,s;const r="auto"===(null===(t=this.order)||void 0===t?void 0:t.trim().toLowerCase());let a;y(this.order)||r?(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedOrder)?(r?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:`order: not set, auto-detected: ${this.datasetMeta.suggestedOrder}`}),a=this.datasetMeta.suggestedOrder):(this.errors.remove("AUTO_order"),a=""):(this.errors.remove("AUTO_order"),a=this.order);const n=null!==(s=c[null===(e=this.orderDirection)||void 0===e?void 0:e.toUpperCase()])&&void 0!==s?s:c.ASC;if(y(a))return new p([v.CATEGORYINDEX],n);const l=a.split(",").map((t=>v[t.trim().toUpperCase()])).filter((t=>void 0!==t));return new p(l.length>0?l:[v.CATEGORYINDEX],n)}prepareLabels(){const t=this.labelDefaults(),{data:i,parseError:e}=j(this.labels,null);return e||null===i?{show:t.show,decimals:t.decimals}:S(i,t).config}prepareLimit(){const t=Math.floor(Number(this.limit)||0);return t>0?t:0}i18nLocalKeys(){return["no-data","target","axis.in"]}prepareI18n(){const t=new Map(this.i18nLocalKeys().map((t=>[t,this.t(".".concat(t))]))),i=new Map(n.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...t.entries()])}prepareStyle(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{const e=i.global.fontSizePx*t;return{scaleFactors:i["bn-chart-bullet"].scaleFactors,fontStyles:{font:`${e}px ${i.global.fontFamily}`,size:e,color:i.global.fontColor,background:i.global.fontBackgroundColor,leading:1.8},axisStyles:i["bn-chart-bullet"].axisStyles,barStyles:i["bn-chart-bullet"].barStyles,varianceStyles:i["bn-chart-bullet"].varianceStyles,rangeColors:i["bn-chart-bullet"].rangeColors,padding:i["bn-chart-bullet"].padding}}))}getEffectiveScaleFactor(){const{mode:t,factor:i}=b(this.scale);return"factor"===t?i:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{var e,s,r,a;const n=(null===(e=i.global)||void 0===e?void 0:e.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=i.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*t+"px","--bn-font-color":(null===(r=i.global)||void 0===r?void 0:r.fontColor)||"#000000","--bn-font-background":(null===(a=i.global)||void 0===a?void 0:a.fontBackgroundColor)||"#ffffff"}}))}getDataStructure(){const t={};for(const i of["ac","pp","fc","pl"])for(const e of[1,2,3,4])t[`${i}${e}`]={type:"number",isOptional:!0,description:""};const i={actual:this.prepareActual(),target:this.prepareTarget()};for(const[e,s]of Object.entries(i))null!==s&&void 0!==t[s.measure]&&(t[s.measure].description=`${e}: ${void 0!==s.label?s.label:s.measure}`);return{IBulletChartDataRow:Object.assign({operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!0,description:""},rowGroupIndex:{type:"number",isOptional:!0,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!0,description:""},subCategoryIndex:{type:"number",isOptional:!0,description:""}},t)}}chartTemplate(){const t=this.prepareActual(),i=this.prepareTarget(),e=U(this.ranges).ranges,r=this.prepareNormalize();return this.setBlockingError("ERR_bullet_measure_same",null!==t&&null!==i&&t.measure===i.measure?this.t(".bullet-measure-same",{measure:t.measure}):null),e.length>0&&"target"===r?this.errors.addOrReplace({id:"WARN_bullet_ranges_ignored",type:"warning",message:this.t(".bullet-ranges-ignored")}):this.errors.remove("WARN_bullet_ranges_ignored"),this.hasBlockingErrors()||null===t?null:s("ibcs-chart-bullet",{tableName:this.datasetName,dataVersion:this.dataVersion,chartTitle:this.chartTitle,actual:t,target:i,ranges:e,normalize:r,showVariances:this.prepareShowVariances(),level:this.prepareLevel(),order:this.prepareOrder(),limit:this.prepareLimit(),labels:this.prepareLabels(),filter:this.filter,styles:this.prepareStyle(),i18n:this.prepareI18n(),containerWidth:f(this.element).width,ruleSetConfig:this.ruleSetConfig(),errors:this.errors,translate:this.translateForInner})}render(){return s(r,{key:"9fd8c656471de9582652769edf49b80756575830",style:this.getFontStyles()},s("div",{key:"a6fe8d33dde8912a77a86244db092bb364c1aeaa",class:"container"},this.chartTemplate()))}get element(){return a(this)}static get watchers(){return{actual:[{validateActual:0}],target:[{validateTarget:0}],ranges:[{validateRanges:0}],normalize:[{validateNormalize:0}],variances:[{validateVariances:0}],level:[{validateLevel:0}],order:[{validateOrder:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],labels:[{validateLabels:0}],scale:[{validateScale:0}]}}};W.style=":host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:column}";export{W as bn_chart_bullet}
@@ -0,0 +1 @@
1
+ import{r as e,h as s,H as t,g as a}from"./p-B_d-jp99.js";import{w as r,a as c}from"./p-B4JfKvVT.js";const o=class{constructor(s){e(this,s),r(this),this.errors=c(this)}render(){return s(t,{key:"8bcf1eda4139c76c5e9ea6891e7a54c9c607a4ae"},s("slot",{key:"e11b18a72a93b6de23c99b02de788c73482af071"}))}get element(){return a(this)}};export{o as bn_template}
@@ -1 +1 @@
1
- import{r as t,h as s,F as r,g as e}from"./p-B_d-jp99.js";import{g as i,B as n}from"./p-Tx6omDWp.js";const o=class{constructor(s){t(this,s),this.distinctCache=new Map}connectedCallback(){this.stores=i(this.element)}internationalizationKeys(){return Promise.resolve(n)}getDistinctFromDataSource(t,s){const r=`datasource:${t}:${s}`;if(this.distinctCache.has(r))return Promise.resolve(this.distinctCache.get(r));const e=this.distinct(this.queryRows(t),s);return this.distinctCache.set(r,e),Promise.resolve(e)}getDistinctFromDataset(t,s){const r=`dataset:${t}:${s}`;if(this.distinctCache.has(r))return Promise.resolve(this.distinctCache.get(r));const e=this.distinct(this.queryRows(t),s);return this.distinctCache.set(r,e),Promise.resolve(e)}render(){return s(r,{key:"d6eb8ea68a4d507142547f4014f1dd3db58dcfd4"})}queryRows(t){try{return this.stores.db.db.exec(`SELECT * FROM \`${t}\``)}catch(t){return[]}}distinct(t,s){return[...new Set(t.map((t=>t[s])))].filter((t=>null!=t))}get element(){return e(this)}};o.style="editor-companion{display:none}";export{o as editor_companion}
1
+ import{r as t,h as s,F as r,g as e}from"./p-B_d-jp99.js";import{g as i,B as n}from"./p-BqhIhYr1.js";const o=class{constructor(s){t(this,s),this.distinctCache=new Map}connectedCallback(){this.stores=i(this.element)}internationalizationKeys(){return Promise.resolve(n)}getDistinctFromDataSource(t,s){const r=`datasource:${t}:${s}`;if(this.distinctCache.has(r))return Promise.resolve(this.distinctCache.get(r));const e=this.distinct(this.queryRows(t),s);return this.distinctCache.set(r,e),Promise.resolve(e)}getDistinctFromDataset(t,s){const r=`dataset:${t}:${s}`;if(this.distinctCache.has(r))return Promise.resolve(this.distinctCache.get(r));const e=this.distinct(this.queryRows(t),s);return this.distinctCache.set(r,e),Promise.resolve(e)}render(){return s(r,{key:"35a8fdaa36fb5f9b042d1fad904f9b54a58ba79c"})}queryRows(t){try{return this.stores.db.db.exec(`SELECT * FROM \`${t}\``)}catch(t){return[]}}distinct(t,s){return[...new Set(t.map((t=>t[s])))].filter((t=>null!=t))}get element(){return e(this)}};o.style="editor-companion{display:none}";export{o as editor_companion}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as s,g as h}from"./p-B_d-jp99.js";import{r as e,m as n,s as o,g as l,b as r}from"./p-BqhIhYr1.js";import{C as a,S as d,F as c,I as u,a as v,b as m,c as b,P as f}from"./p-X6CxL6W-.js";import{X as w,r as p,a as g,b as x,P as y,F as M,c as $,S as L}from"./p-rdqTC0_5.js";import{g as S}from"./p-BWKdb9ym.js";import{N as k}from"./p-DsTzlzxQ.js";import{r as z}from"./p-BZV1b5VH.js";class W{constructor(t,i,s,h,e){this.mode=t,this.vMax=i,this.rMaxPx=s,this.rMinPx=h,this.areaPerUnitPx2=e}static local(t,i,s){return new W("local",t,i,s,0)}static grouped(t){return new W("grouped",0,0,0,t)}radius(t){return"grouped"===this.mode?t<=0?0:Math.sqrt(this.areaPerUnitPx2*t/Math.PI):this.vMax<=0||t<=0?this.rMinPx:Math.max(this.rMinPx,this.rMaxPx*Math.sqrt(t/this.vMax))}}class C{constructor(t,i,s,h,e,n){var o,l,r,a;this.ruleSet=t,this.config=h,this.styles=e,this.availableWidth=n,this.warnings=[],this.canvasHeight=0,this.i18nMap=new Map,this.hatchPatterns=new Set,this.scaleOverflowCount=0,this.svgRoot=null;const d=new w,c=""!==s?i.exec(`SELECT * FROM ${s}`):[],u=(null!=c?c:[]).map((t=>d.adapt(t)));this.data=p(u,{pointLevel:h.pointLevel,seriesLevel:h.seriesLevel,facetLevel:null!==h.facet?"rowgroup"===h.facet.level?"rowGroup":"category":null,measures:{x:null!==(o=z(h.x.measure))&&void 0!==o?o:{kind:"scenario",slot:"ac1"},y:null!==(l=z(h.y.measure))&&void 0!==l?l:{kind:"scenario",slot:"ac2"},size:null!==(r=z(h.size.measure))&&void 0!==r?r:{kind:"scenario",slot:"ac3"},share:null!==h.share&&null!==(a=z(h.share.measure))&&void 0!==a?a:void 0},compareFamily:h.compareFamily,domains:{x:{min:h.x.min,max:h.x.max},y:{min:h.y.min,max:h.y.max}},limit:h.limit,limitBy:"size"}),this.warnings.push(...this.data.warnings)}get em(){return this.styles.fontStyles.size}fontFamily(){return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/,"")}textWidth(t,i=!1){const s=a(t,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px",fontWeight:i?"bold":"normal"}).width;return Number.isFinite(s)&&s>0?s:.6*t.length*this.em}drawText(t,i,s,h,e={}){var n,o;t.text(i).font({size:this.styles.fontStyles.size,weight:e.bold?"bold":"normal",anchor:null!==(n=e.anchor)&&void 0!==n?n:"start"}).fill(null!==(o=e.color)&&void 0!==o?o:this.styles.fontStyles.color).attr({x:s,y:h,"font-family":this.fontFamily()})}hasNoData(){return 0===this.data.totalPoints}getWarnings(){return this.warnings}getAllocatedCanvasWidth(){return this.availableWidth}getAllocatedCanvasHeight(){return this.canvasHeight}setI18n(t){this.i18nMap=t}addWarningOnce(t,i){this.warnings.some((i=>i.code===t))||this.warnings.push({code:t,data:i})}primaryColorIndex(){const t=z(this.config.size.measure);return null===t||"variance"===t.kind?10:this.ruleSet.getScenarioColorIndex(t.slot)}compareColorIndex(){return this.ruleSet.getScenarioColorIndex(`${this.config.compareFamily}1`)}seriesHue(t){const{color:i,overflowed:s}=e(t,this.styles.seriesColors);return s&&this.addWarningOnce("xy-series-overflow",{}),i}familyDisplayName(t){return this.ruleSet.getScenario(`${t}1`).group}legendModel(){var t,i;const s=[],h=null!==(i=null!==(t=this.config.size.label)&&void 0!==t?t:this.i18nMap.get("legend.size"))&&void 0!==i?i:"";""!==h&&(s.push(h),void 0!==this.config.size.unit&&""!==this.config.size.unit&&s.push(`${this.i18nMap.get("axis.in")||"in"} ${this.config.size.unit}`));const e=this.seriesHue(0),o=[];if(null!==this.config.compareFamily){const t=z(this.config.size.measure),i=null!==t&&"scenario"===t.kind?t.slot.replace(/\d+$/,""):"ac";o.push({label:this.familyDisplayName(this.config.compareFamily),treatment:n(this.compareColorIndex(),e,"bubble")}),o.push({label:this.familyDisplayName(i),treatment:n(this.primaryColorIndex(),e,"bubble")})}const l=this.data.series.map((t=>{var i;return{label:""===t.key?null!==(i=this.ruleSet.getScenario("").name)&&void 0!==i?i:"Series":t.key,treatment:n(this.primaryColorIndex(),this.seriesHue(t.index),"bubble")}}));return{sizeCaption:s,title:this.i18nMap.get("legend.title")||null,compareEntries:o,entries:l}}toString(){const t=new d;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}axisTitle(t,i){var s;const h=null!==(s=t.label)&&void 0!==s?s:"";return""===h?"":void 0===t.unit||""===t.unit?h:`${h} ${i} ${t.unit}`}draw(t){var i,s,h,e,n,o,l,r,a,d,c;this.warnings=this.data.warnings.slice(),this.hatchPatterns.clear(),this.scaleOverflowCount=0,this.svgRoot=t;const u=this.em,v=this.styles.padding,m=this.i18nMap.get("axis.in")||"in",b=t.group(),f=new g(this.styles),w=this.legendModel(),p=this.config.legend.show&&(w.entries.length>0||w.sizeCaption.length>0),x=p?f.measure(w,this.config.legend.position):{width:0,height:0},y="right"===this.config.legend.position&&p?x.width+u:0,$=""!==this.config.chartTitle?1.6*u:0,L=this.axisTitle(this.config.y,m),S=this.axisTitle(this.config.x,m),z=""!==L?1.4*u:.4*u,C=1.4*u+(""!==S?1.3*u:0);let N,T=3*u,j={x:0,y:0,width:0,height:0},H=[];const D=Math.max(1,this.data.facets.length),F=null===(i=this.config.facet)||void 0===i?void 0:i.columns,P=k.domain(null!==(h=null===(s=this.data.extents)||void 0===s?void 0:s.xMin)&&void 0!==h?h:0,null!==(n=null===(e=this.data.extents)||void 0===e?void 0:e.xMax)&&void 0!==n?n:1,{min:this.config.x.min,max:this.config.x.max}),A=k.domain(null!==(l=null===(o=this.data.extents)||void 0===o?void 0:o.yMin)&&void 0!==l?l:0,null!==(a=null===(r=this.data.extents)||void 0===r?void 0:r.yMax)&&void 0!==a?a:1,{min:this.config.y.min,max:this.config.y.max});for(let t=0;t<2;t++){const t=Math.max(10,this.availableWidth-v.left-v.right-T-y);j={x:v.left+T,y:v.top+$+z,width:t,height:t/this.config.aspect},N=new M(D,F,j,this.styles.scaleFactors.panelGap*u);const i=N.panelRect(0).height,s=Math.max(4,Math.min(8,Math.round(i/(4*u)))),h=new k(A[0],A[1],i,0);H=h.ticks(s);const e=k.tickDecimals(H);T=Math.max(...H.map((t=>this.textWidth(this.formatTick(t,e)))),u)+this.styles.scaleFactors.axisTickLength*u+.4*u}this.canvasHeight=j.y+j.height+C+("bottom"===this.config.legend.position&&p?x.height+u:0)+v.bottom,""!==this.config.chartTitle&&this.drawText(b,this.config.chartTitle,v.left,v.top+u,{bold:!0}),""!==L&&this.drawAxisTitleText(b,this.config.y,m,v.left,j.y-.6*u,"start");const B=this.buildPanels(N,P,A),I=B[0].xScale.ticks(Math.max(3,Math.min(8,Math.round(B[0].rect.width/(7*u))))),_=k.tickDecimals(I),E=k.tickDecimals(H),X=this.config.sizeAreaPerUnit>0?W.grouped(this.config.sizeAreaPerUnit):W.local(null!==(c=null===(d=this.data.extents)||void 0===d?void 0:d.sizeMax)&&void 0!==c?c:0,this.styles.scaleFactors.bubbleMaxRadius*u,this.styles.scaleFactors.bubbleMinRadius*u);0===this.data.facets.length?this.drawPanel(b,B[0],{key:"",points:[]},X,I,H,_,E,!0,!0):this.data.facets.forEach(((t,i)=>{this.drawPanel(b,B[i],t,X,I,H,_,E,N.isOuterLeft(i),N.isOuterBottom(i),this.data.facets.length>1?t.key:"")})),""!==S&&this.drawAxisTitleText(b,this.config.x,m,j.x+j.width,j.y+j.height+2.6*u,"end"),p&&("right"===this.config.legend.position?f.draw(b,w,j.x+j.width+u,j.y,"right"):f.draw(b,w,j.x,j.y+j.height+C,"bottom")),this.scaleOverflowCount>0&&this.addWarningOnce("bubble-scale-overflow",{count:String(this.scaleOverflowCount)}),t.group().addClass("annotations")}drawAxisTitleText(t,i,s,h,e,n){var o;const l=null!==(o=i.label)&&void 0!==o?o:"",r=void 0!==i.unit&&""!==i.unit?`${s} ${i.unit}`:"",a=.3*this.em;"start"===n?(this.drawText(t,l,h,e,{bold:!0}),""!==r&&this.drawText(t,r,h+this.textWidth(l,!0)+a,e,{})):""!==r?(this.drawText(t,r,h,e,{anchor:"end"}),this.drawText(t,l,h-this.textWidth(r)-a,e,{anchor:"end",bold:!0})):this.drawText(t,l,h,e,{anchor:"end",bold:!0})}buildPanels(t,i,s){const h=[];for(let e=0;e<t.count;e++){const n=t.panelRect(e),o=new k(i[0],i[1],n.x,n.x+n.width),l=new k(s[0],s[1],n.y+n.height,n.y);h.push({rect:n,xScale:o,yScale:l,frame:new x(o,l,n,this.styles)})}return h}treatmentFill(t,i,s){return!0!==t.hatch?t.fill:(this.ensureHatchPattern(i,s),`url(#xy-fc-${i})`)}ensureHatchPattern(t,i){this.hatchPatterns.has(t)||null===this.svgRoot||(this.hatchPatterns.add(t),this.svgRoot.defs().pattern(10,10,(t=>{t.rect(10,10).fill("#ffffff"),t.line(0,10,10,0).stroke({color:i,width:2}),t.line(-2.5,2.5,2.5,-2.5).stroke({color:i,width:2}),t.line(7.5,12.5,12.5,7.5).stroke({color:i,width:2})})).id(`xy-fc-${t}`))}drawPanel(t,i,s,h,e,l,r,a,d,c,u=""){var v,m,b,f;const w=t.group(),p=this.em;i.frame.drawBands(w,this.config.x.highlight,this.config.y.highlight),i.frame.drawGrid(w,l,void 0===this.config.x.refLine&&void 0===this.config.y.refLine&&i.rect.width>30*p?e:void 0),i.frame.drawRefLines(w,this.config.x.refLine,this.config.y.refLine),i.frame.drawFrame(w);const g=w.group().id("compare"),x=w.group().id("primary"),M=new y(i.rect,this.styles.scaleFactors.labelToMark*p),$=[...s.points].sort(((t,i)=>{var s,h;return(null!==(s=i.size)&&void 0!==s?s:0)-(null!==(h=t.size)&&void 0!==h?h:0)})),L=[];for(const t of $){const s=null!==(m=null===(v=this.data.series.find((i=>i.key===t.seriesKey)))||void 0===v?void 0:v.index)&&void 0!==m?m:0,e=this.seriesHue(s),l=n(this.primaryColorIndex(),e,"bubble"),r=i.xScale.scale(t.x),a=i.yScale.scale(t.y),d=h.radius(null!==(b=t.size)&&void 0!==b?b:0);if(this.config.sizeAreaPerUnit>0&&this.bubbleExceedsPanel(i.rect,r,a,d)&&this.scaleOverflowCount++,null!=t.compare){const o=n(this.compareColorIndex(),e,"bubble"),l=i.xScale.scale(t.compare.x),r=i.yScale.scale(t.compare.y),a=h.radius(null!==(f=t.compare.size)&&void 0!==f?f:0);this.drawBubble(g,l,r,a,o,s,e),M.registerMark(l,r,a),this.config.labels.values&&void 0!==t.compare.size&&a>=1.2*p&&this.drawValueLabel(g,l,r,a,t.compare.size,o.fill)}this.drawBubble(x,r,a,d,l,s,e),M.registerMark(r,a,d),void 0!==t.share&&d>0&&this.drawShareSlice(x,r,a,d,t.share,o(e)),this.config.labels.values&&void 0!==t.size&&this.drawValueLabel(x,r,a,d,t.size,!0===l.hatch?"#ffffff":l.fill),L.push({point:t,cx:r,cy:a,r:d,seriesIndex:s,hue:e,treatment:l})}this.drawNameLabels(w,M,L),i.frame.drawTickLabels(w,{ticksX:e,ticksY:l,xDecimals:r,yDecimals:a,showXLabels:c,showYLabels:d}),""!==u&&i.frame.drawPanelTitle(w,u)}bubbleExceedsPanel(t,i,s,h){return i-h<t.x||i+h>t.x+t.width||s-h<t.y||s+h>t.y+t.height}drawBubble(t,i,s,h,e,n,o){h<=0||t.circle(2*h).center(i,s).fill(this.treatmentFill(e,n,o)).stroke({color:e.stroke,width:e.strokeWidth})}drawShareSlice(t,i,s,h,e,n){if(e<=0)return;if(e>=1)return void t.circle(2*h).center(i,s).fill(n);const o=2*e*Math.PI,l=i+h*Math.sin(o),r=s-h*Math.cos(o),a=o>Math.PI?1:0;t.path(`M ${i} ${s} L ${i} ${s-h} A ${h} ${h} 0 ${a} 1 ${l} ${r} Z`).fill(n).stroke("none")}drawValueLabel(t,i,s,h,e,n){const o=c.number(e,"decimal",1,1);this.textWidth(o)+.4*this.em>2*h||this.drawText(t,o,i,s+.35*this.em,{anchor:"middle",color:S(n.startsWith("#")?n:"#ffffff")})}drawNameLabels(t,i,s){const h=[...s].sort(((t,i)=>{var s,h;return(null!==(s=i.point.size)&&void 0!==s?s:0)-(null!==(h=t.point.size)&&void 0!==h?h:0)})),{selected:e,unknownNames:n}=i.selectCandidates(h,this.config.labels.points,this.config.labels.max,(t=>t.point.name));n.length>0&&this.addWarningOnce("xy-label-unknown",{names:n.join(", ")});const o=e.map((t=>({name:t.point.name,cx:t.cx,cy:t.cy,r:t.r,width:this.textWidth(t.point.name),height:1.1*this.em})));for(const s of i.place(o))this.drawText(t,s.candidate.name,s.x,s.y+.9*s.candidate.height,{})}formatTick(t,i){return c.number(t,"decimal",i,i)}}const N=["xy-duplicate-point","xy-point-clipped","xy-variance-nodata","xy-label-unknown","xy-series-overflow","xy-point-budget","bubble-size-negative","bubble-share-range","bubble-scale-overflow"],T=class{constructor(i){t(this,i),this.tableName="",this.dataVersion=0,this.chartTitle="",this.share=null,this.compareFamily=null,this.facet=null,this.pointLevel="category",this.seriesLevel=null,this.aspect=16/9,this.limit=0,this.filter="",this.sizeAreaPerUnit=0,this.i18n=new Map,this.containerWidth=0,this.svgMarkup=""}getDb(){return this.stores||(this.stores=l(this.element)),this.stores.db.db}componentWillLoad(){this.rebuild()}componentWillUpdate(){this.rebuild()}rebuild(){const t=this.prepareStyle(),i=this.tableName?r(this.tableName,this.filter):"";this.chart=new C(new u(this.ruleSetConfig),this.getDb(),i,{chartTitle:this.chartTitle,x:this.x,y:this.y,size:this.size,share:this.share,compareFamily:this.compareFamily,labels:this.labels,legend:this.legend,facet:this.facet,pointLevel:this.pointLevel,seriesLevel:this.seriesLevel,aspect:this.aspect,limit:this.limit,sizeAreaPerUnit:this.sizeAreaPerUnit},t,this.containerWidth||0),this.chart.setI18n(this.i18n),this.svgMarkup=this.chart.hasNoData()?"":this.chart.toString(),this.syncWarnings(this.chart.getWarnings())}syncWarnings(t){if(void 0===this.errors)return;const i=new Map(t.map((t=>[t.code,t.data])));for(const t of N){const s=`WARN_${t}`;if(i.has(t)){const h=void 0!==this.translate?this.translate(`.${t}`,i.get(t)):t;this.errors.addOrReplace({id:s,type:"warning",message:h})}else this.errors.remove(s)}}prepareStyle(){return new $(new L,new v,new m(new b),new f).adapt(this.styles)}render(){if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const t=this.i18n.get("no-data")||"==No Data==";return i(s,null,i("p",{class:"warning"},t))}return i(s,null,i("div",{innerHTML:this.svgMarkup}))}get element(){return h(this)}};T.style=':host{position:relative;display:inline-block}.warning{font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}';export{T as ibcs_chart_bubble}
@@ -0,0 +1 @@
1
+ const t=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img"]),s=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]);function o(t){if(!t)return"";const s=document.createElement("div");return s.innerHTML=t,e(s),s.innerHTML}function e(o){for(const n of Array.from(o.childNodes)){if(n.nodeType!==Node.ELEMENT_NODE)continue;const r=n;if(t.has(r.tagName.toLowerCase())){for(const t of Array.from(r.attributes)){const o=t.name.toLowerCase();o.startsWith("on")||!s.has(o)?r.removeAttribute(t.name):"href"!==o&&"src"!==o||!/^\s*javascript:/i.test(t.value)?"style"===o&&/expression|javascript/i.test(t.value)&&r.removeAttribute(t.name):r.removeAttribute(t.name)}e(r)}else o.replaceChild(document.createTextNode(r.textContent||""),r)}}export{o as s}
@@ -0,0 +1 @@
1
+ import{F as t}from"./p-X6CxL6W-.js";import"./p-BZV1b5VH.js";class s{constructor(t="",s=1){this.prefix=t,this.value=s}}const e=["pl","fc","pp","ac"];function i(t){return t.replace(/\d+$/,"")}function r(t){return.299*parseInt(t.slice(1,3),16)+.587*parseInt(t.slice(3,5),16)+.114*parseInt(t.slice(5,7),16)>128?"#000000":"#ffffff"}var h;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(h||(h={}));class n{constructor(t,s,e,i,r,n,a,o){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=s,this.y=e,this.value=r,this.group=t.group().id(this.createElementID(t.toString(),i)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=a||h.Top,this.horizontalHookLocation=o||h.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(e=!0,i={percent:2,decimal:1},r=new s){if(this.isEmpty())return this;const h=this.group;let n,a="";if(!1===Number.isNaN(Number(this.value))){let s="percent",e=i.percent,h=i.percent,o=1;!1===this.isRelativeLabel&&(e=i.decimal,h=i.decimal,o=r.value,s="decimal"),n=t.number(Number(this.value),s,e,h,o),this.isVarianceLabel&&Number(this.value)>=0&&(a="+")}else n=""+this.value;const o=this.drawLabel(h,a+n);return!1===e&&(o.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,s){return this.x=t,this.y=s,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,s){const e=this.styles.fontStyles.background||"#ffffff";let i="start";const n=t.text(s);n.move(this.x,this.y);const a=n.bbox().w,o=n.bbox().h;let c=0,l=0;const u=n.x();let f=n.y();return this.horizontalHookLocation===h.Left?(i="left",c=n.x()):this.horizontalHookLocation===h.Center?(i="middle",c=n.x()-(a+2)/2):this.horizontalHookLocation===h.Right&&(i="end",c=n.x()-a),this.verticalHookLocation===h.Center?(f=n.y()-1.2*o/2,l=f+.2*o):this.verticalHookLocation===h.Top?(f-=o/4,l=f+.2*o):this.verticalHookLocation===h.Bottom&&(f-=o,l=f+.2*o),n.move(u,f),n.font({anchor:i}),null!=this.segmentFillColor?n.fill(r(this.segmentFillColor)):t.rect(a+2,.8*o).stroke(e).fill(e).opacity(.9).move(c-1,l).insertBefore(n),n}createElementID(t,s){return t+"_"+s+"_"+this.ID_SCENARIOLABEL}}const a={ac:1,pp:2,fc:3,pl:4};var o;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(o||(o={}));class c{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((s=>this.intersects(t,s)))}getOptimalPlacement(t,s,e,i,r,h,n,o){const c=a[n]||99,l=h/2;for(const h of o){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.hasCollision(n.bounds))return n}for(const h of o){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.collidesWithHigherPriority(n.bounds,c))return n}return null}calculatePlacementForDirection(t,s,e,i,r,n,a,c){let l,u,f,p,b,d;switch(c){case o.Above:l=t,u=s-n-a,f=h.Bottom,p=h.Center,b=t-e/2,d=s-n-a-i;break;case o.Below:l=t,u=s+n+a,f=h.Top,p=h.Center,b=t-e/2,d=s+n+a-i/4;break;case o.Left:l=t-n-a,u=s,f=h.Center,p=h.Right,b=t-n-a-e,d=s-.6*i;break;case o.Right:l=t+n+a,u=s,f=h.Center,p=h.Left,b=t+n+a,d=s-.6*i}return{labelX:l,labelY:u,verticalHook:f,horizontalHook:p,bounds:{x:b,y:d,width:e,height:i,pointIndex:r,preferredHook:f}}}collidesWithHigherPriority(t,s){return this.labels.some((e=>!!e.scenarioType&&((a[e.scenarioType]||99)<s&&this.intersects(t,e))))}shouldHideScenarioLabel(t,s,e,i=20){const r=a[e]||99;return!(r<=1)&&this.scenarioLabels.some((e=>{if((a[e.scenarioType]||99)>=r)return!1;const h=Math.abs(s-e.y),n=Math.abs(t-e.x);return h<i&&n<i}))}registerScenarioLabel(t,s,e){this.scenarioLabels.push({x:t,y:s,scenarioType:e})}intersects(t,s){return!(t.x+t.width<s.x||s.x+s.width<t.x||t.y+t.height<s.y||s.y+s.height<t.y)}getLabelCount(){return this.labels.length}}export{h as H,e as I,c as L,s as S,i as a,n as b,o as c,a as d,r as g}
@@ -0,0 +1 @@
1
+ import{D as t}from"./p-BqhIhYr1.js";const n=t=>{if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){const n=Object.getPrototypeOf(t);return n===Object.prototype||null===n}return"[object Object]"===Object.prototype.toString.call(t)}return!1},r=(t,n)=>n,e=(t,n)=>[...new Set([...t,...n])],a=(t,s)=>{const c=(t=>{return{arrayMergeType:"combine",arrayMerge:(n=t?t.arrayMergeType:"combine","overwrite"===n?r:e),...t};var n})(s);return t.reduce(((t,r)=>(Object.keys(r).forEach((e=>{Array.isArray(t[e])&&Array.isArray(r[e])?c&&c.arrayMerge&&(t[e]=c.arrayMerge(t[e],r[e])):t[e]=n(t[e])&&n(r[e])?a([t[e],r[e]],c):r[e]})),t)),{})};var s,c,o,u,i,l,f,p;!function(t){t.ALL="all",t.META="meta"}(s||(s={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(c||(c={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(o||(o={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu"}(u||(u={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(i||(i={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(l||(l={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(f||(f={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(p||(p={}));const b={[p.W5]:5,[p.W10]:10,[p.W15]:15,[p.W20]:20,[p.W25]:25,[p.W30]:30,[p.W40]:40,[p.W60]:60,[p.W80]:80,[p.W100]:100};var w,m,y,d,g,j;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(w||(w={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(m||(m={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(y||(y={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(d||(d={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(g||(g={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(j||(j={}));const v=100;var O;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(O||(O={}));class h{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(n){return n instanceof t&&n.isValid}}const x=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu))?$/;class A{constructor(t,n,r){this.type=t,this.base=n,this.delta=r}static parse(t){const n=x.exec(t);return null===n?null:new A(n[1],n[2],n[3])}compute(t,n){return null==t||null==n?null:"dr"===this.type?0===n?null:(t-n)/n:t-n}}function I(t){const n=t.trim();if(Object.values(o).includes(n))return{kind:"scenario",slot:n};const r=A.parse(n);return null!==r?{kind:"variance",measure:r}:null}function B(t){return t.replace(/\d+$/,"")}function C(t){return t.replace(/^[a-z]+/,"")}export{w as A,b as B,h as C,i as D,s as I,c as M,v as R,o as S,p as T,C as a,u as b,m as c,l as d,f as e,g as f,O as g,j as h,d as i,a as m,I as r,B as s}
@@ -0,0 +1 @@
1
+ import{C as a}from"./p-BZV1b5VH.js";class t{static adaptDefaultString(t){return a.isString(t)?t.trim():""}static adaptArray(t,r){const c=[];return a.isArray(t)&&t.forEach((a=>{c.push(r.adapt(a))})),c}}var r,c;!function(a){a.ASC="asc",a.DESC="desc"}(r||(r={})),function(a){a.ROWGROUP="rowGroup",a.ROWGROUPINDEX="rowGroupIndex",a.CATEGORY="category",a.CATEGORYINDEX="categoryIndex",a.SUBCATEGORY="subCategory",a.SUBCATEGORYINDEX="subCategoryIndex",a.AC1="ac1",a.AC2="ac2",a.AC3="ac3",a.AC4="ac4",a.PP1="pp1",a.PP2="pp2",a.PP3="pp3",a.PP4="pp4",a.FC1="fc1",a.FC2="fc2",a.FC3="fc3",a.FC4="fc4",a.PL1="pl1",a.PL2="pl2",a.PL3="pl3",a.PL4="pl4"}(c||(c={}));class s{constructor(a=["category"],t=r.ASC){this.hierarchy=a,this.direction=t}}class o{constructor(a){this.stringAdapter=a}adapt(a){var o;const p=t.adaptArray(a.hierarchy,this.stringAdapter),e=r[null===(o=a.direction)||void 0===o?void 0:o.toUpperCase()]||r.ASC;return new s(p.map((a=>c[a.toUpperCase()]||c.CATEGORY)),e)}default(){return new s(["category"],r.ASC)}}export{t as A,r as O,s as a,c as b,o as c}