react-semaphor 0.1.559 → 0.1.560
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.
- package/dist/analytics-protocol/index.js +368 -361
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/analytics-base-schemas-CHLxsPfX.js +630 -0
- package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-Bu2fFm_I.js} +206 -207
- package/dist/chunks/{bookmark-state-ssqrs5oP.js → bookmark-state-BFY9oNmr.js} +3 -3
- package/dist/chunks/{braces-Rdxa3H-s.js → braces-Da41xfUd.js} +1 -1
- package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-4FNkMrzE.js} +166 -166
- package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
- package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-_MeBuy67.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
- package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-Bi7fyG-4.js} +98 -98
- package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-B1mU_OMa.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-ChVkcBuu.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
- package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-0CJN31Y3.js} +8375 -8615
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
- package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-CRC-K_l_.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-DBzEOX9M.js → global-date-filter-utils-D8365uPH.js} +4068 -3401
- package/dist/chunks/{index-B1Xr7W24.js → index-DtHidOPV.js} +579 -604
- package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-BvsH4RY2.js} +1 -1
- package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-Dg0otx5E.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-CM18W8w6.js} +4 -4
- package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-HPskLaPy.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-WPv4R-H_.js} +110 -110
- package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-ljMKYZKa.js} +2 -2
- package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
- package/dist/chunks/{palette-DMJtp3Vn.js → palette-Bsh376zO.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DOYhqeZb.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
- package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-vS9TSh4f.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-BmT7z6NH.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
- package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
- package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-BZQh9ywy.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-B_C_VAJH.js → resolve-dashboard-input-context-CAMiWvyR.js} +1749 -1989
- package/dist/chunks/{save-DSb1jTtG.js → save-B5EAsgQF.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
- package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-D0YnaAD9.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-XLBLOJ2V.js} +38374 -39104
- package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
- package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-dUG5VWRm.js} +1 -1
- package/dist/chunks/{switch-Dq8XPFpT.js → switch-ByxH4M7t.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-C_GdeTYU.js} +1 -1
- package/dist/chunks/{table-settings-DXj_zXwS.js → table-settings-Imz0FgWi.js} +6 -6
- package/dist/chunks/{temporal-input-presentation-AhLSkGPf.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
- package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-CQtXUVMy.js} +1 -1
- package/dist/chunks/{upload-Dr_WAxHQ.js → upload-wbR-NVzq.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
- package/dist/chunks/{validators-C87JPd-_.js → validators-CXTneCA4.js} +1206 -1579
- package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2207 -1497
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +181 -176
- package/dist/index.js +22 -22
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
- package/dist/types/index.js +6 -6
- package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/editor-store.d.ts +39 -9
- package/dist/types/lib/stores/table-actions.d.ts +9 -3
- package/dist/types/lib/table-formatting/index.d.ts +0 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
- package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
- package/dist/types/lib/types/common-types.d.ts +40 -47
- package/dist/types/lib/types/explorer-types.d.ts +11 -43
- package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
- package/dist/types/lib/utils/card-definition.d.ts +9 -187
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
- package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
- package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
- package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
- package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
- package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
- package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
- package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
- package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
- package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
- package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
- package/package.json +1 -1
- package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
- package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
- package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
- package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-WPv4R-H_.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { R as w, K as ue, Y as
|
|
4
|
-
const
|
|
2
|
+
import { x as je, H as Fe, N as Le, P as Ue, V as qe, W as De, s as U, F as Z, n as Me, K as Ge, L as ce, g as Be, r as ze, G as Ve, y as We, z as Ke, b as le, C as Xe } from "./analytics-base-schemas-CHLxsPfX.js";
|
|
3
|
+
import { R as w, K as ue, Y as B, a_ as ee, t as A, S as Ze, aU as $, M as $e, s as He, H as de, ag as Ye, r as Qe, m as Je } from "./validators-CXTneCA4.js";
|
|
4
|
+
const H = {
|
|
5
5
|
answerSummary: "string",
|
|
6
6
|
responseDetail: "responseDetail",
|
|
7
7
|
mode: "string",
|
|
@@ -126,11 +126,11 @@ const st = [
|
|
|
126
126
|
coordinates: 2e4,
|
|
127
127
|
responseBytes: 5 * 1024 * 1024
|
|
128
128
|
}), O = t.string().uuid(), y = t.string().min(1), ot = t.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
129
|
-
function
|
|
129
|
+
function g(e, n, a) {
|
|
130
130
|
e.addIssue({ code: "custom", path: n, message: a });
|
|
131
131
|
}
|
|
132
132
|
function v(e, n, a) {
|
|
133
|
-
new Set(e).size !== e.length &&
|
|
133
|
+
new Set(e).size !== e.length && g(n, a, "Duplicate identity.");
|
|
134
134
|
}
|
|
135
135
|
const it = t.object({
|
|
136
136
|
id: y,
|
|
@@ -153,7 +153,7 @@ const it = t.object({
|
|
|
153
153
|
pages: t.array(it).readonly(),
|
|
154
154
|
blocks: t.array(ct).readonly()
|
|
155
155
|
}).strict().superRefine((e, n) => {
|
|
156
|
-
!e.pages.length && !e.blocks.length &&
|
|
156
|
+
!e.pages.length && !e.blocks.length && g(n, [], "Request at least one page or block."), v(
|
|
157
157
|
[...e.pages, ...e.blocks].map((a) => a.id),
|
|
158
158
|
n,
|
|
159
159
|
[]
|
|
@@ -164,13 +164,13 @@ const it = t.object({
|
|
|
164
164
|
for (const s of a[r].pageIds)
|
|
165
165
|
e.pages.some(
|
|
166
166
|
(c) => c.id === s && c.axis === r
|
|
167
|
-
) ||
|
|
167
|
+
) || g(
|
|
168
168
|
n,
|
|
169
169
|
["blocks", a.id, r],
|
|
170
170
|
"Page reference must name a page on this axis in this operation."
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
|
-
}), ln = t.object({ spec:
|
|
173
|
+
}), ln = t.object({ spec: B, request: pe }).strict().superRefine(({ spec: e, request: n }, a) => {
|
|
174
174
|
for (const r of n.pages)
|
|
175
175
|
ee(
|
|
176
176
|
e,
|
|
@@ -179,13 +179,13 @@ const it = t.object({
|
|
|
179
179
|
a,
|
|
180
180
|
["pages", r.id],
|
|
181
181
|
!0
|
|
182
|
-
), r.parent.length >= e[r.axis].length &&
|
|
182
|
+
), r.parent.length >= e[r.axis].length && g(
|
|
183
183
|
a,
|
|
184
184
|
["pages", r.id],
|
|
185
185
|
"Cannot request children of a leaf or empty axis."
|
|
186
186
|
);
|
|
187
187
|
for (const r of n.blocks) {
|
|
188
|
-
r.measureIds.some((s) => !e.measures.some((c) => c.id === s)) &&
|
|
188
|
+
r.measureIds.some((s) => !e.measures.some((c) => c.id === s)) && g(a, ["blocks", r.id], "Unknown block measure.");
|
|
189
189
|
for (const s of ["rows", "columns"])
|
|
190
190
|
for (const c of r[s].paths)
|
|
191
191
|
ee(e, s, c, a, ["blocks", r.id, s]);
|
|
@@ -199,33 +199,33 @@ const it = t.object({
|
|
|
199
199
|
after: y.nullable(),
|
|
200
200
|
exactCount: t.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).optional()
|
|
201
201
|
}).strict().superRefine((e, n) => {
|
|
202
|
-
e.parent.some((r) => r.member.kind === "others") &&
|
|
202
|
+
e.parent.some((r) => r.member.kind === "others") && g(n, ["parent"], "Others has no children.");
|
|
203
203
|
const a = e.members.filter(
|
|
204
204
|
({ path: r }) => {
|
|
205
205
|
var s;
|
|
206
206
|
return ((s = r[r.length - 1]) == null ? void 0 : s.member.kind) === "others";
|
|
207
207
|
}
|
|
208
208
|
);
|
|
209
|
-
a.length > 1 &&
|
|
209
|
+
a.length > 1 && g(n, ["members"], "A page may contain Others only once."), a.length && (e.members[e.members.length - 1] !== a[0] && g(n, ["members"], "Others must be the last page member."), e.after !== null && g(n, ["after"], "Others must end the branch.")), new Set(
|
|
210
210
|
e.members.map(
|
|
211
211
|
(r) => {
|
|
212
212
|
var s;
|
|
213
213
|
return (s = r.path[r.path.length - 1]) == null ? void 0 : s.levelId;
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
|
-
).size > 1 &&
|
|
216
|
+
).size > 1 && g(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"]
|
|
220
220
|
);
|
|
221
221
|
for (const r of e.members)
|
|
222
|
-
(r.path.length !== e.parent.length + 1 || A(r.path.slice(0, -1)) !== A(e.parent)) &&
|
|
222
|
+
(r.path.length !== e.parent.length + 1 || A(r.path.slice(0, -1)) !== A(e.parent)) && g(n, ["members"], "Page members must be immediate children.");
|
|
223
223
|
}), he = t.object({
|
|
224
224
|
rowPaths: t.array(w).readonly(),
|
|
225
225
|
columnPaths: t.array(w).readonly(),
|
|
226
226
|
measureIds: t.array(O).readonly()
|
|
227
227
|
}).strict();
|
|
228
|
-
function
|
|
228
|
+
function ge(e, n) {
|
|
229
229
|
const a = e.rowPaths.map(A), r = e.columnPaths.map(A);
|
|
230
230
|
return v(a, n, ["coverage", "rowPaths"]), v(r, n, ["coverage", "columnPaths"]), v(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
|
|
231
231
|
}
|
|
@@ -233,10 +233,10 @@ const ut = t.object({
|
|
|
233
233
|
requestId: y,
|
|
234
234
|
coverage: he,
|
|
235
235
|
cells: t.array(
|
|
236
|
-
|
|
236
|
+
Ze.extend({ value: $ }).strict()
|
|
237
237
|
).readonly()
|
|
238
238
|
}).strict().superRefine((e, n) => {
|
|
239
|
-
const { rows: a, columns: r } =
|
|
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
240
|
v(
|
|
241
241
|
e.cells.map(
|
|
242
242
|
(l) => JSON.stringify([
|
|
@@ -249,33 +249,33 @@ const ut = t.object({
|
|
|
249
249
|
["cells"]
|
|
250
250
|
);
|
|
251
251
|
for (const l of e.cells)
|
|
252
|
-
(!s.has(A(l.rowPath)) || !c.has(A(l.columnPath)) || !i.has(l.measureId)) &&
|
|
252
|
+
(!s.has(A(l.rowPath)) || !c.has(A(l.columnPath)) || !i.has(l.measureId)) && g(n, ["cells"], "Cell is outside certified coverage.");
|
|
253
253
|
}), q = t.number().int().nonnegative(), dt = t.object({
|
|
254
254
|
requestId: y,
|
|
255
255
|
coverage: he,
|
|
256
256
|
values: t.array(
|
|
257
|
-
t.tuple([q, q, q,
|
|
257
|
+
t.tuple([q, q, q, $]).readonly()
|
|
258
258
|
).readonly()
|
|
259
259
|
}).strict().superRefine((e, n) => {
|
|
260
|
-
|
|
260
|
+
ge(e.coverage, n);
|
|
261
261
|
const { rowPaths: a, columnPaths: r, measureIds: s } = e.coverage, c = /* @__PURE__ */ new Set();
|
|
262
262
|
for (const [i, l, m] of e.values) {
|
|
263
263
|
if (i >= a.length || l >= r.length || m >= s.length) {
|
|
264
|
-
|
|
264
|
+
g(n, ["values"], "Cell is outside certified coverage.");
|
|
265
265
|
continue;
|
|
266
266
|
}
|
|
267
267
|
const o = `${i},${l},${m}`;
|
|
268
|
-
c.has(o) &&
|
|
268
|
+
c.has(o) && g(n, ["values"], "Duplicate identity."), c.add(o);
|
|
269
269
|
}
|
|
270
270
|
}), ne = t.object({
|
|
271
271
|
id: O,
|
|
272
|
-
column:
|
|
272
|
+
column: Fe,
|
|
273
273
|
nativeDataType: y,
|
|
274
|
-
semanticFormat:
|
|
275
|
-
}).strict(),
|
|
274
|
+
semanticFormat: je.optional()
|
|
275
|
+
}).strict(), fe = t.object({
|
|
276
276
|
levels: t.array(ne).readonly(),
|
|
277
277
|
measures: t.array(ne).readonly()
|
|
278
|
-
}).strict(),
|
|
278
|
+
}).strict(), Y = t.object({
|
|
279
279
|
code: t.enum(st),
|
|
280
280
|
message: y,
|
|
281
281
|
/** Technical cause for dashboard owners; never shown as the primary copy. */
|
|
@@ -290,16 +290,16 @@ const ut = t.object({
|
|
|
290
290
|
])
|
|
291
291
|
}).strict(), mt = t.object({
|
|
292
292
|
dialect: t.enum(["postgres", "clickhouse", "duckdb", "snowflake"]),
|
|
293
|
-
aggregates: t.array(
|
|
293
|
+
aggregates: t.array($e).readonly()
|
|
294
294
|
}).strict();
|
|
295
295
|
function ye(e) {
|
|
296
296
|
return t.object({
|
|
297
297
|
queryIdentity: y,
|
|
298
|
-
descriptors:
|
|
298
|
+
descriptors: fe,
|
|
299
299
|
capabilities: mt,
|
|
300
300
|
pages: t.array(lt).readonly(),
|
|
301
301
|
blocks: t.array(e).readonly(),
|
|
302
|
-
failures: t.array(
|
|
302
|
+
failures: t.array(Y).readonly()
|
|
303
303
|
}).strict().superRefine((n, a) => {
|
|
304
304
|
const r = new Set(
|
|
305
305
|
n.descriptors.levels.map((i) => i.id)
|
|
@@ -310,12 +310,12 @@ function ye(e) {
|
|
|
310
310
|
...i.members.map((l) => l.path)
|
|
311
311
|
]);
|
|
312
312
|
for (const i of n.blocks)
|
|
313
|
-
c.push(...i.coverage.rowPaths, ...i.coverage.columnPaths), i.coverage.measureIds.some((l) => !s.has(l)) &&
|
|
313
|
+
c.push(...i.coverage.rowPaths, ...i.coverage.columnPaths), i.coverage.measureIds.some((l) => !s.has(l)) && g(
|
|
314
314
|
a,
|
|
315
315
|
["blocks", i.requestId],
|
|
316
316
|
"Coverage references an unknown measure descriptor."
|
|
317
317
|
);
|
|
318
|
-
c.some((i) => i.some((l) => !r.has(l.levelId))) &&
|
|
318
|
+
c.some((i) => i.some((l) => !r.has(l.levelId))) && g(
|
|
319
319
|
a,
|
|
320
320
|
["descriptors"],
|
|
321
321
|
"Acquired paths require level descriptors."
|
|
@@ -338,7 +338,7 @@ function ye(e) {
|
|
|
338
338
|
);
|
|
339
339
|
for (const i of n.failures)
|
|
340
340
|
if (i.scope.kind === "operation")
|
|
341
|
-
|
|
341
|
+
g(
|
|
342
342
|
a,
|
|
343
343
|
["failures"],
|
|
344
344
|
"Operation failure cannot accompany acquired data."
|
|
@@ -347,7 +347,7 @@ function ye(e) {
|
|
|
347
347
|
const l = i.scope.requestId;
|
|
348
348
|
[...n.pages, ...n.blocks].some(
|
|
349
349
|
(m) => m.requestId === l
|
|
350
|
-
) &&
|
|
350
|
+
) && g(
|
|
351
351
|
a,
|
|
352
352
|
["failures"],
|
|
353
353
|
"A requested unit cannot both succeed and fail."
|
|
@@ -366,16 +366,16 @@ function be(e) {
|
|
|
366
366
|
status: t.enum(["success", "partial"]),
|
|
367
367
|
window: e
|
|
368
368
|
}).strict(),
|
|
369
|
-
t.object({ status: t.literal("failed"), failure:
|
|
369
|
+
t.object({ status: t.literal("failed"), failure: Y }).strict()
|
|
370
370
|
]).superRefine((n, a) => {
|
|
371
371
|
const r = n;
|
|
372
372
|
if (r.status === "failed") return;
|
|
373
373
|
const { window: s } = r;
|
|
374
|
-
!s.pages.length && !s.blocks.length &&
|
|
374
|
+
!s.pages.length && !s.blocks.length && g(
|
|
375
375
|
a,
|
|
376
376
|
["window"],
|
|
377
377
|
"A window outcome requires successful acquired work."
|
|
378
|
-
), r.status === "success" != (s.failures.length === 0) &&
|
|
378
|
+
), r.status === "success" != (s.failures.length === 0) && g(a, ["status"], "Status must match failure coverage.");
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
const un = be(
|
|
@@ -396,7 +396,7 @@ function ht(e) {
|
|
|
396
396
|
})
|
|
397
397
|
};
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function gt(e) {
|
|
400
400
|
const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage;
|
|
401
401
|
return {
|
|
402
402
|
requestId: e.requestId,
|
|
@@ -409,14 +409,14 @@ function ft(e) {
|
|
|
409
409
|
}))
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function ft(e) {
|
|
413
413
|
return { ...e, blocks: e.blocks.map(ht) };
|
|
414
414
|
}
|
|
415
415
|
function mn(e) {
|
|
416
|
-
return { ...e, blocks: e.blocks.map(
|
|
416
|
+
return { ...e, blocks: e.blocks.map(gt) };
|
|
417
417
|
}
|
|
418
418
|
function pn(e) {
|
|
419
|
-
return e.status === "failed" ? e : { status: e.status, window:
|
|
419
|
+
return e.status === "failed" ? e : { status: e.status, window: ft(e.window) };
|
|
420
420
|
}
|
|
421
421
|
const Ae = t.object({
|
|
422
422
|
kind: t.literal("matrix"),
|
|
@@ -433,11 +433,11 @@ const Ae = t.object({
|
|
|
433
433
|
}).strict()
|
|
434
434
|
]), St = t.object({
|
|
435
435
|
columns: t.array(yt).readonly(),
|
|
436
|
-
descriptors:
|
|
436
|
+
descriptors: fe
|
|
437
437
|
}).strict(), ae = t.union([
|
|
438
438
|
t.object({
|
|
439
439
|
kind: t.literal("value"),
|
|
440
|
-
value:
|
|
440
|
+
value: $.refine(
|
|
441
441
|
(e) => e !== null
|
|
442
442
|
)
|
|
443
443
|
}).strict(),
|
|
@@ -467,10 +467,10 @@ const Ae = t.object({
|
|
|
467
467
|
next: y.nullable()
|
|
468
468
|
}).strict()
|
|
469
469
|
]), At = t.union([
|
|
470
|
-
Fe,
|
|
471
470
|
Le,
|
|
472
471
|
Ue,
|
|
473
472
|
qe,
|
|
473
|
+
De,
|
|
474
474
|
Ae
|
|
475
475
|
]), It = t.object({
|
|
476
476
|
status: t.enum([
|
|
@@ -516,7 +516,7 @@ const Ae = t.object({
|
|
|
516
516
|
queryId: t.string().optional(),
|
|
517
517
|
summary: t.string(),
|
|
518
518
|
evidenceIds: t.array(t.string()).optional(),
|
|
519
|
-
fieldsUsed: t.array(
|
|
519
|
+
fieldsUsed: t.array(Z).optional()
|
|
520
520
|
}).passthrough()
|
|
521
521
|
),
|
|
522
522
|
blocked: t.array(
|
|
@@ -543,11 +543,11 @@ const Ae = t.object({
|
|
|
543
543
|
).optional()
|
|
544
544
|
}).passthrough(), ke = t.object({
|
|
545
545
|
scope: t.literal("filtered_query"),
|
|
546
|
-
measures: t.record(
|
|
546
|
+
measures: t.record(Me)
|
|
547
547
|
}).passthrough(), we = t.object({
|
|
548
548
|
answeredObligations: t.array(t.string()),
|
|
549
549
|
missingObligations: t.array(t.string()),
|
|
550
|
-
warnings: t.array(
|
|
550
|
+
warnings: t.array(Ge).optional()
|
|
551
551
|
}).passthrough(), ve = t.object({
|
|
552
552
|
intentId: t.string().optional(),
|
|
553
553
|
queryId: t.string().optional(),
|
|
@@ -563,7 +563,7 @@ const Ae = t.object({
|
|
|
563
563
|
]).optional(),
|
|
564
564
|
intent: t.unknown().optional(),
|
|
565
565
|
compiledQuery: t.unknown().optional(),
|
|
566
|
-
fieldsUsed: t.array(
|
|
566
|
+
fieldsUsed: t.array(Z).optional(),
|
|
567
567
|
result: At.optional(),
|
|
568
568
|
validation: ce,
|
|
569
569
|
coverage: we.optional(),
|
|
@@ -579,13 +579,13 @@ function kt(e) {
|
|
|
579
579
|
case "boolean":
|
|
580
580
|
return t.boolean().optional();
|
|
581
581
|
case "compactExecutionFieldArray":
|
|
582
|
-
return t.array(
|
|
582
|
+
return t.array(Ve).optional();
|
|
583
583
|
case "coverage":
|
|
584
584
|
return we.optional();
|
|
585
585
|
case "diagnosticFeedback":
|
|
586
586
|
return _e.optional();
|
|
587
587
|
case "executionFieldArray":
|
|
588
|
-
return t.array(
|
|
588
|
+
return t.array(Z).optional();
|
|
589
589
|
case "executionResult":
|
|
590
590
|
return _t.optional();
|
|
591
591
|
case "number":
|
|
@@ -593,7 +593,7 @@ function kt(e) {
|
|
|
593
593
|
case "population":
|
|
594
594
|
return ke.optional();
|
|
595
595
|
case "record":
|
|
596
|
-
return
|
|
596
|
+
return ze.optional();
|
|
597
597
|
case "recordArray":
|
|
598
598
|
return Be.optional();
|
|
599
599
|
case "responseDetail":
|
|
@@ -611,21 +611,21 @@ function kt(e) {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
const wt = Object.fromEntries(
|
|
614
|
-
Object.entries(
|
|
614
|
+
Object.entries(H).map(
|
|
615
615
|
([e, n]) => [e, kt(n)]
|
|
616
616
|
)
|
|
617
617
|
), vt = t.object(wt).strict(), Tt = new Set(
|
|
618
|
-
Object.keys(
|
|
618
|
+
Object.keys(H)
|
|
619
619
|
);
|
|
620
|
-
function
|
|
620
|
+
function gn() {
|
|
621
621
|
return Object.keys(
|
|
622
|
-
|
|
622
|
+
H
|
|
623
623
|
);
|
|
624
624
|
}
|
|
625
625
|
function Et(e) {
|
|
626
626
|
return Tt.has(e);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function fn(e) {
|
|
629
629
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
630
630
|
throw new Error("Semaphor analyze result must be an object.");
|
|
631
631
|
const a = Object.keys(e).filter(
|
|
@@ -641,7 +641,7 @@ const Te = 100, F = "selection:";
|
|
|
641
641
|
function Ee(e) {
|
|
642
642
|
return [
|
|
643
643
|
de(e.source),
|
|
644
|
-
|
|
644
|
+
Ye(e.name),
|
|
645
645
|
e.sourceField ?? ""
|
|
646
646
|
].join("::");
|
|
647
647
|
}
|
|
@@ -722,8 +722,8 @@ function In(e) {
|
|
|
722
722
|
return e.conditions.map((n) => n.label ? n.label : n.operator === "isNull" || n.value === null ? Nt : String(n.value)).join(" · ");
|
|
723
723
|
}
|
|
724
724
|
const Ot = t.union([
|
|
725
|
-
|
|
726
|
-
|
|
725
|
+
We,
|
|
726
|
+
Ke
|
|
727
727
|
]), xt = t.object({
|
|
728
728
|
name: t.string().min(1),
|
|
729
729
|
source: Ot,
|
|
@@ -771,7 +771,7 @@ const Ot = t.union([
|
|
|
771
771
|
for (let a = 0; a < e.conditions.length; a += 1) {
|
|
772
772
|
const r = e.conditions[a];
|
|
773
773
|
e.conditions.findIndex(
|
|
774
|
-
(c, i) => i < a &&
|
|
774
|
+
(c, i) => i < a && He(c.field, r.field)
|
|
775
775
|
) !== -1 && n.addIssue({
|
|
776
776
|
code: t.ZodIssueCode.custom,
|
|
777
777
|
message: "A selection tuple can contain only one condition per field.",
|
|
@@ -868,7 +868,7 @@ function Ne(e, n = !1) {
|
|
|
868
868
|
const a = Ce[e.toUpperCase()] ?? "other";
|
|
869
869
|
return n ? a === "count" || a === "count_distinct" ? "count_distinct" : a === "min" || a === "max" ? a : "repeat_safe_other" : a;
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const Gt = /* @__PURE__ */ new Set([
|
|
872
872
|
"NULLIF",
|
|
873
873
|
"COALESCE",
|
|
874
874
|
"IFNULL",
|
|
@@ -883,7 +883,7 @@ const Bt = /* @__PURE__ */ new Set([
|
|
|
883
883
|
"CAST",
|
|
884
884
|
"TRY_CAST",
|
|
885
885
|
"SAFE_CAST"
|
|
886
|
-
]),
|
|
886
|
+
]), Bt = /* @__PURE__ */ new Set(["DECIMAL", "NUMERIC", "INTEGER", "INT", "BIGINT", "FLOAT", "DOUBLE", "REAL", "VARCHAR", "TEXT"]), ie = /[A-Za-z_]/, zt = /[A-Za-z0-9_]/;
|
|
887
887
|
function V(e, n) {
|
|
888
888
|
const a = e[n];
|
|
889
889
|
let r = n + 1;
|
|
@@ -948,10 +948,10 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
948
948
|
if (ie.test(m)) {
|
|
949
949
|
const o = M(e, l), d = e.slice(l, o), p = j(e, o);
|
|
950
950
|
if (e[p] === "(" && Mt(d)) {
|
|
951
|
-
let
|
|
952
|
-
const I =
|
|
953
|
-
let R =
|
|
954
|
-
const T = e.slice(p + 1,
|
|
951
|
+
let f = P(e, p);
|
|
952
|
+
const I = f - 1;
|
|
953
|
+
let R = f;
|
|
954
|
+
const T = e.slice(p + 1, f - 1);
|
|
955
955
|
let x = T.trim() ? 1 : 0;
|
|
956
956
|
for (let h = p + 1; h < R - 1; h++)
|
|
957
957
|
e[h] === "'" || e[h] === '"' ? h = V(e, h) - 1 : e[h] === "(" ? h = P(e, h) - 1 : e[h] === "," && x++;
|
|
@@ -959,18 +959,18 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
959
959
|
W(C ? T.replace(/^\s*DISTINCT\b/i, "") : T).calls.length > 0 && (s = !0);
|
|
960
960
|
let b = !1, _ = !1;
|
|
961
961
|
for (; ; ) {
|
|
962
|
-
const h = j(e,
|
|
962
|
+
const h = j(e, f);
|
|
963
963
|
if (!ie.test(e[h] || "")) break;
|
|
964
964
|
const N = M(e, h), E = e.slice(h, N).toUpperCase(), u = j(e, N);
|
|
965
965
|
if (E === "WITHIN") {
|
|
966
966
|
const S = M(e, u), k = j(e, S);
|
|
967
967
|
if (e.slice(u, S).toUpperCase() === "GROUP" && e[k] === "(") {
|
|
968
|
-
|
|
968
|
+
f = P(e, k), R = f;
|
|
969
969
|
continue;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
if ((E === "FILTER" || E === "OVER") && e[u] === "(") {
|
|
973
|
-
b = b || E === "OVER", _ = _ || E === "FILTER",
|
|
973
|
+
b = b || E === "OVER", _ = _ || E === "FILTER", f = P(e, u);
|
|
974
974
|
continue;
|
|
975
975
|
}
|
|
976
976
|
break;
|
|
@@ -980,11 +980,11 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
980
980
|
kind: Ne(d, C),
|
|
981
981
|
distinct: C,
|
|
982
982
|
windowed: b,
|
|
983
|
-
tokens: Wt(e.slice(p,
|
|
983
|
+
tokens: Wt(e.slice(p, f)),
|
|
984
984
|
span: { start: l, end: R, argumentStart: p + 1, argumentEnd: I },
|
|
985
985
|
argumentCount: x,
|
|
986
986
|
filtered: _
|
|
987
|
-
}), c += `@${a.length - 1}`, l =
|
|
987
|
+
}), c += `@${a.length - 1}`, l = f;
|
|
988
988
|
continue;
|
|
989
989
|
}
|
|
990
990
|
c += e.slice(l, o), l = o;
|
|
@@ -997,11 +997,11 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
997
997
|
nestedAggregate: s,
|
|
998
998
|
windowed: a.some((m) => m.windowed),
|
|
999
999
|
tokensOutsideAggregates: r,
|
|
1000
|
-
aggregateInputsComplete: i &&
|
|
1000
|
+
aggregateInputsComplete: i && Kt(c, n),
|
|
1001
1001
|
skeleton: c
|
|
1002
1002
|
};
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Kt(e, n) {
|
|
1005
1005
|
var m;
|
|
1006
1006
|
const a = [];
|
|
1007
1007
|
let r = 0;
|
|
@@ -1036,9 +1036,9 @@ function Xt(e, n) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
if (o.startsWith("@") || o === "'S'" || ["NULL", "TRUE", "FALSE"].includes(o) || /^[0-9.]/.test(o))
|
|
1038
1038
|
return s++, !0;
|
|
1039
|
-
if (!
|
|
1039
|
+
if (!Gt.has(o) || (s++, !c("(") || !i())) return !1;
|
|
1040
1040
|
if (["CAST", "TRY_CAST", "SAFE_CAST"].includes(o)) {
|
|
1041
|
-
if (!c("AS") || !
|
|
1041
|
+
if (!c("AS") || !Bt.has(a[s++]) || (c("PRECISION"), c("(") && (!/^\d+$/.test(a[s++] || "") || c(",") && !/^\d+$/.test(a[s++] || "") || !c(")"))))
|
|
1042
1042
|
return !1;
|
|
1043
1043
|
} else
|
|
1044
1044
|
for (; c(","); ) if (!i()) return !1;
|
|
@@ -1046,7 +1046,7 @@ function Xt(e, n) {
|
|
|
1046
1046
|
};
|
|
1047
1047
|
return i() && s === a.length;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function Xt(e) {
|
|
1050
1050
|
const n = [];
|
|
1051
1051
|
let a = 0;
|
|
1052
1052
|
for (; a < e.length; ) {
|
|
@@ -1090,8 +1090,8 @@ function Kt(e) {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
return n;
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1094
|
-
const n =
|
|
1093
|
+
function Zt(e) {
|
|
1094
|
+
const n = Xt(e), a = n.some((o) => o.type === "op" && o.value === "/");
|
|
1095
1095
|
if (n.some((o) => o.type === "other"))
|
|
1096
1096
|
return { kind: "other", hasDivision: a };
|
|
1097
1097
|
let r = 0, s = !0;
|
|
@@ -1103,9 +1103,9 @@ function $t(e) {
|
|
|
1103
1103
|
if (!(I && I.type === "op" && (I.value === "+" || I.value === "-"))) break;
|
|
1104
1104
|
r += 1;
|
|
1105
1105
|
}
|
|
1106
|
-
const
|
|
1107
|
-
if (!
|
|
1108
|
-
d === void 0 ? d =
|
|
1106
|
+
const f = i();
|
|
1107
|
+
if (!f) return null;
|
|
1108
|
+
d === void 0 ? d = f.degree : d !== f.degree && (s = !1), o = o.concat(f.units), p = !1;
|
|
1109
1109
|
}
|
|
1110
1110
|
return { degree: d ?? 0, units: o };
|
|
1111
1111
|
}, i = () => {
|
|
@@ -1145,7 +1145,7 @@ const Oe = /* @__PURE__ */ new Set([
|
|
|
1145
1145
|
"count_distinct",
|
|
1146
1146
|
"repeat_safe_other"
|
|
1147
1147
|
]);
|
|
1148
|
-
function
|
|
1148
|
+
function K(e) {
|
|
1149
1149
|
if (!(!e || !e.trim()))
|
|
1150
1150
|
return Ne(e);
|
|
1151
1151
|
}
|
|
@@ -1167,7 +1167,7 @@ function xe(e) {
|
|
|
1167
1167
|
return { kind: "none", reason: "other" };
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function $t(e) {
|
|
1171
1171
|
var n, a;
|
|
1172
1172
|
return ((n = e.derivedField) == null ? void 0 : n.computeStage) || ((a = e.calculatedFormula) == null ? void 0 : a.computeStage);
|
|
1173
1173
|
}
|
|
@@ -1181,7 +1181,7 @@ const Q = {
|
|
|
1181
1181
|
identity: "unresolved",
|
|
1182
1182
|
unresolved: !0
|
|
1183
1183
|
}, Pe = { ...Q, stage: "row" };
|
|
1184
|
-
function
|
|
1184
|
+
function X(e) {
|
|
1185
1185
|
return {
|
|
1186
1186
|
stage: "row",
|
|
1187
1187
|
outer: e,
|
|
@@ -1194,28 +1194,28 @@ function K(e) {
|
|
|
1194
1194
|
unresolved: !1
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function G(e, n) {
|
|
1198
1198
|
var r;
|
|
1199
1199
|
const a = (r = n.derivedField) == null ? void 0 : r.aggregationBehavior;
|
|
1200
1200
|
return !a || e.unresolved ? e : a === "additive" ? e.reaggregation.kind === "additive" ? e : { ...e, reaggregation: { kind: "additive" } } : { ...e, reaggregation: { kind: "none", reason: "declared" } };
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function Ht(e, n) {
|
|
1203
1203
|
if (!e) return Q;
|
|
1204
1204
|
if (typeof e.expression == "string" && e.expression.trim()) {
|
|
1205
1205
|
const r = J(e, n + 1);
|
|
1206
1206
|
return r === "row_input" ? "raw" : r.unresolved || r.stage === "aggregate" || r.outer ? r : "raw";
|
|
1207
1207
|
}
|
|
1208
|
-
const a =
|
|
1209
|
-
return a ?
|
|
1208
|
+
const a = K(e.aggregate);
|
|
1209
|
+
return a ? X(a) : "raw";
|
|
1210
1210
|
}
|
|
1211
|
-
const
|
|
1211
|
+
const Yt = 12;
|
|
1212
1212
|
function J(e, n) {
|
|
1213
1213
|
var E;
|
|
1214
|
-
if (n >
|
|
1214
|
+
if (n > Yt) return Q;
|
|
1215
1215
|
const a = typeof e.expression == "string" ? e.expression.trim() : "";
|
|
1216
1216
|
if (!a)
|
|
1217
|
-
return
|
|
1218
|
-
K(
|
|
1217
|
+
return G(
|
|
1218
|
+
X(K(e.aggregate) ?? "sum"),
|
|
1219
1219
|
e
|
|
1220
1220
|
);
|
|
1221
1221
|
const r = W(a), s = ((E = e.calculatedFormula) == null ? void 0 : E.inputFields) || [], c = (u) => {
|
|
@@ -1223,7 +1223,7 @@ function J(e, n) {
|
|
|
1223
1223
|
return S ? s[Number(S[1])] : void 0;
|
|
1224
1224
|
}, i = /* @__PURE__ */ new Map();
|
|
1225
1225
|
for (const u of r.tokensOutsideAggregates)
|
|
1226
|
-
i.has(u) || i.set(u,
|
|
1226
|
+
i.has(u) || i.set(u, Ht(c(u), n));
|
|
1227
1227
|
const l = r.calls.some(
|
|
1228
1228
|
(u) => u.tokens.some((S) => {
|
|
1229
1229
|
const k = c(S);
|
|
@@ -1233,17 +1233,17 @@ function J(e, n) {
|
|
|
1233
1233
|
})
|
|
1234
1234
|
), m = Array.from(i.values()).filter(
|
|
1235
1235
|
(u) => u !== "raw"
|
|
1236
|
-
), o = Array.from(i.values()).some((u) => u === "raw"), d = r.calls.length > 0 || m.length > 0 ||
|
|
1236
|
+
), o = Array.from(i.values()).some((u) => u === "raw"), d = r.calls.length > 0 || m.length > 0 || $t(e) === "aggregate" || !!e.isPreAggregated, p = new Set(
|
|
1237
1237
|
[...i].filter(
|
|
1238
1238
|
([u, S]) => S === "raw" ? !d && !!c(u) : !S.unresolved
|
|
1239
1239
|
).map(([u]) => u)
|
|
1240
|
-
),
|
|
1240
|
+
), f = W(a, p).aggregateInputsComplete;
|
|
1241
1241
|
if (!d) {
|
|
1242
|
-
if (!
|
|
1243
|
-
const u =
|
|
1244
|
-
return u ?
|
|
1242
|
+
if (!f) return Pe;
|
|
1243
|
+
const u = K(e.aggregate);
|
|
1244
|
+
return u ? G(X(u), e) : "row_input";
|
|
1245
1245
|
}
|
|
1246
|
-
const I = !
|
|
1246
|
+
const I = !f || o || r.nestedAggregate || l || m.some((u) => u.unresolved) || r.calls.length === 0 && m.length === 0, R = [
|
|
1247
1247
|
...r.calls.map((u) => ({ kind: u.kind, distinct: u.distinct })),
|
|
1248
1248
|
...m.flatMap((u) => u.calls)
|
|
1249
1249
|
], T = r.windowed || m.some((u) => u.windowed), x = !I && !T && R.every((u) => Oe.has(u.kind)), C = (u) => {
|
|
@@ -1253,7 +1253,7 @@ function J(e, n) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
const S = i.get(u.token);
|
|
1255
1255
|
return S && S !== "raw" ? S.reaggregation : { kind: "none", reason: "unresolved" };
|
|
1256
|
-
}, b =
|
|
1256
|
+
}, b = Zt(r.skeleton);
|
|
1257
1257
|
let _, h, N = "numeric";
|
|
1258
1258
|
if (I)
|
|
1259
1259
|
_ = { kind: "none", reason: "unresolved" }, h = "unresolved";
|
|
@@ -1268,7 +1268,7 @@ function J(e, n) {
|
|
|
1268
1268
|
h = u.identity, N = u.outputType;
|
|
1269
1269
|
}
|
|
1270
1270
|
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");
|
|
1271
|
-
return
|
|
1271
|
+
return G(
|
|
1272
1272
|
{
|
|
1273
1273
|
stage: "aggregate",
|
|
1274
1274
|
calls: R,
|
|
@@ -1290,8 +1290,8 @@ const Qt = t.object({
|
|
|
1290
1290
|
intent: Je,
|
|
1291
1291
|
matrixWindowRequest: pe
|
|
1292
1292
|
}).strict(), Jt = t.object({
|
|
1293
|
-
runtimeFilters:
|
|
1294
|
-
runtimeSorts:
|
|
1293
|
+
runtimeFilters: B.innerType().shape.filters,
|
|
1294
|
+
runtimeSorts: B.innerType().shape.sorts.optional()
|
|
1295
1295
|
});
|
|
1296
1296
|
function Tn(e) {
|
|
1297
1297
|
return Jt.parse(e);
|
|
@@ -1302,7 +1302,7 @@ const en = {
|
|
|
1302
1302
|
intent: Qt.shape.intent,
|
|
1303
1303
|
resultShape: t.literal("matrix"),
|
|
1304
1304
|
result: Ae.optional(),
|
|
1305
|
-
metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure:
|
|
1305
|
+
metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: Y.optional() }).passthrough()
|
|
1306
1306
|
}, tn = ve.extend(en), En = tn.superRefine((e, n) => {
|
|
1307
1307
|
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." });
|
|
1308
1308
|
});
|
|
@@ -1320,7 +1320,7 @@ export {
|
|
|
1320
1320
|
Mt as J,
|
|
1321
1321
|
Ne as K,
|
|
1322
1322
|
W as L,
|
|
1323
|
-
|
|
1323
|
+
Zt as M,
|
|
1324
1324
|
vn as N,
|
|
1325
1325
|
me as O,
|
|
1326
1326
|
nt as P,
|
|
@@ -1339,15 +1339,15 @@ export {
|
|
|
1339
1339
|
ut as a0,
|
|
1340
1340
|
dt as a1,
|
|
1341
1341
|
ne as a2,
|
|
1342
|
-
|
|
1342
|
+
Y as a3,
|
|
1343
1343
|
mt as a4,
|
|
1344
1344
|
Se as a5,
|
|
1345
1345
|
pt as a6,
|
|
1346
1346
|
un as a7,
|
|
1347
1347
|
dn as a8,
|
|
1348
1348
|
ht as a9,
|
|
1349
|
-
|
|
1350
|
-
|
|
1349
|
+
gt as aa,
|
|
1350
|
+
ft as ab,
|
|
1351
1351
|
mn as ac,
|
|
1352
1352
|
pn as ad,
|
|
1353
1353
|
yt as ae,
|
|
@@ -1362,9 +1362,9 @@ export {
|
|
|
1362
1362
|
_n as b,
|
|
1363
1363
|
bn as c,
|
|
1364
1364
|
Sn as d,
|
|
1365
|
-
|
|
1365
|
+
H as e,
|
|
1366
1366
|
At as f,
|
|
1367
|
-
|
|
1367
|
+
gn as g,
|
|
1368
1368
|
It as h,
|
|
1369
1369
|
Et as i,
|
|
1370
1370
|
_e as j,
|
|
@@ -1373,7 +1373,7 @@ export {
|
|
|
1373
1373
|
ve as m,
|
|
1374
1374
|
_t as n,
|
|
1375
1375
|
wt as o,
|
|
1376
|
-
|
|
1376
|
+
fn as p,
|
|
1377
1377
|
vt as q,
|
|
1378
1378
|
Ae as r,
|
|
1379
1379
|
se as s,
|