react-semaphor 0.1.538 → 0.1.539

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 (24) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/chunks/{aggregate-table-row-presentation-Qgpv6_G8.js → aggregate-table-row-presentation-BjK9YfMI.js} +1 -1
  3. package/dist/chunks/{assistant-chat-BAqUIFp5.js → assistant-chat-DgiSuFT4.js} +2159 -2042
  4. package/dist/chunks/{dashboard-briefing-launcher-Bb2QUqOa.js → dashboard-briefing-launcher-Bl3gCeBR.js} +261 -261
  5. package/dist/chunks/{dashboard-controls-FpONU8QV.js → dashboard-controls-0EX0HiJt.js} +6 -6
  6. package/dist/chunks/{dashboard-json-DazPhBU_.js → dashboard-json-6X_2BDiL.js} +1 -1
  7. package/dist/chunks/{dashboard-DTDDFQsS.js → dashboard-y5BwcvzT.js} +1 -1
  8. package/dist/chunks/{document-dashboard-inputs-D96rlU7S.js → document-dashboard-inputs-BrYYlRVo.js} +9 -9
  9. package/dist/chunks/{edit-dashboard-visual-CIhZodVH.js → edit-dashboard-visual-Bzchfgga.js} +5 -5
  10. package/dist/chunks/{matrix-formatter-Bgw32tb3.js → matrix-formatter-DQ8avoIQ.js} +8 -8
  11. package/dist/chunks/{report-preferences-dialog-BCGs4-AE.js → report-preferences-dialog-CWhSbc5_.js} +5 -5
  12. package/dist/chunks/{saved-dashboard-context-BrTkjcod.js → saved-dashboard-context-Dqve2jlB.js} +1 -1
  13. package/dist/chunks/{semaphor-ready-indicator-CHHoWhil.js → semaphor-ready-indicator-ldcwmLoY.js} +6135 -6123
  14. package/dist/chunks/{shelf-drop-preview-context-EsayECEC.js → shelf-drop-preview-context-BWxunXTq.js} +2 -2
  15. package/dist/chunks/{use-create-flow-overlay-state-BqA92GkX.js → use-create-flow-overlay-state-RHgzVfcz.js} +2 -2
  16. package/dist/dashboard/index.js +1 -1
  17. package/dist/data-app-sdk/index.js +1 -1
  18. package/dist/format-utils/index.js +2 -2
  19. package/dist/index.js +9 -9
  20. package/dist/surfboard/index.js +1 -1
  21. package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
  22. package/dist/types/lib/hooks/use-text-filter.d.ts +2 -0
  23. package/dist/types/shared/assistant-protocol/parts.d.ts +17 -8
  24. package/package.json +1 -1
@@ -2,8 +2,8 @@ import { jsx as t, jsxs as i, Fragment as $ } from "react/jsx-runtime";
2
2
  import * as ue from "react";
3
3
  import _t, { useState as F, useEffect as J, useCallback as j, useMemo as oe, useLayoutEffect as Pt, useRef as ge, useContext as pr } from "react";
4
4
  import { u as V, v as Tt, s as fr } from "./custom-visual-inputs-BrUOIwln.js";
5
- import { B as U, l as Le, q as ct, L as ie, j as Ot, c as ut, i as gr, Q as br, P as qe, a as He, b as Qe, S as $t } from "./switch-CvItuC1Q.js";
6
- import { cK as ht, bt as Ue, bu as Ve, bw as Re, cL as vr, cM as xr, aX as Be, aV as Je, cN as yr, cO as et, cP as mt, _ as tt, X as pe, u as T, cQ as Cr, cR as wr, cS as Nr, Z as ee, b6 as Sr, cT as Dr, cU as Er, aR as Se, cf as zt, aI as Ge, l as kr, h as Ar, cV as Ir, ci as pt, cj as ft, ck as gt, cl as bt, cm as vt, cn as xt, co as yt, cp as jt, aG as Ct, cW as Fr, cw as Pr, c7 as ot, c4 as rt, c5 as at, cX as Wt, c6 as nt, bQ as X, cg as Tr, ce as Ke, cY as Lr, bO as Ur, bv as wt, bx as Nt, cZ as Vr, bs as Rr, c_ as qt, cr as St, c$ as Br, bU as Mr, f as _r, d0 as Or, J as xe, aB as Te, ax as Ht, ay as Xe, d1 as Q, K as Qt, aw as $r, d2 as zr, aD as jr, R as Gt, d3 as Wr, az as Lt, N as qr, d4 as Hr, d5 as Qr, d6 as Gr, d7 as Kr, d8 as Kt, d9 as Xr, da as Yr, db as Zr, dc as Xt, dd as Jr, de as ze, df as ea, dg as ta, dh as ra, as as aa, at as na, a8 as sa, a7 as oa, a6 as ia, a5 as la, a2 as da, a0 as ca, di as ua, dj as ha, dk as ma, dl as pa, dm as fa, aq as ga, dn as ba, dp as va, ae as xa, dq as ya, dr as Ca, ds as wa } from "./semaphor-ready-indicator-CHHoWhil.js";
5
+ import { B as U, l as Le, q as dt, L as ie, j as Ot, c as ut, i as gr, Q as br, P as qe, a as He, b as Qe, S as $t } from "./switch-CvItuC1Q.js";
6
+ import { cq as ht, bt as Ue, bu as Ve, bw as Re, cr as vr, cs as xr, aX as Be, aV as Je, ct as yr, cu as et, cv as mt, _ as tt, X as pe, u as T, cw as Cr, cx as wr, cy as Nr, Z as ee, b6 as Sr, cz as Dr, cA as Er, aR as Se, cf as zt, aI as Ge, l as kr, h as Ar, cB as Ir, ci as pt, cj as ft, ck as gt, cl as bt, cm as vt, cn as xt, co as yt, cp as jt, aG as Ct, cC as Fr, cD as Pr, c7 as ot, c4 as rt, c5 as at, cE as Wt, c6 as nt, bQ as X, cg as Tr, ce as Ke, cF as Lr, bO as Ur, bv as wt, bx as Nt, cG as Vr, bs as Rr, cH as qt, cI as St, cJ as Br, bU as Mr, f as _r, cK as Or, J as xe, aB as Te, ax as Ht, ay as Xe, cL as Q, K as Qt, aw as $r, cM as zr, aD as jr, R as Gt, cN as Wr, az as Lt, N as qr, cO as Hr, cP as Qr, cQ as Gr, cR as Kr, cS as Kt, cT as Xr, cU as Yr, cV as Zr, cW as Xt, cX as Jr, cY as ze, cZ as ea, c_ as ta, c$ as ra, as as aa, at as na, a8 as sa, a7 as oa, a6 as ia, a5 as la, a2 as ca, a0 as da, d0 as ua, d1 as ha, d2 as ma, d3 as pa, d4 as fa, aq as ga, d5 as ba, d6 as va, ae as xa, d7 as ya, d8 as Ca, d9 as wa } from "./semaphor-ready-indicator-ldcwmLoY.js";
7
7
  import { L as Dt } from "./layout-grid-Bgzth8vd.js";
8
8
  import { c as De, X as Me, C as Yt } from "./x-4f5U2XwU.js";
9
9
  import "./index-CuHybtft.js";
@@ -16,14 +16,14 @@ import { c as Y } from "./class-utils-Df1OVOT1.js";
16
16
  import { S as Sa } from "./selection-reducer-vKIb_jS6.js";
17
17
  import { s as je } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
18
18
  import { f as Da } from "./editor-draft-sync-BN5qYHPF.js";
19
- import { af as Ye, ag as Ea, k as ka, ah as Aa, ai as Ia, aj as Fa, ak as Pa, al as Ta } from "./document-dashboard-inputs-D96rlU7S.js";
19
+ import { ae as Ye, af as Ea, k as ka, ag as Aa, ah as Ia, ai as Fa, aj as Pa, ak as Ta } from "./document-dashboard-inputs-BrYYlRVo.js";
20
20
  import "react-dom";
21
21
  import "./pivot-result-lifecycle-8qCDmpKc.js";
22
22
  import "./calculated-field-identity-DcBS2NPP.js";
23
23
  import { o as La } from "./bookmark-state-k7y5SNGf.js";
24
24
  import { S as Zt } from "./save-CfJpQQ68.js";
25
- import { V as Ua, L as Va, a as Ra, u as Jt, C as er, F as Ba, b as Ma } from "./use-create-flow-overlay-state-BqA92GkX.js";
26
- import { x as Ut } from "./matrix-formatter-Bgw32tb3.js";
25
+ import { V as Ua, L as Va, a as Ra, u as Jt, C as er, F as Ba, b as Ma } from "./use-create-flow-overlay-state-RHgzVfcz.js";
26
+ import { o as Ut } from "./matrix-formatter-DQ8avoIQ.js";
27
27
  import { t as _a } from "./document-sheet-utils-C1eEldxs.js";
28
28
  import { g as me, d as Oa, a as $a } from "./index-CqMiAkay.js";
29
29
  /**
@@ -130,12 +130,12 @@ function Ka({
130
130
  onSubmit: o,
131
131
  isCreating: a
132
132
  }) {
133
- const n = ht("interactive"), [s, c] = F(""), [d, l] = F("");
133
+ const n = ht("interactive"), [s, d] = F(""), [c, l] = F("");
134
134
  J(() => {
135
- e || (c(""), l(""));
135
+ e || (d(""), l(""));
136
136
  }, [e]);
137
137
  const u = () => {
138
- s.trim() && o({ title: s, description: d });
138
+ s.trim() && o({ title: s, description: c });
139
139
  }, h = (p) => {
140
140
  r(p);
141
141
  };
@@ -172,13 +172,13 @@ function Ka({
172
172
  /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
173
173
  /* @__PURE__ */ t(Le, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
174
174
  /* @__PURE__ */ t(
175
- ct,
175
+ dt,
176
176
  {
177
177
  id: "visual-title",
178
178
  size: "sm",
179
179
  placeholder: "Untitled visual",
180
180
  value: s,
181
- onChange: (p) => c(p.target.value),
181
+ onChange: (p) => d(p.target.value),
182
182
  disabled: a,
183
183
  onKeyDown: (p) => {
184
184
  p.key === "Enter" && !p.shiftKey && (p.preventDefault(), u());
@@ -189,12 +189,12 @@ function Ka({
189
189
  /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
190
190
  /* @__PURE__ */ t(Le, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
191
191
  /* @__PURE__ */ t(
192
- ct,
192
+ dt,
193
193
  {
194
194
  id: "visual-description",
195
195
  size: "sm",
196
196
  placeholder: "Optional",
197
- value: d,
197
+ value: c,
198
198
  onChange: (p) => l(p.target.value),
199
199
  disabled: a
200
200
  }
@@ -261,8 +261,8 @@ function Xa(e) {
261
261
  if (typeof u.useChartStore != "function")
262
262
  throw new Error("useChartStore is not a function");
263
263
  o(() => u.useChartStore), n(null);
264
- } catch (d) {
265
- const l = d instanceof Error ? d.message : "Unknown error";
264
+ } catch (c) {
265
+ const l = c instanceof Error ? c.message : "Unknown error";
266
266
  console.error("Failed to load remote chart store:", l), n(l), o(null);
267
267
  }
268
268
  })();
@@ -286,10 +286,10 @@ function Ya(e, r) {
286
286
  if (n == "All__Header")
287
287
  return e[0].id;
288
288
  if (n && n.endsWith("__Header")) {
289
- const c = n.split("__")[0], d = e.find(
290
- (l) => l.tabTitle === c
289
+ const d = n.split("__")[0], c = e.find(
290
+ (l) => l.tabTitle === d
291
291
  );
292
- return d ? d.id : e[0].id;
292
+ return c ? c.id : e[0].id;
293
293
  }
294
294
  return r;
295
295
  }
@@ -333,8 +333,8 @@ function en(e, {
333
333
  selectedSchemaName: a,
334
334
  selectedDatamodelId: n,
335
335
  selectedDatabaseName: s,
336
- selectedTableName: c,
337
- selectedConnectionId: d,
336
+ selectedTableName: d,
337
+ selectedConnectionId: c,
338
338
  remoteChartSettings: l,
339
339
  stripConfig: u
340
340
  }) {
@@ -342,16 +342,16 @@ function en(e, {
342
342
  return {
343
343
  ...e,
344
344
  dataSource: Ja(e, {
345
- selectedConnectionId: d,
345
+ selectedConnectionId: c,
346
346
  selectedDatabaseName: s,
347
347
  selectedSchemaName: a,
348
- selectedTableName: c
348
+ selectedTableName: d
349
349
  }),
350
350
  lastSelectedSchema: a,
351
351
  lastSelectedDatamodelId: n,
352
352
  lastSelectedDatabase: s,
353
- lastSelectedTable: c,
354
- connectionId: d || e.connectionId,
353
+ lastSelectedTable: d,
354
+ connectionId: c || e.connectionId,
355
355
  sql: h ? o || e.sql : void 0,
356
356
  python: h ? e.python : void 0,
357
357
  config: r || !e.config ? void 0 : u(e.config),
@@ -372,11 +372,11 @@ const tn = (e) => {
372
372
  async function Vt(e, r, o, a, n = "Opening library visual...") {
373
373
  if (!r || !o)
374
374
  throw new Error("Missing auth token or visual ID");
375
- const s = ["resource-by-id", "visual", o], c = a.getQueryData(s);
376
- if (c)
377
- return console.log("Using cached visual data for:", o), { data: c, fromCache: !0 };
375
+ const s = ["resource-by-id", "visual", o], d = a.getQueryData(s);
376
+ if (d)
377
+ return console.log("Using cached visual data for:", o), { data: d, fromCache: !0 };
378
378
  console.log("Fetching visual data from network for:", o);
379
- const d = V.loading(n, {
379
+ const c = V.loading(n, {
380
380
  position: "top-center"
381
381
  });
382
382
  try {
@@ -391,9 +391,9 @@ async function Vt(e, r, o, a, n = "Opening library visual...") {
391
391
  if (!l.ok)
392
392
  throw new Error("Failed to load visual");
393
393
  const u = await l.json();
394
- return a.setQueryData(s, u), V.dismiss(d), { data: u, fromCache: !1 };
394
+ return a.setQueryData(s, u), V.dismiss(c), { data: u, fromCache: !1 };
395
395
  } catch (l) {
396
- throw V.dismiss(d), l;
396
+ throw V.dismiss(c), l;
397
397
  }
398
398
  }
399
399
  function tr(e) {
@@ -404,15 +404,15 @@ function tr(e) {
404
404
  throw new Error("Invalid frame object format");
405
405
  }
406
406
  function rn(e, r) {
407
- var s, c;
407
+ var s, d;
408
408
  const o = (e == null ? void 0 : e.frameObject) ?? ((s = e == null ? void 0 : e.visual) == null ? void 0 : s.frameObject);
409
409
  if (!o)
410
410
  return !1;
411
411
  const a = tr(o);
412
412
  if (!(a != null && a.cards) || a.cards.length === 0)
413
413
  return !1;
414
- const n = (c = a.cards) == null ? void 0 : c.find(
415
- (d) => d.id === a.activeCardId
414
+ const n = (d = a.cards) == null ? void 0 : d.find(
415
+ (c) => c.id === a.activeCardId
416
416
  );
417
417
  return n ? (Nr({
418
418
  ...r,
@@ -435,16 +435,16 @@ function an() {
435
435
  frame: a,
436
436
  card: n,
437
437
  isDevMode: s,
438
- selectedSchemaName: c,
439
- selectedDatamodelId: d,
438
+ selectedSchemaName: d,
439
+ selectedDatamodelId: c,
440
440
  selectedDatabaseName: l,
441
441
  selectedTableName: u,
442
442
  selectedConnectionId: h
443
443
  } = ee.getState(), p = n.sql, m = (b = r == null ? void 0 : r.getState()) == null ? void 0 : b.settings, g = en(n, {
444
444
  isDevMode: s,
445
445
  cardSql: p,
446
- selectedSchemaName: c,
447
- selectedDatamodelId: d,
446
+ selectedSchemaName: d,
447
+ selectedDatamodelId: c,
448
448
  selectedDatabaseName: l,
449
449
  selectedTableName: u,
450
450
  selectedConnectionId: h,
@@ -462,8 +462,8 @@ function an() {
462
462
  }
463
463
  function Ee() {
464
464
  const { authToken: e, tokenProps: r } = Be(), o = Je(), a = yr(), n = et(), { selectVisual: s } = mt(), {
465
- setFrame: c,
466
- setCard: d,
465
+ setFrame: d,
466
+ setCard: c,
467
467
  setIsDevMode: l,
468
468
  initializeModeDrafts: u,
469
469
  setActiveTabCardId: h,
@@ -499,8 +499,8 @@ function Ee() {
499
499
  "Opening library visual..."
500
500
  );
501
501
  if (!rn(te, {
502
- setFrame: c,
503
- setCard: d,
502
+ setFrame: d,
503
+ setCard: c,
504
504
  setIsDevMode: l,
505
505
  initializeModeDrafts: u,
506
506
  setActiveTabCardId: h,
@@ -533,8 +533,8 @@ function Ee() {
533
533
  r.apiServiceUrl,
534
534
  o,
535
535
  s,
536
- c,
537
536
  d,
537
+ c,
538
538
  w,
539
539
  S,
540
540
  l,
@@ -558,7 +558,7 @@ function Ee() {
558
558
  M,
559
559
  Z
560
560
  ]
561
- ), de = j(
561
+ ), ce = j(
562
562
  async (O) => {
563
563
  var re;
564
564
  const te = (L) => (V.error(L), { success: !1, error: L });
@@ -610,7 +610,7 @@ function Ee() {
610
610
  isError: K.isError,
611
611
  error: K.error,
612
612
  handleEditLibraryVisual: Ce,
613
- handleAddLibraryVisual: de,
613
+ handleAddLibraryVisual: ce,
614
614
  getUpdatedFrame: an().getUpdatedFrame,
615
615
  refetch: K.refetch
616
616
  };
@@ -646,12 +646,12 @@ function Hs({
646
646
  open: e,
647
647
  onOpenChange: r
648
648
  }) {
649
- const o = ht("interactive"), [a, n] = F(""), [s, c] = F(/* @__PURE__ */ new Set()), [d, l] = F(!1), [u, h] = F(
649
+ const o = ht("interactive"), [a, n] = F(""), [s, d] = F(/* @__PURE__ */ new Set()), [c, l] = F(!1), [u, h] = F(
650
650
  null
651
651
  ), [p, m] = F(
652
652
  null
653
653
  ), [g, f] = F(!1), [b, k] = F(null), [v, D] = F(null), E = () => {
654
- c(/* @__PURE__ */ new Set()), h(null), m(null), f(!1), k(null);
654
+ d(/* @__PURE__ */ new Set()), h(null), m(null), f(!1), k(null);
655
655
  }, N = () => {
656
656
  r(!1), E();
657
657
  }, { selectVisual: y } = mt(), { handleAddLibraryVisual: w, handleEditLibraryVisual: S } = Ee(), { isConsoleMode: x } = Sr(), {
@@ -663,7 +663,7 @@ function Hs({
663
663
  deleteResourceAsync: Z,
664
664
  duplicateResource: K,
665
665
  isCreating: Ce,
666
- isDeleting: de
666
+ isDeleting: ce
667
667
  } = Dr(
668
668
  void 0,
669
669
  (C) => {
@@ -677,8 +677,8 @@ function Hs({
677
677
  const C = a.trim().toLowerCase();
678
678
  return C ? L.filter(
679
679
  (R) => {
680
- var z, ce, fe;
681
- return ((z = R.title) == null ? void 0 : z.toLowerCase().includes(C)) || ((ce = R.description) == null ? void 0 : ce.toLowerCase().includes(C)) || ((fe = R.kind) == null ? void 0 : fe.toLowerCase().includes(C));
680
+ var z, de, fe;
681
+ return ((z = R.title) == null ? void 0 : z.toLowerCase().includes(C)) || ((de = R.description) == null ? void 0 : de.toLowerCase().includes(C)) || ((fe = R.kind) == null ? void 0 : fe.toLowerCase().includes(C));
682
682
  }
683
683
  ) : L;
684
684
  }, [a, L]), le = oe(
@@ -696,13 +696,13 @@ function Hs({
696
696
  (C) => s.has(C.id)
697
697
  ), we = (C) => {
698
698
  const R = new Set(s);
699
- C(R), c(R);
699
+ C(R), d(R);
700
700
  }, se = (C) => {
701
701
  we((R) => {
702
702
  R.has(C) ? R.delete(C) : R.add(C);
703
703
  });
704
704
  }, Ae = () => {
705
- c((C) => {
705
+ d((C) => {
706
706
  const R = new Set(C);
707
707
  return ke ? ae.forEach(
708
708
  (z) => R.delete(z.id)
@@ -739,10 +739,10 @@ function Hs({
739
739
  try {
740
740
  for (const R of C)
741
741
  await Z(R.id);
742
- c((R) => {
742
+ d((R) => {
743
743
  const z = new Set(R);
744
744
  return C.forEach(
745
- (ce) => z.delete(ce.id)
745
+ (de) => z.delete(de.id)
746
746
  ), z;
747
747
  }), f(!1), k(null);
748
748
  } catch {
@@ -768,7 +768,7 @@ function Hs({
768
768
  m(null);
769
769
  return;
770
770
  }
771
- const ce = Object.keys(z), fe = ce.length === 1 ? ce[0] : void 0;
771
+ const de = Object.keys(z), fe = de.length === 1 ? de[0] : void 0;
772
772
  O(p.id, fe), M(
773
773
  {
774
774
  resourceId: p.id,
@@ -865,7 +865,7 @@ function Hs({
865
865
  },
866
866
  onDuplicateVisual: Ne,
867
867
  duplicatingId: v,
868
- isDeleting: de,
868
+ isDeleting: ce,
869
869
  isConsoleMode: x
870
870
  }
871
871
  ) }),
@@ -881,7 +881,7 @@ function Hs({
881
881
  {
882
882
  size: "xs",
883
883
  variant: "ghost",
884
- onClick: () => c(/* @__PURE__ */ new Set()),
884
+ onClick: () => d(/* @__PURE__ */ new Set()),
885
885
  children: "Clear"
886
886
  }
887
887
  ),
@@ -944,7 +944,7 @@ function Hs({
944
944
  /* @__PURE__ */ t(
945
945
  Ka,
946
946
  {
947
- open: d,
947
+ open: c,
948
948
  onOpenChange: l,
949
949
  onSubmit: P,
950
950
  isCreating: Ce
@@ -975,7 +975,7 @@ function Hs({
975
975
  {
976
976
  open: g,
977
977
  onOpenChange: (C) => {
978
- !C && de || (f(C), C || k(null));
978
+ !C && ce || (f(C), C || k(null));
979
979
  },
980
980
  children: /* @__PURE__ */ i(ft, { children: [
981
981
  /* @__PURE__ */ i(gt, { children: [
@@ -989,17 +989,17 @@ function Hs({
989
989
  /* @__PURE__ */ t(vt, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
990
990
  ] }),
991
991
  /* @__PURE__ */ i(xt, { children: [
992
- /* @__PURE__ */ t(yt, { disabled: de, children: "Cancel" }),
992
+ /* @__PURE__ */ t(yt, { disabled: ce, children: "Cancel" }),
993
993
  /* @__PURE__ */ i(
994
994
  jt,
995
995
  {
996
996
  onClick: (C) => {
997
997
  C.preventDefault(), st();
998
998
  },
999
- disabled: de || Pe === 0,
999
+ disabled: ce || Pe === 0,
1000
1000
  children: [
1001
- de ? /* @__PURE__ */ t(ie, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5" }),
1002
- de ? "Deleting..." : "Delete"
1001
+ ce ? /* @__PURE__ */ t(ie, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5" }),
1002
+ ce ? "Deleting..." : "Delete"
1003
1003
  ]
1004
1004
  }
1005
1005
  )
@@ -1016,8 +1016,8 @@ function ln({
1016
1016
  someFilteredSelected: a,
1017
1017
  onSelectAll: n,
1018
1018
  onToggleSelection: s,
1019
- onAddVisual: c,
1020
- onOpenVisual: d,
1019
+ onAddVisual: d,
1020
+ onOpenVisual: c,
1021
1021
  onEditDetails: l,
1022
1022
  onShareVisual: u,
1023
1023
  onDeleteVisual: h,
@@ -1044,13 +1044,13 @@ function ln({
1044
1044
  /* @__PURE__ */ t("span", { className: "text-right", children: "Actions" })
1045
1045
  ] }),
1046
1046
  e.map((b) => /* @__PURE__ */ t(
1047
- dn,
1047
+ cn,
1048
1048
  {
1049
1049
  visual: b,
1050
1050
  selected: r.has(b.id),
1051
1051
  onToggleSelection: s,
1052
- onAddVisual: c,
1053
- onOpenVisual: d,
1052
+ onAddVisual: d,
1053
+ onOpenVisual: c,
1054
1054
  onEditDetails: l,
1055
1055
  onShareVisual: u,
1056
1056
  onDeleteVisual: h,
@@ -1063,15 +1063,15 @@ function ln({
1063
1063
  ))
1064
1064
  ] });
1065
1065
  }
1066
- function dn({
1066
+ function cn({
1067
1067
  visual: e,
1068
1068
  selected: r,
1069
1069
  onToggleSelection: o,
1070
1070
  onAddVisual: a,
1071
1071
  onOpenVisual: n,
1072
1072
  onEditDetails: s,
1073
- onShareVisual: c,
1074
- onDeleteVisual: d,
1073
+ onShareVisual: d,
1074
+ onDeleteVisual: c,
1075
1075
  onDuplicateVisual: l,
1076
1076
  duplicatingId: u,
1077
1077
  isDeleting: h,
@@ -1135,13 +1135,13 @@ function dn({
1135
1135
  /* @__PURE__ */ t(on, { visual: e }),
1136
1136
  /* @__PURE__ */ t("span", { className: "text-right tabular-nums text-muted-foreground", children: e.ownership.sharedCount > 0 ? e.ownership.sharedCount : "—" }),
1137
1137
  /* @__PURE__ */ t(
1138
- cn,
1138
+ dn,
1139
1139
  {
1140
1140
  visual: e,
1141
1141
  onOpenVisual: n,
1142
1142
  onEditDetails: s,
1143
- onShareVisual: c,
1144
- onDeleteVisual: d,
1143
+ onShareVisual: d,
1144
+ onDeleteVisual: c,
1145
1145
  onDuplicateVisual: l,
1146
1146
  duplicatingId: u,
1147
1147
  isDeleting: h,
@@ -1152,15 +1152,15 @@ function dn({
1152
1152
  }
1153
1153
  );
1154
1154
  }
1155
- function cn({
1155
+ function dn({
1156
1156
  visual: e,
1157
1157
  onOpenVisual: r,
1158
1158
  onEditDetails: o,
1159
1159
  onShareVisual: a,
1160
1160
  onDeleteVisual: n,
1161
1161
  onDuplicateVisual: s,
1162
- duplicatingId: c,
1163
- isDeleting: d,
1162
+ duplicatingId: d,
1163
+ isDeleting: c,
1164
1164
  isConsoleMode: l
1165
1165
  }) {
1166
1166
  return /* @__PURE__ */ i(
@@ -1205,10 +1205,10 @@ function cn({
1205
1205
  X,
1206
1206
  {
1207
1207
  onClick: () => s(e.id),
1208
- disabled: c === e.id,
1208
+ disabled: d === e.id,
1209
1209
  children: [
1210
- c === e.id ? /* @__PURE__ */ t(ie, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Tr, { className: "h-3.5 w-3.5" }),
1211
- c === e.id ? "Duplicating..." : "Duplicate"
1210
+ d === e.id ? /* @__PURE__ */ t(ie, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Tr, { className: "h-3.5 w-3.5" }),
1211
+ d === e.id ? "Duplicating..." : "Duplicate"
1212
1212
  ]
1213
1213
  }
1214
1214
  ),
@@ -1227,10 +1227,10 @@ function cn({
1227
1227
  {
1228
1228
  className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
1229
1229
  onClick: () => n(e),
1230
- disabled: d,
1230
+ disabled: c,
1231
1231
  children: [
1232
1232
  /* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5" }),
1233
- d ? "Deleting..." : "Delete"
1233
+ c ? "Deleting..." : "Delete"
1234
1234
  ]
1235
1235
  }
1236
1236
  )
@@ -1259,14 +1259,14 @@ function Qs(e, r, o = !1) {
1259
1259
  (u) => u.isDashboardEditing
1260
1260
  ), s = T(
1261
1261
  (u) => u.onDashboardLifecycleEvent
1262
- ), c = j(() => {
1262
+ ), d = j(() => {
1263
1263
  const u = T.getState().dashboard;
1264
1264
  return r || !e || !u || u.id !== e.id ? !1 : je(u) !== je(e);
1265
1265
  }, [e, r]);
1266
- Pt(() => (T.setState({ checkUnsavedDashboardChanges: c }), () => {
1267
- T.getState().checkUnsavedDashboardChanges === c && T.setState({ checkUnsavedDashboardChanges: null });
1268
- }), [c]);
1269
- const d = oe(() => !o || r || !a || n && (!e || a.id !== e.id) ? null : {
1266
+ Pt(() => (T.setState({ checkUnsavedDashboardChanges: d }), () => {
1267
+ T.getState().checkUnsavedDashboardChanges === d && T.setState({ checkUnsavedDashboardChanges: null });
1268
+ }), [d]);
1269
+ const c = oe(() => !o || r || !a || n && (!e || a.id !== e.id) ? null : {
1270
1270
  dashboardId: a.id,
1271
1271
  dirty: n && e ? je(a) !== je(e) : !1
1272
1272
  }, [
@@ -1277,21 +1277,21 @@ function Qs(e, r, o = !1) {
1277
1277
  a
1278
1278
  ]), l = ge(null);
1279
1279
  return Pt(() => {
1280
- if (!s || !d) {
1280
+ if (!s || !c) {
1281
1281
  l.current = null;
1282
1282
  return;
1283
1283
  }
1284
1284
  const u = l.current;
1285
- (u == null ? void 0 : u.callback) === s && u.dashboardId === d.dashboardId && u.dirty === d.dirty || (l.current = {
1285
+ (u == null ? void 0 : u.callback) === s && u.dashboardId === c.dashboardId && u.dirty === c.dirty || (l.current = {
1286
1286
  callback: s,
1287
- dashboardId: d.dashboardId,
1288
- dirty: d.dirty
1287
+ dashboardId: c.dashboardId,
1288
+ dirty: c.dirty
1289
1289
  }, s({
1290
1290
  type: "dashboard:dirty-state",
1291
- dashboardId: d.dashboardId,
1292
- payload: { dirty: d.dirty }
1291
+ dashboardId: c.dashboardId,
1292
+ payload: { dirty: c.dirty }
1293
1293
  }));
1294
- }, [d, s]), c;
1294
+ }, [c, s]), d;
1295
1295
  }
1296
1296
  function un({
1297
1297
  open: e,
@@ -1300,9 +1300,9 @@ function un({
1300
1300
  currentVisualName: a,
1301
1301
  isSaving: n = !1,
1302
1302
  destinationMode: s = "both",
1303
- onConfirm: c
1303
+ onConfirm: d
1304
1304
  }) {
1305
- const [d, l] = F(
1305
+ const [c, l] = F(
1306
1306
  o && a ? `Copy of ${a}` : a || ""
1307
1307
  ), [u, h] = F("");
1308
1308
  _t.useEffect(() => {
@@ -1310,7 +1310,7 @@ function un({
1310
1310
  o && a ? `Copy of ${a}` : a || ""
1311
1311
  ), h(""));
1312
1312
  }, [e, o, a]);
1313
- const p = !!d.trim(), m = s === "local" ? {
1313
+ const p = !!c.trim(), m = s === "local" ? {
1314
1314
  saveToLibrary: !1,
1315
1315
  saveToCurrentDashboard: !0,
1316
1316
  badgeType: "local",
@@ -1329,8 +1329,8 @@ function un({
1329
1329
  description: "Creates a new library visual and adds a linked copy to this dashboard.",
1330
1330
  actionLabel: "Save Copy as Linked Visual"
1331
1331
  }, g = () => {
1332
- !p || n || c({
1333
- name: d.trim(),
1332
+ !p || n || d({
1333
+ name: c.trim(),
1334
1334
  description: u.trim() || void 0,
1335
1335
  saveToLibrary: m.saveToLibrary,
1336
1336
  saveToCurrentDashboard: m.saveToCurrentDashboard
@@ -1355,10 +1355,10 @@ function un({
1355
1355
  /* @__PURE__ */ i("div", { className: "grid gap-2", children: [
1356
1356
  /* @__PURE__ */ t(Le, { htmlFor: "name", children: "Name" }),
1357
1357
  /* @__PURE__ */ t(
1358
- ct,
1358
+ dt,
1359
1359
  {
1360
1360
  id: "name",
1361
- value: d,
1361
+ value: c,
1362
1362
  onChange: (f) => l(f.target.value),
1363
1363
  placeholder: "Enter visual name",
1364
1364
  disabled: n
@@ -1431,15 +1431,15 @@ function hn({
1431
1431
  className: e,
1432
1432
  variant: r = "default"
1433
1433
  }) {
1434
- const o = Je(), [a, n] = F(!1), { setIsVisualEditing: s } = pe(), { getUpdatedFrame: c } = Ee(), d = et(), l = ee((p) => p.frame), u = qt();
1434
+ const o = Je(), [a, n] = F(!1), { setIsVisualEditing: s } = pe(), { getUpdatedFrame: d } = Ee(), c = et(), l = ee((p) => p.frame), u = qt();
1435
1435
  return /* @__PURE__ */ t(
1436
1436
  U,
1437
1437
  {
1438
1438
  onClick: () => {
1439
- const p = c();
1439
+ const p = d();
1440
1440
  if (!kt(p))
1441
1441
  return;
1442
- const m = (l == null ? void 0 : l.visualId) || (d == null ? void 0 : d.id);
1442
+ const m = (l == null ? void 0 : l.visualId) || (c == null ? void 0 : c.id);
1443
1443
  if (!m) {
1444
1444
  V.error("No visual to save");
1445
1445
  return;
@@ -1480,12 +1480,12 @@ function hn({
1480
1480
  function mn({
1481
1481
  className: e
1482
1482
  }) {
1483
- const r = Je(), [o, a] = F(!1), n = et(), s = ee((f) => f.frame), c = T((f) => f.selectedSheetId), d = T((f) => f.dashboard), { updateFrame: l, setIsVisualEditing: u } = pe(), { getUpdatedFrame: h } = Ee(), p = qt(), m = St();
1483
+ const r = Je(), [o, a] = F(!1), n = et(), s = ee((f) => f.frame), d = T((f) => f.selectedSheetId), c = T((f) => f.dashboard), { updateFrame: l, setIsVisualEditing: u } = pe(), { getUpdatedFrame: h } = Ee(), p = qt(), m = St();
1484
1484
  return /* @__PURE__ */ t(
1485
1485
  U,
1486
1486
  {
1487
1487
  onClick: async () => {
1488
- if (!c) {
1488
+ if (!d) {
1489
1489
  V.error("No sheet selected");
1490
1490
  return;
1491
1491
  }
@@ -1505,7 +1505,7 @@ function mn({
1505
1505
  ...b,
1506
1506
  visualId: f
1507
1507
  // Keep the link to library visual
1508
- }, v = Ye(d, k.id), D = await m(k, {
1508
+ }, v = Ye(c, k.id), D = await m(k, {
1509
1509
  previousFrame: v
1510
1510
  });
1511
1511
  await p.mutateAsync({
@@ -1513,7 +1513,7 @@ function mn({
1513
1513
  data: {
1514
1514
  frameObject: b
1515
1515
  }
1516
- }), l(c, k, {
1516
+ }), l(d, k, {
1517
1517
  semanticExecutionPayload: D
1518
1518
  }), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", f] }), V.success("Saved to library and applied locally"), setTimeout(() => {
1519
1519
  u(!1);
@@ -1541,18 +1541,18 @@ function mn({
1541
1541
  );
1542
1542
  }
1543
1543
  function lt({ className: e }) {
1544
- const { setTempQueryData: r, setSqlGen: o } = tt(), a = Je(), n = ee((d) => d.tempQueryData), s = ee((d) => d.onClose);
1545
- function c() {
1544
+ const { setTempQueryData: r, setSqlGen: o } = tt(), a = Je(), n = ee((c) => c.tempQueryData), s = ee((c) => c.onClose);
1545
+ function d() {
1546
1546
  if (n) {
1547
- const { queryKey: d, queryData: l } = n;
1548
- d && l && a.setQueryData(d, l);
1547
+ const { queryKey: c, queryData: l } = n;
1548
+ c && l && a.setQueryData(c, l);
1549
1549
  }
1550
1550
  o({}), s == null || s();
1551
1551
  }
1552
1552
  return /* @__PURE__ */ i(
1553
1553
  U,
1554
1554
  {
1555
- onClick: c,
1555
+ onClick: d,
1556
1556
  className: e,
1557
1557
  size: "xs",
1558
1558
  variant: "outline",
@@ -1564,11 +1564,11 @@ function lt({ className: e }) {
1564
1564
  );
1565
1565
  }
1566
1566
  function pn() {
1567
- const [e, r] = F(!1), [o, a] = F(!1), [n, s] = F(null), [c, d] = F(null), l = ee((S) => S.frame), u = ee((S) => S.card), h = et(), p = T((S) => S.selectedSheetId), m = T((S) => S.dashboard), { getUpdatedFrame: g } = Ee(), { selectVisual: f } = mt(), { addFrame: b, setSelectedFrameId: k, setIsVisualEditing: v } = pe(), D = St(), E = !!(l != null && l.visualId), N = (() => {
1567
+ const [e, r] = F(!1), [o, a] = F(!1), [n, s] = F(null), [d, c] = F(null), l = ee((S) => S.frame), u = ee((S) => S.card), h = et(), p = T((S) => S.selectedSheetId), m = T((S) => S.dashboard), { getUpdatedFrame: g } = Ee(), { selectVisual: f } = mt(), { addFrame: b, setSelectedFrameId: k, setIsVisualEditing: v } = pe(), D = St(), E = !!(l != null && l.visualId), N = (() => {
1568
1568
  var S, x;
1569
1569
  return ((S = l == null ? void 0 : l.cards) == null ? void 0 : S.length) === 1 && ((x = l.cards[0]) != null && x.title) ? l.cards[0].title : h != null && h.title ? h.title : (u == null ? void 0 : u.title) || "Untitled Visual";
1570
1570
  })(), y = Br((S) => {
1571
- S != null && S.id && (f(S), o && n && c && p && (async () => {
1571
+ S != null && S.id && (f(S), o && n && d && p && (async () => {
1572
1572
  try {
1573
1573
  const x = {
1574
1574
  ...n,
@@ -1578,8 +1578,8 @@ function pn() {
1578
1578
  };
1579
1579
  b(p, x, {
1580
1580
  placement: "end",
1581
- semanticExecutionPayload: c
1582
- }), k(x.id), a(!1), s(null), d(null), v(!1);
1581
+ semanticExecutionPayload: d
1582
+ }), k(x.id), a(!1), s(null), c(null), v(!1);
1583
1583
  } catch (x) {
1584
1584
  console.error(
1585
1585
  "Failed to promote semantic metadata for saved visual:",
@@ -1622,7 +1622,7 @@ function pn() {
1622
1622
  );
1623
1623
  return;
1624
1624
  }
1625
- a(S.saveToCurrentDashboard), s(I), d(W);
1625
+ a(S.saveToCurrentDashboard), s(I), c(W);
1626
1626
  const P = {
1627
1627
  title: S.name,
1628
1628
  description: S.description,
@@ -1660,7 +1660,7 @@ function pn() {
1660
1660
  };
1661
1661
  }
1662
1662
  function Gs(e = {}) {
1663
- const { isInspectionMode: r } = Mr(), o = ee((P) => P.frame), a = ee((P) => P.editorContext), n = _r((P) => P.selectedVisual), s = T((P) => P.selectedFrameId), c = T((P) => P.selectedSheetId), d = T((P) => P.dashboard), { setIsVisualEditing: l, updateFrame: u } = pe(), [h, p] = F(!1), [m, g] = F("both"), f = St(), b = (a == null ? void 0 : a.type) === "documentSection", k = !!(o != null && o.visualId || n != null && n.id), v = !!(o != null && o.visualId && s), D = k && !v, {
1663
+ const { isInspectionMode: r } = Mr(), o = ee((P) => P.frame), a = ee((P) => P.editorContext), n = _r((P) => P.selectedVisual), s = T((P) => P.selectedFrameId), d = T((P) => P.selectedSheetId), c = T((P) => P.dashboard), { setIsVisualEditing: l, updateFrame: u } = pe(), [h, p] = F(!1), [m, g] = F("both"), f = St(), b = (a == null ? void 0 : a.type) === "documentSection", k = !!(o != null && o.visualId || n != null && n.id), v = !!(o != null && o.visualId && s), D = k && !v, {
1664
1664
  saveAsDialogOpen: E,
1665
1665
  setSaveAsDialogOpen: N,
1666
1666
  handleSaveAs: y,
@@ -1685,7 +1685,7 @@ function Gs(e = {}) {
1685
1685
  /* @__PURE__ */ t(lt, {})
1686
1686
  ] });
1687
1687
  const I = async () => {
1688
- if (!c) {
1688
+ if (!d) {
1689
1689
  V.error("No sheet selected");
1690
1690
  return;
1691
1691
  }
@@ -1694,12 +1694,12 @@ function Gs(e = {}) {
1694
1694
  const M = {
1695
1695
  ...B(),
1696
1696
  visualId: void 0
1697
- }, Z = Ye(d, M.id);
1697
+ }, Z = Ye(c, M.id);
1698
1698
  try {
1699
1699
  const K = await f(M, {
1700
1700
  previousFrame: Z
1701
1701
  });
1702
- u(c, M, {
1702
+ u(d, M, {
1703
1703
  semanticExecutionPayload: K
1704
1704
  });
1705
1705
  } catch (K) {
@@ -1807,10 +1807,10 @@ function Gs(e = {}) {
1807
1807
  ] });
1808
1808
  }
1809
1809
  function Ks({ className: e }) {
1810
- const r = ee((h) => h.isDevMode), o = ee((h) => h.card.type), a = T((h) => h.isVisualEditing), { setIsDevMode: n } = tt(), { config: s } = pr(Or).tokenProps, c = (s == null ? void 0 : s.showAdvancedMode) !== !1;
1811
- if (!a || !c || !fr(o))
1810
+ const r = ee((h) => h.isDevMode), o = ee((h) => h.card.type), a = T((h) => h.isVisualEditing), { setIsDevMode: n } = tt(), { config: s } = pr(Or).tokenProps, d = (s == null ? void 0 : s.showAdvancedMode) !== !1;
1811
+ if (!a || !d || !fr(o))
1812
1812
  return null;
1813
- const d = r ? Ha : Wa, l = r ? "Visual editor" : "SQL editor", u = r ? "Switch to visual editor" : "Switch to SQL editor";
1813
+ const c = r ? Ha : Wa, l = r ? "Visual editor" : "SQL editor", u = r ? "Switch to visual editor" : "Switch to SQL editor";
1814
1814
  return /* @__PURE__ */ i(
1815
1815
  "button",
1816
1816
  {
@@ -1823,7 +1823,7 @@ function Ks({ className: e }) {
1823
1823
  e
1824
1824
  ),
1825
1825
  children: [
1826
- /* @__PURE__ */ t(d, { className: "h-3 w-3 text-muted-foreground" }),
1826
+ /* @__PURE__ */ t(c, { className: "h-3 w-3 text-muted-foreground" }),
1827
1827
  l
1828
1828
  ]
1829
1829
  }
@@ -1836,8 +1836,8 @@ function Xs({
1836
1836
  onDiscard: a,
1837
1837
  isSaving: n,
1838
1838
  title: s = "Unsaved changes",
1839
- description: c = "You have unsaved changes to this dashboard. What would you like to do?",
1840
- cancelLabel: d = "Cancel",
1839
+ description: d = "You have unsaved changes to this dashboard. What would you like to do?",
1840
+ cancelLabel: c = "Cancel",
1841
1841
  discardLabel: l = "Discard changes",
1842
1842
  saveLabel: u = "Save"
1843
1843
  }) {
@@ -1846,7 +1846,7 @@ function Xs({
1846
1846
  }, children: /* @__PURE__ */ i(ft, { children: [
1847
1847
  /* @__PURE__ */ i(gt, { children: [
1848
1848
  /* @__PURE__ */ t(bt, { children: s }),
1849
- /* @__PURE__ */ t(vt, { children: c })
1849
+ /* @__PURE__ */ t(vt, { children: d })
1850
1850
  ] }),
1851
1851
  /* @__PURE__ */ i(xt, { children: [
1852
1852
  /* @__PURE__ */ t(
@@ -1861,7 +1861,7 @@ function Xs({
1861
1861
  children: l
1862
1862
  }
1863
1863
  ),
1864
- /* @__PURE__ */ t(yt, { disabled: n, children: d }),
1864
+ /* @__PURE__ */ t(yt, { disabled: n, children: c }),
1865
1865
  /* @__PURE__ */ t(U, { type: "button", size: "xs", onClick: o, disabled: n, children: n ? /* @__PURE__ */ i($, { children: [
1866
1866
  /* @__PURE__ */ t(ie, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
1867
1867
  "Saving..."
@@ -1870,8 +1870,8 @@ function Xs({
1870
1870
  ] }) });
1871
1871
  }
1872
1872
  async function Ys(e) {
1873
- var s, c;
1874
- const r = (c = (s = T.getState()) == null ? void 0 : s.authToken) == null ? void 0 : c.accessToken;
1873
+ var s, d;
1874
+ const r = (d = (s = T.getState()) == null ? void 0 : s.authToken) == null ? void 0 : d.accessToken;
1875
1875
  if (!r)
1876
1876
  return;
1877
1877
  const o = `${e}/v1/invalidate-token`, a = await fetch(o, {
@@ -1926,7 +1926,7 @@ function Sn(e) {
1926
1926
  function Zs() {
1927
1927
  const { authToken: e, tokenProps: r } = Be(), o = xe((m) => m.activeExports), [a, n] = F(
1928
1928
  typeof document < "u" ? !document.hidden : !0
1929
- ), s = ge(null), c = ge(!1), d = ge(void 0), l = r == null ? void 0 : r.apiServiceUrl, u = e == null ? void 0 : e.accessToken, h = j(() => {
1929
+ ), s = ge(null), d = ge(!1), c = ge(void 0), l = r == null ? void 0 : r.apiServiceUrl, u = e == null ? void 0 : e.accessToken, h = j(() => {
1930
1930
  const m = xe.getState().activeExports;
1931
1931
  return Array.from(m.values()).filter(
1932
1932
  (g) => Te(g.status)
@@ -1943,12 +1943,12 @@ function Zs() {
1943
1943
  }, []);
1944
1944
  const p = j(async () => {
1945
1945
  if (!l || !u) {
1946
- c.current = !1;
1946
+ d.current = !1;
1947
1947
  return;
1948
1948
  }
1949
1949
  const m = h();
1950
1950
  if (m.length === 0) {
1951
- c.current = !1;
1951
+ d.current = !1;
1952
1952
  return;
1953
1953
  }
1954
1954
  const g = Date.now(), f = await Promise.allSettled(
@@ -1998,37 +1998,37 @@ function Zs() {
1998
1998
  ), N = Sn(E);
1999
1999
  s.current && clearTimeout(s.current), s.current = setTimeout(() => {
2000
2000
  var y;
2001
- (y = d.current) == null || y.call(d);
2001
+ (y = c.current) == null || y.call(c);
2002
2002
  }, N);
2003
2003
  } else
2004
- c.current = !1;
2004
+ d.current = !1;
2005
2005
  }, [l, u, h]);
2006
2006
  return J(() => {
2007
- d.current = p;
2007
+ c.current = p;
2008
2008
  }, [p]), J(() => {
2009
2009
  var g;
2010
- h().length > 0 && a && !c.current && (c.current = !0, (g = d.current) == null || g.call(d));
2010
+ h().length > 0 && a && !d.current && (d.current = !0, (g = c.current) == null || g.call(c));
2011
2011
  }, [o, a, h]), J(() => {
2012
2012
  var g;
2013
2013
  const m = h();
2014
- a && m.length > 0 && !c.current && (c.current = !0, (g = d.current) == null || g.call(d));
2014
+ a && m.length > 0 && !d.current && (d.current = !0, (g = c.current) == null || g.call(c));
2015
2015
  }, [a, h]), J(() => {
2016
- !a && s.current && (clearTimeout(s.current), s.current = null, c.current = !1);
2016
+ !a && s.current && (clearTimeout(s.current), s.current = null, d.current = !1);
2017
2017
  }, [a]), J(() => () => {
2018
2018
  s.current && (clearTimeout(s.current), s.current = null);
2019
2019
  }, []), {
2020
- isPolling: c.current,
2020
+ isPolling: d.current,
2021
2021
  isTabVisible: a,
2022
2022
  inProgressCount: h().length
2023
2023
  };
2024
2024
  }
2025
2025
  function Js() {
2026
- const { authToken: e, tokenProps: r } = Be(), o = xe((d) => d.activeExports), { recoverExport: a } = Qt(), n = ge(!1), s = r == null ? void 0 : r.apiServiceUrl, c = e == null ? void 0 : e.accessToken;
2026
+ const { authToken: e, tokenProps: r } = Be(), o = xe((c) => c.activeExports), { recoverExport: a } = Qt(), n = ge(!1), s = r == null ? void 0 : r.apiServiceUrl, d = e == null ? void 0 : e.accessToken;
2027
2027
  J(() => {
2028
- if (n.current || !s || !c) return;
2028
+ if (n.current || !s || !d) return;
2029
2029
  (async () => {
2030
2030
  try {
2031
- const { exports: l } = await ye((u) => $r(s, c, {
2031
+ const { exports: l } = await ye((u) => $r(s, d, {
2032
2032
  status: ["pending", "processing", "chunking", "compacting", "completed", "failed", "cancelled"],
2033
2033
  limit: 20
2034
2034
  // Limit to recent exports
@@ -2038,7 +2038,7 @@ function Js() {
2038
2038
  let h;
2039
2039
  if (u.status === "completed")
2040
2040
  try {
2041
- h = await ye((m) => Xe(s, c, u.id, m));
2041
+ h = await ye((m) => Xe(s, d, u.id, m));
2042
2042
  } catch (m) {
2043
2043
  console.error(
2044
2044
  `[useExportRecovery] Failed to get download URL for ${u.id}:`,
@@ -2058,7 +2058,7 @@ function Js() {
2058
2058
  console.error("[useExportRecovery] Failed to recover exports:", l), n.current = !0;
2059
2059
  }
2060
2060
  })();
2061
- }, [s, c, a, o]);
2061
+ }, [s, d, a, o]);
2062
2062
  }
2063
2063
  function Dn(e) {
2064
2064
  return e.title ? e.title : Te(
@@ -2067,33 +2067,33 @@ function Dn(e) {
2067
2067
  }
2068
2068
  function En(e, r = []) {
2069
2069
  let o = [];
2070
- function a(s, c) {
2071
- const d = ue.createContext(c);
2072
- d.displayName = s + "Context";
2070
+ function a(s, d) {
2071
+ const c = ue.createContext(d);
2072
+ c.displayName = s + "Context";
2073
2073
  const l = o.length;
2074
- o = [...o, c];
2074
+ o = [...o, d];
2075
2075
  const u = (p) => {
2076
2076
  var v;
2077
- const { scope: m, children: g, ...f } = p, b = ((v = m == null ? void 0 : m[e]) == null ? void 0 : v[l]) || d, k = ue.useMemo(() => f, Object.values(f));
2077
+ const { scope: m, children: g, ...f } = p, b = ((v = m == null ? void 0 : m[e]) == null ? void 0 : v[l]) || c, k = ue.useMemo(() => f, Object.values(f));
2078
2078
  return /* @__PURE__ */ t(b.Provider, { value: k, children: g });
2079
2079
  };
2080
2080
  u.displayName = s + "Provider";
2081
2081
  function h(p, m) {
2082
2082
  var b;
2083
- const g = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[l]) || d, f = ue.useContext(g);
2083
+ const g = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[l]) || c, f = ue.useContext(g);
2084
2084
  if (f) return f;
2085
- if (c !== void 0) return c;
2085
+ if (d !== void 0) return d;
2086
2086
  throw new Error(`\`${p}\` must be used within \`${s}\``);
2087
2087
  }
2088
2088
  return [u, h];
2089
2089
  }
2090
2090
  const n = () => {
2091
- const s = o.map((c) => ue.createContext(c));
2092
- return function(d) {
2093
- const l = (d == null ? void 0 : d[e]) || s;
2091
+ const s = o.map((d) => ue.createContext(d));
2092
+ return function(c) {
2093
+ const l = (c == null ? void 0 : c[e]) || s;
2094
2094
  return ue.useMemo(
2095
- () => ({ [`__scope${e}`]: { ...d, [e]: l } }),
2096
- [d, l]
2095
+ () => ({ [`__scope${e}`]: { ...c, [e]: l } }),
2096
+ [c, l]
2097
2097
  );
2098
2098
  };
2099
2099
  };
@@ -2108,11 +2108,11 @@ function kn(...e) {
2108
2108
  scopeName: n.scopeName
2109
2109
  }));
2110
2110
  return function(s) {
2111
- const c = a.reduce((d, { useScope: l, scopeName: u }) => {
2111
+ const d = a.reduce((c, { useScope: l, scopeName: u }) => {
2112
2112
  const p = l(s)[`__scope${u}`];
2113
- return { ...d, ...p };
2113
+ return { ...c, ...p };
2114
2114
  }, {});
2115
- return ue.useMemo(() => ({ [`__scope${r.scopeName}`]: c }), [c]);
2115
+ return ue.useMemo(() => ({ [`__scope${r.scopeName}`]: d }), [d]);
2116
2116
  };
2117
2117
  };
2118
2118
  return o.scopeName = r.scopeName, o;
@@ -2137,8 +2137,8 @@ var An = [
2137
2137
  "ul"
2138
2138
  ], nr = An.reduce((e, r) => {
2139
2139
  const o = br(`Primitive.${r}`), a = ue.forwardRef((n, s) => {
2140
- const { asChild: c, ...d } = n, l = c ? o : r;
2141
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(l, { ...d, ref: s });
2140
+ const { asChild: d, ...c } = n, l = d ? o : r;
2141
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(l, { ...c, ref: s });
2142
2142
  });
2143
2143
  return a.displayName = `Primitive.${r}`, { ...e, [r]: a };
2144
2144
  }, {}), It = "Progress", Ft = 100, [In] = En(It), [Fn, Pn] = In(It), sr = ue.forwardRef(
@@ -2148,24 +2148,24 @@ var An = [
2148
2148
  value: a = null,
2149
2149
  max: n,
2150
2150
  getValueLabel: s = Tn,
2151
- ...c
2151
+ ...d
2152
2152
  } = e;
2153
2153
  (n || n === 0) && !Rt(n) && console.error(Ln(`${n}`, "Progress"));
2154
- const d = Rt(n) ? n : Ft;
2155
- a !== null && !Bt(a, d) && console.error(Un(`${a}`, "Progress"));
2156
- const l = Bt(a, d) ? a : null, u = Ze(l) ? s(l, d) : void 0;
2157
- return /* @__PURE__ */ t(Fn, { scope: o, value: l, max: d, children: /* @__PURE__ */ t(
2154
+ const c = Rt(n) ? n : Ft;
2155
+ a !== null && !Bt(a, c) && console.error(Un(`${a}`, "Progress"));
2156
+ const l = Bt(a, c) ? a : null, u = Ze(l) ? s(l, c) : void 0;
2157
+ return /* @__PURE__ */ t(Fn, { scope: o, value: l, max: c, children: /* @__PURE__ */ t(
2158
2158
  nr.div,
2159
2159
  {
2160
- "aria-valuemax": d,
2160
+ "aria-valuemax": c,
2161
2161
  "aria-valuemin": 0,
2162
2162
  "aria-valuenow": Ze(l) ? l : void 0,
2163
2163
  "aria-valuetext": u,
2164
2164
  role: "progressbar",
2165
- "data-state": lr(l, d),
2165
+ "data-state": lr(l, c),
2166
2166
  "data-value": l ?? void 0,
2167
- "data-max": d,
2168
- ...c,
2167
+ "data-max": c,
2168
+ ...d,
2169
2169
  ref: r
2170
2170
  }
2171
2171
  ) });
@@ -2214,9 +2214,9 @@ function Un(e, r) {
2214
2214
 
2215
2215
  Defaulting to \`null\`.`;
2216
2216
  }
2217
- var dr = sr, Vn = ir;
2218
- const cr = ue.forwardRef(({ className: e, value: r, ...o }, a) => /* @__PURE__ */ t(
2219
- dr,
2217
+ var cr = sr, Vn = ir;
2218
+ const dr = ue.forwardRef(({ className: e, value: r, ...o }, a) => /* @__PURE__ */ t(
2219
+ cr,
2220
2220
  {
2221
2221
  ref: a,
2222
2222
  className: Y(
@@ -2233,7 +2233,7 @@ const cr = ue.forwardRef(({ className: e, value: r, ...o }, a) => /* @__PURE__ *
2233
2233
  )
2234
2234
  }
2235
2235
  ));
2236
- cr.displayName = dr.displayName;
2236
+ dr.displayName = cr.displayName;
2237
2237
  function Rn({
2238
2238
  export: e,
2239
2239
  onRemove: r,
@@ -2251,13 +2251,13 @@ function Rn({
2251
2251
  n("preparing");
2252
2252
  const b = await o(e);
2253
2253
  n(b === "denied" ? "denied" : "idle");
2254
- }, c = (b) => {
2254
+ }, d = (b) => {
2255
2255
  b.stopPropagation(), r == null || r(e.id);
2256
- }, d = Te(e.status), l = e.status === "pending" ? { text: Q.queued } : e.status === "compacting" || e.phase === "finalizing" ? { text: Q.finalizing } : e.phase === "preparing" ? { text: Q.preparing } : e.phase === "acquiring" ? { text: Q.fetchingRows(e.rowsProcessed ?? 0) } : {
2256
+ }, c = Te(e.status), l = e.status === "pending" ? { text: Q.queued } : e.status === "compacting" || e.phase === "finalizing" ? { text: Q.finalizing } : e.phase === "preparing" ? { text: Q.preparing } : e.phase === "acquiring" ? { text: Q.fetchingRows(e.rowsProcessed ?? 0) } : {
2257
2257
  text: Q.processing,
2258
2258
  detail: e.progress !== null ? Q.percentComplete(e.progress) : e.rowsProcessed !== void 0 ? Q.rowsProcessed(e.rowsProcessed) : void 0,
2259
2259
  bar: e.progress
2260
- }, u = d && Date.now() - e.startedAt.getTime() >= zr, h = e.status === "completed" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "pending" || e.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", p = e.status === "completed" ? Q.ready : e.status === "failed" ? Q.failed : e.status === "cancelled" ? Q.cancelled : Q.inProgress, m = Ut(e.startedAt, { addSuffix: !0 }), g = [
2260
+ }, u = c && Date.now() - e.startedAt.getTime() >= zr, h = e.status === "completed" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "pending" || e.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", p = e.status === "completed" ? Q.ready : e.status === "failed" ? Q.failed : e.status === "cancelled" ? Q.cancelled : Q.inProgress, m = Ut(e.startedAt, { addSuffix: !0 }), g = [
2261
2261
  e.status === "completed" && e.totalRows !== null ? `${e.totalRows.toLocaleString()} rows` : null,
2262
2262
  e.status === "completed" && e.fileSize ? jr(e.fileSize) : null
2263
2263
  ].filter((b) => !!b), f = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
@@ -2286,7 +2286,7 @@ function Rn({
2286
2286
  variant: "ghost",
2287
2287
  size: "xs",
2288
2288
  className: "-mr-1.5 h-5 w-5 shrink-0 px-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100",
2289
- onClick: c,
2289
+ onClick: d,
2290
2290
  "aria-label": "Remove notification",
2291
2291
  title: "Remove",
2292
2292
  children: /* @__PURE__ */ t(Me, { className: "h-3.5 w-3.5", strokeWidth: 1.75 })
@@ -2308,7 +2308,7 @@ function Rn({
2308
2308
  /* @__PURE__ */ t(Wr, { className: "mt-0.5 h-3 w-3 shrink-0 text-destructive", strokeWidth: 1.75 }),
2309
2309
  /* @__PURE__ */ t("span", { children: Q.linkExpired })
2310
2310
  ] }),
2311
- d && /* @__PURE__ */ i("div", { className: "text-[12px] leading-4 text-muted-foreground", children: [
2311
+ c && /* @__PURE__ */ i("div", { className: "text-[12px] leading-4 text-muted-foreground", children: [
2312
2312
  /* @__PURE__ */ t("span", { className: "tabular-nums", children: l.text }),
2313
2313
  l.detail && /* @__PURE__ */ i($, { children: [
2314
2314
  " ",
@@ -2320,7 +2320,7 @@ function Rn({
2320
2320
  f,
2321
2321
  " ",
2322
2322
  /* @__PURE__ */ t("span", { children: Q.started(Ut(e.startedAt)) }),
2323
- l.bar !== void 0 && l.bar !== null && /* @__PURE__ */ t(cr, { value: l.bar, className: "mt-1.5 h-1" }),
2323
+ l.bar !== void 0 && l.bar !== null && /* @__PURE__ */ t(dr, { value: l.bar, className: "mt-1.5 h-1" }),
2324
2324
  u && /* @__PURE__ */ t("div", { className: "mt-1", children: Q.longRunning })
2325
2325
  ] }),
2326
2326
  e.status === "cancelled" && /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
@@ -2340,7 +2340,7 @@ function Rn({
2340
2340
  ] });
2341
2341
  }
2342
2342
  function Bn() {
2343
- const { authToken: e, tokenProps: r } = Be(), o = xe((v) => v.activeExports), { clearCompleted: a, removeExport: n, updateExport: s, applyServerStatus: c } = Qt(), [d, l] = F(!1), [u, h] = F(!1), p = Array.from(o.values()).sort(
2343
+ const { authToken: e, tokenProps: r } = Be(), o = xe((v) => v.activeExports), { clearCompleted: a, removeExport: n, updateExport: s, applyServerStatus: d } = Qt(), [c, l] = F(!1), [u, h] = F(!1), p = Array.from(o.values()).sort(
2344
2344
  (v, D) => D.startedAt.getTime() - v.startedAt.getTime()
2345
2345
  ), m = p.some(
2346
2346
  (v) => v.status === "completed" || v.status === "failed" || v.status === "cancelled"
@@ -2366,7 +2366,7 @@ function Bn() {
2366
2366
  } catch (S) {
2367
2367
  console.error(`Failed to get download URL for ${N.id}:`, S);
2368
2368
  }
2369
- c(N.id, At(y, w));
2369
+ d(N.id, At(y, w));
2370
2370
  } catch (y) {
2371
2371
  s(N.id, { downloadUrl: void 0 }), console.error(`Failed to refresh export ${N.id}:`, y);
2372
2372
  }
@@ -2381,7 +2381,7 @@ function Bn() {
2381
2381
  e == null ? void 0 : e.accessToken,
2382
2382
  r == null ? void 0 : r.apiServiceUrl,
2383
2383
  s,
2384
- c
2384
+ d
2385
2385
  ]), f = j(async () => {
2386
2386
  const v = r == null ? void 0 : r.apiServiceUrl, D = e == null ? void 0 : e.accessToken;
2387
2387
  if (!v || !D) {
@@ -2461,14 +2461,14 @@ function Bn() {
2461
2461
  size: "xs",
2462
2462
  className: "h-6 w-6 px-0 text-muted-foreground hover:text-foreground",
2463
2463
  onClick: g,
2464
- disabled: d,
2464
+ disabled: c,
2465
2465
  title: "Refresh status",
2466
2466
  "aria-label": "Refresh status",
2467
2467
  children: /* @__PURE__ */ t(
2468
2468
  Gt,
2469
2469
  {
2470
2470
  strokeWidth: 1.75,
2471
- className: `h-3.5 w-3.5 ${d ? "animate-spin" : ""}`
2471
+ className: `h-3.5 w-3.5 ${c ? "animate-spin" : ""}`
2472
2472
  }
2473
2473
  )
2474
2474
  }
@@ -2491,7 +2491,7 @@ function eo({
2491
2491
  }) {
2492
2492
  const r = xe((l) => l.activeExports), o = qr(), a = r.size > 0, n = Array.from(r.values()).some(
2493
2493
  (l) => l.status === "completed" || l.status === "failed"
2494
- ), c = o > 0 ? o > 9 ? "9+" : String(o) : null;
2494
+ ), d = o > 0 ? o > 9 ? "9+" : String(o) : null;
2495
2495
  return /* @__PURE__ */ i(qe, { children: [
2496
2496
  /* @__PURE__ */ t(He, { asChild: !0, children: /* @__PURE__ */ i(
2497
2497
  U,
@@ -2505,8 +2505,8 @@ function eo({
2505
2505
  a && /* @__PURE__ */ t(
2506
2506
  "span",
2507
2507
  {
2508
- className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${c ? "-right-0.5 -top-0.5 h-3.5 min-w-3.5 px-0.5 text-[9px] font-semibold" : "right-1 top-1 h-1.5 w-1.5"}`,
2509
- children: c
2508
+ className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${d ? "-right-0.5 -top-0.5 h-3.5 min-w-3.5 px-0.5 text-[9px] font-semibold" : "right-1 top-1 h-1.5 w-1.5"}`,
2509
+ children: d
2510
2510
  }
2511
2511
  )
2512
2512
  ]
@@ -2532,8 +2532,8 @@ function _n({
2532
2532
  initialMode: n = "manage"
2533
2533
  }) {
2534
2534
  const s = n === "create", {
2535
- forceClose: c,
2536
- handleOpenChange: d,
2535
+ forceClose: d,
2536
+ handleOpenChange: c,
2537
2537
  isCreateFlowActive: l,
2538
2538
  preventPassiveDismissDuringCreate: u,
2539
2539
  resolvedOpen: h,
@@ -2590,11 +2590,11 @@ function _n({
2590
2590
  );
2591
2591
  }, N = j(() => {
2592
2592
  if (s) {
2593
- c();
2593
+ d();
2594
2594
  return;
2595
2595
  }
2596
2596
  p(!1);
2597
- }, [s, c, p]), y = /* @__PURE__ */ t(
2597
+ }, [s, d, p]), y = /* @__PURE__ */ t(
2598
2598
  er,
2599
2599
  {
2600
2600
  scope: "dashboard",
@@ -2619,7 +2619,7 @@ function _n({
2619
2619
  ] }),
2620
2620
  y
2621
2621
  ] });
2622
- return a ? /* @__PURE__ */ i(qe, { open: h, onOpenChange: d, children: [
2622
+ return a ? /* @__PURE__ */ i(qe, { open: h, onOpenChange: c, children: [
2623
2623
  /* @__PURE__ */ t(He, { asChild: !0, children: o || /* @__PURE__ */ i(U, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
2624
2624
  /* @__PURE__ */ t($t, { className: "mr-2 h-4 w-4" }),
2625
2625
  "Controls"
@@ -2634,7 +2634,7 @@ function _n({
2634
2634
  children: S
2635
2635
  }
2636
2636
  )
2637
- ] }) : /* @__PURE__ */ t(Ue, { open: h, onOpenChange: d, children: /* @__PURE__ */ i(
2637
+ ] }) : /* @__PURE__ */ t(Ue, { open: h, onOpenChange: c, children: /* @__PURE__ */ i(
2638
2638
  Ve,
2639
2639
  {
2640
2640
  className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
@@ -2679,8 +2679,8 @@ function $n({
2679
2679
  const a = o === "create", {
2680
2680
  forceClose: n,
2681
2681
  handleOpenChange: s,
2682
- isCreateFlowActive: c,
2683
- preventPassiveDismissDuringCreate: d,
2682
+ isCreateFlowActive: d,
2683
+ preventPassiveDismissDuringCreate: c,
2684
2684
  resolvedOpen: l,
2685
2685
  setIsCreateFlowActive: u
2686
2686
  } = Jt({
@@ -2738,16 +2738,16 @@ function $n({
2738
2738
  Ve,
2739
2739
  {
2740
2740
  className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
2741
- onEscapeKeyDown: d,
2742
- onPointerDownOutside: d,
2741
+ onEscapeKeyDown: c,
2742
+ onPointerDownOutside: c,
2743
2743
  children: [
2744
- /* @__PURE__ */ i(wt, { className: c ? "space-y-0" : void 0, children: [
2745
- /* @__PURE__ */ t(Re, { className: "text-[15px]", children: c ? "Add document control" : "Document Controls" }),
2744
+ /* @__PURE__ */ i(wt, { className: d ? "space-y-0" : void 0, children: [
2745
+ /* @__PURE__ */ t(Re, { className: "text-[15px]", children: d ? "Add document control" : "Document Controls" }),
2746
2746
  /* @__PURE__ */ t(
2747
2747
  Nt,
2748
2748
  {
2749
- className: c ? "sr-only" : "text-[13px]",
2750
- children: c ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
2749
+ className: d ? "sr-only" : "text-[13px]",
2750
+ children: d ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
2751
2751
  }
2752
2752
  )
2753
2753
  ] }),
@@ -2798,18 +2798,18 @@ function qn({
2798
2798
  nextDefaultValues: n,
2799
2799
  change: s
2800
2800
  }) {
2801
- const c = new Map(
2801
+ const d = new Map(
2802
2802
  a.map((m) => [
2803
2803
  m.id,
2804
2804
  Wn(m, n)
2805
2805
  ])
2806
- ), d = (s == null ? void 0 : s.type) === "rename" ? { oldId: s.oldId, newId: s.newId } : null, l = /* @__PURE__ */ new Set(), u = [];
2806
+ ), c = (s == null ? void 0 : s.type) === "rename" ? { oldId: s.oldId, newId: s.newId } : null, l = /* @__PURE__ */ new Set(), u = [];
2807
2807
  for (const m of o) {
2808
2808
  if (m.kind !== "control") {
2809
2809
  u.push(m);
2810
2810
  continue;
2811
2811
  }
2812
- const g = c.get(m.control.id) || ((d == null ? void 0 : d.oldId) === m.control.id ? c.get(d.newId) : void 0);
2812
+ const g = d.get(m.control.id) || ((c == null ? void 0 : c.oldId) === m.control.id ? d.get(c.newId) : void 0);
2813
2813
  if (!g)
2814
2814
  continue;
2815
2815
  l.add(g.id);
@@ -2827,7 +2827,7 @@ function qn({
2827
2827
  control: b
2828
2828
  });
2829
2829
  }
2830
- for (const m of c.values())
2830
+ for (const m of d.values())
2831
2831
  l.has(m.id) || u.push(
2832
2832
  Ia({
2833
2833
  control: m,
@@ -2849,8 +2849,8 @@ function Hn({
2849
2849
  settingsContent: a,
2850
2850
  size: n = "default",
2851
2851
  className: s,
2852
- primaryButtonClassName: c,
2853
- secondaryButtonClassName: d,
2852
+ primaryButtonClassName: d,
2853
+ secondaryButtonClassName: c,
2854
2854
  pickerContentClassName: l,
2855
2855
  settingsContentClassName: u
2856
2856
  }) {
@@ -2875,7 +2875,7 @@ function Hn({
2875
2875
  size: "xs",
2876
2876
  className: Y(
2877
2877
  "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",
2878
- c
2878
+ d
2879
2879
  ),
2880
2880
  children: [
2881
2881
  e ? /* @__PURE__ */ t(Ba, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Kt, { className: "h-3.5 w-3.5" }),
@@ -2905,7 +2905,7 @@ function Hn({
2905
2905
  size: "xs",
2906
2906
  className: Y(
2907
2907
  "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",
2908
- d
2908
+ c
2909
2909
  ),
2910
2910
  "aria-label": "Filter and control actions",
2911
2911
  children: /* @__PURE__ */ t(Yt, { className: "h-3.5 w-3.5" })
@@ -2931,7 +2931,7 @@ function Hn({
2931
2931
  }
2932
2932
  function Qn() {
2933
2933
  Ma();
2934
- const e = T((l) => l.selectedSheetId), r = T((l) => l.selectedFrameId), o = T((l) => l.dashboard), a = T((l) => l.actions.getSelectedFrame), { setSelectedFrameId: n } = pe(), { setCard: s } = tt(), c = ee((l) => l.card.dataSource);
2934
+ const e = T((l) => l.selectedSheetId), r = T((l) => l.selectedFrameId), o = T((l) => l.dashboard), a = T((l) => l.actions.getSelectedFrame), { setSelectedFrameId: n } = pe(), { setCard: s } = tt(), d = ee((l) => l.card.dataSource);
2935
2935
  return J(() => {
2936
2936
  var u, h;
2937
2937
  let l = a();
@@ -2944,7 +2944,7 @@ function Qn() {
2944
2944
  p && s(p);
2945
2945
  }
2946
2946
  }, [a, e, r, o, n, s]), {
2947
- hasEntities: !!(c != null && c.selectedEntities && c.selectedEntities.length > 0)
2947
+ hasEntities: !!(d != null && d.selectedEntities && d.selectedEntities.length > 0)
2948
2948
  };
2949
2949
  }
2950
2950
  function Gn() {
@@ -2953,9 +2953,9 @@ function Gn() {
2953
2953
  ), o = T((l) => l.actions.addFilter), { hasEntities: a } = Qn(), { isLoading: n } = Xr(), s = oe(
2954
2954
  () => Fa(e, r),
2955
2955
  [e, r]
2956
- ), d = !Pa(e.filters) && s.hasEligibleCards && !n;
2956
+ ), c = !Pa(e.filters) && s.hasEligibleCards && !n;
2957
2957
  return /* @__PURE__ */ i("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
2958
- d && /* @__PURE__ */ t("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ i(
2958
+ c && /* @__PURE__ */ t("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ i(
2959
2959
  "button",
2960
2960
  {
2961
2961
  type: "button",
@@ -2987,14 +2987,14 @@ function Kn({
2987
2987
  onDismiss: a
2988
2988
  }) {
2989
2989
  const n = T(
2990
- (d) => d.dashboard.filterLayout
2990
+ (c) => c.dashboard.filterLayout
2991
2991
  ), { setFilterLayout: s } = pe();
2992
2992
  n != null && n.displayMode;
2993
- const c = (n == null ? void 0 : n.toolbarWrap) ?? !1;
2993
+ const d = (n == null ? void 0 : n.toolbarWrap) ?? !1;
2994
2994
  return n == null || n.showDownloadButton, /* @__PURE__ */ i("div", { className: "w-[300px]", children: [
2995
2995
  /* @__PURE__ */ i("div", { className: "p-1", children: [
2996
2996
  /* @__PURE__ */ t(
2997
- dt,
2997
+ ct,
2998
2998
  {
2999
2999
  icon: Kt,
3000
3000
  label: "Add filter",
@@ -3004,7 +3004,7 @@ function Kn({
3004
3004
  }
3005
3005
  ),
3006
3006
  /* @__PURE__ */ t(
3007
- dt,
3007
+ ct,
3008
3008
  {
3009
3009
  icon: $t,
3010
3010
  label: "Add control",
@@ -3014,7 +3014,7 @@ function Kn({
3014
3014
  }
3015
3015
  ),
3016
3016
  /* @__PURE__ */ t(
3017
- dt,
3017
+ ct,
3018
3018
  {
3019
3019
  icon: Xt,
3020
3020
  label: "Manage controls",
@@ -3033,15 +3033,15 @@ function Kn({
3033
3033
  {
3034
3034
  id: "filter-display-wrap",
3035
3035
  label: "Wrap to multiple lines",
3036
- checked: c,
3037
- onCheckedChange: (d) => s({ toolbarWrap: d === !0 })
3036
+ checked: d,
3037
+ onCheckedChange: (c) => s({ toolbarWrap: c === !0 })
3038
3038
  }
3039
3039
  ),
3040
3040
  Mt
3041
3041
  ] })
3042
3042
  ] });
3043
3043
  }
3044
- function dt({
3044
+ function ct({
3045
3045
  icon: e,
3046
3046
  label: r,
3047
3047
  onClick: o
@@ -3086,11 +3086,11 @@ function to({
3086
3086
  settingsContentClassName: s
3087
3087
  }) {
3088
3088
  var y;
3089
- const [c, d] = F(null), l = T((w) => w.dashboard), u = T((w) => w.selectedSheetId), h = T((w) => w.showFilters), p = T((w) => w.actions), { setDocumentPanelTarget: m, setShowFilters: g } = p, f = (y = l.sheets) == null ? void 0 : y.find(
3089
+ const [d, c] = F(null), l = T((w) => w.dashboard), u = T((w) => w.selectedSheetId), h = T((w) => w.showFilters), p = T((w) => w.actions), { setDocumentPanelTarget: m, setShowFilters: g } = p, f = (y = l.sheets) == null ? void 0 : y.find(
3090
3090
  (w) => w.id === u
3091
3091
  ), b = _a(f), k = j((w) => {
3092
3092
  window.setTimeout(() => {
3093
- d(w);
3093
+ c(w);
3094
3094
  }, 0);
3095
3095
  }, []), v = j(
3096
3096
  (w) => {
@@ -3140,24 +3140,24 @@ function to({
3140
3140
  settingsContentClassName: s
3141
3141
  }
3142
3142
  ),
3143
- c ? b ? /* @__PURE__ */ t(
3143
+ d ? b ? /* @__PURE__ */ t(
3144
3144
  $n,
3145
3145
  {
3146
3146
  open: !0,
3147
3147
  onOpenChange: (w) => {
3148
- w || d(null);
3148
+ w || c(null);
3149
3149
  },
3150
- initialMode: c
3150
+ initialMode: d
3151
3151
  }
3152
3152
  ) : /* @__PURE__ */ t(
3153
3153
  _n,
3154
3154
  {
3155
3155
  open: !0,
3156
3156
  onOpenChange: (w) => {
3157
- w || d(null);
3157
+ w || c(null);
3158
3158
  },
3159
3159
  showTrigger: !1,
3160
- initialMode: c
3160
+ initialMode: d
3161
3161
  }
3162
3162
  ) : null
3163
3163
  ] });
@@ -3202,8 +3202,8 @@ function es(e) {
3202
3202
  if (n < 24) return `${n}h ago`;
3203
3203
  const s = Math.round(n / 24);
3204
3204
  if (s < 7) return `${s}d ago`;
3205
- const c = Math.round(s / 7);
3206
- return c < 5 ? `${c}w ago` : `${Math.round(s / 30)}mo ago`;
3205
+ const d = Math.round(s / 7);
3206
+ return d < 5 ? `${d}w ago` : `${Math.round(s / 30)}mo ago`;
3207
3207
  }
3208
3208
  function ts(e) {
3209
3209
  return e.scheduleExpr ? Oa(
@@ -3262,8 +3262,8 @@ function ss({
3262
3262
  error: a,
3263
3263
  loading: n,
3264
3264
  onSourceViewChange: s,
3265
- onClose: c,
3266
- onEdit: d,
3265
+ onClose: d,
3266
+ onEdit: c,
3267
3267
  onNew: l,
3268
3268
  canCreate: u,
3269
3269
  canCreateScheduledReport: h,
@@ -3293,7 +3293,7 @@ function ss({
3293
3293
  "button",
3294
3294
  {
3295
3295
  type: "button",
3296
- onClick: c,
3296
+ onClick: d,
3297
3297
  className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
3298
3298
  "aria-label": `Close ${x.replace("&", "and")} panel`,
3299
3299
  children: /* @__PURE__ */ t(Me, { className: "h-3.5 w-3.5" })
@@ -3400,7 +3400,7 @@ function ss({
3400
3400
  briefing: I,
3401
3401
  isOpening: b === I.id,
3402
3402
  isBusy: k === I.id,
3403
- onOpen: () => d(I.id),
3403
+ onOpen: () => c(I.id),
3404
3404
  onRunNow: () => m(I),
3405
3405
  onTogglePause: () => g(I),
3406
3406
  onDelete: () => f(I)
@@ -3648,15 +3648,15 @@ function ls({
3648
3648
  onOpen: a,
3649
3649
  onRunNow: n,
3650
3650
  onTogglePause: s,
3651
- onDelete: c
3651
+ onDelete: d
3652
3652
  }) {
3653
- const d = e.status === "PAUSED", l = e.hasActiveRun, u = rs(e), h = es(e.lastRunAt), p = e.lastRunStatus, m = me(e), g = p === "SUCCESS" ? ze.success.dot : p === "FAILED" ? ze.danger.dot : p ? ze.warning.dot : ze.neutral.dot;
3653
+ const c = e.status === "PAUSED", l = e.hasActiveRun, u = rs(e), h = es(e.lastRunAt), p = e.lastRunStatus, m = me(e), g = p === "SUCCESS" ? ze.success.dot : p === "FAILED" ? ze.danger.dot : p ? ze.warning.dot : ze.neutral.dot;
3654
3654
  return /* @__PURE__ */ i(
3655
3655
  "div",
3656
3656
  {
3657
3657
  className: Y(
3658
3658
  "group relative border-b border-border/60 px-4 py-3 transition-colors hover:bg-muted/60",
3659
- d && "opacity-70"
3659
+ c && "opacity-70"
3660
3660
  ),
3661
3661
  children: [
3662
3662
  /* @__PURE__ */ i(
@@ -3672,7 +3672,7 @@ function ls({
3672
3672
  children: [
3673
3673
  /* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
3674
3674
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
3675
- d ? /* @__PURE__ */ t("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: "· Paused" }) : null
3675
+ c ? /* @__PURE__ */ t("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: "· Paused" }) : null
3676
3676
  ] }),
3677
3677
  /* @__PURE__ */ i("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground", children: [
3678
3678
  /* @__PURE__ */ t("span", { children: m.typeLabel }),
@@ -3739,7 +3739,7 @@ function ls({
3739
3739
  onClick: (f) => {
3740
3740
  f.preventDefault(), s();
3741
3741
  },
3742
- children: d ? /* @__PURE__ */ i($, { children: [
3742
+ children: c ? /* @__PURE__ */ i($, { children: [
3743
3743
  /* @__PURE__ */ t(ta, { className: "h-3.5 w-3.5" }),
3744
3744
  "Resume"
3745
3745
  ] }) : /* @__PURE__ */ i($, { children: [
@@ -3753,7 +3753,7 @@ function ls({
3753
3753
  X,
3754
3754
  {
3755
3755
  onClick: (f) => {
3756
- f.preventDefault(), c();
3756
+ f.preventDefault(), d();
3757
3757
  },
3758
3758
  className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
3759
3759
  children: [
@@ -3769,7 +3769,7 @@ function ls({
3769
3769
  }
3770
3770
  );
3771
3771
  }
3772
- const ds = 2e3, cs = 20 * 6e4;
3772
+ const cs = 2e3, ds = 20 * 6e4;
3773
3773
  function us(e) {
3774
3774
  return (e == null ? void 0 : e.trim()) || "This dashboard";
3775
3775
  }
@@ -3785,19 +3785,19 @@ async function ps(e) {
3785
3785
  const o = [];
3786
3786
  let a = 1, n = 0, s = Number.POSITIVE_INFINITY;
3787
3787
  for (; n < s; ) {
3788
- const c = await e.apiClient.listBriefings(
3788
+ const d = await e.apiClient.listBriefings(
3789
3789
  e.apiServiceUrl,
3790
3790
  e.token,
3791
3791
  { scope: "organization", page: a, pageSize: 100 }
3792
3792
  );
3793
- if (o.push(...c.briefings), n += c.briefings.length, s = c.total, c.briefings.length === 0 || n >= s) break;
3793
+ if (o.push(...d.briefings), n += d.briefings.length, s = d.total, d.briefings.length === 0 || n >= s) break;
3794
3794
  a += 1;
3795
3795
  }
3796
3796
  return o;
3797
3797
  }
3798
3798
  const fs = {
3799
- listBriefings: ca,
3800
- getBriefing: da,
3799
+ listBriefings: da,
3800
+ getBriefing: ca,
3801
3801
  pauseBriefing: la,
3802
3802
  resumeBriefing: ia,
3803
3803
  deleteBriefing: oa,
@@ -3810,13 +3810,13 @@ function gs({
3810
3810
  token: a,
3811
3811
  onTerminal: n,
3812
3812
  onTimeout: s,
3813
- onExpand: c
3813
+ onExpand: d
3814
3814
  }) {
3815
- const [d, l] = F(r), { startRun: u } = va({
3815
+ const [c, l] = F(r), { startRun: u } = va({
3816
3816
  apiServiceUrl: o,
3817
3817
  token: a,
3818
- intervalMs: ds,
3819
- timeoutMs: cs,
3818
+ intervalMs: cs,
3819
+ timeoutMs: ds,
3820
3820
  fetchRun: ({
3821
3821
  apiServiceUrl: p,
3822
3822
  token: m,
@@ -3834,7 +3834,7 @@ function gs({
3834
3834
  }), h = ge(!1);
3835
3835
  return J(() => {
3836
3836
  h.current || (h.current = !0, ya(r.status) ? u(r) : Ca(r.status) && n(r));
3837
- }, [r, n, u]), /* @__PURE__ */ t(wa, { run: d, onExpand: c });
3837
+ }, [r, n, u]), /* @__PURE__ */ t(wa, { run: c, onExpand: d });
3838
3838
  }
3839
3839
  function ro(e) {
3840
3840
  return /* @__PURE__ */ t(aa, { children: /* @__PURE__ */ t(bs, { ...e }) });
@@ -3846,22 +3846,22 @@ function bs({
3846
3846
  token: a,
3847
3847
  disabled: n,
3848
3848
  className: s,
3849
- manageBriefingsHref: c,
3850
- open: d,
3849
+ manageBriefingsHref: d,
3850
+ open: c,
3851
3851
  onOpenChange: l,
3852
3852
  hideTrigger: u = !1,
3853
3853
  workflowIntent: h,
3854
3854
  client: p
3855
3855
  }) {
3856
- const { authToken: m, tokenProps: g } = Be(), f = na(), b = !h || f.canCreate && (h === "scheduled_report" || f.analyticalBriefingsEnabled), [k, v] = F(!1), D = d ?? k, E = (A) => {
3857
- d === void 0 && v(A), l == null || l(A);
3856
+ const { authToken: m, tokenProps: g } = Be(), f = na(), b = !h || f.canCreate && (h === "scheduled_report" || f.analyticalBriefingsEnabled), [k, v] = F(!1), D = c ?? k, E = (A) => {
3857
+ c === void 0 && v(A), l == null || l(A);
3858
3858
  }, [N, y] = F(
3859
3859
  h ? "author" : "list"
3860
3860
  ), [w, S] = F(
3861
3861
  h ?? "analytical_briefing"
3862
3862
  ), [x, B] = F("dashboard"), [I, W] = F(
3863
3863
  []
3864
- ), [P, M] = F(null), Z = h && !b && !P ? "list" : N, [K, Ce] = F(!1), [de, O] = F(null), [te, re] = F(null), [L, ae] = F(
3864
+ ), [P, M] = F(null), Z = h && !b && !P ? "list" : N, [K, Ce] = F(!1), [ce, O] = F(null), [te, re] = F(null), [L, ae] = F(
3865
3865
  null
3866
3866
  ), [le, G] = F(null), be = ge(null), ke = ge(D);
3867
3867
  J(() => {
@@ -3957,7 +3957,7 @@ function bs({
3957
3957
  re(null);
3958
3958
  }
3959
3959
  }
3960
- }, ce = async (A) => {
3960
+ }, de = async (A) => {
3961
3961
  if (!q || !H) return;
3962
3962
  const { noun: _ } = me(A), Oe = _ === "report" ? "Report" : "Briefing";
3963
3963
  re(A.id);
@@ -4106,12 +4106,12 @@ function bs({
4106
4106
  z(A);
4107
4107
  },
4108
4108
  onTogglePause: (A) => {
4109
- ce(A);
4109
+ de(A);
4110
4110
  },
4111
4111
  onDelete: (A) => ae(A),
4112
- selectingId: de,
4112
+ selectingId: ce,
4113
4113
  busyId: te,
4114
- manageBriefingsHref: c,
4114
+ manageBriefingsHref: d,
4115
4115
  contentKind: h === "scheduled_report" ? "reports" : h === "analytical_briefing" ? "briefings" : void 0,
4116
4116
  hideHeader: !!h
4117
4117
  }