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,661 @@
1
+ var U = Object.defineProperty;
2
+ var j = (e, r, t) => r in e ? U(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
+ var A = (e, r, t) => j(e, typeof r != "symbol" ? r + "" : r, t);
4
+ import { i as X } from "./index-C8w91oj4.js";
5
+ import { g as L, i as H } from "./raw-temporal-BqOfk-xN.js";
6
+ import { e as F, m as I, h as O, i as K, j as z } from "./matrix-formatter-CCXNRt3s.js";
7
+ import { al as W, b5 as k, S } from "./validators-CsdOtZI6.js";
8
+ import "./matrix-operation-contract-D32U2CSw.js";
9
+ import { g as D } from "./matrix-definition-E5gXXSTZ.js";
10
+ import { PDF_SAFETY_LIMIT_EXCEEDED as $, getUtf8ByteLength as Y, FAST_PDF_POLICY as q } from "../pdf-export-policy/index.js";
11
+ import { f as J } from "./temporal-bucket-DlFuhCnT.js";
12
+ function Z(e, r, t) {
13
+ const n = {
14
+ ...r,
15
+ locale: r.locale ?? t
16
+ };
17
+ if (n.type === "number")
18
+ return L(e, n);
19
+ const { prefix: o, suffix: s, ...a } = n;
20
+ return `${o ?? ""}${L(e, {
21
+ ...a,
22
+ negativeStyle: n.type === "currency" ? n.negativeStyle : "minus"
23
+ })}${s ?? ""}`;
24
+ }
25
+ function E(e, r, t) {
26
+ return e === null ? { value: e, text: null } : !r || !X(r) && r.type !== "duration" ? {
27
+ value: e,
28
+ text: L(e, { type: "number", locale: t })
29
+ } : r.type === "duration" ? {
30
+ value: e,
31
+ text: H(e, {
32
+ inputUnit: r.inputUnit,
33
+ outputStyle: r.outputStyle,
34
+ largestUnit: r.largestUnit,
35
+ smallestUnit: r.smallestUnit,
36
+ maxUnits: r.maxUnits,
37
+ prefix: r.prefix,
38
+ suffix: r.suffix,
39
+ negativeInParentheses: r.negativeStyle === "parentheses"
40
+ })
41
+ } : { value: e, text: Z(e, r, t) };
42
+ }
43
+ function _(e, r, t, n) {
44
+ return e === null ? { value: e, text: null } : n === "percent" ? {
45
+ value: e,
46
+ text: L(e, {
47
+ type: "percent",
48
+ locale: t,
49
+ minimumFractionDigits: r,
50
+ maximumFractionDigits: r,
51
+ percentValueMode: "fraction"
52
+ })
53
+ } : {
54
+ value: e,
55
+ text: L(e, {
56
+ type: "number",
57
+ locale: t,
58
+ minimumFractionDigits: r,
59
+ maximumFractionDigits: r,
60
+ suffix: "×"
61
+ })
62
+ };
63
+ }
64
+ function R(e, r) {
65
+ if (e === void 0) return r;
66
+ if (!Number.isInteger(e) || e < 0 || e > 6)
67
+ throw new RangeError("Comparison precision must be an integer from 0 to 6.");
68
+ return e;
69
+ }
70
+ function Ce(e, r) {
71
+ const t = {
72
+ mode: r.displayMode,
73
+ current: E(
74
+ e.currentValue,
75
+ r.metricFormat,
76
+ r.locale
77
+ ),
78
+ comparison: E(
79
+ e.comparisonValue,
80
+ r.metricFormat,
81
+ r.locale
82
+ )
83
+ };
84
+ return (r.displayMode === "difference" || r.displayMode === "both") && (t.difference = E(
85
+ e.delta,
86
+ r.metricFormat,
87
+ r.locale
88
+ )), (r.displayMode === "percent_change" || r.displayMode === "both") && (t.percentChange = _(
89
+ e.percentChange,
90
+ R(r.precision, 1),
91
+ r.locale,
92
+ "percent"
93
+ )), r.displayMode === "ratio" && (t.ratio = _(
94
+ e.ratio,
95
+ R(r.precision, 2),
96
+ r.locale,
97
+ "ratio"
98
+ )), t;
99
+ }
100
+ function M(e) {
101
+ const r = e.trimStart().charAt(0);
102
+ return ["=", "+", "-", "@"].includes(r) || [" ", "\r", `
103
+ `].includes(e.charAt(0)) ? `'${e}` : e;
104
+ }
105
+ function Q(e, r = ",") {
106
+ if (e == null)
107
+ return "";
108
+ const t = String(e);
109
+ return t.includes(r) || t.includes('"') || t.includes(`
110
+ `) || t.includes("\r") ? `"${t.replace(/"/g, '""')}"` : t;
111
+ }
112
+ function ee(e, r = ",") {
113
+ return e.map((t) => Q(t, r)).join(r);
114
+ }
115
+ function re(e, r = {}) {
116
+ const { delimiter: t = ",", lineEnding: n = `
117
+ ` } = r;
118
+ return e.map((o) => ee(o, t)).join(n);
119
+ }
120
+ function ke(e, r = {}) {
121
+ if (e.length === 0)
122
+ return "";
123
+ const {
124
+ delimiter: t = ",",
125
+ lineEnding: n = `
126
+ `,
127
+ includeHeaders: o = !0,
128
+ columns: s
129
+ } = r, a = s || Object.keys(e[0]), l = [];
130
+ o && l.push(a);
131
+ for (const m of e) {
132
+ const u = a.map((d) => {
133
+ const g = m[d];
134
+ return g == null ? "" : String(g);
135
+ });
136
+ l.push(u);
137
+ }
138
+ return re(l, { delimiter: t, lineEnding: n });
139
+ }
140
+ const te = 1e4, Me = 1e6, Ie = 5e6, _e = 1024 ** 3, Re = 1024 ** 3;
141
+ function Ve(e) {
142
+ return e > te;
143
+ }
144
+ const Fe = {
145
+ rowLabels: "tabular",
146
+ subtotals: "after"
147
+ };
148
+ function Oe(e, r) {
149
+ const t = r.rowLabels === "outline" ? { kind: "compact" } : e.layout.kind === "tabular" ? e.layout : { kind: "tabular", repeatLabels: !1 }, n = e.totals.rows;
150
+ return {
151
+ ...e,
152
+ layout: t,
153
+ totals: {
154
+ ...e.totals,
155
+ rows: {
156
+ ...n,
157
+ levels: Object.fromEntries(
158
+ Object.entries(n.levels).map(([o, s]) => [
159
+ o,
160
+ { ...s, position: r.subtotals }
161
+ ])
162
+ )
163
+ }
164
+ }
165
+ };
166
+ }
167
+ const oe = 2;
168
+ function ne(e) {
169
+ return typeof e == "number" ? Number.isInteger(e) : k(e) ? !e.value.includes(".") : !0;
170
+ }
171
+ function ae(e, r, t) {
172
+ const n = e.descriptors.measures.filter(
173
+ (a) => t.measureFormats[a.id] === void 0 && a.semanticFormat === void 0 && W(a.column.dataType) === "number"
174
+ );
175
+ if (n.length === 0) return t;
176
+ const o = /* @__PURE__ */ new Set();
177
+ e.columns.forEach((a, l) => {
178
+ if (!(a.kind !== "measure" || o.has(a.measureId)))
179
+ for (const m of r) {
180
+ const u = m.values[l];
181
+ if ((u == null ? void 0 : u.kind) === "value" && !ne(u.value)) {
182
+ o.add(a.measureId);
183
+ return;
184
+ }
185
+ }
186
+ });
187
+ const s = { ...t.measureFormats };
188
+ for (const { id: a } of n) {
189
+ const l = o.has(a) ? oe : 0;
190
+ s[a] = {
191
+ type: "number",
192
+ minimumFractionDigits: l,
193
+ maximumFractionDigits: l,
194
+ useGrouping: !0
195
+ };
196
+ }
197
+ return { ...t, measureFormats: s };
198
+ }
199
+ function P(e) {
200
+ return S(e.slice(0, -1));
201
+ }
202
+ function se(e, r) {
203
+ return r.length > e.length && S(r.slice(0, e.length)) === S(e);
204
+ }
205
+ function le(e) {
206
+ return e.map((r, t) => {
207
+ if (t === 0 || r.kind !== "layout") return !1;
208
+ const n = e[t - 1];
209
+ if (n.kind !== "layout") return !1;
210
+ if (r.role !== "member" || se(n.rowPath, r.rowPath)) return !0;
211
+ const o = e[t - 2];
212
+ return n.role === "member" && (!o || o.kind !== "layout" || o.role !== "member" || P(o.rowPath) !== P(n.rowPath)) && r.rowPath.length === n.rowPath.length && P(r.rowPath) === P(n.rowPath);
213
+ });
214
+ }
215
+ const ie = "pdf-group-continuation";
216
+ function ue(e) {
217
+ if (!e.previousRow || e.row.isSubtotal === !0 || e.row.isGrandTotal === !0 || e.previousRow.isSubtotal === !0 || e.previousRow.isGrandTotal === !0)
218
+ return !0;
219
+ for (let r = 0; r <= e.levelIndex; r++)
220
+ if (e.getValue(e.row, r) !== e.getValue(e.previousRow, r))
221
+ return !0;
222
+ return !1;
223
+ }
224
+ function ce(e, r, t) {
225
+ const n = F(e.descriptors, r.presentation, t), o = e.columns.map((i) => {
226
+ var c;
227
+ return i.kind === "measure" && ((c = n.measureSemantics.get(i.measureId)) == null ? void 0 : c.isNumeric) === !0;
228
+ }), s = (i) => I([i], n.levels), a = (i, c, f) => O(i, c, r.presentation.totals[f], n.levels), l = e.columns.map((i) => {
229
+ if (i.kind !== "measure") return i.label;
230
+ const c = i.columnPath.map(s);
231
+ return i.role !== "member" && c.push(a(i.columnPath, i.role, "columns")), [...c, i.label].join(" / ");
232
+ }), m = Math.min(r.spec.columns.length, Math.max(
233
+ 0,
234
+ ...e.columns.map((i) => i.kind === "measure" ? i.columnPath.length + (i.role !== "member" ? 1 : 0) : 0)
235
+ )), u = Array.from({ length: m + 1 }, (i, c) => e.columns.map((f) => c === m ? f.label : f.kind !== "measure" ? "" : c < f.columnPath.length ? s(f.columnPath[c]) : c === f.columnPath.length && f.role !== "member" ? a(f.columnPath, f.role, "columns") : "")), d = (i, c) => K({
236
+ path: i.rowPath,
237
+ role: i.kind === "layout" ? i.role : "member",
238
+ levelCount: Math.max(1, r.spec.rows.length),
239
+ repeatLabels: r.presentation.layout.kind !== "tabular" || r.presentation.layout.repeatLabels,
240
+ previousPath: c == null ? void 0 : c.rowPath
241
+ }), g = (i, c) => {
242
+ if (i.kind !== "layout") throw new Error("Layout presentation requires layout rows.");
243
+ if (i.values.length !== e.columns.length) throw new Error("Matrix row does not match its frozen layout.");
244
+ const f = d(i, c);
245
+ return e.columns.map((w, p) => {
246
+ if (w.kind === "hierarchy")
247
+ return `${" ".repeat(Math.max(0, i.rowPath.length - 1))}${a(i.rowPath, i.role, "rows")}`;
248
+ if (w.kind === "level") {
249
+ const y = r.spec.rows.findIndex((B) => B.id === w.levelId), v = f[y];
250
+ return v != null && v.visible ? v.total ? a(i.rowPath, i.role, "rows") : I(v.path, n.levels) : "";
251
+ }
252
+ const b = i.values[p], x = n.measures.get(w.measureId);
253
+ if (b.kind === "value" && !x)
254
+ throw new Error("Matrix value is missing its measure descriptor.");
255
+ return z(b, x, r.presentation.absence);
256
+ });
257
+ }, h = (i, c) => g(i, c).map((f, w) => {
258
+ var y;
259
+ const p = i.values[w], b = e.columns[w];
260
+ return b.kind === "measure" && !((y = n.measureSemantics.get(b.measureId)) != null && y.hasTextAffixes) && p.kind === "value" && (typeof p.value == "number" || k(p.value)) ? f : M(f);
261
+ });
262
+ return {
263
+ headers: l,
264
+ headerBands: u,
265
+ numericColumns: o,
266
+ /** A row's cells; after `previous`, a tabular layout prints each label once. */
267
+ row: (i, c) => g(i, c),
268
+ /**
269
+ * Level columns whose group label the row above shows, so this row
270
+ * continues the group (Plan 2, 2d, C8). Only a member row after a member
271
+ * row continues one: a total prints as a band, and its rules stay whole
272
+ * above and below it.
273
+ */
274
+ continuedColumns: (i, c) => {
275
+ const f = (p) => (p == null ? void 0 : p.kind) === "layout" && p.role === "member";
276
+ if (!f(i) || !f(c)) return [];
277
+ const w = d(i, c);
278
+ return e.columns.flatMap((p, b) => {
279
+ var y;
280
+ if (p.kind !== "level") return [];
281
+ const x = r.spec.rows.findIndex((v) => v.id === p.levelId);
282
+ return x < i.rowPath.length && ((y = w[x]) == null ? void 0 : y.visible) === !1 ? [b] : [];
283
+ });
284
+ },
285
+ csvRow: (i) => h(i),
286
+ // Each committed batch starts with identifying labels. Retries are pure;
287
+ // suppression never relies on mutable formatter state or an earlier worker.
288
+ csvRows: (i) => i.map((c, f) => h(c, i[f - 1]))
289
+ };
290
+ }
291
+ function De(e) {
292
+ return e.columns.map((r) => M(r.label));
293
+ }
294
+ function $e(e) {
295
+ if (e.kind !== "flat") throw new Error("Raw Matrix CSV requires flat rows.");
296
+ return e.values.map((r) => r.kind !== "value" ? null : k(r.value) ? r.value.value : typeof r.value == "string" ? M(r.value) : typeof r.value == "boolean" ? String(r.value) : r.value);
297
+ }
298
+ function me(e) {
299
+ const r = ce(e.layout, e.request, e.report), t = e.layout.columns.map((a, l) => ({
300
+ index: l,
301
+ columnId: `matrix:${l}`,
302
+ label: r.headers[l],
303
+ isNumeric: r.numericColumns[l]
304
+ })), n = (a, l, m) => ({
305
+ text: a,
306
+ colspan: 1,
307
+ rowspan: 1,
308
+ columnId: t[l].columnId,
309
+ isHeader: m,
310
+ isNumeric: t[l].isNumeric,
311
+ className: t[l].isNumeric ? "numeric" : e.layout.columns[l].kind === "hierarchy" ? "matrix-hierarchy" : ""
312
+ }), o = [], s = e.layout.columns.findIndex((a) => a.kind === "measure");
313
+ e.request.spec.columns.length && s >= 0 && o.push({
314
+ repeatHeader: !0,
315
+ headerType: "pivot-axis",
316
+ headerRowIndex: 0,
317
+ cells: [
318
+ ...s ? [{ ...n("", 0, !0), colspan: s }] : [],
319
+ {
320
+ ...n(e.request.spec.columns.map((a) => D(a, e.request.presentation)).join(" / "), s, !0),
321
+ colspan: e.layout.columns.length - s,
322
+ isNumeric: !1,
323
+ className: ""
324
+ }
325
+ ]
326
+ });
327
+ for (const [a, l] of r.headerBands.entries())
328
+ o.push({
329
+ repeatHeader: !0,
330
+ headerType: a === r.headerBands.length - 1 ? "metrics" : "pivot-level",
331
+ headerRowIndex: o.length,
332
+ cells: l.map((m, u) => n(m, u, !0))
333
+ });
334
+ return {
335
+ headers: o,
336
+ rows: e.rows.map((a, l) => {
337
+ const m = new Set(r.continuedColumns(a, e.rows[l - 1]));
338
+ return {
339
+ index: l,
340
+ type: a.kind === "layout" && a.role !== "member" ? "subtotal" : "data",
341
+ subtotalLevel: String(a.rowPath.length),
342
+ // A tabular layout prints each label once unless it repeats them; the
343
+ // blank cell continues its group, so a grid draws no rule above it.
344
+ cells: r.row(a, e.rows[l - 1]).map((u, d) => m.has(d) ? { ...n(u, d, !1), className: ie } : n(u, d, !1))
345
+ };
346
+ }),
347
+ grandTotal: null,
348
+ // Totals are already in the ordered body at their authored position.
349
+ metadata: {
350
+ tableType: "pivot",
351
+ totalRows: e.rows.length,
352
+ totalColumns: t.length,
353
+ rowLevels: e.layout.columns.filter((a) => a.kind !== "measure").length,
354
+ pivotLevels: e.request.spec.columns.length,
355
+ hasGrandTotal: !1,
356
+ columnOrder: t.map((a) => a.columnId),
357
+ columns: t
358
+ }
359
+ };
360
+ }
361
+ function fe(e, r, t) {
362
+ const { levels: n } = F(e.descriptors, r.presentation, t), o = r.spec.columns.length > 0, s = [], a = [], l = e.columns.map((u, d) => {
363
+ if (u.kind !== "measure") return null;
364
+ const g = o ? `${u.role}:${S(u.columnPath)}` : `measure:${d}`;
365
+ let h = s.indexOf(g);
366
+ return h < 0 && (h = s.push(g) - 1, a.push(o ? O(u.columnPath, u.role, r.presentation.totals.columns, n) : u.label)), h;
367
+ }), m = r.spec.columns[r.spec.columns.length - 1];
368
+ return {
369
+ columnGroups: l,
370
+ groupLabels: a,
371
+ /** What bands name their groups by: the innermost column level, or "Measures". */
372
+ groupLevelLabel: m ? D(m, r.presentation) : "Measures"
373
+ };
374
+ }
375
+ function Ne(e) {
376
+ const { layout: r, rows: t, report: n } = e, o = {
377
+ ...e.request,
378
+ presentation: ae(r, t, e.request.presentation)
379
+ }, s = me({ layout: r, rows: t, request: o, report: n }), a = le(t), l = fe(r, o, n), m = {
380
+ ...s,
381
+ rows: s.rows.map((u, d) => ({ ...u, keepWithPrevious: a[d] })),
382
+ metadata: { ...s.metadata, ...l }
383
+ };
384
+ return { request: o, table: m, ...l };
385
+ }
386
+ class ge extends Error {
387
+ constructor() {
388
+ super(...arguments);
389
+ A(this, "code", $);
390
+ }
391
+ }
392
+ function V(e) {
393
+ if (!e || typeof e != "object")
394
+ return;
395
+ const { error: r, message: t, detail: n } = e;
396
+ for (const o of [r, t, n])
397
+ if (typeof o == "string" && o.trim())
398
+ return o.trim();
399
+ }
400
+ async function de(e) {
401
+ const r = `PDF request failed: ${e.status} ${e.statusText}`.trim(), t = e.headers.get("content-type") || "";
402
+ try {
403
+ if (t.includes("application/json")) {
404
+ const o = await e.json(), s = typeof o.code == "string" ? o.code : typeof o.errorCode == "string" ? o.errorCode : void 0;
405
+ return { message: V(o) || r, code: s };
406
+ }
407
+ const n = await e.text();
408
+ if (!n.trim())
409
+ return { message: r };
410
+ try {
411
+ const o = JSON.parse(n), s = typeof o.code == "string" ? o.code : typeof o.errorCode == "string" ? o.errorCode : void 0;
412
+ return {
413
+ message: V(o) || n.trim(),
414
+ code: s
415
+ };
416
+ } catch {
417
+ return { message: n.trim() };
418
+ }
419
+ } catch {
420
+ return { message: r };
421
+ }
422
+ }
423
+ async function Ge(e) {
424
+ if (!e.token) throw new Error("Missing auth token for PDF export");
425
+ if (Y(e.serializedPayload) > q.maxRequestBytes)
426
+ throw new Error("Fast-path PDF request exceeds the structured body limit");
427
+ const r = await (e.fetchImpl ?? fetch)(e.url, {
428
+ method: "POST",
429
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${e.token}` },
430
+ body: e.serializedPayload,
431
+ signal: e.signal
432
+ });
433
+ if (!r.ok) {
434
+ const n = await de(r);
435
+ throw n.code === $ ? new ge(n.message) : new Error(n.message);
436
+ }
437
+ const t = await r.json();
438
+ if (t != null && t.error) throw new Error(t.error);
439
+ if (typeof (t == null ? void 0 : t.url) != "string" || !t.url.trim())
440
+ throw new Error("Fast-path PDF response missing download URL");
441
+ return t;
442
+ }
443
+ const pe = "__TOTAL__";
444
+ function T(e) {
445
+ return typeof e == "object" && e !== null && !Array.isArray(e);
446
+ }
447
+ function C(e) {
448
+ return e === pe;
449
+ }
450
+ function Be(e) {
451
+ const r = /* @__PURE__ */ new Map(), t = (e.groupByColumns ?? []).map((o, s) => {
452
+ var u, d, g;
453
+ if (!T(o))
454
+ throw new Error(`Aggregate groupByColumns[${s}] is invalid`);
455
+ const a = typeof o.id == "string" && o.id.length > 0 ? o.id : void 0, l = a ? (g = (d = (u = e.columnKeyMap) == null ? void 0 : u.byRole) == null ? void 0 : d.groupby) == null ? void 0 : g[a] : void 0, m = (l == null ? void 0 : l.outputKey) || (l == null ? void 0 : l.rawKey) || (typeof o.alias == "string" && o.alias.length > 0 ? o.alias : typeof o.name == "string" && o.name.length > 0 ? o.name : void 0);
456
+ if (!m)
457
+ throw new Error(`Aggregate groupByColumns[${s}] has no output key`);
458
+ return [a, o.alias, o.name, m].forEach((h) => {
459
+ typeof h == "string" && h.length > 0 && r.set(h, m);
460
+ }), m;
461
+ }), n = (e.rowAggregates ?? []).flatMap((o) => !T(o) || typeof o.function != "string" || typeof o.groupLevel != "string" ? [] : [
462
+ {
463
+ function: o.function,
464
+ groupLevel: o.groupLevel === "ALL" ? "ALL" : r.get(o.groupLevel) || o.groupLevel,
465
+ ...typeof o.label == "string" ? { label: o.label } : {}
466
+ }
467
+ ]);
468
+ return { groupColumnKeys: t, rowAggregates: n };
469
+ }
470
+ function N(e) {
471
+ return e === "SUM" ? "Total" : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
472
+ }
473
+ function he(e) {
474
+ var t;
475
+ if (e.customLabel) return e.customLabel;
476
+ const r = N(e.aggregateFunction);
477
+ if (e.levelValue !== void 0 && !C(e.levelValue)) {
478
+ if (e.levelValue === null) {
479
+ const o = (t = e.formatValue) == null ? void 0 : t.call(e, null);
480
+ return o ? `Subtotal ${o}` : `Subtotal ${r}`;
481
+ }
482
+ const n = e.formatValue ? e.formatValue(e.levelValue) : String(e.levelValue);
483
+ if (n) return `Subtotal (${n})`;
484
+ }
485
+ return `Subtotal ${r}`;
486
+ }
487
+ function we(e, r) {
488
+ return r || `Grand ${N(e)}`;
489
+ }
490
+ function Ue(e) {
491
+ const r = e.context.groupColumnKeys.indexOf(e.columnKey);
492
+ if (r < 0)
493
+ throw new Error(
494
+ `Aggregate group column "${e.columnKey}" is unknown`
495
+ );
496
+ return ue({
497
+ row: e.row,
498
+ previousRow: e.previousRow,
499
+ levelIndex: r,
500
+ getValue: (t, n) => t[e.context.groupColumnKeys[n]]
501
+ });
502
+ }
503
+ function G(e) {
504
+ var n, o;
505
+ const r = e.context.groupColumnKeys, t = typeof e.row.aggregate == "string" ? e.row.aggregate : "SUM";
506
+ if (e.row.isGrandTotal === !0) {
507
+ const s = (n = e.context.rowAggregates.find(
508
+ (a) => a.groupLevel === "ALL"
509
+ )) == null ? void 0 : n.label;
510
+ return {
511
+ kind: "grand-total",
512
+ cells: r.map((a, l) => ({
513
+ columnKey: a,
514
+ text: l === 0 ? we(t, s) : "",
515
+ placement: l === 0 ? "label" : "empty",
516
+ colSpan: l === 0 ? r.length : 1
517
+ }))
518
+ };
519
+ }
520
+ if (e.row.isSubtotal === !0) {
521
+ if (typeof e.row.subtotalLevel != "string")
522
+ throw new Error("Aggregate subtotal row is missing subtotalLevel");
523
+ const s = r.indexOf(e.row.subtotalLevel);
524
+ if (s < 0)
525
+ throw new Error(
526
+ `Aggregate subtotal level "${e.row.subtotalLevel}" has no group column`
527
+ );
528
+ const a = T(e.row.subtotalContext) ? e.row.subtotalContext : void 0, l = T(a == null ? void 0 : a.groupByValues) ? a.groupByValues : {}, m = (o = e.context.rowAggregates.find(
529
+ (u) => u.groupLevel === e.row.subtotalLevel && u.function === t
530
+ )) == null ? void 0 : o.label;
531
+ return {
532
+ kind: "subtotal",
533
+ cells: r.map((u, d) => {
534
+ if (d > s)
535
+ return {
536
+ columnKey: u,
537
+ text: "",
538
+ placement: "empty",
539
+ colSpan: 1
540
+ };
541
+ if (d < s) {
542
+ const g = e.row[u];
543
+ return {
544
+ columnKey: u,
545
+ text: g === void 0 || C(g) ? "" : e.formatValue(g, u),
546
+ placement: "value",
547
+ colSpan: 1
548
+ };
549
+ }
550
+ return {
551
+ columnKey: u,
552
+ text: he({
553
+ aggregateFunction: t,
554
+ customLabel: m,
555
+ levelValue: l[u],
556
+ formatValue: (g) => e.formatLabelValue ? e.formatLabelValue(g, u) : String(e.formatValue(g, u) ?? "")
557
+ }),
558
+ placement: "label",
559
+ colSpan: r.length - s
560
+ };
561
+ })
562
+ };
563
+ }
564
+ return {
565
+ kind: "data",
566
+ cells: r.map((s) => {
567
+ const a = e.row[s];
568
+ return {
569
+ columnKey: s,
570
+ text: a === void 0 || C(a) ? "" : e.formatValue(a, s),
571
+ placement: "value",
572
+ colSpan: 1
573
+ };
574
+ })
575
+ };
576
+ }
577
+ function je(e) {
578
+ const r = G(e).cells.find(
579
+ (t) => t.columnKey === e.columnKey
580
+ );
581
+ if (!r)
582
+ throw new Error(`Aggregate group column "${e.columnKey}" is unknown`);
583
+ return r.text;
584
+ }
585
+ function Xe(e) {
586
+ return G(e).cells.map((r) => r.text);
587
+ }
588
+ class be extends Error {
589
+ constructor(t, n) {
590
+ super(`${t}: ${n}`);
591
+ A(this, "deliveryBlocking", !0);
592
+ this.code = t, this.name = "PivotHeaderPresentationError";
593
+ }
594
+ }
595
+ function He(e) {
596
+ var o;
597
+ const r = e.mode ?? "formatted", t = e.members.map((s) => {
598
+ var l;
599
+ if (r === "canonical" || !s.temporalBucket)
600
+ return s.value === null ? "" : String(s.value);
601
+ const a = (l = e.resolveTemporalFormat) == null ? void 0 : l.call(e, s.fieldId);
602
+ if (!a)
603
+ throw new be(
604
+ "missing_resolved_temporal_format",
605
+ `Missing resolved temporal presentation for pivot field "${s.fieldId}"`
606
+ );
607
+ return J({
608
+ value: s.value,
609
+ metadata: s.temporalBucket,
610
+ format: a
611
+ });
612
+ }), n = ((o = e.metricLabel) == null ? void 0 : o.trim()) || void 0;
613
+ return {
614
+ memberLabels: t,
615
+ ...n ? { metricLabel: n } : {},
616
+ flattenedLabel: [
617
+ ...t,
618
+ ...n ? [n] : []
619
+ ].join(" / ")
620
+ };
621
+ }
622
+ export {
623
+ pe as A,
624
+ Ue as B,
625
+ G as C,
626
+ te as D,
627
+ je as E,
628
+ Me as F,
629
+ Xe as G,
630
+ be as H,
631
+ He as I,
632
+ ue as J,
633
+ Ie as M,
634
+ ie as P,
635
+ ee as a,
636
+ re as b,
637
+ _e as c,
638
+ Re as d,
639
+ Q as e,
640
+ Ce as f,
641
+ ce as g,
642
+ $e as h,
643
+ me as i,
644
+ Ne as j,
645
+ Fe as k,
646
+ Oe as l,
647
+ De as m,
648
+ oe as n,
649
+ ke as o,
650
+ M as p,
651
+ ae as q,
652
+ Ve as r,
653
+ le as s,
654
+ ge as t,
655
+ de as u,
656
+ Ge as v,
657
+ C as w,
658
+ Be as x,
659
+ he as y,
660
+ we as z
661
+ };