react-semaphor 0.1.598 → 0.1.600

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 (90) hide show
  1. package/dist/analytics-protocol/index.js +336 -333
  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-C86FsM8D.js → add-to-dashboard-ClhEIFst.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-8wz9vqn_.js → analytics-base-schemas-DevrgqQb.js} +67 -60
  8. package/dist/chunks/{assistant-chat-DrI442Ld.js → assistant-chat-BULOkG9j.js} +88 -89
  9. package/dist/chunks/{bookmark-impact-C6uWtNWF.js → bookmark-impact-kdvXke8n.js} +3 -3
  10. package/dist/chunks/{bookmark-state-BfeKmj5s.js → bookmark-state-h1OLXVjE.js} +153 -153
  11. package/dist/chunks/{card-filter-builder-CSKCSpNo.js → card-filter-builder-CSCdSQQy.js} +1035 -1063
  12. package/dist/chunks/{comparison-window-caption-3bum5j00.js → comparison-window-caption-DJDwP9XO.js} +6 -6
  13. package/dist/chunks/{context-CVXTFljo.js → context-BJoEFgNl.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-C2AuKs10.js → dashboard-briefing-launcher-9YwUclHA.js} +255 -255
  15. package/dist/chunks/{dashboard-controls-BSbhyIkY.js → dashboard-controls-O6PNXMCp.js} +85 -85
  16. package/dist/chunks/{dashboard-json-Bd1rxD3y.js → dashboard-json-Bxf91TYq.js} +5 -5
  17. package/dist/chunks/{dashboard-PYd63LbL.js → dashboard-y9ON19ge.js} +1 -1
  18. package/dist/chunks/dates-DPTbpNxK.js +164 -0
  19. package/dist/chunks/{edit-dashboard-visual-D_0ZiWev.js → edit-dashboard-visual-CKwaW8H_.js} +5489 -5435
  20. package/dist/chunks/{filter-line-BdLyPYjH.js → filter-line-Dkg3yuOX.js} +6 -6
  21. package/dist/chunks/{filter-reach-copy-Dxn-mTuG.js → filter-reach-copy-ClzNcNhP.js} +1740 -1643
  22. package/dist/chunks/{filter-value-text-C6g-nDUW.js → filter-value-text-CXyuLW9Q.js} +4 -4
  23. package/dist/chunks/{index-BHSDE54O.js → index-CRo5--Y6.js} +7 -7
  24. package/dist/chunks/{layout-grid-CYR-LVpl.js → layout-grid-DSrBSfPM.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-C0IGLTZH.js → matrix-analytical-definition-i9PQY066.js} +443 -394
  26. package/dist/chunks/{matrix-member-presentation-D5BIYuy5.js → matrix-member-presentation-B_2beBc0.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract-RckfqkQm.js → matrix-operation-contract-DdK0J_KU.js} +36 -36
  28. package/dist/chunks/{metric-comparison-DsE8wdRh.js → metric-comparison-Bhz0V841.js} +2 -2
  29. package/dist/chunks/{paintbrush-xDDRjIyF.js → paintbrush-1UiU-uTz.js} +1 -1
  30. package/dist/chunks/{palette-CbOgFCy2.js → palette-DFIFf_-m.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-Cnq55Uno.js → pivot-result-contract-expectations-Dk7WFR_u.js} +8 -8
  32. package/dist/chunks/{pivot-result-identity-b4-ugQhm.js → pivot-result-identity-CzzrJpEm.js} +1 -1
  33. package/dist/chunks/{raw-temporal-value-B9W38mi3.js → raw-temporal-value-BLvdaMng.js} +2 -2
  34. package/dist/chunks/{report-preferences-dialog-DTu3a7ce.js → report-preferences-dialog-DiDsYpng.js} +14 -14
  35. package/dist/chunks/{report-runtime-context-BvJkcbar.js → report-runtime-context-CEGluufW.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-Bw-DesV2.js → resolve-dashboard-input-context-BAv33KGg.js} +11811 -11331
  37. package/dist/chunks/{save-BgvAsp6X.js → save-CWQ02kHo.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-BFh0oOnF.js → saved-dashboard-context-CvzYqADe.js} +97 -97
  39. package/dist/chunks/{selection-filter-compiler-DHYsq3yM.js → selection-filter-compiler-SwrBvyyJ.js} +1 -1
  40. package/dist/chunks/{semaphor-ready-indicator-WvgHMnj8.js → semaphor-ready-indicator-1PRI9Yh2.js} +59336 -58569
  41. package/dist/chunks/{shelf-drop-preview-context-D6HgYFJp.js → shelf-drop-preview-context-BLk5Nc6K.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-vlG0Knxi.js → stored-dashboard-xhYYKBsO.js} +1200 -1183
  43. package/dist/chunks/{style-sheet-parts-ClmvtkSC.js → style-sheet-parts-BX7d7-2-.js} +198 -198
  44. package/dist/chunks/{table-export-sheet-Bv6tVuMu.js → table-export-sheet-BWSVTclx.js} +1 -1
  45. package/dist/chunks/{token-types-eMdcuB6j.js → token-types-CnlEiAdS.js} +1 -1
  46. package/dist/chunks/{upload-ClUeK8F0.js → upload-DsqUSS8l.js} +1 -1
  47. package/dist/chunks/{validators-DwhBEvnh.js → validators-D2Hm57lJ.js} +23 -13
  48. package/dist/chunks/{variable-draft-CauoSBN0.js → variable-draft-DcKj8T1b.js} +4 -4
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2497 -2549
  51. package/dist/format-utils/index.js +14 -14
  52. package/dist/index.js +48 -48
  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/surfboard/filter/types.d.ts +13 -1
  57. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -2
  58. package/dist/types/components/visual/data-table/types/data-table.d.ts +14 -21
  59. package/dist/types/index.js +5 -5
  60. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +11 -1
  61. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +7 -0
  62. package/dist/types/lib/dashboard-viewer/table-view.d.ts +20 -0
  63. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +8 -0
  64. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +1 -0
  65. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +2 -0
  66. package/dist/types/lib/stores/dashboard-store.d.ts +3 -1
  67. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
  68. package/dist/types/shared/analytics-protocol/catalog-source-address.d.ts +16 -0
  69. package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
  70. package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
  71. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  72. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
  73. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
  74. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  75. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  76. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
  77. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +18 -0
  79. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  80. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
  81. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
  82. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
  83. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +29 -1
  84. package/dist/types/shared/usage-events/attribution.d.ts +2 -2
  85. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  86. package/dist/usage-events/index.js +1 -1
  87. package/package.json +1 -1
  88. package/dist/chunks/aggregate-measure-field-DtKcEjG5.js +0 -22
  89. package/dist/chunks/dates-DHMCf-F7.js +0 -115
  90. package/dist/chunks/list-filter-B67GsjTw.js +0 -15
@@ -1,27 +1,27 @@
1
1
  import { jsx as t, jsxs as s, Fragment as U } from "react/jsx-runtime";
2
2
  import la, { useState as E, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as Va } from "react";
3
- import { dN as it, bG as Le, bH as Ve, bJ as Be, dO as Ba, b8 as $e, b5 as ot, dP as Pa, dQ as lt, dR as Ct, an as dt, ak as ve, u as N, dS as _a, dT as Oa, bF as z, dU as za, am as oe, b3 as Ra, ca as Ma, dV as Ua, dW as $a, bZ as da, b_ as be, cu as ca, bY as tt, w as ja, q as qa, dX as Wa, cx as wt, cy as St, cz as kt, cA as Dt, cB as At, cC as Ft, cD as Et, cE as ua, cH as It, dY as Qa, du as Ka, cm as pt, cj as je, ck as qe, dG as ha, cl as We, c6 as re, cv as Ga, cq as at, dZ as Ha, c3 as Ya, d_ as ma, bu as ct, bI as Tt, bK as ut, d$ as pa, bE as Xa, e0 as Za, bv as Ja, o as en, cN as tn, e1 as an, W as nn, P as fa, bp as rn, X as sn, G as on, e2 as ln, e3 as dn, e4 as cn, e5 as ga, e6 as un, e7 as hn, e8 as Ce, e9 as mn, R as ba, ea as pn, eb as fn, b0 as gn, ec as bn, ed as ge, ee as xn, aa as Lt, ef as vn, eg as ft, eh as yn, ei as $t, ej as Nn, ek as Cn, el as wn, em as xa, cY as Sn, en as kn, eo as Dn, ep as An, dA as Vt, cI as va, eq as Fn, er as jt, es as En, et as In, eu as Tn, ev as Ln, b7 as Vn, bz as Bn, c9 as ya, ew as Pn, ex as _n, ey as Xe, ez as On, eA as zn, eB as Rn, A as Mn, aR as Un, aS as $n, ax as jn, aw as qn, av as Wn, au as Qn, ar as Kn, ap as Gn, eC as Hn, eD as Yn, eE as Xn, eF as Zn, eG as Jn, aP as er } from "./semaphor-ready-indicator-WvgHMnj8.js";
4
- import { c as Ae, B as L, X as Qe, s as Me, x as xe, L as de, q as Bt, j as Pt, p as tr, F as _t, e as Ie, a8 as Na, h as Te, f as nt, i as Ca, g as Nt, y as we, z as Se, A as ke, D as De, E as fe, a9 as ar } from "./style-sheet-parts-ClmvtkSC.js";
5
- import { L as Ue } from "./layout-grid-CYR-LVpl.js";
6
- import { c as Z } from "./pickers-DkqmtnTL.js";
7
- import { U as nr } from "./validators-DwhBEvnh.js";
8
- import "./matrix-operation-contract-RckfqkQm.js";
9
- import "./analytics-base-schemas-8wz9vqn_.js";
3
+ import { dO as it, bG as Le, bH as Ve, bJ as Pe, dP as Pa, b8 as $e, b5 as ot, dQ as Ba, dR as lt, dS as Ct, an as dt, ak as ve, u as N, dT as _a, dU as Oa, bF as z, dV as za, am as oe, b3 as Ra, cU as Ma, dW as Ua, dX as $a, bU as da, bS as be, dc as ca, bZ as tt, w as ja, q as qa, dY as Wa, df as wt, dg as St, dh as kt, di as Dt, dj as At, dk as Ft, dl as Et, dm as ua, bP as It, dZ as Qa, du as Ha, d4 as pt, d1 as je, d2 as qe, dH as ha, d3 as We, cR as re, dd as Ka, d8 as at, d_ as Ga, cP as Ya, d$ as ma, bu as ct, bI as Tt, bK as ut, e0 as pa, bE as Xa, e1 as Ja, bv as Za, o as en, bX as tn, e2 as an, W as nn, P as fa, bp as rn, X as sn, G as on, e3 as ln, e4 as dn, e5 as cn, e6 as ga, e7 as un, e8 as hn, e9 as Ce, ea as mn, R as ba, eb as pn, ec as fn, b0 as gn, ed as bn, ee as ge, ef as xn, aa as Lt, eg as vn, eh as ft, ei as yn, ej as $t, ek as Nn, el as Cn, em as wn, en as xa, c7 as Sn, eo as kn, ep as Dn, eq as An, dB as Vt, bQ as va, er as Fn, es as jt, et as En, eu as In, ev as Tn, ew as Ln, b7 as Vn, bz as Pn, cT as ya, ex as Bn, ey as _n, ez as Xe, eA as On, eB as zn, eC as Rn, A as Mn, aR as Un, aS as $n, ax as jn, aw as qn, av as Wn, au as Qn, ar as Hn, ap as Kn, eD as Gn, eE as Yn, eF as Xn, eG as Jn, eH as Zn, aP as er } from "./semaphor-ready-indicator-1PRI9Yh2.js";
4
+ import { c as Ae, B as L, X as Qe, s as Me, x as xe, L as de, q as Pt, j as Bt, p as tr, F as _t, e as Ie, a8 as Na, h as Te, f as nt, i as Ca, g as Nt, y as we, z as Se, A as ke, D as De, E as fe, a9 as ar } from "./style-sheet-parts-BX7d7-2-.js";
5
+ import { L as Ue } from "./layout-grid-DSrBSfPM.js";
6
+ import { c as J } from "./pickers-DkqmtnTL.js";
7
+ import { U as nr } from "./validators-D2Hm57lJ.js";
8
+ import "./matrix-operation-contract-DdK0J_KU.js";
9
+ import "./analytics-base-schemas-DevrgqQb.js";
10
10
  import "../value-format-preferences/index.js";
11
- import { s as Ze } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
12
- import { bS as qt, bo as Wt, fj as Qt, gT as rr, gU as rt, gS as Kt, gV as sr, t as Ke, gW as ir, u as or, gX as lr, gY as dr, gZ as cr, cV as ur, g_ as hr, o as mr, gf as pr, g$ as fr, h0 as gr, a as Ot, aW as br, a8 as xr, cz as vr, h1 as yr, h2 as Nr, cK as Cr, h3 as wr, h4 as Gt, h5 as Sr } from "./resolve-dashboard-input-context-Bw-DesV2.js";
13
- import { S as wa } from "./save-BgvAsp6X.js";
14
- import { V as kr, L as Dr, u as Sa, C as ka, F as Ar, a as Fr, A as Er, b as Ir } from "./card-filter-builder-CSKCSpNo.js";
11
+ import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
12
+ import { bY as qt, bu as Wt, fy as Qt, h8 as rr, h9 as rt, h7 as Ht, ha as sr, v as He, hb as ir, w as or, hc as lr, hd as dr, he as cr, d1 as ur, hf as hr, q as mr, gt as pr, hg as fr, hh as gr, a as Ot, aX as br, a5 as xr, cG as vr, hi as yr, hj as Nr, cS as Cr, hk as wr, hl as Kt, hm as Sr } from "./resolve-dashboard-input-context-BAv33KGg.js";
13
+ import { S as wa } from "./save-CWQ02kHo.js";
14
+ import { V as kr, L as Dr, u as Sa, C as ka, F as Ar, a as Fr, A as Er, b as Ir } from "./card-filter-builder-CSCdSQQy.js";
15
15
  import { createPortal as Tr } from "react-dom";
16
- import { b4 as Ht, aC as Lr } from "./pivot-result-contract-expectations-Cnq55Uno.js";
17
- import { aD as Vr, ar as Br, F as Pr, ac as st, T as _r } from "./bookmark-state-BfeKmj5s.js";
16
+ import { b4 as Gt, aC as Lr } from "./pivot-result-contract-expectations-Dk7WFR_u.js";
17
+ import { aD as Vr, ar as Pr, F as Br, ac as st, T as _r } from "./bookmark-state-h1OLXVjE.js";
18
18
  import "zod";
19
19
  import "./schema-C9NPiIru.js";
20
20
  import "./index-CV_Kzou0.js";
21
- import "./context-CVXTFljo.js";
22
- import { v as Or, R as zr } from "./filter-reach-copy-Dxn-mTuG.js";
23
- import { a as Yt, d as Xt, c as Rr, i as Mr, b as Ur, e as $r, v as Zt, f as Jt, g as jr } from "./variable-draft-CauoSBN0.js";
24
- import { g as pe, d as qr, a as Wr } from "./index-BHSDE54O.js";
21
+ import "./context-BJoEFgNl.js";
22
+ import { v as Or, M as zr } from "./filter-reach-copy-ClzNcNhP.js";
23
+ import { a as Yt, d as Xt, c as Rr, i as Mr, b as Ur, e as $r, v as Jt, f as Zt, g as jr } from "./variable-draft-DcKj8T1b.js";
24
+ import { g as pe, d as qr, a as Wr } from "./index-CRo5--Y6.js";
25
25
  /**
26
26
  * @license lucide-react v0.453.0 - ISC
27
27
  *
@@ -48,7 +48,7 @@ const ea = Ae("Bell", [
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const Kr = Ae("CodeXml", [
51
+ const Hr = Ae("CodeXml", [
52
52
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
53
53
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
54
54
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
@@ -71,7 +71,7 @@ const ta = Ae("MonitorSmartphone", [
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
73
  */
74
- const Gr = Ae("MousePointer2", [
74
+ const Kr = Ae("MousePointer2", [
75
75
  [
76
76
  "path",
77
77
  {
@@ -86,7 +86,7 @@ const Gr = Ae("MousePointer2", [
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
88
  */
89
- const Hr = Ae("Newspaper", [
89
+ const Gr = Ae("Newspaper", [
90
90
  [
91
91
  "path",
92
92
  {
@@ -124,7 +124,7 @@ function Xr() {
124
124
  a
125
125
  )) });
126
126
  }
127
- function Zr({
127
+ function Jr({
128
128
  open: e,
129
129
  onOpenChange: a,
130
130
  onSubmit: r,
@@ -150,7 +150,7 @@ function Zr({
150
150
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
151
151
  /* @__PURE__ */ t(Ue, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
152
152
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
153
- /* @__PURE__ */ t(Be, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
153
+ /* @__PURE__ */ t(Pe, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
154
154
  /* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Visual" })
155
155
  ] })
156
156
  ] }),
@@ -229,8 +229,8 @@ function Zr({
229
229
  }
230
230
  ) });
231
231
  }
232
- function Jr(e) {
233
- const [a, r] = E(null), [n, i] = E(null), o = Ba();
232
+ function Zr(e) {
233
+ const [a, r] = E(null), [n, i] = E(null), o = Pa();
234
234
  return Ee(() => {
235
235
  if (!e || e.trim() === "") {
236
236
  r(null), i(null);
@@ -354,7 +354,7 @@ function as() {
354
354
  var i;
355
355
  return ((i = n.card.customCardPreferences) == null ? void 0 : i.url) || "";
356
356
  }
357
- ), a = Jr(e);
357
+ ), a = Zr(e);
358
358
  return { getUpdatedFrame: ie(() => {
359
359
  var C;
360
360
  Ra();
@@ -391,8 +391,8 @@ function as() {
391
391
  };
392
392
  }, [a]) };
393
393
  }
394
- function Pe() {
395
- const { authToken: e, tokenProps: a } = $e(), r = ot(), n = Pa(), i = lt(), { selectVisual: o } = Ct(), {
394
+ function Be() {
395
+ const { authToken: e, tokenProps: a } = $e(), r = ot(), n = Ba(), i = lt(), { selectVisual: o } = Ct(), {
396
396
  setFrame: l,
397
397
  loadCard: h,
398
398
  setIsDevMode: d,
@@ -406,21 +406,21 @@ function Pe() {
406
406
  setSelectedTableName: C,
407
407
  setSelectedDatamodelId: k,
408
408
  setInlineFilterValuesMap: V,
409
- setApplyFilters: B,
409
+ setApplyFilters: P,
410
410
  clearEditorContext: D
411
411
  } = dt(), {
412
412
  setIsDashboardEditing: O,
413
413
  setIsVisualEditing: b,
414
414
  clearSelectedFrameId: S
415
- } = ve(), v = N((_) => _.selectedSheetId), T = N((_) => _.selectedFrameId), F = N((_) => _.dashboard), G = N(
415
+ } = ve(), v = N((_) => _.selectedSheetId), T = N((_) => _.selectedFrameId), F = N((_) => _.dashboard), K = N(
416
416
  (_) => _.inlineFilterValuesMap
417
- ), P = _a((i == null ? void 0 : i.id) || "", {
417
+ ), B = _a((i == null ? void 0 : i.id) || "", {
418
418
  enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
419
419
  }), Q = ie(
420
420
  async (_) => {
421
421
  try {
422
422
  o(_), S(), D();
423
- const { data: te, fromCache: J } = await aa(
423
+ const { data: te, fromCache: Z } = await aa(
424
424
  a.apiServiceUrl,
425
425
  (e == null ? void 0 : e.accessToken) || "",
426
426
  _.id,
@@ -441,16 +441,16 @@ function Pe() {
441
441
  setSelectedTableName: C,
442
442
  setSelectedDatamodelId: k,
443
443
  setInlineFilterValuesMap: V,
444
- setApplyFilters: B,
444
+ setApplyFilters: P,
445
445
  setIsDashboardEditing: O,
446
446
  setIsVisualEditing: b,
447
447
  dashboard: F,
448
448
  selectedSheetId: v,
449
449
  selectedFrameId: T,
450
- inlineFilterValuesMap: G
450
+ inlineFilterValuesMap: K
451
451
  }))
452
452
  throw new Error("Failed to setup editor with visual data");
453
- return { success: !0, fromCache: J };
453
+ return { success: !0, fromCache: Z };
454
454
  } catch (te) {
455
455
  return console.error("Error editing visual:", te), { success: !1, error: "Failed to load visual for editing" };
456
456
  }
@@ -475,28 +475,28 @@ function Pe() {
475
475
  C,
476
476
  k,
477
477
  V,
478
- B,
478
+ P,
479
479
  D,
480
480
  S,
481
481
  F,
482
482
  v,
483
483
  T,
484
- G
484
+ K
485
485
  ]
486
486
  ), X = ie(
487
487
  async (_) => {
488
- var J;
489
- const te = (H) => (z.error(H), { success: !1, error: H });
488
+ var Z;
489
+ const te = (G) => (z.error(G), { success: !1, error: G });
490
490
  try {
491
491
  if (o(_), !v)
492
492
  return te("No sheet selected. Please select a sheet first.");
493
- const { data: H, fromCache: I } = await aa(
493
+ const { data: G, fromCache: I } = await aa(
494
494
  a.apiServiceUrl,
495
495
  (e == null ? void 0 : e.accessToken) || "",
496
496
  _.id,
497
497
  r,
498
498
  "Adding visual to dashboard..."
499
- ), ae = (H == null ? void 0 : H.frameObject) ?? ((J = H == null ? void 0 : H.visual) == null ? void 0 : J.frameObject);
499
+ ), ae = (G == null ? void 0 : G.frameObject) ?? ((Z = G == null ? void 0 : G.visual) == null ? void 0 : Z.frameObject);
500
500
  if (!ae)
501
501
  return te("Visual has no frame data");
502
502
  const j = Da(ae);
@@ -508,9 +508,9 @@ function Pe() {
508
508
  // Link this frame to the library visual
509
509
  };
510
510
  return await n(v, R), O(!0), { success: !0, fromCache: I };
511
- } catch (H) {
512
- return console.error("Error adding visual:", H), te(
513
- H instanceof Error ? H.message : "Failed to add visual to dashboard"
511
+ } catch (G) {
512
+ return console.error("Error adding visual:", G), te(
513
+ G instanceof Error ? G.message : "Failed to add visual to dashboard"
514
514
  );
515
515
  }
516
516
  },
@@ -525,14 +525,14 @@ function Pe() {
525
525
  ]
526
526
  );
527
527
  return {
528
- visual: P.data,
529
- isLoading: P.isLoading,
530
- isError: P.isError,
531
- error: P.error,
528
+ visual: B.data,
529
+ isLoading: B.isLoading,
530
+ isError: B.isError,
531
+ error: B.error,
532
532
  handleEditLibraryVisual: Q,
533
533
  handleAddLibraryVisual: X,
534
534
  getUpdatedFrame: as().getUpdatedFrame,
535
- refetch: P.refetch
535
+ refetch: B.refetch
536
536
  };
537
537
  }
538
538
  function Aa(e) {
@@ -556,7 +556,7 @@ function ns(e, a) {
556
556
  }
557
557
  function rs(e) {
558
558
  const a = (e || "").toLowerCase();
559
- return a.includes("table") ? Bt : a.includes("pie") || a.includes("donut") ? Qa : a.includes("line") ? Ka : a.includes("bar") ? tr : Ue;
559
+ return a.includes("table") ? Pt : a.includes("pie") || a.includes("donut") ? Qa : a.includes("line") ? Ha : a.includes("bar") ? tr : Ue;
560
560
  }
561
561
  function ss({ visual: e }) {
562
562
  const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
@@ -570,27 +570,27 @@ function qi({
570
570
  null
571
571
  ), [p, m] = E(
572
572
  null
573
- ), [f, g] = E(!1), [y, C] = E(null), [k, V] = E(null), B = () => {
573
+ ), [f, g] = E(!1), [y, C] = E(null), [k, V] = E(null), P = () => {
574
574
  l(/* @__PURE__ */ new Set()), u(null), m(null), g(!1), C(null);
575
575
  }, D = () => {
576
- a(!1), B();
577
- }, { selectVisual: O } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Pe(), { isConsoleMode: v } = Ma(), {
576
+ a(!1), P();
577
+ }, { selectVisual: O } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Be(), { isConsoleMode: v } = Ma(), {
578
578
  resources: T,
579
579
  isLoading: F,
580
- isError: G,
581
- createResource: P,
580
+ isError: K,
581
+ createResource: B,
582
582
  updateResource: Q,
583
583
  deleteResourceAsync: X,
584
584
  duplicateResource: _,
585
585
  isCreating: te,
586
- isDeleting: J
586
+ isDeleting: Z
587
587
  } = Ua(
588
588
  void 0,
589
589
  (w) => {
590
590
  d(!1), w && (O(w), S(w), D());
591
591
  }
592
592
  ), {
593
- startUpdating: H,
593
+ startUpdating: G,
594
594
  stopUpdating: I,
595
595
  isUpdating: ae
596
596
  } = $a(), j = T, R = Y(() => {
@@ -621,7 +621,7 @@ function qi({
621
621
  M((q) => {
622
622
  q.has(w) ? q.delete(w) : q.add(w);
623
623
  });
624
- }, K = () => {
624
+ }, H = () => {
625
625
  l((w) => {
626
626
  const q = new Set(w);
627
627
  return ye ? R.forEach(
@@ -648,7 +648,7 @@ function qi({
648
648
  V(w), _(w, {
649
649
  onSettled: () => V(null)
650
650
  });
651
- }, Ge = () => {
651
+ }, Ke = () => {
652
652
  if (ue.length === 0) {
653
653
  z.error("Select a visual you can delete");
654
654
  return;
@@ -689,7 +689,7 @@ function qi({
689
689
  return;
690
690
  }
691
691
  const me = Object.keys(ee), Ne = me.length === 1 ? me[0] : void 0;
692
- H(p.id, Ne), Q(
692
+ G(p.id, Ne), Q(
693
693
  {
694
694
  resourceId: p.id,
695
695
  data: ee
@@ -704,7 +704,7 @@ function qi({
704
704
  }
705
705
  );
706
706
  }, ce = (w) => {
707
- a(w), w || B();
707
+ a(w), w || P();
708
708
  }, Re = y ? 1 : ue.length;
709
709
  return /* @__PURE__ */ s(U, { children: [
710
710
  /* @__PURE__ */ t(Le, { open: e, onOpenChange: ce, children: /* @__PURE__ */ s(
@@ -716,9 +716,9 @@ function qi({
716
716
  children: [
717
717
  /* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-3", children: [
718
718
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
719
- /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
719
+ /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
720
720
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
721
- /* @__PURE__ */ t(Be, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
721
+ /* @__PURE__ */ t(Pe, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
722
722
  /* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Add to dashboard" })
723
723
  ] })
724
724
  ] }),
@@ -763,7 +763,7 @@ function qi({
763
763
  }
764
764
  )
765
765
  ] }),
766
- /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: F ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : G ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : R.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
766
+ /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: F ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : K ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : R.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
767
767
  /* @__PURE__ */ t(Ue, { className: "h-5 w-5 text-muted-foreground/60" }),
768
768
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
769
769
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
@@ -774,7 +774,7 @@ function qi({
774
774
  selectedIds: o,
775
775
  allFilteredSelected: ye,
776
776
  someFilteredSelected: x,
777
- onSelectAll: K,
777
+ onSelectAll: H,
778
778
  onToggleSelection: $,
779
779
  onAddVisual: le,
780
780
  onOpenVisual: ht,
@@ -785,7 +785,7 @@ function qi({
785
785
  },
786
786
  onDuplicateVisual: Fe,
787
787
  duplicatingId: k,
788
- isDeleting: J,
788
+ isDeleting: Z,
789
789
  isConsoleMode: v
790
790
  }
791
791
  ) }),
@@ -824,7 +824,7 @@ function qi({
824
824
  size: "xs",
825
825
  variant: "outline",
826
826
  className: "text-destructive hover:text-destructive",
827
- onClick: Ge,
827
+ onClick: Ke,
828
828
  disabled: ue.length === 0,
829
829
  children: [
830
830
  /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
@@ -851,7 +851,7 @@ function qi({
851
851
  onClick: _e,
852
852
  disabled: o.size === 0,
853
853
  children: [
854
- /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
854
+ /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
855
855
  o.size === 0 ? "Add to dashboard" : `Add ${o.size} visual${o.size === 1 ? "" : "s"}`
856
856
  ]
857
857
  }
@@ -862,11 +862,11 @@ function qi({
862
862
  }
863
863
  ) }),
864
864
  /* @__PURE__ */ t(
865
- Zr,
865
+ Jr,
866
866
  {
867
867
  open: h,
868
868
  onOpenChange: d,
869
- onSubmit: P,
869
+ onSubmit: B,
870
870
  isCreating: te
871
871
  }
872
872
  ),
@@ -895,7 +895,7 @@ function qi({
895
895
  {
896
896
  open: f,
897
897
  onOpenChange: (w) => {
898
- !w && J || (g(w), w || C(null));
898
+ !w && Z || (g(w), w || C(null));
899
899
  },
900
900
  children: /* @__PURE__ */ s(St, { children: [
901
901
  /* @__PURE__ */ s(kt, { children: [
@@ -909,17 +909,17 @@ function qi({
909
909
  /* @__PURE__ */ t(At, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
910
910
  ] }),
911
911
  /* @__PURE__ */ s(Ft, { children: [
912
- /* @__PURE__ */ t(Et, { disabled: J, children: "Cancel" }),
912
+ /* @__PURE__ */ t(Et, { disabled: Z, children: "Cancel" }),
913
913
  /* @__PURE__ */ s(
914
914
  ua,
915
915
  {
916
916
  onClick: (w) => {
917
917
  w.preventDefault(), mt();
918
918
  },
919
- disabled: J || Re === 0,
919
+ disabled: Z || Re === 0,
920
920
  children: [
921
- J ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
922
- J ? "Deleting..." : "Delete"
921
+ Z ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
922
+ Z ? "Deleting..." : "Delete"
923
923
  ]
924
924
  }
925
925
  )
@@ -1004,7 +1004,7 @@ function os({
1004
1004
  return /* @__PURE__ */ s(
1005
1005
  "div",
1006
1006
  {
1007
- className: Z(
1007
+ className: J(
1008
1008
  "group grid min-h-12 grid-cols-[2.5rem_minmax(14rem,1.8fr)_minmax(10rem,1fr)_8rem_7rem_5rem_5.5rem] items-center border-b border-border/50 px-3 text-[13px] hover:bg-muted/50",
1009
1009
  a && "bg-muted/70"
1010
1010
  ),
@@ -1127,7 +1127,7 @@ function ls({
1127
1127
  onClick: () => o(e.id),
1128
1128
  disabled: l === e.id,
1129
1129
  children: [
1130
- l === e.id ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ga, { className: "h-3.5 w-3.5" }),
1130
+ l === e.id ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ka, { className: "h-3.5 w-3.5" }),
1131
1131
  l === e.id ? "Duplicating..." : "Duplicate"
1132
1132
  ]
1133
1133
  }
@@ -1158,7 +1158,7 @@ function ls({
1158
1158
  /* @__PURE__ */ t(at, {}),
1159
1159
  /* @__PURE__ */ s("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
1160
1160
  Fa(e, d) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
1161
- /* @__PURE__ */ t(Ha, { className: "h-3 w-3" }),
1161
+ /* @__PURE__ */ t(Ga, { className: "h-3 w-3" }),
1162
1162
  /* @__PURE__ */ t("span", { className: "truncate", children: zt(e, d) })
1163
1163
  ] }),
1164
1164
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
@@ -1181,14 +1181,14 @@ function Wi(e, a, r = !1) {
1181
1181
  (u) => u.onDashboardLifecycleEvent
1182
1182
  ), h = ie(() => {
1183
1183
  const { dashboard: u, isVisualEditing: p } = N.getState();
1184
- return a || !e || !u || u.id !== e.id ? !1 : p ? !0 : Ze(u) !== Ze(e);
1184
+ return a || !e || !u || u.id !== e.id ? !1 : p ? !0 : Je(u) !== Je(e);
1185
1185
  }, [e, a]);
1186
1186
  Ut(() => (N.setState({ checkUnsavedDashboardChanges: h }), () => {
1187
1187
  N.getState().checkUnsavedDashboardChanges === h && N.setState({ checkUnsavedDashboardChanges: null });
1188
1188
  }), [h]);
1189
1189
  const d = Y(() => !r || a || !n || i && (!e || n.id !== e.id) ? null : {
1190
1190
  dashboardId: n.id,
1191
- dirty: i && e ? o || Ze(n) !== Ze(e) : !1
1191
+ dirty: i && e ? o || Je(n) !== Je(e) : !1
1192
1192
  }, [
1193
1193
  i,
1194
1194
  o,
@@ -1225,7 +1225,7 @@ function gt({
1225
1225
  className: e,
1226
1226
  variant: a = "outline"
1227
1227
  }) {
1228
- const r = oe((o) => o.onSave), { getUpdatedFrame: n } = Pe();
1228
+ const r = oe((o) => o.onSave), { getUpdatedFrame: n } = Be();
1229
1229
  function i() {
1230
1230
  const o = n();
1231
1231
  Rt(o) && (r == null || r(o));
@@ -1238,7 +1238,7 @@ function gt({
1238
1238
  size: "xs",
1239
1239
  variant: a,
1240
1240
  children: [
1241
- /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
1241
+ /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
1242
1242
  "Done"
1243
1243
  ]
1244
1244
  }
@@ -1248,7 +1248,7 @@ function ds({
1248
1248
  className: e,
1249
1249
  variant: a = "default"
1250
1250
  }) {
1251
- const r = ot(), [n, i] = E(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } = Pe(), h = lt(), d = oe((p) => p.frame), c = ma();
1251
+ const r = ot(), [n, i] = E(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } = Be(), h = lt(), d = oe((p) => p.frame), c = ma();
1252
1252
  return /* @__PURE__ */ t(
1253
1253
  L,
1254
1254
  {
@@ -1297,7 +1297,7 @@ function ds({
1297
1297
  function cs({
1298
1298
  className: e
1299
1299
  }) {
1300
- const a = ot(), [r, n] = E(!1), i = lt(), o = oe((g) => g.frame), l = N((g) => g.selectedSheetId), h = N((g) => g.dashboard), { updateFrame: d, setIsVisualEditing: c } = ve(), { getUpdatedFrame: u } = Pe(), p = ma(), m = ct();
1300
+ const a = ot(), [r, n] = E(!1), i = lt(), o = oe((g) => g.frame), l = N((g) => g.selectedSheetId), h = N((g) => g.dashboard), { updateFrame: d, setIsVisualEditing: c } = ve(), { getUpdatedFrame: u } = Be(), p = ma(), m = ct();
1301
1301
  return /* @__PURE__ */ t(
1302
1302
  L,
1303
1303
  {
@@ -1425,7 +1425,7 @@ function us({
1425
1425
  };
1426
1426
  return /* @__PURE__ */ t(Le, { open: e, onOpenChange: a, children: /* @__PURE__ */ s(Ve, { className: "sm:max-w-[500px]", children: [
1427
1427
  /* @__PURE__ */ s(Tt, { children: [
1428
- /* @__PURE__ */ s(Be, { className: "flex items-center gap-2", children: [
1428
+ /* @__PURE__ */ s(Pe, { className: "flex items-center gap-2", children: [
1429
1429
  /* @__PURE__ */ t("span", { children: "Save Visual As" }),
1430
1430
  m.badgeType !== "local" && /* @__PURE__ */ t(
1431
1431
  kr,
@@ -1485,15 +1485,15 @@ function us({
1485
1485
  ] }) });
1486
1486
  }
1487
1487
  function hs() {
1488
- const [e, a] = E(!1), [r, n] = E(!1), [i, o] = E(null), [l, h] = E(null), d = oe((b) => b.frame), c = oe((b) => b.card), u = lt(), p = N((b) => b.selectedSheetId), m = N((b) => b.dashboard), { getUpdatedFrame: f } = Pe(), { selectVisual: g } = Ct(), { addFrame: y, setIsVisualEditing: C } = ve(), k = ct(), V = !!(d != null && d.visualId), B = (() => {
1488
+ const [e, a] = E(!1), [r, n] = E(!1), [i, o] = E(null), [l, h] = E(null), d = oe((b) => b.frame), c = oe((b) => b.card), u = lt(), p = N((b) => b.selectedSheetId), m = N((b) => b.dashboard), { getUpdatedFrame: f } = Be(), { selectVisual: g } = Ct(), { addFrame: y, setIsVisualEditing: C } = ve(), k = ct(), V = !!(d != null && d.visualId), P = (() => {
1489
1489
  var b, S;
1490
1490
  return ((b = d == null ? void 0 : d.cards) == null ? void 0 : b.length) === 1 && ((S = d.cards[0]) != null && S.title) ? d.cards[0].title : u != null && u.title ? u.title : (c == null ? void 0 : c.title) || "Untitled Visual";
1491
- })(), D = Za((b) => {
1491
+ })(), D = Ja((b) => {
1492
1492
  b != null && b.id && (g(b), r && i && l && p && (async () => {
1493
1493
  try {
1494
1494
  const S = {
1495
1495
  ...i,
1496
- id: Kt(),
1496
+ id: Ht(),
1497
1497
  visualId: b.id
1498
1498
  // Link to the newly created library visual
1499
1499
  };
@@ -1533,60 +1533,60 @@ function hs() {
1533
1533
  F = await k(T, {
1534
1534
  previousFrame: rt(m, T.id)
1535
1535
  });
1536
- } catch (P) {
1536
+ } catch (B) {
1537
1537
  console.error(
1538
1538
  "Failed to prepare semantic metadata before saving visual:",
1539
- P
1539
+ B
1540
1540
  ), z.error(
1541
- P instanceof Error ? P.message : "Failed to prepare semantic metadata for the saved visual"
1541
+ B instanceof Error ? B.message : "Failed to prepare semantic metadata for the saved visual"
1542
1542
  );
1543
1543
  return;
1544
1544
  }
1545
1545
  n(b.saveToCurrentDashboard), o(T), h(F);
1546
- const G = {
1546
+ const K = {
1547
1547
  title: b.name,
1548
1548
  description: b.description,
1549
1549
  frameObject: T,
1550
1550
  // Card title synced for single-card frames
1551
1551
  isPrivate: !1
1552
1552
  };
1553
- D.mutate(G);
1553
+ D.mutate(K);
1554
1554
  } else if (b.saveToCurrentDashboard) {
1555
1555
  const F = {
1556
1556
  ...T,
1557
1557
  // Card title already synced
1558
- id: Kt(),
1558
+ id: Ht(),
1559
1559
  visualId: void 0
1560
1560
  // Explicitly no visualId for local visuals
1561
1561
  };
1562
1562
  try {
1563
- const G = await k(T, {
1563
+ const K = await k(T, {
1564
1564
  previousFrame: rt(m, T.id)
1565
1565
  });
1566
1566
  y(p, F, {
1567
- semanticExecutionPayload: G
1567
+ semanticExecutionPayload: K
1568
1568
  }), z.success("Visual saved to dashboard"), a(!1), C(!1);
1569
- } catch (G) {
1570
- console.error("Failed to save visual to dashboard:", G), z.error(
1571
- G instanceof Error ? G.message : "Failed to prepare semantic metadata for the visual"
1569
+ } catch (K) {
1570
+ console.error("Failed to save visual to dashboard:", K), z.error(
1571
+ K instanceof Error ? K.message : "Failed to prepare semantic metadata for the visual"
1572
1572
  );
1573
1573
  }
1574
1574
  }
1575
1575
  },
1576
1576
  isLibraryVisual: V,
1577
- currentVisualName: B,
1577
+ currentVisualName: P,
1578
1578
  isSaving: D.isPending
1579
1579
  };
1580
1580
  }
1581
1581
  function Qi(e = {}) {
1582
- const { isInspectionMode: a } = Ja(), r = oe((P) => P.frame), n = oe((P) => P.editorContext), i = en((P) => P.selectedVisual), o = N((P) => P.selectedFrameId), l = N((P) => P.selectedSheetId), h = N((P) => P.dashboard), { setIsVisualEditing: d, updateFrame: c } = ve(), [u, p] = E(!1), [m, f] = E("both"), g = ct(), y = (n == null ? void 0 : n.type) === "documentSection", C = !!(r != null && r.visualId || i != null && i.id), k = !!(r != null && r.visualId && o), V = C && !k, {
1583
- saveAsDialogOpen: B,
1582
+ const { isInspectionMode: a } = Za(), r = oe((B) => B.frame), n = oe((B) => B.editorContext), i = en((B) => B.selectedVisual), o = N((B) => B.selectedFrameId), l = N((B) => B.selectedSheetId), h = N((B) => B.dashboard), { setIsVisualEditing: d, updateFrame: c } = ve(), [u, p] = E(!1), [m, f] = E("both"), g = ct(), y = (n == null ? void 0 : n.type) === "documentSection", C = !!(r != null && r.visualId || i != null && i.id), k = !!(r != null && r.visualId && o), V = C && !k, {
1583
+ saveAsDialogOpen: P,
1584
1584
  setSaveAsDialogOpen: D,
1585
1585
  handleSaveAs: O,
1586
1586
  isLibraryVisual: b,
1587
1587
  currentVisualName: S,
1588
1588
  isSaving: v
1589
- } = hs(), { getUpdatedFrame: T } = Pe();
1589
+ } = hs(), { getUpdatedFrame: T } = Be();
1590
1590
  if (a)
1591
1591
  return /* @__PURE__ */ s(U, { children: [
1592
1592
  /* @__PURE__ */ t(
@@ -1630,8 +1630,8 @@ function Qi(e = {}) {
1630
1630
  setTimeout(() => {
1631
1631
  p(!1), z.success("Changes applied. Visual is now local to this dashboard"), d(!1);
1632
1632
  }, 300);
1633
- }, G = (P) => {
1634
- f(P), D(!0);
1633
+ }, K = (B) => {
1634
+ f(B), D(!0);
1635
1635
  };
1636
1636
  return /* @__PURE__ */ s(U, { children: [
1637
1637
  /* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
@@ -1663,7 +1663,7 @@ function Qi(e = {}) {
1663
1663
  onClick: F,
1664
1664
  disabled: u,
1665
1665
  children: [
1666
- /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
1666
+ /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
1667
1667
  u ? "Applying..." : "Apply Locally"
1668
1668
  ]
1669
1669
  }
@@ -1673,7 +1673,7 @@ function Qi(e = {}) {
1673
1673
  /* @__PURE__ */ s(
1674
1674
  re,
1675
1675
  {
1676
- onClick: () => G("local"),
1676
+ onClick: () => K("local"),
1677
1677
  disabled: v,
1678
1678
  children: [
1679
1679
  /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5" }),
@@ -1684,7 +1684,7 @@ function Qi(e = {}) {
1684
1684
  /* @__PURE__ */ s(
1685
1685
  re,
1686
1686
  {
1687
- onClick: () => G("library"),
1687
+ onClick: () => K("library"),
1688
1688
  disabled: v,
1689
1689
  children: [
1690
1690
  /* @__PURE__ */ t(Dr, { className: "h-3.5 w-3.5" }),
@@ -1695,7 +1695,7 @@ function Qi(e = {}) {
1695
1695
  /* @__PURE__ */ s(
1696
1696
  re,
1697
1697
  {
1698
- onClick: () => G("both"),
1698
+ onClick: () => K("both"),
1699
1699
  disabled: v,
1700
1700
  children: [
1701
1701
  /* @__PURE__ */ t(tn, { className: "h-3.5 w-3.5" }),
@@ -1712,9 +1712,9 @@ function Qi(e = {}) {
1712
1712
  /* @__PURE__ */ t(
1713
1713
  us,
1714
1714
  {
1715
- open: B,
1716
- onOpenChange: (P) => {
1717
- v || D(P);
1715
+ open: P,
1716
+ onOpenChange: (B) => {
1717
+ v || D(B);
1718
1718
  },
1719
1719
  isLibraryVisual: b,
1720
1720
  currentVisualName: S,
@@ -1725,11 +1725,11 @@ function Qi(e = {}) {
1725
1725
  )
1726
1726
  ] });
1727
1727
  }
1728
- function Ki({ className: e }) {
1728
+ function Hi({ className: e }) {
1729
1729
  const a = oe((u) => u.isDevMode), r = oe((u) => u.card.type), n = N((u) => u.isVisualEditing), { setIsDevMode: i } = dt(), { config: o } = Va(an).tokenProps, l = (o == null ? void 0 : o.showAdvancedMode) !== !1;
1730
1730
  if (!n || !l || !sr(r))
1731
1731
  return null;
1732
- const h = a ? Gr : Kr, d = a ? "Visual editor" : "SQL editor", c = a ? "Switch to visual editor" : "Switch to SQL editor";
1732
+ const h = a ? Kr : Hr, d = a ? "Visual editor" : "SQL editor", c = a ? "Switch to visual editor" : "Switch to SQL editor";
1733
1733
  return /* @__PURE__ */ s(
1734
1734
  "button",
1735
1735
  {
@@ -1737,7 +1737,7 @@ function Ki({ className: e }) {
1737
1737
  "aria-label": c,
1738
1738
  title: c,
1739
1739
  onClick: () => i(!a),
1740
- className: Z(
1740
+ className: J(
1741
1741
  "inline-flex h-7 items-center gap-1.5 rounded-control border border-input bg-background px-2 text-[12px] font-medium text-foreground transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:outline-none",
1742
1742
  e
1743
1743
  ),
@@ -1748,13 +1748,13 @@ function Ki({ className: e }) {
1748
1748
  }
1749
1749
  );
1750
1750
  }
1751
- function Gi() {
1751
+ function Ki() {
1752
1752
  const e = nn() === "sm", a = N((d) => d.isDashboardEditing), r = N((d) => d.isVisualEditing), n = N((d) => {
1753
1753
  var u;
1754
1754
  const c = ((u = d.dashboard) == null ? void 0 : u.sheets) ?? [];
1755
1755
  return c.find((p) => p.id === d.selectedSheetId) ?? c[0];
1756
1756
  }), i = N((d) => d.actions.arrangeSheet), o = N((d) => d.actions.undoArrange);
1757
- if (!a || r || !n || Ke(n)) return null;
1757
+ if (!a || r || !n || He(n)) return null;
1758
1758
  const l = !(n.frames ?? []).length, h = (d) => {
1759
1759
  const c = i(n.id, { keepOrder: d });
1760
1760
  if (!c.ok) {
@@ -1810,11 +1810,11 @@ function Gi() {
1810
1810
  ] })
1811
1811
  ] });
1812
1812
  }
1813
- function Hi() {
1813
+ function Gi() {
1814
1814
  const e = N((i) => i.screenSizesOpen), a = N((i) => {
1815
1815
  var h, d;
1816
1816
  const o = ((h = i.dashboard) == null ? void 0 : h.sheets) ?? [], l = o.find((c) => c.id === i.selectedSheetId) ?? o[0];
1817
- return !!l && !Ke(l) && !!((d = l.frames) != null && d.length);
1817
+ return !!l && !He(l) && !!((d = l.frames) != null && d.length);
1818
1818
  }), r = N((i) => i.actions.setScreenSizesOpen), n = fa(
1819
1819
  "screen-sizes",
1820
1820
  "lg",
@@ -1877,7 +1877,7 @@ function Xi(e) {
1877
1877
  }
1878
1878
  };
1879
1879
  }
1880
- function Zi({
1880
+ function Ji({
1881
1881
  open: e,
1882
1882
  onOpenChange: a,
1883
1883
  onSave: r,
@@ -1921,7 +1921,7 @@ function Zi({
1921
1921
  ] })
1922
1922
  ] }) });
1923
1923
  }
1924
- async function Ji(e) {
1924
+ async function Zi(e) {
1925
1925
  var o, l;
1926
1926
  const a = (l = (o = N.getState()) == null ? void 0 : o.authToken) == null ? void 0 : l.accessToken;
1927
1927
  if (!a)
@@ -2013,7 +2013,7 @@ function Ea({
2013
2013
  working: i,
2014
2014
  problem: o
2015
2015
  }) {
2016
- const l = e.status === "ready" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", h = e.status === "ready" ? Ce.ready : e.status === "failed" ? Ce.failed : e.status === "cancelled" ? Ce.cancelled : Ce.inProgress, d = Date.parse(e.startedAt), c = Ht(Date.parse(e.finishedAt ?? e.startedAt), a, { addSuffix: !0 }), u = e.status === "running" && r && a - d >= mn, p = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
2016
+ const l = e.status === "ready" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", h = e.status === "ready" ? Ce.ready : e.status === "failed" ? Ce.failed : e.status === "cancelled" ? Ce.cancelled : Ce.inProgress, d = Date.parse(e.startedAt), c = Gt(Date.parse(e.finishedAt ?? e.startedAt), a, { addSuffix: !0 }), u = e.status === "running" && r && a - d >= mn, p = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
2017
2017
  return /* @__PURE__ */ s("div", { className: "group flex items-start gap-2.5 px-3 py-2 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
2018
2018
  /* @__PURE__ */ t("span", { className: "flex h-5 shrink-0 items-center", "aria-hidden": "true", children: /* @__PURE__ */ t("span", { className: `h-1.5 w-1.5 rounded-full ${l}` }) }),
2019
2019
  /* @__PURE__ */ t("span", { className: "sr-only", children: h }),
@@ -2042,7 +2042,7 @@ function Ea({
2042
2042
  " ",
2043
2043
  p,
2044
2044
  " ",
2045
- /* @__PURE__ */ t("span", { children: Ce.started(Ht(d, a)) }),
2045
+ /* @__PURE__ */ t("span", { children: Ce.started(Gt(d, a)) }),
2046
2046
  e.running.percent !== void 0 && /* @__PURE__ */ t(pn, { value: e.running.percent, className: "mt-1.5 h-1" }),
2047
2047
  u && /* @__PURE__ */ t("div", { className: "mt-1", children: Ce.longRunning })
2048
2048
  ] }),
@@ -2238,7 +2238,7 @@ function gs({
2238
2238
  ), k = ir({
2239
2239
  ...m || {},
2240
2240
  controls: []
2241
- }), V = Cn(m), B = (v, T, F) => {
2241
+ }), V = Cn(m), P = (v, T, F) => {
2242
2242
  f(
2243
2243
  v,
2244
2244
  T,
@@ -2265,7 +2265,7 @@ function gs({
2265
2265
  initialCreateFlow: i === "create",
2266
2266
  onCreateFlowActiveChange: p,
2267
2267
  onCreateFlowComplete: D,
2268
- onChange: B,
2268
+ onChange: P,
2269
2269
  emptyMessage: "No dashboard controls yet."
2270
2270
  }
2271
2271
  ), b = d ? "Add dashboard control" : "Dashboard Controls", S = /* @__PURE__ */ s(U, { children: [
@@ -2302,7 +2302,7 @@ function gs({
2302
2302
  {
2303
2303
  className: d ? "space-y-0" : void 0,
2304
2304
  children: [
2305
- /* @__PURE__ */ t(Be, { className: "text-[15px]", children: b }),
2305
+ /* @__PURE__ */ t(Pe, { className: "text-[15px]", children: b }),
2306
2306
  /* @__PURE__ */ t(
2307
2307
  ut,
2308
2308
  {
@@ -2360,7 +2360,7 @@ function xs({
2360
2360
  ), V = Y(
2361
2361
  () => ys(k),
2362
2362
  [k]
2363
- ), B = Y(
2363
+ ), P = Y(
2364
2364
  () => [
2365
2365
  ...vs(u),
2366
2366
  ...(u.variables ?? []).map((v) => v.name)
@@ -2401,7 +2401,7 @@ function xs({
2401
2401
  onPointerDownOutside: h,
2402
2402
  children: [
2403
2403
  /* @__PURE__ */ s(Tt, { className: l ? "space-y-0" : void 0, children: [
2404
- /* @__PURE__ */ t(Be, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
2404
+ /* @__PURE__ */ t(Pe, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
2405
2405
  /* @__PURE__ */ t(
2406
2406
  ut,
2407
2407
  {
@@ -2415,7 +2415,7 @@ function xs({
2415
2415
  {
2416
2416
  scope: "dashboard",
2417
2417
  controls: k,
2418
- reservedControlIds: B,
2418
+ reservedControlIds: P,
2419
2419
  defaultValues: V,
2420
2420
  usageByControlId: {},
2421
2421
  availableFieldChoices: [],
@@ -2517,7 +2517,7 @@ function ws({
2517
2517
  return /* @__PURE__ */ s(
2518
2518
  "div",
2519
2519
  {
2520
- className: Z(
2520
+ className: J(
2521
2521
  // Height lives on the shell so the outer border is part of the
2522
2522
  // h-7 box (matches regular `size="xs"` buttons). Inner triggers
2523
2523
  // stretch to fill via `h-full`.
@@ -2532,7 +2532,7 @@ function ws({
2532
2532
  {
2533
2533
  variant: "ghost",
2534
2534
  size: "xs",
2535
- className: Z(
2535
+ className: J(
2536
2536
  "h-full rounded-none border-0 bg-transparent pl-2.5 pr-2 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
2537
2537
  l
2538
2538
  ),
@@ -2547,7 +2547,7 @@ function ws({
2547
2547
  {
2548
2548
  align: "end",
2549
2549
  sideOffset: 6,
2550
- className: Z(
2550
+ className: J(
2551
2551
  "w-auto rounded-card border border-border/60 p-0 shadow-[0_10px_28px_rgba(0,0,0,0.14)] dark:shadow-[0_10px_28px_rgba(0,0,0,0.5)]",
2552
2552
  d
2553
2553
  ),
@@ -2562,7 +2562,7 @@ function ws({
2562
2562
  {
2563
2563
  variant: "ghost",
2564
2564
  size: "xs",
2565
- className: Z(
2565
+ className: J(
2566
2566
  "h-full w-7 rounded-none border-0 border-l border-border/60 bg-transparent px-0 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
2567
2567
  h
2568
2568
  ),
@@ -2575,7 +2575,7 @@ function ws({
2575
2575
  {
2576
2576
  align: "end",
2577
2577
  sideOffset: 6,
2578
- className: Z(
2578
+ className: J(
2579
2579
  "w-auto rounded-card border border-border/60 p-0 shadow-[0_10px_28px_rgba(0,0,0,0.14)] dark:shadow-[0_10px_28px_rgba(0,0,0,0.5)]",
2580
2580
  c
2581
2581
  ),
@@ -2747,7 +2747,7 @@ function to({
2747
2747
  var O;
2748
2748
  const [l, h] = E(null), d = N((b) => b.dashboard), c = N((b) => b.selectedSheetId), u = N((b) => b.showFilters), p = N((b) => b.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (O = d.sheets) == null ? void 0 : O.find(
2749
2749
  (b) => b.id === c
2750
- ), y = Ke(g), C = ie((b) => {
2750
+ ), y = He(g), C = ie((b) => {
2751
2751
  window.setTimeout(() => {
2752
2752
  h(b);
2753
2753
  }, 0);
@@ -2770,7 +2770,7 @@ function to({
2770
2770
  ]
2771
2771
  ), V = ie(() => {
2772
2772
  k(!0);
2773
- }, [k]), B = ie(() => {
2773
+ }, [k]), P = ie(() => {
2774
2774
  C("create");
2775
2775
  }, [C]), D = ie(() => {
2776
2776
  C("manage");
@@ -2786,7 +2786,7 @@ function to({
2786
2786
  Ds,
2787
2787
  {
2788
2788
  onAddFilter: V,
2789
- onAddControl: B,
2789
+ onAddControl: P,
2790
2790
  onManageControls: D,
2791
2791
  onDismiss: b
2792
2792
  }
@@ -2823,7 +2823,7 @@ function to({
2823
2823
  }
2824
2824
  function Fs(e, a) {
2825
2825
  return (e.variables ?? []).map((r) => {
2826
- const n = Br(e, r.id);
2826
+ const n = Pr(e, r.id);
2827
2827
  return {
2828
2828
  variable: r,
2829
2829
  question: Or(r),
@@ -2907,10 +2907,10 @@ function ia({
2907
2907
  className: "grid w-full grid-cols-[minmax(0,1fr)_132px] items-center gap-3 border-t border-border/60 px-4 py-2 text-left first:border-t-0 hover:bg-muted/50",
2908
2908
  children: [
2909
2909
  /* @__PURE__ */ s("span", { className: "min-w-0", children: [
2910
- /* @__PURE__ */ t("span", { className: Z("block truncate text-[12px] font-medium text-foreground", !e.variable.label && "font-mono"), children: e.variable.label || e.variable.name }),
2910
+ /* @__PURE__ */ t("span", { className: J("block truncate text-[12px] font-medium text-foreground", !e.variable.label && "font-mono"), children: e.variable.label || e.variable.name }),
2911
2911
  /* @__PURE__ */ t("span", { className: "mt-0.5 block truncate text-[11px] text-muted-foreground", children: e.question })
2912
2912
  ] }),
2913
- /* @__PURE__ */ t("span", { className: Z("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children: Es(e, a) })
2913
+ /* @__PURE__ */ t("span", { className: J("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children: Es(e, a) })
2914
2914
  ]
2915
2915
  }
2916
2916
  );
@@ -2956,8 +2956,8 @@ function Ts(e, a) {
2956
2956
  const r = mr(e);
2957
2957
  return new Set(
2958
2958
  (e.sheets ?? []).map((i) => {
2959
- const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
2960
- return r.filter((l) => Pr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
2959
+ const o = { sheetId: i.id, cardId: a, sheetKind: He(i) ? "document" : "dashboard" };
2960
+ return r.filter((l) => Br(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
2961
2961
  `);
2962
2962
  })
2963
2963
  ).size > 1;
@@ -2972,7 +2972,7 @@ function Vs(e) {
2972
2972
  const a = e == null ? void 0 : e.type;
2973
2973
  return a === "dataset" || a === "model" || fr.includes(a);
2974
2974
  }
2975
- function Bs(e, a) {
2975
+ function Ps(e, a) {
2976
2976
  return zr(
2977
2977
  e.map((r, n) => {
2978
2978
  var i, o;
@@ -2984,7 +2984,7 @@ function Bs(e, a) {
2984
2984
  })
2985
2985
  ).columns;
2986
2986
  }
2987
- function Ps(e) {
2987
+ function Bs(e) {
2988
2988
  const { tokenProps: a } = $e(), r = N((m) => m.authToken), { connections: n } = va(), i = e == null ? void 0 : e.connectionId, o = n.find((m) => m.id === i), l = Y(
2989
2989
  () => ((e == null ? void 0 : e.selectedEntities) ?? []).filter(Vs),
2990
2990
  [e == null ? void 0 : e.selectedEntities]
@@ -3001,7 +3001,7 @@ function Ps(e) {
3001
3001
  }, d = ie(
3002
3002
  (m) => {
3003
3003
  var g, y;
3004
- const f = Bs(
3004
+ const f = Ps(
3005
3005
  l,
3006
3006
  m.map((C) => C.data)
3007
3007
  );
@@ -3088,7 +3088,7 @@ function yt({
3088
3088
  type: "button",
3089
3089
  onClick: a,
3090
3090
  "aria-label": n,
3091
- className: Z(
3091
+ className: J(
3092
3092
  "flex h-7 w-full items-center gap-1.5 rounded-control border border-input bg-background px-2 text-left text-[12px] hover:bg-muted/50",
3093
3093
  e ? "text-muted-foreground" : "text-foreground"
3094
3094
  ),
@@ -3113,27 +3113,27 @@ function Us({
3113
3113
  handle: r,
3114
3114
  onCalculatedFieldOpenChange: n
3115
3115
  }) {
3116
- var _, te, J, H, I, ae, j, R, ne, ue, he, ye;
3116
+ var _, te, Z, G, I, ae, j, R, ne, ue, he, ye;
3117
3117
  const { tokenProps: i } = $e(), o = ((_ = i.config) == null ? void 0 : _.showAdvancedMode) !== !1, l = ((te = i.config) == null ? void 0 : te.showDirectSource) !== !1, { connections: h } = va(), [d, c] = E(!1), [u, p] = E(!1), [m, f] = E(!1), g = (x) => {
3118
3118
  p(x), n == null || n(x);
3119
- }, { fields: y, isLoading: C, error: k } = Ps(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], B = (x) => x && (V.find((M) => M.id === x.id) ?? V.find((M) => $s(M, x))), D = [
3119
+ }, { fields: y, isLoading: C, error: k } = Bs(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((M) => M.id === x.id) ?? V.find((M) => $s(M, x))), D = [
3120
3120
  ...V,
3121
3121
  ...[e.field, e.sortField].filter(
3122
- (x) => !!x && !B(x) && !V.some((M) => M.id === x.id)
3122
+ (x) => !!x && !P(x) && !V.some((M) => M.id === x.id)
3123
3123
  )
3124
- ], O = ((J = B(e.field)) == null ? void 0 : J.id) ?? ((H = e.field) == null ? void 0 : H.id) ?? "", b = ((I = B(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = Rs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Bt : jt, F = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", G = {
3124
+ ], O = ((Z = P(e.field)) == null ? void 0 : Z.id) ?? ((G = e.field) == null ? void 0 : G.id) ?? "", b = ((I = P(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = Rs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Pt : jt, F = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", K = {
3125
3125
  connectionId: ((R = e.dataSource) == null ? void 0 : R.connectionId) || e.connectionId,
3126
3126
  dataSource: e.dataSource,
3127
3127
  config: e.conditions ? { filters: e.conditions } : {},
3128
3128
  cardType: "text"
3129
- }, P = Yt(e.field), Q = (ne = P.find((x) => x.value === e.get)) == null ? void 0 : ne.hint, X = (x) => {
3129
+ }, B = Yt(e.field), Q = (ne = B.find((x) => x.value === e.get)) == null ? void 0 : ne.hint, X = (x) => {
3130
3130
  if (x === oa) {
3131
3131
  g(!0);
3132
3132
  return;
3133
3133
  }
3134
- const M = D.find((K) => K.id === x);
3134
+ const M = D.find((H) => H.id === x);
3135
3135
  if (!M) return;
3136
- const $ = Yt(M).some((K) => K.value === e.get) && e.field !== void 0;
3136
+ const $ = Yt(M).some((H) => H.value === e.get) && e.field !== void 0;
3137
3137
  S({ field: M, get: $ ? e.get : Xt(M) });
3138
3138
  };
3139
3139
  return u ? /* @__PURE__ */ t(
@@ -3144,7 +3144,7 @@ function Us({
3144
3144
  onOpenChange: g,
3145
3145
  availableFields: D,
3146
3146
  cardId: e.id,
3147
- source: G,
3147
+ source: K,
3148
3148
  onSave: (x) => {
3149
3149
  const M = { ...x, fieldScope: x.fieldScope ?? "card" };
3150
3150
  S({
@@ -3277,7 +3277,7 @@ function Us({
3277
3277
  disabled: !e.field,
3278
3278
  children: [
3279
3279
  /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Get", children: /* @__PURE__ */ t(ke, {}) }),
3280
- /* @__PURE__ */ t(De, { children: P.map((x) => /* @__PURE__ */ t(fe, { value: x.value, children: x.label }, x.value)) })
3280
+ /* @__PURE__ */ t(De, { children: B.map((x) => /* @__PURE__ */ t(fe, { value: x.value, children: x.label }, x.value)) })
3281
3281
  ]
3282
3282
  }
3283
3283
  ) }),
@@ -3298,14 +3298,14 @@ function Us({
3298
3298
  )
3299
3299
  }
3300
3300
  ) : null,
3301
- e.field && !Mr(e.get) && e.get !== "only" ? /* @__PURE__ */ s("div", { className: Z("col-span-2 grid gap-3", e.get === "list" ? "grid-cols-3" : "grid-cols-2"), children: [
3301
+ e.field && !Mr(e.get) && e.get !== "only" ? /* @__PURE__ */ s("div", { className: J("col-span-2 grid gap-3", e.get === "list" ? "grid-cols-3" : "grid-cols-2"), children: [
3302
3302
  /* @__PURE__ */ t(se, { label: "Order by", children: /* @__PURE__ */ s(
3303
3303
  we,
3304
3304
  {
3305
3305
  value: `${b}|${e.sortDirection}`,
3306
3306
  onValueChange: (x) => {
3307
- const M = x.lastIndexOf("|"), $ = x.slice(0, M), K = x.slice(M + 1);
3308
- S({ sortField: D.find((le) => le.id === $), sortDirection: K });
3307
+ const M = x.lastIndexOf("|"), $ = x.slice(0, M), H = x.slice(M + 1);
3308
+ S({ sortField: D.find((le) => le.id === $), sortDirection: H });
3309
3309
  },
3310
3310
  children: [
3311
3311
  /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Order by", children: /* @__PURE__ */ t(ke, {}) }),
@@ -3358,7 +3358,7 @@ function Us({
3358
3358
  {
3359
3359
  filters: e.conditions ?? null,
3360
3360
  availableFields: D,
3361
- source: G,
3361
+ source: K,
3362
3362
  onChange: (x) => S({ conditions: x })
3363
3363
  },
3364
3364
  JSON.stringify(((ye = e.dataSource) == null ? void 0 : ye.selectedEntities) ?? null)
@@ -3420,37 +3420,37 @@ function Qs(e) {
3420
3420
  const { name: a, label: r, presentation: n, emptyText: i, ...o } = e;
3421
3421
  return JSON.stringify(o);
3422
3422
  }
3423
- function Ks({
3423
+ function Hs({
3424
3424
  variable: e,
3425
3425
  onClose: a,
3426
3426
  onHoldEscape: r
3427
3427
  }) {
3428
- var J, H;
3428
+ var Z, G;
3429
3429
  const n = N((I) => I.dashboard), i = N((I) => I.selectedSheetId), o = N((I) => I.actions.saveVariableChange), [l, h] = E(
3430
3430
  () => e ? Ur(e) : $r()
3431
3431
  ), [d, c] = E("data"), [u, p] = E(!1), m = (I) => {
3432
3432
  p(I), r == null || r(I);
3433
- }, [f, g] = E([]), [y, C] = E(null), k = !e, V = Qs(l), B = Y(
3434
- () => Zt({ ...JSON.parse(V), name: "" }, n),
3433
+ }, [f, g] = E([]), [y, C] = E(null), k = !e, V = Qs(l), P = Y(
3434
+ () => Jt({ ...JSON.parse(V), name: "" }, n),
3435
3435
  [V, n]
3436
3436
  ), { name: D, label: O, presentation: b, emptyText: S } = l, v = Y(
3437
3437
  () => ({
3438
- ...B,
3439
- name: Jt(n, { id: B.id, name: D, field: l.field, mode: l.mode, label: O }),
3438
+ ...P,
3439
+ name: Zt(n, { id: P.id, name: D, field: l.field, mode: l.mode, label: O }),
3440
3440
  ...O != null && O.trim() ? { label: O.trim() } : {},
3441
3441
  ...b ? { presentation: b } : {},
3442
3442
  ...S != null && S.trim() ? { emptyText: S } : {}
3443
3443
  }),
3444
3444
  // The field and mode are inside the query key already.
3445
- [B, n, D, O, b, S, l.field, l.mode]
3445
+ [P, n, D, O, b, S, l.field, l.mode]
3446
3446
  ), T = Y(
3447
3447
  () => ({
3448
3448
  ...n,
3449
3449
  variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
3450
3450
  }),
3451
3451
  [n, v]
3452
- ), F = jr(l), G = ct(), P = N((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = E(!1), _ = async () => {
3453
- const I = Zt(l, n);
3452
+ ), F = jr(l), K = ct(), B = N((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = E(!1), _ = async () => {
3453
+ const I = Jt(l, n);
3454
3454
  X(!0);
3455
3455
  let ae;
3456
3456
  try {
@@ -3460,7 +3460,7 @@ function Ks({
3460
3460
  return;
3461
3461
  }
3462
3462
  const [ne] = R.queryFrames;
3463
- ae = ne ? await G(ne, e ? { previousFrame: wr(n, e) } : void 0) : { domainsById: {} };
3463
+ ae = ne ? await K(ne, e ? { previousFrame: wr(n, e) } : void 0) : { domainsById: {} };
3464
3464
  } catch (R) {
3465
3465
  X(!1), g([
3466
3466
  {
@@ -3472,13 +3472,13 @@ function Ks({
3472
3472
  return;
3473
3473
  }
3474
3474
  const j = o(
3475
- k ? { kind: "add", variable: I } : { kind: "update", id: I.id, patch: Gs(I) }
3475
+ k ? { kind: "add", variable: I } : { kind: "update", id: I.id, patch: Ks(I) }
3476
3476
  );
3477
3477
  if (X(!1), !j.ok) {
3478
3478
  g(j.issues);
3479
3479
  return;
3480
3480
  }
3481
- P(ae), a();
3481
+ B(ae), a();
3482
3482
  }, te = (I) => {
3483
3483
  if (!e) return;
3484
3484
  const ae = o({ kind: "remove", id: e.id, confirmed: I });
@@ -3527,7 +3527,7 @@ function Ks({
3527
3527
  role: "tab",
3528
3528
  "aria-selected": d === I.id,
3529
3529
  onClick: () => c(I.id),
3530
- className: Z(
3530
+ className: J(
3531
3531
  "relative -mb-px inline-flex items-center text-[13px] transition-colors focus-visible:outline-none",
3532
3532
  d === I.id ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground"
3533
3533
  ),
@@ -3538,22 +3538,22 @@ function Ks({
3538
3538
  },
3539
3539
  I.id
3540
3540
  )) }),
3541
- /* @__PURE__ */ s("div", { className: Z("min-h-0 flex-1 overflow-y-auto", d === "filters" || u ? "" : "space-y-4 px-4 py-4"), children: [
3541
+ /* @__PURE__ */ s("div", { className: J("min-h-0 flex-1 overflow-y-auto", d === "filters" || u ? "" : "space-y-4 px-4 py-4"), children: [
3542
3542
  d === "data" ? /* @__PURE__ */ t(
3543
3543
  Us,
3544
3544
  {
3545
3545
  draft: l,
3546
3546
  onChange: h,
3547
- handle: Jt(n, l),
3547
+ handle: Zt(n, l),
3548
3548
  onCalculatedFieldOpenChange: m
3549
3549
  }
3550
3550
  ) : null,
3551
- d === "filters" ? /* @__PURE__ */ t(Hs, { draft: l, draftDashboard: T }) : null,
3552
- d === "display" ? /* @__PURE__ */ t(Zs, { draft: l, onChange: h }) : null
3551
+ d === "filters" ? /* @__PURE__ */ t(Gs, { draft: l, draftDashboard: T }) : null,
3552
+ d === "display" ? /* @__PURE__ */ t(Js, { draft: l, onChange: h }) : null
3553
3553
  ] }),
3554
3554
  u ? null : /* @__PURE__ */ s(U, { children: [
3555
3555
  /* @__PURE__ */ t(
3556
- Js,
3556
+ Zs,
3557
3557
  {
3558
3558
  draft: l,
3559
3559
  draftVariable: v,
@@ -3571,9 +3571,9 @@ function Ks({
3571
3571
  /* @__PURE__ */ s("p", { children: [
3572
3572
  y.message,
3573
3573
  " Used in ",
3574
- ((J = y.places) == null ? void 0 : J.length) ?? 0,
3574
+ ((Z = y.places) == null ? void 0 : Z.length) ?? 0,
3575
3575
  " ",
3576
- ((H = y.places) == null ? void 0 : H.length) === 1 ? "place" : "places",
3576
+ ((G = y.places) == null ? void 0 : G.length) === 1 ? "place" : "places",
3577
3577
  ". Its chips then read as missing."
3578
3578
  ] }),
3579
3579
  /* @__PURE__ */ s("div", { className: "mt-1.5 flex gap-1.5", children: [
@@ -3602,7 +3602,7 @@ function Ks({
3602
3602
  }
3603
3603
  );
3604
3604
  }
3605
- function Gs(e) {
3605
+ function Ks(e) {
3606
3606
  const { id: a, ...r } = e;
3607
3607
  return {
3608
3608
  ...r,
@@ -3612,7 +3612,7 @@ function Gs(e) {
3612
3612
  emptyText: r.emptyText
3613
3613
  };
3614
3614
  }
3615
- function Hs({ draft: e, draftDashboard: a }) {
3615
+ function Gs({ draft: e, draftDashboard: a }) {
3616
3616
  const r = Y(() => xr(a), [a]), n = r.inputs.filter(
3617
3617
  (o) => r.reachedVariables({ inputId: o.input.id }).some((l) => l.variableId === e.id)
3618
3618
  ), i = e.mode === "sql" && vr(e.sql);
@@ -3626,7 +3626,7 @@ function Hs({ draft: e, draftDashboard: a }) {
3626
3626
  /* @__PURE__ */ t("span", { className: "block truncate font-medium text-foreground", children: o.input.label || o.input.filter.title }),
3627
3627
  /* @__PURE__ */ t("span", { className: "block truncate text-[11px] text-muted-foreground", children: Ys(o.input.scope) })
3628
3628
  ] }),
3629
- /* @__PURE__ */ t("span", { className: Z("shrink-0 text-[11px]", h === "Don't apply" || h === "Not named in the SQL" ? "text-muted-foreground" : "text-foreground"), children: h })
3629
+ /* @__PURE__ */ t("span", { className: J("shrink-0 text-[11px]", h === "Don't apply" || h === "Not named in the SQL" ? "text-muted-foreground" : "text-foreground"), children: h })
3630
3630
  ] }, o.input.id);
3631
3631
  })
3632
3632
  ] }) : /* @__PURE__ */ t("p", { className: "px-4 py-6 text-center text-[12px] text-muted-foreground", children: "No filter reaches this variable. A filter on the tabs or Documents where it is used reaches it; a variable used nowhere yet follows every tab's filters." });
@@ -3650,7 +3650,7 @@ const Xs = [
3650
3650
  { value: "long", label: "Long" },
3651
3651
  { value: "pattern", label: "Custom pattern…" }
3652
3652
  ];
3653
- function Zs({ draft: e, onChange: a }) {
3653
+ function Js({ draft: e, onChange: a }) {
3654
3654
  var h, d;
3655
3655
  const r = e.mode === "sql" ? "unknown" : Ot((h = e.field) == null ? void 0 : h.dataType), n = (d = e.presentation) == null ? void 0 : d.temporal, i = n ? n.mode === "style" ? n.dateStyle : n.mode === "pattern" ? "pattern" : "auto" : "auto", o = (n == null ? void 0 : n.mode) === "pattern" ? Lr(n.pattern) : null, l = (c) => a({ ...e, presentation: c && Object.keys(c).length ? c : void 0 });
3656
3656
  return /* @__PURE__ */ s(U, { children: [
@@ -3705,7 +3705,7 @@ function Zs({ draft: e, onChange: a }) {
3705
3705
  )
3706
3706
  ] });
3707
3707
  }
3708
- function Js({
3708
+ function Zs({
3709
3709
  draft: e,
3710
3710
  draftVariable: a,
3711
3711
  draftDashboard: r,
@@ -3713,7 +3713,7 @@ function Js({
3713
3713
  selectedSheetId: i
3714
3714
  }) {
3715
3715
  var S;
3716
- const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [h, d] = E(void 0), c = (l ? h : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), u = o.find((v) => v.id === c), p = N((v) => c ? v.documentSectionRuntimeBySheetId[c] : void 0), m = !!(u && Ke(u)), f = Y(
3716
+ const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [h, d] = E(void 0), c = (l ? h : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), u = o.find((v) => v.id === c), p = N((v) => c ? v.documentSectionRuntimeBySheetId[c] : void 0), m = !!(u && He(u)), f = Y(
3717
3717
  () => c ? m ? p ? { kind: "document", sheetId: c, runtime: p } : void 0 : { kind: "sheet", sheetId: c } : void 0,
3718
3718
  [m, p, c]
3719
3719
  ), g = Y(() => n || !f ? [] : [a], [n, a, f]), C = Ln({
@@ -3721,7 +3721,7 @@ function Js({
3721
3721
  place: f ?? { kind: "sheet", sheetId: c ?? "" },
3722
3722
  purpose: "preview",
3723
3723
  variables: g
3724
- }).byId.get(a.id), k = Vn(), V = Bn(), B = Y(
3724
+ }).byId.get(a.id), k = Vn(), V = Pn(), P = Y(
3725
3725
  () => Nr({ preferences: k, calendar: V }),
3726
3726
  [V, k]
3727
3727
  );
@@ -3733,7 +3733,7 @@ function Js({
3733
3733
  else if (!C || C.status === "loading")
3734
3734
  D = /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "Loading…" });
3735
3735
  else {
3736
- const v = ei(a, C, B);
3736
+ const v = ei(a, C, P);
3737
3737
  if (D = v.body, O = v.meta, v.unavailable) {
3738
3738
  const T = (u == null ? void 0 : u.title) || "this tab";
3739
3739
  b = /* @__PURE__ */ s("p", { className: "mt-1.5 flex gap-1.5 text-[11px] leading-4 text-amber-700 dark:text-amber-400", children: [
@@ -3742,7 +3742,7 @@ function Js({
3742
3742
  "No change on ",
3743
3743
  T,
3744
3744
  ". ",
3745
- Pn(v.unavailable, "variable")
3745
+ Bn(v.unavailable, "variable")
3746
3746
  ] })
3747
3747
  ] });
3748
3748
  }
@@ -3768,7 +3768,7 @@ function ei(e, a, r) {
3768
3768
  ] }), o = (u) => u === void 0 ? "" : u === "beyondCap" ? `more than ${st} match` : `${u} ${u === 1 ? "match" : "matches"}`, l = "filterReach" in a ? a.filterReach : [], h = l.filter((u) => u.status === "applied").length, d = l.length - h, c = l.length ? ` · ${h} ${h === 1 ? "filter" : "filters"} applied${d ? `, ${d} skipped` : ""}` : "";
3769
3769
  switch (a.status) {
3770
3770
  case "answered": {
3771
- const u = _r(e, Object.keys(a.parts))[0], p = u ? a.parts[u] : void 0, m = p && Gt(p, e.presentation, r) || "(empty)", f = `${o(a.matched)}${c}`.replace(/^ · /, ""), g = Sr(e, a, r);
3771
+ const u = _r(e, Object.keys(a.parts))[0], p = u ? a.parts[u] : void 0, m = p && Kt(p, e.presentation, r) || "(empty)", f = `${o(a.matched)}${c}`.replace(/^ · /, ""), g = Sr(e, a, r);
3772
3772
  return g && typeof g == "object" && "unavailable" in g ? { body: n(m), meta: f, unavailable: g.unavailable } : g === "noPrevious" ? { body: n(m), meta: `${f} · Nothing in the period before to compare with.`.replace(/^ · /, "") } : g ? {
3773
3773
  body: /* @__PURE__ */ s(U, { children: [
3774
3774
  n(g.value),
@@ -3783,7 +3783,7 @@ function ei(e, a, r) {
3783
3783
  } : { body: n(m), meta: f };
3784
3784
  }
3785
3785
  case "listed": {
3786
- const u = a.items.map((m) => Gt(m, e.presentation, r)), p = a.more === "beyondCap" ? " and more" : a.more ? ` and ${a.more} more` : "";
3786
+ const u = a.items.map((m) => Kt(m, e.presentation, r)), p = a.more === "beyondCap" ? " and more" : a.more ? ` and ${a.more} more` : "";
3787
3787
  return { body: n(`${u.join(e.get.kind === "list" ? e.get.separator ?? ", " : ", ")}${p}`), meta: `${o(a.matched)}${c}` };
3788
3788
  }
3789
3789
  case "none":
@@ -3818,10 +3818,10 @@ function ro() {
3818
3818
  n.current ? l.preventDefault() : r();
3819
3819
  },
3820
3820
  children: [
3821
- /* @__PURE__ */ t(Be, { className: "sr-only", children: "Variable from data" }),
3821
+ /* @__PURE__ */ t(Pe, { className: "sr-only", children: "Variable from data" }),
3822
3822
  /* @__PURE__ */ t(ut, { className: "sr-only", children: "Define a value from your data to show in text." }),
3823
3823
  /* @__PURE__ */ t(
3824
- Ks,
3824
+ Hs,
3825
3825
  {
3826
3826
  variable: i,
3827
3827
  onClose: r,
@@ -3850,18 +3850,18 @@ function ti({
3850
3850
  size: "xs",
3851
3851
  variant: "outline",
3852
3852
  disabled: e,
3853
- className: Z("gap-1.5", r),
3853
+ className: J("gap-1.5", r),
3854
3854
  onClick: n,
3855
3855
  "aria-label": "Reports & briefings",
3856
3856
  children: [
3857
- /* @__PURE__ */ t(Hr, { className: "h-3.5 w-3.5" }),
3857
+ /* @__PURE__ */ t(Gr, { className: "h-3.5 w-3.5" }),
3858
3858
  "Reports & briefings",
3859
3859
  i ? /* @__PURE__ */ t("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: a }) : null
3860
3860
  ]
3861
3861
  }
3862
3862
  );
3863
3863
  }
3864
- const ai = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ia = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", Je = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
3864
+ const ai = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ia = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", Ze = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
3865
3865
  function ni(e) {
3866
3866
  return e === "dashboard" ? "This dashboard" : "Project";
3867
3867
  }
@@ -3917,7 +3917,7 @@ function li({
3917
3917
  role: "tab",
3918
3918
  "aria-selected": n,
3919
3919
  onClick: () => a(r),
3920
- className: Z(
3920
+ className: J(
3921
3921
  "h-6 rounded-[3px] px-2 text-[11px] transition-colors",
3922
3922
  n ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
3923
3923
  ),
@@ -3949,7 +3949,7 @@ function di({
3949
3949
  busyId: C,
3950
3950
  manageBriefingsHref: k,
3951
3951
  contentKind: V,
3952
- hideHeader: B = !1
3952
+ hideHeader: P = !1
3953
3953
  }) {
3954
3954
  const D = e.length, O = e.filter((F) => F.status === "ACTIVE").length, b = V === "reports" ? D === 1 ? "report" : "reports" : V === "briefings" ? D === 1 ? "briefing" : "briefings" : D === 1 ? "item" : "items", S = e.find((F) => F.hasActiveRun) ?? null, v = V ?? "reports & briefings", T = r === "dashboard" ? a : `Project ${v}`;
3955
3955
  return /* @__PURE__ */ s(
@@ -3958,7 +3958,7 @@ function di({
3958
3958
  "aria-label": `Dashboard ${v.replace("&", "and")}`,
3959
3959
  className: "flex h-full min-h-0 flex-col bg-background text-foreground",
3960
3960
  children: [
3961
- B ? null : /* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
3961
+ P ? null : /* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
3962
3962
  /* @__PURE__ */ s("div", { className: "min-w-0", children: [
3963
3963
  /* @__PURE__ */ t("div", { className: ai, children: v }),
3964
3964
  /* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: T })
@@ -4013,7 +4013,7 @@ function di({
4013
4013
  /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
4014
4014
  ) : null,
4015
4015
  D > 0 && c ? p && u ? /* @__PURE__ */ s(je, { children: [
4016
- /* @__PURE__ */ t(qe, { asChild: !0, children: /* @__PURE__ */ s("button", { className: Je, children: [
4016
+ /* @__PURE__ */ t(qe, { asChild: !0, children: /* @__PURE__ */ s("button", { className: Ze, children: [
4017
4017
  /* @__PURE__ */ t(be, { className: "h-3 w-3" }),
4018
4018
  " New"
4019
4019
  ] }) }),
@@ -4031,7 +4031,7 @@ function di({
4031
4031
  "button",
4032
4032
  {
4033
4033
  onClick: () => d("scheduled_report"),
4034
- className: Je,
4034
+ className: Ze,
4035
4035
  children: [
4036
4036
  /* @__PURE__ */ t(be, { className: "h-3 w-3" }),
4037
4037
  " Schedule report"
@@ -4041,7 +4041,7 @@ function di({
4041
4041
  "button",
4042
4042
  {
4043
4043
  onClick: () => d("analytical_briefing"),
4044
- className: Je,
4044
+ className: Ze,
4045
4045
  children: [
4046
4046
  /* @__PURE__ */ t(be, { className: "h-3 w-3" }),
4047
4047
  " New briefing"
@@ -4086,7 +4086,7 @@ function di({
4086
4086
  "a",
4087
4087
  {
4088
4088
  href: k,
4089
- className: Z(Ia, "h-6 px-1 text-[11px]"),
4089
+ className: J(Ia, "h-6 px-1 text-[11px]"),
4090
4090
  children: [
4091
4091
  "Manage all reports & briefings",
4092
4092
  /* @__PURE__ */ t(Qr, { className: "h-3 w-3" })
@@ -4120,7 +4120,7 @@ function ci({
4120
4120
  "button",
4121
4121
  {
4122
4122
  onClick: () => e("scheduled_report"),
4123
- className: Je,
4123
+ className: Ze,
4124
4124
  children: [
4125
4125
  /* @__PURE__ */ t(be, { className: "h-3 w-3" }),
4126
4126
  " Schedule a report"
@@ -4328,7 +4328,7 @@ function hi({
4328
4328
  return /* @__PURE__ */ s(
4329
4329
  "div",
4330
4330
  {
4331
- className: Z(
4331
+ className: J(
4332
4332
  "group relative border-b border-border/60 px-4 py-3 transition-colors hover:bg-muted/60",
4333
4333
  h && "opacity-70"
4334
4334
  ),
@@ -4367,7 +4367,7 @@ function hi({
4367
4367
  d ? /* @__PURE__ */ t(de, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ t(
4368
4368
  "span",
4369
4369
  {
4370
- className: Z(
4370
+ className: J(
4371
4371
  "inline-block h-1.5 w-1.5 shrink-0 rounded-full",
4372
4372
  f
4373
4373
  )
@@ -4469,8 +4469,8 @@ async function gi(e) {
4469
4469
  return r;
4470
4470
  }
4471
4471
  const bi = {
4472
- listBriefings: Gn,
4473
- getBriefing: Kn,
4472
+ listBriefings: Kn,
4473
+ getBriefing: Hn,
4474
4474
  pauseBriefing: Qn,
4475
4475
  resumeBriefing: Wn,
4476
4476
  deleteBriefing: qn,
@@ -4494,36 +4494,36 @@ function xi({
4494
4494
  openRun: p,
4495
4495
  client: m
4496
4496
  }) {
4497
- const { authToken: f, tokenProps: g } = $e(), y = $n(), C = !u || y.canCreate && (u === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = E(!1), B = h ?? k, D = (A) => {
4497
+ const { authToken: f, tokenProps: g } = $e(), y = $n(), C = !u || y.canCreate && (u === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = E(!1), P = h ?? k, D = (A) => {
4498
4498
  h === void 0 && V(A), d == null || d(A);
4499
4499
  }, [O, b] = E(
4500
4500
  u ? "author" : "list"
4501
4501
  ), [S, v] = E(
4502
4502
  u ?? "analytical_briefing"
4503
- ), [T, F] = E("dashboard"), [G, P] = E(
4503
+ ), [T, F] = E("dashboard"), [K, B] = E(
4504
4504
  []
4505
- ), [Q, X] = E(null), _ = u && !C && !Q ? "list" : O, [te, J] = E(!1), [H, I] = E(null), [ae, j] = E(null), [R, ne] = E(
4505
+ ), [Q, X] = E(null), _ = u && !C && !Q ? "list" : O, [te, Z] = E(!1), [G, I] = E(null), [ae, j] = E(null), [R, ne] = E(
4506
4506
  null
4507
- ), [ue, he] = E(null), ye = et(null), x = et(B);
4507
+ ), [ue, he] = E(null), ye = et(null), x = et(P);
4508
4508
  Ee(() => {
4509
- const A = B && !x.current;
4510
- x.current = B, !(!A || !u) && (X(null), F("dashboard"), v(u), b("author"), he(null));
4511
- }, [B, u]);
4512
- const M = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [_e, ht] = E(null);
4509
+ const A = P && !x.current;
4510
+ x.current = P, !(!A || !u) && (X(null), F("dashboard"), v(u), b("author"), he(null));
4511
+ }, [P, u]);
4512
+ const M = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), H = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [_e, ht] = E(null);
4513
4513
  Ee(() => {
4514
- if (!p || !$ || !K) return;
4514
+ if (!p || !$ || !H) return;
4515
4515
  let A = !0;
4516
- return le.getBriefing($, K, p.briefingId).then(({ briefing: W }) => {
4516
+ return le.getBriefing($, H, p.briefingId).then(({ briefing: W }) => {
4517
4517
  A && (X(W), ht(p), b("author"));
4518
4518
  }, (W) => {
4519
4519
  A && z.error(W instanceof Error ? W.message : "Could not open the run.");
4520
4520
  }), () => {
4521
4521
  A = !1;
4522
4522
  };
4523
- }, [p, $, K, le]);
4524
- const Fe = mi(a), Ge = Y(() => {
4523
+ }, [p, $, H, le]);
4524
+ const Fe = mi(a), Ke = Y(() => {
4525
4525
  const A = fi(
4526
- G,
4526
+ K,
4527
4527
  T,
4528
4528
  e
4529
4529
  );
@@ -4531,9 +4531,9 @@ function xi({
4531
4531
  return A;
4532
4532
  const W = u === "scheduled_report" ? "report" : "briefing";
4533
4533
  return A.filter(
4534
- (He) => pe(He).noun === W
4534
+ (Ge) => pe(Ge).noun === W
4535
4535
  );
4536
- }, [e, G, T, u]), mt = Y(() => T === "dashboard" ? {
4536
+ }, [e, K, T, u]), mt = Y(() => T === "dashboard" ? {
4537
4537
  source: { type: "dashboard", dashboardId: e },
4538
4538
  label: Fe,
4539
4539
  detail: pi(Fe)
@@ -4541,19 +4541,19 @@ function xi({
4541
4541
  source: { type: "project" },
4542
4542
  label: "This project",
4543
4543
  detail: "Use any data in this project."
4544
- }, [e, Fe, T]), Oe = !!($ && K), ze = Wr({
4544
+ }, [e, Fe, T]), Oe = !!($ && H), ze = Wr({
4545
4545
  canCreate: y.canCreate,
4546
4546
  analyticalBriefingsEnabled: y.analyticalBriefingsEnabled,
4547
4547
  scheduledReportAvailable: T === "dashboard"
4548
4548
  }), ce = ie(async () => {
4549
- if (!(!$ || !K)) {
4550
- J(!0), he(null);
4549
+ if (!(!$ || !H)) {
4550
+ Z(!0), he(null);
4551
4551
  try {
4552
- P(
4552
+ B(
4553
4553
  await gi({
4554
4554
  apiClient: le,
4555
4555
  apiServiceUrl: $,
4556
- token: K
4556
+ token: H
4557
4557
  })
4558
4558
  );
4559
4559
  } catch (A) {
@@ -4561,24 +4561,24 @@ function xi({
4561
4561
  A instanceof Error ? A.message : "Could not load briefings."
4562
4562
  );
4563
4563
  } finally {
4564
- J(!1);
4564
+ Z(!1);
4565
4565
  }
4566
4566
  }
4567
- }, [le, $, K]);
4567
+ }, [le, $, H]);
4568
4568
  Ee(() => {
4569
- !B || _ !== "list" || !Oe || ce();
4570
- }, [Oe, _, ce, B]);
4569
+ !P || _ !== "list" || !Oe || ce();
4570
+ }, [Oe, _, ce, P]);
4571
4571
  const Re = () => {
4572
4572
  X(null), F("dashboard"), b("list"), D(!0);
4573
4573
  }, w = (A) => {
4574
4574
  X(null), v(A), b("author");
4575
4575
  }, q = async (A) => {
4576
- if (!(!$ || !K)) {
4576
+ if (!(!$ || !H)) {
4577
4577
  I(A), he(null);
4578
4578
  try {
4579
4579
  const W = await le.getBriefing(
4580
4580
  $,
4581
- K,
4581
+ H,
4582
4582
  A
4583
4583
  );
4584
4584
  X(W.briefing), b("author");
@@ -4591,12 +4591,12 @@ function xi({
4591
4591
  }
4592
4592
  }
4593
4593
  }, ee = async (A) => {
4594
- if (!(!$ || !K)) {
4594
+ if (!(!$ || !H)) {
4595
4595
  j(A.id);
4596
4596
  try {
4597
4597
  const W = await le.runBriefingNow(
4598
4598
  $,
4599
- K,
4599
+ H,
4600
4600
  A.id,
4601
4601
  { requestId: vi() }
4602
4602
  );
@@ -4610,21 +4610,21 @@ function xi({
4610
4610
  }
4611
4611
  }
4612
4612
  }, me = async (A) => {
4613
- if (!$ || !K) return;
4614
- const { noun: W } = pe(A), He = W === "report" ? "Report" : "Briefing";
4613
+ if (!$ || !H) return;
4614
+ const { noun: W } = pe(A), Ge = W === "report" ? "Report" : "Briefing";
4615
4615
  j(A.id);
4616
4616
  try {
4617
4617
  const Ye = A.status === "PAUSED" ? await le.resumeBriefing(
4618
4618
  $,
4619
- K,
4619
+ H,
4620
4620
  A.id
4621
4621
  ) : await le.pauseBriefing(
4622
4622
  $,
4623
- K,
4623
+ H,
4624
4624
  A.id
4625
4625
  );
4626
4626
  z.success(
4627
- Ye.briefing.status === "PAUSED" ? `${He} paused` : `${He} resumed`
4627
+ Ye.briefing.status === "PAUSED" ? `${Ge} paused` : `${Ge} resumed`
4628
4628
  ), ce();
4629
4629
  } catch (Ye) {
4630
4630
  z.error(
@@ -4634,13 +4634,13 @@ function xi({
4634
4634
  j(null);
4635
4635
  }
4636
4636
  }, Ne = async () => {
4637
- if (!R || !$ || !K) return;
4637
+ if (!R || !$ || !H) return;
4638
4638
  const A = R;
4639
4639
  j(A.id);
4640
4640
  try {
4641
4641
  await le.deleteBriefing(
4642
4642
  $,
4643
- K,
4643
+ H,
4644
4644
  A.id
4645
4645
  );
4646
4646
  const { noun: W } = pe(A);
@@ -4652,8 +4652,8 @@ function xi({
4652
4652
  } finally {
4653
4653
  j(null);
4654
4654
  }
4655
- }, La = Ge.length;
4656
- return y.surfaceVisible ? /* @__PURE__ */ s(Hn, { open: B, onOpenChange: D, children: [
4655
+ }, La = Ke.length;
4656
+ return y.surfaceVisible ? /* @__PURE__ */ s(Gn, { open: P, onOpenChange: D, children: [
4657
4657
  c ? null : /* @__PURE__ */ t(
4658
4658
  ti,
4659
4659
  {
@@ -4676,8 +4676,8 @@ function xi({
4676
4676
  },
4677
4677
  children: [
4678
4678
  /* @__PURE__ */ s(Xn, { className: "sr-only", children: [
4679
- /* @__PURE__ */ t(Zn, { children: "Reports & briefings" }),
4680
- /* @__PURE__ */ t(Jn, { children: "Manage reports and briefings for this dashboard." })
4679
+ /* @__PURE__ */ t(Jn, { children: "Reports & briefings" }),
4680
+ /* @__PURE__ */ t(Zn, { children: "Manage reports and briefings for this dashboard." })
4681
4681
  ] }),
4682
4682
  u ? /* @__PURE__ */ s("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
4683
4683
  /* @__PURE__ */ s(
@@ -4694,7 +4694,7 @@ function xi({
4694
4694
  role: "tab",
4695
4695
  "aria-selected": _ === "author",
4696
4696
  disabled: !C,
4697
- className: Z(
4697
+ className: J(
4698
4698
  "-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
4699
4699
  _ === "author" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground",
4700
4700
  !C && "cursor-not-allowed opacity-50"
@@ -4711,7 +4711,7 @@ function xi({
4711
4711
  type: "button",
4712
4712
  role: "tab",
4713
4713
  "aria-selected": _ === "list",
4714
- className: Z(
4714
+ className: J(
4715
4715
  "-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
4716
4716
  _ === "list" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
4717
4717
  ),
@@ -4736,7 +4736,7 @@ function xi({
4736
4736
  _ === "list" ? /* @__PURE__ */ t(
4737
4737
  di,
4738
4738
  {
4739
- briefings: Ge,
4739
+ briefings: Ke,
4740
4740
  dashboardLabel: Fe,
4741
4741
  sourceView: T,
4742
4742
  error: ue,
@@ -4761,7 +4761,7 @@ function xi({
4761
4761
  me(A);
4762
4762
  },
4763
4763
  onDelete: (A) => ne(A),
4764
- selectingId: H,
4764
+ selectingId: G,
4765
4765
  busyId: ae,
4766
4766
  manageBriefingsHref: l,
4767
4767
  contentKind: u === "scheduled_report" ? "reports" : u === "analytical_briefing" ? "briefings" : void 0,
@@ -4771,7 +4771,7 @@ function xi({
4771
4771
  er,
4772
4772
  {
4773
4773
  apiServiceUrl: $,
4774
- token: K,
4774
+ token: H,
4775
4775
  briefing: Q,
4776
4776
  initialRunId: _e && (Q == null ? void 0 : Q.id) === _e.briefingId ? _e.runId : void 0,
4777
4777
  intent: S,
@@ -4843,21 +4843,21 @@ function vi() {
4843
4843
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
4844
4844
  }
4845
4845
  export {
4846
- Ki as A,
4846
+ Hi as A,
4847
4847
  Yi as D,
4848
- Hi as S,
4849
- Zi as U,
4848
+ Gi as S,
4849
+ Ji as U,
4850
4850
  qi as V,
4851
4851
  ti as W,
4852
4852
  Qi as a,
4853
- Gi as b,
4853
+ Ki as b,
4854
4854
  Xi as c,
4855
4855
  eo as d,
4856
4856
  gs as e,
4857
4857
  xs as f,
4858
4858
  ws as g,
4859
4859
  to as h,
4860
- Ji as i,
4860
+ Zi as i,
4861
4861
  no as j,
4862
4862
  ao as k,
4863
4863
  ro as l,