react-semaphor 0.1.597 → 0.1.599

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 (96) hide show
  1. package/dist/analytics-protocol/index.js +355 -346
  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-DUDiH9z4.js → assistant-chat-f3XuzrAm.js} +88 -89
  9. package/dist/chunks/{bookmark-impact-Dh-wiTs3.js → bookmark-impact-B5hyttm2.js} +3 -3
  10. package/dist/chunks/{bookmark-state-Be2W3s6t.js → bookmark-state-h1OLXVjE.js} +153 -153
  11. package/dist/chunks/{card-filter-builder-2-OxEBWf.js → card-filter-builder-DfLqD2RV.js} +1047 -1075
  12. package/dist/chunks/{comparison-window-caption-DmMFtNP5.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-g-7XY0Kw.js → dashboard-CoI4aOUc.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CVDhvsTk.js → dashboard-briefing-launcher-RxYGtk-F.js} +181 -181
  16. package/dist/chunks/{dashboard-controls-CtQY-J33.js → dashboard-controls-DeaXrtLK.js} +85 -85
  17. package/dist/chunks/{dashboard-json-DkhzPI3-.js → dashboard-json-DvxKpKd_.js} +5 -5
  18. package/dist/chunks/dates-BhtO28Sn.js +164 -0
  19. package/dist/chunks/{edit-dashboard-visual-DWn74pCl.js → edit-dashboard-visual-C4f5hONA.js} +5489 -5433
  20. package/dist/chunks/{filter-line-BpdPq1D2.js → filter-line-Dkg3yuOX.js} +6 -6
  21. package/dist/chunks/{filter-reach-copy-DoXmRmk-.js → filter-reach-copy-Cl5Od38Q.js} +1760 -1584
  22. package/dist/chunks/{filter-value-text-CDQCIREQ.js → filter-value-text-CXyuLW9Q.js} +4 -4
  23. package/dist/chunks/{index-C0jX5wlM.js → index-EKpTtkYF.js} +7 -7
  24. package/dist/chunks/{layout-grid-DoFIfQGd.js → layout-grid-DSrBSfPM.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CyWOwLmE.js → matrix-analytical-definition-BuUSBDm7.js} +242 -214
  26. package/dist/chunks/matrix-member-presentation-B_2beBc0.js +258 -0
  27. package/dist/chunks/{matrix-operation-contract-CAanJeCj.js → matrix-operation-contract-DdK0J_KU.js} +47 -47
  28. package/dist/chunks/{metric-comparison-BeKnUD08.js → metric-comparison-Bhz0V841.js} +2 -2
  29. package/dist/chunks/{paintbrush-KeaU1L1a.js → paintbrush-1UiU-uTz.js} +1 -1
  30. package/dist/chunks/{palette-BcFJLeXB.js → palette-DFIFf_-m.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-Dt0E1Wou.js → pivot-result-contract-expectations-Dk7WFR_u.js} +47 -47
  32. package/dist/chunks/{pivot-result-identity-BKUjYO1u.js → pivot-result-identity-CzzrJpEm.js} +1 -1
  33. package/dist/chunks/{raw-temporal-value-BzdgeDa7.js → raw-temporal-value-BLvdaMng.js} +2 -2
  34. package/dist/chunks/{report-preferences-dialog-5WUi6jC0.js → report-preferences-dialog-CZaYsQLK.js} +14 -14
  35. package/dist/chunks/{report-runtime-context-g4Zp_TU9.js → report-runtime-context-CEGluufW.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DfJshnw8.js → resolve-dashboard-input-context-vPtbuDDz.js} +11786 -11247
  37. package/dist/chunks/{save-C9CZAk6V.js → save-CWQ02kHo.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DdhPU2Kq.js → saved-dashboard-context-C6X5nP4C.js} +97 -97
  39. package/dist/chunks/{selection-filter-compiler-BclSpK3P.js → selection-filter-compiler-Ce4BpjRX.js} +1 -1
  40. package/dist/chunks/{semaphor-ready-indicator-miYoJ-HP.js → semaphor-ready-indicator-BUiaKY6O.js} +60709 -59628
  41. package/dist/chunks/{shelf-drop-preview-context-D-awfyyo.js → shelf-drop-preview-context-CwxWJjBv.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-D6FtWx_3.js → stored-dashboard-Bmct-STp.js} +1165 -1148
  43. package/dist/chunks/{style-sheet-parts-DM_Mw_sm.js → style-sheet-parts-BX7d7-2-.js} +198 -198
  44. package/dist/chunks/{table-export-sheet-DBlFMvE8.js → table-export-sheet-BWSVTclx.js} +1 -1
  45. package/dist/chunks/{token-types-BB2ImFx6.js → token-types-CnlEiAdS.js} +1 -1
  46. package/dist/chunks/{upload-CMTCg47S.js → upload-DsqUSS8l.js} +1 -1
  47. package/dist/chunks/{validators-BlEWWX9O.js → validators-D2Hm57lJ.js} +1090 -1071
  48. package/dist/chunks/{variable-draft-CxdgKDCx.js → variable-draft-Bi-zUa_a.js} +4 -4
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2554 -2538
  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/lib/utils/filter-default-value-utils.d.ts +1 -1
  68. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
  69. package/dist/types/shared/analytics-protocol/catalog-field-grounding.d.ts +7 -0
  70. package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
  71. package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
  72. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  73. package/dist/types/shared/analytics-protocol/numeric-range-options.d.ts +46 -0
  74. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  78. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +63 -0
  81. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  82. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  84. package/dist/types/shared/dashboard-authoring/filter-model/number-condition-spec.d.ts +24 -0
  85. package/dist/types/shared/dashboard-authoring/filter-model/number-range-setting.d.ts +47 -0
  86. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
  87. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
  88. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +35 -3
  89. package/dist/types/shared/usage-events/attribution.d.ts +2 -2
  90. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  91. package/dist/usage-events/index.js +1 -1
  92. package/package.json +1 -1
  93. package/dist/chunks/aggregate-measure-field-DHlDj0Pc.js +0 -22
  94. package/dist/chunks/dates-B-bKEsiu.js +0 -115
  95. package/dist/chunks/list-filter-BeTQxjNy.js +0 -15
  96. package/dist/chunks/matrix-member-presentation-Bj2YcHAP.js +0 -169
@@ -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 Pe, dO as Pa, b8 as $e, b5 as ot, dP as Ba, 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 Pn, c9 as ya, ew as Bn, 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-miYoJ-HP.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-DM_Mw_sm.js";
5
- import { L as Ue } from "./layout-grid-DoFIfQGd.js";
6
- import { c as Z } from "./pickers-DkqmtnTL.js";
7
- import { U as nr } from "./validators-BlEWWX9O.js";
8
- import "./matrix-operation-contract-CAanJeCj.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-BUiaKY6O.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 { bQ as qt, bm as Wt, fb as Qt, gL as rr, gM as rt, gK as Kt, gN as sr, t as Ke, gO as ir, u as or, gP as lr, gQ as dr, gR as cr, cT as ur, gS as hr, o as mr, g7 as pr, gT as fr, gU as gr, a as Ot, aV as br, a7 as xr, cx as vr, gV as yr, gW as Nr, cI as Cr, gX as wr, gY as Gt, gZ as Sr } from "./resolve-dashboard-input-context-DfJshnw8.js";
13
- import { S as wa } from "./save-C9CZAk6V.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-2-OxEBWf.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-vPtbuDDz.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-DfLqD2RV.js";
15
15
  import { createPortal as Tr } from "react-dom";
16
- import { b4 as Ht, aC as Lr } from "./pivot-result-contract-expectations-Dt0E1Wou.js";
17
- import { aD as Vr, ar as Pr, F as Br, ac as st, T as _r } from "./bookmark-state-Be2W3s6t.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, G as zr } from "./filter-reach-copy-DoXmRmk-.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-CxdgKDCx.js";
24
- import { g as pe, d as qr, a as Wr } from "./index-C0jX5wlM.js";
21
+ import "./context-BJoEFgNl.js";
22
+ import { v as Or, M as zr } from "./filter-reach-copy-Cl5Od38Q.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-Bi-zUa_a.js";
24
+ import { g as pe, d as qr, a as Wr } from "./index-EKpTtkYF.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,
@@ -229,7 +229,7 @@ function Zr({
229
229
  }
230
230
  ) });
231
231
  }
232
- function Jr(e) {
232
+ function Zr(e) {
233
233
  const [a, r] = E(null), [n, i] = E(null), o = Pa();
234
234
  return Ee(() => {
235
235
  if (!e || e.trim() === "") {
@@ -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();
@@ -412,7 +412,7 @@ function Be() {
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
417
  ), B = _a((i == null ? void 0 : i.id) || "", {
418
418
  enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
@@ -420,7 +420,7 @@ function Be() {
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,
@@ -447,10 +447,10 @@ function Be() {
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
  }
@@ -481,22 +481,22 @@ function Be() {
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 Be() {
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
  },
@@ -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") ? Pt : 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";
@@ -577,20 +577,20 @@ function qi({
577
577
  }, { selectVisual: O } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Be(), { isConsoleMode: v } = Ma(), {
578
578
  resources: T,
579
579
  isLoading: F,
580
- isError: G,
580
+ isError: K,
581
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
@@ -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" }),
@@ -862,7 +862,7 @@ function qi({
862
862
  }
863
863
  ) }),
864
864
  /* @__PURE__ */ t(
865
- Zr,
865
+ Jr,
866
866
  {
867
867
  open: h,
868
868
  onOpenChange: d,
@@ -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,
@@ -1488,12 +1488,12 @@ function hs() {
1488
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
  };
@@ -1543,32 +1543,32 @@ function hs() {
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
  }
@@ -1579,7 +1579,7 @@ function hs() {
1579
1579
  };
1580
1580
  }
1581
1581
  function Qi(e = {}) {
1582
- const { isInspectionMode: a } = Ja(), 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, {
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
1583
  saveAsDialogOpen: P,
1584
1584
  setSaveAsDialogOpen: D,
1585
1585
  handleSaveAs: O,
@@ -1630,7 +1630,7 @@ 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 = (B) => {
1633
+ }, K = (B) => {
1634
1634
  f(B), D(!0);
1635
1635
  };
1636
1636
  return /* @__PURE__ */ s(U, { children: [
@@ -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" }),
@@ -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
  ] }),
@@ -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);
@@ -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,7 +2956,7 @@ 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" };
2959
+ const o = { sheetId: i.id, cardId: a, sheetKind: He(i) ? "document" : "dashboard" };
2960
2960
  return r.filter((l) => Br(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
2961
2961
  `);
2962
2962
  })
@@ -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,7 +3113,7 @@ 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
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 = [
@@ -3121,7 +3121,7 @@ function Us({
3121
3121
  ...[e.field, e.sortField].filter(
3122
3122
  (x) => !!x && !P(x) && !V.some((M) => M.id === x.id)
3123
3123
  )
3124
- ], O = ((J = P(e.field)) == null ? void 0 : J.id) ?? ((H = e.field) == null ? void 0 : H.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", 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 } : {},
@@ -3131,9 +3131,9 @@ function Us({
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({
@@ -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,23 +3420,23 @@ 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
3433
  }, [f, g] = E([]), [y, C] = E(null), k = !e, V = Qs(l), P = Y(
3434
- () => Zt({ ...JSON.parse(V), name: "" }, n),
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
3438
  ...P,
3439
- name: Jt(n, { id: P.id, name: D, field: l.field, mode: l.mode, label: O }),
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 } : {}
@@ -3449,8 +3449,8 @@ function Ks({
3449
3449
  variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
3450
3450
  }),
3451
3451
  [n, v]
3452
- ), F = jr(l), G = ct(), B = 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,7 +3472,7 @@ 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);
@@ -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({
@@ -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":
@@ -3821,7 +3821,7 @@ function ro() {
3821
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
  ),
@@ -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,
@@ -4500,30 +4500,30 @@ function xi({
4500
4500
  u ? "author" : "list"
4501
4501
  ), [S, v] = E(
4502
4502
  u ?? "analytical_briefing"
4503
- ), [T, F] = E("dashboard"), [G, B] = 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
4507
  ), [ue, he] = E(null), ye = et(null), x = et(P);
4508
4508
  Ee(() => {
4509
4509
  const A = P && !x.current;
4510
4510
  x.current = P, !(!A || !u) && (X(null), F("dashboard"), v(u), b("author"), he(null));
4511
4511
  }, [P, 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);
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
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,10 +4561,10 @@ 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
4569
  !P || _ !== "list" || !Oe || ce();
4570
4570
  }, [Oe, _, ce, P]);
@@ -4573,12 +4573,12 @@ function xi({
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: P, 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,