react-semaphor 0.1.506 → 0.1.508

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 (247) hide show
  1. package/DATA_APP_SDK.md +56 -0
  2. package/dist/analytics-protocol/index.cjs +1 -1
  3. package/dist/analytics-protocol/index.js +194 -172
  4. package/dist/appearance/index.cjs +1 -1
  5. package/dist/appearance/index.js +1 -1
  6. package/dist/appearance-runtime/index.cjs +1 -1
  7. package/dist/appearance-runtime/index.js +1 -1
  8. package/dist/brand-studio/index.cjs +2 -2
  9. package/dist/brand-studio/index.js +139 -119
  10. package/dist/briefings/index.cjs +1 -1
  11. package/dist/briefings/index.js +3 -3
  12. package/dist/chunks/appearance-context-DzqCdhB4.cjs +1 -0
  13. package/dist/chunks/{appearance-context-XviHOhWJ.js → appearance-context-VJdrKi7r.js} +2 -1
  14. package/dist/chunks/{appearance-runtime-provider-D0xVQWnH.js → appearance-runtime-provider-CC4HT2Gi.js} +2 -2
  15. package/dist/chunks/{appearance-runtime-provider-Ca8rxO86.cjs → appearance-runtime-provider-D5pkvgE4.cjs} +1 -1
  16. package/dist/chunks/calculated-field-identity-BiTGmnST.cjs +1 -0
  17. package/dist/chunks/calculated-field-identity-CJL54uFx.js +1373 -0
  18. package/dist/chunks/{constants-NUleP4DY.js → card-config-utils-Bq1enstT.js} +260 -260
  19. package/dist/chunks/card-config-utils-CMO4_zVs.cjs +1 -0
  20. package/dist/chunks/{dashboard-briefing-launcher-DXTpU85p.js → dashboard-briefing-launcher-B9l0ZAbv.js} +12 -12
  21. package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-C4zsM3Hd.cjs} +1 -1
  22. package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-BCQv4xWM.js} +16 -14
  23. package/dist/chunks/dashboard-controls-CWwllVOe.cjs +52 -0
  24. package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-BtU_q_0A.js} +9 -9
  25. package/dist/chunks/dashboard-json-DVj2xLsH.cjs +1 -0
  26. package/dist/chunks/edit-dashboard-visual-CO2IVBOq.cjs +172 -0
  27. package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-RgFUx-py.js} +1986 -1990
  28. package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-BE8Fby6n.cjs} +2 -2
  29. package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-D-MaqTIs.js} +6 -6
  30. package/dist/chunks/field-aggregations-DUb0NU6c.js +1229 -0
  31. package/dist/chunks/field-aggregations-jSi77h9Z.cjs +1 -0
  32. package/dist/chunks/{field-dependencies-DVl2p1Nm.js → field-dependencies-Cl97kkHy.js} +30 -34
  33. package/dist/chunks/{field-dependencies-r_U0CGQ-.cjs → field-dependencies-DIab72rQ.cjs} +1 -1
  34. package/dist/chunks/{index-BVr4fcCB.js → index-0pdaQ9e1.js} +5 -5
  35. package/dist/chunks/index-BaIrLSBb.cjs +1422 -0
  36. package/dist/chunks/{index-De2QNsqV.js → index-ByiS9sB4.js} +45343 -43665
  37. package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
  38. package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
  39. package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
  40. package/dist/chunks/{matrix-card-DACDwdTq.js → matrix-card-CnKQpnsj.js} +1 -1
  41. package/dist/chunks/{matrix-card-CRXcmAjp.cjs → matrix-card-U4c72doZ.cjs} +1 -1
  42. package/dist/chunks/{matrix-control-sources-ClQzIk7E.js → matrix-control-sources-CRRdP03Q.js} +165 -134
  43. package/dist/chunks/matrix-control-sources-FjxGIbqk.cjs +1 -0
  44. package/dist/chunks/{matrix-formatter-7GLTcBuy.cjs → matrix-formatter-CveLJo6S.cjs} +1 -1
  45. package/dist/chunks/{matrix-formatter-xsq7n_e6.js → matrix-formatter-ZVS5QOuq.js} +2 -2
  46. package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +1 -0
  47. package/dist/chunks/matrix-member-presentation-CzGZJd3a.js +182 -0
  48. package/dist/chunks/matrix-operation-contract-DoiWTUbT.cjs +1 -0
  49. package/dist/chunks/matrix-operation-contract-xL8IhFzp.js +1802 -0
  50. package/dist/chunks/{pivot-header-presentation-3wqWChFd.cjs → pivot-header-presentation-Cxz8-06f.cjs} +1 -1
  51. package/dist/chunks/{pivot-header-presentation-D44ODZGn.js → pivot-header-presentation-DVylCBHB.js} +2 -2
  52. package/dist/chunks/{pivot-result-lifecycle-DZ0ZSMoM.cjs → pivot-result-lifecycle-BiERyXnS.cjs} +1 -1
  53. package/dist/chunks/{pivot-result-lifecycle-BSmqVkVG.js → pivot-result-lifecycle-CmjpW7qG.js} +1 -1
  54. package/dist/chunks/{report-preferences-dialog-xADifRXs.js → report-preferences-dialog-BbkXcnnn.js} +4 -4
  55. package/dist/chunks/report-preferences-dialog-C9rpWgQZ.cjs +1 -0
  56. package/dist/chunks/{search-BHsQIWBV.js → selection-reducer-B94WgZ9V.js} +55 -11
  57. package/dist/chunks/selection-reducer-CGKKsaPa.cjs +26 -0
  58. package/dist/chunks/{semantic-format-BhIL1PXP.cjs → semantic-format-BzH69TRq.cjs} +1 -1
  59. package/dist/chunks/{semantic-format-C3amkGmY.js → semantic-format-CBlRO8Aw.js} +1 -1
  60. package/dist/chunks/{switch-DHGiC0aU.js → switch-CD4uGTZI.js} +7450 -7694
  61. package/dist/chunks/switch-iC1x2dcE.cjs +134 -0
  62. package/dist/chunks/token-types-Ahh5u4iT.cjs +1 -0
  63. package/dist/chunks/token-types-CPde8_LG.js +8 -0
  64. package/dist/chunks/{update-policy-Cc9h57pA.cjs → update-policy-COjFudhl.cjs} +1 -1
  65. package/dist/chunks/{update-policy-eTcz52jO.js → update-policy-D9q1Tz8k.js} +1 -1
  66. package/dist/dashboard/index.cjs +1 -1
  67. package/dist/dashboard/index.js +1 -1
  68. package/dist/dashboard-authoring/index.cjs +3 -3
  69. package/dist/dashboard-authoring/index.js +734 -622
  70. package/dist/data-app-builder/index.cjs +1 -1
  71. package/dist/data-app-builder/index.js +3 -3
  72. package/dist/data-app-codegen/index.cjs +1 -1
  73. package/dist/data-app-codegen/index.js +2 -2
  74. package/dist/data-app-codegen-node/index.cjs +94 -92
  75. package/dist/data-app-codegen-node/index.js +337 -333
  76. package/dist/data-app-sdk/index.cjs +9 -9
  77. package/dist/data-app-sdk/index.js +1091 -969
  78. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  79. package/dist/data-app-sdk-adapters/index.js +104 -96
  80. package/dist/data-app-sdk-validation/index.cjs +1 -1
  81. package/dist/data-app-sdk-validation/index.js +2 -2
  82. package/dist/format-utils/index.cjs +1 -1
  83. package/dist/format-utils/index.js +8 -8
  84. package/dist/index.cjs +1 -1
  85. package/dist/index.js +15 -15
  86. package/dist/style.css +1 -1
  87. package/dist/surfboard/index.cjs +1 -1
  88. package/dist/surfboard/index.js +2 -2
  89. package/dist/types/brand-studio/brand-studio-draft.d.ts +3 -1
  90. package/dist/types/components/dashboard/card-selection-pill.d.ts +5 -0
  91. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  92. package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -0
  93. package/dist/types/components/dashboard/drill-navigation-controls.d.ts +3 -3
  94. package/dist/types/components/interactions/applied-filters-display.d.ts +6 -1
  95. package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +21 -0
  96. package/dist/types/components/interactions/dashboard-drill-host.d.ts +13 -0
  97. package/dist/types/components/interactions/filter-badge-tooltip.d.ts +4 -4
  98. package/dist/types/components/interactions/insight-modal.d.ts +4 -14
  99. package/dist/types/components/interactions/insight-viewer.d.ts +7 -19
  100. package/dist/types/components/interactions/interactions-sheet.d.ts +6 -0
  101. package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +20 -0
  102. package/dist/types/components/interactions/reusable/interaction-selection-popover.d.ts +2 -2
  103. package/dist/types/components/interactions/sheet/action-editor.d.ts +17 -0
  104. package/dist/types/components/interactions/sheet/action-meta.d.ts +45 -0
  105. package/dist/types/components/interactions/sheet/action-picker.d.ts +7 -0
  106. package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +10 -0
  107. package/dist/types/components/interactions/sheet/interactions-home.d.ts +28 -0
  108. package/dist/types/components/interactions/sheet/sheet-parts.d.ts +37 -0
  109. package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +28 -1
  110. package/dist/types/components/surfboard/filter/selection-chip.d.ts +11 -0
  111. package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +4 -0
  112. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +3 -0
  113. package/dist/types/components/ui/resizable.d.ts +1 -1
  114. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +13 -1
  115. package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
  116. package/dist/types/data-app-sdk/adapters.d.ts +3 -2
  117. package/dist/types/data-app-sdk/builders.d.ts +2 -1
  118. package/dist/types/data-app-sdk/contracts.d.ts +44 -2
  119. package/dist/types/data-app-sdk/index.d.ts +1 -0
  120. package/dist/types/data-app-sdk/query-request.d.ts +7 -2
  121. package/dist/types/data-app-sdk/selection.d.ts +2 -0
  122. package/dist/types/index.cjs +1 -1
  123. package/dist/types/index.js +24 -23
  124. package/dist/types/lib/appearance/types.d.ts +3 -1
  125. package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
  126. package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
  127. package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
  128. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
  129. package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
  130. package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
  131. package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
  132. package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
  133. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
  134. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
  135. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
  136. package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
  137. package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
  138. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
  139. package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
  140. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
  141. package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
  142. package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
  143. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
  144. package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
  145. package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
  146. package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
  147. package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
  148. package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
  149. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
  150. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
  151. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  152. package/dist/types/lib/download-pdf.d.ts +0 -3
  153. package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
  154. package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
  155. package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
  156. package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
  157. package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
  158. package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
  159. package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
  160. package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
  161. package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
  162. package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
  163. package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
  164. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
  165. package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
  166. package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
  167. package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
  168. package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
  169. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
  170. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
  171. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
  172. package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
  173. package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
  174. package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
  175. package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
  176. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
  177. package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
  178. package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
  179. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
  180. package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
  181. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
  182. package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
  183. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  184. package/dist/types/lib/selection/selection-labels.d.ts +3 -0
  185. package/dist/types/lib/selection/selection-notices.d.ts +9 -0
  186. package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
  187. package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
  188. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  189. package/dist/types/lib/stores/index.d.ts +0 -2
  190. package/dist/types/lib/types/common-types.d.ts +60 -6
  191. package/dist/types/lib/types/explorer-types.d.ts +1 -22
  192. package/dist/types/lib/types/interaction-types.d.ts +6 -198
  193. package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
  194. package/dist/types/lib/utils/card-utils.d.ts +11 -0
  195. package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
  196. package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
  197. package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
  198. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
  199. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  200. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
  201. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
  202. package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
  203. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
  204. package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
  205. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  206. package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
  207. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  208. package/package.json +1 -1
  209. package/src/data-app-sdk/README.md +58 -1
  210. package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
  211. package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
  212. package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
  213. package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
  214. package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
  215. package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
  216. package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
  217. package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
  218. package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
  219. package/dist/chunks/index-C8XCKzB6.cjs +0 -1
  220. package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
  221. package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
  222. package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
  223. package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
  224. package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
  225. package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
  226. package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
  227. package/dist/chunks/search-BqqhaMx9.cjs +0 -26
  228. package/dist/chunks/switch-BytP6QY8.cjs +0 -139
  229. package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
  230. package/dist/types/components/interactions/interaction-card.d.ts +0 -59
  231. package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
  232. package/dist/types/components/interactions/interactions-list.d.ts +0 -50
  233. package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
  234. package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
  235. package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
  236. package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
  237. package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
  238. package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
  239. package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
  240. package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
  241. package/dist/types/lib/interactions/field-utils.d.ts +0 -11
  242. package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
  243. package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
  244. package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
  245. package/dist/types/lib/stores/drill-actions.d.ts +0 -139
  246. package/dist/types/lib/stores/interaction-store.d.ts +0 -113
  247. package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
@@ -1,51 +1,51 @@
1
1
  var te = Object.defineProperty;
2
2
  var re = (e, t, o) => t in e ? te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
3
  var x = (e, t, o) => re(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { s as oe, d as ne, U as ie, F as ae, a_ as P, G as se, am as B, ak as ce, u as j, $ as le } from "./validators-BDYzZFgs.js";
4
+ import { s as oe, d as ne, U as ie, F as ae, a_ as G, G as se, am as P, ak as ce, u as j, $ as le } from "./validators-BDYzZFgs.js";
5
5
  import { C as A } from "./common-types-C6cAQgyh.js";
6
- import "./matrix-operation-contract-Cqy4EW2H.js";
7
- import { g as de, r as ge } from "./calculated-field-identity-BTpUqfEu.js";
8
- import { g as ue } from "./field-aggregations-BU_3gHKR.js";
6
+ import "./matrix-operation-contract-xL8IhFzp.js";
7
+ import { v as de, y as ue } from "./calculated-field-identity-CJL54uFx.js";
8
+ import { v as ge } from "./field-aggregations-DUb0NU6c.js";
9
9
  import { ZodError as fe } from "zod";
10
- import { a as H } from "./matrix-card-DACDwdTq.js";
10
+ import { a as H } from "./matrix-card-CnKQpnsj.js";
11
11
  import { m as Y, a as Z } from "./constants-DeLIHVAW.js";
12
12
  function me(e, t) {
13
- const r = Oe(e);
13
+ const r = Ne(e);
14
14
  let i;
15
15
  if (r.date) {
16
- const d = Ne(r.date, 2);
17
- i = Te(d.restDateString, d.year);
16
+ const g = Oe(r.date, 2);
17
+ i = Te(g.restDateString, g.year);
18
18
  }
19
19
  if (!i || isNaN(i.getTime()))
20
20
  return /* @__PURE__ */ new Date(NaN);
21
21
  const a = i.getTime();
22
- let g = 0, u;
23
- if (r.time && (g = De(r.time), isNaN(g)))
22
+ let d = 0, u;
23
+ if (r.time && (d = De(r.time), isNaN(d)))
24
24
  return /* @__PURE__ */ new Date(NaN);
25
25
  if (r.timezone) {
26
26
  if (u = he(r.timezone), isNaN(u))
27
27
  return /* @__PURE__ */ new Date(NaN);
28
28
  } else {
29
- const d = new Date(a + g), N = /* @__PURE__ */ new Date(0);
30
- return N.setFullYear(
31
- d.getUTCFullYear(),
32
- d.getUTCMonth(),
33
- d.getUTCDate()
34
- ), N.setHours(
35
- d.getUTCHours(),
36
- d.getUTCMinutes(),
37
- d.getUTCSeconds(),
38
- d.getUTCMilliseconds()
39
- ), N;
29
+ const g = new Date(a + d), O = /* @__PURE__ */ new Date(0);
30
+ return O.setFullYear(
31
+ g.getUTCFullYear(),
32
+ g.getUTCMonth(),
33
+ g.getUTCDate()
34
+ ), O.setHours(
35
+ g.getUTCHours(),
36
+ g.getUTCMinutes(),
37
+ g.getUTCSeconds(),
38
+ g.getUTCMilliseconds()
39
+ ), O;
40
40
  }
41
- return new Date(a + g + u);
41
+ return new Date(a + d + u);
42
42
  }
43
43
  const b = {
44
44
  dateTimeDelimiter: /[T ]/,
45
45
  timeZoneDelimiter: /[Z ]/i,
46
46
  timezone: /([Z+-].*)$/
47
47
  }, pe = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, _e = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Ie = /^([+-])(\d{2})(?::?(\d{2}))?$/;
48
- function Oe(e) {
48
+ function Ne(e) {
49
49
  const t = {}, o = e.split(b.dateTimeDelimiter);
50
50
  let r;
51
51
  if (o.length > 2)
@@ -59,7 +59,7 @@ function Oe(e) {
59
59
  }
60
60
  return t;
61
61
  }
62
- function Ne(e, t) {
62
+ function Oe(e, t) {
63
63
  const o = new RegExp(
64
64
  "^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
65
65
  ), r = e.match(o);
@@ -74,24 +74,24 @@ function Te(e, t) {
74
74
  if (t === null) return /* @__PURE__ */ new Date(NaN);
75
75
  const o = e.match(pe);
76
76
  if (!o) return /* @__PURE__ */ new Date(NaN);
77
- const r = !!o[4], i = y(o[1]), a = y(o[2]) - 1, g = y(o[3]), u = y(o[4]), d = y(o[5]) - 1;
77
+ const r = !!o[4], i = R(o[1]), a = R(o[2]) - 1, d = R(o[3]), u = R(o[4]), g = R(o[5]) - 1;
78
78
  if (r)
79
- return ye(t, u, d) ? Ce(t, u, d) : /* @__PURE__ */ new Date(NaN);
79
+ return Re(t, u, g) ? ye(t, u, g) : /* @__PURE__ */ new Date(NaN);
80
80
  {
81
- const N = /* @__PURE__ */ new Date(0);
82
- return !Ee(t, a, g) || !Re(t, i) ? /* @__PURE__ */ new Date(NaN) : (N.setUTCFullYear(t, a, Math.max(i, g)), N);
81
+ const O = /* @__PURE__ */ new Date(0);
82
+ return !we(t, a, d) || !Ee(t, i) ? /* @__PURE__ */ new Date(NaN) : (O.setUTCFullYear(t, a, Math.max(i, d)), O);
83
83
  }
84
84
  }
85
- function y(e) {
85
+ function R(e) {
86
86
  return e ? parseInt(e) : 1;
87
87
  }
88
88
  function De(e) {
89
89
  const t = e.match(_e);
90
90
  if (!t) return NaN;
91
- const o = L(t[1]), r = L(t[2]), i = L(t[3]);
91
+ const o = v(t[1]), r = v(t[2]), i = v(t[3]);
92
92
  return be(o, r, i) ? o * Y + r * Z + i * 1e3 : NaN;
93
93
  }
94
- function L(e) {
94
+ function v(e) {
95
95
  return e && parseFloat(e.replace(",", ".")) || 0;
96
96
  }
97
97
  function he(e) {
@@ -101,23 +101,23 @@ function he(e) {
101
101
  const o = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), i = t[3] && parseInt(t[3]) || 0;
102
102
  return Ae(r, i) ? o * (r * Y + i * Z) : NaN;
103
103
  }
104
- function Ce(e, t, o) {
104
+ function ye(e, t, o) {
105
105
  const r = /* @__PURE__ */ new Date(0);
106
106
  r.setUTCFullYear(e, 0, 4);
107
107
  const i = r.getUTCDay() || 7, a = (t - 1) * 7 + o + 1 - i;
108
108
  return r.setUTCDate(r.getUTCDate() + a), r;
109
109
  }
110
- const we = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
110
+ const Ce = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
111
111
  function W(e) {
112
112
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
113
113
  }
114
- function Ee(e, t, o) {
115
- return t >= 0 && t <= 11 && o >= 1 && o <= (we[t] || (W(e) ? 29 : 28));
114
+ function we(e, t, o) {
115
+ return t >= 0 && t <= 11 && o >= 1 && o <= (Ce[t] || (W(e) ? 29 : 28));
116
116
  }
117
- function Re(e, t) {
117
+ function Ee(e, t) {
118
118
  return t >= 1 && t <= (W(e) ? 366 : 365);
119
119
  }
120
- function ye(e, t, o) {
120
+ function Re(e, t, o) {
121
121
  return t >= 1 && t <= 53 && o >= 0 && o <= 6;
122
122
  }
123
123
  function be(e, t, o) {
@@ -126,17 +126,47 @@ function be(e, t, o) {
126
126
  function Ae(e, t) {
127
127
  return t >= 0 && t <= 59;
128
128
  }
129
- const et = [
129
+ const tt = [
130
130
  "lg",
131
131
  "md",
132
132
  "sm",
133
133
  "xs",
134
134
  "xxs"
135
- ], tt = 15;
136
- function rt(e, t) {
135
+ ], rt = 15;
136
+ function Se(e, t) {
137
+ return e.name === t.name && e.qualifiedEntityName === t.qualifiedEntityName;
138
+ }
139
+ function ot(e, t, o) {
140
+ var i, a;
141
+ if (o.sortPolicy === "dropUnrelatedSorts") {
142
+ const d = new Set(
143
+ (e.metricColumns || []).map((u) => u.id)
144
+ );
145
+ return {
146
+ ...e,
147
+ groupByColumns: [t],
148
+ sortByColumns: (e.sortByColumns || []).filter(
149
+ (u) => u.id === t.id || d.has(u.id)
150
+ )
151
+ };
152
+ }
153
+ const r = (i = e.groupByColumns) == null ? void 0 : i[0];
154
+ return {
155
+ ...e,
156
+ groupByColumns: [t],
157
+ sortByColumns: (a = e.sortByColumns) == null ? void 0 : a.map(
158
+ (d) => r && Se(d, r) ? {
159
+ ...t,
160
+ role: "sortby",
161
+ direction: d.direction
162
+ } : d
163
+ )
164
+ };
165
+ }
166
+ function nt(e, t) {
137
167
  return `${e}-${t}`;
138
168
  }
139
- const ot = "CONTROL_PLACEHOLDER_QUOTED", Se = "CONTROL_REFERENCE_MISSING", xe = "CONTROL_VALUE_MISSING", nt = "CONTROL_VALUE_INVALID", it = "CONTROL_CONTEXT_UNSUPPORTED", Le = "CONTROL_DEFINITION_DUPLICATE", Ve = "CONTROL_DEFINITION_INVALID", V = "CONTROL_BINDING_MAPPING_MISSING", Fe = "CONTROL_BINDING_TARGET_INVALID", k = "CONTROL_BINDING_VALUE_INVALID";
169
+ const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", ve = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED", Le = "CONTROL_DEFINITION_DUPLICATE", Ve = "CONTROL_DEFINITION_INVALID", L = "CONTROL_BINDING_MAPPING_MISSING", Me = "CONTROL_BINDING_TARGET_INVALID", k = "CONTROL_BINDING_VALUE_INVALID";
140
170
  class _ extends Error {
141
171
  constructor(o, r) {
142
172
  super(o);
@@ -167,8 +197,8 @@ function X(e, t) {
167
197
  }
168
198
  return o;
169
199
  }
170
- const ve = /^-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;
171
- function Me(e) {
200
+ const Fe = /^-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;
201
+ function Ue(e) {
172
202
  switch (e.source.kind) {
173
203
  case "manual":
174
204
  return e.source.options.map((t) => t.value);
@@ -185,17 +215,17 @@ function Me(e) {
185
215
  function T(e) {
186
216
  return `${e.label || e.id} (${e.id})`;
187
217
  }
188
- function Ue(e) {
218
+ function $e(e) {
189
219
  return e.type === "field_selector" || e.type === "metric_selector" || e.type === "aggregation_selector" || e.type === "grain_selector";
190
220
  }
191
221
  function q(e, t) {
192
- const o = Me(e);
222
+ const o = Ue(e);
193
223
  if (!(!o || o.length === 0) && !o.includes(t))
194
224
  throw new Error(
195
225
  `Control ${T(e)} received unsupported value '${t}'.`
196
226
  );
197
227
  }
198
- function $e(e, t) {
228
+ function Be(e, t) {
199
229
  switch (e.type) {
200
230
  case "enum":
201
231
  case "field_selector":
@@ -206,7 +236,7 @@ function $e(e, t) {
206
236
  throw new Error(
207
237
  `Control ${T(e)} requires a non-empty string value.`
208
238
  );
209
- return Ue(e) && t === A || q(e, t), t;
239
+ return $e(e) && t === A || q(e, t), t;
210
240
  }
211
241
  case "multi_enum": {
212
242
  if (!Array.isArray(t))
@@ -239,7 +269,7 @@ function $e(e, t) {
239
269
  case "number": {
240
270
  if (typeof t == "number" && Number.isFinite(t))
241
271
  return t;
242
- if (typeof t == "string" && ve.test(t.trim()))
272
+ if (typeof t == "string" && Fe.test(t.trim()))
243
273
  return Number(t);
244
274
  throw new Error(
245
275
  `Control ${T(e)} requires a numeric value.`
@@ -275,7 +305,7 @@ function Q(e) {
275
305
  throw new _(
276
306
  `Binding references unknown control '${e.binding.controlId}'.`,
277
307
  {
278
- code: Se,
308
+ code: xe,
279
309
  controlId: e.binding.controlId
280
310
  }
281
311
  );
@@ -288,20 +318,20 @@ function Q(e) {
288
318
  throw new _(
289
319
  `Control '${e.binding.controlId}' must resolve to a concrete value before query execution.`,
290
320
  {
291
- code: xe,
321
+ code: ve,
292
322
  controlId: e.binding.controlId
293
323
  }
294
324
  );
295
325
  }
296
326
  let r;
297
327
  try {
298
- r = $e(
328
+ r = Be(
299
329
  t,
300
330
  (i = e.controlValues) == null ? void 0 : i[e.binding.controlId]
301
331
  );
302
332
  } catch (a) {
303
- const g = a instanceof Error ? a.message : String(a);
304
- throw new _(g, {
333
+ const d = a instanceof Error ? a.message : String(a);
334
+ throw new _(d, {
305
335
  code: k,
306
336
  controlId: e.binding.controlId
307
337
  });
@@ -327,7 +357,7 @@ function z(e) {
327
357
  throw new _(
328
358
  `Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}'.`,
329
359
  {
330
- code: V,
360
+ code: L,
331
361
  controlId: e.binding.controlId
332
362
  }
333
363
  );
@@ -339,7 +369,7 @@ function Ge(e) {
339
369
  throw new _(
340
370
  `Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid group-by field.`,
341
371
  {
342
- code: V,
372
+ code: L,
343
373
  controlId: e.binding.controlId
344
374
  }
345
375
  );
@@ -351,12 +381,12 @@ function Pe(e) {
351
381
  throw new _(
352
382
  `Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid metric field.`,
353
383
  {
354
- code: V,
384
+ code: L,
355
385
  controlId: e.binding.controlId
356
386
  }
357
387
  );
358
388
  }
359
- function Be(e, t, o) {
389
+ function ke(e, t, o) {
360
390
  if (oe(
361
391
  ne(t),
362
392
  e.aggregateOrigin
@@ -368,8 +398,8 @@ function Be(e, t, o) {
368
398
  aggregateOrigin: e.aggregate ? e.aggregateOrigin : r ? t.aggregateOrigin : void 0
369
399
  };
370
400
  }
371
- function ke(e, t, o) {
372
- var r, i, a, g, u, d;
401
+ function qe(e, t, o) {
402
+ var r, i, a, d, u, g;
373
403
  if (o === "domain")
374
404
  return {
375
405
  filters: (r = t.parameters) == null ? void 0 : r.filters,
@@ -377,11 +407,11 @@ function ke(e, t, o) {
377
407
  };
378
408
  if (!(!e.parameters && !t.parameters))
379
409
  return {
380
- filters: ((a = e.parameters) == null ? void 0 : a.filters) ?? ((g = t.parameters) == null ? void 0 : g.filters),
381
- windowTransform: ((u = e.parameters) == null ? void 0 : u.windowTransform) ?? ((d = t.parameters) == null ? void 0 : d.windowTransform)
410
+ filters: ((a = e.parameters) == null ? void 0 : a.filters) ?? ((d = t.parameters) == null ? void 0 : d.filters),
411
+ windowTransform: ((u = e.parameters) == null ? void 0 : u.windowTransform) ?? ((g = t.parameters) == null ? void 0 : g.windowTransform)
382
412
  };
383
413
  }
384
- function at(e, t, o) {
414
+ function ct(e, t, o) {
385
415
  const r = e;
386
416
  return {
387
417
  id: e.id,
@@ -393,22 +423,22 @@ function at(e, t, o) {
393
423
  dateFormat: e.dateFormat,
394
424
  customFormat: e.customFormat,
395
425
  semanticTemporalPresentation: t.semanticTemporalPresentation || e.semanticTemporalPresentation,
396
- ...Be(e, t, o),
426
+ ...ke(e, t, o),
397
427
  ...e.role === "metric" ? {
398
428
  aliasTemplate: r.aliasTemplate,
399
429
  valueAliases: r.valueAliases,
400
430
  comparison: r.comparison,
401
431
  comparisonPolarity: r.comparisonPolarity,
402
- parameters: ke(
432
+ parameters: qe(
403
433
  r,
404
434
  t,
405
435
  "domain"
406
436
  )
407
437
  } : {},
408
- ...qe(e)
438
+ ...ze(e)
409
439
  };
410
440
  }
411
- function qe(e) {
441
+ function ze(e) {
412
442
  const t = {
413
443
  ...e.labelOrigin === "override" ? { label: e.label, labelOrigin: e.labelOrigin } : {},
414
444
  ...e.formatOrigin === "override" ? { format: e.format, formatOrigin: e.formatOrigin } : {}
@@ -434,7 +464,7 @@ function qe(e) {
434
464
  return t;
435
465
  }
436
466
  }
437
- const ze = /* @__PURE__ */ new Set([
467
+ const je = /* @__PURE__ */ new Set([
438
468
  "day",
439
469
  "week",
440
470
  "month",
@@ -444,7 +474,7 @@ const ze = /* @__PURE__ */ new Set([
444
474
  "minute",
445
475
  "second"
446
476
  ]);
447
- function st(e) {
477
+ function lt(e) {
448
478
  let t = e.spec;
449
479
  const o = X(
450
480
  e.controlDefinitions || [],
@@ -455,31 +485,31 @@ function st(e) {
455
485
  (n) => n.target === "config_metric_selector" || n.target === "config_field_selector"
456
486
  ), a = r.filter(
457
487
  (n) => n.target === "config_grain" || n.target === "config_aggregation"
458
- ), g = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
459
- let d;
460
- const N = () => {
461
- if (d) return d;
488
+ ), d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
489
+ let g;
490
+ const O = () => {
491
+ if (g) return g;
462
492
  const n = e.catalog, c = /* @__PURE__ */ new Map();
463
493
  for (const l of n) {
464
494
  const f = c.get(l.id) ?? [];
465
495
  c.set(l.id, [...f, l]);
466
496
  }
467
- return d = { refs: n, byId: c }, d;
468
- }, w = (n, c) => {
497
+ return g = { refs: n, byId: c }, g;
498
+ }, C = (n, c) => {
469
499
  throw new _(n, {
470
- code: Fe,
500
+ code: Me,
471
501
  ...c ? { controlId: c } : {}
472
502
  });
473
503
  }, S = (n, c) => {
474
504
  var f;
475
505
  if (n.derivedField) return n.derivedField.dataType;
476
- const l = N().refs.filter((h) => h.field.name === n.name && P(h.field.source ?? e.spec.source, n.source ?? e.spec.source));
477
- return l.length > 1 ? w("The selected field is ambiguous in the authorized Matrix field catalog.", c) : ce(((f = l[0]) == null ? void 0 : f.field.dataType) ?? n.dataType);
478
- }, F = (n, c) => de(n, c.target, (l) => S(l, c.controlId)), D = ie.safeParse(t);
479
- if (!D.success) return w(D.error.message);
506
+ const l = O().refs.filter((h) => h.field.name === n.name && G(h.field.source ?? e.spec.source, n.source ?? e.spec.source));
507
+ return l.length > 1 ? C("The selected field is ambiguous in the authorized Matrix field catalog.", c) : ce(((f = l[0]) == null ? void 0 : f.field.dataType) ?? n.dataType);
508
+ }, V = (n, c) => de(n, c.target, (l) => S(l, c.controlId)), D = ie.safeParse(t);
509
+ if (!D.success) return C(D.error.message);
480
510
  t = D.data;
481
511
  const K = [...i, ...a].map((n) => {
482
- const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ? F(D.data, n) : [];
512
+ const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ? V(D.data, n) : [];
483
513
  return {
484
514
  binding: n,
485
515
  selectedValue: c,
@@ -489,45 +519,45 @@ function st(e) {
489
519
  for (const { binding: n, targetId: c, selectedValue: l } of K) {
490
520
  if (l === void 0 || l === A)
491
521
  continue;
492
- const f = (s) => w(s, n.controlId), h = n.target === "config_metric_selector" || n.target === "config_aggregation", ee = F(t, n);
522
+ const f = (s) => C(s, n.controlId), h = n.target === "config_metric_selector" || n.target === "config_aggregation", ee = V(t, n);
493
523
  (!c || !ee.some((s) => s.id === c)) && f("Choose a valid Matrix level or measure target for this control.");
494
- const v = `${n.target}:${c}`;
495
- g.has(v) && f("Multiple controls cannot replace the same Matrix target."), g.add(v);
496
- const M = (s) => {
497
- const m = (N().byId.get(s.id) ?? []).filter((I) => !s.source || P(s.source, I.field.source ?? e.spec.source));
524
+ const M = `${n.target}:${c}`;
525
+ d.has(M) && f("Multiple controls cannot replace the same Matrix target."), d.add(M);
526
+ const F = (s) => {
527
+ const m = (O().byId.get(s.id) ?? []).filter((I) => !s.source || G(s.source, I.field.source ?? e.spec.source));
498
528
  if (m.length !== 1) return f(m.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
499
- const O = se.safeParse(m[0].field);
500
- return O.success ? O.data : f(O.error.message);
501
- }, E = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0, C = E && typeof E == "object" && "kind" in E && E.kind === "matrix_instance" ? E.id : void 0;
529
+ const N = se.safeParse(m[0].field);
530
+ return N.success ? N.data : f(N.error.message);
531
+ }, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0, y = w && typeof w == "object" && "kind" in w && w.kind === "matrix_instance" ? w.id : void 0;
502
532
  if (h) {
503
533
  u.set(c, n.controlId);
504
- const s = C === void 0 ? void 0 : D.data.measures.find(
505
- (p) => p.id === C && p.kind === "aggregate"
534
+ const s = y === void 0 ? void 0 : D.data.measures.find(
535
+ (p) => p.id === y && p.kind === "aggregate"
506
536
  );
507
- C !== void 0 && !s && f("The selected Matrix aggregate measure is no longer available.");
508
- const m = n.target === "config_metric_selector" && !s ? Pe({ binding: n, selectedValue: l }) : void 0, O = ((s == null ? void 0 : s.kind) === "aggregate" ? s.aggregate : m == null ? void 0 : m.aggregate) ?? (n.target === "config_aggregation" ? z({ binding: n, selectedValue: l }) : void 0), I = O === void 0 ? void 0 : ae.safeParse(O);
537
+ y !== void 0 && !s && f("The selected Matrix aggregate measure is no longer available.");
538
+ const m = n.target === "config_metric_selector" && !s ? Pe({ binding: n, selectedValue: l }) : void 0, N = ((s == null ? void 0 : s.kind) === "aggregate" ? s.aggregate : m == null ? void 0 : m.aggregate) ?? (n.target === "config_aggregation" ? z({ binding: n, selectedValue: l }) : void 0), I = N === void 0 ? void 0 : ae.safeParse(N);
509
539
  I && !I.success && f("This aggregation is not supported by Matrix."), t = {
510
540
  ...t,
511
541
  measures: t.measures.map(
512
542
  (p) => p.id !== c || p.kind !== "aggregate" ? p : {
513
543
  ...p,
514
- ...m ? { field: M(m) } : {},
544
+ ...m ? { field: F(m) } : {},
515
545
  ...(s == null ? void 0 : s.kind) === "aggregate" ? { field: s.field } : {},
516
546
  aggregate: I != null && I.success ? I.data : p.aggregate
517
547
  }
518
548
  )
519
549
  };
520
550
  } else {
521
- const s = C === void 0 ? void 0 : [...D.data.rows, ...D.data.columns].find(
522
- (p) => p.id === C
551
+ const s = y === void 0 ? void 0 : [...D.data.rows, ...D.data.columns].find(
552
+ (p) => p.id === y
523
553
  );
524
- C !== void 0 && !s && f("The selected Matrix level is no longer available.");
525
- const m = n.target === "config_field_selector" && !s ? Ge({ binding: n, selectedValue: l }) : void 0, O = n.target === "config_grain" ? z({ binding: n, selectedValue: l }) : s ? s.grain : m == null ? void 0 : m.granularity;
526
- O !== void 0 && !ze.has(O) && f("This time grain is not supported by Matrix.");
527
- const I = (p) => p.map((R) => {
528
- if (R.id !== c) return R;
529
- const U = (s == null ? void 0 : s.field) ?? (m ? M(m) : R.field), $ = S(U, n.controlId), G = O ?? (m && B($) ? R.grain : void 0);
530
- return G && !B($) && f("A time grain requires a temporal Matrix level."), { ...R, field: U, grain: G };
554
+ y !== void 0 && !s && f("The selected Matrix level is no longer available.");
555
+ const m = n.target === "config_field_selector" && !s ? Ge({ binding: n, selectedValue: l }) : void 0, N = n.target === "config_grain" ? z({ binding: n, selectedValue: l }) : s ? s.grain : m == null ? void 0 : m.granularity;
556
+ N !== void 0 && !je.has(N) && f("This time grain is not supported by Matrix.");
557
+ const I = (p) => p.map((E) => {
558
+ if (E.id !== c) return E;
559
+ const U = (s == null ? void 0 : s.field) ?? (m ? F(m) : E.field), $ = S(U, n.controlId), B = N ?? (m && P($) ? E.grain : void 0);
560
+ return B && !P($) && f("A time grain requires a temporal Matrix level."), { ...E, field: U, grain: B };
531
561
  });
532
562
  t = {
533
563
  ...t,
@@ -540,12 +570,12 @@ function st(e) {
540
570
  const l = t.measures.find((h) => h.id === n);
541
571
  if (!l || l.kind !== "aggregate") continue;
542
572
  const f = S(l.field, c);
543
- ue(f).some((h) => h.value === l.aggregate) || w(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`, c);
573
+ ge(f).some((h) => h.value === l.aggregate) || C(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`, c);
544
574
  }
545
575
  try {
546
- return ge(D.data, t);
576
+ return ue(D.data, t);
547
577
  } catch (n) {
548
- if (n instanceof fe) return w(n.message);
578
+ if (n instanceof fe) return C(n.message);
549
579
  throw n;
550
580
  }
551
581
  }
@@ -560,46 +590,47 @@ function J(e, t) {
560
590
  };
561
591
  for (const i of e) {
562
592
  if (i.target !== "config_field_selector" && i.target !== "config_metric_selector") continue;
563
- const a = t == null ? void 0 : t.get(i), g = t ? a && a !== A ? [i.mapping[a]] : [] : Object.values(i.mapping);
564
- for (const u of g)
593
+ const a = t == null ? void 0 : t.get(i), d = t ? a && a !== A ? [i.mapping[a]] : [] : Object.values(i.mapping);
594
+ for (const u of d)
565
595
  u && "role" in u && r(u);
566
596
  }
567
597
  return o;
568
598
  }
569
- function ct(e, t = [], o = []) {
599
+ function dt(e, t = [], o = []) {
570
600
  return j([...H(e), ...J(t), ...o]);
571
601
  }
572
- function lt(e, t = {}) {
602
+ function ut(e, t = {}) {
573
603
  const o = t.controlBindings ?? [], r = X(t.controlDefinitions ?? [], t.cardControlDefinitions ?? []), i = new Map(o.filter((a) => a.target === "config_field_selector" || a.target === "config_metric_selector").map((a) => [a, Q({ binding: a, definitions: r, controlValues: t.controlValues })]));
574
604
  return j([...H(e), ...J(o, i)]);
575
605
  }
576
606
  export {
577
- ot as C,
578
- tt as D,
579
- et as a,
580
- lt as b,
581
- Se as c,
607
+ me as A,
608
+ it as C,
609
+ rt as D,
610
+ tt as a,
611
+ ut as b,
612
+ ot as c,
582
613
  xe as d,
583
- nt as e,
584
- it as f,
585
- rt as g,
586
- Le as h,
587
- Ve as i,
588
- V as j,
589
- Fe as k,
590
- k as l,
591
- ct as m,
592
- _ as n,
593
- X as o,
594
- z as p,
595
- Ge as q,
614
+ ve as e,
615
+ at as f,
616
+ nt as g,
617
+ st as h,
618
+ Le as i,
619
+ Ve as j,
620
+ L as k,
621
+ Me as l,
622
+ dt as m,
623
+ k as n,
624
+ _ as o,
625
+ X as p,
626
+ z as q,
596
627
  Q as r,
597
- Pe as s,
598
- Be as t,
628
+ Ge as s,
629
+ Pe as t,
599
630
  ke as u,
600
- $e as v,
601
- at as w,
602
- qe as x,
603
- st as y,
604
- me as z
631
+ Be as v,
632
+ qe as w,
633
+ ct as x,
634
+ ze as y,
635
+ lt as z
605
636
  };
@@ -0,0 +1 @@
1
+ "use strict";var ue=Object.defineProperty;var ge=(e,t,o)=>t in e?ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var v=(e,t,o)=>ge(e,typeof t!="symbol"?t+"":t,o);const _=require("./validators-DVYAnnX0.cjs"),L=require("./common-types-nBuCd3u2.cjs");require("./matrix-operation-contract-DoiWTUbT.cjs");const Y=require("./calculated-field-identity-BiTGmnST.cjs"),fe=require("./field-aggregations-jSi77h9Z.cjs"),me=require("zod"),Z=require("./matrix-card-U4c72doZ.cjs"),b=require("./constants-B00YUv89.cjs");function X(e,t){const r=Ne(e);let i;if(r.date){const g=pe(r.date,2);i=Re(g.restDateString,g.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let d=0,u;if(r.time&&(d=De(r.time),isNaN(d)))return new Date(NaN);if(r.timezone){if(u=Te(r.timezone),isNaN(u))return new Date(NaN)}else{const g=new Date(a+d),R=new Date(0);return R.setFullYear(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()),R.setHours(g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),g.getUTCMilliseconds()),R}return new Date(a+d+u)}const S={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},_e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Oe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ie=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ne(e){const t={},o=e.split(S.dateTimeDelimiter);let r;if(o.length>2)return t;if(/:/.test(o[0])?r=o[0]:(t.date=o[0],r=o[1],S.timeZoneDelimiter.test(t.date)&&(t.date=e.split(S.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=S.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function pe(e,t){const o=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(o);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function Re(e,t){if(t===null)return new Date(NaN);const o=e.match(_e);if(!o)return new Date(NaN);const r=!!o[4],i=w(o[1]),a=w(o[2])-1,d=w(o[3]),u=w(o[4]),g=w(o[5])-1;if(r)return Ae(t,u,g)?Ce(t,u,g):new Date(NaN);{const R=new Date(0);return!ye(t,a,d)||!he(t,i)?new Date(NaN):(R.setUTCFullYear(t,a,Math.max(i,d)),R)}}function w(e){return e?parseInt(e):1}function De(e){const t=e.match(Oe);if(!t)return NaN;const o=M(t[1]),r=M(t[2]),i=M(t[3]);return we(o,r,i)?o*b.millisecondsInHour+r*b.millisecondsInMinute+i*1e3:NaN}function M(e){return e&&parseFloat(e.replace(",","."))||0}function Te(e){if(e==="Z")return 0;const t=e.match(Ie);if(!t)return 0;const o=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Se(r,i)?o*(r*b.millisecondsInHour+i*b.millisecondsInMinute):NaN}function Ce(e,t,o){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,a=(t-1)*7+o+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const Ee=[31,null,31,30,31,30,31,31,30,31,30,31];function W(e){return e%400===0||e%4===0&&e%100!==0}function ye(e,t,o){return t>=0&&t<=11&&o>=1&&o<=(Ee[t]||(W(e)?29:28))}function he(e,t){return t>=1&&t<=(W(e)?366:365)}function Ae(e,t,o){return t>=1&&t<=53&&o>=0&&o<=6}function we(e,t,o){return e===24?t===0&&o===0:o>=0&&o<60&&t>=0&&t<60&&e>=0&&e<25}function Se(e,t){return t>=0&&t<=59}const Le=["lg","md","sm","xs","xxs"],be=15;function Ve(e,t){return e.name===t.name&&e.qualifiedEntityName===t.qualifiedEntityName}function xe(e,t,o){var i,a;if(o.sortPolicy==="dropUnrelatedSorts"){const d=new Set((e.metricColumns||[]).map(u=>u.id));return{...e,groupByColumns:[t],sortByColumns:(e.sortByColumns||[]).filter(u=>u.id===t.id||d.has(u.id))}}const r=(i=e.groupByColumns)==null?void 0:i[0];return{...e,groupByColumns:[t],sortByColumns:(a=e.sortByColumns)==null?void 0:a.map(d=>r&&Ve(d,r)?{...t,role:"sortby",direction:d.direction}:d)}}function ve(e,t){return`${e}-${t}`}const Me="CONTROL_PLACEHOLDER_QUOTED",Q="CONTROL_REFERENCE_MISSING",K="CONTROL_VALUE_MISSING",Fe="CONTROL_VALUE_INVALID",Ue="CONTROL_CONTEXT_UNSUPPORTED",J="CONTROL_DEFINITION_DUPLICATE",ee="CONTROL_DEFINITION_INVALID",V="CONTROL_BINDING_MAPPING_MISSING",te="CONTROL_BINDING_TARGET_INVALID",F="CONTROL_BINDING_VALUE_INVALID";class O extends Error{constructor(o,r){super(o);v(this,"status",400);v(this,"details");Object.setPrototypeOf(this,O.prototype),this.name="ControlResolutionError",this.details=r}}function B(e,t){const o=new Map;for(const r of[...e,...t]){if(!r||typeof r!="object"||typeof r.id!="string"||r.id.trim().length===0)throw new O("Malformed control definition was provided for query execution.",{code:ee});if(o.get(r.id))throw new O(`Duplicate control definition '${r.id}' was provided for query execution.`,{code:J,controlId:r.id});o.set(r.id,r)}return o}const Be=/^-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;function Ge(e){switch(e.source.kind){case"manual":return e.source.options.map(t=>t.value);case"field_allowlist":return e.source.fieldIds;case"metric_allowlist":return e.source.metricIds;case"dataset_values":return null;default:return null}}function D(e){return`${e.label||e.id} (${e.id})`}function Pe(e){return e.type==="field_selector"||e.type==="metric_selector"||e.type==="aggregation_selector"||e.type==="grain_selector"}function j(e,t){const o=Ge(e);if(!(!o||o.length===0)&&!o.includes(t))throw new Error(`Control ${D(e)} received unsupported value '${t}'.`)}function re(e,t){switch(e.type){case"enum":case"field_selector":case"metric_selector":case"aggregation_selector":case"grain_selector":{if(typeof t!="string"||t.trim().length===0)throw new Error(`Control ${D(e)} requires a non-empty string value.`);return Pe(e)&&t===L.CONTROL_CARD_DEFAULT_VALUE||j(e,t),t}case"multi_enum":{if(!Array.isArray(t))throw new Error(`Control ${D(e)} requires a non-empty array value.`);if(t.length===0){if(!e.requiredAtExecution)return;throw new Error(`Control ${D(e)} requires a non-empty array value.`)}for(const o of t){if(typeof o!="string"||o.trim().length===0)throw new Error(`Control ${D(e)} requires string array values.`);j(e,o)}return t}case"text":{if(typeof t!="string")throw new Error(`Control ${D(e)} requires a string value.`);return t}case"number":{if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&Be.test(t.trim()))return Number(t);throw new Error(`Control ${D(e)} requires a numeric value.`)}case"boolean":{if(typeof t!="boolean")throw new Error(`Control ${D(e)} requires a boolean value.`);return t}case"date":{if(t instanceof Date&&!Number.isNaN(t.getTime()))return t;if(typeof t=="string"&&t.trim().length>0){const o=t.trim(),r=X(o);if(!Number.isNaN(r.getTime()))return o}throw new Error(`Control ${D(e)} requires a date-compatible value.`)}default:return t}}function G(e){var i;const t=e.definitions.get(e.binding.controlId);if(!t)throw new O(`Binding references unknown control '${e.binding.controlId}'.`,{code:Q,controlId:e.binding.controlId});if(!Object.prototype.hasOwnProperty.call(e.controlValues||{},e.binding.controlId)){if(!t.requiredAtExecution)return;throw new O(`Control '${e.binding.controlId}' must resolve to a concrete value before query execution.`,{code:K,controlId:e.binding.controlId})}let r;try{r=re(t,(i=e.controlValues)==null?void 0:i[e.binding.controlId])}catch(a){const d=a instanceof Error?a.message:String(a);throw new O(d,{code:F,controlId:e.binding.controlId})}if(typeof r=="string"&&r.trim().length>0)return r;if(typeof r=="number"||typeof r=="boolean")return String(r);if(r instanceof Date&&!Number.isNaN(r.getTime()))return r.toISOString();throw new O(`Binding control '${e.binding.controlId}' must resolve to a single scalar value.`,{code:F,controlId:e.binding.controlId})}function U(e){const t=e.binding.mapping[e.selectedValue];if(typeof t=="string"&&t.trim().length>0)return t;throw new O(`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}'.`,{code:V,controlId:e.binding.controlId})}function oe(e){const t=e.binding.mapping[e.selectedValue];if(t&&typeof t=="object"&&"role"in t&&t.role==="groupby")return t;throw new O(`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid group-by field.`,{code:V,controlId:e.binding.controlId})}function ne(e){const t=e.binding.mapping[e.selectedValue];if(t&&typeof t=="object"&&"role"in t&&t.role==="metric")return t;throw new O(`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid metric field.`,{code:V,controlId:e.binding.controlId})}function ie(e,t,o){if(_.shouldDropInheritedCalculationAggregate(_.getCalculatedFieldComputeStage(t),e.aggregateOrigin))return{aggregate:void 0,aggregateOrigin:void 0};const r=o==="selection"&&e.role==="metric"?t.aggregate:void 0;return{aggregate:e.aggregate??r,aggregateOrigin:e.aggregate?e.aggregateOrigin:r?t.aggregateOrigin:void 0}}function ae(e,t,o){var r,i,a,d,u,g;if(o==="domain")return{filters:(r=t.parameters)==null?void 0:r.filters,windowTransform:(i=e.parameters)==null?void 0:i.windowTransform};if(!(!e.parameters&&!t.parameters))return{filters:((a=e.parameters)==null?void 0:a.filters)??((d=t.parameters)==null?void 0:d.filters),windowTransform:((u=e.parameters)==null?void 0:u.windowTransform)??((g=t.parameters)==null?void 0:g.windowTransform)}}function $e(e,t,o){const r=e;return{id:e.id,role:e.role,...o==="selection"&&e.alias?{alias:e.alias}:{},granularity:e.granularity??t.granularity,dateFormat:e.dateFormat,customFormat:e.customFormat,semanticTemporalPresentation:t.semanticTemporalPresentation||e.semanticTemporalPresentation,...ie(e,t,o),...e.role==="metric"?{aliasTemplate:r.aliasTemplate,valueAliases:r.valueAliases,comparison:r.comparison,comparisonPolarity:r.comparisonPolarity,parameters:ae(r,t,"domain")}:{},...se(e)}}function se(e){const t={...e.labelOrigin==="override"?{label:e.label,labelOrigin:e.labelOrigin}:{},...e.formatOrigin==="override"?{format:e.format,formatOrigin:e.formatOrigin}:{}};switch(e.role){case"pivotby":return{...t,memberOrder:e.memberOrder};case"sortby":return{...t,direction:e.direction};case"detail":return{...t,...e.dateFormat!==void 0?{dateFormat:e.dateFormat}:{},...e.customFormat!==void 0?{customFormat:e.customFormat}:{}};default:return t}}const qe=new Set(["day","week","month","quarter","year","hour","minute","second"]);function ke(e){let t=e.spec;const o=B(e.controlDefinitions||[],e.cardControlDefinitions||[]),r=(e.controlBindings||[]).filter(n=>n.target!=="sql_param"),i=r.filter(n=>n.target==="config_metric_selector"||n.target==="config_field_selector"),a=r.filter(n=>n.target==="config_grain"||n.target==="config_aggregation"),d=new Set,u=new Map;let g;const R=()=>{if(g)return g;const n=e.catalog,c=new Map;for(const l of n){const f=c.get(l.id)??[];c.set(l.id,[...f,l])}return g={refs:n,byId:c},g},y=(n,c)=>{throw new O(n,{code:te,...c?{controlId:c}:{}})},x=(n,c)=>{var f;if(n.derivedField)return n.derivedField.dataType;const l=R().refs.filter(C=>C.field.name===n.name&&_.semaphorSourcesReferToSameDataset(C.field.source??e.spec.source,n.source??e.spec.source));return l.length>1?y("The selected field is ambiguous in the authorized Matrix field catalog.",c):_.normalizeAnalyticsCatalogDataType(((f=l[0])==null?void 0:f.field.dataType)??n.dataType)},P=(n,c)=>Y.getMatrixBindingTargets(n,c.target,l=>x(l,c.controlId)),T=_.matrixSpecSchema.safeParse(t);if(!T.success)return y(T.error.message);t=T.data;const le=[...i,...a].map(n=>{const c=G({binding:n,definitions:o,controlValues:e.controlValues}),l=!n.matrixTargetId&&c!==void 0&&c!==L.CONTROL_CARD_DEFAULT_VALUE?P(T.data,n):[];return{binding:n,selectedValue:c,targetId:n.matrixTargetId??(l.length===1?l[0].id:void 0)}});for(const{binding:n,targetId:c,selectedValue:l}of le){if(l===void 0||l===L.CONTROL_CARD_DEFAULT_VALUE)continue;const f=s=>y(s,n.controlId),C=n.target==="config_metric_selector"||n.target==="config_aggregation",de=P(t,n);(!c||!de.some(s=>s.id===c))&&f("Choose a valid Matrix level or measure target for this control.");const $=`${n.target}:${c}`;d.has($)&&f("Multiple controls cannot replace the same Matrix target."),d.add($);const q=s=>{const m=(R().byId.get(s.id)??[]).filter(N=>!s.source||_.semaphorSourcesReferToSameDataset(s.source,N.field.source??e.spec.source));if(m.length!==1)return f(m.length?"The selected field is ambiguous in the authorized Matrix field catalog.":"The selected field is not in the authorized Matrix field catalog.");const p=_.matrixFieldSchema.safeParse(m[0].field);return p.success?p.data:f(p.error.message)},h=n.target==="config_metric_selector"||n.target==="config_field_selector"?n.mapping[l]:void 0,E=h&&typeof h=="object"&&"kind"in h&&h.kind==="matrix_instance"?h.id:void 0;if(C){u.set(c,n.controlId);const s=E===void 0?void 0:T.data.measures.find(I=>I.id===E&&I.kind==="aggregate");E!==void 0&&!s&&f("The selected Matrix aggregate measure is no longer available.");const m=n.target==="config_metric_selector"&&!s?ne({binding:n,selectedValue:l}):void 0,p=((s==null?void 0:s.kind)==="aggregate"?s.aggregate:m==null?void 0:m.aggregate)??(n.target==="config_aggregation"?U({binding:n,selectedValue:l}):void 0),N=p===void 0?void 0:_.matrixAggregateSchema.safeParse(p);N&&!N.success&&f("This aggregation is not supported by Matrix."),t={...t,measures:t.measures.map(I=>I.id!==c||I.kind!=="aggregate"?I:{...I,...m?{field:q(m)}:{},...(s==null?void 0:s.kind)==="aggregate"?{field:s.field}:{},aggregate:N!=null&&N.success?N.data:I.aggregate})}}else{const s=E===void 0?void 0:[...T.data.rows,...T.data.columns].find(I=>I.id===E);E!==void 0&&!s&&f("The selected Matrix level is no longer available.");const m=n.target==="config_field_selector"&&!s?oe({binding:n,selectedValue:l}):void 0,p=n.target==="config_grain"?U({binding:n,selectedValue:l}):s?s.grain:m==null?void 0:m.granularity;p!==void 0&&!qe.has(p)&&f("This time grain is not supported by Matrix.");const N=I=>I.map(A=>{if(A.id!==c)return A;const k=(s==null?void 0:s.field)??(m?q(m):A.field),H=x(k,n.controlId),z=p??(m&&_.isAnalyticsDateLikeDataType(H)?A.grain:void 0);return z&&!_.isAnalyticsDateLikeDataType(H)&&f("A time grain requires a temporal Matrix level."),{...A,field:k,grain:z}});t={...t,rows:N(t.rows),columns:N(t.columns)}}}for(const[n,c]of Array.from(u)){const l=t.measures.find(C=>C.id===n);if(!l||l.kind!=="aggregate")continue;const f=x(l.field,c);fe.getFieldAggregationOptions(f).some(C=>C.value===l.aggregate)||y(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`,c)}try{return Y.reconcileMatrixSpecStructure(T.data,t)}catch(n){if(n instanceof me.ZodError)return y(n.message);throw n}}function ce(e,t){const o=[],r=i=>{if(i.source){const a=_.configSourceRefSchema.safeParse(i.source);if(a.success)o.push(a.data);else if(t)throw a.error}i.derivedField&&Object.values(i.derivedField.inputs).forEach(a=>r(a.field))};for(const i of e){if(i.target!=="config_field_selector"&&i.target!=="config_metric_selector")continue;const a=t==null?void 0:t.get(i),d=t?a&&a!==L.CONTROL_CARD_DEFAULT_VALUE?[i.mapping[a]]:[]:Object.values(i.mapping);for(const u of d)u&&"role"in u&&r(u)}return o}function He(e,t=[],o=[]){return _.mergeSemaphorSourcesByIdentity([...Z.matrixDefinitionSources(e),...ce(t),...o])}function ze(e,t={}){const o=t.controlBindings??[],r=B(t.controlDefinitions??[],t.cardControlDefinitions??[]),i=new Map(o.filter(a=>a.target==="config_field_selector"||a.target==="config_metric_selector").map(a=>[a,G({binding:a,definitions:r,controlValues:t.controlValues})]));return _.mergeSemaphorSourcesByIdentity([...Z.matrixDefinitionSources(e),...ce(o,i)])}exports.CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE=V;exports.CONTROL_BINDING_TARGET_INVALID_ERROR_CODE=te;exports.CONTROL_BINDING_VALUE_INVALID_ERROR_CODE=F;exports.CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE=Ue;exports.CONTROL_DEFINITION_DUPLICATE_ERROR_CODE=J;exports.CONTROL_DEFINITION_INVALID_ERROR_CODE=ee;exports.CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE=Me;exports.CONTROL_REFERENCE_MISSING_ERROR_CODE=Q;exports.CONTROL_VALUE_INVALID_ERROR_CODE=Fe;exports.CONTROL_VALUE_MISSING_ERROR_CODE=K;exports.ControlResolutionError=O;exports.DASHBOARD_AUTHORING_BREAKPOINTS=Le;exports.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS=be;exports.applyGroupByOverride=xe;exports.buildControlDefinitionIndex=B;exports.getCalculatedFieldAggregateOverrides=ie;exports.getCalculatedFieldParameters=ae;exports.getCalculatedFieldShelfOverrides=se;exports.getColumnCatalogFieldId=ve;exports.getDomainCalculatedSelectionOverrides=$e;exports.matrixCatalogSources=He;exports.matrixExecutionSources=ze;exports.parseISO=X;exports.resolveBindingControlValue=G;exports.resolveGroupByFieldTarget=oe;exports.resolveMatrixControlBindings=ke;exports.resolveMetricFieldTarget=ne;exports.resolveScalarMappedValue=U;exports.validateControlValue=re;