react-semaphor 0.1.514 → 0.1.516

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 (228) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +226 -225
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +8 -8
  7. package/dist/chunks/{calculated-field-identity-BiTGmnST.cjs → calculated-field-identity-5bg9oHTw.cjs} +1 -1
  8. package/dist/chunks/{calculated-field-identity-DnRd4YIY.js → calculated-field-identity-DzJBs2J8.js} +4 -4
  9. package/dist/chunks/{card-config-utils-B2cDWQqB.js → card-config-utils-Cxnq2R6z.js} +14 -14
  10. package/dist/chunks/{card-config-utils-CMO4_zVs.cjs → card-config-utils-z86y6tSq.cjs} +1 -1
  11. package/dist/chunks/column-bands-CU0byntA.cjs +1 -0
  12. package/dist/chunks/column-bands-RdM-kjDe.js +47 -0
  13. package/dist/chunks/{dashboard-briefing-launcher-e3s3MuSs.js → dashboard-briefing-launcher-BCEHJ_eD.js} +15 -12
  14. package/dist/chunks/{dashboard-briefing-launcher-BzPD50QD.cjs → dashboard-briefing-launcher-CjZ4aE34.cjs} +2 -2
  15. package/dist/chunks/{dashboard-controls-DAOABnks.js → dashboard-controls-DFfit5KH.js} +12 -12
  16. package/dist/chunks/{dashboard-controls-DQBfOqmC.cjs → dashboard-controls-f9aJ70Zu.cjs} +1 -1
  17. package/dist/chunks/{dashboard-date-comparison-definition-D7Bl-YAl.js → dashboard-date-comparison-definition-BqNhECUr.js} +6 -6
  18. package/dist/chunks/{dashboard-date-comparison-definition-C_w-GO_5.cjs → dashboard-date-comparison-definition-Y6JZwpcr.cjs} +1 -1
  19. package/dist/chunks/{dashboard-json-S5Eq2GAg.js → dashboard-json-DVtcA02f.js} +7 -7
  20. package/dist/chunks/{dashboard-json-1jZycd5h.cjs → dashboard-json-deqQC-UR.cjs} +1 -1
  21. package/dist/chunks/edit-dashboard-visual-DK6lSC_p.cjs +172 -0
  22. package/dist/chunks/{edit-dashboard-visual-Bkm0ciHG.js → edit-dashboard-visual-lJ6rDH3w.js} +4553 -4542
  23. package/dist/chunks/{editor-action-buttons-Bvv16QA-.js → editor-action-buttons-Bnxxa439.js} +7 -7
  24. package/dist/chunks/{editor-action-buttons-B2NCSsDw.cjs → editor-action-buttons-CmDaQbPN.cjs} +1 -1
  25. package/dist/chunks/{field-aggregations-CzuQKtqx.js → field-aggregations-Dl2A3rbV.js} +461 -358
  26. package/dist/chunks/field-aggregations-pH_3kymD.cjs +1 -0
  27. package/dist/chunks/{field-dependencies-DIab72rQ.cjs → field-dependencies-EB485TdB.cjs} +1 -1
  28. package/dist/chunks/{field-dependencies-DXW4jtvJ.js → field-dependencies-v-lJNzC7.js} +1 -1
  29. package/dist/chunks/{index-nhUr9xBz.js → index-BVVl2JDK.js} +57955 -54696
  30. package/dist/chunks/{index-CACdoqu3.js → index-C8w91oj4.js} +61 -51
  31. package/dist/chunks/index-Cw2ypaFl.cjs +1 -0
  32. package/dist/chunks/index-DfqMtR9S.cjs +4 -0
  33. package/dist/chunks/index-UNKSfi7s.cjs +1434 -0
  34. package/dist/chunks/{index-CnGVjyF8.js → index-ylOpKRDu.js} +877 -849
  35. package/dist/chunks/{matrix-analytical-definition-Ct5Tu8np.cjs → matrix-analytical-definition-BWd159lN.cjs} +1 -1
  36. package/dist/chunks/{matrix-analytical-definition-BDAK2aEi.js → matrix-analytical-definition-BimC4XIV.js} +1 -1
  37. package/dist/chunks/{matrix-card-U4c72doZ.cjs → matrix-card-C2RjEYZ8.cjs} +1 -1
  38. package/dist/chunks/{matrix-card-DOIeTmjh.js → matrix-card-CIlz0Dnp.js} +2 -2
  39. package/dist/chunks/{matrix-control-sources-FjxGIbqk.cjs → matrix-control-sources-BvEJF7d3.cjs} +1 -1
  40. package/dist/chunks/{matrix-control-sources-BxKH2yu2.js → matrix-control-sources-KbZe1gj_.js} +51 -51
  41. package/dist/chunks/{matrix-definition-CBJW_4ii.cjs → matrix-definition-DanUT11P.cjs} +1 -1
  42. package/dist/chunks/{matrix-definition-I9rHB9zN.js → matrix-definition-E5gXXSTZ.js} +1 -1
  43. package/dist/chunks/matrix-formatter-BJTO8ky9.cjs +1 -0
  44. package/dist/chunks/matrix-formatter-CCXNRt3s.js +341 -0
  45. package/dist/chunks/{matrix-member-presentation-DO1VSqfh.js → matrix-member-presentation-Bw7-JCrr.js} +64 -64
  46. package/dist/chunks/matrix-member-presentation-DvXDEo0U.cjs +1 -0
  47. package/dist/chunks/{matrix-operation-contract-DoiWTUbT.cjs → matrix-operation-contract-0RxoU_M3.cjs} +1 -1
  48. package/dist/chunks/{matrix-operation-contract-D0HfzwZg.js → matrix-operation-contract-D32U2CSw.js} +19 -19
  49. package/dist/chunks/{metric-comparison-Dqc7_tnW.js → metric-comparison-BphoJ9bq.js} +1 -1
  50. package/dist/chunks/{metric-comparison-DBQ3EJTz.cjs → metric-comparison-CUmltzpz.cjs} +1 -1
  51. package/dist/chunks/pivot-header-presentation-BSZhB1g-.js +661 -0
  52. package/dist/chunks/pivot-header-presentation-EoUS5ze5.cjs +5 -0
  53. package/dist/chunks/{pivot-result-identity-8M-bZrw9.js → pivot-result-identity-BzUQiCEV.js} +4 -4
  54. package/dist/chunks/{pivot-result-identity-uTiylUNr.cjs → pivot-result-identity-gquWljbd.cjs} +1 -1
  55. package/dist/chunks/pivot-result-lifecycle-gl9cBfB-.cjs +1 -0
  56. package/dist/chunks/{pivot-result-lifecycle-BeOpjAhg.js → pivot-result-lifecycle-kRhiJkzg.js} +208 -149
  57. package/dist/chunks/{raw-temporal-DrmCX9Wq.js → raw-temporal-BqOfk-xN.js} +471 -361
  58. package/dist/chunks/{raw-temporal-contract-CFLGwTiI.js → raw-temporal-contract-BQZIJ1fn.js} +1 -1
  59. package/dist/chunks/{raw-temporal-contract-DECbTuzA.cjs → raw-temporal-contract-CklMVG_1.cjs} +1 -1
  60. package/dist/chunks/raw-temporal-eJXecCyJ.cjs +1 -0
  61. package/dist/chunks/{report-preferences-dialog-B2fzQH1T.js → report-preferences-dialog-CHXPEl7v.js} +6 -6
  62. package/dist/chunks/{report-preferences-dialog-DcLkVqni.cjs → report-preferences-dialog-Cto0vDwI.cjs} +1 -1
  63. package/dist/chunks/{report-runtime-context-Cs65Mrxj.js → report-runtime-context-CxIoGyNM.js} +1 -1
  64. package/dist/chunks/{report-runtime-context-DzvHBPxl.cjs → report-runtime-context-CzSrCBsu.cjs} +1 -1
  65. package/dist/chunks/{selection-reducer-BIiQXbGM.js → selection-reducer-CvCBQbl2.js} +1 -1
  66. package/dist/chunks/{selection-reducer-CGKKsaPa.cjs → selection-reducer-Kl22OzIk.cjs} +1 -1
  67. package/dist/chunks/{semantic-format-BZxJLKvw.js → semantic-format-DwqGYx4V.js} +25 -31
  68. package/dist/chunks/semantic-format-mVI32OJH.cjs +1 -0
  69. package/dist/chunks/{source-entity-resolution-D7vnmDwm.js → source-entity-resolution-Bzefiive.js} +7 -7
  70. package/dist/chunks/{source-entity-resolution-CjbgnwyX.cjs → source-entity-resolution-R46X34SE.cjs} +1 -1
  71. package/dist/chunks/switch-DNbWXEOP.cjs +134 -0
  72. package/dist/chunks/{switch-QfKb0Iwe.js → switch-DNv-hVmt.js} +8260 -7659
  73. package/dist/chunks/{temporal-bucket-B9hMwemw.js → temporal-bucket-DlFuhCnT.js} +6 -6
  74. package/dist/chunks/{temporal-bucket-contract-IWDgyTMw.js → temporal-bucket-contract-DTLDRzgV.js} +1 -1
  75. package/dist/chunks/{temporal-bucket-contract-ZctiyXYk.cjs → temporal-bucket-contract-nTv6gvX5.cjs} +1 -1
  76. package/dist/chunks/{token-types-Dl0hcKBX.js → token-types-BC6RcUY8.js} +1 -1
  77. package/dist/chunks/{token-types-Ahh5u4iT.cjs → token-types-aWrzwonf.cjs} +1 -1
  78. package/dist/chunks/{update-policy-COjFudhl.cjs → update-policy-DRDLWe7Y.cjs} +1 -1
  79. package/dist/chunks/{update-policy-BeQqjupC.js → update-policy-DhAUtiC8.js} +2 -2
  80. package/dist/chunks/{validators-CkHsAvwB.js → validators-CsdOtZI6.js} +411 -397
  81. package/dist/chunks/validators-DFeDcdpA.cjs +1 -0
  82. package/dist/dashboard/index.cjs +1 -1
  83. package/dist/dashboard/index.js +1 -1
  84. package/dist/dashboard-authoring/index.cjs +3 -3
  85. package/dist/dashboard-authoring/index.js +233 -227
  86. package/dist/data-app-builder/index.cjs +1 -1
  87. package/dist/data-app-builder/index.js +3 -3
  88. package/dist/data-app-codegen/index.cjs +1 -1
  89. package/dist/data-app-codegen/index.js +2 -2
  90. package/dist/data-app-codegen-node/index.cjs +1 -1
  91. package/dist/data-app-codegen-node/index.js +3 -3
  92. package/dist/data-app-sdk/index.cjs +1 -1
  93. package/dist/data-app-sdk/index.js +5 -5
  94. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  95. package/dist/data-app-sdk-adapters/index.js +2 -2
  96. package/dist/data-app-sdk-validation/index.cjs +1 -1
  97. package/dist/data-app-sdk-validation/index.js +5 -5
  98. package/dist/format-utils/index.cjs +3 -3
  99. package/dist/format-utils/index.js +291 -397
  100. package/dist/index.cjs +1 -1
  101. package/dist/index.js +15 -15
  102. package/dist/pdf-table-layout/index.cjs +1 -0
  103. package/dist/pdf-table-layout/index.js +993 -0
  104. package/dist/report-runtime-context/index.cjs +1 -1
  105. package/dist/report-runtime-context/index.js +2 -2
  106. package/dist/style.css +1 -1
  107. package/dist/surfboard/index.cjs +1 -1
  108. package/dist/surfboard/index.js +2 -2
  109. package/dist/types/briefings/index.d.ts +1 -1
  110. package/dist/types/components/document-sheet/document-input-bar.d.ts +1 -3
  111. package/dist/types/components/document-sheet/document-insert-picker.d.ts +37 -0
  112. package/dist/types/components/document-sheet/document-kpi-section.d.ts +17 -0
  113. package/dist/types/components/document-sheet/document-matrix-layout-context.d.ts +10 -0
  114. package/dist/types/components/document-sheet/document-matrix-section.d.ts +27 -0
  115. package/dist/types/components/document-sheet/document-measure-layer.d.ts +45 -0
  116. package/dist/types/components/document-sheet/document-outline.d.ts +7 -1
  117. package/dist/types/components/document-sheet/document-page-navigation.d.ts +22 -0
  118. package/dist/types/components/document-sheet/document-page.d.ts +9 -5
  119. package/dist/types/components/document-sheet/document-panel/document-side-panel.d.ts +36 -0
  120. package/dist/types/components/document-sheet/document-panel/inputs-panel.d.ts +9 -0
  121. package/dist/types/components/document-sheet/document-panel/page-panel.d.ts +5 -0
  122. package/dist/types/components/document-sheet/document-panel/panel-controls.d.ts +14 -0
  123. package/dist/types/components/document-sheet/document-panel/region-panels.d.ts +11 -0
  124. package/dist/types/components/document-sheet/document-panel/section-panel.d.ts +25 -0
  125. package/dist/types/components/document-sheet/document-section-print-boundary.d.ts +9 -0
  126. package/dist/types/components/document-sheet/document-table-chrome.d.ts +22 -0
  127. package/dist/types/components/document-sheet/document-table-section.d.ts +3 -7
  128. package/dist/types/components/document-sheet/document-text-preview-context.d.ts +8 -0
  129. package/dist/types/components/document-sheet/use-first-fitting-variant.d.ts +18 -0
  130. package/dist/types/components/editor/editor-main/dashboard-variable-node.d.ts +12 -2
  131. package/dist/types/components/explorer/chart-configuration/matrix-authoring-controls.d.ts +7 -2
  132. package/dist/types/components/text-variables/variable-chip-plugin.d.ts +23 -0
  133. package/dist/types/components/text-variables/variable-chip.d.ts +18 -0
  134. package/dist/types/components/text-variables/variable-picker.d.ts +27 -0
  135. package/dist/types/components/visual/aggregated-table/utils/metric-format-resolver.d.ts +3 -3
  136. package/dist/types/components/visual/data-table/types/data-table.d.ts +4 -1
  137. package/dist/types/components/visual/pivot-table/utils/pivot-metric-formatting.d.ts +2 -2
  138. package/dist/types/components/visual/settings/table-presentation-settings.d.ts +27 -1
  139. package/dist/types/index.cjs +1 -1
  140. package/dist/types/index.js +5 -5
  141. package/dist/types/lib/dashboard-inputs/text-variable-options.d.ts +15 -0
  142. package/dist/types/lib/document/document-canvas-actions.d.ts +22 -0
  143. package/dist/types/lib/document/document-edits.d.ts +119 -0
  144. package/dist/types/lib/document/document-kpi-figure.d.ts +27 -0
  145. package/dist/types/lib/document/document-kpi-layout.d.ts +29 -0
  146. package/dist/types/lib/document/document-kpi-section-edits.d.ts +15 -0
  147. package/dist/types/lib/document/document-matrix-bands.d.ts +66 -0
  148. package/dist/types/lib/document/document-matrix-print.d.ts +11 -0
  149. package/dist/types/lib/document/document-pagination.d.ts +56 -3
  150. package/dist/types/lib/document/document-panel-target.d.ts +19 -0
  151. package/dist/types/lib/document/document-section-editor.d.ts +8 -7
  152. package/dist/types/lib/document/document-section-kinds.d.ts +49 -0
  153. package/dist/types/lib/document/document-section-query-options.d.ts +25 -0
  154. package/dist/types/lib/document/document-section-render-state.d.ts +26 -0
  155. package/dist/types/lib/document/document-section-utils.d.ts +11 -4
  156. package/dist/types/lib/document/document-table-dom.d.ts +4 -6
  157. package/dist/types/lib/document/document-table-pagination-model.d.ts +0 -5
  158. package/dist/types/lib/document/document-table-print-model.d.ts +4 -3
  159. package/dist/types/lib/document/document-table-style.d.ts +15 -4
  160. package/dist/types/lib/document/document-table-surface.d.ts +15 -0
  161. package/dist/types/lib/document/document-variables.d.ts +40 -6
  162. package/dist/types/lib/document/use-document-section-data.d.ts +39 -0
  163. package/dist/types/lib/document/use-measured-document-table-layout.d.ts +50 -0
  164. package/dist/types/lib/formatters/kpi-result-values.d.ts +20 -0
  165. package/dist/types/lib/formatters/metric-formatting.d.ts +3 -3
  166. package/dist/types/lib/hooks/query-context/use-dashboard-card-execution-snapshot.d.ts +8 -2
  167. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +6 -0
  168. package/dist/types/lib/hooks/use-dashboard-kpi-actions.d.ts +1 -1
  169. package/dist/types/lib/hooks/use-document-section-editor.d.ts +2 -2
  170. package/dist/types/lib/hooks/use-document-section-session.d.ts +36 -0
  171. package/dist/types/lib/hooks/use-editor-preview.d.ts +17 -0
  172. package/dist/types/lib/hooks/use-is-editing-card.d.ts +7 -0
  173. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +2 -0
  174. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +2 -0
  175. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
  176. package/dist/types/lib/matrix-table/matrix-layout-read.d.ts +68 -0
  177. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +8 -1
  178. package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +4 -2
  179. package/dist/types/lib/query-context/card-execution.d.ts +30 -0
  180. package/dist/types/lib/query-context/document-section-card-query.d.ts +37 -0
  181. package/dist/types/lib/stores/dashboard-store.d.ts +12 -8
  182. package/dist/types/lib/stores/editor-store.d.ts +2 -0
  183. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +1 -0
  184. package/dist/types/lib/text-variables/text-variable-types.d.ts +39 -0
  185. package/dist/types/lib/types/common-types.d.ts +34 -1
  186. package/dist/types/lib/utils/card-definition.d.ts +2 -0
  187. package/dist/types/lib/utils/card-utils.d.ts +13 -6
  188. package/dist/types/lib/utils/date-timezone-utils.d.ts +26 -4
  189. package/dist/types/pdf-table-layout.d.ts +2 -0
  190. package/dist/types/shared/analytics-protocol/index.d.ts +1 -1
  191. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +45 -0
  192. package/dist/types/shared/analytics-protocol/matrix-member-presentation.d.ts +4 -0
  193. package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +56 -0
  194. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  195. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +36 -1
  196. package/dist/types/shared/format-utils/formatters/duration-formatter.d.ts +4 -1
  197. package/dist/types/shared/format-utils/formatters/index.d.ts +2 -2
  198. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -0
  199. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +8 -2
  200. package/dist/types/shared/format-utils/index.d.ts +1 -0
  201. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +690 -1
  202. package/dist/types/shared/format-utils/matrix-print.d.ts +38 -0
  203. package/dist/types/shared/format-utils/pdf-table-layout/column-bands.d.ts +55 -0
  204. package/dist/types/shared/format-utils/pdf-table-layout/index.d.ts +6 -0
  205. package/dist/types/shared/format-utils/pdf-table-layout/page-size.d.ts +7 -0
  206. package/dist/types/shared/format-utils/pdf-table-layout/table-column-semantics.d.ts +106 -0
  207. package/dist/types/shared/format-utils/pdf-table-layout/table-column-widths.d.ts +13 -0
  208. package/dist/types/shared/format-utils/pdf-table-layout/table-page-geometry.d.ts +19 -0
  209. package/dist/types/shared/format-utils/pdf-table-layout/wide-table-layout.d.ts +46 -0
  210. package/dist/types/shared/format-utils/presentation-execution.d.ts +17 -2
  211. package/dist/types/shared/format-utils/table-structure.d.ts +9 -0
  212. package/dist/types/shared/format-utils/types/format-types.d.ts +16 -1
  213. package/package.json +6 -1
  214. package/dist/chunks/edit-dashboard-visual-BwJ2Eljw.cjs +0 -172
  215. package/dist/chunks/field-aggregations-jSi77h9Z.cjs +0 -1
  216. package/dist/chunks/index-DhlVxvyI.cjs +0 -4
  217. package/dist/chunks/index-DrOFJOCq.cjs +0 -1424
  218. package/dist/chunks/index-F25jnH0p.cjs +0 -1
  219. package/dist/chunks/matrix-formatter-BLunke3R.js +0 -424
  220. package/dist/chunks/matrix-formatter-CveLJo6S.cjs +0 -1
  221. package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +0 -1
  222. package/dist/chunks/pivot-header-presentation-Cxz8-06f.cjs +0 -5
  223. package/dist/chunks/pivot-header-presentation-Dm9dUQsl.js +0 -415
  224. package/dist/chunks/pivot-result-lifecycle-BiERyXnS.cjs +0 -1
  225. package/dist/chunks/raw-temporal-BUeTpG76.cjs +0 -1
  226. package/dist/chunks/semantic-format-BzH69TRq.cjs +0 -1
  227. package/dist/chunks/switch--Re1K566.cjs +0 -134
  228. package/dist/chunks/validators-DVYAnnX0.cjs +0 -1
@@ -0,0 +1,341 @@
1
+ import { b5 as v, S as p, al as N, W as _ } from "./validators-CsdOtZI6.js";
2
+ import "./matrix-operation-contract-D32U2CSw.js";
3
+ import { t as m, c as L, g as I, e as A, a as d, b as C, d as O, f as R } from "./semantic-format-DwqGYx4V.js";
4
+ import { f as S, i as Z } from "./index-C8w91oj4.js";
5
+ import { f as k, w as z, n as X, l as V, g as E, i as P } from "./raw-temporal-BqOfk-xN.js";
6
+ import { b as g, c as y } from "./constants-DeLIHVAW.js";
7
+ import { c as $, f as Y } from "./temporal-bucket-DlFuhCnT.js";
8
+ function T(t, e) {
9
+ const n = m(t), s = m(e), r = n.getTime() - s.getTime();
10
+ return r < 0 ? -1 : r > 0 ? 1 : r;
11
+ }
12
+ function j(t) {
13
+ return L(t, Date.now());
14
+ }
15
+ function B(t, e) {
16
+ const n = m(t), s = m(e), r = n.getFullYear() - s.getFullYear(), o = n.getMonth() - s.getMonth();
17
+ return r * 12 + o;
18
+ }
19
+ function H(t) {
20
+ return (e) => {
21
+ const s = (t ? Math[t] : Math.trunc)(e);
22
+ return s === 0 ? 0 : s;
23
+ };
24
+ }
25
+ function U(t, e) {
26
+ return +m(t) - +m(e);
27
+ }
28
+ function W(t) {
29
+ const e = m(t);
30
+ return e.setHours(23, 59, 59, 999), e;
31
+ }
32
+ function q(t) {
33
+ const e = m(t), n = e.getMonth();
34
+ return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
35
+ }
36
+ function G(t) {
37
+ const e = m(t);
38
+ return +W(e) == +q(e);
39
+ }
40
+ function K(t, e) {
41
+ const n = m(t), s = m(e), r = T(n, s), o = Math.abs(
42
+ B(n, s)
43
+ );
44
+ let l;
45
+ if (o < 1)
46
+ l = 0;
47
+ else {
48
+ n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - r * o);
49
+ let a = T(n, s) === -r;
50
+ G(m(t)) && o === 1 && T(t, s) === 1 && (a = !1), l = r * (o - Number(a));
51
+ }
52
+ return l === 0 ? 0 : l;
53
+ }
54
+ function J(t, e, n) {
55
+ const s = U(t, e) / 1e3;
56
+ return H(n == null ? void 0 : n.roundingMethod)(s);
57
+ }
58
+ function Q(t, e, n) {
59
+ const s = I(), r = (n == null ? void 0 : n.locale) ?? s.locale ?? A, o = 2520, l = T(t, e);
60
+ if (isNaN(l))
61
+ throw new RangeError("Invalid time value");
62
+ const a = Object.assign({}, n, {
63
+ addSuffix: n == null ? void 0 : n.addSuffix,
64
+ comparison: l
65
+ });
66
+ let h, u;
67
+ l > 0 ? (h = m(e), u = m(t)) : (h = m(t), u = m(e));
68
+ const f = J(u, h), c = (d(u) - d(h)) / 1e3, i = Math.round((f - c) / 60);
69
+ let M;
70
+ if (i < 2)
71
+ return n != null && n.includeSeconds ? f < 5 ? r.formatDistance("lessThanXSeconds", 5, a) : f < 10 ? r.formatDistance("lessThanXSeconds", 10, a) : f < 20 ? r.formatDistance("lessThanXSeconds", 20, a) : f < 40 ? r.formatDistance("halfAMinute", 0, a) : f < 60 ? r.formatDistance("lessThanXMinutes", 1, a) : r.formatDistance("xMinutes", 1, a) : i === 0 ? r.formatDistance("lessThanXMinutes", 1, a) : r.formatDistance("xMinutes", i, a);
72
+ if (i < 45)
73
+ return r.formatDistance("xMinutes", i, a);
74
+ if (i < 90)
75
+ return r.formatDistance("aboutXHours", 1, a);
76
+ if (i < g) {
77
+ const D = Math.round(i / 60);
78
+ return r.formatDistance("aboutXHours", D, a);
79
+ } else {
80
+ if (i < o)
81
+ return r.formatDistance("xDays", 1, a);
82
+ if (i < y) {
83
+ const D = Math.round(i / g);
84
+ return r.formatDistance("xDays", D, a);
85
+ } else if (i < y * 2)
86
+ return M = Math.round(i / y), r.formatDistance("aboutXMonths", M, a);
87
+ }
88
+ if (M = K(u, h), M < 12) {
89
+ const D = Math.round(i / y);
90
+ return r.formatDistance("xMonths", D, a);
91
+ } else {
92
+ const D = M % 12, b = Math.trunc(M / 12);
93
+ return D < 3 ? r.formatDistance("aboutXYears", b, a) : D < 9 ? r.formatDistance("overXYears", b, a) : r.formatDistance("almostXYears", b + 1, a);
94
+ }
95
+ }
96
+ function F(t, e) {
97
+ return Q(t, j(t), e);
98
+ }
99
+ function Me(t, e) {
100
+ return t && t !== "auto" ? t : e;
101
+ }
102
+ function De(t, e = /* @__PURE__ */ new Date()) {
103
+ try {
104
+ const n = {
105
+ timeZone: t,
106
+ timeZoneName: "short"
107
+ }, r = new Intl.DateTimeFormat("en-US", n).formatToParts(e).find((o) => o.type === "timeZoneName");
108
+ return (r == null ? void 0 : r.value) || t;
109
+ } catch {
110
+ return t;
111
+ }
112
+ }
113
+ function ye(t) {
114
+ try {
115
+ const e = {
116
+ timeZone: t,
117
+ timeZoneName: "long"
118
+ }, s = new Intl.DateTimeFormat("en-US", e).formatToParts(
119
+ /* @__PURE__ */ new Date()
120
+ ).find((r) => r.type === "timeZoneName");
121
+ return (s == null ? void 0 : s.value) || t;
122
+ } catch {
123
+ return t;
124
+ }
125
+ }
126
+ function w(t, e = "auto") {
127
+ if (!t)
128
+ return /* @__PURE__ */ new Date(NaN);
129
+ const n = t.endsWith("Z"), s = /[+-]\d{2}:?\d{2}$/.test(t), r = /\([A-Z]{3,4}\)$/.test(t);
130
+ if (e === "auto")
131
+ return n || s || r ? new Date(t) : /* @__PURE__ */ new Date(t + "Z");
132
+ if (e === "local") {
133
+ if (n || s) {
134
+ const o = t.replace(/Z$/, "").replace(/[+-]\d{2}:?\d{2}$/, "");
135
+ return new Date(o);
136
+ }
137
+ return new Date(t);
138
+ } else return e === "UTC" ? n ? new Date(t) : s ? new Date(t) : /* @__PURE__ */ new Date(t + "Z") : n || s || r ? new Date(t) : S(t, e);
139
+ }
140
+ const ee = "MM/dd/yyyy", te = (t, e, n, s = "auto") => {
141
+ if (!t)
142
+ return "";
143
+ try {
144
+ const r = w(t, s);
145
+ if (isNaN(r.getTime()))
146
+ return t;
147
+ const l = (e && e.trim() ? e : ee).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
148
+ return n && n !== "auto" ? C(r, n, l) : O(r, l);
149
+ } catch (r) {
150
+ return console.error("Date formatting error:", r), t;
151
+ }
152
+ }, ne = (t, e = "auto") => {
153
+ if (!t)
154
+ return "";
155
+ try {
156
+ const n = w(t, e);
157
+ return isNaN(n.getTime()) ? t : F(n, { addSuffix: !0 });
158
+ } catch (n) {
159
+ return console.error("Relative time formatting error:", n), t;
160
+ }
161
+ };
162
+ function re(t, e, n, s) {
163
+ const r = t instanceof Date ? t.toISOString() : String(t), o = (s == null ? void 0 : s.browserTimezone) || n, l = (s == null ? void 0 : s.isSqlCard) ?? !1;
164
+ if (e != null && e.useRelativeTime)
165
+ return ne(
166
+ r,
167
+ (e == null ? void 0 : e.sourceTimezone) || "auto"
168
+ );
169
+ const a = e != null && e.useCustomFormat && (e != null && e.customFormat) ? e.customFormat : (e == null ? void 0 : e.format) || "MM/dd/yyyy";
170
+ return te(
171
+ r,
172
+ a,
173
+ e != null && e.timezone && (e == null ? void 0 : e.timezone) !== "auto" ? e.timezone : l ? o : n,
174
+ (e == null ? void 0 : e.sourceTimezone) || "auto"
175
+ );
176
+ }
177
+ function x(t, e, n) {
178
+ var l, a;
179
+ if (t == null)
180
+ return t === null ? ((l = n.absence) == null ? void 0 : l.nullText) ?? "" : ((a = n.absence) == null ? void 0 : a.emptyText) ?? "";
181
+ const s = v(t) ? t : void 0, r = s ? s.value : t, o = s ?? (typeof t == "number" ? t : void 0);
182
+ if (!n.useFormattedValues || !e)
183
+ return String(r);
184
+ switch (e.type) {
185
+ case "number":
186
+ return o !== void 0 ? k(
187
+ o,
188
+ e.numberFormat,
189
+ n.locale
190
+ ) : String(r);
191
+ case "date":
192
+ return re(
193
+ r,
194
+ e.dateFormat,
195
+ n.timezone,
196
+ {
197
+ browserTimezone: n.browserTimezone,
198
+ isSqlCard: n.isSqlCard
199
+ }
200
+ );
201
+ case "progress":
202
+ return o !== void 0 ? `${r}%` : String(r);
203
+ case "badge":
204
+ case "link":
205
+ case "text":
206
+ case "none":
207
+ default:
208
+ return String(r);
209
+ }
210
+ }
211
+ function Te(t, e) {
212
+ return e.visibleColumns.map((n) => {
213
+ const s = t[n], r = e.columnSettings[n];
214
+ return x(s, r, {
215
+ useFormattedValues: e.useFormattedValues,
216
+ timezone: e.timezone,
217
+ locale: e.locale
218
+ });
219
+ });
220
+ }
221
+ function se(t, e) {
222
+ var r;
223
+ const n = t[t.length - 1];
224
+ if (!n) return "";
225
+ if (n.member.kind === "others") return "Others";
226
+ const s = n.member.value;
227
+ return s === null ? "(Blank)" : ((r = e == null ? void 0 : e.get(n.levelId)) == null ? void 0 : r(s)) ?? (typeof s == "object" ? s.value : String(s));
228
+ }
229
+ function ae(t, e, n) {
230
+ return t === "grand_total" ? n ?? "Grand Total" : t === "subtotal" ? (n == null ? void 0 : n.split(_).join(e)) ?? `${e} Total` : e;
231
+ }
232
+ function be(t, e, n, s) {
233
+ var l;
234
+ const r = t[t.length - 1], o = e === "grand_total" ? n.grand.label : r ? (l = n.levels[r.levelId]) == null ? void 0 : l.label : void 0;
235
+ return ae(e, se(t, s), o);
236
+ }
237
+ function pe(t, e, n) {
238
+ return t.kind === "value" ? (e == null ? void 0 : e(t.value)) ?? "" : t.kind === "null" ? n.nullText : n.emptyText;
239
+ }
240
+ function de(t) {
241
+ const { path: e, previousPath: n, role: s, repeatLabels: r, levelCount: o } = t;
242
+ return Array.from({ length: o }, (l, a) => {
243
+ const h = e.slice(0, a + 1), u = s === "grand_total" ? a === 0 : s === "subtotal" && a === e.length - 1, f = n && n.length > a && p(n.slice(0, a + 1)) === p(h);
244
+ return {
245
+ path: h,
246
+ total: u,
247
+ visible: u || e.length > a && (r || !f || a === e.length - 1)
248
+ };
249
+ });
250
+ }
251
+ function oe(t, e) {
252
+ return R(t ?? e, {
253
+ preserveOmittedProperties: !0,
254
+ numericInput: "canonical"
255
+ });
256
+ }
257
+ function ge(t, e, n) {
258
+ const s = /* @__PURE__ */ new Map(), r = (o, l) => {
259
+ const a = (l === "levels" ? e.levelFormats : e.measureFormats)[o.id], h = o.semanticFormat, u = oe(a, h);
260
+ l === "measures" && s.set(o.id, {
261
+ isNumeric: N(o.column.dataType) === "number",
262
+ // Use normalized affixes: a redundant percent suffix is already removed.
263
+ hasTextAffixes: !!u && !!("prefix" in u && u.prefix || "suffix" in u && u.suffix)
264
+ });
265
+ const f = (c) => x(c, void 0, {
266
+ useFormattedValues: !0,
267
+ timezone: n.calendar.tz,
268
+ locale: n.valueFormat.locale,
269
+ absence: e.absence
270
+ });
271
+ if (o.column.temporalBucket) {
272
+ const c = o.column.temporalBucket, i = $({
273
+ metadata: c,
274
+ cardFormat: (a == null ? void 0 : a.type) === "temporal_bucket" ? a : void 0,
275
+ semanticFormat: (h == null ? void 0 : h.type) === "temporal_bucket" ? { granularity: c.granularity, format: h } : void 0,
276
+ locale: n.valueFormat.locale,
277
+ styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
278
+ });
279
+ return (M) => typeof M == "string" ? Y({ value: M, metadata: c, format: i.format }) : f(M);
280
+ }
281
+ if (o.column.rawTemporal) {
282
+ const c = z({
283
+ metadata: o.column.rawTemporal,
284
+ format: X({
285
+ format: (u == null ? void 0 : u.type) === "date" ? {
286
+ type: "raw_temporal",
287
+ timezone: u.timezone,
288
+ sourceTimezone: u.sourceTimezone,
289
+ presentation: u.pattern ? {
290
+ mode: "pattern",
291
+ dialect: "semaphor_tokens",
292
+ pattern: u.pattern
293
+ } : { mode: "auto" }
294
+ } : void 0,
295
+ preferences: n.valueFormat,
296
+ calendar: n.calendar
297
+ })
298
+ });
299
+ return (i) => {
300
+ if (typeof i != "string") return f(i);
301
+ const M = c(i);
302
+ return M.ok ? M.text : f(i);
303
+ };
304
+ }
305
+ if (Z(u)) {
306
+ const c = V(u, n.valueFormat);
307
+ return (i) => typeof i == "number" || typeof i == "object" && i !== null ? E(i, c) : f(i);
308
+ }
309
+ return (u == null ? void 0 : u.type) === "duration" ? (c) => typeof c == "number" || typeof c == "string" || typeof c == "object" && c !== null ? P(
310
+ typeof c == "object" ? c.value : c,
311
+ u
312
+ ) : f(c) : (u == null ? void 0 : u.type) === "string" ? (c) => c === null ? f(c) : `${u.prefix ?? ""}${f(c)}${u.suffix ?? ""}` : f;
313
+ };
314
+ return {
315
+ levels: new Map(
316
+ t.levels.map((o) => [o.id, r(o, "levels")])
317
+ ),
318
+ measures: new Map(
319
+ t.measures.map((o) => [o.id, r(o, "measures")])
320
+ ),
321
+ measureSemantics: s
322
+ };
323
+ }
324
+ export {
325
+ te as a,
326
+ ne as b,
327
+ ye as c,
328
+ x as d,
329
+ ge as e,
330
+ Te as f,
331
+ De as g,
332
+ be as h,
333
+ de as i,
334
+ pe as j,
335
+ F as k,
336
+ oe as l,
337
+ se as m,
338
+ ae as n,
339
+ w as p,
340
+ Me as r
341
+ };
@@ -1,5 +1,5 @@
1
- import { S as d } from "./validators-CkHsAvwB.js";
2
- const m = [
1
+ import { S as f } from "./validators-CsdOtZI6.js";
2
+ const h = [
3
3
  "=",
4
4
  "!=",
5
5
  ">",
@@ -14,11 +14,11 @@ const m = [
14
14
  "not in",
15
15
  "is null",
16
16
  "is not null"
17
- ], g = /* @__PURE__ */ new Set(["string", "number", "date", "boolean"]);
17
+ ], y = /* @__PURE__ */ new Set(["string", "number", "date", "boolean"]);
18
18
  function v(t) {
19
- return typeof t == "string" && m.includes(t);
19
+ return typeof t == "string" && h.includes(t);
20
20
  }
21
- function h(t, e) {
21
+ function b(t, e) {
22
22
  switch (t) {
23
23
  case "is null":
24
24
  case "is not null":
@@ -33,15 +33,15 @@ function h(t, e) {
33
33
  return e.length === 1;
34
34
  }
35
35
  }
36
- function y(t) {
36
+ function P(t) {
37
37
  if (!t || typeof t != "object" || Array.isArray(t))
38
38
  return;
39
- const e = t, r = {};
40
- for (const o of b)
41
- e[o] !== void 0 && (r[o] = e[o]);
42
- return r;
39
+ const e = t, n = {};
40
+ for (const r of S)
41
+ e[r] !== void 0 && (n[r] = e[r]);
42
+ return n;
43
43
  }
44
- const b = [
44
+ const S = [
45
45
  "operation",
46
46
  "values",
47
47
  "valueType",
@@ -49,30 +49,30 @@ const b = [
49
49
  "relativeMeta",
50
50
  "temporalPrecision"
51
51
  ];
52
- function P(t) {
53
- const e = y(t);
52
+ function w(t) {
53
+ const e = P(t);
54
54
  if (!e) return;
55
- const { operation: r, values: o } = e;
56
- if (!v(r) || !Array.isArray(o) || !h(r, o)) return;
57
- const n = typeof e.valueType == "string" && g.has(e.valueType) ? e.valueType : void 0;
55
+ const { operation: n, values: r } = e;
56
+ if (!v(n) || !Array.isArray(r) || !b(n, r)) return;
57
+ const o = typeof e.valueType == "string" && y.has(e.valueType) ? e.valueType : void 0;
58
58
  return {
59
- operation: r,
60
- values: o,
61
- ...n ? { valueType: n } : {},
59
+ operation: n,
60
+ values: r,
61
+ ...o ? { valueType: o } : {},
62
62
  ...e.temporalBucket !== void 0 ? { temporalBucket: e.temporalBucket } : {},
63
63
  ...e.relativeMeta !== void 0 ? { relativeMeta: e.relativeMeta } : {},
64
64
  ...e.temporalPrecision !== void 0 ? { temporalPrecision: e.temporalPrecision } : {}
65
65
  };
66
66
  }
67
67
  function N(t) {
68
- const e = P(t);
68
+ const e = w(t);
69
69
  if (!e)
70
70
  throw new Error(
71
71
  `Filter operation "${String(t.operation)}" cannot be expressed as predicate semantics.`
72
72
  );
73
73
  return e;
74
74
  }
75
- function w(t) {
75
+ function k(t) {
76
76
  return t.operation === "is null" || t.operation === "is not null";
77
77
  }
78
78
  function c(t) {
@@ -84,54 +84,54 @@ function c(t) {
84
84
  t.temporalBucket ?? null
85
85
  ]);
86
86
  }
87
- function S(t) {
87
+ function A(t) {
88
88
  return JSON.stringify(t.map(c).sort());
89
89
  }
90
- function f(t) {
90
+ function m(t) {
91
91
  const e = /* @__PURE__ */ new Map();
92
- for (const r of t)
93
- for (const o of r.tuples) {
94
- const n = o.conditions.filter(
92
+ for (const n of t)
93
+ for (const r of n.tuples) {
94
+ const o = r.conditions.filter(
95
95
  (l) => {
96
96
  var i;
97
97
  return (i = l.field) == null ? void 0 : i.id;
98
98
  }
99
99
  );
100
- if (n.length === 0) continue;
101
- let s = e.get(r.sourceCardId);
102
- s || (s = /* @__PURE__ */ new Map(), e.set(r.sourceCardId, s));
103
- const a = [...n].sort(
100
+ if (o.length === 0) continue;
101
+ let s = e.get(n.sourceCardId);
102
+ s || (s = /* @__PURE__ */ new Map(), e.set(n.sourceCardId, s));
103
+ const a = [...o].sort(
104
104
  (l, i) => c(l).localeCompare(c(i))
105
105
  );
106
- s.set(S(a), a);
106
+ s.set(A(a), a);
107
107
  }
108
- return [...e.entries()].sort(([r], [o]) => r.localeCompare(o)).map(([r, o]) => ({
109
- sourceCardId: r,
110
- tuples: [...o.entries()].sort(([n], [s]) => n.localeCompare(s)).map(([, n]) => ({ conditions: n }))
108
+ return [...e.entries()].sort(([n], [r]) => n.localeCompare(r)).map(([n, r]) => ({
109
+ sourceCardId: n,
110
+ tuples: [...r.entries()].sort(([o], [s]) => o.localeCompare(s)).map(([, o]) => ({ conditions: o }))
111
111
  }));
112
112
  }
113
- function C(t) {
114
- const e = f(t);
113
+ function I(t) {
114
+ const e = m(t);
115
115
  if (e.length !== 0)
116
116
  return {
117
117
  id: "selection",
118
118
  logicalOperator: "AND",
119
119
  negate: !1,
120
120
  conditions: [],
121
- groups: e.map((r) => {
122
- const o = `selection:${r.sourceCardId}`;
121
+ groups: e.map((n) => {
122
+ const r = `selection:${n.sourceCardId}`;
123
123
  return {
124
- id: o,
124
+ id: r,
125
125
  logicalOperator: "OR",
126
126
  negate: !1,
127
127
  conditions: [],
128
- groups: r.tuples.map((n, s) => {
129
- const a = `${o}:${s}`;
128
+ groups: n.tuples.map((o, s) => {
129
+ const a = `${r}:${s}`;
130
130
  return {
131
131
  id: a,
132
132
  logicalOperator: "AND",
133
133
  negate: !1,
134
- conditions: n.conditions.map((l, i) => ({
134
+ conditions: o.conditions.map((l, i) => ({
135
135
  ...l,
136
136
  id: `${a}:${i}`
137
137
  })),
@@ -142,41 +142,41 @@ function C(t) {
142
142
  })
143
143
  };
144
144
  }
145
- function I(t) {
145
+ function T(t) {
146
146
  return JSON.stringify(
147
- f(t).map((e) => [
147
+ m(t).map((e) => [
148
148
  e.sourceCardId,
149
- e.tuples.map((r) => r.conditions.map(c))
149
+ e.tuples.map((n) => n.conditions.map(c))
150
150
  ])
151
151
  );
152
152
  }
153
- function A(t, e) {
154
- var o;
153
+ function C(t, e) {
154
+ var r;
155
155
  if (e === null) return !0;
156
156
  if (e.overrides.length === 0) return t.length <= e.depth;
157
- const r = d(t);
158
- return ((o = e.overrides.find((n) => n.path.length === t.length && d(n.path) === r)) == null ? void 0 : o.expanded) ?? t.length <= e.depth;
157
+ const n = f(t);
158
+ return ((r = e.overrides.find((o) => o.path.length === t.length && f(o.path) === n)) == null ? void 0 : r.expanded) ?? t.length <= e.depth;
159
159
  }
160
- function T(t) {
161
- var p;
162
- const { path: e, levelCount: r, expansion: o, total: n, axis: s } = t, a = e.length >= r || ((p = e[e.length - 1]) == null ? void 0 : p.member.kind) === "others", l = !a && !t.childrenEmpty, i = l && A(e, o), u = s === "rows" && t.rowLayout !== "tabular";
160
+ function O(t) {
161
+ var d;
162
+ const { path: e, levelCount: n, expansion: r, total: o, axis: s } = t, a = e.length >= n || ((d = e[e.length - 1]) == null ? void 0 : d.member.kind) === "others", l = !a && !t.childrenEmpty, i = l && C(e, r), p = s === "rows" && t.rowLayout !== "tabular", g = i && !!t.skipRedundant && !!t.singleChild, u = !!(o != null && o.visible) && !g;
163
163
  return {
164
164
  expandable: l,
165
165
  expanded: i,
166
- memberVisible: u || !i,
167
- valueVisible: a || !!(n != null && n.visible) && (!i || n.position === "before"),
168
- subtotalBefore: !u && i && !!(n != null && n.visible) && n.position === "before",
169
- subtotalAfter: i && !!(n != null && n.visible) && n.position === "after"
166
+ memberVisible: p || !i,
167
+ valueVisible: a || u && (!i || o.position === "before"),
168
+ subtotalBefore: !p && i && u && o.position === "before",
169
+ subtotalAfter: i && u && o.position === "after"
170
170
  };
171
171
  }
172
172
  export {
173
- m as N,
174
- P as a,
175
- A as b,
176
- C as c,
177
- w as i,
178
- y as p,
179
- T as r,
180
- I as s,
173
+ h as N,
174
+ w as a,
175
+ C as b,
176
+ I as c,
177
+ k as i,
178
+ P as p,
179
+ O as r,
180
+ T as s,
181
181
  N as t
182
182
  };
@@ -0,0 +1 @@
1
+ "use strict";const f=require("./validators-DFeDcdpA.cjs"),m=["=","!=",">","<",">=","<=","like","not like","between","not between","in","not in","is null","is not null"],b=new Set(["string","number","date","boolean"]);function S(t){return typeof t=="string"&&m.includes(t)}function E(t,e){switch(t){case"is null":case"is not null":return e.length===0;case"between":case"not between":return e.length===2;case"in":case"not in":return e.length>=1;default:return e.length===1}}function g(t){if(!t||typeof t!="object"||Array.isArray(t))return;const e=t,n={};for(const r of N)e[r]!==void 0&&(n[r]=e[r]);return n}const N=["operation","values","valueType","temporalBucket","relativeMeta","temporalPrecision"];function h(t){const e=g(t);if(!e)return;const{operation:n,values:r}=e;if(!S(n)||!Array.isArray(r)||!E(n,r))return;const o=typeof e.valueType=="string"&&b.has(e.valueType)?e.valueType:void 0;return{operation:n,values:r,...o?{valueType:o}:{},...e.temporalBucket!==void 0?{temporalBucket:e.temporalBucket}:{},...e.relativeMeta!==void 0?{relativeMeta:e.relativeMeta}:{},...e.temporalPrecision!==void 0?{temporalPrecision:e.temporalPrecision}:{}}}function A(t){const e=h(t);if(!e)throw new Error(`Filter operation "${String(t.operation)}" cannot be expressed as predicate semantics.`);return e}function C(t){return t.operation==="is null"||t.operation==="is not null"}function c(t){var e;return JSON.stringify([((e=t.field)==null?void 0:e.id)??"",t.operator,t.value??null,t.temporalBucket??null])}function I(t){return JSON.stringify(t.map(c).sort())}function v(t){const e=new Map;for(const n of t)for(const r of n.tuples){const o=r.conditions.filter(l=>{var i;return(i=l.field)==null?void 0:i.id});if(o.length===0)continue;let a=e.get(n.sourceCardId);a||(a=new Map,e.set(n.sourceCardId,a));const s=[...o].sort((l,i)=>c(l).localeCompare(c(i)));a.set(I(s),s)}return[...e.entries()].sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>({sourceCardId:n,tuples:[...r.entries()].sort(([o],[a])=>o.localeCompare(a)).map(([,o])=>({conditions:o}))}))}function T(t){const e=v(t);if(e.length!==0)return{id:"selection",logicalOperator:"AND",negate:!1,conditions:[],groups:e.map(n=>{const r=`selection:${n.sourceCardId}`;return{id:r,logicalOperator:"OR",negate:!1,conditions:[],groups:n.tuples.map((o,a)=>{const s=`${r}:${a}`;return{id:s,logicalOperator:"AND",negate:!1,conditions:o.conditions.map((l,i)=>({...l,id:`${s}:${i}`})),groups:[]}})}})}}function w(t){return JSON.stringify(v(t).map(e=>[e.sourceCardId,e.tuples.map(n=>n.conditions.map(c))]))}function y(t,e){var r;if(e===null)return!0;if(e.overrides.length===0)return t.length<=e.depth;const n=f.matrixPathKey(t);return((r=e.overrides.find(o=>o.path.length===t.length&&f.matrixPathKey(o.path)===n))==null?void 0:r.expanded)??t.length<=e.depth}function k(t){var p;const{path:e,levelCount:n,expansion:r,total:o,axis:a}=t,s=e.length>=n||((p=e[e.length-1])==null?void 0:p.member.kind)==="others",l=!s&&!t.childrenEmpty,i=l&&y(e,r),d=a==="rows"&&t.rowLayout!=="tabular",P=i&&!!t.skipRedundant&&!!t.singleChild,u=!!(o!=null&&o.visible)&&!P;return{expandable:l,expanded:i,memberVisible:d||!i,valueVisible:s||u&&(!i||o.position==="before"),subtotalBefore:!d&&i&&u&&o.position==="before",subtotalAfter:i&&u&&o.position==="after"}}exports.NATIVE_PREDICATE_OPERATIONS=m;exports.compileSelectionFilterGroup=T;exports.isMatrixPathExpanded=y;exports.isNullCheckPredicate=C;exports.parseNativePredicateSemantics=h;exports.projectNativePredicateSemantics=g;exports.resolveMatrixMemberPresentation=k;exports.selectionFilterGroupKey=w;exports.toNativePredicateSemantics=A;