react-semaphor 0.1.541 → 0.1.543

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 (109) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +51 -49
  5. package/dist/chunks/apply-dashboard-operations-CG9S7MGt.js +2260 -0
  6. package/dist/chunks/{assistant-chat-D1fDZD6O.js → assistant-chat-BFMRUYoB.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-Bv18samq.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-B6IrON_Q.js → dashboard-B9mKTJoy.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-DwjFpewq.js → dashboard-briefing-launcher-Bdmry_oG.js} +18 -18
  13. package/dist/chunks/{dashboard-controls-C_BI28ME.js → dashboard-controls-UGpjOM2k.js} +69 -70
  14. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  15. package/dist/chunks/{dashboard-json-DDY15Trn.js → dashboard-json-DG8dz0eX.js} +4 -4
  16. package/dist/chunks/{document-dashboard-inputs-DP_Op5mu.js → document-dashboard-inputs-OwqCbrVp.js} +2382 -4975
  17. package/dist/chunks/document-sheet-utils-BTb3VZxV.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CH2dzWW-.js → edit-dashboard-visual-CDpA4y5e.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/{index-DaQlghLY.js → index-l5LclZvs.js} +824 -1351
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-F_-H6VAw.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-DupbRk-R.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-D-azM_98.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-DpNkFfQO.js → report-preferences-dialog-CPwRwEJx.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CJ2WpoMF.js → saved-dashboard-context-BKvMfRfC.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator-KT598QJq.js → semaphor-ready-indicator-CN2AHm2x.js} +37489 -39476
  37. package/dist/chunks/{shelf-drop-preview-context-BxV3Fl8h.js → shelf-drop-preview-context-BGl_rxcW.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BDRXLLdq.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-DdD12SMY.js → use-create-flow-overlay-state-BnclfB2k.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +462 -457
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -241
  53. package/dist/index.js +174 -175
  54. package/dist/report-runtime-context/index.js +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  57. package/dist/types/briefings/attachments.d.ts +17 -1
  58. package/dist/types/briefings/index.d.ts +5 -3
  59. package/dist/types/index.js +48 -48
  60. package/dist/types/lib/api/exports-api.d.ts +11 -65
  61. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  62. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  63. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  64. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  65. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  66. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  67. package/dist/types/lib/types/explorer-types.d.ts +6 -0
  68. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  69. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  70. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  71. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  72. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  73. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  74. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  75. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  76. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  77. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  78. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  79. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  80. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  81. package/dist/types/shared/format-utils/index.d.ts +2 -0
  82. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  83. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  84. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  85. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  86. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  87. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  88. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  89. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  90. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  91. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  92. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  93. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  94. package/package.json +2 -1
  95. package/dist/chunks/aggregate-table-row-presentation-B_vQjYR3.js +0 -996
  96. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  97. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  98. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  99. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  100. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  101. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  102. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  103. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  104. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  105. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  106. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  107. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  108. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  109. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,53 +1,28 @@
1
- import { r as W } from "./metric-comparison-CojWeLqx.js";
2
- import { l as M } from "./validators-Ej1DdCXa.js";
3
- import { b as j, w as y, z as A } from "./zoned-wall-clock-MulfA26h.js";
4
- function P(t, e) {
5
- return W({ ...t, role: e });
6
- }
7
- function rt(t, e) {
8
- if (e.id) {
9
- const n = [];
10
- t.forEach(
11
- ({ fields: s }, o) => s.forEach((r, a) => {
12
- r.id === e.id && n.push({ group: o, index: a });
13
- })
14
- );
15
- const i = e.alias ? n.find(
16
- ({ group: s, index: o }) => P(t[s].fields[o], t[s].role) === e.alias
17
- ) : void 0;
18
- if (i) return i;
19
- if (n.length === 1) return n[0];
20
- }
21
- for (let n = 0; n < t.length; n += 1) {
22
- const i = t[n].fields.findIndex(
23
- (s) => s.name === e.name && s.entityName === e.entityName && (s.alias === e.alias || !e.alias)
24
- );
25
- if (i !== -1) return { group: n, index: i };
26
- }
27
- }
28
- function x(t, e) {
29
- const n = t.split(".").map((a) => a.trim()), i = e.split(".").map((a) => a.trim());
30
- if (n.length === 0 || i.length === 0 || n.some((a) => !a) || i.some((a) => !a))
1
+ import { l as M } from "./validators-DMHTpf7a.js";
2
+ import { b as W, w as y, z as F } from "./zoned-wall-clock-MulfA26h.js";
3
+ function U(t, e) {
4
+ const n = t.split(".").map((a) => a.trim()), o = e.split(".").map((a) => a.trim());
5
+ if (n.length === 0 || o.length === 0 || n.some((a) => !a) || o.some((a) => !a))
31
6
  return !1;
32
- const [s, o] = n.length <= i.length ? [n, i] : [i, n], r = o.length - s.length;
33
- return s.every((a, u) => a === o[u + r]);
7
+ const [s, i] = n.length <= o.length ? [n, o] : [o, n], r = i.length - s.length;
8
+ return s.every((a, u) => a === i[u + r]);
34
9
  }
35
- function R(t, e) {
36
- const n = t.split("."), i = e.split("."), s = n.pop(), o = i.pop();
37
- return !!(s && s === o && n.length > 0 && i.length > 0 && x(
10
+ function j(t, e) {
11
+ const n = t.split("."), o = e.split("."), s = n.pop(), i = o.pop();
12
+ return !!(s && s === i && n.length > 0 && o.length > 0 && U(
38
13
  n.join("."),
39
- i.join(".")
14
+ o.join(".")
40
15
  ));
41
16
  }
42
- function L(t) {
43
- const e = t.map((i) => i.trim()).filter(Boolean);
17
+ function P(t) {
18
+ const e = t.map((o) => o.trim()).filter(Boolean);
44
19
  if (e.every(
45
- (i, s) => e.slice(s + 1).every(
46
- (o) => x(i, o)
20
+ (o, s) => e.slice(s + 1).every(
21
+ (i) => U(o, i)
47
22
  )
48
23
  ))
49
24
  return [...e].sort(
50
- (i, s) => s.split(".").length - i.split(".").length
25
+ (o, s) => s.split(".").length - o.split(".").length
51
26
  )[0];
52
27
  }
53
28
  function m(t) {
@@ -66,24 +41,24 @@ function N(t) {
66
41
  function d(t) {
67
42
  return typeof t == "string" ? t.trim() : "";
68
43
  }
69
- function Q(t, e) {
44
+ function R(t, e) {
70
45
  return t.every(
71
- (n, i) => t.slice(i + 1).every((s) => e(n, s))
46
+ (n, o) => t.slice(o + 1).every((s) => e(n, s))
72
47
  );
73
48
  }
74
- function J(t, e) {
75
- const n = d(t.id), i = d(t.name), s = d(e.entityId), o = d(e.entityName);
76
- return !i || !s && !o ? !1 : (!s || s === n || s === i) && (!o || o === i);
49
+ function L(t, e) {
50
+ const n = d(t.id), o = d(t.name), s = d(e.entityId), i = d(e.entityName);
51
+ return !o || !s && !i ? !1 : (!s || s === n || s === o) && (!i || i === o);
77
52
  }
78
- function K(t) {
79
- const e = m(t.semanticContext) ? t.semanticContext : void 0, n = m(t.fieldMeta) ? t.fieldMeta : void 0, i = d(e == null ? void 0 : e.semanticDomainId), s = Array.isArray(e == null ? void 0 : e.selectedEntities) ? e.selectedEntities.filter(
80
- (I) => m(I) && I.type === "dataset"
53
+ function Q(t) {
54
+ const e = m(t.semanticContext) ? t.semanticContext : void 0, n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = d(e == null ? void 0 : e.semanticDomainId), s = Array.isArray(e == null ? void 0 : e.selectedEntities) ? e.selectedEntities.filter(
55
+ (C) => m(C) && C.type === "dataset"
81
56
  ) : [];
82
- if (!!!(i || s.length > 0 || (n == null ? void 0 : n.entityType) === "dataset")) return;
83
- if (!i)
57
+ if (!!!(o || s.length > 0 || (n == null ? void 0 : n.entityType) === "dataset")) return;
58
+ if (!o)
84
59
  return { status: "unresolved", reason: "incomplete_source_identity" };
85
60
  const r = d(n == null ? void 0 : n.entityId), a = d(n == null ? void 0 : n.entityName), u = !!(r || a), l = u ? s.filter(
86
- (I) => J(I, {
61
+ (C) => L(C, {
87
62
  entityId: r,
88
63
  entityName: a
89
64
  })
@@ -92,58 +67,58 @@ function K(t) {
92
67
  return { status: "unresolved", reason: "incomplete_source_identity" };
93
68
  if (u && s.length > 0 && l.length === 0)
94
69
  return { status: "unresolved", reason: "divergent_source_identity" };
95
- const c = l[0], f = d(c == null ? void 0 : c.domainId), v = d(c == null ? void 0 : c.id), h = d(c == null ? void 0 : c.name);
96
- if (f && f !== i)
70
+ const c = l[0], f = d(c == null ? void 0 : c.domainId), _ = d(c == null ? void 0 : c.id), h = d(c == null ? void 0 : c.name);
71
+ if (f && f !== o)
97
72
  return { status: "unresolved", reason: "divergent_source_identity" };
98
- const F = v, q = h || a;
99
- return q ? {
73
+ const A = _, E = h || a;
74
+ return E ? {
100
75
  status: "resolved",
101
76
  source: {
102
77
  kind: "semantic",
103
- domainId: i,
104
- datasetName: q,
105
- ...F ? { datasetId: F } : {}
78
+ domainId: o,
79
+ datasetName: E,
80
+ ...A ? { datasetId: A } : {}
106
81
  }
107
82
  } : { status: "unresolved", reason: "incomplete_source_identity" };
108
83
  }
109
- function Y(t, e) {
110
- const n = d(t.connectionId), i = m(t.semanticContext) ? t.semanticContext : void 0, s = d(i == null ? void 0 : i.connectionId);
84
+ function J(t, e) {
85
+ const n = d(t.connectionId), o = m(t.semanticContext) ? t.semanticContext : void 0, s = d(o == null ? void 0 : o.connectionId);
111
86
  if (n && s && n !== s)
112
87
  return { status: "unresolved", reason: "divergent_source_identity" };
113
- const o = n || s, r = m(t.fieldMeta) ? t.fieldMeta : void 0, a = e.split(".").slice(0, -1).join("."), u = N(t.qualifiedTableName), l = N(
88
+ const i = n || s, r = m(t.fieldMeta) ? t.fieldMeta : void 0, a = e.split(".").slice(0, -1).join("."), u = N(t.qualifiedTableName), l = N(
114
89
  r == null ? void 0 : r.qualifiedEntityName
115
90
  ), c = [
116
91
  u,
117
92
  l,
118
93
  a
119
- ].filter(Boolean), f = L(c);
120
- return !f && c.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !o || !f ? { status: "unresolved", reason: "incomplete_source_identity" } : {
94
+ ].filter(Boolean), f = P(c);
95
+ return !f && c.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !i || !f ? { status: "unresolved", reason: "incomplete_source_identity" } : {
121
96
  status: "resolved",
122
- source: { kind: "physical", connectionId: o, tableName: f }
97
+ source: { kind: "physical", connectionId: i, tableName: f }
123
98
  };
124
99
  }
125
- function G(t, e) {
126
- const n = m(t.fieldMeta) ? t.fieldMeta : void 0, i = typeof (n == null ? void 0 : n.qualifiedFieldName) == "string" ? n.qualifiedFieldName.trim() : "", s = k(
100
+ function K(t, e) {
101
+ const n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = typeof (n == null ? void 0 : n.qualifiedFieldName) == "string" ? n.qualifiedFieldName.trim() : "", s = k(
127
102
  n == null ? void 0 : n.qualifiedFieldName
128
- ), o = typeof t.column == "string" ? t.column.trim() : "", r = k(o), a = typeof t.qualifiedTableName == "string" ? t.qualifiedTableName.trim() : "", u = N(
103
+ ), i = typeof t.column == "string" ? t.column.trim() : "", r = k(i), a = typeof t.qualifiedTableName == "string" ? t.qualifiedTableName.trim() : "", u = N(
129
104
  t.qualifiedTableName
130
105
  );
131
- if (i && !s || e && a && !u || o.includes(".") && !r)
106
+ if (o && !s || e && a && !u || i.includes(".") && !r)
132
107
  return { status: "unresolved", reason: "incomplete_field_identity" };
133
- const l = r.split("."), c = r ? l[l.length - 1] : o, f = e && u && c ? `${u}.${c}` : "", v = [
108
+ const l = r.split("."), c = r ? l[l.length - 1] : i, f = e && u && c ? `${u}.${c}` : "", _ = [
134
109
  s,
135
110
  r,
136
111
  f
137
112
  ].filter(Boolean);
138
- if (!Q(
139
- v,
140
- R
113
+ if (!R(
114
+ _,
115
+ j
141
116
  ))
142
117
  return { status: "unresolved", reason: "divergent_field_identity" };
143
118
  const h = r || s || f;
144
119
  return h ? { status: "resolved", qualifiedFieldName: h } : { status: "unresolved", reason: "incomplete_field_identity" };
145
120
  }
146
- function H(t) {
121
+ function Y(t) {
147
122
  if (!m(t))
148
123
  return { status: "ineligible", reason: "invalid_input" };
149
124
  if (t.kind === "global-date")
@@ -151,50 +126,50 @@ function H(t) {
151
126
  const e = M(t.dataType);
152
127
  if (e !== "date" && e !== "datetime")
153
128
  return { status: "ineligible", reason: "non_date_filter" };
154
- const n = m(t.fieldMeta) ? t.fieldMeta : void 0, i = M(
129
+ const n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = M(
155
130
  n == null ? void 0 : n.dataType
156
131
  );
157
- if ((n == null ? void 0 : n.dataType) !== void 0 && i !== "date" && i !== "datetime")
132
+ if ((n == null ? void 0 : n.dataType) !== void 0 && o !== "date" && o !== "datetime")
158
133
  return { status: "ineligible", reason: "non_date_filter" };
159
134
  if (t.customFilterPreferences)
160
135
  return { status: "ineligible", reason: "custom_filter" };
161
136
  if (t.targetColumns !== void 0 && (!Array.isArray(t.targetColumns) || t.targetColumns.length > 0))
162
137
  return { status: "ineligible", reason: "multi_target_filter" };
163
- const s = K(t), o = G(t, s === void 0);
164
- if (o.status === "unresolved")
165
- return { status: "ineligible", reason: o.reason };
166
- const r = s || Y(t, o.qualifiedFieldName);
138
+ const s = Q(t), i = K(t, s === void 0);
139
+ if (i.status === "unresolved")
140
+ return { status: "ineligible", reason: i.reason };
141
+ const r = s || J(t, i.qualifiedFieldName);
167
142
  return r.status === "resolved" ? {
168
143
  status: "eligible",
169
144
  kind: "field_date",
170
- qualifiedFieldName: o.qualifiedFieldName,
145
+ qualifiedFieldName: i.qualifiedFieldName,
171
146
  source: r.source
172
147
  } : { status: "ineligible", reason: r.reason };
173
148
  }
174
- function V(t) {
149
+ function G(t) {
175
150
  if (!m(t) || t.kind !== "filter" || !m(t.filter))
176
151
  return { status: "ineligible", reason: "invalid_input" };
177
- const e = H(
152
+ const e = Y(
178
153
  t.filter
179
154
  );
180
155
  return e.status === "ineligible" ? e : e.kind === "field_date" && m(t.compatibility) && t.compatibility.source === "cardInlineFilter" ? { status: "ineligible", reason: "card_inline_filter" } : e;
181
156
  }
182
- function at(t) {
183
- return V(t).status === "eligible";
157
+ function ot(t) {
158
+ return G(t).status === "eligible";
184
159
  }
185
- function ut(t) {
160
+ function st(t) {
186
161
  return `compat-filter:${t}`;
187
162
  }
188
- function ct(t) {
163
+ function it(t) {
189
164
  return `compat-control:${t}`;
190
165
  }
191
- function dt(t, e) {
166
+ function rt(t, e) {
192
167
  return `compat-inline-filter:${t}:${e}`;
193
168
  }
194
- function lt(t, e) {
169
+ function at(t, e) {
195
170
  return `compat-card-control:${t}:${e}`;
196
171
  }
197
- function D(t) {
172
+ function b(t) {
198
173
  var e;
199
174
  return JSON.stringify([
200
175
  ((e = t.field) == null ? void 0 : e.id) ?? "",
@@ -203,34 +178,34 @@ function D(t) {
203
178
  t.temporalBucket ?? null
204
179
  ]);
205
180
  }
206
- function X(t) {
207
- return JSON.stringify(t.map(D).sort());
181
+ function H(t) {
182
+ return JSON.stringify(t.map(b).sort());
208
183
  }
209
- function U(t) {
184
+ function x(t) {
210
185
  const e = /* @__PURE__ */ new Map();
211
186
  for (const n of t)
212
- for (const i of n.tuples) {
213
- const s = i.conditions.filter(
187
+ for (const o of n.tuples) {
188
+ const s = o.conditions.filter(
214
189
  (a) => {
215
190
  var u;
216
191
  return (u = a.field) == null ? void 0 : u.id;
217
192
  }
218
193
  );
219
194
  if (s.length === 0) continue;
220
- let o = e.get(n.sourceCardId);
221
- o || (o = /* @__PURE__ */ new Map(), e.set(n.sourceCardId, o));
195
+ let i = e.get(n.sourceCardId);
196
+ i || (i = /* @__PURE__ */ new Map(), e.set(n.sourceCardId, i));
222
197
  const r = [...s].sort(
223
- (a, u) => D(a).localeCompare(D(u))
198
+ (a, u) => b(a).localeCompare(b(u))
224
199
  );
225
- o.set(X(r), r);
200
+ i.set(H(r), r);
226
201
  }
227
- return [...e.entries()].sort(([n], [i]) => n.localeCompare(i)).map(([n, i]) => ({
202
+ return [...e.entries()].sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => ({
228
203
  sourceCardId: n,
229
- tuples: [...i.entries()].sort(([s], [o]) => s.localeCompare(o)).map(([, s]) => ({ conditions: s }))
204
+ tuples: [...o.entries()].sort(([s], [i]) => s.localeCompare(i)).map(([, s]) => ({ conditions: s }))
230
205
  }));
231
206
  }
232
- function mt(t) {
233
- const e = U(t);
207
+ function ut(t) {
208
+ const e = x(t);
234
209
  if (e.length !== 0)
235
210
  return {
236
211
  id: "selection",
@@ -238,14 +213,14 @@ function mt(t) {
238
213
  negate: !1,
239
214
  conditions: [],
240
215
  groups: e.map((n) => {
241
- const i = `selection:${n.sourceCardId}`;
216
+ const o = `selection:${n.sourceCardId}`;
242
217
  return {
243
- id: i,
218
+ id: o,
244
219
  logicalOperator: "OR",
245
220
  negate: !1,
246
221
  conditions: [],
247
- groups: n.tuples.map((s, o) => {
248
- const r = `${i}:${o}`;
222
+ groups: n.tuples.map((s, i) => {
223
+ const r = `${o}:${i}`;
249
224
  return {
250
225
  id: r,
251
226
  logicalOperator: "AND",
@@ -261,29 +236,29 @@ function mt(t) {
261
236
  })
262
237
  };
263
238
  }
264
- function ft(t) {
239
+ function ct(t) {
265
240
  return JSON.stringify(
266
- U(t).map((e) => [
241
+ x(t).map((e) => [
267
242
  e.sourceCardId,
268
- e.tuples.map((n) => n.conditions.map(D))
243
+ e.tuples.map((n) => n.conditions.map(b))
269
244
  ])
270
245
  );
271
246
  }
272
- const T = 864e5, E = {
247
+ const S = 864e5, q = {
273
248
  second: 1e3,
274
249
  minute: 6e4,
275
250
  hour: 36e5
276
251
  };
277
- function S(t, e) {
252
+ function T(t, e) {
278
253
  return {
279
- ...A(t, e),
254
+ ...F(t, e),
280
255
  millisecond: (t.getTime() % 1e3 + 1e3) % 1e3
281
256
  };
282
257
  }
283
258
  function p(t, e) {
284
- return j(t, e);
259
+ return W(t, e);
285
260
  }
286
- function _(t) {
261
+ function v(t) {
287
262
  const e = new Date(t);
288
263
  return {
289
264
  year: e.getUTCFullYear(),
@@ -299,9 +274,9 @@ function B(t, e) {
299
274
  const n = /* @__PURE__ */ new Date(0);
300
275
  return n.setUTCFullYear(t, e, 0), n.getUTCDate();
301
276
  }
302
- function C(t, e) {
303
- const n = t.year * 12 + (t.month - 1) + e, i = Math.floor(n / 12), s = n - i * 12 + 1;
304
- return { ...t, year: i, month: s, day: Math.min(t.day, B(i, s)) };
277
+ function I(t, e) {
278
+ const n = t.year * 12 + (t.month - 1) + e, o = Math.floor(n / 12), s = n - o * 12 + 1;
279
+ return { ...t, year: o, month: s, day: Math.min(t.day, B(o, s)) };
305
280
  }
306
281
  function g(t, e, n) {
307
282
  if (e === 0) return t;
@@ -309,22 +284,22 @@ function g(t, e, n) {
309
284
  case "second":
310
285
  case "minute":
311
286
  case "hour":
312
- return _(
313
- y(t) + e * E[n]
287
+ return v(
288
+ y(t) + e * q[n]
314
289
  );
315
290
  case "day":
316
- return _(y(t) + e * T);
291
+ return v(y(t) + e * S);
317
292
  case "week":
318
- return _(y(t) + e * 7 * T);
293
+ return v(y(t) + e * 7 * S);
319
294
  case "month":
320
- return C(t, e);
295
+ return I(t, e);
321
296
  case "quarter":
322
- return C(t, e * 3);
297
+ return I(t, e * 3);
323
298
  case "year":
324
- return C(t, e * 12);
299
+ return I(t, e * 12);
325
300
  }
326
301
  }
327
- function Z(t) {
302
+ function V(t) {
328
303
  return new Date(
329
304
  y({ ...t, hour: 0, minute: 0, second: 0 })
330
305
  ).getUTCDay();
@@ -334,27 +309,27 @@ function $(t) {
334
309
  const e = (n = t.fiscalCalendar) == null ? void 0 : n.yearStartMonth;
335
310
  return e && e >= 1 && e <= 12 ? e : 1;
336
311
  }
337
- function tt(t, e, n) {
338
- const i = { ...t, hour: 0, minute: 0, second: 0, millisecond: 0 };
312
+ function X(t, e, n) {
313
+ const o = { ...t, hour: 0, minute: 0, second: 0, millisecond: 0 };
339
314
  switch (e) {
340
315
  case "day":
341
- return i;
316
+ return o;
342
317
  case "week":
343
318
  return g(
344
- i,
345
- -((Z(t) - n.weekStart + 7) % 7),
319
+ o,
320
+ -((V(t) - n.weekStart + 7) % 7),
346
321
  "day"
347
322
  );
348
323
  case "month":
349
- return { ...i, day: 1 };
324
+ return { ...o, day: 1 };
350
325
  case "quarter": {
351
326
  const s = (t.month - $(n) + 12) % 12;
352
- return C({ ...i, day: 1 }, -(s % 3));
327
+ return I({ ...o, day: 1 }, -(s % 3));
353
328
  }
354
329
  case "year": {
355
330
  const s = $(n);
356
331
  return {
357
- ...i,
332
+ ...o,
358
333
  year: t.month >= s ? t.year : t.year - 1,
359
334
  month: s,
360
335
  day: 1
@@ -362,15 +337,15 @@ function tt(t, e, n) {
362
337
  }
363
338
  }
364
339
  }
365
- function b(t, e, n, i = 0) {
366
- const s = E[e];
340
+ function D(t, e, n, o = 0) {
341
+ const s = q[e];
367
342
  if (s !== void 0) {
368
- const a = S(t, n.tz), u = a.millisecond + (e === "second" ? 0 : a.second * 1e3) + (e === "hour" ? a.minute * 6e4 : 0), l = t.getTime() - u + i * s;
343
+ const a = T(t, n.tz), u = a.millisecond + (e === "second" ? 0 : a.second * 1e3) + (e === "hour" ? a.minute * 6e4 : 0), l = t.getTime() - u + o * s;
369
344
  return { start: new Date(l), endExclusive: new Date(l + s) };
370
345
  }
371
- const o = e, r = g(
372
- tt(S(t, n.tz), o, n),
373
- i,
346
+ const i = e, r = g(
347
+ X(T(t, n.tz), i, n),
348
+ o,
374
349
  e
375
350
  );
376
351
  return {
@@ -379,109 +354,107 @@ function b(t, e, n, i = 0) {
379
354
  };
380
355
  }
381
356
  function z(t, e, n) {
382
- return b(t, e, n).start;
357
+ return D(t, e, n).start;
383
358
  }
384
359
  function w(t, e, n) {
385
- return new Date(b(t, e, n).endExclusive.getTime() - 1);
360
+ return new Date(D(t, e, n).endExclusive.getTime() - 1);
386
361
  }
387
- function et(t, e, n, i) {
362
+ function Z(t, e, n, o) {
388
363
  return e === 0 ? t : p(
389
- g(S(t, i.tz), e, n),
390
- i.tz
364
+ g(T(t, o.tz), e, n),
365
+ o.tz
391
366
  );
392
367
  }
393
- function yt(t, e, n) {
394
- const i = (s) => {
395
- const { year: o, month: r, day: a } = A(s, n);
396
- return y({ year: o, month: r, day: a, hour: 0, minute: 0, second: 0 });
368
+ function dt(t, e, n) {
369
+ const o = (s) => {
370
+ const { year: i, month: r, day: a } = F(s, n);
371
+ return y({ year: i, month: r, day: a, hour: 0, minute: 0, second: 0 });
397
372
  };
398
- return Math.round((i(e) - i(t)) / T);
373
+ return Math.round((o(e) - o(t)) / S);
399
374
  }
400
- const nt = /^(\d{4})-(\d{2})-(\d{2})$/;
401
- function pt(t, e) {
402
- const { year: n, month: i, day: s } = A(t, e);
403
- return `${String(n).padStart(4, "0")}-${String(i).padStart(2, "0")}-${String(s).padStart(2, "0")}`;
375
+ const tt = /^(\d{4})-(\d{2})-(\d{2})$/;
376
+ function lt(t, e) {
377
+ const { year: n, month: o, day: s } = F(t, e);
378
+ return `${String(n).padStart(4, "0")}-${String(o).padStart(2, "0")}-${String(s).padStart(2, "0")}`;
404
379
  }
405
380
  function O(t) {
406
- const e = nt.exec(t);
381
+ const e = tt.exec(t);
407
382
  if (!e) return null;
408
- const n = Number(e[1]), i = Number(e[2]), s = Number(e[3]);
409
- return i < 1 || i > 12 || s < 1 || s > B(n, i) ? null : { year: n, month: i, day: s };
383
+ const n = Number(e[1]), o = Number(e[2]), s = Number(e[3]);
384
+ return o < 1 || o > 12 || s < 1 || s > B(n, o) ? null : { year: n, month: o, day: s };
410
385
  }
411
- function gt(t, e) {
386
+ function mt(t, e) {
412
387
  const n = O(t);
413
388
  if (!n) return null;
414
- const i = { ...n, hour: 0, minute: 0, second: 0, millisecond: 0 };
389
+ const o = { ...n, hour: 0, minute: 0, second: 0, millisecond: 0 };
415
390
  return {
416
- start: p(i, e),
417
- endExclusive: p(g(i, 1, "day"), e)
391
+ start: p(o, e),
392
+ endExclusive: p(g(o, 1, "day"), e)
418
393
  };
419
394
  }
420
- function ht(t, e, n) {
421
- const i = (o) => new Date(b(n, t.unit, e, o).endExclusive.getTime() - 1), s = (o) => b(n, t.unit, e, o).start;
395
+ function ft(t, e, n) {
396
+ const o = (i) => new Date(D(n, t.unit, e, i).endExclusive.getTime() - 1), s = (i) => D(n, t.unit, e, i).start;
422
397
  switch (t.mode) {
423
398
  case "last":
424
399
  return t.unit === "minute" || t.unit === "hour" ? {
425
400
  start: new Date(
426
- n.getTime() - t.n * E[t.unit]
401
+ n.getTime() - t.n * q[t.unit]
427
402
  ),
428
403
  end: n
429
- } : t.complete ? { start: s(-t.n), end: i(-1) } : { start: et(n, -t.n, t.unit, e), end: n };
404
+ } : t.complete ? { start: s(-t.n), end: o(-1) } : { start: Z(n, -t.n, t.unit, e), end: n };
430
405
  case "this": {
431
406
  if (t.boundary && t.unit === "month") {
432
- const o = t.boundary === "first_day" ? z(n, "month", e) : w(n, "month", e);
407
+ const i = t.boundary === "first_day" ? z(n, "month", e) : w(n, "month", e);
433
408
  return {
434
- start: z(o, "day", e),
435
- end: w(o, "day", e)
409
+ start: z(i, "day", e),
410
+ end: w(i, "day", e)
436
411
  };
437
412
  }
438
- return { start: s(0), end: t.toDate ? n : i(0) };
413
+ return { start: s(0), end: t.toDate ? n : o(0) };
439
414
  }
440
415
  case "previous":
441
- return { start: s(-1), end: i(-1) };
416
+ return { start: s(-1), end: o(-1) };
442
417
  case "between":
443
- return { start: s(t.from), end: i(t.to) };
418
+ return { start: s(t.from), end: o(t.to) };
444
419
  }
445
420
  }
446
- function It(t) {
447
- const { operation: e, values: n, temporalPrecision: i } = t;
448
- if (e !== "=" && e !== "!=" || i === "minute")
421
+ function yt(t) {
422
+ const { operation: e, values: n, temporalPrecision: o } = t;
423
+ if (e !== "=" && e !== "!=" || o === "minute")
449
424
  return null;
450
425
  const s = Array.isArray(n) ? n : [n];
451
426
  if (s.length !== 1 || typeof s[0] != "string") return null;
452
- const o = s[0].trim();
453
- return O(o) ? { operation: e, day: o } : null;
427
+ const i = s[0].trim();
428
+ return O(i) ? { operation: e, day: i } : null;
454
429
  }
455
430
  export {
456
- It as A,
457
- L as B,
458
- R as C,
459
- x as D,
460
- E,
461
- P as a,
462
- J as b,
463
- V as c,
464
- ct as d,
465
- dt as e,
466
- rt as f,
467
- ut as g,
468
- lt as h,
469
- at as i,
470
- mt as j,
471
- ft as k,
472
- p as l,
473
- B as m,
474
- g as n,
475
- Z as o,
476
- b as p,
477
- z as q,
478
- H as r,
479
- et as s,
480
- w as t,
481
- yt as u,
482
- pt as v,
483
- S as w,
484
- O as x,
485
- gt as y,
486
- ht as z
431
+ j as A,
432
+ U as B,
433
+ q as E,
434
+ L as a,
435
+ G as b,
436
+ it as c,
437
+ rt as d,
438
+ at as e,
439
+ ut as f,
440
+ st as g,
441
+ ct as h,
442
+ ot as i,
443
+ p as j,
444
+ B as k,
445
+ g as l,
446
+ V as m,
447
+ z as n,
448
+ w as o,
449
+ D as p,
450
+ dt as q,
451
+ Y as r,
452
+ Z as s,
453
+ lt as t,
454
+ O as u,
455
+ mt as v,
456
+ T as w,
457
+ ft as x,
458
+ yt as y,
459
+ P as z
487
460
  };