react-semaphor 0.1.584 → 0.1.586

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 (61) hide show
  1. package/dist/analytics-protocol/index.js +474 -435
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/briefings/index.js +2 -2
  4. package/dist/chunks/{assistant-chat-nmycV1Se.js → assistant-chat-BU5gchFy.js} +8 -8
  5. package/dist/chunks/{bookmark-impact-CI3gmxi0.js → bookmark-impact-ZPSGncK6.js} +2 -2
  6. package/dist/chunks/{bookmark-state-D9-RFkDg.js → bookmark-state-CL4WEpgB.js} +2 -2
  7. package/dist/chunks/{card-filter-builder-C7QyPqRy.js → card-filter-builder-HELJWA4D.js} +208 -208
  8. package/dist/chunks/{comparison-window-caption-BAnsTI8y.js → comparison-window-caption-CoART8BC.js} +530 -633
  9. package/dist/chunks/{dashboard-inJy_V78.js → dashboard-BXP-ZxSY.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-DXs0XA1O.js → dashboard-briefing-launcher-BGj42whr.js} +9 -9
  11. package/dist/chunks/{dashboard-controls-6Zoo8d8Y.js → dashboard-controls-zvbRp6D2.js} +9 -9
  12. package/dist/chunks/{dashboard-json-D5eJhVA9.js → dashboard-json-CykexgqL.js} +1 -1
  13. package/dist/chunks/{dates-B3_GWc_Y.js → dates-CaqZtq01.js} +6 -6
  14. package/dist/chunks/{edit-dashboard-visual-DR03SYeW.js → edit-dashboard-visual-C82JNxbt.js} +2679 -2614
  15. package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
  16. package/dist/chunks/{filter-reach-copy-CZwzrxBp.js → filter-reach-copy-ZERaFKsN.js} +1640 -1367
  17. package/dist/chunks/{filter-value-text-DtOvqcjn.js → filter-value-text-xefXzZlf.js} +10 -10
  18. package/dist/chunks/{index-BgT1L0p5.js → index-otMIColV.js} +35 -35
  19. package/dist/chunks/{matrix-analytical-definition-Cs2v43FM.js → matrix-analytical-definition-DOVSFFuf.js} +390 -542
  20. package/dist/chunks/{metric-comparison-Be4uS3Ql.js → metric-comparison-ZmurmEIs.js} +2 -2
  21. package/dist/chunks/{pivot-header-presentation-uH06jiZD.js → pivot-header-presentation-CdeTU96P.js} +1 -1
  22. package/dist/chunks/{pivot-result-contract-expectations-DvZY4eJM.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1010 -1005
  23. package/dist/chunks/{pivot-result-identity-BZexMfmL.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
  24. package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
  25. package/dist/chunks/{report-preferences-dialog-DWeVe2so.js → report-preferences-dialog-B-CoyS1x.js} +119 -119
  26. package/dist/chunks/{resolve-dashboard-input-context-uATCuOP7.js → resolve-dashboard-input-context-BTTdKXH0.js} +10273 -10190
  27. package/dist/chunks/{saved-dashboard-context-DSVV9iqW.js → saved-dashboard-context-B-rosN4W.js} +78 -75
  28. package/dist/chunks/{semaphor-ready-indicator-B9vvRMnJ.js → semaphor-ready-indicator-Cy1n_04D.js} +28208 -27864
  29. package/dist/chunks/{shelf-drop-preview-context-BHOnp5Bo.js → shelf-drop-preview-context-Bmz54WYm.js} +2 -2
  30. package/dist/chunks/{stored-dashboard-xc5iidHL.js → stored-dashboard-rDJ8sw6J.js} +601 -596
  31. package/dist/chunks/{table-export-sheet-Cv_94obr.js → table-export-sheet-Dmtqi5NV.js} +1 -1
  32. package/dist/chunks/{variable-draft-C3CjhsJQ.js → variable-draft-DvngkRMl.js} +3 -3
  33. package/dist/chunks/{visual-choice-JiJ-_3bi.js → visual-choice-BBPizkRo.js} +74 -72
  34. package/dist/dashboard/index.js +2 -2
  35. package/dist/dashboard-authoring/index.js +699 -688
  36. package/dist/format-utils/index.js +145 -142
  37. package/dist/index.js +14 -14
  38. package/dist/style.css +1 -1
  39. package/dist/surfboard/index.js +2 -2
  40. package/dist/types/index.js +2 -2
  41. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +86 -3
  42. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +49 -27
  43. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  44. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +30 -2
  45. package/dist/types/shared/analytics-protocol/click-reach-filter-id.d.ts +9 -0
  46. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +3 -1
  47. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  48. package/dist/types/shared/dashboard-authoring/click-to-filter-card-decision.d.ts +102 -0
  49. package/dist/types/shared/dashboard-authoring/filter-reach-copy.d.ts +13 -1
  50. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  51. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
  52. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +3 -0
  53. package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +5 -2
  54. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +37 -4
  55. package/dist/types/shared/dashboard-authoring/semantic-auto-join-card.d.ts +13 -0
  56. package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
  57. package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
  58. package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
  59. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
  60. package/package.json +2 -2
  61. package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
@@ -1,18 +1,18 @@
1
- import { c as nt, B as G, X as ce, x as Ne, q as mn, a8 as pn, t as at, u as rt, v as st, w as ot, a9 as Ot, F as Oe, s as le, y as xe, z as ge, A as be, D as ve, E as re, e as it, f as lt, h as dt, L as fn, d as hn } from "./style-sheet-parts-_dGSFzDi.js";
1
+ import { c as nt, B as G, X as ce, x as Ne, q as mn, a8 as pn, t as at, u as rt, v as st, w as ot, a9 as Ot, F as Oe, s as le, y as ge, z as xe, A as be, D as ve, E as re, e as it, f as lt, h as dt, L as fn, d as hn } from "./style-sheet-parts-_dGSFzDi.js";
2
2
  import { jsx as t, jsxs as l, Fragment as fe } from "react/jsx-runtime";
3
3
  import * as _e from "react";
4
- import vt, { useMemo as Q, useState as H, useRef as Ae, useCallback as ne, useEffect as de, forwardRef as xn, Fragment as gn } from "react";
5
- import { b2 as ct, u as ut, ag as se, c5 as _t, cC as X, cD as bn, c1 as Ie, cE as Ue, cF as Vt, cG as vn, bX as Ve, cH as yn, ah as Rt, bE as Nn, bF as Cn, bH as wn, bx as kn, cI as Sn, i as Dn, cJ as In, cK as Tn, cL as yt, bW as Et, cM as Ln, cN as zt, cO as Mt, cP as An, cQ as $n, cR as Fn, cS as On, cT as _n, cU as Vn, cV as Rn, by as En, cW as Nt, cX as qt, cY as zn, bB as Mn, cZ as qn, c_ as jn, c$ as Un, d0 as ye, d1 as jt, d2 as Gn, d3 as Bn, d4 as Wn, d5 as Kn, d6 as Qn, d7 as Ze, d8 as he, d9 as Je, da as et, db as tt, dc as Hn, dd as Re, de as Ee, df as ze, dg as Me, dh as Ut, di as Gt, dj as Bt } from "./semaphor-ready-indicator-B9vvRMnJ.js";
4
+ import vt, { useMemo as Q, useState as H, useRef as Ae, useCallback as ne, useEffect as de, forwardRef as gn, Fragment as xn } from "react";
5
+ import { b2 as ct, u as ut, ag as se, c5 as _t, cC as X, cD as bn, c1 as Ie, cE as Ue, cF as Vt, cG as vn, bX as Ve, cH as yn, ah as Rt, bE as Nn, bF as Cn, bH as wn, bx as kn, cI as Sn, i as Dn, cJ as In, cK as Tn, cL as yt, bW as Et, cM as Ln, cN as zt, cO as Mt, cP as An, cQ as $n, cR as Fn, cS as On, cT as _n, cU as Vn, cV as Rn, by as En, cW as Nt, cX as qt, cY as zn, bB as Mn, cZ as qn, c_ as jn, c$ as Un, d0 as ye, d1 as jt, d2 as Gn, d3 as Bn, d4 as Wn, d5 as Kn, d6 as Qn, d7 as Je, d8 as he, d9 as Ze, da as et, db as tt, dc as Hn, dd as Re, de as Ee, df as ze, dg as Me, dh as Ut, di as Gt, dj as Bt } from "./semaphor-ready-indicator-Cy1n_04D.js";
6
6
  import { D as Pn } from "./token-types-DEe_FP4l.js";
7
- import { fs as Wt, ft as Yn, fu as Xn, fv as Zn, fw as Jn, fx as ea, fy as $e, fz as Ct, fA as wt, fB as Ke, fC as Qe, fD as ta, fE as na, fF as kt, fG as aa, fH as ra, fI as Fe, fJ as sa, fK as St, fL as Kt, fM as Qt, fN as Ht, fO as Pt, fP as oa, fQ as ia, fR as Dt, fS as la, fT as It, fU as da, fV as ca, fW as ua, fX as ma, fY as He, a as qe, fZ as Pe, bb as pa, f_ as fa, f$ as ha, g0 as xa, g1 as ga } from "./resolve-dashboard-input-context-uATCuOP7.js";
7
+ import { fw as Wt, fx as Yn, fy as Xn, fz as Jn, fA as Zn, fB as ea, fC as $e, fD as Ct, fE as wt, fF as Ke, fG as Qe, fH as ta, fI as na, fJ as kt, fK as aa, fL as ra, fM as Fe, fN as sa, fO as St, fP as Kt, fQ as Qt, fR as Ht, fS as Pt, fT as oa, fU as ia, fV as Dt, fW as la, fX as It, fY as da, fZ as ca, f_ as ua, f$ as ma, g0 as He, a as qe, g1 as Pe, bb as pa, g2 as fa, g3 as ha, g4 as ga, g5 as xa } from "./resolve-dashboard-input-context-BTTdKXH0.js";
8
8
  import { c as M } from "./pickers-DkqmtnTL.js";
9
9
  import { r as Yt } from "./validators-CJ8Jh0E8.js";
10
10
  import "./matrix-operation-contract-BM5TveR3.js";
11
11
  import "./analytics-base-schemas-BaIQrEzX.js";
12
12
  import "../value-format-preferences/index.js";
13
13
  import { U as ba } from "./upload-CtyOkU_B.js";
14
- import { a as Xt } from "./metric-comparison-Be4uS3Ql.js";
15
- import { Z as Zt } from "./filter-reach-copy-CZwzrxBp.js";
14
+ import { r as Xt } from "./metric-comparison-ZmurmEIs.js";
15
+ import { a3 as Jt } from "./filter-reach-copy-ZERaFKsN.js";
16
16
  /**
17
17
  * @license lucide-react v0.453.0 - ISC
18
18
  *
@@ -95,7 +95,7 @@ function Ca({
95
95
  }) {
96
96
  return e === "all" ? !1 : e === "none" ? !!n || o : n ? !Na(e, n, a) : o;
97
97
  }
98
- function Jt(e) {
98
+ function Zt(e) {
99
99
  const { tokenProps: n } = ct(), a = ut((s) => s.authToken) || e;
100
100
  se(
101
101
  (s) => s.selectedConnectionId
@@ -172,7 +172,7 @@ function Sa({
172
172
  selectedEntities: o,
173
173
  onSelectionChange: u
174
174
  }) {
175
- const { semanticDomains: d, isSemanticDomainsLoading: c } = Jt(), i = Q(() => Ia(d, e), [d, e]), s = Q(() => a ? i.filter((f) => f.id === a) : i, [i, a]);
175
+ const { semanticDomains: d, isSemanticDomainsLoading: c } = Zt(), i = Q(() => Ia(d, e), [d, e]), s = Q(() => a ? i.filter((f) => f.id === a) : i, [i, a]);
176
176
  if (c && s.length === 0)
177
177
  return /* @__PURE__ */ t("div", { className: "px-3 py-4 text-[11px] text-muted-foreground", children: "Loading semantic domains…" });
178
178
  if (s.length === 0)
@@ -288,7 +288,7 @@ function Da({
288
288
  ] }),
289
289
  y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: m && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) : f.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "No datasets in this domain." }) : f.map((O) => {
290
290
  const T = Le(O), P = o.some(
291
- (Z) => X(Z, T)
291
+ (J) => X(J, T)
292
292
  );
293
293
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-start gap-2 rounded-[4px] px-9 py-1.5 transition-colors hover:bg-muted/40", children: [
294
294
  /* @__PURE__ */ t(
@@ -1048,7 +1048,7 @@ function Cr({
1048
1048
  var Se, me;
1049
1049
  const { tokenProps: d } = ct(), c = d.config, i = d.semanticDomainAccess || Pn, [s, m] = H([]), [f, w] = H(""), [y, h] = H("all"), [N, k] = H(
1050
1050
  void 0
1051
- ), _ = Ae(!1), { updateDataSource: D } = Rt(), j = u ?? D, O = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, P = O === "include" || O === "exclude" || !T, Z = O !== "all", p = T && !P, I = P ? "semanticDomain" : a.mode, A = !T, S = O === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1051
+ ), _ = Ae(!1), { updateDataSource: D } = Rt(), j = u ?? D, O = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, P = O === "include" || O === "exclude" || !T, J = O !== "all", p = T && !P, I = P ? "semanticDomain" : a.mode, A = !T, S = O === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1052
1052
  ($) => {
1053
1053
  _.current = !0, j({
1054
1054
  ...a,
@@ -1060,7 +1060,7 @@ function Cr({
1060
1060
  });
1061
1061
  },
1062
1062
  [a, j]
1063
- ), x = ne(
1063
+ ), g = ne(
1064
1064
  ($) => {
1065
1065
  j({
1066
1066
  ...a,
@@ -1075,20 +1075,20 @@ function Cr({
1075
1075
  v("semanticDomain");
1076
1076
  return;
1077
1077
  }
1078
- if (!Z || I !== "semanticDomain") return;
1078
+ if (!J || I !== "semanticDomain") return;
1079
1079
  const $ = i.domainIds ?? [], ae = (((b = a.selectedEntities) == null ? void 0 : b.length) ?? 0) > 0, r = ((s == null ? void 0 : s.length) ?? 0) > 0;
1080
1080
  Ca({
1081
1081
  mode: O,
1082
1082
  currentDomainId: a.semanticDomainId,
1083
1083
  scopedDomainIds: $,
1084
1084
  hasSelectedEntities: ae
1085
- }) && (x({
1085
+ }) && (g({
1086
1086
  semanticDomainId: void 0,
1087
1087
  selectedEntities: []
1088
1088
  }), r && m([]));
1089
1089
  }, [
1090
1090
  P,
1091
- Z,
1091
+ J,
1092
1092
  I,
1093
1093
  a.mode,
1094
1094
  a.semanticDomainId,
@@ -1096,11 +1096,11 @@ function Cr({
1096
1096
  s,
1097
1097
  i.domainIds,
1098
1098
  O,
1099
- x,
1099
+ g,
1100
1100
  v
1101
1101
  ]), de(() => {
1102
- S && !a.semanticDomainId && x({ semanticDomainId: S });
1103
- }, [S, a.semanticDomainId, x]), de(() => {
1102
+ S && !a.semanticDomainId && g({ semanticDomainId: S });
1103
+ }, [S, a.semanticDomainId, g]), de(() => {
1104
1104
  if (!e) {
1105
1105
  _.current = !1, w(""), k(void 0), h(P ? "semantic" : "all");
1106
1106
  return;
@@ -1120,42 +1120,42 @@ function Cr({
1120
1120
  );
1121
1121
  },
1122
1122
  []
1123
- ), J = () => {
1123
+ ), Z = () => {
1124
1124
  var ae, r;
1125
1125
  const $ = Ye(s) ?? N ?? I;
1126
1126
  if ($ === "semanticDomain") {
1127
- const g = en(s) || a.semanticDomainId, b = ((ae = s == null ? void 0 : s[0]) == null ? void 0 : ae.connectionId) || a.connectionId, L = ((r = s == null ? void 0 : s[0]) == null ? void 0 : r.connectionType) || a.connectionType;
1127
+ const x = en(s) || a.semanticDomainId, b = ((ae = s == null ? void 0 : s[0]) == null ? void 0 : ae.connectionId) || a.connectionId, L = ((r = s == null ? void 0 : s[0]) == null ? void 0 : r.connectionType) || a.connectionType;
1128
1128
  j({
1129
1129
  ...a,
1130
1130
  mode: "semanticDomain",
1131
- semanticDomainId: g,
1131
+ semanticDomainId: x,
1132
1132
  connectionId: b,
1133
1133
  connectionType: L,
1134
1134
  selectedEntities: s
1135
1135
  });
1136
1136
  } else if ($ === "upload" || $ === "url") {
1137
- const g = s == null ? void 0 : s[0];
1137
+ const x = s == null ? void 0 : s[0];
1138
1138
  j({
1139
1139
  ...a,
1140
1140
  mode: $,
1141
1141
  semanticDomainId: void 0,
1142
- connectionId: (g == null ? void 0 : g.connectionId) || a.connectionId,
1143
- connectionType: (g == null ? void 0 : g.connectionType) || a.connectionType,
1142
+ connectionId: (x == null ? void 0 : x.connectionId) || a.connectionId,
1143
+ connectionType: (x == null ? void 0 : x.connectionType) || a.connectionType,
1144
1144
  selectedEntities: s
1145
1145
  });
1146
1146
  } else {
1147
- const g = s == null ? void 0 : s[0];
1147
+ const x = s == null ? void 0 : s[0];
1148
1148
  j({
1149
1149
  ...a,
1150
1150
  mode: "database",
1151
1151
  semanticDomainId: void 0,
1152
- connectionId: (g == null ? void 0 : g.connectionId) || a.connectionId,
1153
- connectionType: (g == null ? void 0 : g.connectionType) || a.connectionType,
1152
+ connectionId: (x == null ? void 0 : x.connectionId) || a.connectionId,
1153
+ connectionType: (x == null ? void 0 : x.connectionType) || a.connectionType,
1154
1154
  selectedEntities: s
1155
1155
  });
1156
1156
  }
1157
1157
  n(!1);
1158
- }, { semanticDomains: V } = Jt(), { connections: z } = Vt(), K = Q(
1158
+ }, { semanticDomains: V } = Zt(), { connections: z } = Vt(), K = Q(
1159
1159
  () => new Map(
1160
1160
  V.map(($) => [
1161
1161
  $.id,
@@ -1308,7 +1308,7 @@ function Cr({
1308
1308
  "button",
1309
1309
  {
1310
1310
  type: "button",
1311
- onClick: J,
1311
+ onClick: Z,
1312
1312
  disabled: Ce,
1313
1313
  className: M(
1314
1314
  "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-2.5 text-[12px] font-medium text-primary-foreground transition-colors hover:bg-primary/90",
@@ -1458,7 +1458,7 @@ function kr({
1458
1458
  )
1459
1459
  ] }) });
1460
1460
  }
1461
- const za = xn(
1461
+ const za = gn(
1462
1462
  ({
1463
1463
  side: e = "bottom",
1464
1464
  children: n,
@@ -1503,17 +1503,17 @@ const za = xn(
1503
1503
  za.displayName = "IconButton";
1504
1504
  function Ma(e, n) {
1505
1505
  var s, m;
1506
- const a = e.qualifiedFieldName || e.name, o = e.qualifiedFieldName ? e.qualifiedFieldName.split(".").slice(0, -1).join(".") : e.qualifiedEntityName || e.entityName, u = n.connectionId || ((s = n.dataSource) == null ? void 0 : s.connectionId) || "", d = Xn(e), c = Zn(
1506
+ const a = e.qualifiedFieldName || e.name, o = e.qualifiedFieldName ? e.qualifiedFieldName.split(".").slice(0, -1).join(".") : e.qualifiedEntityName || e.entityName, u = n.connectionId || ((s = n.dataSource) == null ? void 0 : s.connectionId) || "", d = Xn(e), c = Jn(
1507
1507
  n.dataSource,
1508
1508
  {
1509
1509
  connectionId: u,
1510
1510
  connectionType: (m = n.dataSource) == null ? void 0 : m.connectionType
1511
1511
  },
1512
1512
  e
1513
- ), i = Jn(n.dataSource, c, e) || "";
1513
+ ), i = Zn(n.dataSource, c, e) || "";
1514
1514
  return {
1515
1515
  column: a,
1516
- title: Zt(e),
1516
+ title: Jt(e),
1517
1517
  dataType: e.dataType,
1518
1518
  ...e.nativeDataType ? { nativeDataType: e.nativeDataType } : {},
1519
1519
  table: e.entityName || "",
@@ -1545,7 +1545,7 @@ function qa(e) {
1545
1545
  const { currentStep: n, labels: a } = e;
1546
1546
  return /* @__PURE__ */ t("div", { className: "sticky top-0 z-10 -mx-1 border-b border-border/60 bg-background/95 px-1 pb-2.5 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2 sm:gap-2.5", children: a.map((o, u) => {
1547
1547
  const d = u + 1, c = d === n, i = d < n;
1548
- return /* @__PURE__ */ l(gn, { children: [
1548
+ return /* @__PURE__ */ l(xn, { children: [
1549
1549
  /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
1550
1550
  /* @__PURE__ */ t(
1551
1551
  "span",
@@ -1815,36 +1815,36 @@ function Sr({
1815
1815
  [a]
1816
1816
  ), D = oa(e), j = ea(e), [O, T] = H(
1817
1817
  null
1818
- ), [P, Z] = H(
1818
+ ), [P, J] = H(
1819
1819
  null
1820
1820
  ), [p, I] = H(
1821
1821
  () => c ? {
1822
1822
  step: 1,
1823
1823
  control: $e(e, n, Array.from(_))
1824
1824
  } : null
1825
- ), A = Ae({}), S = Ae(void 0), v = Ae(c), x = Q(() => {
1825
+ ), A = Ae({}), S = Ae(void 0), v = Ae(c), g = Q(() => {
1826
1826
  const r = Ct({ scope: e, card: y });
1827
1827
  if (!h)
1828
1828
  return r;
1829
- const g = new Set(h);
1830
- return r.filter((b) => g.has(b.value));
1829
+ const x = new Set(h);
1830
+ return r.filter((b) => x.has(b.value));
1831
1831
  }, [h, y, e]), q = ne(
1832
1832
  (r) => {
1833
- const g = Ct({
1833
+ const x = Ct({
1834
1834
  scope: e,
1835
1835
  card: y,
1836
1836
  includeType: h ? void 0 : r
1837
1837
  });
1838
1838
  if (!h)
1839
- return g;
1839
+ return x;
1840
1840
  const b = new Set(h);
1841
- return g.filter((L) => b.has(L.value));
1841
+ return x.filter((L) => b.has(L.value));
1842
1842
  },
1843
1843
  [h, y, e]
1844
1844
  ), C = ne(
1845
1845
  (r) => e === "dashboard" && (r === "field_selector" || r === "metric_selector"),
1846
1846
  [e]
1847
- ), J = Q(
1847
+ ), Z = Q(
1848
1848
  () => p ? wt(
1849
1849
  f || [],
1850
1850
  p.control.type
@@ -1861,19 +1861,19 @@ function Sr({
1861
1861
  fields: s || [],
1862
1862
  metrics: m || []
1863
1863
  };
1864
- const r = p.selectedCardIds || [], g = Ke({
1864
+ const r = p.selectedCardIds || [], x = Ke({
1865
1865
  controlType: p.control.type,
1866
1866
  participants: f || [],
1867
1867
  selectedCardIds: r
1868
1868
  });
1869
1869
  return {
1870
- fields: p.control.type === "field_selector" ? g.choices.map((b) => ({
1870
+ fields: p.control.type === "field_selector" ? x.choices.map((b) => ({
1871
1871
  option: b,
1872
- target: g.fieldTargetMap[b.value]
1872
+ target: x.fieldTargetMap[b.value]
1873
1873
  })) : [],
1874
- metrics: p.control.type === "metric_selector" ? g.choices.map((b) => ({
1874
+ metrics: p.control.type === "metric_selector" ? x.choices.map((b) => ({
1875
1875
  option: b,
1876
- target: g.metricTargetMap[b.value]
1876
+ target: x.metricTargetMap[b.value]
1877
1877
  })) : []
1878
1878
  };
1879
1879
  }, [
@@ -1890,7 +1890,7 @@ function Sr({
1890
1890
  v.current = c, r && (I({
1891
1891
  step: 1,
1892
1892
  control: $e(e, n, Array.from(_))
1893
- }), Z(null), T(null));
1893
+ }), J(null), T(null));
1894
1894
  }, [n, c, _, e]);
1895
1895
  const z = (r) => {
1896
1896
  if (!C(r.type))
@@ -1898,8 +1898,8 @@ function Sr({
1898
1898
  fields: s || [],
1899
1899
  metrics: m || []
1900
1900
  };
1901
- const g = (w == null ? void 0 : w[r.id]) || [];
1902
- if (g.length === 0)
1901
+ const x = (w == null ? void 0 : w[r.id]) || [];
1902
+ if (x.length === 0)
1903
1903
  return {
1904
1904
  fields: s || [],
1905
1905
  metrics: m || []
@@ -1907,7 +1907,7 @@ function Sr({
1907
1907
  const b = Ke({
1908
1908
  controlType: r.type,
1909
1909
  participants: f || [],
1910
- selectedCardIds: g
1910
+ selectedCardIds: x
1911
1911
  });
1912
1912
  return {
1913
1913
  fields: r.type === "field_selector" ? b.choices.map((L) => ({
@@ -1925,7 +1925,7 @@ function Sr({
1925
1925
  nextControl: r.control,
1926
1926
  cardBindingsById: void 0
1927
1927
  };
1928
- const g = (w == null ? void 0 : w[r.control.id]) || [], b = Ke({
1928
+ const x = (w == null ? void 0 : w[r.control.id]) || [], b = Ke({
1929
1929
  controlType: r.control.type,
1930
1930
  participants: f || [],
1931
1931
  selectedCardIds: r.nextSelectedCardIds
@@ -1933,7 +1933,7 @@ function Sr({
1933
1933
  control: r.control,
1934
1934
  choices: b.choices
1935
1935
  }), R = Object.fromEntries(
1936
- g.filter((E) => !r.nextSelectedCardIds.includes(E)).map((E) => [E, void 0])
1936
+ x.filter((E) => !r.nextSelectedCardIds.includes(E)).map((E) => [E, void 0])
1937
1937
  );
1938
1938
  return r.nextSelectedCardIds.length > 0 && L.source.kind === "manual" && L.source.options.length > 0 && Object.assign(
1939
1939
  R,
@@ -1948,21 +1948,21 @@ function Sr({
1948
1948
  cardBindingsById: R
1949
1949
  };
1950
1950
  }, U = ne(
1951
- (r, g = o, b = { type: "update" }) => {
1951
+ (r, x = o, b = { type: "update" }) => {
1952
1952
  const L = r.map((R) => (Qe({
1953
1953
  control: R,
1954
- defaultValues: g
1954
+ defaultValues: x
1955
1955
  }), ta(
1956
1956
  R
1957
1957
  )));
1958
- u(L, g, b);
1958
+ u(L, x, b);
1959
1959
  },
1960
1960
  [o, u]
1961
- ), ee = (r, g) => {
1961
+ ), ee = (r, x) => {
1962
1962
  const b = n.find(
1963
1963
  (W) => W.id === r
1964
1964
  );
1965
- let L = n.map((W) => W.id !== r ? W : g(W));
1965
+ let L = n.map((W) => W.id !== r ? W : x(W));
1966
1966
  const R = L.find(
1967
1967
  (W) => W.id === r
1968
1968
  );
@@ -2005,10 +2005,10 @@ function Sr({
2005
2005
  cardBindingsById: E,
2006
2006
  affectedBindingControlIds: F
2007
2007
  });
2008
- }, te = (r, g) => {
2009
- if (!g.trim())
2008
+ }, te = (r, x) => {
2009
+ if (!x.trim())
2010
2010
  return;
2011
- const b = ma(g);
2011
+ const b = ma(x);
2012
2012
  if (b === r || _.has(b) || n.some(
2013
2013
  (E) => E.id === b && E.id !== r
2014
2014
  ))
@@ -2031,30 +2031,30 @@ function Sr({
2031
2031
  newId: b
2032
2032
  });
2033
2033
  }, Be = (r) => {
2034
- const g = n.filter((L) => L.id !== r);
2034
+ const x = n.filter((L) => L.id !== r);
2035
2035
  if (!o) {
2036
- U(g, void 0, { type: "remove", controlId: r });
2036
+ U(x, void 0, { type: "remove", controlId: r });
2037
2037
  return;
2038
2038
  }
2039
2039
  const b = { ...o };
2040
- delete b[r], U(g, b, { type: "remove", controlId: r });
2040
+ delete b[r], U(x, b, { type: "remove", controlId: r });
2041
2041
  }, We = ne(() => {
2042
2042
  S.current = void 0, I({
2043
2043
  step: 1,
2044
2044
  control: $e(e, n, Array.from(_))
2045
- }), Z(null), T(null);
2045
+ }), J(null), T(null);
2046
2046
  }, [n, _, e]), oe = (r) => {
2047
2047
  I(
2048
- (g) => g && (() => {
2049
- const b = r(g.control);
2050
- g.control.source.kind === "manual" && b.source.kind === "sql_query" && (S.current = g.defaultValue);
2051
- const L = g.defaultValue === void 0 && g.control.source.kind === "sql_query" && b.source.kind === "manual" ? S.current : g.defaultValue, R = Dt({
2052
- previousControl: g.control,
2048
+ (x) => x && (() => {
2049
+ const b = r(x.control);
2050
+ x.control.source.kind === "manual" && b.source.kind === "sql_query" && (S.current = x.defaultValue);
2051
+ const L = x.defaultValue === void 0 && x.control.source.kind === "sql_query" && b.source.kind === "manual" ? S.current : x.defaultValue, R = Dt({
2052
+ previousControl: x.control,
2053
2053
  nextControl: b,
2054
2054
  currentDefaultValue: L
2055
2055
  });
2056
2056
  return b.source.kind === "manual" && (S.current = R), {
2057
- ...g,
2057
+ ...x,
2058
2058
  control: b,
2059
2059
  defaultValue: R
2060
2060
  };
@@ -2062,8 +2062,8 @@ function Sr({
2062
2062
  );
2063
2063
  }, Te = (r) => {
2064
2064
  I(
2065
- (g) => g && (g.control.source.kind === "manual" && (S.current = r), {
2066
- ...g,
2065
+ (x) => x && (x.control.source.kind === "manual" && (S.current = r), {
2066
+ ...x,
2067
2067
  defaultValue: r
2068
2068
  })
2069
2069
  );
@@ -2079,30 +2079,30 @@ function Sr({
2079
2079
  });
2080
2080
  if (p.step !== 2 && p.step !== 3 || !p.control.label.trim())
2081
2081
  return !1;
2082
- const g = p.control.source.kind === "sql_query" ? p.control : kt(p.control);
2083
- if (g.source.kind === "manual" && (aa(g) && g.source.options.length === 0 || g.source.options.some(
2082
+ const x = p.control.source.kind === "sql_query" ? p.control : kt(p.control);
2083
+ if (x.source.kind === "manual" && (aa(x) && x.source.options.length === 0 || x.source.options.some(
2084
2084
  (L) => L.label.trim().length === 0 || L.value.trim().length === 0
2085
2085
  )))
2086
2086
  return !1;
2087
- if (g.source.kind === "sql_query") {
2088
- const { connectionId: b, sql: L, valueColumn: R } = g.source;
2087
+ if (x.source.kind === "sql_query") {
2088
+ const { connectionId: b, sql: L, valueColumn: R } = x.source;
2089
2089
  return b.trim().length > 0 && L.trim().length > 0 && R.trim().length > 0;
2090
2090
  }
2091
2091
  return ra(
2092
- Fe(g, p.defaultValue)
2092
+ Fe(x, p.defaultValue)
2093
2093
  );
2094
2094
  })(), Ce = () => {
2095
2095
  var E;
2096
2096
  if (!p)
2097
2097
  return;
2098
- const r = kt(p.control), g = la({
2098
+ const r = kt(p.control), x = la({
2099
2099
  label: r.label,
2100
2100
  fallbackId: r.id,
2101
2101
  existingControls: n,
2102
2102
  reservedIds: Array.from(_)
2103
2103
  }), b = {
2104
2104
  ...r,
2105
- id: g
2105
+ id: x
2106
2106
  }, L = e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") && ((E = p.selectedCardIds) != null && E.length) ? It({
2107
2107
  control: b,
2108
2108
  participants: f || [],
@@ -2116,7 +2116,7 @@ function Sr({
2116
2116
  step: e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") ? 4 : 3,
2117
2117
  control: b,
2118
2118
  defaultValue: R,
2119
- createdControlId: g,
2119
+ createdControlId: x,
2120
2120
  selectedCardIds: p.selectedCardIds,
2121
2121
  matrixTargetIds: p.matrixTargetIds,
2122
2122
  cardBindingsById: L
@@ -2128,13 +2128,13 @@ function Sr({
2128
2128
  I(null);
2129
2129
  return;
2130
2130
  }
2131
- const r = p.control, g = p.createdControlId, b = Fe(
2131
+ const r = p.control, x = p.createdControlId, b = Fe(
2132
2132
  r,
2133
2133
  p.defaultValue
2134
2134
  );
2135
2135
  if (o) {
2136
2136
  const L = { ...o };
2137
- b === void 0 ? delete L[g] : L[g] = b, U(
2137
+ b === void 0 ? delete L[x] : L[x] = b, U(
2138
2138
  [
2139
2139
  ...n,
2140
2140
  {
@@ -2163,8 +2163,8 @@ function Sr({
2163
2163
  cardBindingsById: p.cardBindingsById
2164
2164
  }
2165
2165
  );
2166
- Z(g), I(null), k == null || k();
2167
- }, [n, p, o, U, k]), gt = p ? C(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${sa(p.control.label) || p.control.id}]]` : "", me = St({
2166
+ J(x), I(null), k == null || k();
2167
+ }, [n, p, o, U, k]), xt = p ? C(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${sa(p.control.label) || p.control.id}]]` : "", me = St({
2168
2168
  controls: n,
2169
2169
  defaultValues: o
2170
2170
  }), $ = p ? [...n, p.control] : n, ae = p ? St({
@@ -2183,7 +2183,7 @@ function Sr({
2183
2183
  qa,
2184
2184
  {
2185
2185
  currentStep: p.step,
2186
- labels: gt
2186
+ labels: xt
2187
2187
  }
2188
2188
  ),
2189
2189
  p.step === 1 && (() => {
@@ -2192,14 +2192,14 @@ function Sr({
2192
2192
  "aggregation_selector",
2193
2193
  "field_selector",
2194
2194
  "metric_selector"
2195
- ]), g = /* @__PURE__ */ new Set([
2195
+ ]), x = /* @__PURE__ */ new Set([
2196
2196
  // Temporarily hide these from the add-control dialog while
2197
2197
  // keeping the shared definitions for existing controls.
2198
2198
  "date",
2199
2199
  "text"
2200
- ]), b = x.filter(
2201
- (E) => !r.has(E.value) && !g.has(E.value)
2202
- ), L = x.filter(
2200
+ ]), b = g.filter(
2201
+ (E) => !r.has(E.value) && !x.has(E.value)
2202
+ ), L = g.filter(
2203
2203
  (E) => r.has(E.value)
2204
2204
  ), R = (E) => /* @__PURE__ */ l(
2205
2205
  "button",
@@ -2254,16 +2254,16 @@ function Sr({
2254
2254
  rn,
2255
2255
  {
2256
2256
  control: p.control,
2257
- onChange: (r) => oe((g) => ({
2258
- ...g,
2257
+ onChange: (r) => oe((x) => ({
2258
+ ...x,
2259
2259
  label: r
2260
2260
  }))
2261
2261
  }
2262
2262
  ),
2263
2263
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
2264
2264
  ] }),
2265
- J.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: J.map((r) => {
2266
- const g = (p.selectedCardIds || []).includes(r.cardId);
2265
+ Z.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: Z.map((r) => {
2266
+ const x = (p.selectedCardIds || []).includes(r.cardId);
2267
2267
  return /* @__PURE__ */ l(
2268
2268
  "label",
2269
2269
  {
@@ -2272,7 +2272,7 @@ function Sr({
2272
2272
  /* @__PURE__ */ t(
2273
2273
  Ue,
2274
2274
  {
2275
- checked: g,
2275
+ checked: x,
2276
2276
  onCheckedChange: (b) => I(
2277
2277
  (L) => L && {
2278
2278
  ...L,
@@ -2298,11 +2298,11 @@ function Sr({
2298
2298
  /* @__PURE__ */ t(
2299
2299
  yt,
2300
2300
  {
2301
- participants: J,
2301
+ participants: Z,
2302
2302
  selectedCardIds: p.selectedCardIds || [],
2303
2303
  control: p.control,
2304
2304
  selected: p.matrixTargetIds,
2305
- onChange: (r, g) => I((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: g } })
2305
+ onChange: (r, x) => I((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: x } })
2306
2306
  }
2307
2307
  ),
2308
2308
  /* @__PURE__ */ t(
@@ -2352,8 +2352,8 @@ function Sr({
2352
2352
  previewControlDefinitions: $,
2353
2353
  previewControlValues: ae,
2354
2354
  onControlChange: (r) => oe(() => r),
2355
- onLabelChange: (r) => oe((g) => ({
2356
- ...g,
2355
+ onLabelChange: (r) => oe((x) => ({
2356
+ ...x,
2357
2357
  label: r
2358
2358
  })),
2359
2359
  onDefaultValueChange: Te,
@@ -2377,8 +2377,8 @@ function Sr({
2377
2377
  previewControlDefinitions: $,
2378
2378
  previewControlValues: ae,
2379
2379
  onControlChange: (r) => oe(() => r),
2380
- onLabelChange: (r) => oe((g) => ({
2381
- ...g,
2380
+ onLabelChange: (r) => oe((x) => ({
2381
+ ...x,
2382
2382
  label: r
2383
2383
  })),
2384
2384
  onDefaultValueChange: Te,
@@ -2443,7 +2443,7 @@ function Sr({
2443
2443
  ] }) : null,
2444
2444
  !p && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: d }) : null,
2445
2445
  !p && n.map((r) => {
2446
- const g = z(r), b = i == null ? void 0 : i[r.id], L = Qe({
2446
+ const x = z(r), b = i == null ? void 0 : i[r.id], L = Qe({
2447
2447
  control: r,
2448
2448
  defaultValues: o
2449
2449
  }), R = P === r.id, E = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
@@ -2458,7 +2458,7 @@ function Sr({
2458
2458
  {
2459
2459
  type: "button",
2460
2460
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
2461
- onClick: () => Z(
2461
+ onClick: () => J(
2462
2462
  (F) => F === r.id ? null : r.id
2463
2463
  ),
2464
2464
  children: [
@@ -2510,7 +2510,7 @@ function Sr({
2510
2510
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
2511
2511
  /* @__PURE__ */ t(le, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
2512
2512
  /* @__PURE__ */ l(
2513
- xe,
2513
+ ge,
2514
2514
  {
2515
2515
  value: r.type,
2516
2516
  onValueChange: (F) => {
@@ -2523,7 +2523,7 @@ function Sr({
2523
2523
  U(B.controls, B.defaultValues);
2524
2524
  },
2525
2525
  children: [
2526
- /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2526
+ /* @__PURE__ */ t(xe, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2527
2527
  /* @__PURE__ */ t(ve, { children: q(r.type).map(
2528
2528
  (F) => /* @__PURE__ */ t(
2529
2529
  re,
@@ -2541,7 +2541,7 @@ function Sr({
2541
2541
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
2542
2542
  /* @__PURE__ */ t(le, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
2543
2543
  /* @__PURE__ */ l(
2544
- xe,
2544
+ ge,
2545
2545
  {
2546
2546
  value: r.placement || j,
2547
2547
  onValueChange: (F) => ee(r.id, (B) => ({
@@ -2549,7 +2549,7 @@ function Sr({
2549
2549
  placement: F
2550
2550
  })),
2551
2551
  children: [
2552
- /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2552
+ /* @__PURE__ */ t(xe, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2553
2553
  /* @__PURE__ */ t(ve, { children: D.map((F) => /* @__PURE__ */ t(re, { value: F.value, children: F.label }, F.value)) })
2554
2554
  ]
2555
2555
  }
@@ -2609,8 +2609,8 @@ function Sr({
2609
2609
  zt,
2610
2610
  {
2611
2611
  control: r,
2612
- availableFieldChoices: g.fields,
2613
- availableMetricChoices: g.metrics,
2612
+ availableFieldChoices: x.fields,
2613
+ availableMetricChoices: x.metrics,
2614
2614
  previewControlDefinitions: n,
2615
2615
  previewControlValues: me,
2616
2616
  controlLifecycle: "edit",
@@ -2674,7 +2674,7 @@ function Sr({
2674
2674
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
2675
2675
  /* @__PURE__ */ t(le, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
2676
2676
  /* @__PURE__ */ l(
2677
- xe,
2677
+ ge,
2678
2678
  {
2679
2679
  value: r.initialValueStrategy,
2680
2680
  onValueChange: (F) => ee(r.id, (B) => ({
@@ -2682,7 +2682,7 @@ function Sr({
2682
2682
  initialValueStrategy: F
2683
2683
  })),
2684
2684
  children: [
2685
- /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2685
+ /* @__PURE__ */ t(xe, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2686
2686
  /* @__PURE__ */ t(ve, { children: ia.map((F) => /* @__PURE__ */ t(
2687
2687
  re,
2688
2688
  {
@@ -2814,7 +2814,7 @@ function Ka({
2814
2814
  }, f = (I) => {
2815
2815
  const A = (S) => {
2816
2816
  if (S.id === I) {
2817
- const v = s[0] || m, x = qe(v.dataType) === "date";
2817
+ const v = s[0] || m, g = qe(v.dataType) === "date";
2818
2818
  return {
2819
2819
  ...S,
2820
2820
  conditions: [
@@ -2822,8 +2822,8 @@ function Ka({
2822
2822
  {
2823
2823
  id: `condition-${Date.now()}`,
2824
2824
  field: v,
2825
- operator: x ? "between" : "=",
2826
- value: x ? [] : ""
2825
+ operator: g ? "between" : "=",
2826
+ value: g ? [] : ""
2827
2827
  }
2828
2828
  ]
2829
2829
  };
@@ -2837,7 +2837,7 @@ function Ka({
2837
2837
  }, w = (I) => {
2838
2838
  const A = (S) => {
2839
2839
  if (S.id === I) {
2840
- const v = s[0] || m, x = qe(v.dataType) === "date";
2840
+ const v = s[0] || m, g = qe(v.dataType) === "date";
2841
2841
  return {
2842
2842
  ...S,
2843
2843
  groups: [
@@ -2850,8 +2850,8 @@ function Ka({
2850
2850
  {
2851
2851
  id: `condition-${Date.now()}`,
2852
2852
  field: v,
2853
- operator: x ? "between" : "=",
2854
- value: x ? [] : ""
2853
+ operator: g ? "between" : "=",
2854
+ value: g ? [] : ""
2855
2855
  }
2856
2856
  ],
2857
2857
  groups: []
@@ -2868,7 +2868,7 @@ function Ka({
2868
2868
  }, y = (I, A) => {
2869
2869
  const S = (v) => v.id === I ? {
2870
2870
  ...v,
2871
- conditions: v.conditions.filter((x) => x.id !== A)
2871
+ conditions: v.conditions.filter((g) => g.id !== A)
2872
2872
  } : {
2873
2873
  ...v,
2874
2874
  groups: v.groups.map(S)
@@ -2877,21 +2877,21 @@ function Ka({
2877
2877
  }, h = (I, A) => {
2878
2878
  const S = (v) => v.id === I ? {
2879
2879
  ...v,
2880
- groups: v.groups.filter((x) => x.id !== A)
2880
+ groups: v.groups.filter((g) => g.id !== A)
2881
2881
  } : {
2882
2882
  ...v,
2883
2883
  groups: v.groups.map(S)
2884
2884
  };
2885
2885
  d(S(o));
2886
2886
  }, N = (I, A, S) => {
2887
- const v = (x) => x.id === I ? {
2888
- ...x,
2889
- conditions: x.conditions.map(
2887
+ const v = (g) => g.id === I ? {
2888
+ ...g,
2889
+ conditions: g.conditions.map(
2890
2890
  (q) => q.id === A ? S(q) : q
2891
2891
  )
2892
2892
  } : {
2893
- ...x,
2894
- groups: x.groups.map(v)
2893
+ ...g,
2894
+ groups: g.groups.map(v)
2895
2895
  };
2896
2896
  d(v(o));
2897
2897
  }, k = (I, A, S) => N(I, A, (v) => ({
@@ -2916,51 +2916,51 @@ function Ka({
2916
2916
  };
2917
2917
  d(S(o));
2918
2918
  }, T = (I, A, S) => {
2919
- const v = (x) => x.id === I ? {
2920
- ...x,
2921
- conditions: Nt(x.conditions, A, S)
2919
+ const v = (g) => g.id === I ? {
2920
+ ...g,
2921
+ conditions: Nt(g.conditions, A, S)
2922
2922
  } : {
2923
- ...x,
2924
- groups: x.groups.map(v)
2923
+ ...g,
2924
+ groups: g.groups.map(v)
2925
2925
  };
2926
2926
  d(v(o));
2927
2927
  }, P = (I, A, S) => {
2928
- const v = (x) => x.id === I ? {
2929
- ...x,
2930
- groups: Nt(x.groups, A, S)
2928
+ const v = (g) => g.id === I ? {
2929
+ ...g,
2930
+ groups: Nt(g.groups, A, S)
2931
2931
  } : {
2932
- ...x,
2933
- groups: x.groups.map(v)
2932
+ ...g,
2933
+ groups: g.groups.map(v)
2934
2934
  };
2935
2935
  d(v(o));
2936
- }, Z = (I) => {
2936
+ }, J = (I) => {
2937
2937
  if (!I || I.conditions.length === 0 && I.groups.length === 0)
2938
2938
  return "-- No filters defined";
2939
2939
  const A = (v) => {
2940
- let x = "";
2941
- typeof v.field == "object" ? x = v.field.entityName ? `${v.field.entityName}.${v.field.name}` : v.field.name : x = String(v.field);
2940
+ let g = "";
2941
+ typeof v.field == "object" ? g = v.field.entityName ? `${v.field.entityName}.${v.field.name}` : v.field.name : g = String(v.field);
2942
2942
  const q = v.operator;
2943
2943
  let C = v.value;
2944
2944
  if (v.latestValue && q === "=")
2945
- return `${x} = ${qt} /* the latest value each time the card runs */`;
2946
- const J = Yt(v.relativeMeta);
2947
- if (J && (q === "between" || q === "not between")) {
2948
- const V = q === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: K } = zn(J, {
2945
+ return `${g} = ${qt} /* the latest value each time the card runs */`;
2946
+ const Z = Yt(v.relativeMeta);
2947
+ if (Z && (q === "between" || q === "not between")) {
2948
+ const V = q === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: K } = zn(Z, {
2949
2949
  tz: (D == null ? void 0 : D.tz) ?? "UTC",
2950
2950
  weekStart: (D == null ? void 0 : D.weekStart) ?? 1,
2951
2951
  anchor: (D == null ? void 0 : D.anchor) ?? "now"
2952
2952
  });
2953
- return K ? `${x} ${V} '${K.start.toISOString()}' AND '${K.end.toISOString()}' /* ${z}: dates update each time the card runs */` : Xt(J).dataAnchored ? `${x} ${V} ${z} /* dates count back from the latest data each time the card runs */` : `${x} ${V} ${z} /* dates follow your calendar each time the card runs */`;
2953
+ return K ? `${g} ${V} '${K.start.toISOString()}' AND '${K.end.toISOString()}' /* ${z}: dates update each time the card runs */` : Xt(Z).dataAnchored ? `${g} ${V} ${z} /* dates count back from the latest data each time the card runs */` : `${g} ${V} ${z} /* dates follow your calendar each time the card runs */`;
2954
2954
  }
2955
2955
  if (v.field.dataType === "string" && !["in", "not in"].includes(v.operator))
2956
2956
  typeof C == "string" ? C = `'${C}'` : Array.isArray(C) && (C = `'${C.join(", ")}'`);
2957
2957
  else if (v.field.dataType === "date" || v.field.dataType === "datetime" || v.field.dataType === "timestamp")
2958
2958
  if (v.operator === "between" && Array.isArray(C) && C.length === 2) {
2959
2959
  const V = C[0] ? `'${C[0]}'` : "NULL", z = C[1] ? `'${C[1]}'` : "NULL";
2960
- return `${x} BETWEEN ${V} AND ${z}`;
2960
+ return `${g} BETWEEN ${V} AND ${z}`;
2961
2961
  } else if ((v.operator === "in" || v.operator === "not in") && Array.isArray(C)) {
2962
2962
  const V = C.map((z) => z ? `'${z}'` : "NULL").join(", ");
2963
- return `${x} ${q} (${V})`;
2963
+ return `${g} ${q} (${V})`;
2964
2964
  } else typeof C == "string" || C instanceof Date ? C = `'${C}'` : Array.isArray(C) && C.length > 0 && (C = `'${C[0]}'`);
2965
2965
  else if (["in", "not in"].includes(v.operator)) {
2966
2966
  let V = [];
@@ -2973,24 +2973,24 @@ function Ka({
2973
2973
  }
2974
2974
  switch (q) {
2975
2975
  case "contains":
2976
- return typeof C == "string" ? `${x} LIKE '%${C.replace(/'/g, "")}'` : `${x} LIKE '%${String(C)}'`;
2976
+ return typeof C == "string" ? `${g} LIKE '%${C.replace(/'/g, "")}'` : `${g} LIKE '%${String(C)}'`;
2977
2977
  case "startsWith":
2978
- return typeof C == "string" ? `${x} LIKE '${C.replace(/'/g, "")}%'` : `${x} LIKE '${String(C)}%'`;
2978
+ return typeof C == "string" ? `${g} LIKE '${C.replace(/'/g, "")}%'` : `${g} LIKE '${String(C)}%'`;
2979
2979
  case "endsWith":
2980
- return typeof C == "string" ? `${x} LIKE '%${C.replace(/'/g, "")}'` : `${x} LIKE '%${String(C)}'`;
2980
+ return typeof C == "string" ? `${g} LIKE '%${C.replace(/'/g, "")}'` : `${g} LIKE '%${String(C)}'`;
2981
2981
  case "isNull":
2982
- return `${x} IS NULL`;
2982
+ return `${g} IS NULL`;
2983
2983
  case "isNotNull":
2984
- return `${x} IS NOT NULL`;
2984
+ return `${g} IS NOT NULL`;
2985
2985
  default:
2986
- return `${x} ${q} ${C}`;
2986
+ return `${g} ${q} ${C}`;
2987
2987
  }
2988
2988
  }, S = (v) => {
2989
- const x = v.conditions.map(A), q = v.groups.map(
2989
+ const g = v.conditions.map(A), q = v.groups.map(
2990
2990
  (z) => S(z)
2991
- ), C = [...x, ...q].filter(Boolean);
2991
+ ), C = [...g, ...q].filter(Boolean);
2992
2992
  if (C.length === 0) return "";
2993
- const J = C.join(` ${v.logicalOperator} `), V = C.length > 1 ? `(${J})` : J;
2993
+ const Z = C.join(` ${v.logicalOperator} `), V = C.length > 1 ? `(${Z})` : Z;
2994
2994
  return v.negate ? `NOT ${V}` : V;
2995
2995
  };
2996
2996
  return S(I);
@@ -3010,7 +3010,7 @@ function Ka({
3010
3010
  updateGroupNegate: O,
3011
3011
  reorderConditions: T,
3012
3012
  reorderGroups: P,
3013
- generateSQLPreview: Z,
3013
+ generateSQLPreview: J,
3014
3014
  hasAnyFilters: p
3015
3015
  };
3016
3016
  }
@@ -3043,7 +3043,7 @@ function Ha({
3043
3043
  const [d, c] = vt.useState(!1), i = vt.useMemo(
3044
3044
  () => new Set(e ? [e.id] : []),
3045
3045
  [e]
3046
- ), s = e ? Zt(e) : null;
3046
+ ), s = e ? Jt(e) : null;
3047
3047
  return /* @__PURE__ */ l(it, { modal: !0, open: d, onOpenChange: c, children: [
3048
3048
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3049
3049
  G,
@@ -3310,7 +3310,7 @@ function Xa({
3310
3310
  if (!e || m || o) return;
3311
3311
  const D = Array.isArray(e) ? e[0] : e;
3312
3312
  return Pe(D, i, "start");
3313
- }, [e, m, o, i]), h = (D) => n === "<=" || n === ">" ? ha(D, i) : xa(D, i);
3313
+ }, [e, m, o, i]), h = (D) => n === "<=" || n === ">" ? ha(D, i) : ga(D, i);
3314
3314
  return /* @__PURE__ */ t(
3315
3315
  Qn,
3316
3316
  {
@@ -3358,13 +3358,13 @@ function Xa({
3358
3358
  }
3359
3359
  );
3360
3360
  }
3361
- const Za = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3361
+ const Ja = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3362
3362
  "contains",
3363
3363
  "startsWith",
3364
3364
  "endsWith",
3365
3365
  "like",
3366
3366
  "not like"
3367
- ], Ja = [
3367
+ ], Za = [
3368
3368
  "=",
3369
3369
  "!=",
3370
3370
  ">",
@@ -3426,7 +3426,7 @@ const Za = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3426
3426
  "not between": "Not between"
3427
3427
  };
3428
3428
  function Xe(e) {
3429
- return rr[e] || ga(e);
3429
+ return rr[e] || xa(e);
3430
3430
  }
3431
3431
  function sr(e) {
3432
3432
  switch (e) {
@@ -3439,23 +3439,23 @@ function sr(e) {
3439
3439
  case "date":
3440
3440
  return ar;
3441
3441
  default:
3442
- return Ja;
3442
+ return Za;
3443
3443
  }
3444
3444
  }
3445
- const ln = "w-[68px] shrink-0", $t = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", xt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
3445
+ const ln = "w-[68px] shrink-0", $t = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", gt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
3446
3446
  function dn({
3447
3447
  value: e,
3448
3448
  onValueChange: n,
3449
3449
  "aria-label": a
3450
3450
  }) {
3451
3451
  return /* @__PURE__ */ l(
3452
- xe,
3452
+ ge,
3453
3453
  {
3454
3454
  value: e,
3455
3455
  onValueChange: (o) => n(o),
3456
3456
  children: [
3457
3457
  /* @__PURE__ */ t(
3458
- ge,
3458
+ xe,
3459
3459
  {
3460
3460
  size: "xs",
3461
3461
  "aria-label": a,
@@ -3522,7 +3522,7 @@ function cn({
3522
3522
  onValueChange: (T) => d(a, T),
3523
3523
  "aria-label": "Logical operator"
3524
3524
  }
3525
- ) : /* @__PURE__ */ t("span", { className: M(ln, "text-center", xt), children: "Where" }),
3525
+ ) : /* @__PURE__ */ t("span", { className: M(ln, "text-center", gt), children: "Where" }),
3526
3526
  /* @__PURE__ */ t(
3527
3527
  Ha,
3528
3528
  {
@@ -3540,7 +3540,7 @@ function cn({
3540
3540
  }
3541
3541
  ),
3542
3542
  /* @__PURE__ */ l(
3543
- xe,
3543
+ ge,
3544
3544
  {
3545
3545
  value: e.operator,
3546
3546
  onValueChange: (T) => m(
@@ -3550,7 +3550,7 @@ function cn({
3550
3550
  ),
3551
3551
  children: [
3552
3552
  /* @__PURE__ */ t(
3553
- ge,
3553
+ xe,
3554
3554
  {
3555
3555
  size: "xs",
3556
3556
  "aria-label": "Operator",
@@ -3596,14 +3596,14 @@ function cn({
3596
3596
  className: "min-w-0 flex-1"
3597
3597
  }
3598
3598
  ) : D === "boolean" ? /* @__PURE__ */ l(
3599
- xe,
3599
+ ge,
3600
3600
  {
3601
3601
  value: typeof e.value == "boolean" ? String(e.value) : "",
3602
3602
  onValueChange: (T) => s(a, e.id, {
3603
3603
  value: T === "true"
3604
3604
  }),
3605
3605
  children: [
3606
- /* @__PURE__ */ t(ge, { size: "xs", className: "min-w-0 flex-1", children: /* @__PURE__ */ t(be, { placeholder: "Select value…" }) }),
3606
+ /* @__PURE__ */ t(xe, { size: "xs", className: "min-w-0 flex-1", children: /* @__PURE__ */ t(be, { placeholder: "Select value…" }) }),
3607
3607
  /* @__PURE__ */ l(ve, { children: [
3608
3608
  /* @__PURE__ */ t(re, { value: "true", children: "True" }),
3609
3609
  /* @__PURE__ */ t(re, { value: "false", children: "False" })
@@ -3719,31 +3719,31 @@ function or({
3719
3719
  transform: O,
3720
3720
  transition: T,
3721
3721
  isDragging: P
3722
- } = Ut({ id: e.id }), Z = {
3722
+ } = Ut({ id: e.id }), J = {
3723
3723
  transform: Gt.Transform.toString(O),
3724
3724
  transition: T
3725
3725
  }, p = (A) => {
3726
3726
  const { active: S, over: v } = A;
3727
3727
  if (v && S.id !== v.id) {
3728
- const x = e.conditions.findIndex(
3728
+ const g = e.conditions.findIndex(
3729
3729
  (C) => C.id === S.id
3730
3730
  ), q = e.conditions.findIndex(
3731
3731
  (C) => C.id === v.id
3732
3732
  );
3733
- x !== -1 && q !== -1 && i(e.id, x, q);
3733
+ g !== -1 && q !== -1 && i(e.id, g, q);
3734
3734
  }
3735
3735
  }, I = (A) => {
3736
3736
  const { active: S, over: v } = A;
3737
3737
  if (v && S.id !== v.id && a) {
3738
- const x = e.groups.findIndex((C) => C.id === S.id), q = e.groups.findIndex((C) => C.id === v.id);
3739
- x !== -1 && q !== -1 && s(a, x, q);
3738
+ const g = e.groups.findIndex((C) => C.id === S.id), q = e.groups.findIndex((C) => C.id === v.id);
3739
+ g !== -1 && q !== -1 && s(a, g, q);
3740
3740
  }
3741
3741
  };
3742
3742
  return /* @__PURE__ */ l(
3743
3743
  "div",
3744
3744
  {
3745
3745
  ref: j,
3746
- style: Z,
3746
+ style: J,
3747
3747
  className: M(
3748
3748
  n > 0 && "mt-2 overflow-hidden rounded-[6px] border border-border/60",
3749
3749
  P && "z-50 opacity-50"
@@ -3782,7 +3782,7 @@ function or({
3782
3782
  "aria-label": "Group logical operator"
3783
3783
  }
3784
3784
  ),
3785
- /* @__PURE__ */ t("span", { className: xt, children: "Group" })
3785
+ /* @__PURE__ */ t("span", { className: gt, children: "Group" })
3786
3786
  ] }),
3787
3787
  /* @__PURE__ */ t(
3788
3788
  G,
@@ -3801,10 +3801,10 @@ function or({
3801
3801
  /* @__PURE__ */ t(
3802
3802
  Re,
3803
3803
  {
3804
- sensors: Ze(
3804
+ sensors: Je(
3805
3805
  he(tt),
3806
3806
  he(et, {
3807
- coordinateGetter: Je
3807
+ coordinateGetter: Ze
3808
3808
  })
3809
3809
  ),
3810
3810
  collisionDetection: Ee,
@@ -3837,10 +3837,10 @@ function or({
3837
3837
  /* @__PURE__ */ t(
3838
3838
  Re,
3839
3839
  {
3840
- sensors: Ze(
3840
+ sensors: Je(
3841
3841
  he(tt),
3842
3842
  he(et, {
3843
- coordinateGetter: Je
3843
+ coordinateGetter: Ze
3844
3844
  })
3845
3845
  ),
3846
3846
  collisionDetection: Ee,
@@ -3894,21 +3894,21 @@ function Ir({
3894
3894
  reorderConditions: O,
3895
3895
  reorderGroups: T,
3896
3896
  generateSQLPreview: P,
3897
- hasAnyFilters: Z
3897
+ hasAnyFilters: J
3898
3898
  } = Ka({
3899
3899
  initialFilters: e,
3900
3900
  availableFields: n,
3901
3901
  ...c ? {
3902
- onChange: (x) => c(Za(x) ? x : null)
3902
+ onChange: (g) => c(Ja(g) ? g : null)
3903
3903
  } : {}
3904
- }), p = Ze(
3904
+ }), p = Je(
3905
3905
  he(tt),
3906
3906
  he(et, {
3907
- coordinateGetter: Je
3907
+ coordinateGetter: Ze
3908
3908
  })
3909
- ), [I, A] = H(!1), S = (x, q = 0, C) => {
3909
+ ), [I, A] = H(!1), S = (g, q = 0, C) => {
3910
3910
  if (q === 0) {
3911
- const J = x.conditions.length === 0 && x.groups.length === 0;
3911
+ const Z = g.conditions.length === 0 && g.groups.length === 0;
3912
3912
  return /* @__PURE__ */ l("div", { children: [
3913
3913
  /* @__PURE__ */ t(
3914
3914
  Re,
@@ -3918,26 +3918,26 @@ function Ir({
3918
3918
  onDragEnd: (V) => {
3919
3919
  const { active: z, over: K } = V;
3920
3920
  if (K && z.id !== K.id) {
3921
- const U = x.conditions.findIndex(
3921
+ const U = g.conditions.findIndex(
3922
3922
  (te) => te.id === z.id
3923
- ), ee = x.conditions.findIndex(
3923
+ ), ee = g.conditions.findIndex(
3924
3924
  (te) => te.id === K.id
3925
3925
  );
3926
- U !== -1 && ee !== -1 && O(x.id, U, ee);
3926
+ U !== -1 && ee !== -1 && O(g.id, U, ee);
3927
3927
  }
3928
3928
  },
3929
3929
  children: /* @__PURE__ */ t(
3930
3930
  ze,
3931
3931
  {
3932
- items: x.conditions.map((V) => V.id),
3932
+ items: g.conditions.map((V) => V.id),
3933
3933
  strategy: Me,
3934
- children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: x.conditions.map((V, z) => /* @__PURE__ */ t(
3934
+ children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: g.conditions.map((V, z) => /* @__PURE__ */ t(
3935
3935
  cn,
3936
3936
  {
3937
3937
  condition: V,
3938
3938
  index: z,
3939
- groupId: x.id,
3940
- groupLogicalOperator: x.logicalOperator,
3939
+ groupId: g.id,
3940
+ groupLogicalOperator: g.logicalOperator,
3941
3941
  onRemoveCondition: h,
3942
3942
  onUpdateGroupOperator: D,
3943
3943
  availableFields: m,
@@ -3959,44 +3959,44 @@ function Ir({
3959
3959
  onDragEnd: (V) => {
3960
3960
  const { active: z, over: K } = V;
3961
3961
  if (K && z.id !== K.id) {
3962
- const U = x.groups.findIndex(
3962
+ const U = g.groups.findIndex(
3963
3963
  (te) => te.id === z.id
3964
- ), ee = x.groups.findIndex(
3964
+ ), ee = g.groups.findIndex(
3965
3965
  (te) => te.id === K.id
3966
3966
  );
3967
- U !== -1 && ee !== -1 && T(x.id, U, ee);
3967
+ U !== -1 && ee !== -1 && T(g.id, U, ee);
3968
3968
  }
3969
3969
  },
3970
3970
  children: /* @__PURE__ */ t(
3971
3971
  ze,
3972
3972
  {
3973
- items: x.groups.map((V) => V.id),
3973
+ items: g.groups.map((V) => V.id),
3974
3974
  strategy: Me,
3975
- children: x.groups.map(
3976
- (V) => S(V, q + 1, x.id)
3975
+ children: g.groups.map(
3976
+ (V) => S(V, q + 1, g.id)
3977
3977
  )
3978
3978
  }
3979
3979
  )
3980
3980
  }
3981
3981
  ),
3982
- J && !i && /* @__PURE__ */ t("p", { className: "rounded-control border border-dashed border-border/60 px-3 py-2 text-center text-[11.5px] text-muted-foreground", children: "No filters yet. Add a condition to limit the rows this card shows." }),
3982
+ Z && !i && /* @__PURE__ */ t("p", { className: "rounded-control border border-dashed border-border/60 px-3 py-2 text-center text-[11.5px] text-muted-foreground", children: "No filters yet. Add a condition to limit the rows this card shows." }),
3983
3983
  /* @__PURE__ */ t(
3984
3984
  un,
3985
3985
  {
3986
- onAddCondition: () => w(x.id),
3986
+ onAddCondition: () => w(g.id),
3987
3987
  onAddGroup: (
3988
3988
  // In place, grouping is offered once there are two conditions to group,
3989
3989
  // not as a mode to switch on first.
3990
- (i ? x.conditions.length + x.groups.length >= 2 : I) ? () => y(x.id) : void 0
3990
+ (i ? g.conditions.length + g.groups.length >= 2 : I) ? () => y(g.id) : void 0
3991
3991
  )
3992
3992
  }
3993
3993
  )
3994
- ] }, x.id);
3994
+ ] }, g.id);
3995
3995
  }
3996
3996
  return /* @__PURE__ */ t(
3997
3997
  or,
3998
3998
  {
3999
- group: x,
3999
+ group: g,
4000
4000
  depth: q,
4001
4001
  parentGroupId: C,
4002
4002
  onUpdateGroupOperator: D,
@@ -4013,7 +4013,7 @@ function Ir({
4013
4013
  updateConditionFields: k,
4014
4014
  replaceCondition: _
4015
4015
  },
4016
- x.id
4016
+ g.id
4017
4017
  );
4018
4018
  }, v = Hn(e);
4019
4019
  return /* @__PURE__ */ l("div", { className: M("group/filters", i ? "flex flex-col" : "flex min-h-0 flex-1 flex-col"), "data-inline": i || void 0, children: [
@@ -4029,7 +4029,7 @@ function Ir({
4029
4029
  size: "xs",
4030
4030
  id: "advanced-mode",
4031
4031
  checked: I,
4032
- onCheckedChange: (x) => A(x)
4032
+ onCheckedChange: (g) => A(g)
4033
4033
  }
4034
4034
  ),
4035
4035
  /* @__PURE__ */ t(
@@ -4042,8 +4042,8 @@ function Ir({
4042
4042
  ),
4043
4043
  /* @__PURE__ */ t("span", { className: "text-[11px] text-muted-foreground", children: "Nest conditions in groups" })
4044
4044
  ] }),
4045
- Z && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4046
- /* @__PURE__ */ t("div", { className: M("mb-1.5", xt), children: "Where clause" }),
4045
+ J && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4046
+ /* @__PURE__ */ t("div", { className: M("mb-1.5", gt), children: "Where clause" }),
4047
4047
  /* @__PURE__ */ t("pre", { className: "overflow-x-auto whitespace-pre-wrap break-words rounded-[6px] border border-border bg-muted/40 px-3 py-2 font-mono text-[12px] leading-[1.55] text-foreground", children: P(s) })
4048
4048
  ] })
4049
4049
  ] }),
@@ -4064,7 +4064,7 @@ function Ir({
4064
4064
  G,
4065
4065
  {
4066
4066
  size: "xs",
4067
- onClick: () => o == null ? void 0 : o(Z ? s : null),
4067
+ onClick: () => o == null ? void 0 : o(J ? s : null),
4068
4068
  children: "Apply filters"
4069
4069
  }
4070
4070
  )
@@ -4081,7 +4081,7 @@ export {
4081
4081
  kr as V,
4082
4082
  wr as a,
4083
4083
  Ir as b,
4084
- Jt as c,
4084
+ Zt as c,
4085
4085
  Ma as d,
4086
4086
  Va as g,
4087
4087
  en as i,