react-semaphor 0.1.544 → 0.1.546

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 (179) hide show
  1. package/dist/analytics-protocol/index.js +405 -441
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +100 -76
  4. package/dist/brand-studio/index.js +5 -5
  5. package/dist/briefings/index.js +55 -52
  6. package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
  7. package/dist/chunks/{add-to-dashboard-BuAqfA2Y.js → add-to-dashboard-BQRAAnc3.js} +55 -33
  8. package/dist/chunks/{analytics-base-schemas-BFAoRlkU.js → analytics-base-schemas-BKs3flFS.js} +2 -2
  9. package/dist/chunks/{assistant-chat-BNLkCDml.js → assistant-chat-BPXhulAx.js} +2792 -2562
  10. package/dist/chunks/{bookmark-state-CXw7lZ50.js → bookmark-state-C4vetoa0.js} +7 -8
  11. package/dist/chunks/column-catalog-BYnochWQ.js +3363 -0
  12. package/dist/chunks/comparison-window-caption-C2xF-eWw.js +1433 -0
  13. package/dist/chunks/{context-ClREvqCZ.js → context-BerEBuFR.js} +11 -6
  14. package/dist/chunks/custom-visual-inputs-CkJW9pBS.js +295 -0
  15. package/dist/chunks/{dashboard-g5a4DKWq.js → dashboard-C3CoKbGY.js} +1 -1
  16. package/dist/chunks/dashboard-briefing-launcher-Be4h-7My.js +3734 -0
  17. package/dist/chunks/dashboard-controls-bxPrlSyp.js +2307 -0
  18. package/dist/chunks/{dashboard-json-7qT9jmfL.js → dashboard-json-BrjxIiRt.js} +6 -6
  19. package/dist/chunks/document-dashboard-inputs-CRVHpIHp.js +3010 -0
  20. package/dist/chunks/{edit-dashboard-visual-BfJwnRIZ.js → edit-dashboard-visual-DYYYDjY6.js} +5986 -6063
  21. package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-Ddf55Ku1.js} +8 -8
  22. package/dist/chunks/global-date-filter-utils-9d6m9-FE.js +11859 -0
  23. package/dist/chunks/index-CtoK1Lgu.js +586 -0
  24. package/dist/chunks/{index-DkAyQvC6.js → index-DkQkMKa1.js} +385 -339
  25. package/dist/chunks/list-filter-DsaTbM3J.js +15 -0
  26. package/dist/chunks/matrix-analytical-definition-B9vW-osb.js +717 -0
  27. package/dist/chunks/{matrix-card-DjwWcCo8.js → matrix-card-LiMEipvq.js} +3 -3
  28. package/dist/chunks/{matrix-formatter-CxJLkztA.js → matrix-formatter-DWEeC0_c.js} +55 -55
  29. package/dist/chunks/{matrix-member-presentation-CQGdVks6.js → matrix-member-presentation-DqzG-UhQ.js} +1 -1
  30. package/dist/chunks/{matrix-operation-contract-8OIO4gob.js → matrix-operation-contract-D6vYkZK4.js} +72 -72
  31. package/dist/chunks/{metric-comparison-DEwi9uc2.js → metric-comparison-zpGw4lD6.js} +2 -2
  32. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
  33. package/dist/chunks/{pivot-header-presentation-DHcx1XGQ.js → pivot-header-presentation-CQnIDtUv.js} +1 -1
  34. package/dist/chunks/{pivot-result-identity-DJhXXcns.js → pivot-result-identity-C-Q1j1Wb.js} +1 -1
  35. package/dist/chunks/{pivot-result-lifecycle-DM4CyGKs.js → pivot-result-lifecycle-pwq3b7LC.js} +571 -380
  36. package/dist/chunks/{raw-temporal-contract-C51YG48G.js → raw-temporal-contract-WuXA8jBP.js} +1 -1
  37. package/dist/chunks/{raw-temporal-presentation-CLiVi90c.js → raw-temporal-presentation-CBzrDOjM.js} +8 -8
  38. package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
  39. package/dist/chunks/{report-preferences-dialog-Df7VpRVW.js → report-preferences-dialog-4QEZWe5U.js} +637 -610
  40. package/dist/chunks/{report-runtime-context-Dq8XyODK.js → report-runtime-context-hWiTCzFV.js} +2 -2
  41. package/dist/chunks/resolve-dashboard-input-context-UpK_LBpL.js +5677 -0
  42. package/dist/chunks/{saved-dashboard-context-B-mQ--nV.js → saved-dashboard-context-D_I3Lxk0.js} +184 -212
  43. package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
  44. package/dist/chunks/{selection-reducer-Dj_8xD69.js → selection-reducer-CJzkTZio.js} +15 -15
  45. package/dist/chunks/{semaphor-ready-indicator-DDAxk8us.js → semaphor-ready-indicator-4zpRHE-X.js} +56832 -59068
  46. package/dist/chunks/{shelf-drop-preview-context-BSRPwaED.js → shelf-drop-preview-context-Cfw7TRAx.js} +890 -871
  47. package/dist/chunks/{source-entity-resolution-BYn9giz3.js → source-entity-resolution-BIGRvtbG.js} +13 -13
  48. package/dist/chunks/{switch-C3jLxlG0.js → switch-CEBOR4n7.js} +47 -48
  49. package/dist/chunks/{table-export-sheet-CPfGAQ9X.js → table-export-sheet-4X9mAG3V.js} +1 -1
  50. package/dist/chunks/table-settings-CunhoDUi.js +605 -0
  51. package/dist/chunks/{temporal-bucket-D7NBrrtL.js → temporal-bucket-CQOSbv9-.js} +26 -26
  52. package/dist/chunks/{token-types-DBbZVQsm.js → token-types-BMqRmT-C.js} +1 -1
  53. package/dist/chunks/{use-create-flow-overlay-state-BxzFviM-.js → use-create-flow-overlay-state-DZBZiiD-.js} +83 -83
  54. package/dist/chunks/{validators-DMHTpf7a.js → validators-C-aOQlTB.js} +713 -658
  55. package/dist/dashboard/index.js +2 -2
  56. package/dist/dashboard-authoring/index.js +1800 -1135
  57. package/dist/data-app-sdk/index.js +6 -6
  58. package/dist/data-app-sdk-adapters/index.js +3 -3
  59. package/dist/data-app-sdk-validation/index.js +14 -14
  60. package/dist/format-utils/index.js +198 -187
  61. package/dist/index.js +359 -325
  62. package/dist/layouts/index.js +5 -242
  63. package/dist/report-runtime-context/index.js +2 -2
  64. package/dist/shared/index.js +4 -5
  65. package/dist/style.css +1 -1
  66. package/dist/surfboard/index.js +2 -2
  67. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  68. package/dist/types/briefings/attachments.d.ts +33 -6
  69. package/dist/types/briefings/index.d.ts +6 -5
  70. package/dist/types/components/index.d.ts +2 -0
  71. package/dist/types/components/surfboard/arrange-layout-button.d.ts +8 -0
  72. package/dist/types/components/surfboard/filter/types.d.ts +0 -14
  73. package/dist/types/components/surfboard/screen-size-preview-button.d.ts +7 -0
  74. package/dist/types/index.js +6 -6
  75. package/dist/types/lib/charts/table-chart-types.d.ts +4 -0
  76. package/dist/types/lib/charts/types.d.ts +2 -2
  77. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
  78. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
  79. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +41 -1
  80. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +201 -0
  81. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +15 -0
  82. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
  83. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
  84. package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
  85. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
  86. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
  87. package/dist/types/lib/download-pdf.d.ts +75 -1
  88. package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
  89. package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
  90. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
  91. package/dist/types/lib/matrix-table/matrix-editor.d.ts +52 -0
  92. package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
  93. package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
  94. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
  95. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
  96. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
  97. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +69 -0
  98. package/dist/types/lib/stores/dashboard-store.d.ts +159 -56
  99. package/dist/types/lib/stores/editor-store.d.ts +0 -3
  100. package/dist/types/lib/types/common-types.d.ts +29 -6
  101. package/dist/types/lib/types/explorer-types.d.ts +10 -0
  102. package/dist/types/lib/types/semantic-types.d.ts +84 -0
  103. package/dist/types/lib/utils/build-saved-editor-card.d.ts +20 -0
  104. package/dist/types/lib/utils/card-type-change.d.ts +16 -0
  105. package/dist/types/lib/utils/field-availability-context.d.ts +25 -0
  106. package/dist/types/lib/utils/field-placement.d.ts +96 -0
  107. package/dist/types/lib/utils/field-state-calculator.d.ts +161 -0
  108. package/dist/types/lib/utils/qualified-entity-name.d.ts +2 -0
  109. package/dist/types/shared/analytics-protocol/field-provenance.d.ts +89 -0
  110. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  111. package/dist/types/shared/analytics-protocol/query-policies.d.ts +52 -0
  112. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +1 -1
  113. package/dist/types/shared/analytics-protocol/time-window.d.ts +40 -1
  114. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -12
  115. package/dist/types/shared/assistant-protocol/answer-text.d.ts +20 -0
  116. package/dist/types/shared/assistant-protocol/context.d.ts +21 -21
  117. package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
  118. package/dist/types/shared/assistant-protocol/limits.d.ts +6 -1
  119. package/dist/types/shared/assistant-protocol/parts.d.ts +43 -3
  120. package/dist/types/shared/assistant-protocol/request.d.ts +14 -2
  121. package/dist/types/shared/dashboard-authoring/calculated-field-identity.d.ts +3 -0
  122. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +487 -0
  123. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +34 -0
  124. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +7886 -0
  125. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +43 -0
  126. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +54 -0
  127. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +89 -0
  128. package/dist/types/shared/dashboard-authoring/column-catalog.d.ts +32 -0
  129. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -55
  130. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -6
  131. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +9 -1
  132. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
  133. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +118 -0
  134. package/dist/types/shared/dashboard-authoring/filter-applicability.d.ts +75 -0
  135. package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
  136. package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
  137. package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
  138. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
  139. package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
  140. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
  141. package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
  142. package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
  143. package/dist/types/shared/dashboard-authoring/index.d.ts +20 -2
  144. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +10 -37
  145. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +189 -0
  146. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +94 -0
  147. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +78 -0
  148. package/dist/types/shared/dashboard-authoring/validators.d.ts +1 -2
  149. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
  150. package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
  151. package/dist/types/shared/layouts/engine/grid.d.ts +25 -0
  152. package/dist/types/shared/layouts/engine/index.d.ts +4 -0
  153. package/dist/types/shared/layouts/engine/sheet-layout.d.ts +7 -0
  154. package/dist/types/shared/layouts/engine/types.d.ts +125 -0
  155. package/dist/types/shared/layouts/index.d.ts +1 -2
  156. package/package.json +2 -2
  157. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
  158. package/dist/chunks/apply-dashboard-operations-Bz4n1Lq6.js +0 -2260
  159. package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
  160. package/dist/chunks/comparison-window-caption-BTkrN3W4.js +0 -1623
  161. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +0 -323
  162. package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +0 -3725
  163. package/dist/chunks/dashboard-controls-8RyBTQUO.js +0 -2315
  164. package/dist/chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js +0 -108
  165. package/dist/chunks/document-dashboard-inputs-BC6p-ESg.js +0 -8087
  166. package/dist/chunks/document-sheet-utils-Duo9uLoH.js +0 -3619
  167. package/dist/chunks/matrix-analytical-definition-C7Gb0e12.js +0 -117
  168. package/dist/chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js +0 -67
  169. package/dist/chunks/numeric-presentation-DESvLiu9.js +0 -5227
  170. package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
  171. package/dist/chunks/stable-serialize-CfqXeiBP.js +0 -6
  172. package/dist/chunks/table-settings-CLZocegs.js +0 -501
  173. package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +0 -59
  174. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
  175. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
  176. package/dist/types/shared/dashboard-authoring/change-compiler.d.ts +0 -7
  177. package/dist/types/shared/dashboard-authoring/layout-compiler.d.ts +0 -2
  178. package/dist/types/shared/layouts/create-frame-layouts.d.ts +0 -27
  179. package/dist/types/shared/layouts/frame-layouts.d.ts +0 -23
@@ -1,25 +1,29 @@
1
- var _e = Object.defineProperty;
2
- var Oe = (e, n, t) => n in e ? _e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var L = (e, n, t) => Oe(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { r as ae, q as de, j as Fe } from "./temporal-bucket-D7NBrrtL.js";
5
- import { a8 as J, l as Ne, t as Re } from "./validators-DMHTpf7a.js";
6
- import { l as Be, C as Me } from "./export-file-format-C-tJsxsf.js";
1
+ var Fe = Object.defineProperty;
2
+ var Ne = (e, n, t) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var L = (e, n, t) => Ne(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { r as ae, q as se, j as Re } from "./temporal-bucket-CQOSbv9-.js";
5
+ import { Y as J, ab as Be, o as Me } from "./validators-C-aOQlTB.js";
6
+ import { l as Le, C as Ue } from "./export-file-format-C-tJsxsf.js";
7
7
  import { z as y } from "zod";
8
- import { F as Le, q as Ue, o as Pe, P as B } from "./pivot-result-lifecycle-DM4CyGKs.js";
9
- import { af as Ve, ah as ze, V as je } from "./matrix-operation-contract-8OIO4gob.js";
10
- import "./analytics-base-schemas-BFAoRlkU.js";
8
+ import { I as Pe, q as ze, o as Ve, P as B } from "./pivot-result-lifecycle-pwq3b7LC.js";
9
+ import { af as je, ah as qe, U as Ke } from "./matrix-operation-contract-D6vYkZK4.js";
10
+ import "./analytics-base-schemas-BKs3flFS.js";
11
11
  import "../value-format-preferences/index.js";
12
- import { aa as qe, ab as Ke, ac as He, r as Ge, n as We } from "./numeric-presentation-DESvLiu9.js";
13
- import { r as Xe } from "./matrix-card-DjwWcCo8.js";
14
- import { x as Ze } from "./table-settings-CLZocegs.js";
15
- import { r as Ye, a as Je, b as Qe, c as et, d as tt } from "./raw-temporal-presentation-CLiVi90c.js";
16
- import { f as nt, r as rt, b as ot, g as at } from "./custom-visual-inputs-DUtpYZOk.js";
17
- const it = /* @__PURE__ */ new Set([
12
+ import { r as He } from "./rendered-file-D8xEuVVx.js";
13
+ import { cI as Ge, cJ as We, cK as Xe, r as Ze, n as Ye } from "./global-date-filter-utils-9d6m9-FE.js";
14
+ import { r as Je } from "./matrix-card-LiMEipvq.js";
15
+ import { z as Qe } from "./table-settings-CunhoDUi.js";
16
+ import { r as et, a as tt, b as nt, c as rt, d as ot } from "./raw-temporal-presentation-CBzrDOjM.js";
17
+ import "./index-CtoK1Lgu.js";
18
+ import "./index-CuHybtft.js";
19
+ import "./_commonjsHelpers-DimLPMtv.js";
20
+ import { f as at, r as it, b as ct, g as lt } from "./custom-visual-inputs-CkJW9pBS.js";
21
+ const dt = /* @__PURE__ */ new Set([
18
22
  "table",
19
23
  "aggregateTable",
20
24
  "pivotTable",
21
25
  "detailTable"
22
- ]), ct = /* @__PURE__ */ new Set([
26
+ ]), st = /* @__PURE__ */ new Set([
23
27
  "bar",
24
28
  "horizontalBar",
25
29
  "line",
@@ -50,21 +54,21 @@ const it = /* @__PURE__ */ new Set([
50
54
  "treemap",
51
55
  "custom"
52
56
  ]);
53
- function Vn(e) {
57
+ function Zn(e) {
54
58
  var o, a, i;
55
- const n = ct.has(e.type) && (e.type !== "custom" || !!((o = e.customCardPreferences) != null && o.url));
59
+ const n = st.has(e.type) && (e.type !== "custom" || !!((o = e.customCardPreferences) != null && o.url));
56
60
  let t = !1;
57
61
  try {
58
- t = !!Xe(e);
62
+ t = !!Je(e);
59
63
  } catch {
60
64
  return { formats: [], defaultFormat: null };
61
65
  }
62
- return e.type === "text" || !n || !t && qe(e) ? { formats: [], defaultFormat: null } : {
63
- formats: lt({
66
+ return e.type === "text" || !n || !t && Ge(e) ? { formats: [], defaultFormat: null } : {
67
+ formats: ut({
64
68
  cardType: e.type,
65
69
  allowDownload: (a = e.preferences) == null ? void 0 : a.allowDownload
66
70
  }).filter((c) => c !== "xlsx" || e.type !== "matrixTable" || t),
67
- defaultFormat: dt({
71
+ defaultFormat: pt({
68
72
  cardType: e.type,
69
73
  allowDownload: (i = e.preferences) == null ? void 0 : i.allowDownload
70
74
  })
@@ -73,21 +77,39 @@ function Vn(e) {
73
77
  function Q(e) {
74
78
  return e === "table" || e === "detailTable";
75
79
  }
76
- function zn(e) {
77
- var n, t;
78
- return e.type !== "card" || e.format === "pdf" ? !1 : !!((n = e.settings) != null && n.matrix) || Q((t = e.settings) == null ? void 0 : t.cardType);
80
+ function mt(e) {
81
+ var t, r;
82
+ if (e.type !== "card")
83
+ return { kind: "rendered", format: e.format };
84
+ const n = !!((t = e.settings) != null && t.matrix);
85
+ switch (e.format) {
86
+ case "png":
87
+ return { kind: "rendered", format: "png" };
88
+ case "pdf":
89
+ return n ? { kind: "matrix_pdf" } : { kind: "rendered", format: "pdf" };
90
+ case "csv":
91
+ case "xlsx":
92
+ return n || Q((r = e.settings) == null ? void 0 : r.cardType) ? { kind: "export_job", format: e.format } : { kind: "rendered", format: "csv" };
93
+ }
94
+ }
95
+ function Yn(e) {
96
+ return mt(e).kind === "export_job";
97
+ }
98
+ function ft(e) {
99
+ const { label: n, extension: t, contentType: r } = e === "pdf" || e === "png" ? He(e) : Le(e);
100
+ return { label: n, extension: t, contentType: r };
79
101
  }
80
- function lt(e) {
81
- return e.allowDownload === !1 ? ["pdf"] : e.cardType === "matrixTable" || Q(e.cardType) ? ["pdf", "csv", "xlsx"] : ["pdf", "csv"];
102
+ function ut(e) {
103
+ return e.allowDownload === !1 ? ["pdf", "png"] : e.cardType === "matrixTable" || Q(e.cardType) ? ["pdf", "png", "csv", "xlsx"] : ["pdf", "png", "csv"];
82
104
  }
83
- function jn(e) {
84
- return e === "pdf" ? "PDF" : Be(e).label;
105
+ function Jn(e) {
106
+ return ft(e).label;
85
107
  }
86
- function dt(e) {
87
- return it.has(e.cardType) && e.allowDownload !== !1 ? "csv" : "pdf";
108
+ function pt(e) {
109
+ return dt.has(e.cardType) && e.allowDownload !== !1 ? "csv" : "pdf";
88
110
  }
89
- function qn(e) {
90
- const { config: n } = e, t = Le({
111
+ function Qn(e) {
112
+ const { config: n } = e, t = Pe({
91
113
  spec: n.spec,
92
114
  presentation: n.presentation,
93
115
  defaults: n.defaultView,
@@ -107,7 +129,7 @@ function qn(e) {
107
129
  }
108
130
  });
109
131
  }
110
- const st = y.object({
132
+ const ht = y.object({
111
133
  connection_id: y.string().min(1),
112
134
  cardType: y.literal("matrixTable"),
113
135
  resultOwner: y.literal("config"),
@@ -122,7 +144,7 @@ const st = y.object({
122
144
  semanticDomainId: y.string().optional()
123
145
  }).passthrough(),
124
146
  active_filters: y.array(y.unknown()).default([])
125
- }).passthrough(), Kn = st.extend({
147
+ }).passthrough(), er = ht.extend({
126
148
  dashboardId: y.string().min(1),
127
149
  cardId: y.string().min(1),
128
150
  formatOptions: y.object({
@@ -137,7 +159,7 @@ const st = y.object({
137
159
  });
138
160
  })
139
161
  });
140
- function Hn(e) {
162
+ function tr(e) {
141
163
  return {
142
164
  ...e.controls,
143
165
  type: "card",
@@ -165,25 +187,25 @@ function Hn(e) {
165
187
  delimiter: e.delimiter,
166
188
  includeHeaders: e.includeHeaders,
167
189
  timezone: e.reportContext.calendar.tz,
168
- presentationExecutionSnapshot: Ue({
190
+ presentationExecutionSnapshot: ze({
169
191
  reportContext: e.reportContext,
170
192
  resolvedFormats: []
171
193
  })
172
194
  }
173
195
  };
174
196
  }
175
- const K = y.number().int().nonnegative(), Gn = y.discriminatedUnion("status", [
197
+ const K = y.number().int().nonnegative(), nr = y.discriminatedUnion("status", [
176
198
  y.object({
177
199
  status: y.literal("ok"),
178
200
  request: J,
179
- layout: Ve,
180
- rows: y.array(ze).readonly(),
201
+ layout: je,
202
+ rows: y.array(qe).readonly(),
181
203
  usage: y.object({ rows: K, cells: K, bytes: K }).strict()
182
204
  }).strict(),
183
205
  y.object({
184
206
  status: y.literal("failed"),
185
207
  failure: y.object({
186
- code: y.enum(je),
208
+ code: y.enum(Ke),
187
209
  limit: y.enum(["rows", "bytes"]).optional(),
188
210
  message: y.string().min(1),
189
211
  retryable: y.boolean()
@@ -193,7 +215,7 @@ const K = y.number().int().nonnegative(), Gn = y.discriminatedUnion("status", [
193
215
  function ie(e) {
194
216
  return !e || typeof e != "object" ? !1 : Array.isArray(e.cards);
195
217
  }
196
- function mt(e) {
218
+ function yt(e) {
197
219
  if (!e)
198
220
  return null;
199
221
  if (typeof e == "string")
@@ -205,14 +227,14 @@ function mt(e) {
205
227
  }
206
228
  return ie(e) ? e : null;
207
229
  }
208
- function se(e) {
230
+ function me(e) {
209
231
  var n;
210
232
  return (n = e == null ? void 0 : e.cards) != null && n.length ? e.activeCardId && e.cards.find((t) => t.id === e.activeCardId) || e.cards[0] : null;
211
233
  }
212
- function Wn(e) {
234
+ function rr(e) {
213
235
  var t;
214
236
  const n = (e == null ? void 0 : e.frameObject) ?? ((t = e == null ? void 0 : e.visual) == null ? void 0 : t.frameObject);
215
- return se(mt(n));
237
+ return me(yt(n));
216
238
  }
217
239
  class U extends Error {
218
240
  constructor(t) {
@@ -225,7 +247,7 @@ class U extends Error {
225
247
  this.name = "TemporalSnapshotSelectionError", this.selection = t;
226
248
  }
227
249
  }
228
- function ft(e, n) {
250
+ function gt(e, n) {
229
251
  var o;
230
252
  const t = [], r = /* @__PURE__ */ new Map();
231
253
  for (const a of n) {
@@ -239,9 +261,9 @@ function ft(e, n) {
239
261
  let c = !a.cardId;
240
262
  for (const l of i) {
241
263
  const m = (((o = l.document) == null ? void 0 : o.sections) || []).flatMap(
242
- (h) => Ze(h)
264
+ (h) => Qe(h)
243
265
  ), s = (l.frames || []).flatMap(
244
- (h) => ut(h, a.cardId)
266
+ (h) => bt(h, a.cardId)
245
267
  );
246
268
  s.length > 0 && (c = !0);
247
269
  const u = [
@@ -267,29 +289,29 @@ function ft(e, n) {
267
289
  }
268
290
  return t;
269
291
  }
270
- function ut(e, n) {
292
+ function bt(e, n) {
271
293
  var i;
272
- const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) : se(e);
294
+ const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) : me(e);
273
295
  if (!t) return [];
274
- const r = nt(e, t), o = (e.cards || []).filter(
296
+ const r = at(e, t), o = (e.cards || []).filter(
275
297
  (c) => {
276
298
  var l;
277
299
  return typeof ((l = c.customCardPreferences) == null ? void 0 : l.slotIndex) == "number";
278
300
  }
279
- ).length > 1, a = r != null && (rt(r) === "multiple" || o);
280
- return !r || !a ? [t] : ot(
281
- at({
301
+ ).length > 1, a = r != null && (it(r) === "multiple" || o);
302
+ return !r || !a ? [t] : ct(
303
+ lt({
282
304
  frame: e,
283
305
  configCard: r,
284
306
  isMultiInputVisual: !0
285
307
  })
286
308
  ).filter((c) => c !== null);
287
309
  }
288
- function Xn(e) {
289
- return ft(e.dashboard, e.selections).flatMap(
310
+ function or(e) {
311
+ return gt(e.dashboard, e.selections).flatMap(
290
312
  ({ card: n, attachmentIndex: t }) => {
291
313
  var s, u, h, g;
292
- const r = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, n)) ?? n.config, o = Ke({
314
+ const r = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, n)) ?? n.config, o = We({
293
315
  card: n,
294
316
  cardConfig: r
295
317
  }), a = {
@@ -303,7 +325,7 @@ function Xn(e) {
303
325
  fieldId: E.id,
304
326
  role: E.role
305
327
  },
306
- format: He(
328
+ format: Xe(
307
329
  E,
308
330
  {
309
331
  dateStyle: e.valueFormatPreferences.dateStyle,
@@ -311,11 +333,11 @@ function Xn(e) {
311
333
  },
312
334
  e.valueFormatPreferences.locale
313
335
  )
314
- })) : [], c = [], l = Ge(n, r), m = We(
336
+ })) : [], c = [], l = Ze(n, r), m = Ye(
315
337
  n.python || ""
316
338
  );
317
339
  if (n.type === "detailTable" && l === "config") {
318
- const E = (r == null ? void 0 : r.detailColumns) || [], x = [
340
+ const E = (r == null ? void 0 : r.detailColumns) || [], C = [
319
341
  ...((r == null ? void 0 : r.groupByColumns) || []).map(($) => ({
320
342
  field: $,
321
343
  role: "groupby"
@@ -333,21 +355,21 @@ function Xn(e) {
333
355
  role: "detail"
334
356
  }))
335
357
  ], _ = /* @__PURE__ */ new Map(), M = new Set(
336
- x.map(
337
- ({ field: $, role: T }) => Ye($, T)
358
+ C.map(
359
+ ({ field: $, role: T }) => et($, T)
338
360
  )
339
361
  );
340
- for (const { field: $ } of x) {
362
+ for (const { field: $ } of C) {
341
363
  const T = $.label;
342
364
  T && _.set(T, (_.get(T) || 0) + 1);
343
365
  }
344
366
  for (const $ of E) {
345
- const T = Ne($.dataType);
367
+ const T = Be($.dataType);
346
368
  if (T !== "date" && T !== "datetime") continue;
347
- const De = Je($), q = $.label, oe = Qe({
369
+ const Oe = tt($), q = $.label, oe = nt({
348
370
  label: q,
349
371
  labelCount: q && _.get(q) || 0,
350
- rawKey: De,
372
+ rawKey: Oe,
351
373
  rawKeys: M
352
374
  });
353
375
  if (!oe) throw new U(a);
@@ -355,19 +377,19 @@ function Xn(e) {
355
377
  scope: a,
356
378
  target: { kind: "column", columnKey: oe },
357
379
  format: ae({
358
- format: et($),
380
+ format: rt($),
359
381
  preferences: e.valueFormatPreferences,
360
382
  calendar: e.calendar
361
383
  })
362
384
  });
363
385
  }
364
386
  } else if (l === "freeform" && ((u = n.sql) != null && u.trim()) && !m.trim())
365
- for (const [E, x] of Object.entries(
387
+ for (const [E, C] of Object.entries(
366
388
  ((g = (h = n.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : g.columnSettingsMap) || {}
367
389
  )) {
368
- if (x.type !== "date") continue;
369
- const _ = tt(
370
- x.dateFormat
390
+ if (C.type !== "date") continue;
391
+ const _ = ot(
392
+ C.dateFormat
371
393
  );
372
394
  _ && c.push({
373
395
  scope: a,
@@ -383,11 +405,11 @@ function Xn(e) {
383
405
  }
384
406
  );
385
407
  }
386
- function pt(e) {
408
+ function It(e) {
387
409
  return !!e && typeof e == "object" && !Array.isArray(e);
388
410
  }
389
411
  function A(e, n, t) {
390
- return pt(e) ? e : (t.push({ field: n, message: "Expected an object." }), {});
412
+ return It(e) ? e : (t.push({ field: n, message: "Expected an object." }), {});
391
413
  }
392
414
  function w(e, n, t, r) {
393
415
  const o = new Set(t);
@@ -538,7 +560,7 @@ function ce(e, n, t) {
538
560
  }
539
561
  return o;
540
562
  }
541
- function ht(e, n) {
563
+ function vt(e, n) {
542
564
  const t = "presentation.appearance", r = A(e, t, n);
543
565
  w(r, t, ["version", "schemes"], n);
544
566
  const o = {};
@@ -563,7 +585,7 @@ function ht(e, n) {
563
585
  }
564
586
  return o;
565
587
  }
566
- function yt(e, n) {
588
+ function Et(e, n) {
567
589
  const t = "presentation.brandOverrides", r = A(e, t, n);
568
590
  w(r, t, ["brandName", "logoUrl", "link"], n);
569
591
  const o = F(
@@ -578,7 +600,7 @@ function yt(e, n) {
578
600
  ...i !== void 0 ? { link: i } : {}
579
601
  };
580
602
  }
581
- function gt(e, n) {
603
+ function $t(e, n) {
582
604
  const t = "presentation.fragments", r = A(e, t, n), o = [
583
605
  "preHeaderText",
584
606
  "headerBannerHtml",
@@ -600,9 +622,9 @@ function gt(e, n) {
600
622
  c !== void 0 && (a[i] = c);
601
623
  }), a;
602
624
  }
603
- function bt(e) {
625
+ function xt(e) {
604
626
  const n = [], t = {};
605
- if (e.appearance !== void 0 && (t.appearance = ht(e.appearance, n)), e.brandOverrides !== void 0 && (t.brandOverrides = yt(e.brandOverrides, n)), e.fragments !== void 0 && (t.fragments = gt(e.fragments, n)), e.viewUrl !== void 0) {
627
+ if (e.appearance !== void 0 && (t.appearance = vt(e.appearance, n)), e.brandOverrides !== void 0 && (t.brandOverrides = Et(e.brandOverrides, n)), e.fragments !== void 0 && (t.fragments = $t(e.fragments, n)), e.viewUrl !== void 0) {
606
628
  const r = ee(e.viewUrl, "presentation.viewUrl", n);
607
629
  r !== void 0 && (t.viewUrl = r);
608
630
  }
@@ -616,21 +638,21 @@ const P = [
616
638
  "THU",
617
639
  "FRI",
618
640
  "SAT"
619
- ], me = new Map(
641
+ ], fe = new Map(
620
642
  P.map((e, n) => [e, n])
621
- ), z = [1, 2, 3, 4, 5], fe = [1, 2, 3, 6, 12], ue = {
643
+ ), V = [1, 2, 3, 4, 5], ue = [1, 2, 3, 6, 12], pe = {
622
644
  1: "first",
623
645
  2: "second",
624
646
  3: "third",
625
647
  4: "fourth",
626
648
  [-1]: "last"
627
- }, Zn = {
649
+ }, ar = {
628
650
  frequency: "weekly",
629
651
  hour: 9,
630
652
  minute: 0,
631
653
  weekdays: [1]
632
654
  }, S = { ok: !1, issue: "Choose a supported schedule." };
633
- function It(e) {
655
+ function Ct(e) {
634
656
  if (typeof e != "string" || e.length === 0 || e !== e.trim() || /^(?:(?:UTC|GMT)[+-]|[+-]\d{2}:\d{2}$)/.test(e))
635
657
  return !1;
636
658
  try {
@@ -639,17 +661,17 @@ function It(e) {
639
661
  return !1;
640
662
  }
641
663
  }
642
- function vt(e) {
664
+ function Tt(e) {
643
665
  return Number.isInteger(e.minute) && e.minute >= 0 && e.minute <= 59 && Number.isInteger(e.hour) && e.hour >= 0 && e.hour <= 23;
644
666
  }
645
- function pe(e) {
667
+ function he(e) {
646
668
  if (e.length === 0) return null;
647
669
  const n = [...e].sort((t, r) => t - r);
648
670
  return n.some(
649
671
  (t, r) => !Number.isInteger(t) || t < 0 || t > 6 || r > 0 && t === n[r - 1]
650
672
  ) ? null : n;
651
673
  }
652
- function he(e) {
674
+ function ye(e) {
653
675
  const t = [...e.filter((o) => o !== "last")].sort((o, a) => o - a);
654
676
  if (t.some(
655
677
  (o, a) => !Number.isInteger(o) || o < 1 || o > 31 || a > 0 && o === t[a - 1]
@@ -664,51 +686,51 @@ function R(e, n) {
664
686
  t.push((n + r * e) % 12);
665
687
  return t.sort((r, o) => r - o);
666
688
  }
667
- function Et(e, n) {
689
+ function St(e, n) {
668
690
  return e === 1 ? "*" : R(e, n).map((t) => t + 1).join(",");
669
691
  }
670
- function ye(e, n) {
671
- return e.every((t) => wt(t, n));
692
+ function ge(e, n) {
693
+ return e.every((t) => Nt(t, n));
672
694
  }
673
- function Yn(e) {
674
- if (!vt(e))
695
+ function ir(e) {
696
+ if (!Tt(e))
675
697
  throw new Error("Choose a valid schedule time.");
676
698
  const n = `${e.minute} ${e.hour}`;
677
699
  switch (e.frequency) {
678
700
  case "daily":
679
- return e.weekdaysOnly ? `${n} * * ${z.map((t) => P[t]).join(",")}` : `${n} * * *`;
701
+ return e.weekdaysOnly ? `${n} * * ${V.map((t) => P[t]).join(",")}` : `${n} * * *`;
680
702
  case "weekly": {
681
- const t = pe(e.weekdays);
703
+ const t = he(e.weekdays);
682
704
  if (!t) throw new Error("Choose at least one weekday.");
683
705
  return `${n} * * ${t.map((r) => P[r]).join(",")}`;
684
706
  }
685
707
  case "monthly": {
686
- if (!fe.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
708
+ if (!ue.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
687
709
  throw new Error("Choose a valid month cycle.");
688
- const t = Et(e.interval, e.startMonth);
710
+ const t = St(e.interval, e.startMonth);
689
711
  if (e.on.type === "days") {
690
- const i = he(e.on.days);
712
+ const i = ye(e.on.days);
691
713
  if (!i) throw new Error("Choose at least one day of the month.");
692
714
  const c = R(e.interval, e.startMonth);
693
- if (!ye(i, c))
715
+ if (!ge(i, c))
694
716
  throw new Error("Choose a day that occurs in the chosen months.");
695
717
  const l = i.map((m) => m === "last" ? "L" : String(m)).join(",");
696
718
  return `${n} ${l} ${t} *`;
697
719
  }
698
720
  const { ordinal: r, weekday: o } = e.on;
699
- if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in ue))
721
+ if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in pe))
700
722
  throw new Error("Choose a valid weekday.");
701
723
  const a = P[o];
702
724
  return `${n} * ${t} ${r === -1 ? `${a}L` : `${a}#${r}`}`;
703
725
  }
704
726
  }
705
727
  }
706
- function $t(e) {
728
+ function kt(e) {
707
729
  if (e === "*") return { interval: 1, startMonth: 0 };
708
730
  const n = e.split(",");
709
731
  if (n.some((i) => !/^([1-9]|1[0-2])$/.test(i))) return null;
710
732
  const t = n.map((i) => Number(i) - 1), r = 12 / t.length;
711
- if (!fe.includes(r))
733
+ if (!ue.includes(r))
712
734
  return null;
713
735
  const o = t[0], a = R(
714
736
  r,
@@ -716,24 +738,24 @@ function $t(e) {
716
738
  );
717
739
  return o >= r || a.length !== t.length || a.some((i, c) => i !== t[c]) ? null : { interval: r, startMonth: o };
718
740
  }
719
- function Ct(e) {
741
+ function At(e) {
720
742
  const n = e.split(",");
721
743
  if (n.some((o) => !/^(L|[1-9]|[12]\d|3[01])$/.test(o))) return null;
722
744
  const t = n.map(
723
745
  (o) => o === "L" ? "last" : Number(o)
724
- ), r = he(t);
746
+ ), r = ye(t);
725
747
  return !r || r.some((o, a) => o !== t[a]) ? null : r;
726
748
  }
727
- function xt(e) {
749
+ function wt(e) {
728
750
  const n = /^([A-Z]{3})(?:#([1-4])|(L))$/.exec(e);
729
751
  if (!n) return null;
730
- const t = me.get(n[1]);
752
+ const t = fe.get(n[1]);
731
753
  return t === void 0 ? null : {
732
754
  weekday: t,
733
755
  ordinal: n[3] ? -1 : Number(n[2])
734
756
  };
735
757
  }
736
- function ge(e) {
758
+ function be(e) {
737
759
  if (typeof e != "string" || e.length === 0 || e !== e.trim() || e.includes(" "))
738
760
  return S;
739
761
  const n = e.split(" ");
@@ -749,10 +771,10 @@ function ge(e) {
749
771
  value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !1 }
750
772
  };
751
773
  if (a === "*" && o === "*" && !i.includes("#") && !i.endsWith("L")) {
752
- const u = i.split(",").map((E) => me.get(E));
774
+ const u = i.split(",").map((E) => fe.get(E));
753
775
  if (u.some((E) => E === void 0)) return S;
754
- const h = u, g = pe(h);
755
- return !g || g.some((E, x) => E !== h[x]) ? S : g.length === z.length && g.every((E, x) => E === z[x]) ? {
776
+ const h = u, g = he(h);
777
+ return !g || g.some((E, C) => E !== h[C]) ? S : g.length === V.length && g.every((E, C) => E === V[C]) ? {
756
778
  ok: !0,
757
779
  value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !0 }
758
780
  } : {
@@ -760,11 +782,11 @@ function ge(e) {
760
782
  value: { frequency: "weekly", hour: l, minute: c, weekdays: g }
761
783
  };
762
784
  }
763
- const m = $t(a);
785
+ const m = kt(a);
764
786
  if (!m) return S;
765
787
  if (o !== "*" && i === "*") {
766
- const s = Ct(o), u = R(m.interval, m.startMonth);
767
- return !s || !ye(s, u) ? S : {
788
+ const s = At(o), u = R(m.interval, m.startMonth);
789
+ return !s || !ge(s, u) ? S : {
768
790
  ok: !0,
769
791
  value: {
770
792
  frequency: "monthly",
@@ -776,7 +798,7 @@ function ge(e) {
776
798
  };
777
799
  }
778
800
  if (o === "*" && i !== "*") {
779
- const s = xt(i);
801
+ const s = wt(i);
780
802
  return s ? {
781
803
  ok: !0,
782
804
  value: {
@@ -790,14 +812,14 @@ function ge(e) {
790
812
  }
791
813
  return S;
792
814
  }
793
- function Tt(e, n, t) {
815
+ function Dt(e, n, t) {
794
816
  return new Intl.DateTimeFormat(t, {
795
817
  hour: "numeric",
796
818
  minute: "2-digit",
797
819
  timeZone: "UTC"
798
820
  }).format(new Date(Date.UTC(2020, 0, 1, e, n)));
799
821
  }
800
- function St(e, n) {
822
+ function _t(e, n) {
801
823
  var t;
802
824
  if (e === "UTC") return "UTC";
803
825
  try {
@@ -812,11 +834,11 @@ function St(e, n) {
812
834
  function le(e) {
813
835
  return e.length <= 1 ? e.join("") : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`;
814
836
  }
815
- function kt(e) {
837
+ function Ot(e) {
816
838
  const n = e % 100;
817
839
  return n >= 11 && n <= 13 ? `${e}th` : `${e}${["th", "st", "nd", "rd"][e % 10] ?? "th"}`;
818
840
  }
819
- function At(e, n, t) {
841
+ function Ft(e, n, t) {
820
842
  const r = (a, i) => new Intl.DateTimeFormat(t, { month: i, timeZone: "UTC" }).format(
821
843
  new Date(Date.UTC(2020, a, 1))
822
844
  );
@@ -825,13 +847,13 @@ function At(e, n, t) {
825
847
  const o = R(e, n).map((a) => r(a, "short")).join(", ");
826
848
  return e === 3 ? `each quarter (${o})` : `every ${e} months (${o})`;
827
849
  }
828
- function Jn(e, n, t = "en-US") {
829
- const r = ge(e);
850
+ function cr(e, n, t = "en-US") {
851
+ const r = be(e);
830
852
  if (!r.ok) return null;
831
853
  try {
832
- const o = r.value, a = St(n, t);
854
+ const o = r.value, a = _t(n, t);
833
855
  if (!a) return null;
834
- const i = `at ${Tt(o.hour, o.minute, t)} ${a}`, c = (l) => new Intl.DateTimeFormat(t, {
856
+ const i = `at ${Dt(o.hour, o.minute, t)} ${a}`, c = (l) => new Intl.DateTimeFormat(t, {
835
857
  weekday: "long",
836
858
  timeZone: "UTC"
837
859
  }).format(new Date(Date.UTC(2023, 0, 1 + l)));
@@ -841,11 +863,11 @@ function Jn(e, n, t = "en-US") {
841
863
  case "weekly":
842
864
  return `Every ${le(o.weekdays.map(c))} ${i}`;
843
865
  case "monthly": {
844
- const l = At(o.interval, o.startMonth, t);
866
+ const l = Ft(o.interval, o.startMonth, t);
845
867
  if (o.on.type === "weekday")
846
- return `On the ${ue[o.on.ordinal]} ${c(o.on.weekday)} of ${l} ${i}`;
868
+ return `On the ${pe[o.on.ordinal]} ${c(o.on.weekday)} of ${l} ${i}`;
847
869
  const m = o.on.days.map(
848
- (s) => s === "last" ? "last day" : kt(s)
870
+ (s) => s === "last" ? "last day" : Ot(s)
849
871
  );
850
872
  return `On the ${le(m)} of ${l} ${i}`;
851
873
  }
@@ -854,42 +876,42 @@ function Jn(e, n, t = "en-US") {
854
876
  return null;
855
877
  }
856
878
  }
857
- const be = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
858
- function wt(e, n) {
859
- return e === "last" || n.some((t) => e <= be[t]);
879
+ const Ie = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
880
+ function Nt(e, n) {
881
+ return e === "last" || n.some((t) => e <= Ie[t]);
860
882
  }
861
- function Qn(e) {
883
+ function lr(e) {
862
884
  if (e.frequency !== "monthly" || e.on.type !== "days") return null;
863
885
  const n = e.on.days.filter((o) => o !== "last");
864
886
  if (n.length === 0) return null;
865
887
  const t = Math.max(...n), r = R(e.interval, e.startMonth).filter(
866
- (o) => t > (o === 1 ? 28 : be[o])
888
+ (o) => t > (o === 1 ? 28 : Ie[o])
867
889
  );
868
890
  return r.length > 0 ? { day: t, months: r } : null;
869
891
  }
870
- function Dt(e, n) {
892
+ function Rt(e, n) {
871
893
  return new Date(Date.UTC(e, n + 1, 0)).getUTCDate();
872
894
  }
873
- function _t(e, n, t, r) {
895
+ function Bt(e, n, t, r) {
874
896
  const o = new Date(Date.UTC(n, t, r)).getUTCDay();
875
897
  switch (e.frequency) {
876
898
  case "daily":
877
- return !e.weekdaysOnly || z.includes(o);
899
+ return !e.weekdaysOnly || V.includes(o);
878
900
  case "weekly":
879
901
  return e.weekdays.includes(o);
880
902
  case "monthly": {
881
903
  if (!R(e.interval, e.startMonth).includes(t))
882
904
  return !1;
883
- const a = Dt(n, t);
905
+ const a = Rt(n, t);
884
906
  return e.on.type === "days" ? e.on.days.some(
885
907
  (i) => i === "last" ? r === a : i === r
886
908
  ) : o !== e.on.weekday ? !1 : e.on.ordinal === -1 ? r + 7 > a : Math.ceil(r / 7) === e.on.ordinal;
887
909
  }
888
910
  }
889
911
  }
890
- function er(e, n, t, r) {
891
- const o = ge(e);
892
- if (!o.ok || !It(n)) return [];
912
+ function dr(e, n, t, r) {
913
+ const o = be(e);
914
+ if (!o.ok || !Ct(n)) return [];
893
915
  const a = o.value, i = new Intl.DateTimeFormat("en-US", {
894
916
  timeZone: n,
895
917
  hourCycle: "h23",
@@ -905,10 +927,10 @@ function er(e, n, t, r) {
905
927
  c("hour") * 60 + c("minute") >= a.hour * 60 + a.minute && l.setUTCDate(l.getUTCDate() + 1);
906
928
  const m = [];
907
929
  for (let s = 0; s < 366 * 4 * (r + 1) && m.length < r; s += 1)
908
- _t(a, l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()) && m.push(l.toISOString().slice(0, 10)), l.setUTCDate(l.getUTCDate() + 1);
930
+ Bt(a, l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()) && m.push(l.toISOString().slice(0, 10)), l.setUTCDate(l.getUTCDate() + 1);
909
931
  return m;
910
932
  }
911
- const Ot = Object.freeze([
933
+ const Mt = Object.freeze([
912
934
  "PDF_ROW_LIMIT_EXCEEDED",
913
935
  "PDF_SIZE_LIMIT_EXCEEDED",
914
936
  "TABLE_COMPLETENESS_UNVERIFIED",
@@ -921,15 +943,17 @@ const Ot = Object.freeze([
921
943
  "EXCEL_LIMIT_EXCEEDED",
922
944
  "EXPORT_ROW_LIMIT_EXCEEDED",
923
945
  "EXPORT_COUNT_UNAVAILABLE",
924
- "EXPORT_NO_ROWS"
925
- ]), Ft = new Set(Ot);
926
- function Nt(e) {
927
- return typeof e == "string" && Ft.has(e);
946
+ "EXPORT_NO_ROWS",
947
+ // A dashboard sheet too tall for one image (PNG exports PN-D7).
948
+ "IMAGE_TOO_LARGE"
949
+ ]), Lt = new Set(Mt);
950
+ function Ut(e) {
951
+ return typeof e == "string" && Lt.has(e);
928
952
  }
929
- function Rt(e) {
953
+ function Pt(e) {
930
954
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
931
955
  const n = e;
932
- return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" || n.format !== "pdf" && n.format !== "csv" && n.format !== "xlsx" || !Nt(n.code) || typeof n.reason != "string" || typeof n.diagnostic != "string" ? null : {
956
+ return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" || !ve.includes(n.format) || !Ut(n.code) || typeof n.reason != "string" || typeof n.diagnostic != "string" ? null : {
933
957
  index: n.index,
934
958
  title: n.title,
935
959
  format: n.format,
@@ -938,39 +962,39 @@ function Rt(e) {
938
962
  diagnostic: n.diagnostic
939
963
  };
940
964
  }
941
- function tr(e) {
965
+ function sr(e) {
942
966
  if (!e || typeof e != "object" || Array.isArray(e)) return [];
943
967
  const n = e.omittedAttachments;
944
968
  return Array.isArray(n) ? n.flatMap((t) => {
945
- const r = Rt(t);
969
+ const r = Pt(t);
946
970
  return r ? [r] : [];
947
971
  }) : [];
948
972
  }
949
- function nr(e) {
973
+ function mr(e) {
950
974
  return e != null && e.role ? e.type === "tenant" ? e.role === "POWER_USER" : ["AUTHOR", "ADMIN", "SUPER_ADMIN"].includes(e.role) : !1;
951
975
  }
952
- function rr(e) {
976
+ function fr(e) {
953
977
  return e.canCreate ? [
954
978
  ...e.scheduledReportAvailable ? ["scheduled_report"] : [],
955
979
  ...e.analyticalBriefingsEnabled ? ["analytical_briefing"] : []
956
980
  ] : [];
957
981
  }
958
- function Bt(e) {
982
+ function zt(e) {
959
983
  const n = (e == null ? void 0 : e.channels) ?? [];
960
984
  return n.length === 1 && n[0] === "EMAIL";
961
985
  }
962
- function Mt(e) {
963
- return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && Bt(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
986
+ function Vt(e) {
987
+ return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && zt(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
964
988
  }
965
- function or(e) {
966
- const n = Mt(e), t = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
989
+ function ur(e) {
990
+ const n = Vt(e), t = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
967
991
  return {
968
992
  typeLabel: n,
969
993
  noun: t,
970
994
  pluralNoun: t === "report" ? "reports" : "briefings"
971
995
  };
972
996
  }
973
- const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
997
+ const Z = "BRIEFING", jt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
974
998
  name: 500,
975
999
  description: 2e3,
976
1000
  instruction: 5e4,
@@ -986,7 +1010,7 @@ const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
986
1010
  presentationTone: 500,
987
1011
  presentationFormat: 2e3,
988
1012
  id: 500
989
- }, C = {
1013
+ }, x = {
990
1014
  maxBlocks: 50,
991
1015
  maxTableRows: 100,
992
1016
  maxTableColumns: 20,
@@ -999,7 +1023,7 @@ const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
999
1023
  // tiny tiles in narrow client panels; 2-up was the chosen layout).
1000
1024
  maxKpiTiles: 8
1001
1025
  };
1002
- function Ut(e) {
1026
+ function qt(e) {
1003
1027
  if (e === null || typeof e != "object" || Array.isArray(e))
1004
1028
  return !1;
1005
1029
  const n = e;
@@ -1009,17 +1033,17 @@ function Ut(e) {
1009
1033
  if (t === null || typeof t != "object" || Array.isArray(t))
1010
1034
  return !1;
1011
1035
  const r = t;
1012
- return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) && de(n.format).ok;
1036
+ return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) && se(n.format).ok;
1013
1037
  }
1014
- function Pt(e) {
1015
- return e == null ? "" : Ut(e) ? Fe(e.value, e.format) : String(e);
1038
+ function Kt(e) {
1039
+ return e == null ? "" : qt(e) ? Re(e.value, e.format) : String(e);
1016
1040
  }
1017
- function ar(e) {
1041
+ function pr(e) {
1018
1042
  return [e.delta, e.percentChange].filter(
1019
1043
  (n) => n != null
1020
- ).map(Pt).filter(Boolean).join(" / ");
1044
+ ).map(Kt).filter(Boolean).join(" / ");
1021
1045
  }
1022
- const Ie = new Set(Lt), Vt = /* @__PURE__ */ new Set([
1046
+ const ve = ["pdf", "png", "csv", "xlsx"], Ee = new Set(jt), Ht = /* @__PURE__ */ new Set([
1023
1047
  "EMAIL",
1024
1048
  "WEBHOOK",
1025
1049
  "SLACK",
@@ -1030,39 +1054,39 @@ const Ie = new Set(Lt), Vt = /* @__PURE__ */ new Set([
1030
1054
  maxPlanningIterations: { min: 1, max: 10 },
1031
1055
  maxRows: { min: 1, max: 1e5 },
1032
1056
  timeoutMs: { min: 1e3, max: 30 * 6e4 }
1033
- }, zt = /* @__PURE__ */ new Set([
1057
+ }, Gt = /* @__PURE__ */ new Set([
1034
1058
  "letter",
1035
1059
  "legal",
1036
1060
  "a4",
1037
1061
  "a3",
1038
1062
  "tabloid"
1039
- ]), jt = /* @__PURE__ */ new Set([
1063
+ ]), Wt = /* @__PURE__ */ new Set([
1040
1064
  "portrait",
1041
1065
  "landscape"
1042
- ]), qt = /* @__PURE__ */ new Set([",", ";", " "]), Kt = new Set(Me), Ht = /* @__PURE__ */ new Set([
1066
+ ]), Xt = /* @__PURE__ */ new Set([",", ";", " "]), Zt = new Set(Ue), Yt = /* @__PURE__ */ new Set([
1043
1067
  "current",
1044
1068
  "all"
1045
- ]), Gt = /* @__PURE__ */ new Set([
1069
+ ]), Jt = /* @__PURE__ */ new Set([
1046
1070
  "concise",
1047
1071
  "balanced",
1048
1072
  "detailed"
1049
- ]), Wt = /* @__PURE__ */ new Set([
1073
+ ]), Qt = /* @__PURE__ */ new Set([
1050
1074
  "info",
1051
1075
  "positive",
1052
1076
  "warning",
1053
1077
  "critical"
1054
- ]), Xt = /* @__PURE__ */ new Set([
1078
+ ]), en = /* @__PURE__ */ new Set([
1055
1079
  "text",
1056
1080
  "number",
1057
1081
  "currency",
1058
1082
  "percent",
1059
1083
  "date",
1060
1084
  "boolean"
1061
- ]), Zt = /* @__PURE__ */ new Set([
1085
+ ]), tn = /* @__PURE__ */ new Set([
1062
1086
  "left",
1063
1087
  "center",
1064
1088
  "right"
1065
- ]), Yt = [
1089
+ ]), nn = [
1066
1090
  "matrix",
1067
1091
  "pageSize",
1068
1092
  "orientation",
@@ -1100,14 +1124,14 @@ class j extends Error {
1100
1124
  this.name = "BriefingContractError", this.issues = t;
1101
1125
  }
1102
1126
  }
1103
- function ve(e) {
1127
+ function $e(e) {
1104
1128
  return typeof e == "object" && e !== null && !Array.isArray(e);
1105
1129
  }
1106
1130
  function d(e, n, t) {
1107
1131
  e.push({ field: n, message: t });
1108
1132
  }
1109
1133
  function v(e, n, t) {
1110
- return ve(e) ? e : (d(t, n, "Expected an object."), {});
1134
+ return $e(e) ? e : (d(t, n, "Expected an object."), {});
1111
1135
  }
1112
1136
  function p(e, n, t, r) {
1113
1137
  const o = new Set(t);
@@ -1136,13 +1160,13 @@ function I(e, n, t, r) {
1136
1160
  if (o)
1137
1161
  return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
1138
1162
  }
1139
- function Jt(e, n, t, r) {
1163
+ function rn(e, n, t, r) {
1140
1164
  if (typeof e != "string")
1141
1165
  return d(r, n, "Expected a string."), "";
1142
1166
  const o = e.trim();
1143
1167
  return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
1144
1168
  }
1145
- function Qt(e, n, t) {
1169
+ function on(e, n, t) {
1146
1170
  if (e != null) {
1147
1171
  if (!Number.isInteger(e) || Number(e) < 0) {
1148
1172
  d(t, n, "Expected a non-negative integer.");
@@ -1170,13 +1194,13 @@ function k(e, n, t, r = {}) {
1170
1194
  function N(e, n, t, r) {
1171
1195
  return e == null ? n : typeof e != "boolean" ? (d(r, t, "Expected a boolean."), n) : e;
1172
1196
  }
1173
- function en(e, n) {
1197
+ function an(e, n) {
1174
1198
  return e == null ? "ACTIVE" : e === "ACTIVE" || e === "PAUSED" || e === "DISABLED" ? e : (d(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
1175
1199
  }
1176
- function tn(e) {
1200
+ function cn(e) {
1177
1201
  return e.includes("@") && e.includes(".") && !e.includes(" ");
1178
1202
  }
1179
- function Ee(e, n) {
1203
+ function xe(e, n) {
1180
1204
  if (e == null)
1181
1205
  return { type: "project" };
1182
1206
  const t = v(e, "source", n), r = t.type;
@@ -1190,7 +1214,7 @@ function Ee(e, n) {
1190
1214
  )
1191
1215
  }) : (d(n, "source.type", "Expected project or dashboard."), { type: "project" });
1192
1216
  }
1193
- function $e(e, n) {
1217
+ function Ce(e, n) {
1194
1218
  const t = v(e, "body", n), r = t.type;
1195
1219
  return r === "generated_analysis" ? (p(t, "body", ["type", "instruction"], n), {
1196
1220
  type: "generated_analysis",
@@ -1202,7 +1226,7 @@ function $e(e, n) {
1202
1226
  )
1203
1227
  }) : r === "custom_message" ? (p(t, "body", ["type", "message"], n), {
1204
1228
  type: "custom_message",
1205
- message: Jt(
1229
+ message: rn(
1206
1230
  t.message,
1207
1231
  "body.message",
1208
1232
  f.customMessage,
@@ -1214,7 +1238,7 @@ function $e(e, n) {
1214
1238
  "Expected generated_analysis, custom_message, or none."
1215
1239
  ), { type: "none" });
1216
1240
  }
1217
- function nn(e, n) {
1241
+ function ln(e, n) {
1218
1242
  if (e == null)
1219
1243
  return [...Y];
1220
1244
  if (!Array.isArray(e))
@@ -1227,7 +1251,7 @@ function nn(e, n) {
1227
1251
  ), [];
1228
1252
  const t = [];
1229
1253
  return e.forEach((r, o) => {
1230
- if (typeof r != "string" || !Ie.has(r)) {
1254
+ if (typeof r != "string" || !Ee.has(r)) {
1231
1255
  d(
1232
1256
  n,
1233
1257
  `presentation.artifactFormats.${o}`,
@@ -1238,7 +1262,7 @@ function nn(e, n) {
1238
1262
  t.includes(r) || t.push(r);
1239
1263
  }), t;
1240
1264
  }
1241
- function Ce(e, n) {
1265
+ function Te(e, n) {
1242
1266
  if (e == null)
1243
1267
  return {
1244
1268
  artifactFormats: [...Y],
@@ -1264,7 +1288,7 @@ function Ce(e, n) {
1264
1288
  n
1265
1289
  );
1266
1290
  const r = {
1267
- artifactFormats: nn(t.artifactFormats, n),
1291
+ artifactFormats: ln(t.artifactFormats, n),
1268
1292
  includeEvidence: N(
1269
1293
  t.includeEvidence,
1270
1294
  !0,
@@ -1294,15 +1318,15 @@ function Ce(e, n) {
1294
1318
  n
1295
1319
  );
1296
1320
  o && (r.audience = o), a && (r.tone = a), i && (r.format = i);
1297
- const c = bt(t);
1321
+ const c = xt(t);
1298
1322
  return c.issues.forEach((l) => d(n, l.field, l.message)), Object.assign(r, c.value), r;
1299
1323
  }
1300
- function rn(e, n, t) {
1301
- return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length > C.maxListItems && d(
1324
+ function dn(e, n, t) {
1325
+ return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length > x.maxListItems && d(
1302
1326
  t,
1303
1327
  n,
1304
- `Must have ${C.maxListItems} items or fewer.`
1305
- ), e.slice(0, C.maxListItems).map(
1328
+ `Must have ${x.maxListItems} items or fewer.`
1329
+ ), e.slice(0, x.maxListItems).map(
1306
1330
  (r, o) => b(
1307
1331
  r,
1308
1332
  `${n}.${o}`,
@@ -1311,7 +1335,7 @@ function rn(e, n, t) {
1311
1335
  )
1312
1336
  ).filter(Boolean)) : (d(t, n, "Expected an array."), []);
1313
1337
  }
1314
- function on(e, n, t) {
1338
+ function sn(e, n, t) {
1315
1339
  const r = v(e, n, t);
1316
1340
  if (r.kind === "metric")
1317
1341
  return p(r, n, ["kind", "metricId"], t), {
@@ -1349,18 +1373,18 @@ function on(e, n, t) {
1349
1373
  "Expected metric, column, or matrix_measure."
1350
1374
  );
1351
1375
  }
1352
- function xe(e, n, t) {
1376
+ function Se(e, n, t) {
1353
1377
  if (e === null || typeof e != "object" || Array.isArray(e))
1354
1378
  return;
1355
1379
  const r = v(e, n, t);
1356
1380
  if (!Object.prototype.hasOwnProperty.call(r, "target") && !Object.prototype.hasOwnProperty.call(r, "format"))
1357
1381
  return;
1358
1382
  p(r, n, ["value", "target", "format"], t), (typeof r.value != "number" || !Number.isFinite(r.value)) && d(t, `${n}.value`, "Expected a finite number.");
1359
- const o = on(
1383
+ const o = sn(
1360
1384
  r.target,
1361
1385
  `${n}.target`,
1362
1386
  t
1363
- ), a = de(r.format);
1387
+ ), a = se(r.format);
1364
1388
  if (a.ok || a.issues.forEach(
1365
1389
  (i) => d(
1366
1390
  t,
@@ -1380,7 +1404,7 @@ function O(e, n, t) {
1380
1404
  }
1381
1405
  return e;
1382
1406
  }
1383
- const r = xe(e, n, t);
1407
+ const r = Se(e, n, t);
1384
1408
  if (r) return r;
1385
1409
  d(
1386
1410
  t,
@@ -1388,30 +1412,30 @@ function O(e, n, t) {
1388
1412
  "Expected a string, number, or structured numeric value."
1389
1413
  );
1390
1414
  }
1391
- function an(e, n, t) {
1415
+ function mn(e, n, t) {
1392
1416
  if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean")
1393
1417
  return typeof e == "string" && e.length > f.contentCell ? (d(
1394
1418
  t,
1395
1419
  n,
1396
1420
  `Must be ${f.contentCell} characters or fewer.`
1397
1421
  ), e.slice(0, f.contentCell)) : typeof e == "number" && !Number.isFinite(e) ? (d(t, n, "Expected a finite number."), null) : e;
1398
- const r = xe(e, n, t);
1422
+ const r = Se(e, n, t);
1399
1423
  return r || (d(
1400
1424
  t,
1401
1425
  n,
1402
1426
  "Expected a string, number, boolean, structured numeric value, or null."
1403
1427
  ), null);
1404
1428
  }
1405
- function cn(e, n, t) {
1429
+ function fn(e, n, t) {
1406
1430
  if (!Array.isArray(e))
1407
1431
  return d(t, n, "Expected an array."), [];
1408
- e.length === 0 && d(t, n, "Expected at least one column."), e.length > C.maxTableColumns && d(
1432
+ e.length === 0 && d(t, n, "Expected at least one column."), e.length > x.maxTableColumns && d(
1409
1433
  t,
1410
1434
  n,
1411
- `Must have ${C.maxTableColumns} columns or fewer.`
1435
+ `Must have ${x.maxTableColumns} columns or fewer.`
1412
1436
  );
1413
1437
  const r = /* @__PURE__ */ new Set();
1414
- return e.slice(0, C.maxTableColumns).map((o, a) => {
1438
+ return e.slice(0, x.maxTableColumns).map((o, a) => {
1415
1439
  const i = `${n}.${a}`, c = v(o, i, t);
1416
1440
  p(c, i, ["key", "label", "kind", "align"], t);
1417
1441
  const l = b(
@@ -1429,13 +1453,13 @@ function cn(e, n, t) {
1429
1453
  ), s = D(
1430
1454
  c.kind,
1431
1455
  `${i}.kind`,
1432
- Xt,
1456
+ en,
1433
1457
  "text, number, currency, percent, date, or boolean",
1434
1458
  t
1435
1459
  ), u = D(
1436
1460
  c.align,
1437
1461
  `${i}.align`,
1438
- Zt,
1462
+ tn,
1439
1463
  "left, center, or right",
1440
1464
  t
1441
1465
  );
@@ -1447,28 +1471,28 @@ function cn(e, n, t) {
1447
1471
  };
1448
1472
  });
1449
1473
  }
1450
- function ln(e, n, t, r) {
1474
+ function un(e, n, t, r) {
1451
1475
  if (!Array.isArray(e))
1452
1476
  return d(r, n, "Expected an array."), [];
1453
- e.length > C.maxTableRows && d(
1477
+ e.length > x.maxTableRows && d(
1454
1478
  r,
1455
1479
  n,
1456
- `Must have ${C.maxTableRows} rows or fewer.`
1480
+ `Must have ${x.maxTableRows} rows or fewer.`
1457
1481
  );
1458
1482
  const o = new Set(t.map((a) => a.key).filter(Boolean));
1459
- return e.slice(0, C.maxTableRows).map((a, i) => {
1483
+ return e.slice(0, x.maxTableRows).map((a, i) => {
1460
1484
  const c = `${n}.${i}`, l = v(a, c, r);
1461
1485
  return Object.keys(l).forEach((m) => {
1462
1486
  o.has(m) || d(r, `${c}.${m}`, `Unexpected table cell "${m}".`);
1463
1487
  }), Object.fromEntries(
1464
1488
  t.map((m) => [
1465
1489
  m.key,
1466
- an(l[m.key] ?? null, `${c}.${m.key}`, r)
1490
+ mn(l[m.key] ?? null, `${c}.${m.key}`, r)
1467
1491
  ])
1468
1492
  );
1469
1493
  });
1470
1494
  }
1471
- function dn(e, n, t) {
1495
+ function pn(e, n, t) {
1472
1496
  const r = `content.blocks.${n}`, o = v(e, r, t), a = o.type;
1473
1497
  if (a === "heading") {
1474
1498
  p(o, r, ["type", "text", "level", "evidenceIds"], t);
@@ -1511,7 +1535,7 @@ function dn(e, n, t) {
1511
1535
  ), c = D(
1512
1536
  o.severity,
1513
1537
  `${r}.severity`,
1514
- Wt,
1538
+ Qt,
1515
1539
  "info, positive, warning, or critical",
1516
1540
  t
1517
1541
  );
@@ -1541,7 +1565,7 @@ function dn(e, n, t) {
1541
1565
  return {
1542
1566
  type: a,
1543
1567
  ...i ? { title: i } : {},
1544
- items: rn(o.items, `${r}.items`, t),
1568
+ items: dn(o.items, `${r}.items`, t),
1545
1569
  ...c ? { evidenceIds: c } : {}
1546
1570
  };
1547
1571
  }
@@ -1609,12 +1633,12 @@ function dn(e, n, t) {
1609
1633
  f.contentTitle,
1610
1634
  t
1611
1635
  ), c = Array.isArray(o.tiles) ? o.tiles : [];
1612
- Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length > C.maxKpiTiles && d(
1636
+ Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length > x.maxKpiTiles && d(
1613
1637
  t,
1614
1638
  `${r}.tiles`,
1615
- `Must have ${C.maxKpiTiles} tiles or fewer.`
1639
+ `Must have ${x.maxKpiTiles} tiles or fewer.`
1616
1640
  );
1617
- const l = c.slice(0, C.maxKpiTiles).map((s, u) => {
1641
+ const l = c.slice(0, x.maxKpiTiles).map((s, u) => {
1618
1642
  const h = `${r}.tiles.${u}`, g = v(s, h, t);
1619
1643
  p(
1620
1644
  g,
@@ -1640,7 +1664,7 @@ function dn(e, n, t) {
1640
1664
  `${h}.value`,
1641
1665
  "Expected a non-empty string, number, or structured numeric value."
1642
1666
  );
1643
- const x = g.previousValue === void 0 || g.previousValue === null ? g.previousValue : O(
1667
+ const C = g.previousValue === void 0 || g.previousValue === null ? g.previousValue : O(
1644
1668
  g.previousValue,
1645
1669
  `${h}.previousValue`,
1646
1670
  t
@@ -1670,7 +1694,7 @@ function dn(e, n, t) {
1670
1694
  t
1671
1695
  ),
1672
1696
  value: E,
1673
- ...x !== void 0 ? { previousValue: x } : {},
1697
+ ...C !== void 0 ? { previousValue: C } : {},
1674
1698
  ..._ !== void 0 ? { delta: _ } : {},
1675
1699
  ...M !== void 0 ? { percentChange: M } : {},
1676
1700
  ...$ ? { unit: $ } : {},
@@ -1718,7 +1742,7 @@ function dn(e, n, t) {
1718
1742
  ["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
1719
1743
  t
1720
1744
  );
1721
- const i = cn(o.columns, `${r}.columns`, t), c = I(
1745
+ const i = fn(o.columns, `${r}.columns`, t), c = I(
1722
1746
  o.title,
1723
1747
  `${r}.title`,
1724
1748
  f.contentTitle,
@@ -1733,7 +1757,7 @@ function dn(e, n, t) {
1733
1757
  `${r}.caption`,
1734
1758
  f.contentItem,
1735
1759
  t
1736
- ), s = Qt(
1760
+ ), s = on(
1737
1761
  o.totalRows,
1738
1762
  `${r}.totalRows`,
1739
1763
  t
@@ -1743,7 +1767,7 @@ function dn(e, n, t) {
1743
1767
  ...l ? { id: l } : {},
1744
1768
  ...c ? { title: c } : {},
1745
1769
  columns: i,
1746
- rows: ln(o.rows, `${r}.rows`, i, t),
1770
+ rows: un(o.rows, `${r}.rows`, i, t),
1747
1771
  ...m ? { caption: m } : {},
1748
1772
  ...s !== void 0 ? { totalRows: s } : {},
1749
1773
  ...u ? { evidenceIds: u } : {}
@@ -1794,7 +1818,7 @@ function dn(e, n, t) {
1794
1818
  text: ""
1795
1819
  };
1796
1820
  }
1797
- function sn(e) {
1821
+ function hn(e) {
1798
1822
  const n = [], t = v(e, "content", n);
1799
1823
  p(t, "content", ["version", "title", "summary", "blocks"], n), t.version !== 1 && d(n, "content.version", "Expected version 1.");
1800
1824
  const r = I(
@@ -1810,12 +1834,12 @@ function sn(e) {
1810
1834
  );
1811
1835
  Array.isArray(t.blocks) || d(n, "content.blocks", "Expected an array.");
1812
1836
  const a = Array.isArray(t.blocks) ? t.blocks : [];
1813
- a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length > C.maxBlocks && d(
1837
+ a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length > x.maxBlocks && d(
1814
1838
  n,
1815
1839
  "content.blocks",
1816
- `Must have ${C.maxBlocks} blocks or fewer.`
1840
+ `Must have ${x.maxBlocks} blocks or fewer.`
1817
1841
  );
1818
- const i = a.slice(0, C.maxBlocks).map((c, l) => dn(c, l, n));
1842
+ const i = a.slice(0, x.maxBlocks).map((c, l) => pn(c, l, n));
1819
1843
  return te(n), {
1820
1844
  version: 1,
1821
1845
  ...r ? { title: r } : {},
@@ -1823,11 +1847,11 @@ function sn(e) {
1823
1847
  blocks: i
1824
1848
  };
1825
1849
  }
1826
- function ir(e) {
1850
+ function hr(e) {
1827
1851
  try {
1828
1852
  return {
1829
1853
  valid: !0,
1830
- value: sn(e),
1854
+ value: hn(e),
1831
1855
  issues: []
1832
1856
  };
1833
1857
  } catch (n) {
@@ -1836,7 +1860,7 @@ function ir(e) {
1836
1860
  throw n;
1837
1861
  }
1838
1862
  }
1839
- function V(e, n, t, r) {
1863
+ function z(e, n, t, r) {
1840
1864
  return typeof e == "string" && t.includes(e) ? e : (d(r, n, `Expected ${t.join(" or ")}.`), t[0]);
1841
1865
  }
1842
1866
  function D(e, n, t, r, o) {
@@ -1846,7 +1870,7 @@ function D(e, n, t, r, o) {
1846
1870
  d(o, n, `Expected ${r}.`);
1847
1871
  }
1848
1872
  }
1849
- function mn(e, n, t) {
1873
+ function yn(e, n, t) {
1850
1874
  if (e != null) {
1851
1875
  if (!Array.isArray(e)) {
1852
1876
  d(t, n, "Expected an array.");
@@ -1855,25 +1879,25 @@ function mn(e, n, t) {
1855
1879
  return e;
1856
1880
  }
1857
1881
  }
1858
- function fn(e, n, t) {
1882
+ function gn(e, n, t) {
1859
1883
  if (e != null) {
1860
- if (!ve(e)) {
1884
+ if (!$e(e)) {
1861
1885
  d(t, n, "Expected an object.");
1862
1886
  return;
1863
1887
  }
1864
1888
  return e;
1865
1889
  }
1866
1890
  }
1867
- function un(e, n, t) {
1891
+ function bn(e, n, t) {
1868
1892
  if (e == null)
1869
1893
  return;
1870
1894
  const r = v(e, n, t);
1871
- p(r, n, Yt, t);
1895
+ p(r, n, nn, t);
1872
1896
  const o = {};
1873
1897
  if (r.matrix !== void 0) {
1874
1898
  const s = v(r.matrix, `${n}.matrix`, t);
1875
1899
  p(s, `${n}.matrix`, ["config", "content"], t);
1876
- const u = Re.safeParse(s.config);
1900
+ const u = Me.safeParse(s.config);
1877
1901
  u.success || d(t, `${n}.matrix.config`, "Expected a valid Matrix definition.");
1878
1902
  const h = D(
1879
1903
  s.content,
@@ -1887,31 +1911,31 @@ function un(e, n, t) {
1887
1911
  const a = D(
1888
1912
  r.pageSize,
1889
1913
  `${n}.pageSize`,
1890
- zt,
1914
+ Gt,
1891
1915
  "letter, legal, a4, a3, or tabloid",
1892
1916
  t
1893
1917
  ), i = D(
1894
1918
  r.orientation,
1895
1919
  `${n}.orientation`,
1896
- jt,
1920
+ Wt,
1897
1921
  "portrait or landscape",
1898
1922
  t
1899
1923
  ), c = D(
1900
1924
  r.delimiter,
1901
1925
  `${n}.delimiter`,
1902
- qt,
1926
+ Xt,
1903
1927
  "comma, semicolon, or tab",
1904
1928
  t
1905
1929
  ), l = D(
1906
1930
  r.csvEncoding,
1907
1931
  `${n}.csvEncoding`,
1908
- Kt,
1932
+ Zt,
1909
1933
  "utf-8-bom or utf-8",
1910
1934
  t
1911
1935
  ), m = D(
1912
1936
  r.sheetSelection,
1913
1937
  `${n}.sheetSelection`,
1914
- Ht,
1938
+ Yt,
1915
1939
  "current or all",
1916
1940
  t
1917
1941
  );
@@ -1953,7 +1977,7 @@ function un(e, n, t) {
1953
1977
  "cardControlDefinitions",
1954
1978
  "controlBindings"
1955
1979
  ]) {
1956
- const u = mn(r[s], `${n}.${s}`, t);
1980
+ const u = yn(r[s], `${n}.${s}`, t);
1957
1981
  u && (o[s] = u);
1958
1982
  }
1959
1983
  for (const s of [
@@ -1962,7 +1986,7 @@ function un(e, n, t) {
1962
1986
  "dashboardInputExecutionSnapshot",
1963
1987
  "printInputCapture"
1964
1988
  ]) {
1965
- const u = fn(r[s], `${n}.${s}`, t);
1989
+ const u = gn(r[s], `${n}.${s}`, t);
1966
1990
  u && (o[s] = u);
1967
1991
  }
1968
1992
  return Object.keys(o).length > 0 ? o : void 0;
@@ -1977,14 +2001,14 @@ function W(e, n, t, r) {
1977
2001
  return o && (e.title = o), e;
1978
2002
  }
1979
2003
  function X(e, n, t, r) {
1980
- const o = un(n, t, r);
2004
+ const o = bn(n, t, r);
1981
2005
  return o != null && o.printInputCapture && e.type !== "dashboard" && d(
1982
2006
  r,
1983
2007
  `${t}.printInputCapture`,
1984
2008
  "Only a full dashboard attachment can carry printInputCapture."
1985
2009
  ), o && (e.settings = o), e;
1986
2010
  }
1987
- function pn(e, n, t) {
2011
+ function In(e, n, t) {
1988
2012
  const r = `attachments.${n}`, o = v(e, r, t), a = o.type;
1989
2013
  if (a === "dashboard") {
1990
2014
  p(
@@ -2002,7 +2026,7 @@ function pn(e, n, t) {
2002
2026
  f.id,
2003
2027
  t
2004
2028
  ),
2005
- format: V(o.format, `${r}.format`, ["pdf"], t)
2029
+ format: z(o.format, `${r}.format`, ["pdf"], t)
2006
2030
  },
2007
2031
  o.title,
2008
2032
  `${r}.title`,
@@ -2032,13 +2056,20 @@ function pn(e, n, t) {
2032
2056
  f.id,
2033
2057
  t
2034
2058
  ),
2035
- format: V(o.format, `${r}.format`, ["pdf"], t)
2059
+ format: z(
2060
+ o.format,
2061
+ `${r}.format`,
2062
+ a === "dashboard_sheet" ? ["pdf", "png"] : ["pdf"],
2063
+ t
2064
+ )
2036
2065
  },
2037
2066
  o.title,
2038
2067
  `${r}.title`,
2039
2068
  t
2040
2069
  );
2041
- return X(i, o.settings, `${r}.settings`, t);
2070
+ return de(
2071
+ X(i, o.settings, `${r}.settings`, t)
2072
+ );
2042
2073
  }
2043
2074
  if (a === "card") {
2044
2075
  p(
@@ -2062,10 +2093,10 @@ function pn(e, n, t) {
2062
2093
  f.id,
2063
2094
  t
2064
2095
  ),
2065
- format: V(
2096
+ format: z(
2066
2097
  o.format,
2067
2098
  `${r}.format`,
2068
- ["csv", "pdf", "xlsx"],
2099
+ ve,
2069
2100
  t
2070
2101
  )
2071
2102
  },
@@ -2073,7 +2104,9 @@ function pn(e, n, t) {
2073
2104
  `${r}.title`,
2074
2105
  t
2075
2106
  );
2076
- return X(i, o.settings, `${r}.settings`, t);
2107
+ return de(
2108
+ X(i, o.settings, `${r}.settings`, t)
2109
+ );
2077
2110
  }
2078
2111
  return d(
2079
2112
  t,
@@ -2081,7 +2114,17 @@ function pn(e, n, t) {
2081
2114
  "Expected dashboard, dashboard_sheet, document_sheet, or card."
2082
2115
  ), { type: "dashboard", dashboardId: "", format: "pdf" };
2083
2116
  }
2084
- function hn(e) {
2117
+ function de(e) {
2118
+ if (e.format !== "png" || !e.settings) return e;
2119
+ const {
2120
+ pageSize: n,
2121
+ orientation: t,
2122
+ includeFilters: r,
2123
+ ...o
2124
+ } = e.settings, { settings: a, ...i } = e;
2125
+ return Object.keys(o).length > 0 ? { ...i, settings: o } : i;
2126
+ }
2127
+ function vn(e) {
2085
2128
  switch (e.type) {
2086
2129
  case "dashboard":
2087
2130
  return `${e.type}:${e.dashboardId}:${e.format}`;
@@ -2092,7 +2135,7 @@ function hn(e) {
2092
2135
  return `${e.type}:${e.dashboardId}:${e.cardId}:${e.format}`;
2093
2136
  }
2094
2137
  }
2095
- function Te(e, n) {
2138
+ function ke(e, n) {
2096
2139
  if (e == null)
2097
2140
  return [];
2098
2141
  if (!Array.isArray(e))
@@ -2102,15 +2145,15 @@ function Te(e, n) {
2102
2145
  "attachments",
2103
2146
  `Choose ${H} attachments or fewer.`
2104
2147
  );
2105
- const t = e.slice(0, H).map((o, a) => pn(o, a, n)), r = /* @__PURE__ */ new Set();
2148
+ const t = e.slice(0, H).map((o, a) => In(o, a, n)), r = /* @__PURE__ */ new Set();
2106
2149
  return t.forEach((o, a) => {
2107
- var c, l, m;
2108
- (c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format === "pdf") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV or Excel."), o.format === "xlsx" && !((l = o.settings) != null && l.matrix) && !Q((m = o.settings) == null ? void 0 : m.cardType) && d(n, `attachments.${a}.format`, "Excel attachments require a Table, Detail Table or Matrix card.");
2109
- const i = hn(o);
2150
+ var c, l, m, s;
2151
+ (c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format === "pdf") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV or Excel."), o.format === "png" && ((l = o.settings) != null && l.matrix) && o.settings.matrix.content !== "current" && d(n, `attachments.${a}.settings.matrix.content`, "A Matrix PNG image shows the current layout."), o.format === "xlsx" && !((m = o.settings) != null && m.matrix) && !Q((s = o.settings) == null ? void 0 : s.cardType) && d(n, `attachments.${a}.format`, "Excel attachments require a Table, Detail Table or Matrix card.");
2152
+ const i = vn(o);
2110
2153
  r.has(i) && d(n, `attachments.${a}`, "Duplicate attachment."), r.add(i);
2111
2154
  }), t;
2112
2155
  }
2113
- function Se(e, n) {
2156
+ function Ae(e, n) {
2114
2157
  if (e == null)
2115
2158
  return;
2116
2159
  const t = v(e, "limits", n);
@@ -2136,14 +2179,14 @@ function te(e) {
2136
2179
  if (e.length > 0)
2137
2180
  throw new j(e);
2138
2181
  }
2139
- function ke(e, n, t) {
2182
+ function we(e, n, t) {
2140
2183
  !(e.type === "generated_analysis" || e.type === "custom_message" && !!e.message.trim()) && n.length === 0 && d(
2141
2184
  t,
2142
2185
  "body",
2143
2186
  "Add briefing instructions, a custom message, or at least one attachment."
2144
2187
  );
2145
2188
  }
2146
- function yn(e, n, t) {
2189
+ function En(e, n, t) {
2147
2190
  e == null || e.forEach((r, o) => {
2148
2191
  const a = `${t}.${o}.scope`, i = r.scope.attachmentIndex;
2149
2192
  if (i === void 0)
@@ -2165,7 +2208,7 @@ function yn(e, n, t) {
2165
2208
  );
2166
2209
  });
2167
2210
  }
2168
- function Ae(e) {
2211
+ function De(e) {
2169
2212
  const n = [], t = v(e, "jobConfig", n);
2170
2213
  p(
2171
2214
  t,
@@ -2183,7 +2226,7 @@ function Ae(e) {
2183
2226
  ), t.kind !== Z && d(n, "kind", "Expected BRIEFING.");
2184
2227
  let r;
2185
2228
  try {
2186
- r = Pe(
2229
+ r = Ve(
2187
2230
  t.presentationExecutionSnapshot
2188
2231
  );
2189
2232
  } catch (m) {
@@ -2195,8 +2238,8 @@ function Ae(e) {
2195
2238
  m instanceof Error ? m.message : "Invalid presentation snapshot."
2196
2239
  );
2197
2240
  }
2198
- const o = Ee(t.source, n), a = $e(t.body, n), i = Te(t.attachments, n), c = Ce(t.presentation, n), l = Se(t.limits, n);
2199
- return ke(a, i, n), yn(
2241
+ const o = xe(t.source, n), a = Ce(t.body, n), i = ke(t.attachments, n), c = Te(t.presentation, n), l = Ae(t.limits, n);
2242
+ return we(a, i, n), En(
2200
2243
  r == null ? void 0 : r.resolvedFormats,
2201
2244
  i,
2202
2245
  "jobConfig.presentationExecutionSnapshot.resolvedFormats"
@@ -2210,8 +2253,8 @@ function Ae(e) {
2210
2253
  ...l ? { limits: l } : {}
2211
2254
  };
2212
2255
  }
2213
- function cr(e) {
2214
- return Ae({
2256
+ function yr(e) {
2257
+ return De({
2215
2258
  ...e,
2216
2259
  kind: Z
2217
2260
  });
@@ -2231,7 +2274,7 @@ function ne(e, n, t, r = "deliveryConfig.recipients") {
2231
2274
  f.attachmentTitle,
2232
2275
  t
2233
2276
  );
2234
- return c && !tn(c) && d(t, `${o}.address`, "Email address is invalid."), {
2277
+ return c && !cn(c) && d(t, `${o}.address`, "Email address is invalid."), {
2235
2278
  type: "email",
2236
2279
  address: c,
2237
2280
  ...l ? { name: l } : {}
@@ -2267,17 +2310,17 @@ function ne(e, n, t, r = "deliveryConfig.recipients") {
2267
2310
  "Expected email, user, tenant_user, or group."
2268
2311
  ), { type: "email", address: "" });
2269
2312
  }
2270
- function gn(e, n) {
2313
+ function $n(e, n) {
2271
2314
  return e == null ? [] : Array.isArray(e) ? e.map(
2272
2315
  (t, r) => ne(t, r, n)
2273
2316
  ) : (d(n, "deliveryConfig.recipients", "Expected an array."), []);
2274
2317
  }
2275
- function bn(e, n) {
2318
+ function xn(e, n) {
2276
2319
  if (!Array.isArray(e))
2277
2320
  return d(n, "deliveryConfig.channels", "Expected an array."), [];
2278
2321
  const t = [];
2279
2322
  return e.forEach((r, o) => {
2280
- if (!we(r)) {
2323
+ if (!_e(r)) {
2281
2324
  d(
2282
2325
  n,
2283
2326
  `deliveryConfig.channels.${o}`,
@@ -2288,7 +2331,7 @@ function bn(e, n) {
2288
2331
  t.includes(r) || t.push(r);
2289
2332
  }), t;
2290
2333
  }
2291
- function In(e, n, t) {
2334
+ function Cn(e, n, t) {
2292
2335
  if (e == null)
2293
2336
  return;
2294
2337
  const r = v(e, n, t), o = {};
@@ -2300,7 +2343,7 @@ function In(e, n, t) {
2300
2343
  o[a] = i.trim();
2301
2344
  }), Object.keys(o).length > 0 ? o : void 0;
2302
2345
  }
2303
- function vn(e, n, t) {
2346
+ function Tn(e, n, t) {
2304
2347
  if (e == null)
2305
2348
  return;
2306
2349
  const r = v(e, n, t);
@@ -2310,7 +2353,7 @@ function vn(e, n, t) {
2310
2353
  ["url", "method", "headers", "secretEncrypted"],
2311
2354
  t
2312
2355
  );
2313
- const o = r.method === void 0 || r.method === null ? void 0 : V(r.method, `${n}.method`, ["POST", "PUT"], t), a = In(r.headers, `${n}.headers`, t), i = I(
2356
+ const o = r.method === void 0 || r.method === null ? void 0 : z(r.method, `${n}.method`, ["POST", "PUT"], t), a = Cn(r.headers, `${n}.headers`, t), i = I(
2314
2357
  r.secretEncrypted,
2315
2358
  `${n}.secretEncrypted`,
2316
2359
  2e3,
@@ -2323,7 +2366,7 @@ function vn(e, n, t) {
2323
2366
  ...i ? { secretEncrypted: i } : {}
2324
2367
  };
2325
2368
  }
2326
- function En(e, n, t) {
2369
+ function Sn(e, n, t) {
2327
2370
  const r = v(e, n, t), o = r.type;
2328
2371
  if (o === "channel") {
2329
2372
  p(
@@ -2364,7 +2407,7 @@ function En(e, n, t) {
2364
2407
  recipient: ne(r.recipient, 0, t, `${n}.recipient`)
2365
2408
  }) : (d(t, `${n}.type`, "Expected channel."), { type: "channel", channelId: "" });
2366
2409
  }
2367
- function $n(e, n, t) {
2410
+ function kn(e, n, t) {
2368
2411
  if (e == null)
2369
2412
  return;
2370
2413
  if (!Array.isArray(e)) {
@@ -2376,7 +2419,7 @@ function $n(e, n, t) {
2376
2419
  );
2377
2420
  return r.length > 0 ? r : void 0;
2378
2421
  }
2379
- function Cn(e, n, t) {
2422
+ function An(e, n, t) {
2380
2423
  if (e == null)
2381
2424
  return;
2382
2425
  const r = v(e, n, t);
@@ -2392,7 +2435,7 @@ function Cn(e, n, t) {
2392
2435
  ],
2393
2436
  t
2394
2437
  );
2395
- const o = $n(
2438
+ const o = kn(
2396
2439
  r.threadMentions,
2397
2440
  `${n}.threadMentions`,
2398
2441
  t
@@ -2413,7 +2456,7 @@ function Cn(e, n, t) {
2413
2456
  t
2414
2457
  );
2415
2458
  return {
2416
- destination: En(
2459
+ destination: Sn(
2417
2460
  r.destination,
2418
2461
  `${n}.destination`,
2419
2462
  t
@@ -2424,7 +2467,7 @@ function Cn(e, n, t) {
2424
2467
  ...r.includeBriefingLink !== void 0 ? { includeBriefingLink: c } : {}
2425
2468
  };
2426
2469
  }
2427
- function xn(e, n, t) {
2470
+ function wn(e, n, t) {
2428
2471
  const r = v(e, n, t);
2429
2472
  p(
2430
2473
  r,
@@ -2443,7 +2486,7 @@ function xn(e, n, t) {
2443
2486
  const o = D(
2444
2487
  r.formatProfile,
2445
2488
  `${n}.formatProfile`,
2446
- Gt,
2489
+ Jt,
2447
2490
  "concise, balanced, or detailed",
2448
2491
  t
2449
2492
  ), a = I(
@@ -2466,11 +2509,11 @@ function xn(e, n, t) {
2466
2509
  !0,
2467
2510
  `${n}.actionBlockVisible`,
2468
2511
  t
2469
- ), m = vn(
2512
+ ), m = Tn(
2470
2513
  r.webhookConfig,
2471
2514
  `${n}.webhookConfig`,
2472
2515
  t
2473
- ), s = Cn(
2516
+ ), s = An(
2474
2517
  r.slackConfig,
2475
2518
  `${n}.slackConfig`,
2476
2519
  t
@@ -2485,12 +2528,12 @@ function xn(e, n, t) {
2485
2528
  ...m ? { webhookConfig: m } : {}
2486
2529
  };
2487
2530
  }
2488
- function Tn(e, n) {
2531
+ function Dn(e, n) {
2489
2532
  if (e == null)
2490
2533
  return;
2491
2534
  const t = v(e, "deliveryConfig.channelConfigs", n), r = {};
2492
2535
  return Object.entries(t).forEach(([o, a]) => {
2493
- if (!we(o)) {
2536
+ if (!_e(o)) {
2494
2537
  d(
2495
2538
  n,
2496
2539
  `deliveryConfig.channelConfigs.${o}`,
@@ -2498,14 +2541,14 @@ function Tn(e, n) {
2498
2541
  );
2499
2542
  return;
2500
2543
  }
2501
- r[o] = xn(
2544
+ r[o] = wn(
2502
2545
  a,
2503
2546
  `deliveryConfig.channelConfigs.${o}`,
2504
2547
  n
2505
2548
  );
2506
2549
  }), Object.keys(r).length > 0 ? r : void 0;
2507
2550
  }
2508
- function Sn(e, n) {
2551
+ function _n(e, n) {
2509
2552
  var l, m, s;
2510
2553
  if (e == null)
2511
2554
  return null;
@@ -2516,7 +2559,7 @@ function Sn(e, n) {
2516
2559
  ["recipients", "channels", "channelConfigs"],
2517
2560
  n
2518
2561
  );
2519
- const r = Tn(t.channelConfigs, n), o = gn(t.recipients, n), a = bn(t.channels, n), i = ((m = (l = r == null ? void 0 : r.SLACK) == null ? void 0 : l.slackConfig) == null ? void 0 : m.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
2562
+ const r = Dn(t.channelConfigs, n), o = $n(t.recipients, n), a = xn(t.channels, n), i = ((m = (l = r == null ? void 0 : r.SLACK) == null ? void 0 : l.slackConfig) == null ? void 0 : m.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
2520
2563
  return a.some(
2521
2564
  (u) => u !== "SLACK"
2522
2565
  ) && o.length === 0 && d(
@@ -2571,8 +2614,8 @@ function re(e) {
2571
2614
  "description",
2572
2615
  f.description,
2573
2616
  n
2574
- ) ?? null, a = I(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = I(t.timezone, "timezone", 200, n) ?? "UTC", c = en(t.status, n), l = Ee(t.source, n), m = $e(t.body, n), s = Te(t.attachments, n), u = Ce(t.presentation, n), h = Se(t.limits, n), g = Sn(t.deliveryConfig, n);
2575
- return ke(m, s, n), te(n), {
2617
+ ) ?? null, a = I(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = I(t.timezone, "timezone", 200, n) ?? "UTC", c = an(t.status, n), l = xe(t.source, n), m = Ce(t.body, n), s = ke(t.attachments, n), u = Te(t.presentation, n), h = Ae(t.limits, n), g = _n(t.deliveryConfig, n);
2618
+ return we(m, s, n), te(n), {
2576
2619
  name: r,
2577
2620
  description: o,
2578
2621
  status: c,
@@ -2586,13 +2629,13 @@ function re(e) {
2586
2629
  deliveryConfig: g
2587
2630
  };
2588
2631
  }
2589
- function lr(e) {
2632
+ function gr(e) {
2590
2633
  return re(e);
2591
2634
  }
2592
- function dr(e) {
2635
+ function br(e) {
2593
2636
  return re(e);
2594
2637
  }
2595
- function sr(e) {
2638
+ function Ir(e) {
2596
2639
  try {
2597
2640
  return { valid: !0, value: re(e), issues: [] };
2598
2641
  } catch (n) {
@@ -2601,74 +2644,77 @@ function sr(e) {
2601
2644
  throw n;
2602
2645
  }
2603
2646
  }
2604
- function mr(e) {
2647
+ function vr(e) {
2605
2648
  try {
2606
- return { valid: !0, value: Ae(e), issues: [] };
2649
+ return { valid: !0, value: De(e), issues: [] };
2607
2650
  } catch (n) {
2608
2651
  if (n instanceof j)
2609
2652
  return { valid: !1, issues: n.issues };
2610
2653
  throw n;
2611
2654
  }
2612
2655
  }
2613
- function fr(e) {
2614
- return typeof e == "string" && Ie.has(e);
2656
+ function Er(e) {
2657
+ return typeof e == "string" && Ee.has(e);
2615
2658
  }
2616
- function we(e) {
2617
- return typeof e == "string" && Vt.has(e);
2659
+ function _e(e) {
2660
+ return typeof e == "string" && Ht.has(e);
2618
2661
  }
2619
2662
  export {
2620
- Mt as $,
2663
+ Q as $,
2621
2664
  f as A,
2622
2665
  Z as B,
2623
- C,
2624
- Zn as D,
2625
- Ut as E,
2626
- Pt as F,
2627
- ar as G,
2628
- j as H,
2629
- sn as I,
2630
- ir as J,
2631
- Ae as K,
2632
- cr as L,
2666
+ x as C,
2667
+ ar as D,
2668
+ qt as E,
2669
+ Kt as F,
2670
+ pr as G,
2671
+ ve as H,
2672
+ j as I,
2673
+ hn as J,
2674
+ hr as K,
2675
+ De as L,
2633
2676
  H as M,
2634
- re as N,
2635
- lr as O,
2636
- dr as P,
2637
- sr as Q,
2638
- mr as R,
2639
- fr as S,
2640
- we as T,
2641
- Kn as U,
2642
- st as V,
2643
- zn as W,
2644
- dt as X,
2645
- Q as Y,
2646
- Ot as Z,
2647
- Nt as _,
2648
- rr as a,
2649
- lt as b,
2650
- qn as c,
2651
- Jn as d,
2652
- Hn as e,
2653
- Xn as f,
2654
- or as g,
2655
- Vn as h,
2656
- jn as i,
2657
- It as j,
2658
- Yn as k,
2677
+ yr as N,
2678
+ re as O,
2679
+ gr as P,
2680
+ br as Q,
2681
+ Ir as R,
2682
+ vr as S,
2683
+ Er as T,
2684
+ _e as U,
2685
+ er as V,
2686
+ ht as W,
2687
+ ft as X,
2688
+ Yn as Y,
2689
+ mt as Z,
2690
+ pt as _,
2691
+ fr as a,
2692
+ Mt as a0,
2693
+ Ut as a1,
2694
+ Vt as a2,
2695
+ ut as b,
2696
+ Qn as c,
2697
+ cr as d,
2698
+ tr as e,
2699
+ or as f,
2700
+ ur as g,
2701
+ Zn as h,
2702
+ Jn as i,
2703
+ Ct as j,
2704
+ ir as k,
2659
2705
  R as l,
2660
- Qn as m,
2661
- wt as n,
2662
- er as o,
2663
- ge as p,
2664
- he as q,
2665
- Bt as r,
2666
- tr as s,
2667
- nr as t,
2668
- mt as u,
2669
- se as v,
2670
- Wn as w,
2671
- Gn as x,
2672
- Lt as y,
2706
+ lr as m,
2707
+ Nt as n,
2708
+ dr as o,
2709
+ be as p,
2710
+ ye as q,
2711
+ zt as r,
2712
+ sr as s,
2713
+ mr as t,
2714
+ yt as u,
2715
+ me as v,
2716
+ rr as w,
2717
+ nr as x,
2718
+ jt as y,
2673
2719
  Y as z
2674
2720
  };