react-semaphor 0.1.568 → 0.1.569

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 (126) hide show
  1. package/README.md +0 -7
  2. package/dist/analytics-protocol/index.js +434 -454
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/brand-studio/index.js +10 -12
  5. package/dist/briefings/index.js +4 -4
  6. package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → _commonjsHelpers-Bid1ZNYj.js} +271 -222
  7. package/dist/chunks/{assistant-chat-BN5I8KuN.js → assistant-chat-Dzf2Mbph.js} +107 -109
  8. package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-Czg6FGt5.js} +2 -2
  9. package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
  10. package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-BS982X7x.js} +986 -985
  11. package/dist/chunks/{code-editor-DJNOsgJH.js → code-editor-BsxHzm9u.js} +43 -45
  12. package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-lLTgzOkM.js} +252 -253
  13. package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-BiYSbxZv.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-Bdj7luOr.js} +158 -159
  15. package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-TViDsnb8.js} +17 -19
  16. package/dist/chunks/dashboard-json-Dg9dQd9U.js +66 -0
  17. package/dist/chunks/{dates-CKO05ino.js → dates-BsPrWZIP.js} +8 -8
  18. package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-C6hoIeEJ.js} +20 -21
  19. package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-hcQ4os0u.js} +695 -699
  20. package/dist/chunks/filter-value-text-CVxEEDVl.js +146 -0
  21. package/dist/chunks/{index-CPNZW0mu.js → index-G4q89J6O.js} +74 -76
  22. package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-BIcoFfdS.js} +1 -1
  23. package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C6tYkHyv.js} +1 -1
  24. package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
  25. package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
  26. package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
  27. package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
  28. package/dist/chunks/{palette-4vf2BEEg.js → palette-NjHOE_6B.js} +1 -1
  29. package/dist/chunks/pivot-result-contract-expectations-DkmueDTW.js +55 -0
  30. package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
  31. package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
  32. package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Xc8_GFju.js} +26 -28
  33. package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
  34. package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-KqvcLcTM.js} +4784 -4764
  35. package/dist/chunks/{save-D6pHmSSP.js → save-C6VmEJTA.js} +1 -1
  36. package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-BeXXyoD4.js} +6 -6
  37. package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-BNkaANsG.js} +28395 -28384
  38. package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-C_issPBA.js} +18 -20
  39. package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-B6_StAty.js} +263 -265
  40. package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-BWP2joD1.js} +1 -1
  41. package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-scSWQXAB.js} +4 -4
  42. package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
  43. package/dist/chunks/{upload-Cf3wXZT8.js → upload-BRW4Mwrd.js} +1 -1
  44. package/dist/chunks/validators-B8fpdinG.js +3651 -0
  45. package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-BQ3OMjvy.js} +4 -4
  46. package/dist/dashboard/index.js +2 -2
  47. package/dist/dashboard-authoring/index.js +1527 -1517
  48. package/dist/format-utils/index.js +230 -231
  49. package/dist/index.js +236 -237
  50. package/dist/report-runtime-context/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/surfboard/index.js +2 -2
  53. package/dist/types/components/surfboard/filter/types.d.ts +5 -4
  54. package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
  55. package/dist/types/index.js +9 -9
  56. package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
  57. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  58. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  59. package/dist/types/lib/types/index.d.ts +1 -1
  60. package/dist/types/lib/utils/card-definition.d.ts +7 -7
  61. package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
  62. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
  63. package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
  64. package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
  65. package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
  66. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +4 -4
  67. package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
  68. package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
  69. package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
  70. package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
  71. package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
  72. package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
  73. package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
  74. package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
  75. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
  76. package/dist/types/shared/assistant-protocol/context.d.ts +12 -12
  77. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +155 -1753
  79. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
  80. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +74 -74
  81. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
  82. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -0
  83. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
  84. package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
  85. package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
  86. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  87. package/dist/types/shared/temporal/index.d.ts +0 -2
  88. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
  89. package/package.json +2 -24
  90. package/DATA_APP_SDK.md +0 -339
  91. package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
  92. package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
  93. package/dist/chunks/index-CuHybtft.js +0 -51
  94. package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
  95. package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
  96. package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
  97. package/dist/chunks/operators-B3zZoskU.js +0 -66
  98. package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
  99. package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
  100. package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
  101. package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
  102. package/dist/chunks/validators-wtjw0aw6.js +0 -3332
  103. package/dist/data-app-sdk/index.js +0 -1412
  104. package/dist/data-app-sdk-adapters/index.js +0 -361
  105. package/dist/data-app-sdk-validation/index.js +0 -1031
  106. package/dist/types/data-app-sdk/adapters.d.ts +0 -35
  107. package/dist/types/data-app-sdk/builders.d.ts +0 -62
  108. package/dist/types/data-app-sdk/contracts.d.ts +0 -419
  109. package/dist/types/data-app-sdk/executor.d.ts +0 -5
  110. package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
  111. package/dist/types/data-app-sdk/hooks.d.ts +0 -11
  112. package/dist/types/data-app-sdk/index.d.ts +0 -9
  113. package/dist/types/data-app-sdk/provider.d.ts +0 -8
  114. package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
  115. package/dist/types/data-app-sdk/selection.d.ts +0 -2
  116. package/dist/types/data-app-sdk/validation.d.ts +0 -58
  117. package/dist/types/data-app-sdk-adapters.d.ts +0 -2
  118. package/dist/types/data-app-sdk-validation.d.ts +0 -2
  119. package/dist/types/data-app-sdk.d.ts +0 -2
  120. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
  121. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
  122. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
  123. package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
  124. package/dist/types/shared/temporal/relative-date.d.ts +0 -21
  125. package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
  126. package/src/data-app-sdk/README.md +0 -402
@@ -1,7 +1,7 @@
1
1
  import { z as t } from "zod";
2
- import { y as Le, L as Ue, V as De, W as qe, Z as Me, _ as Ge, s as U, J as Z, n as Be, Q as ze, U as ce, g as Ve, r as We, K as Ke, C as Xe, D as Ze, m as le, b as ue, G as $e } from "./analytics-base-schemas-BaIQrEzX.js";
3
- import { W as k, Q as de, a1 as B, aZ as ee, t as A, X as He, aT as $, R as Qe, s as Ye, N as me, G as Je, r as et, H as tt, m as nt } from "./validators-wtjw0aw6.js";
4
- const H = {
2
+ import { y as Le, L as Ue, V as De, W as qe, Z as Me, _ as Be, s as U, J as Z, n as Ge, Q as ze, U as ce, g as Ve, r as We, K as Ke, C as Xe, D as Ze, m as le, b as ue, G as $e } from "./analytics-base-schemas-BaIQrEzX.js";
3
+ import { A as k, u as de, J as G, aZ as ee, m as A, B as Ye, aS as $, v as He, l as Je, o as me, a2 as Qe, p as et, a5 as tt, aY as nt } from "./validators-B8fpdinG.js";
4
+ const Y = {
5
5
  answerSummary: "string",
6
6
  responseDetail: "responseDetail",
7
7
  mode: "string",
@@ -129,7 +129,7 @@ const ct = [
129
129
  function f(e, n, a) {
130
130
  e.addIssue({ code: "custom", path: n, message: a });
131
131
  }
132
- function T(e, n, a) {
132
+ function v(e, n, a) {
133
133
  new Set(e).size !== e.length && f(n, a, "Duplicate identity.");
134
134
  }
135
135
  const ut = t.object({
@@ -153,13 +153,13 @@ const ut = t.object({
153
153
  pages: t.array(ut).readonly(),
154
154
  blocks: t.array(dt).readonly()
155
155
  }).strict().superRefine((e, n) => {
156
- !e.pages.length && !e.blocks.length && f(n, [], "Request at least one page or block."), T(
156
+ !e.pages.length && !e.blocks.length && f(n, [], "Request at least one page or block."), v(
157
157
  [...e.pages, ...e.blocks].map((a) => a.id),
158
158
  n,
159
159
  []
160
160
  );
161
161
  for (const a of e.blocks) {
162
- T(a.measureIds, n, ["blocks", a.id, "measureIds"]);
162
+ v(a.measureIds, n, ["blocks", a.id, "measureIds"]);
163
163
  for (const r of ["rows", "columns"])
164
164
  for (const s of a[r].pageIds)
165
165
  e.pages.some(
@@ -170,7 +170,7 @@ const ut = t.object({
170
170
  "Page reference must name a page on this axis in this operation."
171
171
  );
172
172
  }
173
- }), pn = t.object({ spec: B, request: he }).strict().superRefine(({ spec: e, request: n }, a) => {
173
+ }), pn = t.object({ spec: G, request: he }).strict().superRefine(({ spec: e, request: n }, a) => {
174
174
  for (const r of n.pages)
175
175
  ee(
176
176
  e,
@@ -213,7 +213,7 @@ const ut = t.object({
213
213
  return (s = r.path[r.path.length - 1]) == null ? void 0 : s.levelId;
214
214
  }
215
215
  )
216
- ).size > 1 && f(n, ["members"], "One page must contain one child level."), T(
216
+ ).size > 1 && f(n, ["members"], "One page must contain one child level."), v(
217
217
  e.members.map((r) => A(r.path)),
218
218
  n,
219
219
  ["members"]
@@ -227,17 +227,17 @@ const ut = t.object({
227
227
  }).strict();
228
228
  function ge(e, n) {
229
229
  const a = e.rowPaths.map(A), r = e.columnPaths.map(A);
230
- return T(a, n, ["coverage", "rowPaths"]), T(r, n, ["coverage", "columnPaths"]), T(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
230
+ return v(a, n, ["coverage", "rowPaths"]), v(r, n, ["coverage", "columnPaths"]), v(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
231
231
  }
232
232
  const pt = t.object({
233
233
  requestId: y,
234
234
  coverage: fe,
235
235
  cells: t.array(
236
- He.extend({ value: $ }).strict()
236
+ Ye.extend({ value: $ }).strict()
237
237
  ).readonly()
238
238
  }).strict().superRefine((e, n) => {
239
239
  const { rows: a, columns: r } = ge(e.coverage, n), s = new Set(a), c = new Set(r), i = new Set(e.coverage.measureIds);
240
- T(
240
+ v(
241
241
  e.cells.map(
242
242
  (l) => JSON.stringify([
243
243
  A(l.rowPath),
@@ -275,7 +275,7 @@ const pt = t.object({
275
275
  }).strict(), ye = t.object({
276
276
  levels: t.array(ne).readonly(),
277
277
  measures: t.array(ne).readonly()
278
- }).strict(), Q = t.object({
278
+ }).strict(), H = t.object({
279
279
  code: t.enum(ct),
280
280
  message: y,
281
281
  /** Technical cause for dashboard owners; never shown as the primary copy. */
@@ -290,7 +290,7 @@ const pt = t.object({
290
290
  ])
291
291
  }).strict(), ft = t.object({
292
292
  dialect: t.enum(["postgres", "clickhouse", "duckdb", "snowflake"]),
293
- aggregates: t.array(Qe).readonly()
293
+ aggregates: t.array(He).readonly()
294
294
  }).strict();
295
295
  function Se(e) {
296
296
  return t.object({
@@ -299,7 +299,7 @@ function Se(e) {
299
299
  capabilities: ft,
300
300
  pages: t.array(mt).readonly(),
301
301
  blocks: t.array(e).readonly(),
302
- failures: t.array(Q).readonly()
302
+ failures: t.array(H).readonly()
303
303
  }).strict().superRefine((n, a) => {
304
304
  const r = new Set(
305
305
  n.descriptors.levels.map((i) => i.id)
@@ -319,17 +319,17 @@ function Se(e) {
319
319
  a,
320
320
  ["descriptors"],
321
321
  "Acquired paths require level descriptors."
322
- ), T(
322
+ ), v(
323
323
  [...n.descriptors.levels, ...n.descriptors.measures].map(
324
324
  (i) => i.id
325
325
  ),
326
326
  a,
327
327
  ["descriptors"]
328
- ), T(
328
+ ), v(
329
329
  [...n.pages, ...n.blocks].map((i) => i.requestId),
330
330
  a,
331
331
  []
332
- ), T(
332
+ ), v(
333
333
  n.failures.map(
334
334
  (i) => i.scope.kind === "operation" ? "operation" : i.scope.requestId
335
335
  ),
@@ -366,7 +366,7 @@ function Ae(e) {
366
366
  status: t.enum(["success", "partial"]),
367
367
  window: e
368
368
  }).strict(),
369
- t.object({ status: t.literal("failed"), failure: Q }).strict()
369
+ t.object({ status: t.literal("failed"), failure: H }).strict()
370
370
  ]).superRefine((n, a) => {
371
371
  const r = n;
372
372
  if (r.status === "failed") return;
@@ -470,7 +470,7 @@ const Ie = t.object({
470
470
  De,
471
471
  qe,
472
472
  Me,
473
- Ge,
473
+ Be,
474
474
  Ie
475
475
  ]), kt = t.object({
476
476
  status: t.enum([
@@ -543,12 +543,12 @@ const Ie = t.object({
543
543
  ).optional()
544
544
  }).passthrough(), ke = t.object({
545
545
  scope: t.literal("filtered_query"),
546
- measures: t.record(Be)
547
- }).passthrough(), Te = t.object({
546
+ measures: t.record(Ge)
547
+ }).passthrough(), ve = t.object({
548
548
  answeredObligations: t.array(t.string()),
549
549
  missingObligations: t.array(t.string()),
550
550
  warnings: t.array(ze).optional()
551
- }).passthrough(), ve = t.object({
551
+ }).passthrough(), Te = t.object({
552
552
  intentId: t.string().optional(),
553
553
  queryId: t.string().optional(),
554
554
  status: t.enum(["answered", "partial", "failed"]),
@@ -566,28 +566,28 @@ const Ie = t.object({
566
566
  fieldsUsed: t.array(Z).optional(),
567
567
  result: wt.optional(),
568
568
  validation: ce,
569
- coverage: Te.optional(),
569
+ coverage: ve.optional(),
570
570
  missingFields: t.array(t.string()).optional(),
571
571
  warnings: t.array(t.string()).optional(),
572
572
  relationshipDiagnostics: kt.optional(),
573
573
  diagnosticFeedback: we.optional(),
574
574
  population: ke.optional(),
575
575
  metadata: t.record(t.string(), t.unknown()).optional()
576
- }).passthrough(), Tt = ve;
577
- function vt(e) {
576
+ }).passthrough(), vt = Te;
577
+ function Tt(e) {
578
578
  switch (e) {
579
579
  case "boolean":
580
580
  return t.boolean().optional();
581
581
  case "compactExecutionFieldArray":
582
582
  return t.array(Ke).optional();
583
583
  case "coverage":
584
- return Te.optional();
584
+ return ve.optional();
585
585
  case "diagnosticFeedback":
586
586
  return we.optional();
587
587
  case "executionFieldArray":
588
588
  return t.array(Z).optional();
589
589
  case "executionResult":
590
- return Tt.optional();
590
+ return vt.optional();
591
591
  case "number":
592
592
  return t.number().finite().optional();
593
593
  case "population":
@@ -611,15 +611,15 @@ function vt(e) {
611
611
  }
612
612
  }
613
613
  const Et = Object.fromEntries(
614
- Object.entries(H).map(
615
- ([e, n]) => [e, vt(n)]
614
+ Object.entries(Y).map(
615
+ ([e, n]) => [e, Tt(n)]
616
616
  )
617
617
  ), Rt = t.object(Et).strict(), Ct = new Set(
618
- Object.keys(H)
618
+ Object.keys(Y)
619
619
  );
620
620
  function bn() {
621
621
  return Object.keys(
622
- H
622
+ Y
623
623
  );
624
624
  }
625
625
  function Nt(e) {
@@ -641,7 +641,7 @@ const Ee = 100, F = "selection:";
641
641
  function Re(e) {
642
642
  return [
643
643
  me(e.source),
644
- Je(e.name),
644
+ Qe(e.name),
645
645
  e.sourceField ?? ""
646
646
  ].join("::");
647
647
  }
@@ -723,7 +723,7 @@ function kn(e, n) {
723
723
  return se(e) === se(n);
724
724
  }
725
725
  const Pt = "(Blank)";
726
- function Tn(e) {
726
+ function vn(e) {
727
727
  return e.conditions.map((n) => n.label ? n.label : n.operator === "isNull" || n.value === null ? Pt : String(n.value)).join(" · ");
728
728
  }
729
729
  const jt = t.union([
@@ -757,7 +757,7 @@ const jt = t.union([
757
757
  message: "A tuple holds one condition per field.",
758
758
  path: ["conditions"]
759
759
  });
760
- }), vn = t.object({
760
+ }), Tn = t.object({
761
761
  kind: t.literal("selection"),
762
762
  sourceCardId: t.string().min(1),
763
763
  tuples: t.array(Ut).min(1).max(Ee)
@@ -779,7 +779,7 @@ const jt = t.union([
779
779
  for (let a = 0; a < e.conditions.length; a += 1) {
780
780
  const r = e.conditions[a];
781
781
  e.conditions.findIndex(
782
- (c, i) => i < a && Ye(c.field, r.field)
782
+ (c, i) => i < a && Je(c.field, r.field)
783
783
  ) !== -1 && n.addIssue({
784
784
  code: t.ZodIssueCode.custom,
785
785
  message: "A selection tuple can contain only one condition per field.",
@@ -789,7 +789,7 @@ const jt = t.union([
789
789
  }), En = t.object({
790
790
  id: t.string().min(1),
791
791
  tuples: t.array(qt).min(1).max(Ee)
792
- }).strict(), Mt = t.object({ key: t.string().min(1), nativeText: t.string().nullable() }).strict(), Gt = t.object({
792
+ }).strict(), Mt = t.object({ key: t.string().min(1), nativeText: t.string().nullable() }).strict(), Bt = t.object({
793
793
  executionInstant: t.string().refine((e) => et(e) !== null, {
794
794
  message: "executionInstant must be an ISO instant"
795
795
  }),
@@ -800,7 +800,7 @@ const jt = t.union([
800
800
  );
801
801
  function Rn(e) {
802
802
  if (e == null) return;
803
- const n = Gt.safeParse(e);
803
+ const n = Bt.safeParse(e);
804
804
  return n.success ? n.data : void 0;
805
805
  }
806
806
  const Oe = {
@@ -867,10 +867,10 @@ const Oe = {
867
867
  COLLECT_SET: "other",
868
868
  FIRST: "other",
869
869
  LAST: "other"
870
- }, Bt = /(?:_AGG$|^APPROX_[A-Z0-9_]+$|^COUNT_DISTINCT$|^HLL_(?:COUNT|ESTIMATE)$|^REGR_[A-Z_]+$)/;
870
+ }, Gt = /(?:_AGG$|^APPROX_[A-Z0-9_]+$|^COUNT_DISTINCT$|^HLL_(?:COUNT|ESTIMATE)$|^REGR_[A-Z_]+$)/;
871
871
  function zt(e) {
872
872
  const n = e.toUpperCase();
873
- return n in Oe || Bt.test(n);
873
+ return n in Oe || Gt.test(n);
874
874
  }
875
875
  function xe(e, n = !1) {
876
876
  const a = Oe[e.toUpperCase()] ?? "other";
@@ -959,12 +959,12 @@ function W(e, n = /* @__PURE__ */ new Set()) {
959
959
  let g = P(e, p);
960
960
  const I = g - 1;
961
961
  let R = g;
962
- const v = e.slice(p + 1, g - 1);
963
- let x = v.trim() ? 1 : 0;
962
+ const T = e.slice(p + 1, g - 1);
963
+ let x = T.trim() ? 1 : 0;
964
964
  for (let h = p + 1; h < R - 1; h++)
965
965
  e[h] === "'" || e[h] === '"' ? h = V(e, h) - 1 : e[h] === "(" ? h = P(e, h) - 1 : e[h] === "," && x++;
966
- const C = /^\s*DISTINCT\b/i.test(v);
967
- W(C ? v.replace(/^\s*DISTINCT\b/i, "") : v).calls.length > 0 && (s = !0);
966
+ const C = /^\s*DISTINCT\b/i.test(T);
967
+ W(C ? T.replace(/^\s*DISTINCT\b/i, "") : T).calls.length > 0 && (s = !0);
968
968
  let b = !1, _ = !1;
969
969
  for (; ; ) {
970
970
  const h = j(e, g);
@@ -1054,7 +1054,7 @@ function $t(e, n) {
1054
1054
  };
1055
1055
  return i() && s === a.length;
1056
1056
  }
1057
- function Ht(e) {
1057
+ function Yt(e) {
1058
1058
  const n = [];
1059
1059
  let a = 0;
1060
1060
  for (; a < e.length; ) {
@@ -1098,8 +1098,8 @@ function Ht(e) {
1098
1098
  }
1099
1099
  return n;
1100
1100
  }
1101
- function Qt(e) {
1102
- const n = Ht(e), a = n.some((o) => o.type === "op" && o.value === "/");
1101
+ function Ht(e) {
1102
+ const n = Yt(e), a = n.some((o) => o.type === "op" && o.value === "/");
1103
1103
  if (n.some((o) => o.type === "other"))
1104
1104
  return { kind: "other", hasDivision: a };
1105
1105
  let r = 0, s = !0;
@@ -1175,11 +1175,11 @@ function je(e) {
1175
1175
  return { kind: "none", reason: "other" };
1176
1176
  }
1177
1177
  }
1178
- function Yt(e) {
1178
+ function Jt(e) {
1179
1179
  var n, a;
1180
1180
  return ((n = e.derivedField) == null ? void 0 : n.computeStage) || ((a = e.calculatedFormula) == null ? void 0 : a.computeStage);
1181
1181
  }
1182
- const Y = {
1182
+ const J = {
1183
1183
  stage: "aggregate",
1184
1184
  calls: [],
1185
1185
  windowed: !1,
@@ -1188,7 +1188,7 @@ const Y = {
1188
1188
  outputType: "numeric",
1189
1189
  identity: "unresolved",
1190
1190
  unresolved: !0
1191
- }, Fe = { ...Y, stage: "row" };
1191
+ }, Fe = { ...J, stage: "row" };
1192
1192
  function X(e) {
1193
1193
  return {
1194
1194
  stage: "row",
@@ -1202,27 +1202,27 @@ function X(e) {
1202
1202
  unresolved: !1
1203
1203
  };
1204
1204
  }
1205
- function G(e, n) {
1205
+ function B(e, n) {
1206
1206
  var r;
1207
1207
  const a = (r = n.derivedField) == null ? void 0 : r.aggregationBehavior;
1208
1208
  return !a || e.unresolved ? e : a === "additive" ? e.reaggregation.kind === "additive" ? e : { ...e, reaggregation: { kind: "additive" } } : { ...e, reaggregation: { kind: "none", reason: "declared" } };
1209
1209
  }
1210
- function Jt(e, n) {
1211
- if (!e) return Y;
1210
+ function Qt(e, n) {
1211
+ if (!e) return J;
1212
1212
  if (typeof e.expression == "string" && e.expression.trim()) {
1213
- const r = J(e, n + 1);
1213
+ const r = Q(e, n + 1);
1214
1214
  return r === "row_input" ? "raw" : r.unresolved || r.stage === "aggregate" || r.outer ? r : "raw";
1215
1215
  }
1216
1216
  const a = K(e.aggregate);
1217
1217
  return a ? X(a) : "raw";
1218
1218
  }
1219
1219
  const en = 12;
1220
- function J(e, n) {
1220
+ function Q(e, n) {
1221
1221
  var E;
1222
- if (n > en) return Y;
1222
+ if (n > en) return J;
1223
1223
  const a = typeof e.expression == "string" ? e.expression.trim() : "";
1224
1224
  if (!a)
1225
- return G(
1225
+ return B(
1226
1226
  X(K(e.aggregate) ?? "sum"),
1227
1227
  e
1228
1228
  );
@@ -1231,17 +1231,17 @@ function J(e, n) {
1231
1231
  return S ? s[Number(S[1])] : void 0;
1232
1232
  }, i = /* @__PURE__ */ new Map();
1233
1233
  for (const u of r.tokensOutsideAggregates)
1234
- i.has(u) || i.set(u, Jt(c(u), n));
1234
+ i.has(u) || i.set(u, Qt(c(u), n));
1235
1235
  const l = r.calls.some(
1236
1236
  (u) => u.tokens.some((S) => {
1237
1237
  const w = c(S);
1238
1238
  if (!(w != null && w.expression)) return !1;
1239
- const L = J(w, n + 1);
1239
+ const L = Q(w, n + 1);
1240
1240
  return L !== "row_input" && (L.unresolved || L.stage === "aggregate");
1241
1241
  })
1242
1242
  ), m = Array.from(i.values()).filter(
1243
1243
  (u) => u !== "raw"
1244
- ), o = Array.from(i.values()).some((u) => u === "raw"), d = r.calls.length > 0 || m.length > 0 || Yt(e) === "aggregate" || !!e.isPreAggregated, p = new Set(
1244
+ ), o = Array.from(i.values()).some((u) => u === "raw"), d = r.calls.length > 0 || m.length > 0 || Jt(e) === "aggregate" || !!e.isPreAggregated, p = new Set(
1245
1245
  [...i].filter(
1246
1246
  ([u, S]) => S === "raw" ? !d && !!c(u) : !S.unresolved
1247
1247
  ).map(([u]) => u)
@@ -1249,23 +1249,23 @@ function J(e, n) {
1249
1249
  if (!d) {
1250
1250
  if (!g) return Fe;
1251
1251
  const u = K(e.aggregate);
1252
- return u ? G(X(u), e) : "row_input";
1252
+ return u ? B(X(u), e) : "row_input";
1253
1253
  }
1254
1254
  const I = !g || o || r.nestedAggregate || l || m.some((u) => u.unresolved) || r.calls.length === 0 && m.length === 0, R = [
1255
1255
  ...r.calls.map((u) => ({ kind: u.kind, distinct: u.distinct })),
1256
1256
  ...m.flatMap((u) => u.calls)
1257
- ], v = r.windowed || m.some((u) => u.windowed), x = !I && !v && R.every((u) => Pe.has(u.kind)), C = (u) => {
1257
+ ], T = r.windowed || m.some((u) => u.windowed), x = !I && !T && R.every((u) => Pe.has(u.kind)), C = (u) => {
1258
1258
  if (u.kind === "call") {
1259
1259
  const w = r.calls[u.index];
1260
1260
  return w ? je(w.kind) : { kind: "none", reason: "unresolved" };
1261
1261
  }
1262
1262
  const S = i.get(u.token);
1263
1263
  return S && S !== "raw" ? S.reaggregation : { kind: "none", reason: "unresolved" };
1264
- }, b = Qt(r.skeleton);
1264
+ }, b = Ht(r.skeleton);
1265
1265
  let _, h, N = "numeric";
1266
1266
  if (I)
1267
1267
  _ = { kind: "none", reason: "unresolved" }, h = "unresolved";
1268
- else if (v)
1268
+ else if (T)
1269
1269
  _ = { kind: "none", reason: "window" }, h = "expression";
1270
1270
  else if (b.kind === "single")
1271
1271
  if (_ = C(b.unit), b.unit.kind === "call") {
@@ -1276,11 +1276,11 @@ function J(e, n) {
1276
1276
  h = u.identity, N = u.outputType;
1277
1277
  }
1278
1278
  else b.kind === "linear" ? (_ = b.units.every((S) => C(S).kind === "additive") ? { kind: "additive" } : { kind: "none", reason: "other" }, h = "linear") : (_ = { kind: "none", reason: b.hasDivision ? "ratio" : "other" }, h = b.hasDivision ? "ratio" : "expression");
1279
- return G(
1279
+ return B(
1280
1280
  {
1281
1281
  stage: "aggregate",
1282
1282
  calls: R,
1283
- windowed: v,
1283
+ windowed: T,
1284
1284
  repeatSafe: x,
1285
1285
  reaggregation: _,
1286
1286
  outputType: N,
@@ -1291,7 +1291,7 @@ function J(e, n) {
1291
1291
  );
1292
1292
  }
1293
1293
  function tn(e) {
1294
- const n = J(e, 0);
1294
+ const n = Q(e, 0);
1295
1295
  return n === "row_input" ? Fe : n;
1296
1296
  }
1297
1297
  function Cn(e) {
@@ -1304,8 +1304,8 @@ const nn = t.object({
1304
1304
  intent: nt,
1305
1305
  matrixWindowRequest: he
1306
1306
  }).strict(), an = t.object({
1307
- runtimeFilters: B.innerType().shape.filters,
1308
- runtimeSorts: B.innerType().shape.sorts.optional()
1307
+ runtimeFilters: G.innerType().shape.filters,
1308
+ runtimeSorts: G.innerType().shape.sorts.optional()
1309
1309
  });
1310
1310
  function Nn(e) {
1311
1311
  return an.parse(e);
@@ -1316,46 +1316,46 @@ const rn = {
1316
1316
  intent: nn.shape.intent,
1317
1317
  resultShape: t.literal("matrix"),
1318
1318
  result: Ie.optional(),
1319
- metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: Q.optional() }).passthrough()
1320
- }, sn = ve.extend(rn), On = sn.superRefine((e, n) => {
1319
+ metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: H.optional() }).passthrough()
1320
+ }, sn = Te.extend(rn), On = sn.superRefine((e, n) => {
1321
1321
  e.status === "failed" == !!e.result && n.addIssue({ code: "custom", message: "Only answered or partial Matrix execution carries a window." }), e.result && e.status === "partial" != e.result.window.failures.length > 0 && n.addIssue({ code: "custom", message: "Matrix execution status must match acquired window failures." });
1322
1322
  });
1323
1323
  export {
1324
- dt as $,
1325
- oe as A,
1326
- kn as B,
1327
- Tn as C,
1328
- Ft as D,
1329
- Lt as E,
1330
- Ut as F,
1331
- vn as G,
1332
- Dt as H,
1333
- qt as I,
1334
- Gt as J,
1335
- Rn as K,
1336
- zt as L,
1337
- xe as M,
1338
- W as N,
1339
- Qt as O,
1340
- tn as P,
1341
- Cn as Q,
1342
- pe as R,
1343
- Ee as S,
1344
- st as T,
1345
- ot as U,
1346
- un as V,
1347
- dn as W,
1348
- ct as X,
1349
- mn as Y,
1350
- ut as Z,
1351
- te as _,
1352
- En as a,
1324
+ he as $,
1325
+ vn as A,
1326
+ Ft as B,
1327
+ Lt as C,
1328
+ Ut as D,
1329
+ Tn as E,
1330
+ Dt as F,
1331
+ qt as G,
1332
+ En as H,
1333
+ Bt as I,
1334
+ Rn as J,
1335
+ zt as K,
1336
+ xe as L,
1337
+ W as M,
1338
+ Ht as N,
1339
+ tn as O,
1340
+ Cn as P,
1341
+ pe as Q,
1342
+ st as R,
1343
+ Y as S,
1344
+ ot as T,
1345
+ un as U,
1346
+ dn as V,
1347
+ ct as W,
1348
+ mn as X,
1349
+ ut as Y,
1350
+ te as Z,
1351
+ dt as _,
1352
+ kt as a,
1353
1353
  pn as a0,
1354
1354
  mt as a1,
1355
1355
  pt as a2,
1356
1356
  ht as a3,
1357
1357
  ne as a4,
1358
- Q as a5,
1358
+ H as a5,
1359
1359
  ft as a6,
1360
1360
  be as a7,
1361
1361
  gt as a8,
@@ -1375,29 +1375,29 @@ export {
1375
1375
  Nn as am,
1376
1376
  On as an,
1377
1377
  nn as ao,
1378
- H as b,
1379
- wn as c,
1380
- wt as d,
1381
- kt as e,
1382
- we as f,
1378
+ we as b,
1379
+ ke as c,
1380
+ ve as d,
1381
+ Te as e,
1382
+ vt as f,
1383
1383
  bn as g,
1384
- ke as h,
1384
+ Et as h,
1385
1385
  Nt as i,
1386
- Te as j,
1387
- ve as k,
1388
- Tt as l,
1389
- he as m,
1390
- Et as n,
1391
- Rt as o,
1386
+ Rt as j,
1387
+ Ee as k,
1388
+ Re as l,
1389
+ Ie as m,
1390
+ In as n,
1391
+ Ot as o,
1392
1392
  An as p,
1393
- Ie as q,
1394
- Re as r,
1395
- se as s,
1396
- In as t,
1397
- Ot as u,
1398
- _n as v,
1399
- Ce as w,
1400
- Ne as x,
1401
- xt as y,
1402
- z
1393
+ _n as q,
1394
+ Ne as r,
1395
+ wt as s,
1396
+ Ce as t,
1397
+ xt as u,
1398
+ se as v,
1399
+ z as w,
1400
+ oe as x,
1401
+ wn as y,
1402
+ kn as z
1403
1403
  };