react-semaphor 0.1.602 → 0.1.604

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 (211) hide show
  1. package/dist/activity/index.js +1 -73
  2. package/dist/analytics-protocol/index.js +1 -1451
  3. package/dist/appearance/index.js +1 -12
  4. package/dist/appearance-runtime/index.js +1 -5
  5. package/dist/assistant-context/index.js +1 -11
  6. package/dist/assistant-protocol/index.js +1 -152
  7. package/dist/brand-studio/index.js +4 -1594
  8. package/dist/briefings/index.js +1 -70
  9. package/dist/chunks/add-to-dashboard-DeHEBEqG.js +12 -0
  10. package/dist/chunks/analytics-base-schemas-BREc5WGv.js +1 -0
  11. package/dist/chunks/appearance-context-BqBZrijL.js +1 -0
  12. package/dist/chunks/appearance-runtime-provider-DmbCrOOG.js +1 -0
  13. package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
  14. package/dist/chunks/assistant-chat-CjYrwVDa.js +56 -0
  15. package/dist/chunks/attribution-BEFSsbNn.js +1 -0
  16. package/dist/chunks/availability-3AIOf6Z-.js +1 -0
  17. package/dist/chunks/bookmark-impact-C89zBLq3.js +1 -0
  18. package/dist/chunks/bookmark-state-69YYnRql.js +1 -0
  19. package/dist/chunks/brand-DCaZyRt6.js +1 -0
  20. package/dist/chunks/card-filter-builder-CTp6RAz1.js +17 -0
  21. package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
  22. package/dist/chunks/comparison-window-caption-C312mn3s.js +1 -0
  23. package/dist/chunks/context-ALdccLHw.js +2 -0
  24. package/dist/chunks/conversation-JMK2kyTK.js +1 -0
  25. package/dist/chunks/dashboard-BX28ld6s.js +1 -0
  26. package/dist/chunks/dashboard-briefing-launcher-qo7GH4EO.js +37 -0
  27. package/dist/chunks/dashboard-controls-DhRjB7MA.js +42 -0
  28. package/dist/chunks/dashboard-json-9cHzhSjC.js +1 -0
  29. package/dist/chunks/dates-D-KP8G-z.js +1 -0
  30. package/dist/chunks/edit-DEAK0UZo.js +1 -0
  31. package/dist/chunks/edit-dashboard-visual-Duq_QkB_.js +93 -0
  32. package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
  33. package/dist/chunks/filter-line-CwQrqORc.js +1 -0
  34. package/dist/chunks/filter-reach-preview-gixPFlZj.js +1 -0
  35. package/dist/chunks/filter-value-text-B3tXakhd.js +1 -0
  36. package/dist/chunks/index-B-VF1ogs.js +1 -0
  37. package/dist/chunks/index-BE1DfxNs.js +1 -0
  38. package/dist/chunks/index-DViPGDFj.js +1 -0
  39. package/dist/chunks/layout-grid-BWtlgw0T.js +6 -0
  40. package/dist/chunks/matrix-analytical-definition-CtFqWyCK.js +1 -0
  41. package/dist/chunks/matrix-member-presentation-Q0MCJ-YK.js +1 -0
  42. package/dist/chunks/matrix-operation-contract-D1RC1bfi.js +1 -0
  43. package/dist/chunks/metric-comparison-DEZYXROZ.js +1 -0
  44. package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
  45. package/dist/chunks/paintbrush-BjS3SbrH.js +6 -0
  46. package/dist/chunks/palette-BzC-CGOc.js +6 -0
  47. package/dist/chunks/pickers-DuBrUht0.js +1 -0
  48. package/dist/chunks/pivot-result-contract-expectations-DTQAgr4n.js +1 -0
  49. package/dist/chunks/pivot-result-identity-DTNCB--h.js +1 -0
  50. package/dist/chunks/raw-temporal-value-DeyEhL0S.js +1 -0
  51. package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
  52. package/dist/chunks/report-preferences-dialog-B_gUmCzG.js +1 -0
  53. package/dist/chunks/report-runtime-context-BWzIHCKK.js +1 -0
  54. package/dist/chunks/resolve-dashboard-input-context-B-TtRqxu.js +8 -0
  55. package/dist/chunks/resolver-AN9ChBfZ.js +1 -0
  56. package/dist/chunks/save-DdFUZcbi.js +6 -0
  57. package/dist/chunks/saved-dashboard-context-BAJ5tWiq.js +1 -0
  58. package/dist/chunks/schema-MC0cQSAb.js +4 -0
  59. package/dist/chunks/selection-filter-compiler-CCoCD25M.js +1 -0
  60. package/dist/chunks/semaphor-ready-indicator-DzjorP3t.js +999 -0
  61. package/dist/chunks/set-DuJfGkbY.js +1 -0
  62. package/dist/chunks/shelf-drop-preview-context-BlLJ5RsT.js +6 -0
  63. package/dist/chunks/stored-dashboard-Ctcpkllg.js +1 -0
  64. package/dist/chunks/style-sheet-parts-BRGt9O05.js +178 -0
  65. package/dist/chunks/table-export-sheet-rC5pKmXg.js +2 -0
  66. package/dist/chunks/token-types-Bj9iMy0w.js +1 -0
  67. package/dist/chunks/validators-CqV3Yka1.js +1 -0
  68. package/dist/chunks/variable-draft-DJrfUyhv.js +1 -0
  69. package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
  70. package/dist/dashboard/index.js +1 -7
  71. package/dist/dashboard-authoring/index.js +1 -4491
  72. package/dist/format-utils/index.js +1 -424
  73. package/dist/index.js +1 -554
  74. package/dist/layouts/index.js +1 -7
  75. package/dist/live-channel/index.js +1 -124
  76. package/dist/pdf-export-policy/index.js +1 -92
  77. package/dist/pdf-table-layout/index.js +1 -993
  78. package/dist/report-runtime-context/index.js +1 -9
  79. package/dist/shared/index.js +1 -6
  80. package/dist/style.css +1 -1
  81. package/dist/surfboard/index.js +1 -9
  82. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  83. package/dist/types/index.js +1 -88
  84. package/dist/types/lib/document/document-edits.d.ts +0 -4
  85. package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
  86. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
  87. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  88. package/dist/types/lib/stores/explorer-actions.d.ts +7 -6
  89. package/dist/types/lib/types/common-types.d.ts +0 -2
  90. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  91. package/dist/types/lib/types/semantic-types.d.ts +6 -10
  92. package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
  93. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  94. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  95. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  96. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  97. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  98. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  99. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  100. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  101. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  102. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  103. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  104. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
  105. package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
  106. package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
  107. package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
  108. package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
  109. package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
  110. package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
  111. package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +132 -0
  112. package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
  113. package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
  114. package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
  115. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  116. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  117. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  118. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  119. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
  120. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  121. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  122. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  123. package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +115 -0
  124. package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
  125. package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
  126. package/dist/types/shared/dashboard-authoring/index.d.ts +6 -1
  127. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  128. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  129. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  130. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  131. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  132. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  133. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  134. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  135. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  136. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
  137. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
  138. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +5 -0
  139. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
  140. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  141. package/dist/types/shared/format-utils/index.d.ts +1 -0
  142. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  143. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  144. package/dist/types/shared/temporal/index.d.ts +2 -0
  145. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  146. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  147. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  148. package/dist/usage-events/index.js +1 -285
  149. package/dist/value-format-preferences/index.js +1 -635
  150. package/package.json +6 -2
  151. package/dist/chunks/add-to-dashboard-ClhEIFst.js +0 -291
  152. package/dist/chunks/analytics-base-schemas-DevrgqQb.js +0 -678
  153. package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
  154. package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
  155. package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
  156. package/dist/chunks/assistant-chat-BWF3GYip.js +0 -6115
  157. package/dist/chunks/attribution-BvoKvhcj.js +0 -32
  158. package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
  159. package/dist/chunks/bookmark-impact-BF3iRx5a.js +0 -76
  160. package/dist/chunks/bookmark-state-CBSTdW6q.js +0 -1666
  161. package/dist/chunks/brand-BoUV0iHF.js +0 -54
  162. package/dist/chunks/card-filter-builder-B8XHwMY6.js +0 -4069
  163. package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
  164. package/dist/chunks/comparison-window-caption-W83qB4V5.js +0 -741
  165. package/dist/chunks/context-BJoEFgNl.js +0 -369
  166. package/dist/chunks/conversation-sQiWYUOb.js +0 -16
  167. package/dist/chunks/dashboard-DG5EIYYB.js +0 -14
  168. package/dist/chunks/dashboard-briefing-launcher-CBSrhyWZ.js +0 -4875
  169. package/dist/chunks/dashboard-controls-D6ECO4N1.js +0 -2290
  170. package/dist/chunks/dashboard-json-DrJftBSL.js +0 -66
  171. package/dist/chunks/dates-Bz-qM5px.js +0 -164
  172. package/dist/chunks/edit-9df1zOWe.js +0 -226
  173. package/dist/chunks/edit-dashboard-visual-BDYAJIbb.js +0 -18605
  174. package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
  175. package/dist/chunks/filter-line-BXT6y303.js +0 -703
  176. package/dist/chunks/filter-reach-copy-BukhZmzm.js +0 -5250
  177. package/dist/chunks/filter-value-text-D3-bf3_b.js +0 -153
  178. package/dist/chunks/index-BVKzKl5d.js +0 -90
  179. package/dist/chunks/index-BW0yozjs.js +0 -2795
  180. package/dist/chunks/index-CV_Kzou0.js +0 -595
  181. package/dist/chunks/layout-grid-Ds0diMeY.js +0 -16
  182. package/dist/chunks/matrix-analytical-definition-CgQgVeeI.js +0 -1162
  183. package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
  184. package/dist/chunks/matrix-operation-contract--DkNCOzd.js +0 -1412
  185. package/dist/chunks/metric-comparison-zMylnIkc.js +0 -541
  186. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
  187. package/dist/chunks/paintbrush-CX8pao1j.js +0 -27
  188. package/dist/chunks/palette-CuA0HlzF.js +0 -23
  189. package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
  190. package/dist/chunks/pivot-result-contract-expectations-C8KL7hPx.js +0 -5046
  191. package/dist/chunks/pivot-result-identity-C1AOH1PS.js +0 -77
  192. package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
  193. package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
  194. package/dist/chunks/report-preferences-dialog-CbuVNDGi.js +0 -1637
  195. package/dist/chunks/report-runtime-context-E7USjN7E.js +0 -388
  196. package/dist/chunks/resolve-dashboard-input-context-CULCE_hM.js +0 -25172
  197. package/dist/chunks/resolver-DG_tfEpt.js +0 -156
  198. package/dist/chunks/save-BKHlDONy.js +0 -21
  199. package/dist/chunks/saved-dashboard-context-C1WlOx5z.js +0 -632
  200. package/dist/chunks/schema-C9NPiIru.js +0 -2568
  201. package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
  202. package/dist/chunks/semaphor-ready-indicator-CBIRcDWs.js +0 -145326
  203. package/dist/chunks/shelf-drop-preview-context-xR69SMA8.js +0 -2466
  204. package/dist/chunks/stored-dashboard-BuM8vnWf.js +0 -4070
  205. package/dist/chunks/style-sheet-parts-Bt9ZNre8.js +0 -8674
  206. package/dist/chunks/table-export-sheet-DVljtHkG.js +0 -949
  207. package/dist/chunks/token-types-D_xKgyVS.js +0 -8
  208. package/dist/chunks/upload-Dll_M7XQ.js +0 -15
  209. package/dist/chunks/validators-ClWHpYql.js +0 -3686
  210. package/dist/chunks/variable-draft-CDGGl53R.js +0 -242
  211. package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
@@ -1,703 +0,0 @@
1
- import { aX as H, aW as xt, j as Tt, k as G, aE as ft, r as Et } from "./validators-ClWHpYql.js";
2
- import { at as St, ay as $t, au as Ft, f as kt, a as K, a6 as J, am as It, a4 as Dt, an as Lt, ao as _t, o as Q, s as Nt, aF as At, Y as tt, _ as Mt, a0 as Kt, a7 as Ot } from "./pivot-result-contract-expectations-C8KL7hPx.js";
3
- import { c as Rt, b as et } from "./pivot-result-identity-C1AOH1PS.js";
4
- import { v as Vt, d as zt, c as Pt } from "./raw-temporal-value-E416F-0L.js";
5
- import { e as jt, p as Bt, k as Ut } from "./export-file-format-C-tJsxsf.js";
6
- import "./matrix-operation-contract--DkNCOzd.js";
7
- import "./analytics-base-schemas-DevrgqQb.js";
8
- import { a as U } from "./metric-comparison-zMylnIkc.js";
9
- import "../value-format-preferences/index.js";
10
- const Ht = /* @__PURE__ */ new Set(["second", "minute", "hour", "day", "month"]);
11
- function Gt(t) {
12
- const { presentation: e } = t;
13
- return t.formattedValues ? (e == null ? void 0 : e.kind) === "text" || (e == null ? void 0 : e.kind) === "measure" && e.format.type === "duration" ? "text" : (e == null ? void 0 : e.kind) === "temporal_bucket" ? Ht.has(e.grain) ? "date" : "text" : (e == null ? void 0 : e.kind) === "datetime" ? "date" : t.dataType === "number" ? "number" : t.dataType === "boolean" ? "boolean" : t.dataType === "unknown" ? "by_value" : "text" : "by_value";
14
- }
15
- function Wt(t) {
16
- const e = (i, d) => Number.isInteger(i) ? Math.min(20, Math.max(0, i)) : d, r = e(t.minimumFractionDigits, 0), o = Math.max(r, e(t.maximumFractionDigits, 2));
17
- return o === 0 ? "" : `.${"0".repeat(o)}`;
18
- }
19
- function j(t) {
20
- return `"${t.replace(/"/g, "")}"`;
21
- }
22
- function qt(t) {
23
- let e;
24
- try {
25
- e = new Intl.NumberFormat(t.locale ?? "en-US", {
26
- style: "currency",
27
- currency: t.currency || "USD"
28
- }).formatToParts(1);
29
- } catch {
30
- return;
31
- }
32
- const r = e.findIndex((d) => d.type === "currency"), o = e.findIndex((d) => d.type === "integer");
33
- if (r < 0 || o < 0) return;
34
- const i = (d, s) => e.slice(d, s).filter((c) => c.type === "literal").map((c) => c.value.replace(/\s/g, " ")).join("");
35
- return r < o ? { side: "before", text: e[r].value + i(r + 1, o) } : {
36
- side: "after",
37
- text: i(o + 1, r) + e[r].value
38
- };
39
- }
40
- function Yt(t) {
41
- const e = Wt(t);
42
- let r;
43
- if (t.type === "scientific")
44
- r = `0${e}E+00`;
45
- else {
46
- const o = `${t.useGrouping === !1 ? "0" : "#,##0"}${e}`;
47
- if (t.type === "currency") {
48
- const i = qt(t);
49
- r = i ? i.side === "before" ? `${j(i.text)}${o}` : `${o}${j(i.text)}` : o;
50
- } else t.type === "percent" ? r = t.percentValueMode === "whole" ? `${o}${j("%")}` : `${o}%` : r = o;
51
- }
52
- return t.negativeStyle === "parentheses" ? `${r};(${r})` : r;
53
- }
54
- function Xt(t, e) {
55
- if (!t.formattedValues) return;
56
- const { presentation: r } = t;
57
- if (e === "number" || e === "by_value")
58
- return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : Yt(r.format);
59
- if (e === "date") {
60
- if ((r == null ? void 0 : r.kind) === "temporal_bucket")
61
- return r.grain === "day" ? "yyyy-mm-dd" : r.grain === "month" ? "mmm yyyy" : "yyyy-mm-dd hh:mm";
62
- if ((r == null ? void 0 : r.kind) === "datetime")
63
- return r.dateOnly ? "yyyy-mm-dd" : "yyyy-mm-dd hh:mm:ss";
64
- }
65
- }
66
- function rt(t) {
67
- const e = Gt(t), r = Xt(t, e);
68
- return Object.freeze({
69
- key: t.key,
70
- label: t.label,
71
- cellType: e,
72
- ...r === void 0 ? {} : { numberFormat: r }
73
- });
74
- }
75
- const Zt = 15, Jt = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
76
- function pt(t) {
77
- return Jt.test(t) ? t : void 0;
78
- }
79
- function nt(t) {
80
- const r = t.replace(/^-/, "").replace(/[eE].*$/, "").replace(".", "").replace(/^0+/, "").replace(/0+$/, "");
81
- if (r.length > Zt) return !1;
82
- const o = Number(t);
83
- return Number.isFinite(o) && (o !== 0 || r.length === 0);
84
- }
85
- const Qt = Date.UTC(1900, 2, 1), te = Date.UTC(1e4, 0, 1), ee = Date.UTC(1899, 11, 30), re = 864e5;
86
- function ne(t) {
87
- const e = Date.UTC(
88
- t.year,
89
- t.month - 1,
90
- t.day,
91
- t.hour,
92
- t.minute,
93
- t.second
94
- );
95
- if (!(t.year < 1900 || !Number.isFinite(e)) && !(e < Qt || e >= te))
96
- return (e - ee) / re;
97
- }
98
- function ot(t, e, r) {
99
- if (typeof t == "number")
100
- return Number.isFinite(t) ? { kind: "number", text: e, value: t } : void 0;
101
- if (H(t))
102
- return nt(t.value) ? { kind: "number", text: e, value: t } : void 0;
103
- if (r && typeof t == "string") {
104
- const o = pt(t);
105
- return o !== void 0 && nt(o) ? { kind: "number", text: e, value: o } : void 0;
106
- }
107
- }
108
- function O(t) {
109
- const { value: e, text: r, column: o } = t;
110
- if (r === "") return { kind: "empty" };
111
- const i = { kind: "text", text: r };
112
- switch (o.cellType) {
113
- case "text":
114
- return i;
115
- case "date": {
116
- const d = t.wallClock ? ne(t.wallClock) : void 0;
117
- return d === void 0 ? i : { kind: "date", text: r, serial: d };
118
- }
119
- case "number":
120
- return ot(e, r, !0) ?? i;
121
- case "boolean":
122
- return typeof e == "boolean" ? { kind: "boolean", text: r, value: e } : i;
123
- case "by_value":
124
- return typeof e == "boolean" ? { kind: "boolean", text: r, value: e } : ot(e, r, !1) ?? i;
125
- }
126
- }
127
- function ke(t) {
128
- return t.kind === "empty" ? "" : t.text;
129
- }
130
- function oe(t, e) {
131
- return t.dashboardId === e.dashboardId && t.cardId === e.cardId && t.attachmentIndex === void 0;
132
- }
133
- function bt(t) {
134
- return new Map(
135
- t.presentationExecutionSnapshot.resolvedFormats.flatMap(
136
- (e) => e.format.type === "raw_temporal" && e.target.kind === "column" && oe(e.scope, t.scope) ? [[e.target.columnKey, e.format]] : []
137
- )
138
- );
139
- }
140
- function yt(t) {
141
- const e = t == null ? void 0 : t.sql, r = t == null ? void 0 : t.python;
142
- return (t == null ? void 0 : t.resultOwner) === "freeform" && typeof e == "string" && !!e.trim() && (typeof r != "string" || !r.trim());
143
- }
144
- function Ie(t) {
145
- return t.formatting.useFormattedValues !== !1 && yt(t.queryPayload) && bt(t.formatting).size > 0;
146
- }
147
- function ae(t, e) {
148
- return t.map((r, o) => {
149
- if (!Object.prototype.hasOwnProperty.call(r, e) || r[e] === void 0)
150
- throw new Error(
151
- `missing_raw_temporal_result_contract: Row ${o} is missing declared temporal column "${e}".`
152
- );
153
- const i = r[e];
154
- return i === null || typeof i == "string" ? i : String(i);
155
- });
156
- }
157
- function ie(t) {
158
- if (t.formatting.useFormattedValues === !1)
159
- return {
160
- activatedColumnKeys: /* @__PURE__ */ new Set(),
161
- byColumnKey: /* @__PURE__ */ new Map()
162
- };
163
- const e = bt(t.formatting), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
164
- if (e.size === 0)
165
- return { activatedColumnKeys: r, byColumnKey: o };
166
- const i = new Map(
167
- t.columns.flatMap((c) => {
168
- const y = c.key || c.field;
169
- return y ? [[y, c]] : [];
170
- })
171
- ), d = yt(t.queryPayload), s = /* @__PURE__ */ new Map();
172
- for (const [c, y] of e) {
173
- const C = i.get(c);
174
- let w;
175
- if (C != null && C.rawTemporal)
176
- w = Vt(C, {
177
- metadataRequired: !0
178
- }), r.add(c);
179
- else if (d) {
180
- r.add(c);
181
- const u = St({
182
- columnKey: c,
183
- values: ae(t.records, c)
184
- });
185
- s.set(c, u), u.status === "classified" && (w = u.metadata);
186
- } else
187
- continue;
188
- w && o.set(c, {
189
- metadata: w,
190
- format: y,
191
- formatValue: $t({ metadata: w, format: y })
192
- });
193
- }
194
- return {
195
- activatedColumnKeys: r,
196
- byColumnKey: o,
197
- ...d ? {
198
- sqlChunkEvidence: Ft(s)
199
- } : {}
200
- };
201
- }
202
- function se(t) {
203
- if (!t.resolution.activatedColumnKeys.has(t.columnKey))
204
- return;
205
- if (t.value === void 0)
206
- throw new Error(
207
- `missing_raw_temporal_result_contract: Row ${t.rowIndex} is missing temporal column "${t.columnKey}".`
208
- );
209
- const e = t.resolution.byColumnKey.get(t.columnKey);
210
- if (!e)
211
- return { text: t.value === null ? "" : String(t.value) };
212
- if (t.value !== null && typeof t.value != "string")
213
- return { text: String(t.value) };
214
- const r = e.formatValue(t.value);
215
- return r.ok && r.wallClock ? { text: r.text, wallClock: r.wallClock } : { text: r.text };
216
- }
217
- function at(t, e) {
218
- const r = t.byColumnKey.get(e);
219
- return r ? r.metadata.valueKind === "date" : void 0;
220
- }
221
- const ce = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), le = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, me = /^\d{4}-\d{2}-\d{2}$/, gt = "MM/dd/yyyy";
222
- function R(t) {
223
- return typeof t == "object" && t !== null && !Array.isArray(t);
224
- }
225
- function A(t) {
226
- return t.key || t.field || void 0;
227
- }
228
- function it(t) {
229
- return t == null ? "" : typeof t == "string" ? t : H(t) ? t.value : t instanceof Date ? t.toISOString() : typeof t == "object" ? JSON.stringify(t) : String(t);
230
- }
231
- function st(t, e) {
232
- var o;
233
- const r = (o = t.columnSettings) == null ? void 0 : o[e];
234
- if (!(!R(r) || r.type !== "date"))
235
- return R(r.dateFormat) ? r.dateFormat : {};
236
- }
237
- function ct(t) {
238
- return t.useCustomFormat && t.customFormat ? t.customFormat : t.format || gt;
239
- }
240
- function lt(t, e) {
241
- return t && t !== "auto" ? t : e;
242
- }
243
- function de(t) {
244
- return !/[HhKkmsSa]/.test(t.replace(/'[^']*'/g, ""));
245
- }
246
- function ue(t) {
247
- if (typeof t == "number") return Number.isFinite(t) ? t : null;
248
- if (typeof t != "string" || !t.trim()) return null;
249
- const e = Number(t);
250
- return Number.isFinite(e) ? e : null;
251
- }
252
- function fe(t) {
253
- const e = pt(t);
254
- if (e !== void 0)
255
- try {
256
- return xt(e, /[.eE]/.test(e) ? "decimal" : "integer");
257
- } catch {
258
- return;
259
- }
260
- }
261
- function pe(t) {
262
- return t.calendar.fiscalCalendar && (t.granularity === "quarter" || t.granularity === "year") ? "fiscal" : t.granularity;
263
- }
264
- function De(t) {
265
- const { formatting: e, queryPayload: r } = t, o = e.useFormattedValues, i = e.scope, d = (a) => kt({ snapshot: e.presentationExecutionSnapshot, scope: i, target: { kind: "column", columnKey: a } }), s = (a) => Dt({ snapshot: e.presentationExecutionSnapshot, scope: i, target: { kind: "column", columnKey: a } });
266
- function c(a) {
267
- var g;
268
- if ((g = e.visibleColumns) != null && g.length) return e.visibleColumns;
269
- const l = a.columns.map(A).filter((f) => !!f);
270
- return l.length > 0 ? l : a.records[0] ? Object.keys(a.records[0]) : [];
271
- }
272
- function y(a, l) {
273
- return e.columnLabels && Object.prototype.hasOwnProperty.call(e.columnLabels, a) && e.columnLabels[a] || void 0 || C(l) || (l == null ? void 0 : l.label) || (l == null ? void 0 : l.headerName) || a;
274
- }
275
- function C(a, l) {
276
- const g = a == null ? void 0 : a.pivotIdentity;
277
- if (!g || !g.members || g.members.length === 0) return;
278
- const f = et({ identity: g, columnKey: (a == null ? void 0 : a.key) || (a == null ? void 0 : a.field) || "" });
279
- return At({
280
- members: f,
281
- metricLabel: (a == null ? void 0 : a.label) || (a == null ? void 0 : a.headerName),
282
- mode: o ? "formatted" : "canonical",
283
- resolveTemporalFormat: (T) => {
284
- const b = f.find((E) => E.fieldId === T);
285
- if (!(b != null && b.temporalBucket)) return;
286
- const x = J({
287
- snapshot: e.presentationExecutionSnapshot,
288
- scope: i,
289
- target: { kind: "field", fieldId: T, role: "pivotby" }
290
- });
291
- return x ? w(b.temporalBucket, x) : void 0;
292
- }
293
- }).flattenedLabel;
294
- }
295
- function w(a, l) {
296
- return It({
297
- metadata: a,
298
- cardFormat: l,
299
- locale: l.locale,
300
- ...l.presentation.mode === "auto" ? { styles: l.presentation.styles } : {}
301
- }).format;
302
- }
303
- function u(a, l) {
304
- const { records: g, columns: f } = a, T = R(r.cardConfig) ? r.cardConfig : void 0, b = T == null ? void 0 : T.pivotByColumns, x = Array.isArray(b) ? b.flatMap(
305
- (n) => R(n) && typeof n.id == "string" && n.id ? [n.id] : []
306
- ) : [];
307
- Rt(
308
- f.map((n) => ({ key: A(n) || "<unknown>", pivotIdentity: n.pivotIdentity })),
309
- { expectedPivotFieldIds: x }
310
- );
311
- const E = c(a), k = new Map(
312
- f.flatMap((n) => {
313
- const m = A(n);
314
- return m ? [[m, n]] : [];
315
- })
316
- ), ht = new Map(a.resultColumns.map((n) => [n.key, n.dataType])), I = ie({
317
- records: g,
318
- columns: f,
319
- formatting: e,
320
- queryPayload: r
321
- }), V = new Map(
322
- f.flatMap((n) => {
323
- const m = A(n);
324
- return m && n.temporalBucket ? [[m, n.temporalBucket]] : [];
325
- })
326
- ), q = /* @__PURE__ */ new Map();
327
- for (const n of E) {
328
- const m = J({
329
- snapshot: e.presentationExecutionSnapshot,
330
- scope: i,
331
- target: { kind: "column", columnKey: n }
332
- }), v = V.get(n);
333
- if (o) {
334
- if (m && !v) throw new Error(`Missing temporal bucket metadata for column "${n}"`);
335
- if (v && !m) throw new Error(`Missing resolved temporal presentation for column "${n}"`);
336
- }
337
- m && v && q.set(n, w(v, m));
338
- }
339
- const z = E.map((n) => {
340
- const m = ht.get(n), v = m && ce.has(m) ? m : "unknown", S = o ? p(n, I, V) : void 0, F = y(n, k.get(n)), L = o && I.activatedColumnKeys.has(n) && at(I, n) === void 0;
341
- return {
342
- key: n,
343
- label: F,
344
- dataType: v,
345
- ...S ? { presentation: S } : {},
346
- xlsx: rt({ key: n, label: F, formattedValues: o, dataType: v, presentation: S }),
347
- ...L ? { xlsxPending: !0 } : {}
348
- };
349
- });
350
- function vt(n, m, v, S) {
351
- if (!o) return { text: it(n), value: n };
352
- const F = se({ value: n, columnKey: m, rowIndex: v, resolution: I });
353
- if (F !== void 0) return { text: F.text, value: n, ...F.wallClock ? { wallClock: F.wallClock } : {} };
354
- const L = V.get(m);
355
- if (L) {
356
- const $ = q.get(m);
357
- if (!$) throw new Error(`Missing resolved temporal presentation for column "${m}"`);
358
- if (n != null && typeof n != "string")
359
- throw new Error(`Canonical temporal column "${m}" must contain a string or null`);
360
- const _ = n ?? null, N = Lt(_, L);
361
- return {
362
- text: _t({ value: _, metadata: L, format: $ }),
363
- value: n,
364
- ...N ? { wallClock: N } : {}
365
- };
366
- }
367
- if (n == null) return { text: "", value: n };
368
- const P = s(m);
369
- if (P && typeof n == "number" && Number.isFinite(n))
370
- return {
371
- text: Q(
372
- new Date(n).toISOString(),
373
- P.pattern || gt,
374
- lt(P.timezone, e.timezone),
375
- "UTC"
376
- ),
377
- value: n
378
- };
379
- const D = d(m);
380
- if (typeof n == "number")
381
- return { text: D ? K(n, D) : String(n), value: n };
382
- if (H(n))
383
- return { text: D ? K(n, D) : n.value, value: n };
384
- const M = st(e, m);
385
- if (M && (n instanceof Date || typeof n == "string" && le.test(n))) {
386
- const $ = n instanceof Date ? n.toISOString() : n, _ = typeof n == "string" && me.test(n), N = _ ? "UTC" : lt(M.timezone, e.timezone), X = _ ? "UTC" : M.sourceTimezone || "auto", Z = Nt($, N, X);
387
- return {
388
- text: Q($, ct(M), N, X),
389
- value: n,
390
- ...Z ? { wallClock: Z } : {}
391
- };
392
- }
393
- if (typeof n == "string" && D && S.dataType === "number") {
394
- const $ = fe(n);
395
- if ($) return { text: K($, D), value: n };
396
- }
397
- return { text: it(n), value: n };
398
- }
399
- const Ct = g.map(
400
- (n, m) => z.map((v) => {
401
- const S = vt(n[v.key], v.key, m, v);
402
- return O({ value: S.value, text: S.text, column: v.xlsx, wallClock: S.wallClock });
403
- })
404
- ), Y = (l == null ? void 0 : l.withHeader) !== !1 && e.includeHeaders;
405
- if (Y)
406
- for (const n of E) {
407
- const m = k.get(n);
408
- m != null && m.pivotIdentity && et({ identity: m.pivotIdentity, columnKey: A(m) || n });
409
- }
410
- return {
411
- ...Y ? { header: z.map((n) => n.label) } : {},
412
- columns: z,
413
- rows: Ct,
414
- ...I.sqlChunkEvidence ? { rawTemporalClassification: I.sqlChunkEvidence } : {}
415
- };
416
- }
417
- function p(a, l, g) {
418
- if (l.activatedColumnKeys.has(a)) {
419
- const x = at(l, a);
420
- return x === void 0 ? { kind: "text" } : { kind: "datetime", dateOnly: x };
421
- }
422
- const f = g.get(a);
423
- if (f) return { kind: "temporal_bucket", grain: pe(f) };
424
- if (s(a)) return { kind: "text" };
425
- const T = st(e, a);
426
- if (T) return { kind: "datetime", dateOnly: de(ct(T)) };
427
- const b = d(a);
428
- return b ? { kind: "measure", format: b } : void 0;
429
- }
430
- function h(a, l) {
431
- if (!Number.isInteger(l) || l < 0)
432
- throw new Error("totalRows must be a non-negative integer");
433
- return l === 0 ? void 0 : (e.visibleColumns ?? Object.keys(a)).map((f) => {
434
- const b = Object.prototype.hasOwnProperty.call(a, f) ? a[f] : f === e.tableTotalsLabelColumnKey ? "Total" : null, x = o ? d(f) : void 0, E = rt({
435
- key: f,
436
- label: f,
437
- formattedValues: o,
438
- dataType: "unknown",
439
- ...x ? { presentation: { kind: "measure", format: x } } : {}
440
- });
441
- if (b == null) return { kind: "empty" };
442
- if (!o) return O({ value: b, text: String(b), column: E });
443
- const k = x ? ue(b) : null;
444
- return O(x && k !== null ? { value: k, text: K(k, x), column: E } : { value: b, text: String(b), column: E });
445
- });
446
- }
447
- return { format: u, totals: h };
448
- }
449
- const be = /* @__PURE__ */ new Set([
450
- "scope",
451
- "useFormattedValues",
452
- "timezone",
453
- "presentationExecutionSnapshot",
454
- "delimiter",
455
- "csvEncoding",
456
- "includeHeaders",
457
- "columnSettings",
458
- "visibleColumns",
459
- "columnLabels",
460
- "tableTotalsLabelColumnKey",
461
- "fileFormat",
462
- "title"
463
- ]);
464
- function W(t) {
465
- return t !== null && typeof t == "object" && !Array.isArray(t);
466
- }
467
- function mt(t, e) {
468
- if (t !== void 0) {
469
- if (!W(t))
470
- throw new Error(`formatting.${e} must be an object`);
471
- return t;
472
- }
473
- }
474
- function Le(t) {
475
- if (!W(t))
476
- throw new Error("formatting must be an object");
477
- const e = ["reportContext", "resolvedFormats"].find(
478
- (a) => Object.prototype.hasOwnProperty.call(t, a)
479
- );
480
- if (e)
481
- throw new tt(
482
- `formatting.${e} is retired; formatting.presentationExecutionSnapshot is authoritative.`
483
- );
484
- const r = Object.keys(t).find((a) => !be.has(a));
485
- if (r)
486
- throw new Error(`formatting contains unknown property "${r}"`);
487
- const o = typeof t.timezone == "string" ? t.timezone.trim() : "";
488
- if (!o)
489
- throw new Error("formatting.timezone must be a non-empty string");
490
- const i = jt(t.delimiter);
491
- if (!i)
492
- throw new Error("formatting.delimiter must be a comma, semicolon or tab");
493
- const d = Bt(t.csvEncoding);
494
- if (!d)
495
- throw new Error("formatting.csvEncoding must be 'utf-8-bom' or 'utf-8'");
496
- if (typeof t.includeHeaders != "boolean")
497
- throw new Error("formatting.includeHeaders must be a boolean");
498
- if (t.useFormattedValues !== void 0 && typeof t.useFormattedValues != "boolean")
499
- throw new Error("formatting.useFormattedValues must be a boolean");
500
- const s = t.fileFormat === void 0 ? void 0 : Ut(t.fileFormat);
501
- if (t.fileFormat !== void 0 && !s)
502
- throw new Error("formatting.fileFormat must be 'csv' or 'xlsx'");
503
- if (t.title !== void 0 && typeof t.title != "string")
504
- throw new Error("formatting.title must be a string");
505
- const c = t.visibleColumns === void 0 ? void 0 : Array.isArray(t.visibleColumns) && t.visibleColumns.every((a) => typeof a == "string") ? t.visibleColumns : void 0;
506
- if (t.visibleColumns !== void 0 && !c)
507
- throw new Error("formatting.visibleColumns must be an array of strings");
508
- const y = mt(t.columnLabels, "columnLabels");
509
- if (y && Object.values(y).some((a) => typeof a != "string"))
510
- throw new Error("formatting.columnLabels values must be strings");
511
- const C = mt(t.columnSettings, "columnSettings"), w = t.tableTotalsLabelColumnKey === void 0 ? void 0 : typeof t.tableTotalsLabelColumnKey == "string" && t.tableTotalsLabelColumnKey.trim() ? t.tableTotalsLabelColumnKey : null;
512
- if (w === null)
513
- throw new Error("formatting.tableTotalsLabelColumnKey must be a non-empty string");
514
- if (w && !(c != null && c.includes(w)))
515
- throw new Error("formatting.tableTotalsLabelColumnKey must identify a visible column");
516
- const u = Mt(t.scope, "formatting.scope");
517
- if (!u.cardId || u.attachmentIndex !== void 0)
518
- throw new Error("formatting.scope must identify exactly one dashboard card");
519
- const p = t.useFormattedValues !== !1, h = Kt(t.presentationExecutionSnapshot);
520
- if (o !== h.reportContext.calendar.tz)
521
- throw new Error(
522
- "formatting.timezone must equal presentationExecutionSnapshot.reportContext.calendar.tz"
523
- );
524
- try {
525
- Ot({
526
- snapshot: h,
527
- expectedScope: { dashboardId: u.dashboardId, cardId: u.cardId },
528
- visibleColumns: c,
529
- useFormattedValues: p
530
- });
531
- } catch (a) {
532
- throw new tt(
533
- `formatting.presentationExecutionSnapshot.${a instanceof Error ? a.message : String(a)}`
534
- );
535
- }
536
- return {
537
- scope: { dashboardId: u.dashboardId, cardId: u.cardId },
538
- useFormattedValues: p,
539
- timezone: o,
540
- presentationExecutionSnapshot: h,
541
- delimiter: i,
542
- csvEncoding: d,
543
- includeHeaders: t.includeHeaders,
544
- ...C ? { columnSettings: C } : {},
545
- ...c ? { visibleColumns: c } : {},
546
- ...y ? { columnLabels: y } : {},
547
- ...w ? { tableTotalsLabelColumnKey: w } : {},
548
- ...s ? { fileFormat: s } : {},
549
- ...typeof t.title == "string" ? { title: t.title } : {}
550
- };
551
- }
552
- function _e(t) {
553
- const e = t.formatOptions, r = (o) => W(o) ? o : void 0;
554
- return {
555
- scope: { dashboardId: t.dashboardId, cardId: t.cardId },
556
- useFormattedValues: e.useFormattedValues !== !1,
557
- timezone: e.presentationExecutionSnapshot.reportContext.calendar.tz,
558
- presentationExecutionSnapshot: e.presentationExecutionSnapshot,
559
- delimiter: typeof e.delimiter == "string" ? e.delimiter : ",",
560
- csvEncoding: e.csvEncoding,
561
- includeHeaders: e.includeHeaders !== !1,
562
- columnSettings: r(e.columnSettings),
563
- visibleColumns: Array.isArray(e.visibleColumns) ? e.visibleColumns : void 0,
564
- columnLabels: r(e.columnLabels),
565
- tableTotalsLabelColumnKey: typeof e.tableTotalsLabelColumnKey == "string" ? e.tableTotalsLabelColumnKey : void 0,
566
- ...t.fileFormat ? { fileFormat: t.fileFormat } : {},
567
- ...typeof t.title == "string" ? { title: t.title } : {}
568
- };
569
- }
570
- const ye = /^\d{4}-\d{2}-\d{2}$/;
571
- function wt(t) {
572
- const e = t.split(".");
573
- return e[e.length - 1].replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(" ").map((i) => i.charAt(0).toUpperCase() + i.slice(1).toLowerCase()).join(" ");
574
- }
575
- const dt = 10;
576
- function B(t, e) {
577
- const r = t.slice(0, dt).map(e).join(", "), o = t.length - dt;
578
- return o > 0 ? `${r}, and ${o} more` : r;
579
- }
580
- function ge(t) {
581
- if (t.valueType !== "date") return;
582
- const e = G(t.relativeMeta);
583
- return e && ft(t.operation, e) && U(e).printsByName ? e : void 0;
584
- }
585
- function we(t, e) {
586
- if (e !== "label") return ge(t);
587
- if (t.valueType !== "date") return;
588
- const r = G(t.relativeMeta);
589
- return r && ft(t.operation, r) ? r : void 0;
590
- }
591
- function ut(t, e = {}) {
592
- const { name: r, operation: o, values: i, valueType: d } = t, s = e.label ?? wt(r), c = we(t, e.relativeDates);
593
- if (c) {
594
- const p = zt(o, c);
595
- if (p) return `${s}: ${p}`;
596
- const h = Tt(c).label;
597
- if (h)
598
- return o === "between" ? `${s}: ${h}` : `${s} not in ${h}`;
599
- }
600
- if (!i || i.length === 0)
601
- return o === "is null" ? `${s} is empty` : o === "is not null" ? `${s} is not empty` : "";
602
- const y = G(t.relativeMeta ?? t.materializedRelativeDate), C = y ? Et(o) : void 0, w = t.temporalPrecision === "minute" || !!(y && (C ? U(y).bounds[C] === "instant" : U(y).subDay)), u = (p) => {
603
- if (d === "date" && p) {
604
- const h = {
605
- year: "numeric",
606
- month: "short",
607
- day: "numeric",
608
- ...w ? {
609
- hour: "numeric",
610
- minute: "2-digit"
611
- } : {}
612
- };
613
- if (typeof p == "string" && ye.test(p)) {
614
- const [l, g, f] = p.split("-").map(Number);
615
- return new Intl.DateTimeFormat(void 0, {
616
- year: "numeric",
617
- month: "short",
618
- day: "numeric",
619
- timeZone: "UTC"
620
- }).format(new Date(Date.UTC(l, g - 1, f)));
621
- }
622
- if (typeof p == "string" && Pt(p) === "wall_datetime") {
623
- const [l, g, f, T, b] = p.split(/[-T :.]/).map(Number);
624
- return new Intl.DateTimeFormat(void 0, {
625
- ...h,
626
- timeZone: "UTC"
627
- }).format(new Date(Date.UTC(l, g - 1, f, T, b)));
628
- }
629
- const a = new Date(p);
630
- if (!isNaN(a.getTime()))
631
- try {
632
- return new Intl.DateTimeFormat(void 0, {
633
- ...h,
634
- ...e.timezone ? { timeZone: e.timezone } : {}
635
- }).format(a);
636
- } catch {
637
- return w ? a.toLocaleString(void 0, h) : a.toLocaleDateString(void 0, h);
638
- }
639
- }
640
- return String(p);
641
- };
642
- switch (o) {
643
- case "=":
644
- return `${s}: ${u(i[0])}`;
645
- case "!=":
646
- return `${s} ≠ ${u(i[0])}`;
647
- case ">":
648
- return `${s} > ${u(i[0])}`;
649
- case "<":
650
- return `${s} < ${u(i[0])}`;
651
- case ">=":
652
- return `${s} ≥ ${u(i[0])}`;
653
- case "<=":
654
- return `${s} ≤ ${u(i[0])}`;
655
- case "between":
656
- case "not between": {
657
- const p = `${u(i[0])} - ${u(i[1])}`;
658
- return o === "between" ? `${s}: ${p}` : `${s} not in ${p}`;
659
- }
660
- case "in":
661
- return i.length === 1 ? `${s}: ${u(i[0])}` : `${s}: ${B(i, u)}`;
662
- case "not in":
663
- return `${s} not in (${B(i, u)})`;
664
- case "like":
665
- return `${s} contains "${i[0]}"`;
666
- case "not like":
667
- return `${s} doesn't contain "${i[0]}"`;
668
- default:
669
- return `${s}: ${B(i, u)}`;
670
- }
671
- }
672
- function Ne(t, e = {}) {
673
- if (!t || t.length === 0)
674
- return "";
675
- const r = /* @__PURE__ */ new Map();
676
- t.forEach((i) => {
677
- const d = r.get(i.name) || [];
678
- d.push(i), r.set(i.name, d);
679
- });
680
- const o = [];
681
- return r.forEach((i, d) => {
682
- if (i.length === 1) {
683
- const s = ut(i[0], e);
684
- s && o.push(s);
685
- } else {
686
- const s = wt(d), c = i.map((y) => ut(y, e).replace(`${s}: `, "").replace(`${s} `, "")).filter(Boolean);
687
- c.length > 0 && o.push(`${s}: ${c.join(" and ")}`);
688
- }
689
- }), o.join(" | ");
690
- }
691
- export {
692
- dt as F,
693
- Le as a,
694
- _e as b,
695
- Ie as c,
696
- ge as d,
697
- ke as e,
698
- ut as f,
699
- Ne as g,
700
- De as p,
701
- rt as r,
702
- O as t
703
- };