@sisense/sdk-ui 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/ai.cjs +32 -32
  2. package/dist/ai.js +126 -125
  3. package/dist/analytics-composer/node.cjs +3 -0
  4. package/dist/analytics-composer/node.d.ts +1 -0
  5. package/dist/analytics-composer/node.js +1033 -0
  6. package/dist/analytics-composer.cjs +118 -118
  7. package/dist/analytics-composer.js +2211 -2906
  8. package/dist/derive-chart-family-B1on_xkS.cjs +170 -0
  9. package/dist/derive-chart-family-BllGhqsW.js +29469 -0
  10. package/dist/dimensions-BYqdB-Q8.cjs +1 -0
  11. package/dist/{dimensions-b8xRITJn.js → dimensions-D-Z9sitz.js} +3 -3
  12. package/dist/execute-query-CABqVn7C.cjs +1 -0
  13. package/dist/execute-query-CGLL9vXX.js +6428 -0
  14. package/dist/index.cjs +25 -26
  15. package/dist/index.js +9320 -8693
  16. package/dist/index.umd.js +389 -440
  17. package/dist/packages/sdk-ui/src/analytics-composer/index-node.d.ts +9 -0
  18. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
  19. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/common.d.ts +40 -0
  20. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/index.d.ts +2 -0
  21. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts +3 -0
  22. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts +44 -0
  23. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts +30 -0
  24. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query-to-jaql.d.ts +18 -0
  25. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query.d.ts +224 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +40 -1
  27. package/dist/packages/sdk-ui/src/calendar-heatmap-chart.d.ts +12 -0
  28. package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +3 -1
  29. package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +3 -1
  30. package/dist/packages/sdk-ui/src/chart/helpers/use-translated-data-options.d.ts +1 -1
  31. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/calendar-heatmap-chart-builder.d.ts +8 -0
  32. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/constants.d.ts +87 -0
  33. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data-options/data-options.d.ts +54 -0
  34. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data-options/index.d.ts +1 -0
  35. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data.d.ts +33 -0
  36. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/design-options.d.ts +22 -0
  37. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/highcharts-options-builder.d.ts +8 -0
  38. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/index.d.ts +1 -0
  39. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options.d.ts +12 -0
  40. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/chart-options.d.ts +9 -0
  41. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/extras-options.d.ts +9 -0
  42. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/index.d.ts +7 -0
  43. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/legend-options.d.ts +8 -0
  44. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/plot-options.d.ts +9 -0
  45. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/calendar-data-generator.d.ts +35 -0
  46. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/index.d.ts +1 -0
  47. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/series-options.d.ts +9 -0
  48. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/tooltip-options.d.ts +9 -0
  49. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap-charts-grid.d.ts +26 -0
  50. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap.d.ts +17 -0
  51. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/calendar-pagination.d.ts +30 -0
  52. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/helpers.d.ts +3 -0
  53. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/index.d.ts +1 -0
  54. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-helpers.d.ts +4 -0
  55. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/sizing-helpers.d.ts +25 -0
  56. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/view-helpers.d.ts +14 -0
  57. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/index.d.ts +4 -0
  58. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-chart-options.d.ts +55 -0
  59. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-navigation.d.ts +33 -0
  60. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/index.d.ts +2 -0
  61. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/types.d.ts +13 -0
  62. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/data-options.d.ts +5 -1
  63. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +5 -0
  64. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +3 -2
  65. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/y-axis.d.ts +28 -0
  66. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/helpers/design-options.d.ts +12 -0
  67. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highchart-options/axes.d.ts +6 -0
  68. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highcharts-options-builder.d.ts +2 -0
  69. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/line-chart-builder.d.ts +2 -0
  70. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data/index.d.ts +10 -0
  71. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data-options/index.d.ts +12 -0
  72. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/design-options/index.d.ts +18 -0
  73. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/axes.d.ts +6 -0
  74. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  75. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/polar-chart-builder.d.ts +2 -0
  76. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/area-chart-builder.d.ts +2 -0
  77. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/helpers/design-options.d.ts +12 -0
  78. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/axes.d.ts +6 -0
  79. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  80. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/labels-spacing.d.ts +8 -0
  81. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/axes.d.ts +6 -0
  82. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/labels-spacing.d.ts +9 -0
  83. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/axes.d.ts +6 -0
  84. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/labels-spacing.d.ts +9 -0
  85. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/helpers/highchart-options/stacking.d.ts +21 -0
  86. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/types.d.ts +1 -0
  87. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/types.d.ts +1 -1
  88. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data-options.d.ts +22 -0
  89. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data.d.ts +13 -0
  90. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/alerts/index.d.ts +5 -0
  91. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data/index.d.ts +15 -0
  92. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data-options/index.d.ts +32 -0
  93. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/design-options/index.d.ts +17 -0
  94. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  95. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/pie-chart-builder.d.ts +2 -0
  96. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/types.d.ts +12 -0
  97. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +9 -4
  98. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +2 -4
  99. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/use-extra-config.d.ts +2 -0
  100. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/utils.d.ts +2 -1
  101. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
  102. package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +10 -9
  103. package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +5 -0
  104. package/dist/packages/sdk-ui/src/chart-data/data-coloring/types.d.ts +6 -0
  105. package/dist/packages/sdk-ui/src/chart-data/types.d.ts +2 -1
  106. package/dist/packages/sdk-ui/src/chart-data-options/translate-data-options.d.ts +2 -1
  107. package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +19 -2
  108. package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +4 -4
  109. package/dist/packages/sdk-ui/src/chart-data-options/validate-data-options/validate-categorical-data-options.d.ts +14 -0
  110. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +155 -0
  111. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-settings.d.ts +39 -0
  112. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-transformers.d.ts +45 -0
  113. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-utils.d.ts +1 -0
  114. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/date-utils.d.ts +27 -0
  115. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/index.d.ts +3 -0
  116. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +33 -3
  117. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +4 -1
  118. package/dist/packages/sdk-ui/src/chart-options-processor/{category-chart-options.d.ts → category-chart-options/category-chart-options.d.ts} +9 -5
  119. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/funnel-chart-options.d.ts +15 -0
  120. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/pie-chart-options.d.ts +15 -0
  121. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/sunburst-chart-options.d.ts +17 -0
  122. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/treemap-chart-options.d.ts +17 -0
  123. package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +26 -10
  124. package/dist/packages/sdk-ui/src/chart-options-processor/defaults/cartesian.d.ts +4 -3
  125. package/dist/packages/sdk-ui/src/chart-options-processor/scatter-chart-options.d.ts +3 -3
  126. package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +1 -3
  127. package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +11 -12
  128. package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +19 -5
  129. package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +28 -14
  130. package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-series.d.ts +34 -6
  131. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  132. package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +1 -1
  133. package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +61 -4
  134. package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +2 -2
  135. package/dist/packages/sdk-ui/src/common/formatters/create-date-formatter.d.ts +10 -0
  136. package/dist/packages/sdk-ui/src/common/hooks/useDateFormatter.d.ts +7 -0
  137. package/dist/packages/sdk-ui/src/common/icons/double-arrow-end-icon.d.ts +6 -0
  138. package/dist/packages/sdk-ui/src/const.d.ts +2 -0
  139. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +0 -19
  140. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/index.d.ts +1 -1
  141. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +12 -1
  142. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-formatters.d.ts +18 -0
  143. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-handlers.d.ts +23 -0
  144. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-widget-transforms.d.ts +29 -0
  145. package/dist/packages/sdk-ui/src/index.d.ts +1 -0
  146. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  147. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
  148. package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +23 -0
  149. package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +2 -1
  150. package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +45 -3
  151. package/dist/packages/sdk-ui/src/pivot-table/formatters/utils.d.ts +1 -0
  152. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +4 -1
  153. package/dist/packages/sdk-ui/src/polar-chart.d.ts +1 -1
  154. package/dist/packages/sdk-ui/src/props.d.ts +161 -7
  155. package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +7 -6
  156. package/dist/packages/sdk-ui/src/query/date-formats/index.d.ts +1 -1
  157. package/dist/packages/sdk-ui/src/query/execute-query.d.ts +3 -1
  158. package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
  159. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +9 -2
  160. package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +2 -2
  161. package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +1 -0
  162. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +11 -0
  163. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +22 -0
  164. package/dist/packages/sdk-ui/src/types.d.ts +254 -16
  165. package/dist/packages/sdk-ui/src/utils/combine-handlers.d.ts +19 -0
  166. package/dist/packages/sdk-ui/src/utils/utility-types/transformer.d.ts +8 -0
  167. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -1
  168. package/dist/packages/sdk-ui/src/widget-by-id/translate-panel-color-format.d.ts +9 -0
  169. package/dist/packages/sdk-ui/src/widget-by-id/translate-statistical-models.d.ts +10 -0
  170. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +0 -14
  171. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +10 -10
  172. package/dist/types-BRtWk8uC.js +80 -0
  173. package/dist/types-Ds0KtTJF.cjs +1 -0
  174. package/dist/use-common-filters-D8tEa9zb.js +91245 -0
  175. package/dist/use-common-filters-hw1WKPCY.cjs +844 -0
  176. package/dist/{widget-composer-BPlNiX_P.cjs → widget-composer-B7zeAa_D.cjs} +9 -9
  177. package/dist/{widget-composer-SGEFYrXY.js → widget-composer-DL0xPtlC.js} +143 -217
  178. package/package.json +20 -10
  179. package/dist/derive-chart-family-6PZA-xZh.js +0 -92092
  180. package/dist/derive-chart-family-DQUVKMcV.cjs +0 -656
  181. package/dist/dimensions-x8nnAUew.cjs +0 -1
  182. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +0 -41
  183. package/dist/use-common-filters-BHBy4uv6.js +0 -32218
  184. package/dist/use-common-filters-Cg217teN.cjs +0 -350
@@ -0,0 +1,1033 @@
1
+ var Ie = Object.defineProperty, Te = Object.defineProperties;
2
+ var Me = Object.getOwnPropertyDescriptors;
3
+ var X = Object.getOwnPropertySymbols;
4
+ var ke = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
5
+ var Z = (e, t, r) => t in e ? Ie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, y = (e, t) => {
6
+ for (var r in t || (t = {}))
7
+ ke.call(t, r) && Z(e, r, t[r]);
8
+ if (X)
9
+ for (var r of X(t))
10
+ Ne.call(t, r) && Z(e, r, t[r]);
11
+ return e;
12
+ }, T = (e, t) => Te(e, Me(t));
13
+ import { f as Pe, J as Oe } from "../types-BRtWk8uC.js";
14
+ import { b as Mr, E as kr, a as Nr, i as Pr, e as Or, d as Sr } from "../types-BRtWk8uC.js";
15
+ import { bU as Se, bV as Le, bW as _e, bX as xe, bY as Ve, at as ne, bZ as Be, as as Ue, b_ as Ke, b5 as Qe, au as qe, b8 as He, b6 as Ye, aH as We, b4 as Xe, b7 as Ze, e as je, d as Ge, l as Je, b$ as ve, c0 as et, c1 as tt, c2 as rt, c3 as st, c4 as nt, c5 as it, c6 as at, c7 as ot, c8 as lt, ao as ct, c9 as ut, ca as ft, S as mt, i as dt, cb as ie, c as ae, cc as pt, cd as gt, ce as yt, aD as bt, ah as j, ar as ht, cf as wt, v as At, u as Et } from "../execute-query-CGLL9vXX.js";
16
+ import { i as Dt, b as zt, D as Ft, d as Ct } from "../dimensions-D-Z9sitz.js";
17
+ class Rt {
18
+ constructor() {
19
+ this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
20
+ }
21
+ set(t, r) {
22
+ this.keyToValue.set(t, r), this.valueToKey.set(r, t);
23
+ }
24
+ getByKey(t) {
25
+ return this.keyToValue.get(t);
26
+ }
27
+ getByValue(t) {
28
+ return this.valueToKey.get(t);
29
+ }
30
+ clear() {
31
+ this.keyToValue.clear(), this.valueToKey.clear();
32
+ }
33
+ }
34
+ class oe {
35
+ constructor(t) {
36
+ this.generateIdentifier = t, this.kv = new Rt();
37
+ }
38
+ register(t, r) {
39
+ this.kv.getByValue(t) || (r || (r = this.generateIdentifier(t)), this.kv.set(r, t));
40
+ }
41
+ clear() {
42
+ this.kv.clear();
43
+ }
44
+ getIdentifier(t) {
45
+ return this.kv.getByValue(t);
46
+ }
47
+ getValue(t) {
48
+ return this.kv.getByKey(t);
49
+ }
50
+ }
51
+ class $t extends oe {
52
+ constructor() {
53
+ super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
54
+ }
55
+ register(t, r) {
56
+ typeof r == "object" ? (r.allowProps && this.classToAllowedProps.set(t, r.allowProps), super.register(t, r.identifier)) : super.register(t, r);
57
+ }
58
+ getAllowedProps(t) {
59
+ return this.classToAllowedProps.get(t);
60
+ }
61
+ }
62
+ function It(e) {
63
+ if ("values" in Object)
64
+ return Object.values(e);
65
+ const t = [];
66
+ for (const r in e)
67
+ e.hasOwnProperty(r) && t.push(e[r]);
68
+ return t;
69
+ }
70
+ function Tt(e, t) {
71
+ const r = It(e);
72
+ if ("find" in r)
73
+ return r.find(t);
74
+ const s = r;
75
+ for (let n = 0; n < s.length; n++) {
76
+ const i = s[n];
77
+ if (t(i))
78
+ return i;
79
+ }
80
+ }
81
+ function E(e, t) {
82
+ Object.entries(e).forEach(([r, s]) => t(s, r));
83
+ }
84
+ function M(e, t) {
85
+ return e.indexOf(t) !== -1;
86
+ }
87
+ function G(e, t) {
88
+ for (let r = 0; r < e.length; r++) {
89
+ const s = e[r];
90
+ if (t(s))
91
+ return s;
92
+ }
93
+ }
94
+ class Mt {
95
+ constructor() {
96
+ this.transfomers = {};
97
+ }
98
+ register(t) {
99
+ this.transfomers[t.name] = t;
100
+ }
101
+ findApplicable(t) {
102
+ return Tt(this.transfomers, (r) => r.isApplicable(t));
103
+ }
104
+ findByName(t) {
105
+ return this.transfomers[t];
106
+ }
107
+ }
108
+ const kt = (e) => Object.prototype.toString.call(e).slice(8, -1), le = (e) => typeof e == "undefined", Nt = (e) => e === null, C = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, O = (e) => C(e) && Object.keys(e).length === 0, g = (e) => Array.isArray(e), Pt = (e) => typeof e == "string", Ot = (e) => typeof e == "number" && !isNaN(e), St = (e) => typeof e == "boolean", Lt = (e) => e instanceof RegExp, R = (e) => e instanceof Map, $ = (e) => e instanceof Set, ce = (e) => kt(e) === "Symbol", _t = (e) => e instanceof Date && !isNaN(e.valueOf()), xt = (e) => e instanceof Error, J = (e) => typeof e == "number" && isNaN(e), Vt = (e) => St(e) || Nt(e) || le(e) || Ot(e) || Pt(e) || ce(e), Bt = (e) => typeof e == "bigint", Ut = (e) => e === 1 / 0 || e === -1 / 0, Kt = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Qt = (e) => e instanceof URL, ue = (e) => e.replace(/\./g, "\\."), P = (e) => e.map(String).map(ue).join("."), F = (e) => {
109
+ const t = [];
110
+ let r = "";
111
+ for (let n = 0; n < e.length; n++) {
112
+ let i = e.charAt(n);
113
+ if (i === "\\" && e.charAt(n + 1) === ".") {
114
+ r += ".", n++;
115
+ continue;
116
+ }
117
+ if (i === ".") {
118
+ t.push(r), r = "";
119
+ continue;
120
+ }
121
+ r += i;
122
+ }
123
+ const s = r;
124
+ return t.push(s), t;
125
+ };
126
+ function d(e, t, r, s) {
127
+ return {
128
+ isApplicable: e,
129
+ annotation: t,
130
+ transform: r,
131
+ untransform: s
132
+ };
133
+ }
134
+ const fe = [
135
+ d(le, "undefined", () => null, () => {
136
+ }),
137
+ d(Bt, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
138
+ d(_t, "Date", (e) => e.toISOString(), (e) => new Date(e)),
139
+ d(xt, "Error", (e, t) => {
140
+ const r = {
141
+ name: e.name,
142
+ message: e.message
143
+ };
144
+ return t.allowedErrorProps.forEach((s) => {
145
+ r[s] = e[s];
146
+ }), r;
147
+ }, (e, t) => {
148
+ const r = new Error(e.message);
149
+ return r.name = e.name, r.stack = e.stack, t.allowedErrorProps.forEach((s) => {
150
+ r[s] = e[s];
151
+ }), r;
152
+ }),
153
+ d(Lt, "regexp", (e) => "" + e, (e) => {
154
+ const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
155
+ return new RegExp(t, r);
156
+ }),
157
+ d(
158
+ $,
159
+ "set",
160
+ // (sets only exist in es6+)
161
+ // eslint-disable-next-line es5/no-es6-methods
162
+ (e) => [...e.values()],
163
+ (e) => new Set(e)
164
+ ),
165
+ d(R, "map", (e) => [...e.entries()], (e) => new Map(e)),
166
+ d((e) => J(e) || Ut(e), "number", (e) => J(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
167
+ d((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
168
+ d(Qt, "URL", (e) => e.toString(), (e) => new URL(e))
169
+ ];
170
+ function k(e, t, r, s) {
171
+ return {
172
+ isApplicable: e,
173
+ annotation: t,
174
+ transform: r,
175
+ untransform: s
176
+ };
177
+ }
178
+ const me = k((e, t) => ce(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
179
+ const s = r.symbolRegistry.getValue(t[1]);
180
+ if (!s)
181
+ throw new Error("Trying to deserialize unknown symbol");
182
+ return s;
183
+ }), qt = [
184
+ Int8Array,
185
+ Uint8Array,
186
+ Int16Array,
187
+ Uint16Array,
188
+ Int32Array,
189
+ Uint32Array,
190
+ Float32Array,
191
+ Float64Array,
192
+ Uint8ClampedArray
193
+ ].reduce((e, t) => (e[t.name] = t, e), {}), de = k(Kt, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
194
+ const r = qt[t[1]];
195
+ if (!r)
196
+ throw new Error("Trying to deserialize unknown typed array");
197
+ return new r(e);
198
+ });
199
+ function pe(e, t) {
200
+ return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
201
+ }
202
+ const ge = k(pe, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
203
+ const r = t.classRegistry.getAllowedProps(e.constructor);
204
+ if (!r)
205
+ return y({}, e);
206
+ const s = {};
207
+ return r.forEach((n) => {
208
+ s[n] = e[n];
209
+ }), s;
210
+ }, (e, t, r) => {
211
+ const s = r.classRegistry.getValue(t[1]);
212
+ if (!s)
213
+ throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
214
+ return Object.assign(Object.create(s.prototype), e);
215
+ }), ye = k((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
216
+ const s = r.customTransformerRegistry.findByName(t[1]);
217
+ if (!s)
218
+ throw new Error("Trying to deserialize unknown custom value");
219
+ return s.deserialize(e);
220
+ }), Ht = [ge, me, ye, de], v = (e, t) => {
221
+ const r = G(Ht, (n) => n.isApplicable(e, t));
222
+ if (r)
223
+ return {
224
+ value: r.transform(e, t),
225
+ type: r.annotation(e, t)
226
+ };
227
+ const s = G(fe, (n) => n.isApplicable(e, t));
228
+ if (s)
229
+ return {
230
+ value: s.transform(e, t),
231
+ type: s.annotation
232
+ };
233
+ }, be = {};
234
+ fe.forEach((e) => {
235
+ be[e.annotation] = e;
236
+ });
237
+ const Yt = (e, t, r) => {
238
+ if (g(t))
239
+ switch (t[0]) {
240
+ case "symbol":
241
+ return me.untransform(e, t, r);
242
+ case "class":
243
+ return ge.untransform(e, t, r);
244
+ case "custom":
245
+ return ye.untransform(e, t, r);
246
+ case "typed-array":
247
+ return de.untransform(e, t, r);
248
+ default:
249
+ throw new Error("Unknown transformation: " + t);
250
+ }
251
+ else {
252
+ const s = be[t];
253
+ if (!s)
254
+ throw new Error("Unknown transformation: " + t);
255
+ return s.untransform(e, r);
256
+ }
257
+ }, w = (e, t) => {
258
+ if (t > e.size)
259
+ throw new Error("index out of bounds");
260
+ const r = e.keys();
261
+ for (; t > 0; )
262
+ r.next(), t--;
263
+ return r.next().value;
264
+ };
265
+ function he(e) {
266
+ if (M(e, "__proto__"))
267
+ throw new Error("__proto__ is not allowed as a property");
268
+ if (M(e, "prototype"))
269
+ throw new Error("prototype is not allowed as a property");
270
+ if (M(e, "constructor"))
271
+ throw new Error("constructor is not allowed as a property");
272
+ }
273
+ const Wt = (e, t) => {
274
+ he(t);
275
+ for (let r = 0; r < t.length; r++) {
276
+ const s = t[r];
277
+ if ($(e))
278
+ e = w(e, +s);
279
+ else if (R(e)) {
280
+ const n = +s, i = +t[++r] == 0 ? "key" : "value", a = w(e, n);
281
+ switch (i) {
282
+ case "key":
283
+ e = a;
284
+ break;
285
+ case "value":
286
+ e = e.get(a);
287
+ break;
288
+ }
289
+ } else
290
+ e = e[s];
291
+ }
292
+ return e;
293
+ }, S = (e, t, r) => {
294
+ if (he(t), t.length === 0)
295
+ return r(e);
296
+ let s = e;
297
+ for (let i = 0; i < t.length - 1; i++) {
298
+ const a = t[i];
299
+ if (g(s)) {
300
+ const o = +a;
301
+ s = s[o];
302
+ } else if (C(s))
303
+ s = s[a];
304
+ else if ($(s)) {
305
+ const o = +a;
306
+ s = w(s, o);
307
+ } else if (R(s)) {
308
+ if (i === t.length - 2)
309
+ break;
310
+ const c = +a, I = +t[++i] == 0 ? "key" : "value", h = w(s, c);
311
+ switch (I) {
312
+ case "key":
313
+ s = h;
314
+ break;
315
+ case "value":
316
+ s = s.get(h);
317
+ break;
318
+ }
319
+ }
320
+ }
321
+ const n = t[t.length - 1];
322
+ if (g(s) ? s[+n] = r(s[+n]) : C(s) && (s[n] = r(s[n])), $(s)) {
323
+ const i = w(s, +n), a = r(i);
324
+ i !== a && (s.delete(i), s.add(a));
325
+ }
326
+ if (R(s)) {
327
+ const i = +t[t.length - 2], a = w(s, i);
328
+ switch (+n == 0 ? "key" : "value") {
329
+ case "key": {
330
+ const c = r(a);
331
+ s.set(c, s.get(a)), c !== a && s.delete(a);
332
+ break;
333
+ }
334
+ case "value": {
335
+ s.set(a, r(s.get(a)));
336
+ break;
337
+ }
338
+ }
339
+ }
340
+ return e;
341
+ };
342
+ function L(e, t, r = []) {
343
+ if (!e)
344
+ return;
345
+ if (!g(e)) {
346
+ E(e, (i, a) => L(i, t, [...r, ...F(a)]));
347
+ return;
348
+ }
349
+ const [s, n] = e;
350
+ n && E(n, (i, a) => {
351
+ L(i, t, [...r, ...F(a)]);
352
+ }), t(s, r);
353
+ }
354
+ function Xt(e, t, r) {
355
+ return L(t, (s, n) => {
356
+ e = S(e, n, (i) => Yt(i, s, r));
357
+ }), e;
358
+ }
359
+ function Zt(e, t) {
360
+ function r(s, n) {
361
+ const i = Wt(e, F(n));
362
+ s.map(F).forEach((a) => {
363
+ e = S(e, a, () => i);
364
+ });
365
+ }
366
+ if (g(t)) {
367
+ const [s, n] = t;
368
+ s.forEach((i) => {
369
+ e = S(e, F(i), () => e);
370
+ }), n && E(n, r);
371
+ } else
372
+ E(t, r);
373
+ return e;
374
+ }
375
+ const jt = (e, t) => C(e) || g(e) || R(e) || $(e) || pe(e, t);
376
+ function Gt(e, t, r) {
377
+ const s = r.get(e);
378
+ s ? s.push(t) : r.set(e, [t]);
379
+ }
380
+ function Jt(e, t) {
381
+ const r = {};
382
+ let s;
383
+ return e.forEach((n) => {
384
+ if (n.length <= 1)
385
+ return;
386
+ t || (n = n.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
387
+ const [i, ...a] = n;
388
+ i.length === 0 ? s = a.map(P) : r[P(i)] = a.map(P);
389
+ }), s ? O(r) ? [s] : [s, r] : O(r) ? void 0 : r;
390
+ }
391
+ const we = (e, t, r, s, n = [], i = [], a = /* @__PURE__ */ new Map()) => {
392
+ var W;
393
+ const o = Vt(e);
394
+ if (!o) {
395
+ Gt(e, n, t);
396
+ const p = a.get(e);
397
+ if (p)
398
+ return s ? {
399
+ transformedValue: null
400
+ } : p;
401
+ }
402
+ if (!jt(e, r)) {
403
+ const p = v(e, r), m = p ? {
404
+ transformedValue: p.value,
405
+ annotations: [p.type]
406
+ } : {
407
+ transformedValue: e
408
+ };
409
+ return o || a.set(e, m), m;
410
+ }
411
+ if (M(i, e))
412
+ return {
413
+ transformedValue: null
414
+ };
415
+ const c = v(e, r), I = (W = c == null ? void 0 : c.value) != null ? W : e, h = g(I) ? [] : {}, D = {};
416
+ E(I, (p, m) => {
417
+ if (m === "__proto__" || m === "constructor" || m === "prototype")
418
+ throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);
419
+ const z = we(p, t, r, s, [...n, m], [...i, e], a);
420
+ h[m] = z.transformedValue, g(z.annotations) ? D[m] = z.annotations : C(z.annotations) && E(z.annotations, (Re, $e) => {
421
+ D[ue(m) + "." + $e] = Re;
422
+ });
423
+ });
424
+ const Y = O(D) ? {
425
+ transformedValue: h,
426
+ annotations: c ? [c.type] : void 0
427
+ } : {
428
+ transformedValue: h,
429
+ annotations: c ? [c.type, D] : D
430
+ };
431
+ return o || a.set(e, Y), Y;
432
+ };
433
+ function Ae(e) {
434
+ return Object.prototype.toString.call(e).slice(8, -1);
435
+ }
436
+ function ee(e) {
437
+ return Ae(e) === "Array";
438
+ }
439
+ function vt(e) {
440
+ if (Ae(e) !== "Object")
441
+ return !1;
442
+ const t = Object.getPrototypeOf(e);
443
+ return !!t && t.constructor === Object && t === Object.prototype;
444
+ }
445
+ function er(e, t, r, s, n) {
446
+ const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
447
+ i === "enumerable" && (e[t] = r), n && i === "nonenumerable" && Object.defineProperty(e, t, {
448
+ value: r,
449
+ enumerable: !1,
450
+ writable: !0,
451
+ configurable: !0
452
+ });
453
+ }
454
+ function _(e, t = {}) {
455
+ if (ee(e))
456
+ return e.map((n) => _(n, t));
457
+ if (!vt(e))
458
+ return e;
459
+ const r = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
460
+ return [...r, ...s].reduce((n, i) => {
461
+ if (ee(t.props) && !t.props.includes(i))
462
+ return n;
463
+ const a = e[i], o = _(a, t);
464
+ return er(n, i, o, e, t.nonenumerable), n;
465
+ }, {});
466
+ }
467
+ class l {
468
+ /**
469
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
470
+ */
471
+ constructor({ dedupe: t = !1 } = {}) {
472
+ this.classRegistry = new $t(), this.symbolRegistry = new oe((r) => {
473
+ var s;
474
+ return (s = r.description) != null ? s : "";
475
+ }), this.customTransformerRegistry = new Mt(), this.allowedErrorProps = [], this.dedupe = t;
476
+ }
477
+ serialize(t) {
478
+ const r = /* @__PURE__ */ new Map(), s = we(t, r, this, this.dedupe), n = {
479
+ json: s.transformedValue
480
+ };
481
+ s.annotations && (n.meta = T(y({}, n.meta), {
482
+ values: s.annotations
483
+ }));
484
+ const i = Jt(r, this.dedupe);
485
+ return i && (n.meta = T(y({}, n.meta), {
486
+ referentialEqualities: i
487
+ })), n;
488
+ }
489
+ deserialize(t) {
490
+ const { json: r, meta: s } = t;
491
+ let n = _(r);
492
+ return s != null && s.values && (n = Xt(n, s.values, this)), s != null && s.referentialEqualities && (n = Zt(n, s.referentialEqualities)), n;
493
+ }
494
+ stringify(t) {
495
+ return JSON.stringify(this.serialize(t));
496
+ }
497
+ parse(t) {
498
+ return this.deserialize(JSON.parse(t));
499
+ }
500
+ registerClass(t, r) {
501
+ this.classRegistry.register(t, r);
502
+ }
503
+ registerSymbol(t, r) {
504
+ this.symbolRegistry.register(t, r);
505
+ }
506
+ registerCustom(t, r) {
507
+ this.customTransformerRegistry.register(y({
508
+ name: r
509
+ }, t));
510
+ }
511
+ allowErrorProps(...t) {
512
+ this.allowedErrorProps.push(...t);
513
+ }
514
+ }
515
+ l.defaultInstance = new l();
516
+ l.serialize = l.defaultInstance.serialize.bind(l.defaultInstance);
517
+ l.deserialize = l.defaultInstance.deserialize.bind(l.defaultInstance);
518
+ l.stringify = l.defaultInstance.stringify.bind(l.defaultInstance);
519
+ l.parse = l.defaultInstance.parse.bind(l.defaultInstance);
520
+ l.registerClass = l.defaultInstance.registerClass.bind(l.defaultInstance);
521
+ l.registerSymbol = l.defaultInstance.registerSymbol.bind(l.defaultInstance);
522
+ l.registerCustom = l.defaultInstance.registerCustom.bind(l.defaultInstance);
523
+ l.allowErrorProps = l.defaultInstance.allowErrorProps.bind(l.defaultInstance);
524
+ const b = (e) => e === void 0 ? mt.None : e, tr = (e) => new Oe(e.metadataItem, e.type), x = (e) => new je(e.name, e.expression, e.type, e.description, b(e.sort), e.dataSource, e.composeCode), V = (e) => new Ge(e.name, e.expression, e.granularity, e.format, e.description, b(e.sort), e.dataSource, e.composeCode), f = (e) => {
525
+ switch (e.__serializable) {
526
+ case "DimensionalAttribute":
527
+ return x(e);
528
+ case "DimensionalLevelAttribute":
529
+ return V(e);
530
+ default:
531
+ return e;
532
+ }
533
+ }, Ee = (e) => new Ft(e.name, e.expression, e.attributes.map(f), e.dimensions.map(rr), e.type, e.description, b(e.sort), e.dataSource, e.composeCode, e.defaultAttribute ? f(e.defaultAttribute) : void 0), De = (e) => new Ct(e.name, e.expression, e.description, b(e.sort), e.dataSource, e.composeCode), rr = (e) => {
534
+ switch (e.__serializable) {
535
+ case "DimensionalDimension":
536
+ return Ee(e);
537
+ case "DimensionalDateDimension":
538
+ return De(e);
539
+ default:
540
+ return e;
541
+ }
542
+ }, B = (e) => new Je(e.name, f(e.attribute), e.aggregation, e.format, e.description, b(e.sort), e.dataSource, e.composeCode), U = (e) => {
543
+ const t = Object.fromEntries(Object.entries(e.context).map(([r, s]) => {
544
+ if (s && typeof s == "object" && "__serializable" in s)
545
+ switch (s.__serializable) {
546
+ case "DimensionalAttribute":
547
+ return [
548
+ r,
549
+ x(s)
550
+ ];
551
+ case "DimensionalLevelAttribute":
552
+ return [
553
+ r,
554
+ V(s)
555
+ ];
556
+ case "DimensionalBaseMeasure":
557
+ return [
558
+ r,
559
+ B(s)
560
+ ];
561
+ case "DimensionalCalculatedMeasure":
562
+ return [
563
+ r,
564
+ U(s)
565
+ ];
566
+ default:
567
+ return [
568
+ r,
569
+ s
570
+ ];
571
+ }
572
+ return [
573
+ r,
574
+ s
575
+ ];
576
+ }));
577
+ return new ve(e.name, e.expression, t, e.format, e.description, b(e.sort), e.dataSource, e.composeCode);
578
+ }, ze = (e) => new et(e.name, f(e.attribute), e.format, e.description, b(e.sort), e.dataSource, e.composeCode), te = (e) => {
579
+ switch (e.__serializable) {
580
+ case "DimensionalBaseMeasure":
581
+ return B(e);
582
+ case "DimensionalCalculatedMeasure":
583
+ return U(e);
584
+ case "DimensionalMeasureTemplate":
585
+ return ze(e);
586
+ default:
587
+ return e;
588
+ }
589
+ }, u = (e) => {
590
+ switch (e.__serializable) {
591
+ case "MembersFilter":
592
+ return new ft(f(e.attribute), e.members, e.config.backgroundFilter ? T(y({}, e.config), {
593
+ backgroundFilter: u(e.config.backgroundFilter)
594
+ }) : e.config, e.composeCode);
595
+ case "LogicalAttributeFilter":
596
+ return new ut(e.filters.map((r) => u(r)), e.operator, e.config, e.composeCode);
597
+ case "CascadingFilter":
598
+ return new ct(e._filters.map((r) => u(r)), e.config, e.composeCode);
599
+ case "ExcludeFilter":
600
+ return new lt(u(e.filter), e.input ? u(e.input) : void 0, e.config, e.composeCode);
601
+ case "MeasureFilter":
602
+ return new ot(f(e.attribute), te(e.measure), e.operatorA, e.valueA, e.operatorB, e.valueB, e.config, e.composeCode);
603
+ case "RankingFilter":
604
+ return new at(f(e.attribute), te(e.measure), e.operator, e.count, e.config, e.composeCode);
605
+ case "NumericFilter":
606
+ return new it(f(e.attribute), e.operatorA, e.valueA, e.operatorB, e.valueB, e.config, e.composeCode);
607
+ case "TextFilter":
608
+ return new nt(f(e.attribute), e.operatorA, e.valueA, e.config, e.composeCode);
609
+ case "DateRangeFilter": {
610
+ const { valueA: r, valueB: s } = e;
611
+ return new st(f(e.attribute), r, s, e.config, e.composeCode);
612
+ }
613
+ case "RelativeDateFilter":
614
+ return new rt(f(e.attribute), e.offset, e.count, e.operator, e.anchor, e.config, e.composeCode);
615
+ case "CustomFilter":
616
+ return new tt(f(e.attribute), e.jaqlExpression, e.config, e.composeCode);
617
+ default:
618
+ return e;
619
+ }
620
+ };
621
+ l.registerCustom({
622
+ isApplicable: Pe,
623
+ serialize: (e) => e.serialize(),
624
+ deserialize: (e) => tr(e)
625
+ }, "JaqlElement");
626
+ l.registerCustom({
627
+ isApplicable: Se,
628
+ serialize: (e) => e.serialize(),
629
+ deserialize: (e) => x(e)
630
+ }, "DimensionalAttribute");
631
+ l.registerCustom({
632
+ isApplicable: Le,
633
+ serialize: (e) => e.serialize(),
634
+ deserialize: (e) => V(e)
635
+ }, "DimensionalLevelAttribute");
636
+ l.registerCustom({
637
+ isApplicable: Dt,
638
+ serialize: (e) => e.serialize(),
639
+ deserialize: (e) => Ee(e)
640
+ }, "DimensionalDimension");
641
+ l.registerCustom({
642
+ isApplicable: zt,
643
+ serialize: (e) => e.serialize(),
644
+ deserialize: (e) => De(e)
645
+ }, "DimensionalDateDimension");
646
+ l.registerCustom({
647
+ isApplicable: _e,
648
+ serialize: (e) => e.serialize(),
649
+ deserialize: (e) => B(e)
650
+ }, "DimensionalBaseMeasure");
651
+ l.registerCustom({
652
+ isApplicable: xe,
653
+ serialize: (e) => e.serialize(),
654
+ deserialize: (e) => U(e)
655
+ }, "DimensionalCalculatedMeasure");
656
+ l.registerCustom({
657
+ isApplicable: Ve,
658
+ serialize: (e) => e.serialize(),
659
+ deserialize: (e) => ze(e)
660
+ }, "DimensionalMeasureTemplate");
661
+ l.registerCustom({
662
+ isApplicable: ne,
663
+ serialize: (e) => e.serialize(),
664
+ deserialize: (e) => u(e)
665
+ }, "MembersFilter");
666
+ l.registerCustom({
667
+ isApplicable: Be,
668
+ serialize: (e) => e.serialize(),
669
+ deserialize: (e) => u(e)
670
+ }, "LogicalAttributeFilter");
671
+ l.registerCustom({
672
+ isApplicable: Ue,
673
+ serialize: (e) => e.serialize(),
674
+ deserialize: (e) => u(e)
675
+ }, "CascadingFilter");
676
+ l.registerCustom({
677
+ isApplicable: Ke,
678
+ serialize: (e) => e.serialize(),
679
+ deserialize: (e) => u(e)
680
+ }, "ExcludeFilter");
681
+ l.registerCustom({
682
+ isApplicable: Qe,
683
+ serialize: (e) => e.serialize(),
684
+ deserialize: (e) => u(e)
685
+ }, "MeasureFilter");
686
+ l.registerCustom({
687
+ isApplicable: qe,
688
+ serialize: (e) => e.serialize(),
689
+ deserialize: (e) => u(e)
690
+ }, "RankingFilter");
691
+ l.registerCustom({
692
+ isApplicable: He,
693
+ serialize: (e) => e.serialize(),
694
+ deserialize: (e) => u(e)
695
+ }, "NumericFilter");
696
+ l.registerCustom({
697
+ isApplicable: Ye,
698
+ serialize: (e) => e.serialize(),
699
+ deserialize: (e) => u(e)
700
+ }, "TextFilter");
701
+ l.registerCustom({
702
+ isApplicable: We,
703
+ serialize: (e) => e.serialize(),
704
+ deserialize: (e) => u(e)
705
+ }, "DateRangeFilter");
706
+ l.registerCustom({
707
+ isApplicable: Xe,
708
+ serialize: (e) => e.serialize(),
709
+ deserialize: (e) => u(e)
710
+ }, "RelativeDateFilter");
711
+ l.registerCustom({
712
+ isApplicable: Ze,
713
+ serialize: (e) => e.serialize(),
714
+ deserialize: (e) => u(e)
715
+ }, "CustomFilter");
716
+ const Cr = l, A = "DM.";
717
+ function sr(e) {
718
+ return typeof e == "object" && e !== null && "function" in e && "args" in e;
719
+ }
720
+ function K(e) {
721
+ return e.every(sr);
722
+ }
723
+ function Q(e) {
724
+ return "attribute" in e && "config" in e;
725
+ }
726
+ function q(e) {
727
+ return "left" in e && "right" in e && "operator" in e;
728
+ }
729
+ function nr(e) {
730
+ return !Q(e) && !q(e);
731
+ }
732
+ function H(e, t) {
733
+ const r = {}, s = e !== "" ? e + "." : "";
734
+ for (const n in t)
735
+ if (typeof t[`${n}`] == "function")
736
+ r[`${s}${n}`] = t[`${n}`];
737
+ else if (typeof t[`${n}`] == "object") {
738
+ const i = H("", t[`${n}`]);
739
+ for (const a in i)
740
+ r[`${s}${n}.${a}`] = i[`${a}`];
741
+ }
742
+ return r;
743
+ }
744
+ const re = H("measureFactory", pt), se = H("filterFactory", gt);
745
+ function ir(e, t) {
746
+ const s = e.split(".")[0];
747
+ if (s === "filterFactory" && se[`${e}`])
748
+ return se[`${e}`](...t);
749
+ if (s === "measureFactory" && re[`${e}`])
750
+ return re[`${e}`](...t);
751
+ throw new Error(`Function "${e}" not found in filterFactory or measureFactory.`);
752
+ }
753
+ function ar(e) {
754
+ const t = e.split(".");
755
+ if (t.length < 3 || `${t[0]}.` !== A)
756
+ throw new Error(`Invalid attribute name format: "${e}". Expected format: "${A}TableName.ColumnName[.Level]".`);
757
+ const r = t[1], s = t[2];
758
+ let n;
759
+ return t.length === 4 && (n = t[3]), {
760
+ tableName: r,
761
+ columnName: s,
762
+ level: n
763
+ };
764
+ }
765
+ function or(e, t) {
766
+ const { tableName: r, columnName: s, level: n } = ar(e), i = t.find((o) => o.name === r);
767
+ if (!i)
768
+ throw new Error(`Table "${r}" not found in the data model.`);
769
+ const a = i.columns.find((o) => o.name === s);
770
+ if (!a)
771
+ throw new Error(`Column "${s}" not found in table "${r}".`);
772
+ if (n) {
773
+ if (a.dataType !== ie.DATETIME)
774
+ throw new Error(`Invalid date level "${n}" in attribute "${e}". Column "${r}.${s}" is not a datetime column.`);
775
+ const o = ae.all;
776
+ if (!o.includes(n))
777
+ throw new Error(`Invalid date level "${n}" in attribute "${e}". Valid levels are: ${o.join(", ")}.`);
778
+ }
779
+ return {
780
+ field: a,
781
+ level: n
782
+ };
783
+ }
784
+ function lr(e, t) {
785
+ if (e.startsWith(A)) return {
786
+ isLikelyAttribute: !0,
787
+ suggestion: e
788
+ };
789
+ const r = e.split(".");
790
+ if (r.length === 2) {
791
+ const [s, n] = r, i = t.some((a) => a.name === s && a.columns.some((o) => o.name === n));
792
+ return i ? {
793
+ isLikelyAttribute: i,
794
+ suggestion: `${A}${e}`
795
+ } : {
796
+ isLikelyAttribute: !1
797
+ };
798
+ }
799
+ if (r.length === 3) {
800
+ const [s, n, i] = r, a = t.find((c) => c.name === s);
801
+ if (!a)
802
+ return {
803
+ isLikelyAttribute: !1
804
+ };
805
+ const o = a.columns.find((c) => c.name === n);
806
+ return o ? o.dataType === ie.DATETIME && ae.all.includes(i) ? {
807
+ isLikelyAttribute: !0,
808
+ suggestion: `${A}${e}`
809
+ } : {
810
+ isLikelyAttribute: !1
811
+ } : {
812
+ isLikelyAttribute: !1
813
+ };
814
+ }
815
+ return {
816
+ isLikelyAttribute: !1
817
+ };
818
+ }
819
+ function Fe(e, t, r) {
820
+ const { field: s, level: n } = or(e, r);
821
+ return dt({
822
+ expression: s.expression,
823
+ dataType: s.dataType,
824
+ granularity: n,
825
+ format: void 0,
826
+ sort: void 0,
827
+ dataSource: t
828
+ });
829
+ }
830
+ function cr(e, t, r) {
831
+ if (typeof e == "object" && e !== null && !Array.isArray(e) && "function" in e && "args" in e)
832
+ return N(e, t, r);
833
+ if (typeof e == "string") {
834
+ if (e.startsWith(A))
835
+ return Fe(e, t, r);
836
+ const { isLikelyAttribute: s, suggestion: n } = lr(e, r);
837
+ if (s)
838
+ throw new Error(`Invalid attribute format: "${e}". Did you mean "${n}"?`);
839
+ }
840
+ return e;
841
+ }
842
+ function N(e, t, r) {
843
+ const { function: s, args: n } = e, i = n.map((a) => cr(a, t, r));
844
+ return ir(s, i);
845
+ }
846
+ function Ce(e) {
847
+ const { attribute: t, config: r } = e;
848
+ if (ne(e) && yt(t)) {
849
+ const { granularity: s } = t;
850
+ return bt(t, e.members.map((n) => s === "Years" && !isNaN(Number(n)) ? `${n}-01-01T00:00:00` : n), r);
851
+ }
852
+ return e;
853
+ }
854
+ function ur(e) {
855
+ let t = [];
856
+ for (const r of e)
857
+ q(r) ? t = j(r, t) : t = j([
858
+ Ce(r)
859
+ ], t);
860
+ return t != null ? t : [];
861
+ }
862
+ const fr = (e, t, r) => {
863
+ const s = [], n = [];
864
+ return e.forEach((i, a) => {
865
+ try {
866
+ const o = N(i, t, r);
867
+ !q(o) && !Q(o) ? n.push(`Filter ${a + 1} (${i.function}): Invalid filter JSON`) : s.push(o);
868
+ } catch (o) {
869
+ const c = o instanceof Error ? o.message : "Unknown error";
870
+ n.push(`Filter ${a + 1} (${i.function}): ${c}`);
871
+ }
872
+ }), n.length > 0 ? {
873
+ success: !1,
874
+ errors: n
875
+ } : {
876
+ success: !0,
877
+ data: ur(s)
878
+ };
879
+ }, mr = (e, t, r) => e ? K(e) ? fr(e, t, r) : {
880
+ success: !1,
881
+ errors: [
882
+ 'Invalid filters JSON. Expected an array of function calls with "function" and "args" properties.'
883
+ ]
884
+ } : {
885
+ success: !0,
886
+ data: []
887
+ }, dr = (e, t, r) => {
888
+ const s = [], n = [];
889
+ return e.forEach((i, a) => {
890
+ try {
891
+ const o = N(i, t, r);
892
+ Q(o) ? s.push(Ce(o)) : n.push(`Highlight ${a + 1} (${i.function}): Invalid filter JSON`);
893
+ } catch (o) {
894
+ const c = o instanceof Error ? o.message : "Unknown error";
895
+ n.push(`Highlight ${a + 1} (${i.function}): ${c}`);
896
+ }
897
+ }), n.length > 0 ? {
898
+ success: !1,
899
+ errors: n
900
+ } : {
901
+ success: !0,
902
+ data: s
903
+ };
904
+ }, pr = (e, t, r) => e ? K(e) ? dr(e, t, r) : {
905
+ success: !1,
906
+ errors: [
907
+ 'Invalid highlights JSON. Expected an array of function calls with "function" and "args" properties.'
908
+ ]
909
+ } : {
910
+ success: !0,
911
+ data: []
912
+ };
913
+ function gr(e) {
914
+ return e.every((t) => typeof t == "string");
915
+ }
916
+ const yr = (e, t, r) => {
917
+ if (!e)
918
+ return {
919
+ success: !0,
920
+ data: []
921
+ };
922
+ if (!gr(e))
923
+ return {
924
+ success: !1,
925
+ errors: [
926
+ "Invalid dimensions JSON. Expected an array of strings."
927
+ ]
928
+ };
929
+ const s = [], n = [];
930
+ return e.forEach((i, a) => {
931
+ try {
932
+ const o = Fe(i, t, r);
933
+ s.push(o);
934
+ } catch (o) {
935
+ const c = o instanceof Error ? o.message : "Unknown error";
936
+ n.push(`Dimension ${a + 1} ("${i}"): ${c}`);
937
+ }
938
+ }), n.length > 0 ? {
939
+ success: !1,
940
+ errors: n
941
+ } : {
942
+ success: !0,
943
+ data: s
944
+ };
945
+ }, br = (e, t, r) => {
946
+ const s = [], n = [];
947
+ return e.forEach((i, a) => {
948
+ try {
949
+ const o = N(i, t, r);
950
+ nr(o) ? s.push(o) : n.push(`Measure ${a + 1} (${i.function}): Invalid measure JSON`);
951
+ } catch (o) {
952
+ const c = o instanceof Error ? o.message : "Unknown error";
953
+ n.push(`Measure ${a + 1} (${i.function}): ${c}`);
954
+ }
955
+ }), n.length > 0 ? {
956
+ success: !1,
957
+ errors: n
958
+ } : {
959
+ success: !0,
960
+ data: s
961
+ };
962
+ }, hr = (e, t, r) => e ? K(e) ? br(e, t, r) : {
963
+ success: !1,
964
+ errors: [
965
+ 'Invalid measures JSON. Expected an array of function calls with "function" and "args" properties.'
966
+ ]
967
+ } : {
968
+ success: !0,
969
+ data: []
970
+ };
971
+ function wr(e) {
972
+ const t = {}, r = [];
973
+ for (const s in e) {
974
+ const n = e[`${s}`], i = n();
975
+ if (i.success)
976
+ t[`${s}`] = i.data;
977
+ else {
978
+ const a = i.errors.map((o) => `[${s}] ${o}`);
979
+ r.push(...a);
980
+ }
981
+ }
982
+ return r.length > 0 ? {
983
+ success: !1,
984
+ errors: r
985
+ } : {
986
+ success: !0,
987
+ data: t
988
+ };
989
+ }
990
+ const Rr = (e, t, r) => {
991
+ const s = {
992
+ dimensions: () => yr(e.dimensions || [], t, r),
993
+ measures: () => hr(e.measures || [], t, r),
994
+ filters: () => mr(e.filters || [], t, r)
995
+ };
996
+ e.highlights && (s.highlights = () => pr(e.highlights || [], t, r));
997
+ const n = wr(s);
998
+ if (!n.success) {
999
+ const a = `Translation failed with ${n.errors.length} error(s):
1000
+ ${n.errors.join(`
1001
+ `)}`;
1002
+ throw new Error(a);
1003
+ }
1004
+ return y({
1005
+ dataSource: ht(t)
1006
+ }, n.data);
1007
+ };
1008
+ function Ar(e) {
1009
+ const { filters: t, relations: r } = Et(e.filters || []);
1010
+ return {
1011
+ dataSource: e.dataSource,
1012
+ dimensions: e.dimensions,
1013
+ measures: e.measures,
1014
+ filters: t,
1015
+ filterRelations: r,
1016
+ highlights: e.highlights
1017
+ };
1018
+ }
1019
+ function $r(e, t, r = !1) {
1020
+ const s = Ar(e), n = wt(s, t);
1021
+ return At(n, r);
1022
+ }
1023
+ export {
1024
+ Cr as CustomSuperJSON,
1025
+ Mr as EMPTY_EXPANDED_QUERY_MODEL,
1026
+ kr as EMPTY_SIMPLE_QUERY_MODEL,
1027
+ Nr as isByIdDashboardCodeParams,
1028
+ Pr as isByIdWidgetCodeParams,
1029
+ Or as isClientSideDashboardCodeParams,
1030
+ Sr as isClientSideWidgetCodeParams,
1031
+ Rr as translateQueryJSON,
1032
+ $r as translateQueryToJaql
1033
+ };