react-semaphor 0.1.601 → 0.1.603

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 (123) hide show
  1. package/dist/analytics-protocol/index.js +415 -375
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
  8. package/dist/chunks/{assistant-chat-BE0XXzZP.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-DXDAN5AY.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-BMyB3Tb6.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-CE0-YVN5.js → card-filter-builder-Y22HizVx.js} +474 -474
  12. package/dist/chunks/{comparison-window-caption-Dxj2CHOa.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
  13. package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
  14. package/dist/chunks/{dashboard-mJKPFRbb.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CntwKyiZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +725 -716
  16. package/dist/chunks/{dashboard-controls-XO089DMg.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-CQRiydUv.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-f-Dm-BLR.js → edit-dashboard-visual-oxt3x1wb.js} +8081 -8268
  20. package/dist/chunks/{filter-line-CKNMyNTQ.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-B8GGyVuR.js → filter-reach-copy-CE_ZX147.js} +1786 -2214
  22. package/dist/chunks/{filter-value-text-CRtKecI5.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-DoPApnxg.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-CiSCZdIr.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-myf3D3Qx.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
  26. package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
  27. package/dist/chunks/{matrix-operation-contract-C1SuOHLZ.js → matrix-operation-contract-DPBj69D8.js} +518 -514
  28. package/dist/chunks/{metric-comparison-Cm0G893W.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-DQIwqlck.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-Cun747Rg.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C1Dyx8du.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-CBS-ssEp.js → pivot-result-identity-CAP4--iq.js} +1 -1
  33. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
  34. package/dist/chunks/{report-preferences-dialog-SDZEcG2x.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-BbedQdtc.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DRBS0eRa.js → resolve-dashboard-input-context-Rtl1ffmE.js} +8808 -7291
  37. package/dist/chunks/{save-Dj5bjm7P.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DWVlJcsa.js → saved-dashboard-context-tcyTU8jm.js} +199 -213
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-OFOoAY-A.js → semaphor-ready-indicator-FBvunj6S.js} +37894 -35726
  41. package/dist/chunks/{shelf-drop-preview-context-2swWypXu.js → shelf-drop-preview-context-QKStrcK9.js} +54 -54
  42. package/dist/chunks/{stored-dashboard-NtOuEX6a.js → stored-dashboard-CHozcAY9.js} +770 -743
  43. package/dist/chunks/{style-sheet-parts-Qv4UcLAo.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-Do7ZB0_F.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-Dy_aXO-U.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Bq-puSVy.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-C7DFk3QK.js → validators-Baf3VIf5.js} +5 -5
  48. package/dist/chunks/{variable-draft-Cy03qnEi.js → variable-draft-C2y8Jp6Z.js} +27 -28
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +3392 -2761
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +73 -75
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/dashboard/dashboard-web-component.d.ts +7 -0
  57. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  58. package/dist/types/index.js +5 -5
  59. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +1 -1
  60. package/dist/types/lib/document/document-edits.d.ts +0 -4
  61. package/dist/types/lib/query-context/assemble-card-query.d.ts +6 -1
  62. package/dist/types/lib/stores/dashboard-store.d.ts +30 -1
  63. package/dist/types/lib/types/common-types.d.ts +0 -2
  64. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  65. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +15 -0
  66. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  67. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  68. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  69. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  70. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  71. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  72. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  73. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  74. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  75. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  76. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  77. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +52 -0
  78. package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +129 -0
  79. package/dist/types/shared/dashboard-authoring/calculations/resolve-dashboard-field-copies.d.ts +46 -0
  80. package/dist/types/shared/dashboard-authoring/calculations/tokens.d.ts +36 -0
  81. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  82. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  83. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  84. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  85. package/dist/types/shared/dashboard-authoring/changes/calculation-change.d.ts +399 -0
  86. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +165 -360
  87. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +23 -2
  88. package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +143 -266
  89. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +46 -0
  91. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  92. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  93. package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
  94. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  95. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  96. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  97. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  98. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  99. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  100. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  101. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  102. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  103. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +158 -0
  104. package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +71 -0
  105. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +17 -6
  106. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -0
  107. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  108. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  109. package/dist/types/shared/format-utils/index.d.ts +1 -0
  110. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  111. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  112. package/dist/types/shared/temporal/index.d.ts +2 -0
  113. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  114. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  115. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  116. package/dist/types/shared/usage-events/details.d.ts +2 -2
  117. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  118. package/dist/usage-events/index.js +1 -1
  119. package/package.json +3 -2
  120. package/dist/chunks/dates-B-Urp5OD.js +0 -164
  121. package/dist/chunks/matrix-member-presentation-g0c_NpDW.js +0 -258
  122. package/dist/chunks/raw-temporal-value-DN_l-Tss.js +0 -454
  123. package/dist/chunks/selection-filter-compiler-DmAr7yqC.js +0 -131
@@ -1,18 +1,18 @@
1
- import { c as nt, B as G, X as ce, x as Ne, q as hn, a3 as gn, t as at, u as rt, v as st, w as ot, a4 as Ft, F as _e, s as ie, y as ge, z as xe, A as be, D as ve, E as re, e as lt, f as it, h as dt, L as xn, d as bn } from "./style-sheet-parts-Qv4UcLAo.js";
2
- import { jsx as t, jsxs as i, Fragment as fe } from "react/jsx-runtime";
1
+ import { c as nt, B as G, X as ce, x as Ne, q as fn, a3 as xn, t as at, u as rt, v as st, w as ot, a4 as Ft, F as _e, s as ie, y as xe, z as ge, A as be, D as ve, E as re, e as lt, f as it, h as dt, L as gn, d as bn } from "./style-sheet-parts-CDCG-8Ej.js";
2
+ import { jsx as t, jsxs as i, Fragment as he } from "react/jsx-runtime";
3
3
  import * as Fe from "react";
4
4
  import bt, { useMemo as P, useState as Y, useRef as $e, useCallback as ne, useEffect as de, forwardRef as vn, Fragment as yn } from "react";
5
- import { b8 as ct, u as ut, am as se, bL as Vt, bM as J, bN as Nn, bO as Te, bP as Ue, bQ as Rt, bR as Cn, bS as Ve, bT as wn, an as Et, bG as kn, bH as Sn, bJ as Dn, bU as Tn, bV as In, o as Ln, bW as $n, bX as An, bY as vt, bZ as zt, b_ as On, b$ as Mt, c0 as jt, c1 as _n, c2 as Fn, c3 as Vn, c4 as Rn, c5 as En, c6 as zn, c7 as Mn, bz as jn, c8 as yt, c9 as qt, ca as Nt, bC as qn, cb as Un, cc as Gn, cd as Bn, ce as ye, cf as Ut, cg as Wn, ch as Qn, ci as Kn, cj as Pn, ck as Hn, cl as Je, cm as he, cn as Ze, co as et, cp as tt, cq as Yn, cr as Re, cs as Ee, ct as ze, cu as Me, cv as Gt, cw as Bt, cx as Wt } from "./semaphor-ready-indicator-OFOoAY-A.js";
6
- import { D as Xn } from "./token-types-Dy_aXO-U.js";
7
- import { gt as Qt, cy as Kt, cx as Pt, gu as Jn, gv as Zn, gw as Ae, gx as Ct, gy as wt, gz as Qe, gA as Ke, gB as ea, gC as ta, gD as kt, gE as na, gF as aa, gG as Oe, gH as ra, gI as St, gJ as Ht, gK as Yt, gL as Xt, gM as Jt, gN as sa, gO as oa, gP as Dt, gQ as la, gR as Tt, gS as ia, gT as da, gU as ca, gV as ua, gW as Pe, a as je, gX as ma, gY as It, gZ as pa, g_ as He, bt as fa, g$ as ha, h0 as ga, h1 as xa, h2 as ba } from "./resolve-dashboard-input-context-DRBS0eRa.js";
8
- import { c as j } from "./pickers-DkqmtnTL.js";
9
- import { k as Zt, r as va, aE as en, aF as tn } from "./validators-C7DFk3QK.js";
10
- import "./matrix-operation-contract-C1SuOHLZ.js";
11
- import "./analytics-base-schemas-DevrgqQb.js";
5
+ import { b8 as ct, u as ut, am as se, bM as Vt, bN as Z, bO as Nn, bP as Te, bQ as Ue, bR as Rt, bS as Cn, bT as Ve, bU as wn, an as Et, bH as kn, bI as Sn, bK as Dn, bV as Tn, bW as In, o as Ln, bX as $n, bY as An, bZ as vt, b_ as zt, b$ as On, c0 as Mt, c1 as qt, c2 as _n, c3 as Fn, c4 as Vn, c5 as Rn, c6 as En, c7 as zn, c8 as Mn, bA as qn, c9 as yt, ca as jt, cb as Nt, bD as jn, cc as Un, cd as Gn, ce as Bn, cf as ye, cg as Ut, ch as Wn, ci as Kn, cj as Qn, ck as Pn, cl as Hn, cm as Ze, cn as fe, co as Je, cp as et, cq as tt, cr as Yn, cs as Re, ct as Ee, cu as ze, cv as Me, cw as Gt, cx as Bt, cy as Wt } from "./semaphor-ready-indicator-FBvunj6S.js";
6
+ import { D as Xn } from "./token-types-XbM6QByy.js";
7
+ import { hx as Kt, cP as Qt, cO as Pt, hy as Zn, hz as Jn, hA as Ae, hB as Ct, hC as wt, hD as Ke, hE as Qe, hF as ea, hG as ta, hH as kt, hI as na, hJ as aa, hK as Oe, hL as ra, hM as St, hN as Ht, hO as Yt, hP as Xt, hQ as Zt, hR as sa, hS as oa, hT as Dt, hU as la, hV as Tt, hW as ia, hX as da, hY as ca, hZ as ua, h_ as Pe, e as qe, h$ as ma, i0 as It, i1 as pa, i2 as He, aT as ha, i3 as fa, i4 as xa, i5 as ga, i6 as ba } from "./resolve-dashboard-input-context-Rtl1ffmE.js";
8
+ import { c as q } from "./pickers-DkqmtnTL.js";
9
+ import { k as Jt, r as va, aE as en, aF as tn } from "./validators-Baf3VIf5.js";
10
+ import "./matrix-operation-contract-DPBj69D8.js";
11
+ import "./analytics-base-schemas-DsUh5Q3C.js";
12
12
  import "../value-format-preferences/index.js";
13
- import { U as ya } from "./upload-Bq-puSVy.js";
14
- import { a as nn } from "./metric-comparison-Cm0G893W.js";
15
- import { r as Na, j as Ca } from "./raw-temporal-value-DN_l-Tss.js";
13
+ import { U as ya } from "./upload-H15d7uHK.js";
14
+ import { a as nn } from "./metric-comparison-B0FR-Q8I.js";
15
+ import { r as Na, m as Ca } from "./raw-temporal-value-Dg_MTFF7.js";
16
16
  /**
17
17
  * @license lucide-react v0.453.0 - ISC
18
18
  *
@@ -101,8 +101,8 @@ function an(e) {
101
101
  (s) => s.selectedConnectionId
102
102
  ), se(
103
103
  (s) => {
104
- var c, g;
105
- return (g = (c = s == null ? void 0 : s.card) == null ? void 0 : c.dataSource) == null ? void 0 : g.connectionId;
104
+ var c, x;
105
+ return (x = (c = s == null ? void 0 : s.card) == null ? void 0 : c.dataSource) == null ? void 0 : x.connectionId;
106
106
  }
107
107
  );
108
108
  const {
@@ -113,7 +113,7 @@ function an(e) {
113
113
  isError: l
114
114
  } = Vt({
115
115
  queryKey: ["semantic-domains"],
116
- queryFn: () => Qt(
116
+ queryFn: () => Kt(
117
117
  `${n.apiServiceUrl}/v1/domains`,
118
118
  (a == null ? void 0 : a.accessToken) || ""
119
119
  ),
@@ -132,10 +132,10 @@ function an(e) {
132
132
  }
133
133
  function Ta(e, n) {
134
134
  if (e.some(
135
- (d) => J(d, n)
135
+ (d) => Z(d, n)
136
136
  ))
137
137
  return e.filter(
138
- (d) => !J(d, n)
138
+ (d) => !Z(d, n)
139
139
  );
140
140
  const o = Pt(e);
141
141
  return e.some(
@@ -143,7 +143,7 @@ function Ta(e, n) {
143
143
  ) || [...o].some((d) => d !== n.domainId) ? [n] : [...e, n];
144
144
  }
145
145
  function Ia(e, n) {
146
- const a = Kt(n), o = Pt(e), m = e.some(
146
+ const a = Qt(n), o = Pt(e), m = e.some(
147
147
  (u) => !("domainId" in u)
148
148
  );
149
149
  if (a && (m || [...o].some(
@@ -152,7 +152,7 @@ function Ia(e, n) {
152
152
  return n;
153
153
  const d = [...e];
154
154
  for (const u of n)
155
- d.some((l) => J(l, u)) || d.push(u);
155
+ d.some((l) => Z(l, u)) || d.push(u);
156
156
  return d;
157
157
  }
158
158
  function La({
@@ -162,7 +162,7 @@ function La({
162
162
  selectedEntities: o,
163
163
  onSelectionChange: m
164
164
  }) {
165
- const { semanticDomains: d, isSemanticDomainsLoading: u } = an(), l = P(() => Aa(d, e), [d, e]), s = P(() => a ? l.filter((g) => g.id === a) : l, [l, a]);
165
+ const { semanticDomains: d, isSemanticDomainsLoading: u } = an(), l = P(() => Aa(d, e), [d, e]), s = P(() => a ? l.filter((x) => x.id === a) : l, [l, a]);
166
166
  if (u && s.length === 0)
167
167
  return /* @__PURE__ */ t("div", { className: "px-3 py-4 text-[11px] text-muted-foreground", children: "Loading semantic domains…" });
168
168
  if (s.length === 0)
@@ -170,16 +170,16 @@ function La({
170
170
  const c = !!a;
171
171
  return /* @__PURE__ */ i("div", { children: [
172
172
  /* @__PURE__ */ t(rn, { label: "Semantic Domains" }),
173
- s.map((g) => /* @__PURE__ */ t(
173
+ s.map((x) => /* @__PURE__ */ t(
174
174
  $a,
175
175
  {
176
- domain: g,
176
+ domain: x,
177
177
  search: n,
178
178
  forceExpanded: c,
179
179
  selectedEntities: o,
180
180
  onSelectionChange: m
181
181
  },
182
- g.id
182
+ x.id
183
183
  ))
184
184
  ] });
185
185
  }
@@ -192,28 +192,28 @@ function $a({
192
192
  }) {
193
193
  const [d, u] = Y(!1), l = d || n.length > 0 || !!a, { datasets: s, isPending: c } = Nn(
194
194
  l ? e.id : void 0
195
- ), g = P(() => {
195
+ ), x = P(() => {
196
196
  if (!n) return s;
197
197
  const C = n.trim().toLowerCase();
198
198
  return s.filter(
199
199
  (T) => `${T.label ?? ""} ${T.name ?? ""} ${T.description ?? ""}`.toLowerCase().includes(C)
200
200
  );
201
- }, [s, n]), k = n.length > 0 && g.length > 0, y = d || k || !!a, h = s.length, N = P(() => g.filter(
201
+ }, [s, n]), k = n.length > 0 && x.length > 0, y = d || k || !!a, f = s.length, N = P(() => x.filter(
202
202
  (C) => o.some(
203
- (T) => J(T, Le(C))
203
+ (T) => Z(T, Le(C))
204
204
  )
205
- ).length, [g, o]), S = P(
206
- () => g.map(Le),
207
- [g]
205
+ ).length, [x, o]), S = P(
206
+ () => x.map(Le),
207
+ [x]
208
208
  ), V = S.length > 0 && S.every(
209
- (C) => o.some((T) => J(T, C))
209
+ (C) => o.some((T) => Z(T, C))
210
210
  ), F = () => {
211
211
  if (S.length !== 0) {
212
212
  if (V) {
213
213
  m(
214
214
  o.filter(
215
215
  (C) => !S.some(
216
- (T) => J(C, T)
216
+ (T) => Z(C, T)
217
217
  )
218
218
  )
219
219
  );
@@ -226,7 +226,7 @@ function $a({
226
226
  )
227
227
  );
228
228
  }
229
- }, K = (C) => {
229
+ }, Q = (C) => {
230
230
  const T = Le(C);
231
231
  m(
232
232
  Ta(
@@ -247,7 +247,7 @@ function $a({
247
247
  /* @__PURE__ */ t(
248
248
  Te,
249
249
  {
250
- className: j(
250
+ className: q(
251
251
  "h-3 w-3 shrink-0 text-muted-foreground transition-transform",
252
252
  y && "rotate-90"
253
253
  ),
@@ -255,11 +255,11 @@ function $a({
255
255
  }
256
256
  ),
257
257
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || e.name }),
258
- h > 0 && /* @__PURE__ */ i("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: [
258
+ f > 0 && /* @__PURE__ */ i("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: [
259
259
  "· ",
260
- h,
260
+ f,
261
261
  " dataset",
262
- h === 1 ? "" : "s",
262
+ f === 1 ? "" : "s",
263
263
  " · curated"
264
264
  ] })
265
265
  ]
@@ -276,16 +276,16 @@ function $a({
276
276
  ),
277
277
  /* @__PURE__ */ t("span", { className: "ml-auto font-mono text-[10px] tabular-nums text-muted-foreground", children: N > 0 ? N : "" })
278
278
  ] }),
279
- y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: c && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) : g.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "No datasets in this domain." }) : g.map((C) => {
279
+ y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: c && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) : x.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "No datasets in this domain." }) : x.map((C) => {
280
280
  const T = Le(C), U = o.some(
281
- (Z) => J(Z, T)
281
+ (J) => Z(J, T)
282
282
  );
283
283
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ i("label", { className: "flex cursor-pointer items-start gap-2 rounded-[4px] px-9 py-1.5 transition-colors hover:bg-muted/40", children: [
284
284
  /* @__PURE__ */ t(
285
285
  Ue,
286
286
  {
287
287
  checked: U,
288
- onCheckedChange: () => K(C),
288
+ onCheckedChange: () => Q(C),
289
289
  className: "mt-[3px] h-3.5 w-3.5 shrink-0"
290
290
  }
291
291
  ),
@@ -362,7 +362,7 @@ function _a({
362
362
  onSelectionChange: m
363
363
  }) {
364
364
  var N;
365
- const [d, u] = Y(!1), l = d || n.length > 0 || !!a, s = ((N = e.capabilities) == null ? void 0 : N.path) ?? [], c = s.includes("database"), g = s.includes("schema"), k = e.type === "upload", y = e.type === "url", h = P(
365
+ const [d, u] = Y(!1), l = d || n.length > 0 || !!a, s = ((N = e.capabilities) == null ? void 0 : N.path) ?? [], c = s.includes("database"), x = s.includes("schema"), k = e.type === "upload", y = e.type === "url", f = P(
366
366
  () => o.filter((S) => S.connectionId === e.id).length,
367
367
  [o, e.id]
368
368
  );
@@ -377,7 +377,7 @@ function _a({
377
377
  /* @__PURE__ */ t(
378
378
  Te,
379
379
  {
380
- className: j(
380
+ className: q(
381
381
  "h-3 w-3 shrink-0 text-muted-foreground transition-transform",
382
382
  l && "rotate-90"
383
383
  ),
@@ -389,11 +389,11 @@ function _a({
389
389
  "· ",
390
390
  e.type
391
391
  ] }),
392
- /* @__PURE__ */ t("span", { className: "ml-auto shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground", children: h > 0 ? h : "" })
392
+ /* @__PURE__ */ t("span", { className: "ml-auto shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground", children: f > 0 ? f : "" })
393
393
  ]
394
394
  }
395
395
  ),
396
- l && /* @__PURE__ */ i(fe, { children: [
396
+ l && /* @__PURE__ */ i(he, { children: [
397
397
  k ? /* @__PURE__ */ t(
398
398
  Fa,
399
399
  {
@@ -412,12 +412,12 @@ function _a({
412
412
  Ra,
413
413
  {
414
414
  connection: e,
415
- requiresSchema: g,
415
+ requiresSchema: x,
416
416
  search: n,
417
417
  selectedEntities: o,
418
418
  onSelectionChange: m
419
419
  }
420
- ) : g ? /* @__PURE__ */ t(
420
+ ) : x ? /* @__PURE__ */ t(
421
421
  sn,
422
422
  {
423
423
  connection: e,
@@ -537,9 +537,9 @@ function Va({
537
537
  }) {
538
538
  const [o, m] = Y(""), [d, u] = Y(""), [l, s] = Y("api"), c = n.filter(
539
539
  (y) => y.connectionId === e.id && y.type === "url"
540
- ), g = () => {
541
- const y = o.trim(), h = d.trim();
542
- if (!y || !h) return;
540
+ ), x = () => {
541
+ const y = o.trim(), f = d.trim();
542
+ if (!y || !f) return;
543
543
  const N = {
544
544
  id: `url-${Date.now()}-${Math.random()}`,
545
545
  name: y,
@@ -549,14 +549,14 @@ function Va({
549
549
  label: y,
550
550
  description: `URL source of type ${l}`,
551
551
  originalName: y,
552
- url: h,
552
+ url: f,
553
553
  sourceType: l
554
554
  };
555
555
  a([...n, N]), m(""), u(""), s("api");
556
556
  }, k = (y) => {
557
557
  a(
558
558
  n.filter(
559
- (h) => !("id" in h && h.id === y && h.connectionId === e.id && h.type === "url")
559
+ (f) => !("id" in f && f.id === y && f.connectionId === e.id && f.type === "url")
560
560
  )
561
561
  );
562
562
  };
@@ -601,7 +601,7 @@ function Va({
601
601
  size: "sm",
602
602
  className: "h-7 text-[12px]",
603
603
  disabled: !o.trim() || !d.trim(),
604
- onClick: g,
604
+ onClick: x,
605
605
  children: [
606
606
  /* @__PURE__ */ t(Ve, { className: "mr-1 h-3 w-3" }),
607
607
  "Add"
@@ -740,18 +740,18 @@ function mt({
740
740
  ["tables", e.id, n, a]
741
741
  ), l = P(() => {
742
742
  var S;
743
- const h = ((S = u.data) == null ? void 0 : S.tables) ?? [];
744
- if (!o) return h;
743
+ const f = ((S = u.data) == null ? void 0 : S.tables) ?? [];
744
+ if (!o) return f;
745
745
  const N = o.trim().toLowerCase();
746
- return h.filter((V) => V.table_name.toLowerCase().includes(N));
747
- }, [u.data, o]), s = (h, N) => ({
746
+ return f.filter((V) => V.table_name.toLowerCase().includes(N));
747
+ }, [u.data, o]), s = (f, N) => ({
748
748
  connectionId: e.id,
749
749
  connectionType: e.type,
750
750
  type: "table",
751
751
  dialect: e.dialect,
752
752
  database: n || void 0,
753
753
  schema: a || void 0,
754
- name: h,
754
+ name: f,
755
755
  dbObjectType: N == null ? void 0 : N.toLowerCase()
756
756
  });
757
757
  if (u.isLoading)
@@ -759,32 +759,32 @@ function mt({
759
759
  if (l.length === 0)
760
760
  return o ? null : /* @__PURE__ */ t("div", { className: "px-10 py-1.5 text-[11px] text-muted-foreground", children: "No tables." });
761
761
  const c = l.map(
762
- (h) => s(h.table_name, h.table_type)
763
- ), g = c.length > 0 && c.every(
764
- (h) => m.some((N) => J(N, h))
765
- ), k = (h, N) => {
766
- const S = s(h, N), V = m.some(
767
- (F) => J(F, S)
762
+ (f) => s(f.table_name, f.table_type)
763
+ ), x = c.length > 0 && c.every(
764
+ (f) => m.some((N) => Z(N, f))
765
+ ), k = (f, N) => {
766
+ const S = s(f, N), V = m.some(
767
+ (F) => Z(F, S)
768
768
  );
769
769
  d(
770
- V ? m.filter((F) => !J(F, S)) : [...m, S]
770
+ V ? m.filter((F) => !Z(F, S)) : [...m, S]
771
771
  );
772
772
  }, y = () => {
773
773
  if (c.length === 0) return;
774
- if (g) {
774
+ if (x) {
775
775
  d(
776
776
  m.filter(
777
777
  (N) => !c.some(
778
- (S) => J(N, S)
778
+ (S) => Z(N, S)
779
779
  )
780
780
  )
781
781
  );
782
782
  return;
783
783
  }
784
- const h = [...m];
784
+ const f = [...m];
785
785
  for (const N of c)
786
- h.some((S) => J(S, N)) || h.push(N);
787
- d(h);
786
+ f.some((S) => Z(S, N)) || f.push(N);
787
+ d(f);
788
788
  };
789
789
  return /* @__PURE__ */ i("ul", { children: [
790
790
  /* @__PURE__ */ i("li", { className: "flex items-center justify-between gap-2 py-1 pl-12 pr-4", children: [
@@ -799,35 +799,35 @@ function mt({
799
799
  type: "button",
800
800
  onClick: y,
801
801
  className: "rounded-[3px] px-1.5 py-0.5 text-[10.5px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground",
802
- children: g ? "Clear" : "Select all"
802
+ children: x ? "Clear" : "Select all"
803
803
  }
804
804
  )
805
805
  ] }),
806
- l.map((h) => {
807
- const N = s(h.table_name, h.table_type), S = m.some(
808
- (V) => J(V, N)
806
+ l.map((f) => {
807
+ const N = s(f.table_name, f.table_type), S = m.some(
808
+ (V) => Z(V, N)
809
809
  );
810
810
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ i("label", { className: "flex cursor-pointer items-center gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
811
811
  /* @__PURE__ */ t(
812
812
  Ue,
813
813
  {
814
814
  checked: S,
815
- onCheckedChange: () => k(h.table_name, h.table_type),
815
+ onCheckedChange: () => k(f.table_name, f.table_type),
816
816
  className: "h-3.5 w-3.5 shrink-0"
817
817
  }
818
818
  ),
819
819
  /* @__PURE__ */ t(
820
- hn,
820
+ fn,
821
821
  {
822
822
  className: "h-3.5 w-3.5 shrink-0 text-muted-foreground",
823
823
  strokeWidth: 1.75
824
824
  }
825
825
  ),
826
826
  /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-baseline gap-1.5", children: [
827
- /* @__PURE__ */ t("span", { className: "truncate text-[13px] text-foreground/90", children: h.table_name }),
828
- /* @__PURE__ */ t("span", { className: "shrink-0 font-mono text-[10px] uppercase tracking-[0.06em] text-muted-foreground/70", children: h.table_type ?? "table" })
827
+ /* @__PURE__ */ t("span", { className: "truncate text-[13px] text-foreground/90", children: f.table_name }),
828
+ /* @__PURE__ */ t("span", { className: "shrink-0 font-mono text-[10px] uppercase tracking-[0.06em] text-muted-foreground/70", children: f.table_type ?? "table" })
829
829
  ] })
830
- ] }) }, h.table_name);
830
+ ] }) }, f.table_name);
831
831
  })
832
832
  ] });
833
833
  }
@@ -846,7 +846,7 @@ function Ea({
846
846
  if (!n) return l;
847
847
  const s = n.trim().toLowerCase();
848
848
  return l.filter(
849
- (g) => `${g.label ?? ""} ${g.name ?? ""} ${g.description ?? ""}`.toLowerCase().includes(s)
849
+ (x) => `${x.label ?? ""} ${x.name ?? ""} ${x.description ?? ""}`.toLowerCase().includes(s)
850
850
  );
851
851
  }, [m.data, n]);
852
852
  if (m.isLoading || d.length === 0) return null;
@@ -863,10 +863,10 @@ function Ea({
863
863
  database: l.database || "",
864
864
  schema: l.schema || ""
865
865
  }, c = a.some(
866
- (g) => J(g, s)
866
+ (x) => Z(x, s)
867
867
  );
868
868
  o(
869
- c ? a.filter((g) => !J(g, s)) : [...a, s]
869
+ c ? a.filter((x) => !Z(x, s)) : [...a, s]
870
870
  );
871
871
  };
872
872
  return /* @__PURE__ */ i("div", { children: [
@@ -884,7 +884,7 @@ function Ea({
884
884
  database: l.database || "",
885
885
  schema: l.schema || ""
886
886
  }, c = a.some(
887
- (g) => J(g, s)
887
+ (x) => Z(x, s)
888
888
  );
889
889
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ i("label", { className: "flex cursor-pointer items-start gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
890
890
  /* @__PURE__ */ t(
@@ -926,7 +926,7 @@ function on({
926
926
  {
927
927
  type: "button",
928
928
  onClick: () => d((s) => !s),
929
- className: j(
929
+ className: q(
930
930
  "flex h-6 w-full items-center gap-1.5 pr-4 text-left transition-colors hover:bg-muted/40",
931
931
  n === 1 ? "pl-8" : "pl-10"
932
932
  ),
@@ -934,7 +934,7 @@ function on({
934
934
  /* @__PURE__ */ t(
935
935
  Te,
936
936
  {
937
- className: j(
937
+ className: q(
938
938
  "h-2.5 w-2.5 shrink-0 text-muted-foreground transition-transform",
939
939
  u && "rotate-90"
940
940
  ),
@@ -957,7 +957,7 @@ function Ge(e, n, a, o = !0) {
957
957
  );
958
958
  return Vt({
959
959
  queryKey: a,
960
- queryFn: () => Qt(
960
+ queryFn: () => Kt(
961
961
  `${m.apiServiceUrl}${e}`,
962
962
  (d == null ? void 0 : d.accessToken) || "",
963
963
  u
@@ -972,13 +972,13 @@ function Ma(e, n) {
972
972
  if (!(e.type !== "dataset" || !e.domainId || !n))
973
973
  return n.get(e.domainId);
974
974
  }
975
- function ja({
975
+ function qa({
976
976
  selectedEntities: e,
977
977
  onDeselectEntity: n,
978
978
  semanticDomainLabels: a
979
979
  }) {
980
980
  return e.length === 0 ? null : /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: e.map((o, m) => /* @__PURE__ */ t(
981
- qa,
981
+ ja,
982
982
  {
983
983
  entity: o,
984
984
  semanticDomainLabels: a,
@@ -987,7 +987,7 @@ function ja({
987
987
  `${o.type}-${o.name}-${m}`
988
988
  )) });
989
989
  }
990
- function qa({
990
+ function ja({
991
991
  entity: e,
992
992
  semanticDomainLabels: n,
993
993
  onDeselect: a
@@ -1036,11 +1036,11 @@ function Sr({
1036
1036
  onDataSourceChange: m
1037
1037
  }) {
1038
1038
  var Se, me;
1039
- const { tokenProps: d } = ct(), u = d.config, l = d.semanticDomainAccess || Xn, [s, c] = Y([]), [g, k] = Y(""), [y, h] = Y("all"), [N, S] = Y(
1039
+ const { tokenProps: d } = ct(), u = d.config, l = d.semanticDomainAccess || Xn, [s, c] = Y([]), [x, k] = Y(""), [y, f] = Y("all"), [N, S] = Y(
1040
1040
  void 0
1041
- ), V = $e(!1), { updateDataSource: F } = Et(), K = m ?? F, C = l.mode, T = (u == null ? void 0 : u.showDirectSource) !== !1, U = C === "include" || C === "exclude" || !T, Z = C !== "all", p = T && !U, I = U ? "semanticDomain" : a.mode, $ = !T, D = C === "include" && (((Se = l.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = l.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1041
+ ), V = $e(!1), { updateDataSource: F } = Et(), Q = m ?? F, C = l.mode, T = (u == null ? void 0 : u.showDirectSource) !== !1, U = C === "include" || C === "exclude" || !T, J = C !== "all", p = T && !U, I = U ? "semanticDomain" : a.mode, $ = !T, D = C === "include" && (((Se = l.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = l.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1042
1042
  (A) => {
1043
- V.current = !0, K({
1043
+ V.current = !0, Q({
1044
1044
  ...a,
1045
1045
  connectionId: (a == null ? void 0 : a.connectionId) || "",
1046
1046
  connectionType: (a == null ? void 0 : a.connectionType) || "",
@@ -1049,15 +1049,15 @@ function Sr({
1049
1049
  ...A !== "semanticDomain" && { semanticDomainId: void 0 }
1050
1050
  });
1051
1051
  },
1052
- [a, K]
1053
- ), f = ne(
1052
+ [a, Q]
1053
+ ), h = ne(
1054
1054
  (A) => {
1055
- K({
1055
+ Q({
1056
1056
  ...a,
1057
1057
  ...A
1058
1058
  });
1059
1059
  },
1060
- [a, K]
1060
+ [a, Q]
1061
1061
  );
1062
1062
  de(() => {
1063
1063
  var b;
@@ -1065,20 +1065,20 @@ function Sr({
1065
1065
  v("semanticDomain");
1066
1066
  return;
1067
1067
  }
1068
- if (!Z || I !== "semanticDomain") return;
1068
+ if (!J || I !== "semanticDomain") return;
1069
1069
  const A = l.domainIds ?? [], ae = (((b = a.selectedEntities) == null ? void 0 : b.length) ?? 0) > 0, r = ((s == null ? void 0 : s.length) ?? 0) > 0;
1070
1070
  Da({
1071
1071
  mode: C,
1072
1072
  currentDomainId: a.semanticDomainId,
1073
1073
  scopedDomainIds: A,
1074
1074
  hasSelectedEntities: ae
1075
- }) && (f({
1075
+ }) && (h({
1076
1076
  semanticDomainId: void 0,
1077
1077
  selectedEntities: []
1078
1078
  }), r && c([]));
1079
1079
  }, [
1080
1080
  U,
1081
- Z,
1081
+ J,
1082
1082
  I,
1083
1083
  a.mode,
1084
1084
  a.semanticDomainId,
@@ -1086,13 +1086,13 @@ function Sr({
1086
1086
  s,
1087
1087
  l.domainIds,
1088
1088
  C,
1089
- f,
1089
+ h,
1090
1090
  v
1091
1091
  ]), de(() => {
1092
- D && !a.semanticDomainId && f({ semanticDomainId: D });
1093
- }, [D, a.semanticDomainId, f]), de(() => {
1092
+ D && !a.semanticDomainId && h({ semanticDomainId: D });
1093
+ }, [D, a.semanticDomainId, h]), de(() => {
1094
1094
  if (!e) {
1095
- V.current = !1, k(""), S(void 0), h(U ? "semantic" : "all");
1095
+ V.current = !1, k(""), S(void 0), f(U ? "semantic" : "all");
1096
1096
  return;
1097
1097
  }
1098
1098
  V.current || (c([...o || []]), S(
@@ -1101,7 +1101,7 @@ function Sr({
1101
1101
  }, [e, o, U]);
1102
1102
  const E = (A) => {
1103
1103
  V.current = !0, c(
1104
- s.filter((ae) => !J(ae, A))
1104
+ s.filter((ae) => !Z(ae, A))
1105
1105
  );
1106
1106
  }, w = ne(
1107
1107
  (A, ae) => {
@@ -1114,33 +1114,33 @@ function Sr({
1114
1114
  var ae, r;
1115
1115
  const A = Ye(s) ?? N ?? I;
1116
1116
  if (A === "semanticDomain") {
1117
- const x = Kt(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;
1118
- K({
1117
+ const g = Qt(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;
1118
+ Q({
1119
1119
  ...a,
1120
1120
  mode: "semanticDomain",
1121
- semanticDomainId: x,
1121
+ semanticDomainId: g,
1122
1122
  connectionId: b,
1123
1123
  connectionType: L,
1124
1124
  selectedEntities: s
1125
1125
  });
1126
1126
  } else if (A === "upload" || A === "url") {
1127
- const x = s == null ? void 0 : s[0];
1128
- K({
1127
+ const g = s == null ? void 0 : s[0];
1128
+ Q({
1129
1129
  ...a,
1130
1130
  mode: A,
1131
1131
  semanticDomainId: void 0,
1132
- connectionId: (x == null ? void 0 : x.connectionId) || a.connectionId,
1133
- connectionType: (x == null ? void 0 : x.connectionType) || a.connectionType,
1132
+ connectionId: (g == null ? void 0 : g.connectionId) || a.connectionId,
1133
+ connectionType: (g == null ? void 0 : g.connectionType) || a.connectionType,
1134
1134
  selectedEntities: s
1135
1135
  });
1136
1136
  } else {
1137
- const x = s == null ? void 0 : s[0];
1138
- K({
1137
+ const g = s == null ? void 0 : s[0];
1138
+ Q({
1139
1139
  ...a,
1140
1140
  mode: "database",
1141
1141
  semanticDomainId: void 0,
1142
- connectionId: (x == null ? void 0 : x.connectionId) || a.connectionId,
1143
- connectionType: (x == null ? void 0 : x.connectionType) || a.connectionType,
1142
+ connectionId: (g == null ? void 0 : g.connectionId) || a.connectionId,
1143
+ connectionType: (g == null ? void 0 : g.connectionType) || a.connectionType,
1144
1144
  selectedEntities: s
1145
1145
  });
1146
1146
  }
@@ -1153,8 +1153,8 @@ function Sr({
1153
1153
  ])
1154
1154
  ),
1155
1155
  [_]
1156
- ), q = (A) => {
1157
- h(A), A === "semantic" || A.startsWith("domain:") ? a.mode !== "semanticDomain" && v("semanticDomain") : (A === "direct" || A.startsWith("conn:")) && a.mode === "semanticDomain" && v("database");
1156
+ ), j = (A) => {
1157
+ f(A), A === "semantic" || A.startsWith("domain:") ? a.mode !== "semanticDomain" && v("semanticDomain") : (A === "direct" || A.startsWith("conn:")) && a.mode === "semanticDomain" && v("database");
1158
1158
  }, ee = y.startsWith("domain:"), te = y.startsWith("conn:"), Be = ee ? y.slice(7) : void 0, We = te ? y.slice(5) : void 0, oe = !p || y === "all" || y === "semantic" || ee, Ie = T && !U && (y === "all" || y === "direct" || te), ue = ((o == null ? void 0 : o.length) ?? 0) > 0, Ce = s.length === 0 && !ue, we = s.length === 0 && ue ? "Clear" : "Add", ke = $ ? "Select dataset" : "Add data";
1159
1159
  return /* @__PURE__ */ t(kn, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(
1160
1160
  Sn,
@@ -1162,7 +1162,7 @@ function Sr({
1162
1162
  showCloseButton: !1,
1163
1163
  className: "flex h-[560px] w-[620px] max-w-[620px] flex-col gap-0 overflow-hidden rounded-[6px] border border-border bg-popover p-0",
1164
1164
  children: [
1165
- /* @__PURE__ */ t(gn, { children: /* @__PURE__ */ t(Dn, { children: ke }) }),
1165
+ /* @__PURE__ */ t(xn, { children: /* @__PURE__ */ t(Dn, { children: ke }) }),
1166
1166
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between border-b border-border px-4 py-2.5", children: [
1167
1167
  /* @__PURE__ */ i("div", { children: [
1168
1168
  /* @__PURE__ */ t("p", { className: "text-[14px] font-semibold text-foreground", children: ke }),
@@ -1186,13 +1186,13 @@ function Sr({
1186
1186
  "input",
1187
1187
  {
1188
1188
  type: "text",
1189
- value: g,
1189
+ value: x,
1190
1190
  onChange: (A) => k(A.target.value),
1191
1191
  placeholder: "Search datasets, tables, views, models",
1192
1192
  className: "h-full w-full bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground/60 focus:outline-none"
1193
1193
  }
1194
1194
  ),
1195
- g && /* @__PURE__ */ t(
1195
+ x && /* @__PURE__ */ t(
1196
1196
  "button",
1197
1197
  {
1198
1198
  type: "button",
@@ -1212,16 +1212,16 @@ function Sr({
1212
1212
  {
1213
1213
  label: "All",
1214
1214
  active: y === "all",
1215
- onClick: () => q("all")
1215
+ onClick: () => j("all")
1216
1216
  }
1217
1217
  ),
1218
- (_.length > 0 || z.length > 0) && /* @__PURE__ */ i(fe, { children: [
1218
+ (_.length > 0 || z.length > 0) && /* @__PURE__ */ i(he, { children: [
1219
1219
  /* @__PURE__ */ t(
1220
1220
  De,
1221
1221
  {
1222
1222
  label: "Semantic",
1223
1223
  active: y === "semantic",
1224
- onClick: () => q("semantic")
1224
+ onClick: () => j("semantic")
1225
1225
  }
1226
1226
  ),
1227
1227
  /* @__PURE__ */ t(
@@ -1229,7 +1229,7 @@ function Sr({
1229
1229
  {
1230
1230
  label: "Direct",
1231
1231
  active: y === "direct",
1232
- onClick: () => q("direct")
1232
+ onClick: () => j("direct")
1233
1233
  }
1234
1234
  ),
1235
1235
  /* @__PURE__ */ t("span", { className: "shrink-0 px-0.5 text-muted-foreground/50", children: "·" })
@@ -1239,7 +1239,7 @@ function Sr({
1239
1239
  {
1240
1240
  label: A.label || A.name,
1241
1241
  active: y === `domain:${A.id}`,
1242
- onClick: () => q(`domain:${A.id}`)
1242
+ onClick: () => j(`domain:${A.id}`)
1243
1243
  },
1244
1244
  `domain:${A.id}`
1245
1245
  )),
@@ -1248,7 +1248,7 @@ function Sr({
1248
1248
  {
1249
1249
  label: A.name,
1250
1250
  active: y === `conn:${A.id}`,
1251
- onClick: () => q(`conn:${A.id}`)
1251
+ onClick: () => j(`conn:${A.id}`)
1252
1252
  },
1253
1253
  `conn:${A.id}`
1254
1254
  ))
@@ -1259,7 +1259,7 @@ function Sr({
1259
1259
  La,
1260
1260
  {
1261
1261
  domainAccess: l,
1262
- search: g,
1262
+ search: x,
1263
1263
  scopeDomainId: Be,
1264
1264
  selectedEntities: s,
1265
1265
  onSelectionChange: (A) => w(A, "semanticDomain")
@@ -1268,7 +1268,7 @@ function Sr({
1268
1268
  Ie && /* @__PURE__ */ t(
1269
1269
  Oa,
1270
1270
  {
1271
- search: g,
1271
+ search: x,
1272
1272
  scopeConnectionId: We,
1273
1273
  selectedEntities: s,
1274
1274
  onSelectionChange: (A) => w(A)
@@ -1300,7 +1300,7 @@ function Sr({
1300
1300
  type: "button",
1301
1301
  onClick: H,
1302
1302
  disabled: Ce,
1303
- className: j(
1303
+ className: q(
1304
1304
  "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",
1305
1305
  Ce && "cursor-not-allowed opacity-50 hover:bg-primary"
1306
1306
  ),
@@ -1316,7 +1316,7 @@ function Sr({
1316
1316
  ] })
1317
1317
  ] }),
1318
1318
  s.length > 0 && /* @__PURE__ */ t(
1319
- ja,
1319
+ qa,
1320
1320
  {
1321
1321
  selectedEntities: s,
1322
1322
  onDeselectEntity: E,
@@ -1339,7 +1339,7 @@ function De({
1339
1339
  type: "button",
1340
1340
  onClick: a,
1341
1341
  "aria-pressed": n,
1342
- className: j(
1342
+ className: q(
1343
1343
  "inline-flex h-6 shrink-0 items-center whitespace-nowrap rounded-control px-2 text-[11px] font-medium transition-colors",
1344
1344
  n ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground hover:bg-muted hover:text-foreground"
1345
1345
  ),
@@ -1356,9 +1356,9 @@ function Dr() {
1356
1356
  setSelectedDatamodelId: d
1357
1357
  } = Et();
1358
1358
  de(() => {
1359
- var h;
1359
+ var f;
1360
1360
  if (!e) return;
1361
- const { tableName: u, schemaName: l, databaseName: s, connectionId: c } = In(e), g = (h = e.selectedEntities) == null ? void 0 : h[0], y = (g == null ? void 0 : g.type) === "model" && "id" in g ? g.id : "";
1361
+ const { tableName: u, schemaName: l, databaseName: s, connectionId: c } = In(e), x = (f = e.selectedEntities) == null ? void 0 : f[0], y = (x == null ? void 0 : x.type) === "model" && "id" in x ? x.id : "";
1362
1362
  n(c || ""), a(s || ""), o(l || ""), m(u || ""), d(y);
1363
1363
  }, [
1364
1364
  e,
@@ -1398,7 +1398,7 @@ function Tr({
1398
1398
  local: "border-slate-200/70 bg-slate-50/80 text-slate-700 shadow-sm hover:bg-slate-100/80 dark:border-slate-700 dark:bg-slate-900/70 dark:text-slate-200 dark:hover:bg-slate-800/80",
1399
1399
  linked: "border-purple-200/70 bg-gradient-to-r from-purple-50/50 to-purple-100/30 text-purple-900 shadow-sm hover:from-purple-100/60 hover:to-purple-100/50 hover:shadow-md dark:border-purple-800/50 dark:from-purple-950/40 dark:to-purple-900/30 dark:text-purple-100 dark:hover:from-purple-950/60 dark:hover:to-purple-900/50",
1400
1400
  library: "border-blue-200/70 bg-gradient-to-r from-blue-50/50 to-blue-100/30 text-blue-900 shadow-sm hover:from-blue-100/60 hover:to-blue-100/50 hover:shadow-md dark:border-blue-800/50 dark:from-blue-950/40 dark:to-blue-900/30 dark:text-blue-100 dark:hover:from-blue-950/60 dark:hover:to-blue-900/50"
1401
- }, g = {
1401
+ }, x = {
1402
1402
  local: "Local to this dashboard: Changes made here only affect this dashboard copy.",
1403
1403
  linked: "Linked to library: Changes made here update the library visual and all linked instances.",
1404
1404
  library: "Library visual: Share and reuse this visual across multiple dashboards."
@@ -1410,7 +1410,7 @@ function Tr({
1410
1410
  local: "fill-slate-50 dark:fill-slate-900",
1411
1411
  linked: "fill-purple-50 dark:fill-purple-950",
1412
1412
  library: "fill-blue-50 dark:fill-blue-950"
1413
- }, h = {
1413
+ }, f = {
1414
1414
  local: /* @__PURE__ */ t("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
1415
1415
  linked: /* @__PURE__ */ t(An, { className: "h-3.5 w-3.5" }),
1416
1416
  library: /* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" })
@@ -1424,13 +1424,13 @@ function Tr({
1424
1424
  $n,
1425
1425
  {
1426
1426
  variant: "outline",
1427
- className: j(
1427
+ className: q(
1428
1428
  "cursor-help select-none transition-all",
1429
1429
  c[s],
1430
1430
  a
1431
1431
  ),
1432
1432
  children: [
1433
- h[s],
1433
+ f[s],
1434
1434
  o && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-medium leading-none", children: N[s] })
1435
1435
  ]
1436
1436
  }
@@ -1439,10 +1439,10 @@ function Tr({
1439
1439
  ot,
1440
1440
  {
1441
1441
  side: "bottom",
1442
- className: j("max-w-xs", k[s]),
1442
+ className: q("max-w-xs", k[s]),
1443
1443
  children: [
1444
1444
  /* @__PURE__ */ t(Ft, { className: y[s] }),
1445
- /* @__PURE__ */ t("p", { children: g[s] })
1445
+ /* @__PURE__ */ t("p", { children: x[s] })
1446
1446
  ]
1447
1447
  }
1448
1448
  )
@@ -1470,7 +1470,7 @@ const Ua = vn(
1470
1470
  onClick: m,
1471
1471
  ...s,
1472
1472
  ...u,
1473
- className: j(`${Jn}`, a),
1473
+ className: q(`${Zn}`, a),
1474
1474
  children: n
1475
1475
  }
1476
1476
  ) }),
@@ -1479,7 +1479,7 @@ const Ua = vn(
1479
1479
  {
1480
1480
  side: e,
1481
1481
  sideOffset: 10,
1482
- className: j(
1482
+ className: q(
1483
1483
  "border-foreground/20 bg-foreground text-background"
1484
1484
  ),
1485
1485
  children: [
@@ -1515,7 +1515,7 @@ function Ga(e) {
1515
1515
  /* @__PURE__ */ t(
1516
1516
  "span",
1517
1517
  {
1518
- className: j(
1518
+ className: q(
1519
1519
  "flex h-5 w-5 items-center justify-center rounded-full border text-[10px] font-medium tabular-nums",
1520
1520
  u ? "border-foreground bg-foreground text-background" : l ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
1521
1521
  ),
@@ -1525,7 +1525,7 @@ function Ga(e) {
1525
1525
  /* @__PURE__ */ t(
1526
1526
  "span",
1527
1527
  {
1528
- className: j(
1528
+ className: q(
1529
1529
  "text-[12px]",
1530
1530
  u ? "font-medium text-foreground" : "text-muted-foreground"
1531
1531
  ),
@@ -1543,7 +1543,7 @@ function Ga(e) {
1543
1543
  ] }, o);
1544
1544
  }) }) });
1545
1545
  }
1546
- function qe(e) {
1546
+ function je(e) {
1547
1547
  const { secondary: n, tertiary: a, primary: o } = e;
1548
1548
  return /* @__PURE__ */ i("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
1549
1549
  n,
@@ -1581,7 +1581,7 @@ function Lt(e) {
1581
1581
  onControlChange: l,
1582
1582
  onLabelChange: s,
1583
1583
  onDefaultValueChange: c,
1584
- onBack: g,
1584
+ onBack: x,
1585
1585
  onNext: k,
1586
1586
  nextDisabled: y
1587
1587
  } = e;
@@ -1600,7 +1600,7 @@ function Lt(e) {
1600
1600
  }
1601
1601
  ),
1602
1602
  /* @__PURE__ */ t(
1603
- jt,
1603
+ qt,
1604
1604
  {
1605
1605
  control: n,
1606
1606
  value: a,
@@ -1613,9 +1613,9 @@ function Lt(e) {
1613
1613
  }
1614
1614
  ),
1615
1615
  /* @__PURE__ */ t(
1616
- qe,
1616
+ je,
1617
1617
  {
1618
- secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: g, children: "Back" }),
1618
+ secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: x, children: "Back" }),
1619
1619
  primary: /* @__PURE__ */ t(
1620
1620
  G,
1621
1621
  {
@@ -1669,7 +1669,7 @@ function At(e) {
1669
1669
  onBack: l,
1670
1670
  onCancel: s,
1671
1671
  onDone: c
1672
- } = e, g = Wa.has(n.type), k = o.match(/\[\[param\.(.+?)\]\]/), y = k ? `{{ param('${k[1]}') }}` : "";
1672
+ } = e, x = Wa.has(n.type), k = o.match(/\[\[param\.(.+?)\]\]/), y = k ? `{{ param('${k[1]}') }}` : "";
1673
1673
  return /* @__PURE__ */ i("div", { className: "space-y-4", children: [
1674
1674
  /* @__PURE__ */ t(
1675
1675
  Ba,
@@ -1682,7 +1682,7 @@ function At(e) {
1682
1682
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
1683
1683
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
1684
1684
  /* @__PURE__ */ i("div", { className: "divide-y divide-border/60 overflow-hidden rounded-control border border-border/60", children: [
1685
- g ? /* @__PURE__ */ i("div", { className: "space-y-1 px-3 py-2.5", children: [
1685
+ x ? /* @__PURE__ */ i("div", { className: "space-y-1 px-3 py-2.5", children: [
1686
1686
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
1687
1687
  /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: m })
1688
1688
  ] }) : null,
@@ -1721,7 +1721,7 @@ function At(e) {
1721
1721
  ] })
1722
1722
  ] }),
1723
1723
  /* @__PURE__ */ t(
1724
- qe,
1724
+ je,
1725
1725
  {
1726
1726
  secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: l, children: "Back" }),
1727
1727
  tertiary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: s, children: "Cancel" }),
@@ -1730,7 +1730,7 @@ function At(e) {
1730
1730
  )
1731
1731
  ] });
1732
1732
  }
1733
- function Qa(e) {
1733
+ function Ka(e) {
1734
1734
  const n = Ae(
1735
1735
  e.scope,
1736
1736
  e.existingControls,
@@ -1739,7 +1739,7 @@ function Qa(e) {
1739
1739
  ...n,
1740
1740
  label: Pe[e.type]
1741
1741
  } : {
1742
- ...Jt({
1742
+ ...Zt({
1743
1743
  controls: [
1744
1744
  {
1745
1745
  ...n,
@@ -1768,53 +1768,53 @@ function Ir({
1768
1768
  usageByControlId: l,
1769
1769
  availableFieldChoices: s,
1770
1770
  availableMetricChoices: c,
1771
- structuralParticipants: g,
1771
+ structuralParticipants: x,
1772
1772
  structuralParticipantIdsByControlId: k,
1773
1773
  card: y,
1774
- allowedControlTypes: h,
1774
+ allowedControlTypes: f,
1775
1775
  onCreateFlowActiveChange: N,
1776
1776
  onCreateFlowComplete: S
1777
1777
  }) {
1778
1778
  const V = P(
1779
1779
  () => new Set(a || []),
1780
1780
  [a]
1781
- ), F = sa(e), K = Zn(e), [C, T] = Y(
1781
+ ), F = sa(e), Q = Jn(e), [C, T] = Y(
1782
1782
  null
1783
- ), [U, Z] = Y(
1783
+ ), [U, J] = Y(
1784
1784
  null
1785
1785
  ), [p, I] = Y(
1786
1786
  () => u ? {
1787
1787
  step: 1,
1788
1788
  control: Ae(e, n, Array.from(V))
1789
1789
  } : null
1790
- ), $ = $e({}), D = $e(void 0), v = $e(u), f = P(() => {
1790
+ ), $ = $e({}), D = $e(void 0), v = $e(u), h = P(() => {
1791
1791
  const r = Ct({ scope: e, card: y });
1792
- if (!h)
1792
+ if (!f)
1793
1793
  return r;
1794
- const x = new Set(h);
1795
- return r.filter((b) => x.has(b.value));
1796
- }, [h, y, e]), E = ne(
1794
+ const g = new Set(f);
1795
+ return r.filter((b) => g.has(b.value));
1796
+ }, [f, y, e]), E = ne(
1797
1797
  (r) => {
1798
- const x = Ct({
1798
+ const g = Ct({
1799
1799
  scope: e,
1800
1800
  card: y,
1801
- includeType: h ? void 0 : r
1801
+ includeType: f ? void 0 : r
1802
1802
  });
1803
- if (!h)
1804
- return x;
1805
- const b = new Set(h);
1806
- return x.filter((L) => b.has(L.value));
1803
+ if (!f)
1804
+ return g;
1805
+ const b = new Set(f);
1806
+ return g.filter((L) => b.has(L.value));
1807
1807
  },
1808
- [h, y, e]
1808
+ [f, y, e]
1809
1809
  ), w = ne(
1810
1810
  (r) => e === "dashboard" && (r === "field_selector" || r === "metric_selector"),
1811
1811
  [e]
1812
1812
  ), H = P(
1813
1813
  () => p ? wt(
1814
- g || [],
1814
+ x || [],
1815
1815
  p.control.type
1816
1816
  ) : [],
1817
- [p, g]
1817
+ [p, x]
1818
1818
  ), _ = P(() => {
1819
1819
  if (!p)
1820
1820
  return {
@@ -1826,19 +1826,19 @@ function Ir({
1826
1826
  fields: s || [],
1827
1827
  metrics: c || []
1828
1828
  };
1829
- const r = p.selectedCardIds || [], x = Qe({
1829
+ const r = p.selectedCardIds || [], g = Ke({
1830
1830
  controlType: p.control.type,
1831
- participants: g || [],
1831
+ participants: x || [],
1832
1832
  selectedCardIds: r
1833
1833
  });
1834
1834
  return {
1835
- fields: p.control.type === "field_selector" ? x.choices.map((b) => ({
1835
+ fields: p.control.type === "field_selector" ? g.choices.map((b) => ({
1836
1836
  option: b,
1837
- target: x.fieldTargetMap[b.value]
1837
+ target: g.fieldTargetMap[b.value]
1838
1838
  })) : [],
1839
- metrics: p.control.type === "metric_selector" ? x.choices.map((b) => ({
1839
+ metrics: p.control.type === "metric_selector" ? g.choices.map((b) => ({
1840
1840
  option: b,
1841
- target: x.metricTargetMap[b.value]
1841
+ target: g.metricTargetMap[b.value]
1842
1842
  })) : []
1843
1843
  };
1844
1844
  }, [
@@ -1846,7 +1846,7 @@ function Ir({
1846
1846
  c,
1847
1847
  p,
1848
1848
  w,
1849
- g
1849
+ x
1850
1850
  ]);
1851
1851
  de(() => {
1852
1852
  N == null || N(!!p);
@@ -1855,7 +1855,7 @@ function Ir({
1855
1855
  v.current = u, r && (I({
1856
1856
  step: 1,
1857
1857
  control: Ae(e, n, Array.from(V))
1858
- }), Z(null), T(null));
1858
+ }), J(null), T(null));
1859
1859
  }, [n, u, V, e]);
1860
1860
  const z = (r) => {
1861
1861
  if (!w(r.type))
@@ -1863,16 +1863,16 @@ function Ir({
1863
1863
  fields: s || [],
1864
1864
  metrics: c || []
1865
1865
  };
1866
- const x = (k == null ? void 0 : k[r.id]) || [];
1867
- if (x.length === 0)
1866
+ const g = (k == null ? void 0 : k[r.id]) || [];
1867
+ if (g.length === 0)
1868
1868
  return {
1869
1869
  fields: s || [],
1870
1870
  metrics: c || []
1871
1871
  };
1872
- const b = Qe({
1872
+ const b = Ke({
1873
1873
  controlType: r.type,
1874
- participants: g || [],
1875
- selectedCardIds: x
1874
+ participants: x || [],
1875
+ selectedCardIds: g
1876
1876
  });
1877
1877
  return {
1878
1878
  fields: r.type === "field_selector" ? b.choices.map((L) => ({
@@ -1890,21 +1890,21 @@ function Ir({
1890
1890
  nextControl: r.control,
1891
1891
  cardBindingsById: void 0
1892
1892
  };
1893
- const x = (k == null ? void 0 : k[r.control.id]) || [], b = Qe({
1893
+ const g = (k == null ? void 0 : k[r.control.id]) || [], b = Ke({
1894
1894
  controlType: r.control.type,
1895
- participants: g || [],
1895
+ participants: x || [],
1896
1896
  selectedCardIds: r.nextSelectedCardIds
1897
1897
  }), L = ca({
1898
1898
  control: r.control,
1899
1899
  choices: b.choices
1900
1900
  }), R = Object.fromEntries(
1901
- x.filter((M) => !r.nextSelectedCardIds.includes(M)).map((M) => [M, void 0])
1901
+ g.filter((M) => !r.nextSelectedCardIds.includes(M)).map((M) => [M, void 0])
1902
1902
  );
1903
1903
  return r.nextSelectedCardIds.length > 0 && L.source.kind === "manual" && L.source.options.length > 0 && Object.assign(
1904
1904
  R,
1905
1905
  Tt({
1906
1906
  control: L,
1907
- participants: g || [],
1907
+ participants: x || [],
1908
1908
  selectedCardIds: r.nextSelectedCardIds,
1909
1909
  matrixTargetIds: r.matrixTargetIds
1910
1910
  })
@@ -1912,68 +1912,68 @@ function Ir({
1912
1912
  nextControl: L,
1913
1913
  cardBindingsById: R
1914
1914
  };
1915
- }, q = ne(
1916
- (r, x = o, b = { type: "update" }) => {
1917
- const L = r.map((R) => (Ke({
1915
+ }, j = ne(
1916
+ (r, g = o, b = { type: "update" }) => {
1917
+ const L = r.map((R) => (Qe({
1918
1918
  control: R,
1919
- defaultValues: x
1919
+ defaultValues: g
1920
1920
  }), ea(
1921
1921
  R
1922
1922
  )));
1923
- m(L, x, b);
1923
+ m(L, g, b);
1924
1924
  },
1925
1925
  [o, m]
1926
- ), ee = (r, x) => {
1926
+ ), ee = (r, g) => {
1927
1927
  const b = n.find(
1928
- (Q) => Q.id === r
1928
+ (K) => K.id === r
1929
1929
  );
1930
- let L = n.map((Q) => Q.id !== r ? Q : x(Q));
1930
+ let L = n.map((K) => K.id !== r ? K : g(K));
1931
1931
  const R = L.find(
1932
- (Q) => Q.id === r
1932
+ (K) => K.id === r
1933
1933
  );
1934
1934
  let M, O;
1935
1935
  if (R && (!b || ia({ control: b }, { control: R })) && e === "dashboard" && (R.type === "field_selector" || R.type === "metric_selector")) {
1936
- const Q = (k == null ? void 0 : k[R.id]) || [], pe = B({
1936
+ const K = (k == null ? void 0 : k[R.id]) || [], pe = B({
1937
1937
  control: R,
1938
- nextSelectedCardIds: Q
1938
+ nextSelectedCardIds: K
1939
1939
  });
1940
1940
  L = L.map(
1941
1941
  (le) => le.id === r ? pe.nextControl : le
1942
1942
  ), M = pe.cardBindingsById, O = [R.id];
1943
1943
  } else if (b && (!R || !da(R.type)) && e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector")) {
1944
- const Q = (k == null ? void 0 : k[b.id]) || [];
1944
+ const K = (k == null ? void 0 : k[b.id]) || [];
1945
1945
  M = Object.fromEntries(
1946
- Q.map((pe) => [pe, void 0])
1946
+ K.map((pe) => [pe, void 0])
1947
1947
  ), O = [b.id];
1948
1948
  }
1949
1949
  const W = L.find(
1950
- (Q) => Q.id === r
1950
+ (K) => K.id === r
1951
1951
  );
1952
1952
  let X = o;
1953
1953
  if (b && W) {
1954
- const Q = Ke({
1954
+ const K = Qe({
1955
1955
  control: b,
1956
1956
  defaultValues: o
1957
1957
  });
1958
- b.source.kind === "manual" && W.source.kind === "sql_query" && ($.current[r] = Q);
1959
- const pe = Q === void 0 && b.source.kind === "sql_query" && W.source.kind === "manual" ? $.current[r] : Q, le = Dt({
1958
+ b.source.kind === "manual" && W.source.kind === "sql_query" && ($.current[r] = K);
1959
+ const pe = K === void 0 && b.source.kind === "sql_query" && W.source.kind === "manual" ? $.current[r] : K, le = Dt({
1960
1960
  previousControl: b,
1961
1961
  nextControl: W,
1962
1962
  currentDefaultValue: pe
1963
1963
  });
1964
1964
  W.source.kind === "manual" && ($.current[r] = le), o && (X = { ...o }, le === void 0 ? delete X[r] : X[r] = le), L = L.map(
1965
- (xt) => xt.id === r ? { ...W, defaultValue: le } : xt
1965
+ (gt) => gt.id === r ? { ...W, defaultValue: le } : gt
1966
1966
  );
1967
1967
  }
1968
- q(L, X, {
1968
+ j(L, X, {
1969
1969
  type: "update",
1970
1970
  cardBindingsById: M,
1971
1971
  affectedBindingControlIds: O
1972
1972
  });
1973
- }, te = (r, x) => {
1974
- if (!x.trim())
1973
+ }, te = (r, g) => {
1974
+ if (!g.trim())
1975
1975
  return;
1976
- const b = ua(x);
1976
+ const b = ua(g);
1977
1977
  if (b === r || V.has(b) || n.some(
1978
1978
  (M) => M.id === b && M.id !== r
1979
1979
  ))
@@ -1982,7 +1982,7 @@ function Ir({
1982
1982
  (M) => M.id === r ? { ...M, id: b } : M
1983
1983
  );
1984
1984
  if (!o) {
1985
- q(L, void 0, {
1985
+ j(L, void 0, {
1986
1986
  type: "rename",
1987
1987
  oldId: r,
1988
1988
  newId: b
@@ -1990,36 +1990,36 @@ function Ir({
1990
1990
  return;
1991
1991
  }
1992
1992
  const R = { ...o };
1993
- Object.prototype.hasOwnProperty.call(R, r) && (R[b] = R[r], delete R[r]), q(L, R, {
1993
+ Object.prototype.hasOwnProperty.call(R, r) && (R[b] = R[r], delete R[r]), j(L, R, {
1994
1994
  type: "rename",
1995
1995
  oldId: r,
1996
1996
  newId: b
1997
1997
  });
1998
1998
  }, Be = (r) => {
1999
- const x = n.filter((L) => L.id !== r);
1999
+ const g = n.filter((L) => L.id !== r);
2000
2000
  if (!o) {
2001
- q(x, void 0, { type: "remove", controlId: r });
2001
+ j(g, void 0, { type: "remove", controlId: r });
2002
2002
  return;
2003
2003
  }
2004
2004
  const b = { ...o };
2005
- delete b[r], q(x, b, { type: "remove", controlId: r });
2005
+ delete b[r], j(g, b, { type: "remove", controlId: r });
2006
2006
  }, We = ne(() => {
2007
2007
  D.current = void 0, I({
2008
2008
  step: 1,
2009
2009
  control: Ae(e, n, Array.from(V))
2010
- }), Z(null), T(null);
2010
+ }), J(null), T(null);
2011
2011
  }, [n, V, e]), oe = (r) => {
2012
2012
  I(
2013
- (x) => x && (() => {
2014
- const b = r(x.control);
2015
- x.control.source.kind === "manual" && b.source.kind === "sql_query" && (D.current = x.defaultValue);
2016
- const L = x.defaultValue === void 0 && x.control.source.kind === "sql_query" && b.source.kind === "manual" ? D.current : x.defaultValue, R = Dt({
2017
- previousControl: x.control,
2013
+ (g) => g && (() => {
2014
+ const b = r(g.control);
2015
+ g.control.source.kind === "manual" && b.source.kind === "sql_query" && (D.current = g.defaultValue);
2016
+ const L = g.defaultValue === void 0 && g.control.source.kind === "sql_query" && b.source.kind === "manual" ? D.current : g.defaultValue, R = Dt({
2017
+ previousControl: g.control,
2018
2018
  nextControl: b,
2019
2019
  currentDefaultValue: L
2020
2020
  });
2021
2021
  return b.source.kind === "manual" && (D.current = R), {
2022
- ...x,
2022
+ ...g,
2023
2023
  control: b,
2024
2024
  defaultValue: R
2025
2025
  };
@@ -2027,8 +2027,8 @@ function Ir({
2027
2027
  );
2028
2028
  }, Ie = (r) => {
2029
2029
  I(
2030
- (x) => x && (x.control.source.kind === "manual" && (D.current = r), {
2031
- ...x,
2030
+ (g) => g && (g.control.source.kind === "manual" && (D.current = r), {
2031
+ ...g,
2032
2032
  defaultValue: r
2033
2033
  })
2034
2034
  );
@@ -2037,40 +2037,40 @@ function Ir({
2037
2037
  return !1;
2038
2038
  if (p.step === 2 && w(p.control.type))
2039
2039
  return (p.selectedCardIds || []).length > 0 && ta({
2040
- participants: g || [],
2040
+ participants: x || [],
2041
2041
  selectedCardIds: p.selectedCardIds || [],
2042
2042
  control: p.control,
2043
2043
  selected: p.matrixTargetIds
2044
2044
  });
2045
2045
  if (p.step !== 2 && p.step !== 3 || !p.control.label.trim())
2046
2046
  return !1;
2047
- const x = p.control.source.kind === "sql_query" ? p.control : kt(p.control);
2048
- if (x.source.kind === "manual" && (na(x) && x.source.options.length === 0 || x.source.options.some(
2047
+ const g = p.control.source.kind === "sql_query" ? p.control : kt(p.control);
2048
+ if (g.source.kind === "manual" && (na(g) && g.source.options.length === 0 || g.source.options.some(
2049
2049
  (L) => L.label.trim().length === 0 || L.value.trim().length === 0
2050
2050
  )))
2051
2051
  return !1;
2052
- if (x.source.kind === "sql_query") {
2053
- const { connectionId: b, sql: L, valueColumn: R } = x.source;
2052
+ if (g.source.kind === "sql_query") {
2053
+ const { connectionId: b, sql: L, valueColumn: R } = g.source;
2054
2054
  return b.trim().length > 0 && L.trim().length > 0 && R.trim().length > 0;
2055
2055
  }
2056
2056
  return aa(
2057
- Oe(x, p.defaultValue)
2057
+ Oe(g, p.defaultValue)
2058
2058
  );
2059
2059
  })(), Ce = () => {
2060
2060
  var M;
2061
2061
  if (!p)
2062
2062
  return;
2063
- const r = kt(p.control), x = la({
2063
+ const r = kt(p.control), g = la({
2064
2064
  label: r.label,
2065
2065
  fallbackId: r.id,
2066
2066
  existingControls: n,
2067
2067
  reservedIds: Array.from(V)
2068
2068
  }), b = {
2069
2069
  ...r,
2070
- id: x
2070
+ id: g
2071
2071
  }, L = e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") && ((M = p.selectedCardIds) != null && M.length) ? Tt({
2072
2072
  control: b,
2073
- participants: g || [],
2073
+ participants: x || [],
2074
2074
  selectedCardIds: p.selectedCardIds,
2075
2075
  matrixTargetIds: p.matrixTargetIds
2076
2076
  }) : void 0, R = Oe(
@@ -2081,7 +2081,7 @@ function Ir({
2081
2081
  step: e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") ? 4 : 3,
2082
2082
  control: b,
2083
2083
  defaultValue: R,
2084
- createdControlId: x,
2084
+ createdControlId: g,
2085
2085
  selectedCardIds: p.selectedCardIds,
2086
2086
  matrixTargetIds: p.matrixTargetIds,
2087
2087
  cardBindingsById: L
@@ -2093,13 +2093,13 @@ function Ir({
2093
2093
  I(null);
2094
2094
  return;
2095
2095
  }
2096
- const r = p.control, x = p.createdControlId, b = Oe(
2096
+ const r = p.control, g = p.createdControlId, b = Oe(
2097
2097
  r,
2098
2098
  p.defaultValue
2099
2099
  );
2100
2100
  if (o) {
2101
2101
  const L = { ...o };
2102
- b === void 0 ? delete L[x] : L[x] = b, q(
2102
+ b === void 0 ? delete L[g] : L[g] = b, j(
2103
2103
  [
2104
2104
  ...n,
2105
2105
  {
@@ -2114,7 +2114,7 @@ function Ir({
2114
2114
  }
2115
2115
  );
2116
2116
  } else
2117
- q(
2117
+ j(
2118
2118
  [
2119
2119
  ...n,
2120
2120
  {
@@ -2128,8 +2128,8 @@ function Ir({
2128
2128
  cardBindingsById: p.cardBindingsById
2129
2129
  }
2130
2130
  );
2131
- Z(x), I(null), S == null || S();
2132
- }, [n, p, o, q, S]), gt = p ? w(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${ra(p.control.label) || p.control.id}]]` : "", me = St({
2131
+ J(g), I(null), S == null || S();
2132
+ }, [n, p, o, j, S]), xt = p ? w(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${ra(p.control.label) || p.control.id}]]` : "", me = St({
2133
2133
  controls: n,
2134
2134
  defaultValues: o
2135
2135
  }), A = p ? [...n, p.control] : n, ae = p ? St({
@@ -2148,7 +2148,7 @@ function Ir({
2148
2148
  Ga,
2149
2149
  {
2150
2150
  currentStep: p.step,
2151
- labels: gt
2151
+ labels: xt
2152
2152
  }
2153
2153
  ),
2154
2154
  p.step === 1 && (() => {
@@ -2157,14 +2157,14 @@ function Ir({
2157
2157
  "aggregation_selector",
2158
2158
  "field_selector",
2159
2159
  "metric_selector"
2160
- ]), x = /* @__PURE__ */ new Set([
2160
+ ]), g = /* @__PURE__ */ new Set([
2161
2161
  // Temporarily hide these from the add-control dialog while
2162
2162
  // keeping the shared definitions for existing controls.
2163
2163
  "date",
2164
2164
  "text"
2165
- ]), b = f.filter(
2166
- (M) => !r.has(M.value) && !x.has(M.value)
2167
- ), L = f.filter(
2165
+ ]), b = h.filter(
2166
+ (M) => !r.has(M.value) && !g.has(M.value)
2167
+ ), L = h.filter(
2168
2168
  (M) => r.has(M.value)
2169
2169
  ), R = (M) => /* @__PURE__ */ i(
2170
2170
  "button",
@@ -2172,7 +2172,7 @@ function Ir({
2172
2172
  type: "button",
2173
2173
  className: "rounded-control border border-border/60 bg-background px-3 py-2.5 text-left transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:outline-none",
2174
2174
  onClick: () => I(
2175
- Qa({
2175
+ Ka({
2176
2176
  scope: e,
2177
2177
  existingControls: n,
2178
2178
  reservedIds: Array.from(V),
@@ -2197,7 +2197,7 @@ function Ir({
2197
2197
  /* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: L.map(R) })
2198
2198
  ] }),
2199
2199
  /* @__PURE__ */ t(
2200
- qe,
2200
+ je,
2201
2201
  {
2202
2202
  secondary: /* @__PURE__ */ t(
2203
2203
  G,
@@ -2219,8 +2219,8 @@ function Ir({
2219
2219
  ln,
2220
2220
  {
2221
2221
  control: p.control,
2222
- onChange: (r) => oe((x) => ({
2223
- ...x,
2222
+ onChange: (r) => oe((g) => ({
2223
+ ...g,
2224
2224
  label: r
2225
2225
  }))
2226
2226
  }
@@ -2228,7 +2228,7 @@ function Ir({
2228
2228
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
2229
2229
  ] }),
2230
2230
  H.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: H.map((r) => {
2231
- const x = (p.selectedCardIds || []).includes(r.cardId);
2231
+ const g = (p.selectedCardIds || []).includes(r.cardId);
2232
2232
  return /* @__PURE__ */ i(
2233
2233
  "label",
2234
2234
  {
@@ -2237,7 +2237,7 @@ function Ir({
2237
2237
  /* @__PURE__ */ t(
2238
2238
  Ue,
2239
2239
  {
2240
- checked: x,
2240
+ checked: g,
2241
2241
  onCheckedChange: (b) => I(
2242
2242
  (L) => L && {
2243
2243
  ...L,
@@ -2267,11 +2267,11 @@ function Ir({
2267
2267
  selectedCardIds: p.selectedCardIds || [],
2268
2268
  control: p.control,
2269
2269
  selected: p.matrixTargetIds,
2270
- onChange: (r, x) => I((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: x } })
2270
+ onChange: (r, g) => I((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: g } })
2271
2271
  }
2272
2272
  ),
2273
2273
  /* @__PURE__ */ t(
2274
- qe,
2274
+ je,
2275
2275
  {
2276
2276
  secondary: /* @__PURE__ */ t(
2277
2277
  G,
@@ -2317,8 +2317,8 @@ function Ir({
2317
2317
  previewControlDefinitions: A,
2318
2318
  previewControlValues: ae,
2319
2319
  onControlChange: (r) => oe(() => r),
2320
- onLabelChange: (r) => oe((x) => ({
2321
- ...x,
2320
+ onLabelChange: (r) => oe((g) => ({
2321
+ ...g,
2322
2322
  label: r
2323
2323
  })),
2324
2324
  onDefaultValueChange: Ie,
@@ -2342,8 +2342,8 @@ function Ir({
2342
2342
  previewControlDefinitions: A,
2343
2343
  previewControlValues: ae,
2344
2344
  onControlChange: (r) => oe(() => r),
2345
- onLabelChange: (r) => oe((x) => ({
2346
- ...x,
2345
+ onLabelChange: (r) => oe((g) => ({
2346
+ ...g,
2347
2347
  label: r
2348
2348
  })),
2349
2349
  onDefaultValueChange: Ie,
@@ -2363,7 +2363,7 @@ function Ir({
2363
2363
  control: p.control,
2364
2364
  scope: e,
2365
2365
  createdReference: Se,
2366
- explorerContent: /* @__PURE__ */ i(fe, { children: [
2366
+ explorerContent: /* @__PURE__ */ i(he, { children: [
2367
2367
  "Open the card and use",
2368
2368
  " ",
2369
2369
  /* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
@@ -2387,13 +2387,13 @@ function Ir({
2387
2387
  control: p.control,
2388
2388
  scope: e,
2389
2389
  createdReference: Se,
2390
- summaryDetail: /* @__PURE__ */ i(fe, { children: [
2390
+ summaryDetail: /* @__PURE__ */ i(he, { children: [
2391
2391
  "Used by ",
2392
2392
  (p.selectedCardIds || []).length,
2393
2393
  " selected card",
2394
2394
  (p.selectedCardIds || []).length === 1 ? "" : "s"
2395
2395
  ] }),
2396
- explorerContent: /* @__PURE__ */ t(fe, { children: "Selected cards have been set up to respond to this control automatically." }),
2396
+ explorerContent: /* @__PURE__ */ t(he, { children: "Selected cards have been set up to respond to this control automatically." }),
2397
2397
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
2398
2398
  onBack: () => I(
2399
2399
  (r) => r && {
@@ -2408,7 +2408,7 @@ function Ir({
2408
2408
  ] }) : null,
2409
2409
  !p && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: d }) : null,
2410
2410
  !p && n.map((r) => {
2411
- const x = z(r), b = l == null ? void 0 : l[r.id], L = Ke({
2411
+ const g = z(r), b = l == null ? void 0 : l[r.id], L = Qe({
2412
2412
  control: r,
2413
2413
  defaultValues: o
2414
2414
  }), R = U === r.id, M = "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";
@@ -2423,7 +2423,7 @@ function Ir({
2423
2423
  {
2424
2424
  type: "button",
2425
2425
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
2426
- onClick: () => Z(
2426
+ onClick: () => J(
2427
2427
  (O) => O === r.id ? null : r.id
2428
2428
  ),
2429
2429
  children: [
@@ -2475,20 +2475,20 @@ function Ir({
2475
2475
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
2476
2476
  /* @__PURE__ */ t(ie, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
2477
2477
  /* @__PURE__ */ i(
2478
- ge,
2478
+ xe,
2479
2479
  {
2480
2480
  value: r.type,
2481
2481
  onValueChange: (O) => {
2482
- const W = Jt({
2482
+ const W = Zt({
2483
2483
  controls: n,
2484
2484
  controlId: r.id,
2485
2485
  nextType: O,
2486
2486
  defaultValues: o
2487
2487
  });
2488
- q(W.controls, W.defaultValues);
2488
+ j(W.controls, W.defaultValues);
2489
2489
  },
2490
2490
  children: [
2491
- /* @__PURE__ */ t(xe, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2491
+ /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2492
2492
  /* @__PURE__ */ t(ve, { children: E(r.type).map(
2493
2493
  (O) => /* @__PURE__ */ t(
2494
2494
  re,
@@ -2506,28 +2506,28 @@ function Ir({
2506
2506
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
2507
2507
  /* @__PURE__ */ t(ie, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
2508
2508
  /* @__PURE__ */ i(
2509
- ge,
2509
+ xe,
2510
2510
  {
2511
- value: r.placement || K,
2511
+ value: r.placement || Q,
2512
2512
  onValueChange: (O) => ee(r.id, (W) => ({
2513
2513
  ...W,
2514
2514
  placement: O
2515
2515
  })),
2516
2516
  children: [
2517
- /* @__PURE__ */ t(xe, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2517
+ /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2518
2518
  /* @__PURE__ */ t(ve, { children: F.map((O) => /* @__PURE__ */ t(re, { value: O.value, children: O.label }, O.value)) })
2519
2519
  ]
2520
2520
  }
2521
2521
  )
2522
2522
  ] })
2523
2523
  ] }),
2524
- w(r.type) ? /* @__PURE__ */ i(fe, { children: [
2524
+ w(r.type) ? /* @__PURE__ */ i(he, { children: [
2525
2525
  /* @__PURE__ */ t(
2526
2526
  On,
2527
2527
  {
2528
2528
  type: r.type,
2529
2529
  participants: wt(
2530
- g || [],
2530
+ x || [],
2531
2531
  r.type
2532
2532
  ).map((O) => ({
2533
2533
  cardId: O.cardId,
@@ -2540,9 +2540,9 @@ function Ir({
2540
2540
  control: r,
2541
2541
  nextSelectedCardIds: O
2542
2542
  }), X = n.map(
2543
- (Q) => Q.id === r.id ? W.nextControl : Q
2543
+ (K) => K.id === r.id ? W.nextControl : K
2544
2544
  );
2545
- q(X, o, {
2545
+ j(X, o, {
2546
2546
  type: "update",
2547
2547
  cardBindingsById: W.cardBindingsById
2548
2548
  });
@@ -2552,7 +2552,7 @@ function Ir({
2552
2552
  /* @__PURE__ */ t(
2553
2553
  vt,
2554
2554
  {
2555
- participants: g || [],
2555
+ participants: x || [],
2556
2556
  selectedCardIds: (k == null ? void 0 : k[r.id]) || [],
2557
2557
  control: r,
2558
2558
  onChange: (O, W) => {
@@ -2561,8 +2561,8 @@ function Ir({
2561
2561
  nextSelectedCardIds: (k == null ? void 0 : k[r.id]) || [],
2562
2562
  matrixTargetIds: { [O]: W }
2563
2563
  });
2564
- q(
2565
- n.map((Q) => Q.id === r.id ? X.nextControl : Q),
2564
+ j(
2565
+ n.map((K) => K.id === r.id ? X.nextControl : K),
2566
2566
  o,
2567
2567
  { type: "update", cardBindingsById: X.cardBindingsById }
2568
2568
  );
@@ -2574,8 +2574,8 @@ function Ir({
2574
2574
  Mt,
2575
2575
  {
2576
2576
  control: r,
2577
- availableFieldChoices: x.fields,
2578
- availableMetricChoices: x.metrics,
2577
+ availableFieldChoices: g.fields,
2578
+ availableMetricChoices: g.metrics,
2579
2579
  previewControlDefinitions: n,
2580
2580
  previewControlValues: me,
2581
2581
  controlLifecycle: "edit",
@@ -2583,7 +2583,7 @@ function Ir({
2583
2583
  }
2584
2584
  ),
2585
2585
  r.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
2586
- jt,
2586
+ qt,
2587
2587
  {
2588
2588
  control: r,
2589
2589
  value: L,
@@ -2597,10 +2597,10 @@ function Ir({
2597
2597
  );
2598
2598
  if (r.source.kind === "manual" && ($.current[r.id] = O), o) {
2599
2599
  const X = { ...o };
2600
- O === void 0 ? delete X[r.id] : X[r.id] = O, q(W, X);
2600
+ O === void 0 ? delete X[r.id] : X[r.id] = O, j(W, X);
2601
2601
  return;
2602
2602
  }
2603
- q(W, void 0);
2603
+ j(W, void 0);
2604
2604
  }
2605
2605
  }
2606
2606
  ),
@@ -2639,7 +2639,7 @@ function Ir({
2639
2639
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
2640
2640
  /* @__PURE__ */ t(ie, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
2641
2641
  /* @__PURE__ */ i(
2642
- ge,
2642
+ xe,
2643
2643
  {
2644
2644
  value: r.initialValueStrategy,
2645
2645
  onValueChange: (O) => ee(r.id, (W) => ({
@@ -2647,7 +2647,7 @@ function Ir({
2647
2647
  initialValueStrategy: O
2648
2648
  })),
2649
2649
  children: [
2650
- /* @__PURE__ */ t(xe, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2650
+ /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
2651
2651
  /* @__PURE__ */ t(ve, { children: oa.map((O) => /* @__PURE__ */ t(
2652
2652
  re,
2653
2653
  {
@@ -2701,7 +2701,7 @@ function Lr(e) {
2701
2701
  dismissMode: m = "passive"
2702
2702
  } = e, d = n !== void 0, [u, l] = Y(!1), [s, c] = Y(
2703
2703
  o
2704
- ), g = d ? n : u, k = ne(
2704
+ ), x = d ? n : u, k = ne(
2705
2705
  (N) => {
2706
2706
  !N && s && m === "passive" || (d || l(N), N || c(!1), a == null || a(N));
2707
2707
  },
@@ -2710,9 +2710,9 @@ function Lr(e) {
2710
2710
  d || l(!1), c(!1), a == null || a(!1);
2711
2711
  }, [d, a]);
2712
2712
  de(() => {
2713
- g || c(!1);
2714
- }, [g]);
2715
- const h = ne(
2713
+ x || c(!1);
2714
+ }, [x]);
2715
+ const f = ne(
2716
2716
  (N) => {
2717
2717
  s && N.preventDefault();
2718
2718
  },
@@ -2722,8 +2722,8 @@ function Lr(e) {
2722
2722
  forceClose: y,
2723
2723
  handleOpenChange: k,
2724
2724
  isCreateFlowActive: s,
2725
- preventPassiveDismissDuringCreate: h,
2726
- resolvedOpen: g,
2725
+ preventPassiveDismissDuringCreate: f,
2726
+ resolvedOpen: x,
2727
2727
  setIsCreateFlowActive: c
2728
2728
  };
2729
2729
  }
@@ -2739,12 +2739,12 @@ function pt(e, n) {
2739
2739
  const a = dn(e);
2740
2740
  return n.relativeMeta ? { ...a, value: n.value, relativeMeta: n.relativeMeta } : { ...a, value: n.value };
2741
2741
  }
2742
- function Ka(e, n) {
2742
+ function Qa(e, n) {
2743
2743
  const a = n === "in" || n === "not in" || n === "between" || n === "not between" ? [] : n === "isNull" || n === "isNotNull" ? null : "";
2744
2744
  return pt({ ...e, operator: n }, { value: a });
2745
2745
  }
2746
2746
  function Pa(e, n) {
2747
- const a = je(n.dataType) === "date";
2747
+ const a = qe(n.dataType) === "date";
2748
2748
  return pt(
2749
2749
  { ...e, field: n, operator: a ? "between" : "=" },
2750
2750
  { value: "" }
@@ -2776,10 +2776,10 @@ function Ha({
2776
2776
  entityId: "default",
2777
2777
  entityName: "Default",
2778
2778
  entityType: "table"
2779
- }, g = (I) => {
2779
+ }, x = (I) => {
2780
2780
  const $ = (D) => {
2781
2781
  if (D.id === I) {
2782
- const v = s[0] || c, f = je(v.dataType) === "date";
2782
+ const v = s[0] || c, h = qe(v.dataType) === "date";
2783
2783
  return {
2784
2784
  ...D,
2785
2785
  conditions: [
@@ -2787,8 +2787,8 @@ function Ha({
2787
2787
  {
2788
2788
  id: `condition-${Date.now()}`,
2789
2789
  field: v,
2790
- operator: f ? "between" : "=",
2791
- value: f ? [] : ""
2790
+ operator: h ? "between" : "=",
2791
+ value: h ? [] : ""
2792
2792
  }
2793
2793
  ]
2794
2794
  };
@@ -2802,7 +2802,7 @@ function Ha({
2802
2802
  }, k = (I) => {
2803
2803
  const $ = (D) => {
2804
2804
  if (D.id === I) {
2805
- const v = s[0] || c, f = je(v.dataType) === "date";
2805
+ const v = s[0] || c, h = qe(v.dataType) === "date";
2806
2806
  return {
2807
2807
  ...D,
2808
2808
  groups: [
@@ -2815,8 +2815,8 @@ function Ha({
2815
2815
  {
2816
2816
  id: `condition-${Date.now()}`,
2817
2817
  field: v,
2818
- operator: f ? "between" : "=",
2819
- value: f ? [] : ""
2818
+ operator: h ? "between" : "=",
2819
+ value: h ? [] : ""
2820
2820
  }
2821
2821
  ],
2822
2822
  groups: []
@@ -2833,36 +2833,36 @@ function Ha({
2833
2833
  }, y = (I, $) => {
2834
2834
  const D = (v) => v.id === I ? {
2835
2835
  ...v,
2836
- conditions: v.conditions.filter((f) => f.id !== $)
2836
+ conditions: v.conditions.filter((h) => h.id !== $)
2837
2837
  } : {
2838
2838
  ...v,
2839
2839
  groups: v.groups.map(D)
2840
2840
  };
2841
2841
  d(D(o));
2842
- }, h = (I, $) => {
2842
+ }, f = (I, $) => {
2843
2843
  const D = (v) => v.id === I ? {
2844
2844
  ...v,
2845
- groups: v.groups.filter((f) => f.id !== $)
2845
+ groups: v.groups.filter((h) => h.id !== $)
2846
2846
  } : {
2847
2847
  ...v,
2848
2848
  groups: v.groups.map(D)
2849
2849
  };
2850
2850
  d(D(o));
2851
2851
  }, N = (I, $, D) => {
2852
- const v = (f) => f.id === I ? {
2853
- ...f,
2854
- conditions: f.conditions.map(
2852
+ const v = (h) => h.id === I ? {
2853
+ ...h,
2854
+ conditions: h.conditions.map(
2855
2855
  (E) => E.id === $ ? D(E) : E
2856
2856
  )
2857
2857
  } : {
2858
- ...f,
2859
- groups: f.groups.map(v)
2858
+ ...h,
2859
+ groups: h.groups.map(v)
2860
2860
  };
2861
2861
  d(v(o));
2862
2862
  }, S = (I, $, D) => N(I, $, (v) => ({
2863
2863
  ..."value" in D || "operator" in D || "field" in D ? dn(v) : v,
2864
2864
  ...D
2865
- })), V = (I, $, D) => N(I, $, () => D), F = jn(), K = (I, $) => {
2865
+ })), V = (I, $, D) => N(I, $, () => D), F = qn(), Q = (I, $) => {
2866
2866
  const D = (v) => v.id === I ? {
2867
2867
  ...v,
2868
2868
  logicalOperator: $
@@ -2881,45 +2881,45 @@ function Ha({
2881
2881
  };
2882
2882
  d(D(o));
2883
2883
  }, T = (I, $, D) => {
2884
- const v = (f) => f.id === I ? {
2885
- ...f,
2886
- conditions: yt(f.conditions, $, D)
2884
+ const v = (h) => h.id === I ? {
2885
+ ...h,
2886
+ conditions: yt(h.conditions, $, D)
2887
2887
  } : {
2888
- ...f,
2889
- groups: f.groups.map(v)
2888
+ ...h,
2889
+ groups: h.groups.map(v)
2890
2890
  };
2891
2891
  d(v(o));
2892
2892
  }, U = (I, $, D) => {
2893
- const v = (f) => f.id === I ? {
2894
- ...f,
2895
- groups: yt(f.groups, $, D)
2893
+ const v = (h) => h.id === I ? {
2894
+ ...h,
2895
+ groups: yt(h.groups, $, D)
2896
2896
  } : {
2897
- ...f,
2898
- groups: f.groups.map(v)
2897
+ ...h,
2898
+ groups: h.groups.map(v)
2899
2899
  };
2900
2900
  d(v(o));
2901
- }, Z = (I) => {
2901
+ }, J = (I) => {
2902
2902
  if (!I || I.conditions.length === 0 && I.groups.length === 0)
2903
2903
  return "-- No filters defined";
2904
2904
  const $ = (v) => {
2905
- let f = "";
2906
- typeof v.field == "object" ? f = v.field.entityName ? `${v.field.entityName}.${v.field.name}` : v.field.name : f = String(v.field);
2905
+ let h = "";
2906
+ typeof v.field == "object" ? h = v.field.entityName ? `${v.field.entityName}.${v.field.name}` : v.field.name : h = String(v.field);
2907
2907
  const E = v.operator;
2908
2908
  let w = v.value;
2909
2909
  if (v.latestValue && E === "=")
2910
- return `${f} = ${qt} /* the latest value each time the card runs */`;
2911
- const H = Zt(v.relativeMeta);
2910
+ return `${h} = ${jt} /* the latest value each time the card runs */`;
2911
+ const H = Jt(v.relativeMeta);
2912
2912
  if (H && va(E) && en(E, H)) {
2913
2913
  const _ = Na(E, H), { label: z, range: B } = Nt(H, {
2914
2914
  tz: (F == null ? void 0 : F.tz) ?? "UTC",
2915
2915
  weekStart: (F == null ? void 0 : F.weekStart) ?? 1,
2916
2916
  anchor: (F == null ? void 0 : F.anchor) ?? "now"
2917
- }), q = _ ? Ca(_) : z;
2917
+ }), j = _ ? Ca(_) : z;
2918
2918
  if (B) {
2919
2919
  const [ee] = tn(E, [B.start, B.end]);
2920
- return `${f} ${E} '${ee.toISOString()}' /* ${q}: the date updates each time the card runs */`;
2920
+ return `${h} ${E} '${ee.toISOString()}' /* ${j}: the date updates each time the card runs */`;
2921
2921
  }
2922
- return `${f} ${E} ${q} /* the date follows your calendar each time the card runs */`;
2922
+ return `${h} ${E} ${j} /* the date follows your calendar each time the card runs */`;
2923
2923
  }
2924
2924
  if (H && (E === "between" || E === "not between")) {
2925
2925
  const _ = E === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: B } = Nt(H, {
@@ -2927,17 +2927,17 @@ function Ha({
2927
2927
  weekStart: (F == null ? void 0 : F.weekStart) ?? 1,
2928
2928
  anchor: (F == null ? void 0 : F.anchor) ?? "now"
2929
2929
  });
2930
- return B ? `${f} ${_} '${B.start.toISOString()}' AND '${B.end.toISOString()}' /* ${z}: dates update each time the card runs */` : nn(H).dataAnchored ? `${f} ${_} ${z} /* dates count back from the latest data each time the card runs */` : `${f} ${_} ${z} /* dates follow your calendar each time the card runs */`;
2930
+ return B ? `${h} ${_} '${B.start.toISOString()}' AND '${B.end.toISOString()}' /* ${z}: dates update each time the card runs */` : nn(H).dataAnchored ? `${h} ${_} ${z} /* dates count back from the latest data each time the card runs */` : `${h} ${_} ${z} /* dates follow your calendar each time the card runs */`;
2931
2931
  }
2932
2932
  if (v.field.dataType === "string" && !["in", "not in"].includes(v.operator))
2933
2933
  typeof w == "string" ? w = `'${w}'` : Array.isArray(w) && (w = `'${w.join(", ")}'`);
2934
2934
  else if (v.field.dataType === "date" || v.field.dataType === "datetime" || v.field.dataType === "timestamp")
2935
2935
  if (v.operator === "between" && Array.isArray(w) && w.length === 2) {
2936
2936
  const _ = w[0] ? `'${w[0]}'` : "NULL", z = w[1] ? `'${w[1]}'` : "NULL";
2937
- return `${f} BETWEEN ${_} AND ${z}`;
2937
+ return `${h} BETWEEN ${_} AND ${z}`;
2938
2938
  } else if ((v.operator === "in" || v.operator === "not in") && Array.isArray(w)) {
2939
2939
  const _ = w.map((z) => z ? `'${z}'` : "NULL").join(", ");
2940
- return `${f} ${E} (${_})`;
2940
+ return `${h} ${E} (${_})`;
2941
2941
  } else typeof w == "string" || w instanceof Date ? w = `'${w}'` : Array.isArray(w) && w.length > 0 && (w = `'${w[0]}'`);
2942
2942
  else if (["in", "not in"].includes(v.operator)) {
2943
2943
  let _ = [];
@@ -2950,22 +2950,22 @@ function Ha({
2950
2950
  }
2951
2951
  switch (E) {
2952
2952
  case "contains":
2953
- return typeof w == "string" ? `${f} LIKE '%${w.replace(/'/g, "")}'` : `${f} LIKE '%${String(w)}'`;
2953
+ return typeof w == "string" ? `${h} LIKE '%${w.replace(/'/g, "")}'` : `${h} LIKE '%${String(w)}'`;
2954
2954
  case "startsWith":
2955
- return typeof w == "string" ? `${f} LIKE '${w.replace(/'/g, "")}%'` : `${f} LIKE '${String(w)}%'`;
2955
+ return typeof w == "string" ? `${h} LIKE '${w.replace(/'/g, "")}%'` : `${h} LIKE '${String(w)}%'`;
2956
2956
  case "endsWith":
2957
- return typeof w == "string" ? `${f} LIKE '%${w.replace(/'/g, "")}'` : `${f} LIKE '%${String(w)}'`;
2957
+ return typeof w == "string" ? `${h} LIKE '%${w.replace(/'/g, "")}'` : `${h} LIKE '%${String(w)}'`;
2958
2958
  case "isNull":
2959
- return `${f} IS NULL`;
2959
+ return `${h} IS NULL`;
2960
2960
  case "isNotNull":
2961
- return `${f} IS NOT NULL`;
2961
+ return `${h} IS NOT NULL`;
2962
2962
  default:
2963
- return `${f} ${E} ${w}`;
2963
+ return `${h} ${E} ${w}`;
2964
2964
  }
2965
2965
  }, D = (v) => {
2966
- const f = v.conditions.map($), E = v.groups.map(
2966
+ const h = v.conditions.map($), E = v.groups.map(
2967
2967
  (z) => D(z)
2968
- ), w = [...f, ...E].filter(Boolean);
2968
+ ), w = [...h, ...E].filter(Boolean);
2969
2969
  if (w.length === 0) return "";
2970
2970
  const H = w.join(` ${v.logicalOperator} `), _ = w.length > 1 ? `(${H})` : H;
2971
2971
  return v.negate ? `NOT ${_}` : _;
@@ -2977,17 +2977,17 @@ function Ha({
2977
2977
  setCurrentFilters: d,
2978
2978
  availableFields: s,
2979
2979
  isLoading: l,
2980
- addCondition: g,
2980
+ addCondition: x,
2981
2981
  addGroup: k,
2982
2982
  removeCondition: y,
2983
- removeGroup: h,
2983
+ removeGroup: f,
2984
2984
  updateConditionFields: S,
2985
2985
  replaceCondition: V,
2986
- updateGroupOperator: K,
2986
+ updateGroupOperator: Q,
2987
2987
  updateGroupNegate: C,
2988
2988
  reorderConditions: T,
2989
2989
  reorderGroups: U,
2990
- generateSQLPreview: Z,
2990
+ generateSQLPreview: J,
2991
2991
  hasAnyFilters: p
2992
2992
  };
2993
2993
  }
@@ -3000,7 +3000,7 @@ function Ya({
3000
3000
  /* @__PURE__ */ t(st, { asChild: !0, children: /* @__PURE__ */ t(
3001
3001
  "div",
3002
3002
  {
3003
- className: j(
3003
+ className: q(
3004
3004
  "w-[200px] overflow-hidden text-ellipsis whitespace-nowrap text-sm",
3005
3005
  n
3006
3006
  ),
@@ -3030,14 +3030,14 @@ function Xa({
3030
3030
  role: "combobox",
3031
3031
  "aria-expanded": d,
3032
3032
  title: e ? `${e.entityName}.${e.name}` : void 0,
3033
- className: j(
3033
+ className: q(
3034
3034
  "min-w-0 justify-between gap-1.5 font-normal",
3035
3035
  !e && "text-muted-foreground",
3036
3036
  m
3037
3037
  ),
3038
3038
  children: [
3039
3039
  s ? /* @__PURE__ */ t(Ya, { className: "w-auto min-w-0 flex-1 text-left text-[12px]", children: s }) : /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-left", children: o }),
3040
- /* @__PURE__ */ t(qn, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
3040
+ /* @__PURE__ */ t(jn, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
3041
3041
  ]
3042
3042
  }
3043
3043
  ) }),
@@ -3047,8 +3047,8 @@ function Xa({
3047
3047
  className: "flex w-80 flex-col rounded-control p-1.5",
3048
3048
  align: "start",
3049
3049
  onOpenAutoFocus: (c) => {
3050
- var g, k;
3051
- c.preventDefault(), (k = (g = c.currentTarget) == null ? void 0 : g.querySelector('input[type="text"]')) == null || k.focus();
3050
+ var x, k;
3051
+ c.preventDefault(), (k = (x = c.currentTarget) == null ? void 0 : x.querySelector('input[type="text"]')) == null || k.focus();
3052
3052
  },
3053
3053
  children: /* @__PURE__ */ t(
3054
3054
  Un,
@@ -3087,7 +3087,7 @@ function cn(e, n) {
3087
3087
  currentSelectionPolicy: "exclude"
3088
3088
  });
3089
3089
  }
3090
- function Ja({
3090
+ function Za({
3091
3091
  field: e,
3092
3092
  source: n,
3093
3093
  selected: a,
@@ -3096,17 +3096,17 @@ function Ja({
3096
3096
  className: d
3097
3097
  }) {
3098
3098
  const [u, l] = Fe.useState(!1), s = cn(e, n), c = Fe.useMemo(
3099
- () => new Set(a.map((h) => ye(h))),
3099
+ () => new Set(a.map((f) => ye(f))),
3100
3100
  [a]
3101
- ), g = (h) => {
3101
+ ), x = (f) => {
3102
3102
  var N, S;
3103
- return ((S = (N = s.allRecords.find((V) => ye(V.value) === ye(h))) == null ? void 0 : N.label) == null ? void 0 : S.toString()) ?? h;
3104
- }, k = (h) => {
3105
- o(a.filter((N) => N !== h));
3106
- }, y = (h) => {
3107
- l(h), !h && s.query && s.setQuery("");
3103
+ return ((S = (N = s.allRecords.find((V) => ye(V.value) === ye(f))) == null ? void 0 : N.label) == null ? void 0 : S.toString()) ?? f;
3104
+ }, k = (f) => {
3105
+ o(a.filter((N) => N !== f));
3106
+ }, y = (f) => {
3107
+ l(f), !f && s.query && s.setQuery("");
3108
3108
  };
3109
- return /* @__PURE__ */ t("div", { className: j("w-full", d), children: /* @__PURE__ */ i(lt, { open: u, onOpenChange: y, modal: !0, children: [
3109
+ return /* @__PURE__ */ t("div", { className: q("w-full", d), children: /* @__PURE__ */ i(lt, { open: u, onOpenChange: y, modal: !0, children: [
3110
3110
  /* @__PURE__ */ t(it, { asChild: !0, children: /* @__PURE__ */ i(
3111
3111
  G,
3112
3112
  {
@@ -3116,8 +3116,8 @@ function Ja({
3116
3116
  "aria-expanded": u,
3117
3117
  className: "h-auto min-h-7 w-full justify-between gap-1.5 px-2 py-0.5 font-normal",
3118
3118
  children: [
3119
- /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-wrap gap-1", children: a.length > 0 ? a.map((h) => {
3120
- const N = g(h);
3119
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-wrap gap-1", children: a.length > 0 ? a.map((f) => {
3120
+ const N = x(f);
3121
3121
  return (
3122
3122
  // Selected values render as small square chips (4px
3123
3123
  // radius), not pills. Pill badges are reserved for
@@ -3136,20 +3136,20 @@ function Ja({
3136
3136
  "aria-label": `Remove ${N}`,
3137
3137
  className: "shrink-0 rounded-[2px] text-muted-foreground outline-none hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring",
3138
3138
  onKeyDown: (S) => {
3139
- S.key === "Enter" && k(h);
3139
+ S.key === "Enter" && k(f);
3140
3140
  },
3141
3141
  onMouseDown: (S) => {
3142
3142
  S.preventDefault(), S.stopPropagation();
3143
3143
  },
3144
3144
  onClick: (S) => {
3145
- S.stopPropagation(), k(h);
3145
+ S.stopPropagation(), k(f);
3146
3146
  },
3147
3147
  children: /* @__PURE__ */ t(ce, { className: "h-3 w-3" })
3148
3148
  }
3149
3149
  )
3150
3150
  ]
3151
3151
  },
3152
- h
3152
+ f
3153
3153
  )
3154
3154
  );
3155
3155
  }) : /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: m }) }),
@@ -3162,17 +3162,17 @@ function Ja({
3162
3162
  {
3163
3163
  className: "w-[var(--radix-popover-trigger-width)] min-w-[240px] rounded-control p-1.5",
3164
3164
  align: "start",
3165
- onOpenAutoFocus: (h) => {
3165
+ onOpenAutoFocus: (f) => {
3166
3166
  var N, S;
3167
- h.preventDefault(), (S = (N = h.currentTarget) == null ? void 0 : N.querySelector('input[type="text"]')) == null || S.focus();
3167
+ f.preventDefault(), (S = (N = f.currentTarget) == null ? void 0 : N.querySelector('input[type="text"]')) == null || S.focus();
3168
3168
  },
3169
3169
  children: /* @__PURE__ */ t(
3170
3170
  Ut,
3171
3171
  {
3172
3172
  records: s.displayRecords,
3173
3173
  selectedIdentities: c,
3174
- onToggle: (h) => {
3175
- const N = String(h.value);
3174
+ onToggle: (f) => {
3175
+ const N = String(f.value);
3176
3176
  a.includes(N) ? k(N) : o([...a, N]);
3177
3177
  },
3178
3178
  browse: s,
@@ -3185,7 +3185,7 @@ function Ja({
3185
3185
  )
3186
3186
  ] }) });
3187
3187
  }
3188
- function Za({
3188
+ function Ja({
3189
3189
  field: e,
3190
3190
  source: n,
3191
3191
  value: a,
@@ -3193,13 +3193,13 @@ function Za({
3193
3193
  placeholder: m = "Select value…",
3194
3194
  className: d
3195
3195
  }) {
3196
- var y, h;
3196
+ var y, f;
3197
3197
  const [u, l] = Fe.useState(!1), s = cn(e, n), c = Fe.useMemo(
3198
3198
  () => new Set(a ? [ye(a)] : []),
3199
3199
  [a]
3200
- ), g = a ? ((h = (y = s.allRecords.find(
3200
+ ), x = a ? ((f = (y = s.allRecords.find(
3201
3201
  (N) => ye(N.value) === ye(a)
3202
- )) == null ? void 0 : y.label) == null ? void 0 : h.toString()) ?? a : "", k = (N) => {
3202
+ )) == null ? void 0 : y.label) == null ? void 0 : f.toString()) ?? a : "", k = (N) => {
3203
3203
  l(N), !N && s.query && s.setQuery("");
3204
3204
  };
3205
3205
  return /* @__PURE__ */ i(lt, { open: u, onOpenChange: k, modal: !0, children: [
@@ -3210,7 +3210,7 @@ function Za({
3210
3210
  size: "xs",
3211
3211
  role: "combobox",
3212
3212
  "aria-expanded": u,
3213
- className: j(
3213
+ className: q(
3214
3214
  "min-w-0 flex-1 justify-between gap-1.5 px-2 font-normal",
3215
3215
  d
3216
3216
  ),
@@ -3218,8 +3218,8 @@ function Za({
3218
3218
  /* @__PURE__ */ t(
3219
3219
  "span",
3220
3220
  {
3221
- className: j("truncate", !a && "text-muted-foreground"),
3222
- children: a ? g : m
3221
+ className: q("truncate", !a && "text-muted-foreground"),
3222
+ children: a ? x : m
3223
3223
  }
3224
3224
  ),
3225
3225
  /* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
@@ -3263,14 +3263,14 @@ function er({
3263
3263
  onChange: d,
3264
3264
  className: u
3265
3265
  }) {
3266
- const l = Wn(), s = Qn(), c = n === "between" || n === "not between", g = en(n), k = g ? a : void 0, y = P(() => {
3266
+ const l = Wn(), s = Kn(), c = n === "between" || n === "not between", x = en(n), k = x ? a : void 0, y = P(() => {
3267
3267
  if (!c || !a) return;
3268
3268
  const C = s(a);
3269
3269
  return {
3270
3270
  ...C,
3271
- tooltip: C.dates ? void 0 : nn(a).dataAnchored ? Kn : Pn
3271
+ tooltip: C.dates ? void 0 : nn(a).dataAnchored ? Qn : Pn
3272
3272
  };
3273
- }, [c, a, s]), h = P(() => {
3273
+ }, [c, a, s]), f = P(() => {
3274
3274
  if (c) {
3275
3275
  if (y) {
3276
3276
  const { range: C } = y;
@@ -3286,14 +3286,14 @@ function er({
3286
3286
  if (!e || c || o) return;
3287
3287
  const C = Array.isArray(e) ? e[0] : e;
3288
3288
  return He(C, l, "start");
3289
- }, [e, c, o, l]), S = (C) => n === "<=" || n === ">" ? ga(C, l) : xa(C, l);
3289
+ }, [e, c, o, l]), S = (C) => n === "<=" || n === ">" ? xa(C, l) : ga(C, l);
3290
3290
  return /* @__PURE__ */ t(
3291
3291
  Hn,
3292
3292
  {
3293
- value: c ? h : void 0,
3293
+ value: c ? f : void 0,
3294
3294
  selectionMode: c ? "range" : "single",
3295
3295
  singleValue: c ? void 0 : N,
3296
- singleValueLabel: !c && o ? qt : void 0,
3296
+ singleValueLabel: !c && o ? jt : void 0,
3297
3297
  onChange: (C) => {
3298
3298
  if (C != null && C.from && C.to) {
3299
3299
  d({ value: [C.from.toISOString(), C.to.toISOString()] });
@@ -3306,12 +3306,12 @@ function er({
3306
3306
  d({ value: "" });
3307
3307
  return;
3308
3308
  }
3309
- const T = S(C), U = ha(T, n, {
3309
+ const T = S(C), U = fa(T, n, {
3310
3310
  timezone: l
3311
3311
  });
3312
3312
  d({ value: typeof U == "string" ? U : U.toISOString() });
3313
3313
  },
3314
- onRelativeSelect: g ? (C, T) => {
3314
+ onRelativeSelect: x ? (C, T) => {
3315
3315
  if (!C.from || !C.to) {
3316
3316
  d({ value: c ? [] : "" });
3317
3317
  return;
@@ -3326,21 +3326,21 @@ function er({
3326
3326
  });
3327
3327
  } : void 0,
3328
3328
  relativeValue: k,
3329
- comparisonValue: !c && g ? n : void 0,
3330
- relativePoints: !c && g ? { operator: n } : "none",
3329
+ comparisonValue: !c && x ? n : void 0,
3330
+ relativePoints: !c && x ? { operator: n } : "none",
3331
3331
  relativeSummary: y,
3332
- supplementalFooter: g ? /* @__PURE__ */ t("p", { className: "border-t border-border px-3 py-2 text-[11px] text-muted-foreground", children: "Presets and Relative update each time the card runs. Static dates stay fixed." }) : void 0,
3332
+ supplementalFooter: x ? /* @__PURE__ */ t("p", { className: "border-t border-border px-3 py-2 text-[11px] text-muted-foreground", children: "Presets and Relative update each time the card runs. Static dates stay fixed." }) : void 0,
3333
3333
  timezone: l,
3334
- enableTimePrecision: fa(m),
3334
+ enableTimePrecision: ha(m),
3335
3335
  staticTimeInputs: !1,
3336
- showRelativeTab: g,
3337
- className: j("min-w-0", u),
3336
+ showRelativeTab: x,
3337
+ className: q("min-w-0", u),
3338
3338
  buttonClassName: "h-7 text-[12px] [&>span]:text-[12px]",
3339
3339
  placeholder: "Select date…"
3340
3340
  }
3341
3341
  );
3342
3342
  }
3343
- const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ft = [
3343
+ const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3344
3344
  "contains",
3345
3345
  "startsWith",
3346
3346
  "endsWith",
@@ -3353,7 +3353,7 @@ const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ft = [
3353
3353
  ">=",
3354
3354
  "<",
3355
3355
  "<=",
3356
- ...ft,
3356
+ ...ht,
3357
3357
  "in",
3358
3358
  "not in",
3359
3359
  "isNull",
@@ -3361,7 +3361,7 @@ const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ft = [
3361
3361
  ], ar = [
3362
3362
  "=",
3363
3363
  "!=",
3364
- ...ft,
3364
+ ...ht,
3365
3365
  "in",
3366
3366
  "not in",
3367
3367
  "isNull",
@@ -3424,24 +3424,24 @@ function ir(e) {
3424
3424
  return nr;
3425
3425
  }
3426
3426
  }
3427
- const un = "w-[68px] shrink-0", Ot = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", ht = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
3427
+ const un = "w-[68px] shrink-0", Ot = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", ft = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
3428
3428
  function mn({
3429
3429
  value: e,
3430
3430
  onValueChange: n,
3431
3431
  "aria-label": a
3432
3432
  }) {
3433
3433
  return /* @__PURE__ */ i(
3434
- ge,
3434
+ xe,
3435
3435
  {
3436
3436
  value: e,
3437
3437
  onValueChange: (o) => n(o),
3438
3438
  children: [
3439
3439
  /* @__PURE__ */ t(
3440
- xe,
3440
+ ge,
3441
3441
  {
3442
3442
  size: "xs",
3443
3443
  "aria-label": a,
3444
- className: j(un, "font-medium"),
3444
+ className: q(un, "font-medium"),
3445
3445
  children: /* @__PURE__ */ t(be, {})
3446
3446
  }
3447
3447
  ),
@@ -3466,22 +3466,22 @@ function pn({
3466
3466
  replaceCondition: c
3467
3467
  }) {
3468
3468
  const {
3469
- attributes: g,
3469
+ attributes: x,
3470
3470
  listeners: k,
3471
3471
  setNodeRef: y,
3472
- transform: h,
3472
+ transform: f,
3473
3473
  transition: N,
3474
3474
  isDragging: S
3475
3475
  } = Gt({ id: e.id }), V = {
3476
- transform: Bt.Transform.toString(h),
3476
+ transform: Bt.Transform.toString(f),
3477
3477
  transition: N
3478
- }, F = je(e.field.dataType), K = e.operator === "isNull" || e.operator === "isNotNull", C = e.operator === "in" || e.operator === "not in";
3478
+ }, F = qe(e.field.dataType), Q = e.operator === "isNull" || e.operator === "isNotNull", C = e.operator === "in" || e.operator === "not in";
3479
3479
  return /* @__PURE__ */ i(
3480
3480
  "div",
3481
3481
  {
3482
3482
  ref: y,
3483
3483
  style: V,
3484
- className: j(
3484
+ className: q(
3485
3485
  "flex items-center gap-2 rounded-control px-1.5 py-1 transition-colors hover:bg-muted/40",
3486
3486
  S && "z-50 opacity-50"
3487
3487
  ),
@@ -3490,7 +3490,7 @@ function pn({
3490
3490
  "button",
3491
3491
  {
3492
3492
  type: "button",
3493
- ...g,
3493
+ ...x,
3494
3494
  ...k,
3495
3495
  "aria-label": "Drag to reorder condition",
3496
3496
  className: "flex h-7 w-5 shrink-0 cursor-grab items-center justify-center rounded-control text-muted-foreground/60 hover:text-foreground focus-visible:outline-none active:cursor-grabbing",
@@ -3504,7 +3504,7 @@ function pn({
3504
3504
  onValueChange: (T) => d(a, T),
3505
3505
  "aria-label": "Logical operator"
3506
3506
  }
3507
- ) : /* @__PURE__ */ t("span", { className: j(un, "text-center", ht), children: "Where" }),
3507
+ ) : /* @__PURE__ */ t("span", { className: q(un, "text-center", ft), children: "Where" }),
3508
3508
  /* @__PURE__ */ t(
3509
3509
  Xa,
3510
3510
  {
@@ -3518,25 +3518,25 @@ function pn({
3518
3518
  },
3519
3519
  availableFields: u,
3520
3520
  placeholder: "Select field",
3521
- className: j("w-60 shrink-0", Ot)
3521
+ className: q("w-60 shrink-0", Ot)
3522
3522
  }
3523
3523
  ),
3524
3524
  /* @__PURE__ */ i(
3525
- ge,
3525
+ xe,
3526
3526
  {
3527
3527
  value: e.operator,
3528
3528
  onValueChange: (T) => c(
3529
3529
  a,
3530
3530
  e.id,
3531
- Ka(e, T)
3531
+ Qa(e, T)
3532
3532
  ),
3533
3533
  children: [
3534
3534
  /* @__PURE__ */ t(
3535
- xe,
3535
+ ge,
3536
3536
  {
3537
3537
  size: "xs",
3538
3538
  "aria-label": "Operator",
3539
- className: j("w-40 shrink-0", Ot),
3539
+ className: q("w-40 shrink-0", Ot),
3540
3540
  children: /* @__PURE__ */ t(be, { children: e.operator ? Xe(e.operator) : "" })
3541
3541
  }
3542
3542
  ),
@@ -3544,8 +3544,8 @@ function pn({
3544
3544
  ]
3545
3545
  }
3546
3546
  ),
3547
- K ? /* @__PURE__ */ t("div", { className: "min-w-0 flex-1" }) : F === "string" ? C ? /* @__PURE__ */ t(
3548
- Ja,
3547
+ Q ? /* @__PURE__ */ t("div", { className: "min-w-0 flex-1" }) : F === "string" ? C ? /* @__PURE__ */ t(
3548
+ Za,
3549
3549
  {
3550
3550
  field: e.field,
3551
3551
  source: l,
@@ -3556,7 +3556,7 @@ function pn({
3556
3556
  placeholder: "Select values…",
3557
3557
  className: "min-w-0 flex-1"
3558
3558
  }
3559
- ) : ft.includes(e.operator) ? /* @__PURE__ */ t(
3559
+ ) : ht.includes(e.operator) ? /* @__PURE__ */ t(
3560
3560
  Ne,
3561
3561
  {
3562
3562
  size: "xs",
@@ -3568,7 +3568,7 @@ function pn({
3568
3568
  placeholder: `${Xe(e.operator)}…`
3569
3569
  }
3570
3570
  ) : /* @__PURE__ */ t(
3571
- Za,
3571
+ Ja,
3572
3572
  {
3573
3573
  field: e.field,
3574
3574
  source: l,
@@ -3578,14 +3578,14 @@ function pn({
3578
3578
  className: "min-w-0 flex-1"
3579
3579
  }
3580
3580
  ) : F === "boolean" ? /* @__PURE__ */ i(
3581
- ge,
3581
+ xe,
3582
3582
  {
3583
3583
  value: typeof e.value == "boolean" ? String(e.value) : "",
3584
3584
  onValueChange: (T) => s(a, e.id, {
3585
3585
  value: T === "true"
3586
3586
  }),
3587
3587
  children: [
3588
- /* @__PURE__ */ t(xe, { size: "xs", className: "min-w-0 flex-1", children: /* @__PURE__ */ t(be, { placeholder: "Select value…" }) }),
3588
+ /* @__PURE__ */ t(ge, { size: "xs", className: "min-w-0 flex-1", children: /* @__PURE__ */ t(be, { placeholder: "Select value…" }) }),
3589
3589
  /* @__PURE__ */ i(ve, { children: [
3590
3590
  /* @__PURE__ */ t(re, { value: "true", children: "True" }),
3591
3591
  /* @__PURE__ */ t(re, { value: "false", children: "False" })
@@ -3602,7 +3602,7 @@ function pn({
3602
3602
  {
3603
3603
  value: e.value,
3604
3604
  operator: e.operator,
3605
- relativeMeta: Zt(e.relativeMeta),
3605
+ relativeMeta: Jt(e.relativeMeta),
3606
3606
  latestValue: e.latestValue === !0,
3607
3607
  field: e.field,
3608
3608
  onChange: (T) => c(
@@ -3641,7 +3641,7 @@ function pn({
3641
3641
  );
3642
3642
  }
3643
3643
  const _t = "group-data-[inline]/filters:h-auto group-data-[inline]/filters:gap-1 group-data-[inline]/filters:border-0 group-data-[inline]/filters:bg-transparent group-data-[inline]/filters:px-0 group-data-[inline]/filters:py-0.5 group-data-[inline]/filters:text-[11px] group-data-[inline]/filters:font-medium group-data-[inline]/filters:text-muted-foreground group-data-[inline]/filters:shadow-none group-data-[inline]/filters:underline-offset-2 group-data-[inline]/filters:hover:bg-transparent group-data-[inline]/filters:hover:text-foreground group-data-[inline]/filters:hover:underline";
3644
- function fn({
3644
+ function hn({
3645
3645
  onAddCondition: e,
3646
3646
  onAddGroup: n
3647
3647
  }) {
@@ -3652,7 +3652,7 @@ function fn({
3652
3652
  type: "button",
3653
3653
  size: "xs",
3654
3654
  variant: "outline",
3655
- className: j("gap-1.5", _t),
3655
+ className: q("gap-1.5", _t),
3656
3656
  onClick: e,
3657
3657
  children: [
3658
3658
  /* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
@@ -3666,7 +3666,7 @@ function fn({
3666
3666
  type: "button",
3667
3667
  size: "xs",
3668
3668
  variant: "ghost",
3669
- className: j("gap-1.5 text-muted-foreground hover:text-foreground", _t),
3669
+ className: q("gap-1.5 text-muted-foreground hover:text-foreground", _t),
3670
3670
  onClick: n,
3671
3671
  children: [
3672
3672
  /* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
@@ -3687,46 +3687,46 @@ function dr({
3687
3687
  onReorderConditions: l,
3688
3688
  onReorderGroups: s,
3689
3689
  onAddCondition: c,
3690
- onAddGroup: g,
3690
+ onAddGroup: x,
3691
3691
  availableFields: k,
3692
3692
  source: y,
3693
- renderFilterGroup: h,
3693
+ renderFilterGroup: f,
3694
3694
  updateConditionFields: N,
3695
3695
  replaceCondition: S
3696
3696
  }) {
3697
3697
  const {
3698
3698
  attributes: V,
3699
3699
  listeners: F,
3700
- setNodeRef: K,
3700
+ setNodeRef: Q,
3701
3701
  transform: C,
3702
3702
  transition: T,
3703
3703
  isDragging: U
3704
- } = Gt({ id: e.id }), Z = {
3704
+ } = Gt({ id: e.id }), J = {
3705
3705
  transform: Bt.Transform.toString(C),
3706
3706
  transition: T
3707
3707
  }, p = ($) => {
3708
3708
  const { active: D, over: v } = $;
3709
3709
  if (v && D.id !== v.id) {
3710
- const f = e.conditions.findIndex(
3710
+ const h = e.conditions.findIndex(
3711
3711
  (w) => w.id === D.id
3712
3712
  ), E = e.conditions.findIndex(
3713
3713
  (w) => w.id === v.id
3714
3714
  );
3715
- f !== -1 && E !== -1 && l(e.id, f, E);
3715
+ h !== -1 && E !== -1 && l(e.id, h, E);
3716
3716
  }
3717
3717
  }, I = ($) => {
3718
3718
  const { active: D, over: v } = $;
3719
3719
  if (v && D.id !== v.id && a) {
3720
- const f = e.groups.findIndex((w) => w.id === D.id), E = e.groups.findIndex((w) => w.id === v.id);
3721
- f !== -1 && E !== -1 && s(a, f, E);
3720
+ const h = e.groups.findIndex((w) => w.id === D.id), E = e.groups.findIndex((w) => w.id === v.id);
3721
+ h !== -1 && E !== -1 && s(a, h, E);
3722
3722
  }
3723
3723
  };
3724
3724
  return /* @__PURE__ */ i(
3725
3725
  "div",
3726
3726
  {
3727
- ref: K,
3728
- style: Z,
3729
- className: j(
3727
+ ref: Q,
3728
+ style: J,
3729
+ className: q(
3730
3730
  n > 0 && "mt-2 overflow-hidden rounded-[6px] border border-border/60",
3731
3731
  U && "z-50 opacity-50"
3732
3732
  ),
@@ -3764,7 +3764,7 @@ function dr({
3764
3764
  "aria-label": "Group logical operator"
3765
3765
  }
3766
3766
  ),
3767
- /* @__PURE__ */ t("span", { className: ht, children: "Group" })
3767
+ /* @__PURE__ */ t("span", { className: ft, children: "Group" })
3768
3768
  ] }),
3769
3769
  /* @__PURE__ */ t(
3770
3770
  G,
@@ -3779,14 +3779,14 @@ function dr({
3779
3779
  }
3780
3780
  )
3781
3781
  ] }),
3782
- /* @__PURE__ */ i("div", { className: j(n > 0 && "p-2"), children: [
3782
+ /* @__PURE__ */ i("div", { className: q(n > 0 && "p-2"), children: [
3783
3783
  /* @__PURE__ */ t(
3784
3784
  Re,
3785
3785
  {
3786
- sensors: Je(
3787
- he(tt),
3788
- he(et, {
3789
- coordinateGetter: Ze
3786
+ sensors: Ze(
3787
+ fe(tt),
3788
+ fe(et, {
3789
+ coordinateGetter: Je
3790
3790
  })
3791
3791
  ),
3792
3792
  collisionDetection: Ee,
@@ -3819,10 +3819,10 @@ function dr({
3819
3819
  /* @__PURE__ */ t(
3820
3820
  Re,
3821
3821
  {
3822
- sensors: Je(
3823
- he(tt),
3824
- he(et, {
3825
- coordinateGetter: Ze
3822
+ sensors: Ze(
3823
+ fe(tt),
3824
+ fe(et, {
3825
+ coordinateGetter: Je
3826
3826
  })
3827
3827
  ),
3828
3828
  collisionDetection: Ee,
@@ -3833,7 +3833,7 @@ function dr({
3833
3833
  items: e.groups.map(($) => $.id),
3834
3834
  strategy: Me,
3835
3835
  children: e.groups.map(
3836
- ($) => h($, n + 1, e.id)
3836
+ ($) => f($, n + 1, e.id)
3837
3837
  )
3838
3838
  }
3839
3839
  )
@@ -3841,10 +3841,10 @@ function dr({
3841
3841
  ),
3842
3842
  e.conditions.length === 0 && e.groups.length === 0 && /* @__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 conditions in this group." }),
3843
3843
  /* @__PURE__ */ t(
3844
- fn,
3844
+ hn,
3845
3845
  {
3846
3846
  onAddCondition: () => c(e.id),
3847
- onAddGroup: () => g(e.id)
3847
+ onAddGroup: () => x(e.id)
3848
3848
  }
3849
3849
  )
3850
3850
  ] })
@@ -3864,33 +3864,33 @@ function $r({
3864
3864
  const l = u !== void 0, {
3865
3865
  currentFilters: s,
3866
3866
  availableFields: c,
3867
- isLoading: g,
3867
+ isLoading: x,
3868
3868
  addCondition: k,
3869
3869
  addGroup: y,
3870
- removeCondition: h,
3870
+ removeCondition: f,
3871
3871
  removeGroup: N,
3872
3872
  updateConditionFields: S,
3873
3873
  replaceCondition: V,
3874
3874
  updateGroupOperator: F,
3875
- updateGroupNegate: K,
3875
+ updateGroupNegate: Q,
3876
3876
  reorderConditions: C,
3877
3877
  reorderGroups: T,
3878
3878
  generateSQLPreview: U,
3879
- hasAnyFilters: Z
3879
+ hasAnyFilters: J
3880
3880
  } = Ha({
3881
3881
  initialFilters: e,
3882
3882
  availableFields: n,
3883
3883
  ...u ? {
3884
- onChange: (f) => u(tr(f) ? f : null)
3884
+ onChange: (h) => u(tr(h) ? h : null)
3885
3885
  } : {}
3886
- }), p = Je(
3887
- he(tt),
3888
- he(et, {
3889
- coordinateGetter: Ze
3886
+ }), p = Ze(
3887
+ fe(tt),
3888
+ fe(et, {
3889
+ coordinateGetter: Je
3890
3890
  })
3891
- ), [I, $] = Y(!1), D = (f, E = 0, w) => {
3891
+ ), [I, $] = Y(!1), D = (h, E = 0, w) => {
3892
3892
  if (E === 0) {
3893
- const H = f.conditions.length === 0 && f.groups.length === 0;
3893
+ const H = h.conditions.length === 0 && h.groups.length === 0;
3894
3894
  return /* @__PURE__ */ i("div", { children: [
3895
3895
  /* @__PURE__ */ t(
3896
3896
  Re,
@@ -3900,27 +3900,27 @@ function $r({
3900
3900
  onDragEnd: (_) => {
3901
3901
  const { active: z, over: B } = _;
3902
3902
  if (B && z.id !== B.id) {
3903
- const q = f.conditions.findIndex(
3903
+ const j = h.conditions.findIndex(
3904
3904
  (te) => te.id === z.id
3905
- ), ee = f.conditions.findIndex(
3905
+ ), ee = h.conditions.findIndex(
3906
3906
  (te) => te.id === B.id
3907
3907
  );
3908
- q !== -1 && ee !== -1 && C(f.id, q, ee);
3908
+ j !== -1 && ee !== -1 && C(h.id, j, ee);
3909
3909
  }
3910
3910
  },
3911
3911
  children: /* @__PURE__ */ t(
3912
3912
  ze,
3913
3913
  {
3914
- items: f.conditions.map((_) => _.id),
3914
+ items: h.conditions.map((_) => _.id),
3915
3915
  strategy: Me,
3916
- children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: f.conditions.map((_, z) => /* @__PURE__ */ t(
3916
+ children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: h.conditions.map((_, z) => /* @__PURE__ */ t(
3917
3917
  pn,
3918
3918
  {
3919
3919
  condition: _,
3920
3920
  index: z,
3921
- groupId: f.id,
3922
- groupLogicalOperator: f.logicalOperator,
3923
- onRemoveCondition: h,
3921
+ groupId: h.id,
3922
+ groupLogicalOperator: h.logicalOperator,
3923
+ onRemoveCondition: f,
3924
3924
  onUpdateGroupOperator: F,
3925
3925
  availableFields: c,
3926
3926
  source: a,
@@ -3941,21 +3941,21 @@ function $r({
3941
3941
  onDragEnd: (_) => {
3942
3942
  const { active: z, over: B } = _;
3943
3943
  if (B && z.id !== B.id) {
3944
- const q = f.groups.findIndex(
3944
+ const j = h.groups.findIndex(
3945
3945
  (te) => te.id === z.id
3946
- ), ee = f.groups.findIndex(
3946
+ ), ee = h.groups.findIndex(
3947
3947
  (te) => te.id === B.id
3948
3948
  );
3949
- q !== -1 && ee !== -1 && T(f.id, q, ee);
3949
+ j !== -1 && ee !== -1 && T(h.id, j, ee);
3950
3950
  }
3951
3951
  },
3952
3952
  children: /* @__PURE__ */ t(
3953
3953
  ze,
3954
3954
  {
3955
- items: f.groups.map((_) => _.id),
3955
+ items: h.groups.map((_) => _.id),
3956
3956
  strategy: Me,
3957
- children: f.groups.map(
3958
- (_) => D(_, E + 1, f.id)
3957
+ children: h.groups.map(
3958
+ (_) => D(_, E + 1, h.id)
3959
3959
  )
3960
3960
  }
3961
3961
  )
@@ -3963,28 +3963,28 @@ function $r({
3963
3963
  ),
3964
3964
  H && !l && /* @__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." }),
3965
3965
  /* @__PURE__ */ t(
3966
- fn,
3966
+ hn,
3967
3967
  {
3968
- onAddCondition: () => k(f.id),
3968
+ onAddCondition: () => k(h.id),
3969
3969
  onAddGroup: (
3970
3970
  // In place, grouping is offered once there are two conditions to group,
3971
3971
  // not as a mode to switch on first.
3972
- (l ? f.conditions.length + f.groups.length >= 2 : I) ? () => y(f.id) : void 0
3972
+ (l ? h.conditions.length + h.groups.length >= 2 : I) ? () => y(h.id) : void 0
3973
3973
  )
3974
3974
  }
3975
3975
  )
3976
- ] }, f.id);
3976
+ ] }, h.id);
3977
3977
  }
3978
3978
  return /* @__PURE__ */ t(
3979
3979
  dr,
3980
3980
  {
3981
- group: f,
3981
+ group: h,
3982
3982
  depth: E,
3983
3983
  parentGroupId: w,
3984
3984
  onUpdateGroupOperator: F,
3985
- onUpdateGroupNegate: K,
3985
+ onUpdateGroupNegate: Q,
3986
3986
  onRemoveGroup: N,
3987
- onRemoveCondition: h,
3987
+ onRemoveCondition: f,
3988
3988
  onReorderConditions: C,
3989
3989
  onReorderGroups: T,
3990
3990
  onAddCondition: k,
@@ -3995,13 +3995,13 @@ function $r({
3995
3995
  updateConditionFields: S,
3996
3996
  replaceCondition: V
3997
3997
  },
3998
- f.id
3998
+ h.id
3999
3999
  );
4000
4000
  }, v = Yn(e);
4001
- return /* @__PURE__ */ i("div", { className: j("group/filters", l ? "flex flex-col" : "flex min-h-0 flex-1 flex-col"), "data-inline": l || void 0, children: [
4001
+ return /* @__PURE__ */ i("div", { className: q("group/filters", l ? "flex flex-col" : "flex min-h-0 flex-1 flex-col"), "data-inline": l || void 0, children: [
4002
4002
  /* @__PURE__ */ i("div", { className: l ? "" : "min-h-0 flex-1 overflow-y-auto px-3 py-3", children: [
4003
- g ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-2 py-6 text-[12px] text-muted-foreground", children: [
4004
- /* @__PURE__ */ t(xn, { className: "h-3.5 w-3.5 animate-spin" }),
4003
+ x ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-2 py-6 text-[12px] text-muted-foreground", children: [
4004
+ /* @__PURE__ */ t(gn, { className: "h-3.5 w-3.5 animate-spin" }),
4005
4005
  "Loading columns…"
4006
4006
  ] }) : D(s),
4007
4007
  !l && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border/60 pt-3", children: [
@@ -4011,7 +4011,7 @@ function $r({
4011
4011
  size: "xs",
4012
4012
  id: "advanced-mode",
4013
4013
  checked: I,
4014
- onCheckedChange: (f) => $(f)
4014
+ onCheckedChange: (h) => $(h)
4015
4015
  }
4016
4016
  ),
4017
4017
  /* @__PURE__ */ t(
@@ -4024,8 +4024,8 @@ function $r({
4024
4024
  ),
4025
4025
  /* @__PURE__ */ t("span", { className: "text-[11px] text-muted-foreground", children: "Nest conditions in groups" })
4026
4026
  ] }),
4027
- Z && !l && /* @__PURE__ */ i("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4028
- /* @__PURE__ */ t("div", { className: j("mb-1.5", ht), children: "Where clause" }),
4027
+ J && !l && /* @__PURE__ */ i("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4028
+ /* @__PURE__ */ t("div", { className: q("mb-1.5", ft), children: "Where clause" }),
4029
4029
  /* @__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: U(s) })
4030
4030
  ] })
4031
4031
  ] }),
@@ -4046,7 +4046,7 @@ function $r({
4046
4046
  G,
4047
4047
  {
4048
4048
  size: "xs",
4049
- onClick: () => o == null ? void 0 : o(Z ? s : null),
4049
+ onClick: () => o == null ? void 0 : o(J ? s : null),
4050
4050
  children: "Apply filters"
4051
4051
  }
4052
4052
  )