react-semaphor 0.1.566 → 0.1.567

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 (31) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +1 -1
  3. package/dist/chunks/{assistant-chat-DNKAYSQL.js → assistant-chat-D-IuHHwh.js} +6 -6
  4. package/dist/chunks/{bookmark-impact-BeUbq0jc.js → bookmark-impact-B0estCHn.js} +9 -9
  5. package/dist/chunks/{bookmark-state-ByODVqee.js → bookmark-state-Du3s13_V.js} +333 -321
  6. package/dist/chunks/{card-filter-builder-SXaRWbKr.js → card-filter-builder-DbSmzvem.js} +3 -3
  7. package/dist/chunks/{dashboard-briefing-launcher-CXeXRTem.js → dashboard-briefing-launcher-DunvZYsU.js} +152 -152
  8. package/dist/chunks/{dashboard-controls-CsqKybrf.js → dashboard-controls-B09cN2Dz.js} +8 -8
  9. package/dist/chunks/{dashboard-Cni7nGhg.js → dashboard-f8J9DHh5.js} +1 -1
  10. package/dist/chunks/{dashboard-json-WWmw3Piu.js → dashboard-json-BNNCaKEc.js} +1 -1
  11. package/dist/chunks/{dates-DJRUS-he.js → dates-BsJcyoC_.js} +5 -5
  12. package/dist/chunks/{edit-dashboard-visual-BrIEaBhc.js → edit-dashboard-visual-Cwzbpty8.js} +8 -8
  13. package/dist/chunks/{filter-reach-copy-D5LqgrUf.js → filter-reach-copy-P-kDwUpY.js} +3 -3
  14. package/dist/chunks/{index-Bq9UbCGk.js → index-BcXw0CpM.js} +2 -2
  15. package/dist/chunks/{report-preferences-dialog-CeHioJwL.js → report-preferences-dialog-CbgmdWeZ.js} +8 -8
  16. package/dist/chunks/{resolve-dashboard-input-context-CwS-2r-b.js → resolve-dashboard-input-context-DPKSF3qj.js} +264 -264
  17. package/dist/chunks/{saved-dashboard-context-c-MZZTx2.js → saved-dashboard-context-CNudmm9U.js} +13 -13
  18. package/dist/chunks/{semaphor-ready-indicator-B2NpYRE-.js → semaphor-ready-indicator-CQd-PCCZ.js} +24824 -24790
  19. package/dist/chunks/{shelf-drop-preview-context-DM7yypwC.js → shelf-drop-preview-context-CWS3e20y.js} +2 -2
  20. package/dist/chunks/{stored-dashboard-DTWc2pzt.js → stored-dashboard-CrQFT27O.js} +1050 -1031
  21. package/dist/chunks/{variable-draft-DFizFCJu.js → variable-draft-BDxlD0dM.js} +2 -2
  22. package/dist/dashboard/index.js +2 -2
  23. package/dist/dashboard-authoring/index.js +11 -11
  24. package/dist/index.js +12 -12
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/index.js +33 -32
  28. package/dist/types/lib/dashboard-viewer/table-view.d.ts +24 -2
  29. package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +15 -0
  30. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +9 -0
  31. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as s, Fragment as U } from "react/jsx-runtime";
2
2
  import la, { useState as A, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as da } from "react";
3
- import { da as it, bu as Le, bv as Ve, bx as Pe, db as Ba, aU as $e, aR as ot, dc as Oa, dd as lt, de as Ct, a7 as dt, a4 as ve, u as w, df as _a, dg as Ma, bt as M, dh as za, a6 as oe, aP as Ra, bZ as Ua, di as $a, dj as ja, bn as ca, bN as be, ch as ua, bM as tt, o as qa, k as Wa, dk as Qa, ck as wt, cl as St, cm as kt, cn as Dt, co as At, cp as Ft, cq as Et, cr as ha, cu as It, dl as Ka, dm as Ha, c9 as pt, c6 as je, c7 as qe, dn as ma, c8 as We, bV as re, ci as Ga, cd as at, dp as Ya, bS as Xa, bw as Tt, by as ct, dq as pa, bs as Ja, dr as fa, be as ut, ds as Za, bf as en, i as tn, dt as an, b9 as nn, w as rn, t as sn, du as on, dv as ln, dw as ga, dx as dn, dy as cn, dz as Ce, dA as un, R as ba, dB as hn, dC as mn, aM as pn, dD as fn, dE as ge, dF as gn, W as Lt, dG as bn, dH as ft, dI as xn, dJ as $t, dK as vn, dL as yn, dM as Nn, dN as xa, cK as Cn, dO as wn, dP as Sn, dQ as Vt, cv as va, dR as kn, dS as jt, dT as Dn, dU as An, dV as Fn, dW as En, aT as In, bo as Tn, bY as ya, dX as Ln, dY as Vn, dZ as Xe, d_ as Pn, d$ as Bn, e0 as On, A as _n, aB as Mn, aC as zn, ah as Rn, ag as Un, af as $n, ae as jn, ab as qn, a9 as Wn, e1 as Qn, e2 as Kn, e3 as Hn, e4 as Gn, e5 as Yn, az as Xn } from "./semaphor-ready-indicator-B2NpYRE-.js";
4
- import { c as we, B as L, X as Qe, n as Re, s as xe, L as de, l as Pt, e as Bt, k as Jn, z as Ot, P as Ie, a5 as Na, d as Te, a as nt, S as Ca, b as Nt, t as Se, u as ke, v as De, w as Ae, x as fe, a6 as Zn } from "./code-editor-DJNOsgJH.js";
3
+ import { da as it, bu as Le, bv as Ve, bx as Pe, db as Ba, aU as $e, aR as ot, dc as Oa, dd as lt, de as Ct, a7 as dt, a4 as ve, u as w, df as _a, dg as Ma, bt as M, dh as Ra, a6 as oe, aP as za, bZ as Ua, di as $a, dj as ja, bn as ca, bN as be, ch as ua, bM as tt, o as qa, k as Wa, dk as Ka, ck as wt, cl as St, cm as kt, cn as Dt, co as At, cp as Ft, cq as Et, cr as ha, cu as It, dl as Qa, dm as Ha, c9 as pt, c6 as je, c7 as qe, dn as ma, c8 as We, bV as re, ci as Ga, cd as at, dp as Ya, bS as Xa, bw as Tt, by as ct, dq as pa, bs as Ja, dr as fa, be as ut, ds as Za, bf as en, i as tn, dt as an, b9 as nn, w as rn, t as sn, du as on, dv as ln, dw as ga, dx as dn, dy as cn, dz as Ce, dA as un, R as ba, dB as hn, dC as mn, aM as pn, dD as fn, dE as ge, dF as gn, W as Lt, dG as bn, dH as ft, dI as xn, dJ as $t, dK as vn, dL as yn, dM as Nn, dN as xa, cK as Cn, dO as wn, dP as Sn, dQ as Vt, cv as va, dR as kn, dS as jt, dT as Dn, dU as An, dV as Fn, dW as En, aT as In, bo as Tn, bY as ya, dX as Ln, dY as Vn, dZ as Xe, d_ as Pn, d$ as Bn, e0 as On, A as _n, aB as Mn, aC as Rn, ah as zn, ag as Un, af as $n, ae as jn, ab as qn, a9 as Wn, e1 as Kn, e2 as Qn, e3 as Hn, e4 as Gn, e5 as Yn, az as Xn } from "./semaphor-ready-indicator-CQd-PCCZ.js";
4
+ import { c as we, B as L, X as Ke, n as ze, s as xe, L as de, l as Pt, e as Bt, k as Jn, z as Ot, P as Ie, a5 as Na, d as Te, a as nt, S as Ca, b as Nt, t as Se, u as ke, v as De, w as Ae, x as fe, a6 as Zn } from "./code-editor-DJNOsgJH.js";
5
5
  import { L as Ue } from "./layout-grid-0hIlqEtk.js";
6
6
  import "./index-CuHybtft.js";
7
7
  import { o as er } from "./validators-wtjw0aw6.js";
@@ -11,18 +11,18 @@ import "zod";
11
11
  import "../value-format-preferences/index.js";
12
12
  import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
13
13
  import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
14
- import { bv as qt, b6 as Wt, ee as Qt, gB as tr, gC as rt, g4 as Kt, gD as ar, o as Ke, gE as nr, p as rr, g1 as sr, gF as ir, gG as or, cj as lr, gH as dr, l as cr, eZ as ur, gI as hr, gJ as mr, a as _t, aJ as pr, a2 as fr, bZ as gr, gK as br, gL as xr, c8 as vr, gM as yr, gN as Ht, gO as Nr } from "./resolve-dashboard-input-context-CwS-2r-b.js";
14
+ import { bv as qt, b6 as Wt, ee as Kt, gB as tr, gC as rt, g4 as Qt, gD as ar, o as Qe, gE as nr, p as rr, g1 as sr, gF as ir, gG as or, cj as lr, gH as dr, l as cr, eZ as ur, gI as hr, gJ as mr, a as _t, aJ as pr, a2 as fr, bZ as gr, gK as br, gL as xr, c8 as vr, gM as yr, gN as Ht, gO as Nr } from "./resolve-dashboard-input-context-DPKSF3qj.js";
15
15
  import { createPortal as Cr } from "react-dom";
16
16
  import { aK as Gt, ar as wr } from "./temporal-input-presentation--2r9BLr0.js";
17
- import { az as Sr, am as kr, A as Dr, a7 as st, Q as Ar } from "./bookmark-state-ByODVqee.js";
17
+ import { aA as Sr, an as kr, D as Dr, a8 as st, R as Ar } from "./bookmark-state-Du3s13_V.js";
18
18
  import "./index-RNaTnE3m.js";
19
19
  import "./context-R31TSL5V.js";
20
20
  import { S as wa } from "./save-D6pHmSSP.js";
21
- import { V as Fr, L as Er, a as Ir, u as Sa, C as ka, F as Tr, b as Lr, A as Vr, c as Pr } from "./card-filter-builder-SXaRWbKr.js";
22
- import { m as Br, k as Da, n as Aa } from "./report-preferences-dialog-CeHioJwL.js";
23
- import { v as Or, E as _r } from "./filter-reach-copy-D5LqgrUf.js";
24
- import { a as Yt, d as Xt, c as Mr, i as zr, b as Rr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-DFizFCJu.js";
25
- import { g as pe, d as jr, a as qr } from "./index-Bq9UbCGk.js";
21
+ import { V as Fr, L as Er, a as Ir, u as Sa, C as ka, F as Tr, b as Lr, A as Vr, c as Pr } from "./card-filter-builder-DbSmzvem.js";
22
+ import { m as Br, k as Da, n as Aa } from "./report-preferences-dialog-CbgmdWeZ.js";
23
+ import { v as Or, E as _r } from "./filter-reach-copy-P-kDwUpY.js";
24
+ import { a as Yt, d as Xt, c as Mr, i as Rr, b as zr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-BDxlD0dM.js";
25
+ import { g as pe, d as jr, a as qr } from "./index-BcXw0CpM.js";
26
26
  /**
27
27
  * @license lucide-react v0.453.0 - ISC
28
28
  *
@@ -49,7 +49,7 @@ const ea = we("Bell", [
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
51
  */
52
- const Qr = we("CalendarRange", [
52
+ const Kr = we("CalendarRange", [
53
53
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
54
54
  ["path", { d: "M16 2v4", key: "4m81vk" }],
55
55
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -65,7 +65,7 @@ const Qr = we("CalendarRange", [
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
67
  */
68
- const Kr = we("CodeXml", [
68
+ const Qr = we("CodeXml", [
69
69
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
70
70
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
71
71
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
@@ -180,14 +180,14 @@ function Jr({
180
180
  onClick: () => h(!1),
181
181
  "aria-label": "Close",
182
182
  disabled: n,
183
- children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" })
183
+ children: /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5" })
184
184
  }
185
185
  )
186
186
  ] }),
187
187
  /* @__PURE__ */ s("div", { className: "space-y-3 px-4 py-3", children: [
188
188
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Create a saved visual that can be reused across dashboards." }),
189
189
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
190
- /* @__PURE__ */ t(Re, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
190
+ /* @__PURE__ */ t(ze, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
191
191
  /* @__PURE__ */ t(
192
192
  xe,
193
193
  {
@@ -204,7 +204,7 @@ function Jr({
204
204
  )
205
205
  ] }),
206
206
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
207
- /* @__PURE__ */ t(Re, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
207
+ /* @__PURE__ */ t(ze, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
208
208
  /* @__PURE__ */ t(
209
209
  xe,
210
210
  {
@@ -358,7 +358,7 @@ function ts(e, a) {
358
358
  const i = (l = n.cards) == null ? void 0 : l.find(
359
359
  (u) => u.id === n.activeCardId
360
360
  );
361
- return i ? (za({
361
+ return i ? (Ra({
362
362
  ...a,
363
363
  frame: n,
364
364
  card: i,
@@ -374,7 +374,7 @@ function as() {
374
374
  ), a = Zr(e);
375
375
  return { getUpdatedFrame: ie(() => {
376
376
  var N;
377
- Ra();
377
+ za();
378
378
  const {
379
379
  frame: n,
380
380
  card: i,
@@ -393,9 +393,9 @@ function as() {
393
393
  remoteChartSettings: p,
394
394
  stripConfig: Wt
395
395
  }), f = n.cards.map((k) => {
396
- if (k.id === i.id) return Qt({ before: i, after: m });
396
+ if (k.id === i.id) return Kt({ before: i, after: m });
397
397
  const V = tr(k) ? qt(k, { isDevMode: !0, cardSql: k.sql, stripConfig: Wt }) : k;
398
- return Qt({ before: k, after: V });
398
+ return Kt({ before: k, after: V });
399
399
  }), g = f.flatMap((k) => k.dropped);
400
400
  g.length && M.info("Some conditional formatting rules were removed", {
401
401
  description: `Their column isn't in the saved visual: ${g.map((k) => k.name || "an unnamed rule").join(", ")}.`
@@ -433,7 +433,7 @@ function Be() {
433
433
  (O) => O.inlineFilterValuesMap
434
434
  ), B = _a((i == null ? void 0 : i.id) || "", {
435
435
  enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
436
- }), Q = ie(
436
+ }), K = ie(
437
437
  async (O) => {
438
438
  try {
439
439
  o(O), S(), D();
@@ -519,12 +519,12 @@ function Be() {
519
519
  const j = Fa(ae);
520
520
  if (!(j != null && j.cards) || j.cards.length === 0)
521
521
  return te("Visual frame is malformed");
522
- const z = {
522
+ const R = {
523
523
  ...Ma(j),
524
524
  visualId: O.id
525
525
  // Link this frame to the library visual
526
526
  };
527
- return await n(v, z), _(!0), { success: !0, fromCache: I };
527
+ return await n(v, R), _(!0), { success: !0, fromCache: I };
528
528
  } catch (G) {
529
529
  return console.error("Error adding visual:", G), te(
530
530
  G instanceof Error ? G.message : "Failed to add visual to dashboard"
@@ -546,7 +546,7 @@ function Be() {
546
546
  isLoading: B.isLoading,
547
547
  isError: B.isError,
548
548
  error: B.error,
549
- handleEditLibraryVisual: Q,
549
+ handleEditLibraryVisual: K,
550
550
  handleAddLibraryVisual: X,
551
551
  getUpdatedFrame: as().getUpdatedFrame,
552
552
  refetch: B.refetch
@@ -573,7 +573,7 @@ function ns(e, a) {
573
573
  }
574
574
  function rs(e) {
575
575
  const a = (e || "").toLowerCase();
576
- return a.includes("table") ? Pt : a.includes("pie") || a.includes("donut") ? Ka : a.includes("line") ? Ha : a.includes("bar") ? Jn : Ue;
576
+ return a.includes("table") ? Pt : a.includes("pie") || a.includes("donut") ? Qa : a.includes("line") ? Ha : a.includes("bar") ? Jn : Ue;
577
577
  }
578
578
  function ss({ visual: e }) {
579
579
  const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
@@ -596,7 +596,7 @@ function Wi({
596
596
  isLoading: E,
597
597
  isError: H,
598
598
  createResource: B,
599
- updateResource: Q,
599
+ updateResource: K,
600
600
  deleteResourceAsync: X,
601
601
  duplicateResource: O,
602
602
  isCreating: te,
@@ -610,7 +610,7 @@ function Wi({
610
610
  startUpdating: G,
611
611
  stopUpdating: I,
612
612
  isUpdating: ae
613
- } = ja(), j = T, z = Y(() => {
613
+ } = ja(), j = T, R = Y(() => {
614
614
  const C = n.trim().toLowerCase();
615
615
  return C ? j.filter(
616
616
  (q) => {
@@ -627,23 +627,23 @@ function Wi({
627
627
  (C) => C.permissions.canDelete
628
628
  ), he = ne.filter(
629
629
  (C) => C.permissions.canShare
630
- ), ye = z.length > 0 && z.every(
630
+ ), ye = R.length > 0 && R.every(
631
631
  (C) => o.has(C.id)
632
- ), x = z.some(
632
+ ), x = R.some(
633
633
  (C) => o.has(C.id)
634
- ), R = (C) => {
634
+ ), z = (C) => {
635
635
  const q = new Set(o);
636
636
  C(q), l(q);
637
637
  }, $ = (C) => {
638
- R((q) => {
638
+ z((q) => {
639
639
  q.has(C) ? q.delete(C) : q.add(C);
640
640
  });
641
- }, K = () => {
641
+ }, Q = () => {
642
642
  l((C) => {
643
643
  const q = new Set(C);
644
- return ye ? z.forEach(
644
+ return ye ? R.forEach(
645
645
  (ee) => q.delete(ee.id)
646
- ) : z.forEach(
646
+ ) : R.forEach(
647
647
  (ee) => q.add(ee.id)
648
648
  ), q;
649
649
  });
@@ -706,7 +706,7 @@ function Wi({
706
706
  return;
707
707
  }
708
708
  const me = Object.keys(ee), Ne = me.length === 1 ? me[0] : void 0;
709
- G(p.id, Ne), Q(
709
+ G(p.id, Ne), K(
710
710
  {
711
711
  resourceId: p.id,
712
712
  data: ee
@@ -722,7 +722,7 @@ function Wi({
722
722
  );
723
723
  }, ce = (C) => {
724
724
  a(C), C || P();
725
- }, ze = y ? 1 : ue.length;
725
+ }, Re = y ? 1 : ue.length;
726
726
  return /* @__PURE__ */ s(U, { children: [
727
727
  /* @__PURE__ */ t(Le, { open: e, onOpenChange: ce, children: /* @__PURE__ */ s(
728
728
  Ve,
@@ -780,18 +780,18 @@ function Wi({
780
780
  }
781
781
  )
782
782
  ] }),
783
- /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: E ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : H ? /* @__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" }) }) : z.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
783
+ /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: E ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : H ? /* @__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: [
784
784
  /* @__PURE__ */ t(Ue, { className: "h-5 w-5 text-muted-foreground/60" }),
785
785
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
786
786
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
787
787
  ] }) : /* @__PURE__ */ t(
788
788
  is,
789
789
  {
790
- visuals: z,
790
+ visuals: R,
791
791
  selectedIds: o,
792
792
  allFilteredSelected: ye,
793
793
  someFilteredSelected: x,
794
- onSelectAll: K,
794
+ onSelectAll: Q,
795
795
  onToggleSelection: $,
796
796
  onAddVisual: le,
797
797
  onOpenVisual: ht,
@@ -896,7 +896,7 @@ function Wi({
896
896
  }
897
897
  ),
898
898
  p && /* @__PURE__ */ t(
899
- Qa,
899
+ Ka,
900
900
  {
901
901
  open: !!p,
902
902
  resourceLabel: "Visual",
@@ -918,9 +918,9 @@ function Wi({
918
918
  /* @__PURE__ */ s(kt, { children: [
919
919
  /* @__PURE__ */ s(Dt, { children: [
920
920
  "Delete ",
921
- ze,
921
+ Re,
922
922
  " visual",
923
- ze === 1 ? "" : "s",
923
+ Re === 1 ? "" : "s",
924
924
  "?"
925
925
  ] }),
926
926
  /* @__PURE__ */ t(At, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
@@ -933,7 +933,7 @@ function Wi({
933
933
  onClick: (C) => {
934
934
  C.preventDefault(), mt();
935
935
  },
936
- disabled: Z || ze === 0,
936
+ disabled: Z || Re === 0,
937
937
  children: [
938
938
  Z ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
939
939
  Z ? "Deleting..." : "Delete"
@@ -1191,7 +1191,7 @@ function ls({
1191
1191
  }
1192
1192
  );
1193
1193
  }
1194
- function Qi(e, a, r = !1) {
1194
+ function Ki(e, a, r = !1) {
1195
1195
  const n = w((d) => d.dashboard), i = w(
1196
1196
  (d) => d.isDashboardEditing
1197
1197
  ), o = w(
@@ -1290,7 +1290,7 @@ function ds({
1290
1290
  ] }),
1291
1291
  /* @__PURE__ */ s("div", { className: "grid gap-4 py-4", children: [
1292
1292
  /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
1293
- /* @__PURE__ */ t(Re, { htmlFor: "name", children: "Name" }),
1293
+ /* @__PURE__ */ t(ze, { htmlFor: "name", children: "Name" }),
1294
1294
  /* @__PURE__ */ t(
1295
1295
  xe,
1296
1296
  {
@@ -1303,7 +1303,7 @@ function ds({
1303
1303
  )
1304
1304
  ] }),
1305
1305
  /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
1306
- /* @__PURE__ */ t(Re, { htmlFor: "description", children: "Description (optional)" }),
1306
+ /* @__PURE__ */ t(ze, { htmlFor: "description", children: "Description (optional)" }),
1307
1307
  /* @__PURE__ */ t(
1308
1308
  pa,
1309
1309
  {
@@ -1334,7 +1334,7 @@ function ds({
1334
1334
  ] })
1335
1335
  ] }) });
1336
1336
  }
1337
- function zt(e) {
1337
+ function Rt(e) {
1338
1338
  var a;
1339
1339
  for (const r of e.cards)
1340
1340
  if (r.type === "matrixTable" && !er.safeParse((a = r.config) == null ? void 0 : a.matrix).success)
@@ -1348,7 +1348,7 @@ function gt({
1348
1348
  const r = oe((o) => o.onSave), { getUpdatedFrame: n } = Be();
1349
1349
  function i() {
1350
1350
  const o = n();
1351
- zt(o) && (r == null || r(o));
1351
+ Rt(o) && (r == null || r(o));
1352
1352
  }
1353
1353
  return /* @__PURE__ */ s(
1354
1354
  L,
@@ -1374,7 +1374,7 @@ function cs({
1374
1374
  {
1375
1375
  onClick: () => {
1376
1376
  const p = l();
1377
- if (!zt(p))
1377
+ if (!Rt(p))
1378
1378
  return;
1379
1379
  const m = (c == null ? void 0 : c.visualId) || (u == null ? void 0 : u.id);
1380
1380
  if (!m) {
@@ -1434,7 +1434,7 @@ function us({
1434
1434
  n(!0);
1435
1435
  try {
1436
1436
  const y = h();
1437
- if (!zt(y)) {
1437
+ if (!Rt(y)) {
1438
1438
  n(!1);
1439
1439
  return;
1440
1440
  }
@@ -1494,7 +1494,7 @@ function bt({ className: e }) {
1494
1494
  size: "xs",
1495
1495
  variant: "outline",
1496
1496
  children: [
1497
- /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" }),
1497
+ /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5" }),
1498
1498
  "Close"
1499
1499
  ]
1500
1500
  }
@@ -1509,7 +1509,7 @@ function hs() {
1509
1509
  try {
1510
1510
  const S = {
1511
1511
  ...i,
1512
- id: Kt(),
1512
+ id: Qt(),
1513
1513
  visualId: b.id
1514
1514
  // Link to the newly created library visual
1515
1515
  };
@@ -1571,7 +1571,7 @@ function hs() {
1571
1571
  const E = {
1572
1572
  ...T,
1573
1573
  // Card title already synced
1574
- id: Kt(),
1574
+ id: Qt(),
1575
1575
  visualId: void 0
1576
1576
  // Explicitly no visualId for local visuals
1577
1577
  };
@@ -1594,7 +1594,7 @@ function hs() {
1594
1594
  isSaving: D.isPending
1595
1595
  };
1596
1596
  }
1597
- function Ki(e = {}) {
1597
+ function Qi(e = {}) {
1598
1598
  const { isInspectionMode: a } = en(), r = oe((B) => B.frame), n = oe((B) => B.editorContext), i = tn((B) => B.selectedVisual), o = w((B) => B.selectedFrameId), l = w((B) => B.selectedSheetId), u = w((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = ve(), [h, p] = A(!1), [m, f] = A("both"), g = ut(), y = (n == null ? void 0 : n.type) === "documentSection", N = !!(r != null && r.visualId || i != null && i.id), k = !!(r != null && r.visualId && o), V = N && !k, {
1599
1599
  saveAsDialogOpen: P,
1600
1600
  setSaveAsDialogOpen: D,
@@ -1626,15 +1626,15 @@ function Ki(e = {}) {
1626
1626
  }
1627
1627
  if (h) return;
1628
1628
  p(!0);
1629
- const Q = {
1629
+ const K = {
1630
1630
  ...T(),
1631
1631
  visualId: void 0
1632
- }, X = rt(u, Q.id);
1632
+ }, X = rt(u, K.id);
1633
1633
  try {
1634
- const O = await g(Q, {
1634
+ const O = await g(K, {
1635
1635
  previousFrame: X
1636
1636
  });
1637
- d(l, Q, {
1637
+ d(l, K, {
1638
1638
  semanticExecutionPayload: O
1639
1639
  });
1640
1640
  } catch (O) {
@@ -1745,7 +1745,7 @@ function Hi({ className: e }) {
1745
1745
  const a = oe((h) => h.isDevMode), r = oe((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = dt(), { config: o } = da(an).tokenProps, l = (o == null ? void 0 : o.showAdvancedMode) !== !1;
1746
1746
  if (!n || !l || !ar(r))
1747
1747
  return null;
1748
- const u = a ? Hr : Kr, c = a ? "Visual editor" : "SQL editor", d = a ? "Switch to visual editor" : "Switch to SQL editor";
1748
+ const u = a ? Hr : Qr, c = a ? "Visual editor" : "SQL editor", d = a ? "Switch to visual editor" : "Switch to SQL editor";
1749
1749
  return /* @__PURE__ */ s(
1750
1750
  "button",
1751
1751
  {
@@ -1770,7 +1770,7 @@ function Gi() {
1770
1770
  const d = ((h = c.dashboard) == null ? void 0 : h.sheets) ?? [];
1771
1771
  return d.find((p) => p.id === c.selectedSheetId) ?? d[0];
1772
1772
  }), i = w((c) => c.actions.arrangeSheet), o = w((c) => c.actions.undoArrange);
1773
- if (!a || r || !n || Ke(n)) return null;
1773
+ if (!a || r || !n || Qe(n)) return null;
1774
1774
  const l = !(n.frames ?? []).length, u = (c) => {
1775
1775
  const d = i(n.id, { keepOrder: c });
1776
1776
  if (!d.ok) {
@@ -1830,7 +1830,7 @@ function Yi() {
1830
1830
  const e = w((i) => i.screenSizesOpen), a = w((i) => {
1831
1831
  var u, c;
1832
1832
  const o = ((u = i.dashboard) == null ? void 0 : u.sheets) ?? [], l = o.find((d) => d.id === i.selectedSheetId) ?? o[0];
1833
- return !!l && !Ke(l) && !!((c = l.frames) != null && c.length);
1833
+ return !!l && !Qe(l) && !!((c = l.frames) != null && c.length);
1834
1834
  }), r = w((i) => i.actions.setScreenSizesOpen), n = Da(
1835
1835
  "screen-sizes",
1836
1836
  "lg",
@@ -2669,7 +2669,7 @@ function ks() {
2669
2669
  title: `Applies to ${o.eligibleCardCount} of ${o.totalCardCount} date-aware cards`,
2670
2670
  className: "flex w-full items-start gap-2 rounded-control px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
2671
2671
  children: [
2672
- /* @__PURE__ */ t(Qr, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
2672
+ /* @__PURE__ */ t(Kr, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
2673
2673
  /* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
2674
2674
  /* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
2675
2675
  /* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
@@ -2769,7 +2769,7 @@ function As({
2769
2769
  return /* @__PURE__ */ s("div", { className: "flex items-center gap-2 rounded-control px-1 py-1 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
2770
2770
  /* @__PURE__ */ t(It, { id: e, checked: r, onCheckedChange: n }),
2771
2771
  /* @__PURE__ */ t(
2772
- Re,
2772
+ ze,
2773
2773
  {
2774
2774
  htmlFor: e,
2775
2775
  className: "cursor-pointer text-[12px] font-normal leading-[1.3]",
@@ -2789,7 +2789,7 @@ function ro({
2789
2789
  var _;
2790
2790
  const [l, u] = A(null), c = w((b) => b.dashboard), d = w((b) => b.selectedSheetId), h = w((b) => b.showFilters), p = w((b) => b.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (_ = c.sheets) == null ? void 0 : _.find(
2791
2791
  (b) => b.id === d
2792
- ), y = Ke(g), N = ie((b) => {
2792
+ ), y = Qe(g), N = ie((b) => {
2793
2793
  window.setTimeout(() => {
2794
2794
  u(b);
2795
2795
  }, 0);
@@ -2998,7 +2998,7 @@ function Ts(e, a) {
2998
2998
  const r = cr(e);
2999
2999
  return new Set(
3000
3000
  (e.sheets ?? []).map((i) => {
3001
- const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
3001
+ const o = { sheetId: i.id, cardId: a, sheetKind: Qe(i) ? "document" : "dashboard" };
3002
3002
  return r.filter((l) => Dr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
3003
3003
  `);
3004
3004
  })
@@ -3096,7 +3096,7 @@ function Os(e) {
3096
3096
  function _s(e) {
3097
3097
  return e.mode === "period" ? pr(e.spec) : void 0;
3098
3098
  }
3099
- const Rt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ms = {
3099
+ const zt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ms = {
3100
3100
  connectionId: "",
3101
3101
  connectionType: "",
3102
3102
  mode: "semanticDomain",
@@ -3111,7 +3111,7 @@ function se({
3111
3111
  }) {
3112
3112
  return /* @__PURE__ */ s("div", { className: i, children: [
3113
3113
  /* @__PURE__ */ s("div", { className: "mb-1 flex min-h-5 items-center justify-between gap-2", children: [
3114
- /* @__PURE__ */ t("p", { className: Rt, children: e }),
3114
+ /* @__PURE__ */ t("p", { className: zt, children: e }),
3115
3115
  r
3116
3116
  ] }),
3117
3117
  n,
@@ -3138,13 +3138,13 @@ function yt({
3138
3138
  }
3139
3139
  );
3140
3140
  }
3141
- function zs(e) {
3141
+ function Rs(e) {
3142
3142
  var r;
3143
3143
  const a = (r = e == null ? void 0 : e.selectedEntities) == null ? void 0 : r[0];
3144
3144
  if (a)
3145
3145
  return a.label || a.name;
3146
3146
  }
3147
- function Rs(e) {
3147
+ function zs(e) {
3148
3148
  const a = _t(e);
3149
3149
  return a === "date" ? "date" : a === "string" ? "text" : a === "number" ? "number" : a === "boolean" ? "yes/no" : a;
3150
3150
  }
@@ -3155,28 +3155,28 @@ function Us({
3155
3155
  handle: r,
3156
3156
  onCalculatedFieldOpenChange: n
3157
3157
  }) {
3158
- var O, te, Z, G, I, ae, j, z, ne, ue, he, ye;
3158
+ var O, te, Z, G, I, ae, j, R, ne, ue, he, ye;
3159
3159
  const { tokenProps: i } = $e(), o = ((O = i.config) == null ? void 0 : O.showAdvancedMode) !== !1, l = ((te = i.config) == null ? void 0 : te.showDirectSource) !== !1, { connections: u } = va(), [c, d] = A(!1), [h, p] = A(!1), [m, f] = A(!1), g = (x) => {
3160
3160
  p(x), n == null || n(x);
3161
- }, { fields: y, isLoading: N, error: k } = Bs(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((R) => R.id === x.id) ?? V.find((R) => $s(R, x))), D = [
3161
+ }, { fields: y, isLoading: N, error: k } = Bs(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((z) => z.id === x.id) ?? V.find((z) => $s(z, x))), D = [
3162
3162
  ...V,
3163
3163
  ...[e.field, e.sortField].filter(
3164
- (x) => !!x && !P(x) && !V.some((R) => R.id === x.id)
3164
+ (x) => !!x && !P(x) && !V.some((z) => z.id === x.id)
3165
3165
  )
3166
- ], _ = ((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 = zs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Pt : jt, E = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", H = {
3167
- connectionId: ((z = e.dataSource) == null ? void 0 : z.connectionId) || e.connectionId,
3166
+ ], _ = ((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, E = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", H = {
3167
+ connectionId: ((R = e.dataSource) == null ? void 0 : R.connectionId) || e.connectionId,
3168
3168
  dataSource: e.dataSource,
3169
3169
  config: e.conditions ? { filters: e.conditions } : {},
3170
3170
  cardType: "text"
3171
- }, B = Yt(e.field), Q = (ne = B.find((x) => x.value === e.get)) == null ? void 0 : ne.hint, X = (x) => {
3171
+ }, B = Yt(e.field), K = (ne = B.find((x) => x.value === e.get)) == null ? void 0 : ne.hint, X = (x) => {
3172
3172
  if (x === oa) {
3173
3173
  g(!0);
3174
3174
  return;
3175
3175
  }
3176
- const R = D.find((K) => K.id === x);
3177
- if (!R) return;
3178
- const $ = Yt(R).some((K) => K.value === e.get) && e.field !== void 0;
3179
- S({ field: R, get: $ ? e.get : Xt(R) });
3176
+ const z = D.find((Q) => Q.id === x);
3177
+ if (!z) return;
3178
+ const $ = Yt(z).some((Q) => Q.value === e.get) && e.field !== void 0;
3179
+ S({ field: z, get: $ ? e.get : Xt(z) });
3180
3180
  };
3181
3181
  return h ? /* @__PURE__ */ t(
3182
3182
  Dn,
@@ -3188,11 +3188,11 @@ function Us({
3188
3188
  cardId: e.id,
3189
3189
  source: H,
3190
3190
  onSave: (x) => {
3191
- const R = { ...x, fieldScope: x.fieldScope ?? "card" };
3191
+ const z = { ...x, fieldScope: x.fieldScope ?? "card" };
3192
3192
  S({
3193
- calculatedFields: [...(e.calculatedFields ?? []).filter(($) => $.id !== R.id), R],
3194
- field: R,
3195
- get: Xt(R)
3193
+ calculatedFields: [...(e.calculatedFields ?? []).filter(($) => $.id !== z.id), z],
3194
+ field: z,
3195
+ get: Xt(z)
3196
3196
  }), g(!1);
3197
3197
  }
3198
3198
  }
@@ -3289,9 +3289,9 @@ function Us({
3289
3289
  incomingSelectedEntities: ((he = e.dataSource) == null ? void 0 : he.selectedEntities) ?? [],
3290
3290
  onDataSourceChange: (x) => {
3291
3291
  var $;
3292
- const R = JSON.stringify(x.selectedEntities) === JSON.stringify(($ = e.dataSource) == null ? void 0 : $.selectedEntities);
3292
+ const z = JSON.stringify(x.selectedEntities) === JSON.stringify(($ = e.dataSource) == null ? void 0 : $.selectedEntities);
3293
3293
  S(
3294
- R ? { dataSource: x } : { dataSource: x, field: void 0, sortField: void 0, conditions: null, calculatedFields: void 0 }
3294
+ z ? { dataSource: x } : { dataSource: x, field: void 0, sortField: void 0, conditions: null, calculatedFields: void 0 }
3295
3295
  );
3296
3296
  }
3297
3297
  }
@@ -3302,7 +3302,7 @@ function Us({
3302
3302
  /* @__PURE__ */ s(Ae, { children: [
3303
3303
  D.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: /* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
3304
3304
  /* @__PURE__ */ t("span", { children: x.label || x.name }),
3305
- /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Rs(x.dataType) })
3305
+ /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: zs(x.dataType) })
3306
3306
  ] }) }, x.id)),
3307
3307
  /* @__PURE__ */ t(Zn, {}),
3308
3308
  /* @__PURE__ */ t(fe, { value: oa, children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
@@ -3323,7 +3323,7 @@ function Us({
3323
3323
  ]
3324
3324
  }
3325
3325
  ) }),
3326
- e.field && Q ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-muted-foreground", children: Q }) : null,
3326
+ e.field && K ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-muted-foreground", children: K }) : null,
3327
3327
  k ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-destructive", children: k }) : null,
3328
3328
  Mr(e) ? /* @__PURE__ */ t(
3329
3329
  se,
@@ -3340,23 +3340,23 @@ function Us({
3340
3340
  )
3341
3341
  }
3342
3342
  ) : null,
3343
- e.field && !zr(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: [
3343
+ e.field && !Rr(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: [
3344
3344
  /* @__PURE__ */ t(se, { label: "Order by", children: /* @__PURE__ */ s(
3345
3345
  Se,
3346
3346
  {
3347
3347
  value: `${b}|${e.sortDirection}`,
3348
3348
  onValueChange: (x) => {
3349
- const R = x.lastIndexOf("|"), $ = x.slice(0, R), K = x.slice(R + 1);
3350
- S({ sortField: D.find((le) => le.id === $), sortDirection: K });
3349
+ const z = x.lastIndexOf("|"), $ = x.slice(0, z), Q = x.slice(z + 1);
3350
+ S({ sortField: D.find((le) => le.id === $), sortDirection: Q });
3351
3351
  },
3352
3352
  children: [
3353
3353
  /* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Order by", children: /* @__PURE__ */ t(De, {}) }),
3354
3354
  /* @__PURE__ */ t(Ae, { children: D.flatMap(
3355
- (x) => ["asc", "desc"].map((R) => /* @__PURE__ */ s(fe, { value: `${x.id}|${R}`, children: [
3355
+ (x) => ["asc", "desc"].map((z) => /* @__PURE__ */ s(fe, { value: `${x.id}|${z}`, children: [
3356
3356
  x.label || x.name,
3357
3357
  ", ",
3358
- js(x, R)
3359
- ] }, `${x.id}|${R}`))
3358
+ js(x, z)
3359
+ ] }, `${x.id}|${z}`))
3360
3360
  ) })
3361
3361
  ]
3362
3362
  }
@@ -3372,8 +3372,8 @@ function Us({
3372
3372
  value: e.listLimit ?? "",
3373
3373
  placeholder: "10",
3374
3374
  onChange: (x) => {
3375
- const R = Number.parseInt(x.target.value, 10);
3376
- S({ listLimit: Number.isFinite(R) && R > 0 ? Math.min(R, st) : void 0 });
3375
+ const z = Number.parseInt(x.target.value, 10);
3376
+ S({ listLimit: Number.isFinite(z) && z > 0 ? Math.min(z, st) : void 0 });
3377
3377
  },
3378
3378
  "aria-label": "Show up to"
3379
3379
  }
@@ -3458,21 +3458,21 @@ const Ws = [
3458
3458
  { id: "filters", label: "Dashboard filters" },
3459
3459
  { id: "display", label: "Display" }
3460
3460
  ];
3461
- function Qs(e) {
3461
+ function Ks(e) {
3462
3462
  const { name: a, label: r, presentation: n, emptyText: i, ...o } = e;
3463
3463
  return JSON.stringify(o);
3464
3464
  }
3465
- function Ks({
3465
+ function Qs({
3466
3466
  variable: e,
3467
3467
  onClose: a,
3468
3468
  onHoldEscape: r
3469
3469
  }) {
3470
3470
  var Z, G;
3471
3471
  const n = w((I) => I.dashboard), i = w((I) => I.selectedSheetId), o = w((I) => I.actions.saveVariableChange), [l, u] = A(
3472
- () => e ? Rr(e) : Ur()
3472
+ () => e ? zr(e) : Ur()
3473
3473
  ), [c, d] = A("data"), [h, p] = A(!1), m = (I) => {
3474
3474
  p(I), r == null || r(I);
3475
- }, [f, g] = A([]), [y, N] = A(null), k = !e, V = Qs(l), P = Y(
3475
+ }, [f, g] = A([]), [y, N] = A(null), k = !e, V = Ks(l), P = Y(
3476
3476
  () => Jt({ ...JSON.parse(V), name: "" }, n),
3477
3477
  [V, n]
3478
3478
  ), { name: D, label: _, presentation: b, emptyText: S } = l, v = Y(
@@ -3491,23 +3491,23 @@ function Ks({
3491
3491
  variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
3492
3492
  }),
3493
3493
  [n, v]
3494
- ), E = $r(l), H = ut(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = A(!1), O = async () => {
3494
+ ), E = $r(l), H = ut(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [K, X] = A(!1), O = async () => {
3495
3495
  const I = Jt(l, n);
3496
3496
  X(!0);
3497
3497
  let ae;
3498
3498
  try {
3499
- const z = vr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
3500
- if (!z.ok) {
3501
- X(!1), g(z.issues);
3499
+ const R = vr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
3500
+ if (!R.ok) {
3501
+ X(!1), g(R.issues);
3502
3502
  return;
3503
3503
  }
3504
- const [ne] = z.queryFrames;
3504
+ const [ne] = R.queryFrames;
3505
3505
  ae = ne ? await H(ne, e ? { previousFrame: yr(n, e) } : void 0) : { domainsById: {} };
3506
- } catch (z) {
3506
+ } catch (R) {
3507
3507
  X(!1), g([
3508
3508
  {
3509
3509
  code: "queryMissing",
3510
- message: z instanceof Error && z.message ? z.message : "The data source's details could not be loaded.",
3510
+ message: R instanceof Error && R.message ? R.message : "The data source's details could not be loaded.",
3511
3511
  fix: "Try again, or choose the source again."
3512
3512
  }
3513
3513
  ]);
@@ -3525,7 +3525,7 @@ function Ks({
3525
3525
  if (!e) return;
3526
3526
  const ae = o({ kind: "remove", id: e.id, confirmed: I });
3527
3527
  if (!ae.ok) {
3528
- const j = ae.issues.find((z) => z.code === "inUse");
3528
+ const j = ae.issues.find((R) => R.code === "inUse");
3529
3529
  if (j && !I) {
3530
3530
  N(j);
3531
3531
  return;
@@ -3547,7 +3547,7 @@ function Ks({
3547
3547
  /* @__PURE__ */ s("div", { className: "min-w-0", children: [
3548
3548
  /* @__PURE__ */ s("p", { className: "flex items-center gap-2", children: [
3549
3549
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: k ? "New variable" : e.label || e.name }),
3550
- /* @__PURE__ */ t("span", { className: Rt, children: "Variable from data" })
3550
+ /* @__PURE__ */ t("span", { className: zt, children: "Variable from data" })
3551
3551
  ] }),
3552
3552
  /* @__PURE__ */ t("p", { className: "mt-0.5 truncate text-[10px] leading-3 text-muted-foreground/70", children: "Available on every tab and Document of this dashboard" })
3553
3553
  ] })
@@ -3559,7 +3559,7 @@ function Ks({
3559
3559
  onClick: a,
3560
3560
  "aria-label": "Close",
3561
3561
  className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-control text-muted-foreground hover:bg-muted hover:text-foreground",
3562
- children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
3562
+ children: /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
3563
3563
  }
3564
3564
  )
3565
3565
  ] }),
@@ -3636,7 +3636,7 @@ function Ks({
3636
3636
  ),
3637
3637
  /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
3638
3638
  /* @__PURE__ */ t(L, { variant: "outline", size: "xs", onClick: a, children: "Cancel" }),
3639
- /* @__PURE__ */ t(L, { size: "xs", disabled: !!E || Q, title: E, onClick: () => void O(), children: k ? "Create" : "Done" })
3639
+ /* @__PURE__ */ t(L, { size: "xs", disabled: !!E || K, title: E, onClick: () => void O(), children: k ? "Create" : "Done" })
3640
3640
  ] })
3641
3641
  ] })
3642
3642
  ] })
@@ -3755,7 +3755,7 @@ function Zs({
3755
3755
  selectedSheetId: i
3756
3756
  }) {
3757
3757
  var S;
3758
- const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [u, c] = A(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h && Ke(h)), f = Y(
3758
+ const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [u, c] = A(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h && Qe(h)), f = Y(
3759
3759
  () => d ? m ? p ? { kind: "document", sheetId: d, runtime: p } : void 0 : { kind: "sheet", sheetId: d } : void 0,
3760
3760
  [m, p, d]
3761
3761
  ), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = En({
@@ -3791,7 +3791,7 @@ function Zs({
3791
3791
  }
3792
3792
  return /* @__PURE__ */ s("div", { className: "shrink-0 border-t border-border/60 bg-muted/30 px-4 py-2.5", "data-testid": "variable-preview", children: [
3793
3793
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
3794
- /* @__PURE__ */ t("span", { className: Rt, children: l ? "Preview on" : "Preview" }),
3794
+ /* @__PURE__ */ t("span", { className: zt, children: l ? "Preview on" : "Preview" }),
3795
3795
  l ? /* @__PURE__ */ s(Se, { value: d ?? "", onValueChange: c, disabled: !!n, children: [
3796
3796
  /* @__PURE__ */ t(ke, { size: "xs", className: "h-6 w-auto gap-1.5 px-2 text-[12px]", "aria-label": "Preview place", children: /* @__PURE__ */ t(De, {}) }),
3797
3797
  /* @__PURE__ */ t(Ae, { children: o.map((v) => /* @__PURE__ */ t(fe, { value: v.id, children: v.title || v.id }, v.id)) })
@@ -3863,7 +3863,7 @@ function oo() {
3863
3863
  /* @__PURE__ */ t(Pe, { className: "sr-only", children: "Variable from data" }),
3864
3864
  /* @__PURE__ */ t(ct, { className: "sr-only", children: "Define a value from your data to show in text." }),
3865
3865
  /* @__PURE__ */ t(
3866
- Ks,
3866
+ Qs,
3867
3867
  {
3868
3868
  variable: i,
3869
3869
  onClose: r,
@@ -4012,7 +4012,7 @@ function di({
4012
4012
  onClick: l,
4013
4013
  className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
4014
4014
  "aria-label": `Close ${v.replace("&", "and")} panel`,
4015
- children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" })
4015
+ children: /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5" })
4016
4016
  }
4017
4017
  )
4018
4018
  ] }),
@@ -4516,7 +4516,7 @@ const bi = {
4516
4516
  pauseBriefing: jn,
4517
4517
  resumeBriefing: $n,
4518
4518
  deleteBriefing: Un,
4519
- runBriefingNow: Rn
4519
+ runBriefingNow: zn
4520
4520
  };
4521
4521
  function lo(e) {
4522
4522
  return /* @__PURE__ */ t(_n, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(Mn, { children: /* @__PURE__ */ t(xi, { ...e }) }) });
@@ -4536,7 +4536,7 @@ function xi({
4536
4536
  openRun: p,
4537
4537
  client: m
4538
4538
  }) {
4539
- const { authToken: f, tokenProps: g } = $e(), y = zn(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = A(!1), P = u ?? k, D = (F) => {
4539
+ const { authToken: f, tokenProps: g } = $e(), y = Rn(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = A(!1), P = u ?? k, D = (F) => {
4540
4540
  u === void 0 && V(F), c == null || c(F);
4541
4541
  }, [_, b] = A(
4542
4542
  h ? "author" : "list"
@@ -4544,25 +4544,25 @@ function xi({
4544
4544
  h ?? "analytical_briefing"
4545
4545
  ), [T, E] = A("dashboard"), [H, B] = A(
4546
4546
  []
4547
- ), [Q, X] = A(null), O = h && !N && !Q ? "list" : _, [te, Z] = A(!1), [G, I] = A(null), [ae, j] = A(null), [z, ne] = A(
4547
+ ), [K, X] = A(null), O = h && !N && !K ? "list" : _, [te, Z] = A(!1), [G, I] = A(null), [ae, j] = A(null), [R, ne] = A(
4548
4548
  null
4549
4549
  ), [ue, he] = A(null), ye = et(null), x = et(P);
4550
4550
  Ee(() => {
4551
4551
  const F = P && !x.current;
4552
4552
  x.current = P, !(!F || !h) && (X(null), E("dashboard"), v(h), b("author"), he(null));
4553
4553
  }, [P, h]);
4554
- const R = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [Oe, ht] = A(null);
4554
+ const z = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), Q = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [Oe, ht] = A(null);
4555
4555
  Ee(() => {
4556
- if (!p || !$ || !K) return;
4556
+ if (!p || !$ || !Q) return;
4557
4557
  let F = !0;
4558
- return le.getBriefing($, K, p.briefingId).then(({ briefing: W }) => {
4558
+ return le.getBriefing($, Q, p.briefingId).then(({ briefing: W }) => {
4559
4559
  F && (X(W), ht(p), b("author"));
4560
4560
  }, (W) => {
4561
4561
  F && M.error(W instanceof Error ? W.message : "Could not open the run.");
4562
4562
  }), () => {
4563
4563
  F = !1;
4564
4564
  };
4565
- }, [p, $, K, le]);
4565
+ }, [p, $, Q, le]);
4566
4566
  const Fe = mi(a), He = Y(() => {
4567
4567
  const F = fi(
4568
4568
  H,
@@ -4583,19 +4583,19 @@ function xi({
4583
4583
  source: { type: "project" },
4584
4584
  label: "This project",
4585
4585
  detail: "Use any data in this project."
4586
- }, [e, Fe, T]), _e = !!($ && K), Me = qr({
4586
+ }, [e, Fe, T]), _e = !!($ && Q), Me = qr({
4587
4587
  canCreate: y.canCreate,
4588
4588
  analyticalBriefingsEnabled: y.analyticalBriefingsEnabled,
4589
4589
  scheduledReportAvailable: T === "dashboard"
4590
4590
  }), ce = ie(async () => {
4591
- if (!(!$ || !K)) {
4591
+ if (!(!$ || !Q)) {
4592
4592
  Z(!0), he(null);
4593
4593
  try {
4594
4594
  B(
4595
4595
  await gi({
4596
4596
  apiClient: le,
4597
4597
  apiServiceUrl: $,
4598
- token: K
4598
+ token: Q
4599
4599
  })
4600
4600
  );
4601
4601
  } catch (F) {
@@ -4606,21 +4606,21 @@ function xi({
4606
4606
  Z(!1);
4607
4607
  }
4608
4608
  }
4609
- }, [le, $, K]);
4609
+ }, [le, $, Q]);
4610
4610
  Ee(() => {
4611
4611
  !P || O !== "list" || !_e || ce();
4612
4612
  }, [_e, O, ce, P]);
4613
- const ze = () => {
4613
+ const Re = () => {
4614
4614
  X(null), E("dashboard"), b("list"), D(!0);
4615
4615
  }, C = (F) => {
4616
4616
  X(null), v(F), b("author");
4617
4617
  }, q = async (F) => {
4618
- if (!(!$ || !K)) {
4618
+ if (!(!$ || !Q)) {
4619
4619
  I(F), he(null);
4620
4620
  try {
4621
4621
  const W = await le.getBriefing(
4622
4622
  $,
4623
- K,
4623
+ Q,
4624
4624
  F
4625
4625
  );
4626
4626
  X(W.briefing), b("author");
@@ -4633,16 +4633,16 @@ function xi({
4633
4633
  }
4634
4634
  }
4635
4635
  }, ee = async (F) => {
4636
- if (!(!$ || !K)) {
4636
+ if (!(!$ || !Q)) {
4637
4637
  j(F.id);
4638
4638
  try {
4639
4639
  const W = await le.runBriefingNow(
4640
4640
  $,
4641
- K,
4641
+ Q,
4642
4642
  F.id,
4643
4643
  { requestId: vi() }
4644
4644
  );
4645
- R.track({ kind: "briefing", id: W.run.id, title: F.name, briefingId: F.id }), ce();
4645
+ z.track({ kind: "briefing", id: W.run.id, title: F.name, briefingId: F.id }), ce();
4646
4646
  } catch (W) {
4647
4647
  M.error(
4648
4648
  W instanceof Error ? W.message : "Could not start the run."
@@ -4652,17 +4652,17 @@ function xi({
4652
4652
  }
4653
4653
  }
4654
4654
  }, me = async (F) => {
4655
- if (!$ || !K) return;
4655
+ if (!$ || !Q) return;
4656
4656
  const { noun: W } = pe(F), Ge = W === "report" ? "Report" : "Briefing";
4657
4657
  j(F.id);
4658
4658
  try {
4659
4659
  const Ye = F.status === "PAUSED" ? await le.resumeBriefing(
4660
4660
  $,
4661
- K,
4661
+ Q,
4662
4662
  F.id
4663
4663
  ) : await le.pauseBriefing(
4664
4664
  $,
4665
- K,
4665
+ Q,
4666
4666
  F.id
4667
4667
  );
4668
4668
  M.success(
@@ -4676,13 +4676,13 @@ function xi({
4676
4676
  j(null);
4677
4677
  }
4678
4678
  }, Ne = async () => {
4679
- if (!z || !$ || !K) return;
4680
- const F = z;
4679
+ if (!R || !$ || !Q) return;
4680
+ const F = R;
4681
4681
  j(F.id);
4682
4682
  try {
4683
4683
  await le.deleteBriefing(
4684
4684
  $,
4685
- K,
4685
+ Q,
4686
4686
  F.id
4687
4687
  );
4688
4688
  const { noun: W } = pe(F);
@@ -4695,18 +4695,18 @@ function xi({
4695
4695
  j(null);
4696
4696
  }
4697
4697
  }, Pa = He.length;
4698
- return y.surfaceVisible ? /* @__PURE__ */ s(Qn, { open: P, onOpenChange: D, children: [
4698
+ return y.surfaceVisible ? /* @__PURE__ */ s(Kn, { open: P, onOpenChange: D, children: [
4699
4699
  d ? null : /* @__PURE__ */ t(
4700
4700
  ti,
4701
4701
  {
4702
4702
  disabled: i || !_e,
4703
4703
  briefingCount: Pa,
4704
4704
  className: o,
4705
- onClick: ze
4705
+ onClick: Re
4706
4706
  }
4707
4707
  ),
4708
4708
  /* @__PURE__ */ s(
4709
- Kn,
4709
+ Qn,
4710
4710
  {
4711
4711
  ref: ye,
4712
4712
  side: "right",
@@ -4744,7 +4744,7 @@ function xi({
4744
4744
  onClick: () => {
4745
4745
  N && (X(null), v(h), E("dashboard"), b("author"));
4746
4746
  },
4747
- children: Q ? `Edit ${pe(Q).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
4747
+ children: K ? `Edit ${pe(K).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
4748
4748
  }
4749
4749
  ),
4750
4750
  /* @__PURE__ */ t(
@@ -4771,7 +4771,7 @@ function xi({
4771
4771
  onClick: () => D(!1),
4772
4772
  className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
4773
4773
  "aria-label": h === "scheduled_report" ? "Close email report workflow" : "Close analytical briefing workflow",
4774
- children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" })
4774
+ children: /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5" })
4775
4775
  }
4776
4776
  )
4777
4777
  ] }) : null,
@@ -4813,18 +4813,18 @@ function xi({
4813
4813
  Xn,
4814
4814
  {
4815
4815
  apiServiceUrl: $,
4816
- token: K,
4817
- briefing: Q,
4818
- initialRunId: Oe && (Q == null ? void 0 : Q.id) === Oe.briefingId ? Oe.runId : void 0,
4816
+ token: Q,
4817
+ briefing: K,
4818
+ initialRunId: Oe && (K == null ? void 0 : K.id) === Oe.briefingId ? Oe.runId : void 0,
4819
4819
  intent: S,
4820
- sourceContext: Q ? void 0 : mt,
4821
- title: Q ? `Edit ${pe(Q).noun}` : S === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
4820
+ sourceContext: K ? void 0 : mt,
4821
+ title: K ? `Edit ${pe(K).noun}` : S === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
4822
4822
  hideHeader: !!h,
4823
4823
  className: "h-full min-h-0 max-w-none border-0 shadow-none",
4824
4824
  onBack: h ? void 0 : () => b("list"),
4825
4825
  onCancel: () => D(!1),
4826
4826
  onDeleted: () => {
4827
- const F = Q ? pe(Q).noun : "briefing";
4827
+ const F = K ? pe(K).noun : "briefing";
4828
4828
  M.success(`${F === "report" ? "Report" : "Briefing"} deleted`), X(null), b("list"), ce();
4829
4829
  },
4830
4830
  onRunStarted: () => {
@@ -4843,7 +4843,7 @@ function xi({
4843
4843
  /* @__PURE__ */ t(
4844
4844
  wt,
4845
4845
  {
4846
- open: !!z,
4846
+ open: !!R,
4847
4847
  onOpenChange: (F) => {
4848
4848
  F || ne(null);
4849
4849
  },
@@ -4852,12 +4852,12 @@ function xi({
4852
4852
  /* @__PURE__ */ s(Dt, { children: [
4853
4853
  "Delete",
4854
4854
  " ",
4855
- z ? pe(z).noun : "briefing",
4855
+ R ? pe(R).noun : "briefing",
4856
4856
  "?"
4857
4857
  ] }),
4858
4858
  /* @__PURE__ */ s(At, { children: [
4859
4859
  "This permanently deletes ",
4860
- /* @__PURE__ */ t("strong", { children: z == null ? void 0 : z.name }),
4860
+ /* @__PURE__ */ t("strong", { children: R == null ? void 0 : R.name }),
4861
4861
  ". Recipients will stop receiving it."
4862
4862
  ] })
4863
4863
  ] }),
@@ -4871,7 +4871,7 @@ function xi({
4871
4871
  children: [
4872
4872
  "Delete",
4873
4873
  " ",
4874
- z ? pe(z).noun : "briefing"
4874
+ R ? pe(R).noun : "briefing"
4875
4875
  ]
4876
4876
  }
4877
4877
  )
@@ -4892,7 +4892,7 @@ export {
4892
4892
  to as U,
4893
4893
  Wi as V,
4894
4894
  ti as W,
4895
- Ki as a,
4895
+ Qi as a,
4896
4896
  Gi as b,
4897
4897
  Ji as c,
4898
4898
  eo as d,
@@ -4906,5 +4906,5 @@ export {
4906
4906
  so as l,
4907
4907
  oo as m,
4908
4908
  lo as n,
4909
- Qi as u
4909
+ Ki as u
4910
4910
  };