react-semaphor 0.0.364 → 0.0.365

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.
@@ -1,6 +1,6 @@
1
- import { c as _, w as Cs, x as T, y as Re, z as Oe, A as e, B as Ss, H as ws, J as M, p as Qe, K as ks, M as zs, N as Os, Q as ca, R as H, V as oe, W as da, Y as Is, Z as Ms, _ as Ds, $ as ua, a0 as ma, a1 as tt, a2 as Zs, a3 as Z, a4 as Ue, i as nt, a5 as u, a6 as lt, a7 as rt, P as ha, F as xa, a8 as Ge, a9 as We, aa as pa, ab as it, ac as fa, ad as xe, ae as pe, af as fe, ag as ge, ah as we, ai as je, aj as ee, ak as Ts, al as Fs, am as Ls, an as ga, ao as ja, ap as me, aq as ot, ar as ct, as as ba, at as dt, C as ut, au as mt, av as va, aw as be, ax as ht, ay as Je, az as ts, aA as De, aB as qe, aC as ke, aD as xt, X as Es, aE as Xs, aF as pt, aG as ft, aH as gt, aI as jt, l as bt, aJ as vt, aK as yt, aL as Fe, aM as ne, aN as ya, aO as Nt, aP as ds, aQ as Ct, aR as St, aS as vs, o as wt, a as kt, aT as ns, aU as Se, aV as ls, aW as zt, aX as Ot, aY as It, aZ as Mt, a_ as bs, a$ as Dt, b0 as Ys, b1 as Tt, b2 as ea, b3 as Ft, b4 as Lt, b5 as Et, b6 as Vt, b7 as Na, b8 as At, b9 as Vs, ba as Ca, bb as qt, bc as Rt, bd as es, be as _t, bf as Ht, bg as Sa, bh as Pt, t as Bt, bi as $t, bj as Ut, s as Gt, bk as us, bl as wa, bm as ka, bn as za, bo as ss, bp as as, bq as Wt, br as Ce, bs as Jt, bt as Kt, bu as ms, bv as hs, bw as xs, bx as Qt, I as Zt, by as Xt, bz as Yt, bA as en, E as sn, bB as ps, bC as Te, f as an, bD as Be, bE as As, bF as Oa, bG as tn, bH as nn, bI as rs, bJ as ln, bK as rn, bL as on, bM as cn, bN as sa, bO as aa, bP as Ia, bQ as dn, bR as un, bS as mn, bT as hn, bU as xn, bV as pn, bW as fn, bX as gn, bY as Le, bZ as J, b_ as K, b$ as qs, c0 as Q, c1 as jn, c2 as Ma, c3 as bn, c4 as vn, c5 as yn, c6 as Nn, c7 as Cn, c8 as Sn, c9 as wn, ca as kn, cb as zn } from "./index-BdIy27IM.js";
1
+ import { c as _, w as Cs, x as T, y as Re, z as Ie, A as e, B as Ss, H as ws, J as D, p as Qe, K as ks, M as zs, N as Is, Q as ca, R as H, V as oe, W as da, Y as Os, Z as Ds, _ as Ms, $ as ua, a0 as ma, a1 as tt, a2 as Zs, a3 as Z, a4 as Ue, i as nt, a5 as u, a6 as lt, a7 as rt, P as ha, F as xa, a8 as Ge, a9 as We, aa as pa, ab as it, ac as fa, ad as pe, ae as fe, af as ge, ag as je, ah as we, ai as be, aj as ee, ak as Ts, al as Fs, am as Ls, an as ga, ao as ja, ap as he, aq as ot, ar as ct, as as ba, at as dt, C as ut, au as mt, av as va, aw as ve, ax as ht, ay as Je, az as ts, aA as Me, aB as qe, aC as ke, aD as xt, X as Es, aE as Xs, aF as pt, aG as ft, aH as gt, aI as jt, l as bt, aJ as vt, aK as yt, aL as Fe, aM as ne, aN as ya, aO as Nt, aP as ds, aQ as Ct, aR as St, aS as vs, o as wt, a as kt, aT as ns, aU as Se, aV as ls, aW as zt, aX as It, aY as Ot, aZ as Dt, a_ as bs, a$ as Mt, b0 as Ys, b1 as Tt, b2 as ea, b3 as Ft, b4 as Lt, b5 as Et, b6 as Vt, b7 as Na, b8 as At, b9 as Vs, ba as Ca, bb as qt, bc as Rt, bd as es, be as _t, bf as Ht, bg as Sa, bh as Pt, t as Bt, bi as $t, bj as Ut, s as Gt, bk as us, bl as wa, bm as ka, bn as za, bo as ss, bp as as, bq as Wt, br as Ce, bs as Jt, bt as Kt, bu as ms, bv as hs, bw as xs, bx as Qt, I as Zt, by as Xt, bz as Yt, bA as en, E as sn, bB as ps, bC as Te, f as an, bD as Be, bE as As, bF as Ia, bG as tn, bH as nn, bI as rs, bJ as ln, bK as rn, bL as on, bM as cn, bN as sa, bO as aa, bP as Oa, bQ as dn, bR as un, bS as mn, bT as hn, bU as xn, bV as pn, bW as fn, bX as gn, bY as Le, bZ as J, b_ as K, b$ as qs, c0 as Q, c1 as jn, c2 as Da, c3 as bn, c4 as vn, c5 as yn, c6 as Nn, c7 as Cn, c8 as Sn, c9 as wn, ca as kn, cb as zn } from "./index-DD_Iz12h.js";
2
2
  import * as ta from "react";
3
- import ze, { useState as A, useMemo as ys, useEffect as se, useRef as is, useCallback as Da, Suspense as On } from "react";
3
+ import ze, { useState as q, useMemo as ys, useEffect as se, useRef as is, useCallback as Ma, Suspense as In } from "react";
4
4
  import "react-dom";
5
5
  /**
6
6
  * @license lucide-react v0.453.0 - ISC
@@ -8,7 +8,7 @@ import "react-dom";
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const In = _("Box", [
11
+ const On = _("Box", [
12
12
  [
13
13
  "path",
14
14
  {
@@ -25,7 +25,7 @@ const In = _("Box", [
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const Mn = _("Braces", [
28
+ const Dn = _("Braces", [
29
29
  [
30
30
  "path",
31
31
  { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
@@ -44,7 +44,7 @@ const Mn = _("Braces", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const Dn = _("ChartArea", [
47
+ const Mn = _("ChartArea", [
48
48
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
49
49
  [
50
50
  "path",
@@ -587,8 +587,8 @@ async function tl(s, n) {
587
587
  }) : null;
588
588
  }
589
589
  function nl() {
590
- const [s, n] = A(""), [a, t] = A(!1), l = T((g) => g.lenses), { setLenses: r, setSelectedLensId: i } = Re(), [o, c] = A(!1), [m, x] = A(!1), j = T((g) => g.dashboard), v = T((g) => g.filterValues), { authToken: d } = Oe();
591
- async function p() {
590
+ const [s, n] = q(""), [a, t] = q(!1), l = T((g) => g.lenses), { setLenses: r, setSelectedLensId: i } = Re(), [o, c] = q(!1), [m, x] = q(!1), j = T((g) => g.dashboard), v = T((g) => g.filterValues), { authToken: d } = Ie();
591
+ async function f() {
592
592
  c(!0);
593
593
  const g = Aa(
594
594
  j
@@ -602,7 +602,7 @@ function nl() {
602
602
  }
603
603
  return /* @__PURE__ */ e.jsxs(Ss, { open: m, onOpenChange: x, children: [
604
604
  /* @__PURE__ */ e.jsx(ws, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
605
- M,
605
+ D,
606
606
  {
607
607
  variant: "secondary",
608
608
  className: "h-7 p-2",
@@ -615,7 +615,7 @@ function nl() {
615
615
  ) }),
616
616
  /* @__PURE__ */ e.jsxs(ks, { className: "sm:max-w-[425px]", children: [
617
617
  /* @__PURE__ */ e.jsxs(zs, { children: [
618
- /* @__PURE__ */ e.jsx(Os, { children: "Create Lens" }),
618
+ /* @__PURE__ */ e.jsx(Is, { children: "Create Lens" }),
619
619
  /* @__PURE__ */ e.jsx(ca, { children: "Lenses are private by default and are only visible to you." })
620
620
  ] }),
621
621
  /* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-8 items-center gap-4", children: [
@@ -634,12 +634,12 @@ function nl() {
634
634
  ] }) }),
635
635
  a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
636
636
  /* @__PURE__ */ e.jsx(da, { children: /* @__PURE__ */ e.jsx(
637
- M,
637
+ D,
638
638
  {
639
639
  size: "sm",
640
640
  variant: "outline",
641
641
  type: "submit",
642
- onClick: p,
642
+ onClick: f,
643
643
  disabled: o,
644
644
  children: o ? "Creating..." : "Add"
645
645
  }
@@ -648,7 +648,7 @@ function nl() {
648
648
  ] });
649
649
  }
650
650
  function ll() {
651
- const [s, n] = A(!1), a = T((x) => x.lenses), t = T((x) => x.selectedLensId), { setLenses: l, setSelectedLensId: r } = Re(), { authToken: i } = Oe();
651
+ const [s, n] = q(!1), a = T((x) => x.lenses), t = T((x) => x.selectedLensId), { setLenses: l, setSelectedLensId: r } = Re(), { authToken: i } = Ie();
652
652
  async function o(x) {
653
653
  r(x);
654
654
  }
@@ -659,11 +659,11 @@ function ll() {
659
659
  }
660
660
  }
661
661
  async function m(x) {
662
- const j = a == null ? void 0 : a.map((p) => p.id === x.id ? {
663
- ...p,
662
+ const j = a == null ? void 0 : a.map((f) => f.id === x.id ? {
663
+ ...f,
664
664
  isDefault: !x.isDefault
665
665
  } : {
666
- ...p,
666
+ ...f,
667
667
  isDefault: !1
668
668
  });
669
669
  l(j || []);
@@ -672,18 +672,18 @@ function ll() {
672
672
  isDefault: !x.isDefault
673
673
  };
674
674
  await Ns(v, i == null ? void 0 : i.accessToken);
675
- const d = a == null ? void 0 : a.find((p) => p.isDefault);
675
+ const d = a == null ? void 0 : a.find((f) => f.isDefault);
676
676
  if (d && d.id !== x.id) {
677
- const p = {
677
+ const f = {
678
678
  ...d,
679
679
  isDefault: !1
680
680
  };
681
- await Ns(p, i == null ? void 0 : i.accessToken);
681
+ await Ns(f, i == null ? void 0 : i.accessToken);
682
682
  }
683
683
  }
684
- return /* @__PURE__ */ e.jsxs(Is, { open: s, onOpenChange: n, children: [
685
- /* @__PURE__ */ e.jsx(Ms, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(An, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
686
- /* @__PURE__ */ e.jsxs(Ds, { align: "end", className: "w-60", children: [
684
+ return /* @__PURE__ */ e.jsxs(Os, { open: s, onOpenChange: n, children: [
685
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(D, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(An, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
686
+ /* @__PURE__ */ e.jsxs(Ms, { align: "end", className: "w-60", children: [
687
687
  /* @__PURE__ */ e.jsx(ua, { className: "px-3", children: "Lenses" }),
688
688
  /* @__PURE__ */ e.jsx(ma, {}),
689
689
  /* @__PURE__ */ e.jsxs(
@@ -741,7 +741,7 @@ function ll() {
741
741
  function rl({
742
742
  iconClassName: s
743
743
  }) {
744
- const [n, a] = A(!1), { authToken: t } = Oe(), l = T((o) => o.theme), r = T((o) => o.filterValues);
744
+ const [n, a] = q(!1), { authToken: t } = Ie(), l = T((o) => o.theme), r = T((o) => o.filterValues);
745
745
  async function i() {
746
746
  {
747
747
  a(!0);
@@ -757,7 +757,7 @@ function rl({
757
757
  }
758
758
  }
759
759
  return /* @__PURE__ */ e.jsx(
760
- M,
760
+ D,
761
761
  {
762
762
  variant: "link",
763
763
  className: "group h-7 p-2",
@@ -774,28 +774,28 @@ function rl({
774
774
  );
775
775
  }
776
776
  function il() {
777
- const { authToken: s } = Oe();
778
- T((f) => f.theme);
779
- const n = T((f) => f.lenses), a = T((f) => f.selectedLensId), t = n == null ? void 0 : n.find((f) => f.id === a), l = T((f) => f.dashboard);
780
- T((f) => f.selectedSheetId);
777
+ const { authToken: s } = Ie();
778
+ T((p) => p.theme);
779
+ const n = T((p) => p.lenses), a = T((p) => p.selectedLensId), t = n == null ? void 0 : n.find((p) => p.id === a), l = T((p) => p.dashboard);
780
+ T((p) => p.selectedSheetId);
781
781
  const r = T(
782
- (f) => f.isDashboardEditing
782
+ (p) => p.isDashboardEditing
783
783
  ), i = u(
784
- (f) => f.selectedConnectionId
785
- ), [o, c] = A(!1), m = T((f) => f.filterValues), x = T((f) => f.isVisualEditing), j = T((f) => f.showFilters);
784
+ (p) => p.selectedConnectionId
785
+ ), [o, c] = q(!1), m = T((p) => p.filterValues), x = T((p) => p.isVisualEditing), j = T((p) => p.showFilters);
786
786
  T(
787
- (f) => f.showDashboardJSON
787
+ (p) => p.showDashboardJSON
788
788
  );
789
- const v = T((f) => f.onSaveFunction), d = T(
790
- (f) => f.actions.setShowFilters
791
- ), { addFrame: p, setSelectedFrameId: g } = T(
792
- (f) => f.actions
793
- ), { getSelectedSheet: N, setIsDashboardEditing: b, setShowDashboardJSON: V } = T((f) => f.actions), F = N(), { tenantId: C, endUserId: S } = ys(
789
+ const v = T((p) => p.onSaveFunction), d = T(
790
+ (p) => p.actions.setShowFilters
791
+ ), { addFrame: f, setSelectedFrameId: g } = T(
792
+ (p) => p.actions
793
+ ), { getSelectedSheet: N, setIsDashboardEditing: b, setShowDashboardJSON: V } = T((p) => p.actions), F = N(), { tenantId: S, endUserId: w } = ys(
794
794
  () => lt(s == null ? void 0 : s.accessToken),
795
795
  [s == null ? void 0 : s.accessToken]
796
- ), I = ys(() => C || S, [C, S]), R = () => {
796
+ ), O = ys(() => S || w, [S, w]), R = () => {
797
797
  if (!r || !F) return;
798
- const f = {
798
+ const p = {
799
799
  connectionId: i,
800
800
  id: Ge(),
801
801
  title: "Title",
@@ -813,23 +813,23 @@ function il() {
813
813
  data: []
814
814
  }, z = {
815
815
  id: Ge(),
816
- cards: [f],
817
- activeCardId: f.id
816
+ cards: [p],
817
+ activeCardId: p.id
818
818
  };
819
- p(F.id, z), g(z.id);
820
- }, w = () => {
819
+ f(F.id, z), g(z.id);
820
+ }, C = () => {
821
821
  b(!0);
822
822
  };
823
823
  async function h() {
824
824
  if (c(!0), !a || !t) return;
825
- const f = Aa(
825
+ const p = Aa(
826
826
  l
827
- ), z = JSON.stringify(f), O = {
827
+ ), z = JSON.stringify(p), I = {
828
828
  ...t,
829
829
  template: z,
830
830
  filterValues: m
831
831
  };
832
- await Ns(O, s == null ? void 0 : s.accessToken), We.success("Lens saved"), v == null || v(f), c(!1);
832
+ await Ns(I, s == null ? void 0 : s.accessToken), We.success("Lens saved"), v == null || v(p), c(!1);
833
833
  }
834
834
  return x ? null : /* @__PURE__ */ e.jsxs(
835
835
  "div",
@@ -841,10 +841,10 @@ function il() {
841
841
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
842
842
  /* @__PURE__ */ e.jsx("button", { onClick: rt, children: /* @__PURE__ */ e.jsx(Xn, { className: "h-4 w-4", strokeWidth: 1.5 }) }),
843
843
  /* @__PURE__ */ e.jsx(rl, {}),
844
- r && !x && I && /* @__PURE__ */ e.jsx(nl, {}),
845
- !x && I && /* @__PURE__ */ e.jsx(ll, {}),
844
+ r && !x && O && /* @__PURE__ */ e.jsx(nl, {}),
845
+ !x && O && /* @__PURE__ */ e.jsx(ll, {}),
846
846
  r && !x && /* @__PURE__ */ e.jsxs(
847
- M,
847
+ D,
848
848
  {
849
849
  variant: "secondary",
850
850
  className: "h-7 p-2",
@@ -858,17 +858,17 @@ function il() {
858
858
  }
859
859
  ),
860
860
  !r && /* @__PURE__ */ e.jsx(
861
- M,
861
+ D,
862
862
  {
863
863
  variant: "ghost",
864
864
  className: "h-7 p-2",
865
- onClick: w,
865
+ onClick: C,
866
866
  size: "sm",
867
867
  children: /* @__PURE__ */ e.jsx(ha, { className: "h-4 w-4", strokeWidth: 1.5 })
868
868
  }
869
869
  ),
870
870
  r && !x && /* @__PURE__ */ e.jsx(
871
- M,
871
+ D,
872
872
  {
873
873
  variant: "ghost",
874
874
  role: "close",
@@ -880,8 +880,8 @@ function il() {
880
880
  children: /* @__PURE__ */ e.jsx(Ue, { className: "h-4 w-4", strokeWidth: 1.5 })
881
881
  }
882
882
  ),
883
- r && !x && I && /* @__PURE__ */ e.jsx(
884
- M,
883
+ r && !x && O && /* @__PURE__ */ e.jsx(
884
+ D,
885
885
  {
886
886
  className: "h-7 p-2",
887
887
  variant: "ghost",
@@ -892,7 +892,7 @@ function il() {
892
892
  }
893
893
  ),
894
894
  !j && !x && r && /* @__PURE__ */ e.jsx(
895
- M,
895
+ D,
896
896
  {
897
897
  className: "h-7 p-2",
898
898
  variant: "ghost",
@@ -932,34 +932,34 @@ function Pe({
932
932
  if (s === "Table")
933
933
  return /* @__PURE__ */ e.jsx(Ps, { className: "size-4" });
934
934
  if (s === "Model")
935
- return /* @__PURE__ */ e.jsx(In, { className: "size-4" });
935
+ return /* @__PURE__ */ e.jsx(On, { className: "size-4" });
936
936
  }
937
937
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
938
938
  m && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: r ? /* @__PURE__ */ e.jsxs(pa, { children: [
939
939
  /* @__PURE__ */ e.jsx(it, { children: v() }),
940
940
  /* @__PURE__ */ e.jsx(fa, { className: "text-xs", align: "start", children: r })
941
941
  ] }) : v() }),
942
- /* @__PURE__ */ e.jsxs(xe, { disabled: x, value: j, onValueChange: i, children: [
942
+ /* @__PURE__ */ e.jsxs(pe, { disabled: x, value: j, onValueChange: i, children: [
943
943
  /* @__PURE__ */ e.jsx(
944
- pe,
944
+ fe,
945
945
  {
946
946
  className: Z(
947
947
  "h-9 w-full focus:ring-1 focus:ring-offset-0",
948
948
  c
949
949
  ),
950
950
  children: /* @__PURE__ */ e.jsx(
951
- fe,
951
+ ge,
952
952
  {
953
953
  placeholder: t ? "Loading..." : l ? "Error" : `Select ${s}`
954
954
  }
955
955
  )
956
956
  }
957
957
  ),
958
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
959
- t ? /* @__PURE__ */ e.jsx(je, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(je, { children: s }),
958
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
959
+ t ? /* @__PURE__ */ e.jsx(be, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(be, { children: s }),
960
960
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
961
961
  o && /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }, "none"),
962
- n && n.map((d, p) => /* @__PURE__ */ e.jsx(ee, { value: d.id, children: d.name }, p))
962
+ n && n.map((d, f) => /* @__PURE__ */ e.jsx(ee, { value: d.id, children: d.name }, f))
963
963
  ] }),
964
964
  (t || l) && /* @__PURE__ */ e.jsx(ee, { value: j, children: j })
965
965
  ] }) })
@@ -967,21 +967,21 @@ function Pe({
967
967
  ] });
968
968
  }
969
969
  function ol({ column: s }) {
970
- const [n, a] = A(!1), t = u((p) => p.selectedTableName), l = u(
971
- (p) => p.selectedSchemaName
970
+ const [n, a] = q(!1), t = u((f) => f.selectedTableName), l = u(
971
+ (f) => f.selectedSchemaName
972
972
  ), r = u(
973
- (p) => p.selectedDatamodelId
974
- ), i = u((p) => p.sqlGen), { modelItems: o, connectionType: c } = Ee(), m = u((p) => p.actions.setSqlGen), x = u((p) => p.actions.setCardSql), j = u((p) => p.actions.setRunSql);
975
- function v(p, g) {
973
+ (f) => f.selectedDatamodelId
974
+ ), i = u((f) => f.sqlGen), { modelItems: o, connectionType: c } = Ee(), m = u((f) => f.actions.setSqlGen), x = u((f) => f.actions.setCardSql), j = u((f) => f.actions.setRunSql);
975
+ function v(f, g) {
976
976
  var F;
977
- const N = ga(p, i, g), b = (F = o == null ? void 0 : o.find(
978
- (C) => C.id === r
977
+ const N = ga(f, i, g), b = (F = o == null ? void 0 : o.find(
978
+ (S) => S.id === r
979
979
  )) == null ? void 0 : F.name;
980
980
  m(N);
981
981
  const V = ja(
982
982
  N,
983
- me(l || ""),
984
- me(t),
983
+ he(l || ""),
984
+ he(t),
985
985
  b,
986
986
  c
987
987
  );
@@ -1045,7 +1045,7 @@ function ol({ column: s }) {
1045
1045
  }
1046
1046
  function qa({ column: s }) {
1047
1047
  return /* @__PURE__ */ e.jsxs(pa, { children: [
1048
- /* @__PURE__ */ e.jsx(ot, { asChild: !0, children: ct(s.data_type) ? /* @__PURE__ */ e.jsx(Bs, { className: "size-3" }) : ba(s.data_type) ? /* @__PURE__ */ e.jsx(Rn, { className: "size-3" }) : dt(s.data_type) ? /* @__PURE__ */ e.jsx(ut, { className: "size-3" }) : mt(s.data_type) ? /* @__PURE__ */ e.jsx(Yn, { className: "size-3" }) : s.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e.jsx(Mn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Jn, { className: "size-3" }) }),
1048
+ /* @__PURE__ */ e.jsx(ot, { asChild: !0, children: ct(s.data_type) ? /* @__PURE__ */ e.jsx(Bs, { className: "size-3" }) : ba(s.data_type) ? /* @__PURE__ */ e.jsx(Rn, { className: "size-3" }) : dt(s.data_type) ? /* @__PURE__ */ e.jsx(ut, { className: "size-3" }) : mt(s.data_type) ? /* @__PURE__ */ e.jsx(Yn, { className: "size-3" }) : s.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e.jsx(Dn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Jn, { className: "size-3" }) }),
1049
1049
  /* @__PURE__ */ e.jsx(fa, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1050
1050
  ] });
1051
1051
  }
@@ -1067,30 +1067,30 @@ function cl({
1067
1067
  (h) => h.dashboard.aiScopeTables
1068
1068
  ), { addToAIScope: j, removeFromAIScope: v } = Re();
1069
1069
  T((h) => h.actions);
1070
- const d = u((h) => h.actions.setRunSql), p = u((h) => h.actions.setSqlGen), g = u(
1070
+ const d = u((h) => h.actions.setRunSql), f = u((h) => h.actions.setSqlGen), g = u(
1071
1071
  (h) => h.actions.setIsShowingVisual
1072
1072
  ), N = u((h) => h.actions.setCardSql), { connectionType: b, modelItems: V, selectedDatamodelName: F } = Ee();
1073
- function C(h) {
1074
- var q;
1075
- const f = ga(h, l);
1076
- p(f);
1077
- const z = (q = V == null ? void 0 : V.find(
1073
+ function S(h) {
1074
+ var A;
1075
+ const p = ga(h, l);
1076
+ f(p);
1077
+ const z = (A = V == null ? void 0 : V.find(
1078
1078
  (B) => B.id === m
1079
- )) == null ? void 0 : q.name, O = ja(
1080
- f,
1081
- me(s),
1082
- me(n),
1079
+ )) == null ? void 0 : A.name, I = ja(
1080
+ p,
1081
+ he(s),
1082
+ he(n),
1083
1083
  z,
1084
1084
  b
1085
1085
  );
1086
- O && (N(O), d(!0));
1086
+ I && (N(I), d(!0));
1087
1087
  }
1088
- function S() {
1088
+ function w() {
1089
1089
  return (x == null ? void 0 : x.find(
1090
1090
  (h) => h.connectionId === r && (h.tableName === c || h.datamodelName === F)
1091
1091
  )) !== void 0;
1092
1092
  }
1093
- function I(h) {
1093
+ function O(h) {
1094
1094
  h === !0 && (c || F) && r ? (j({
1095
1095
  connectionId: r,
1096
1096
  connectionType: b,
@@ -1121,10 +1121,10 @@ function cl({
1121
1121
  connectionType: b
1122
1122
  });
1123
1123
  g(!1);
1124
- const f = b === "MSSQL" ? `SELECT top 10 * FROM ${h}` : `SELECT * FROM ${h} LIMIT 10`;
1125
- N(f), d(!0);
1124
+ const p = b === "MSSQL" ? `SELECT top 10 * FROM ${h}` : `SELECT * FROM ${h} LIMIT 10`;
1125
+ N(p), d(!0);
1126
1126
  }
1127
- function w() {
1127
+ function C() {
1128
1128
  const h = ts({
1129
1129
  schemaName: s,
1130
1130
  tableName: n,
@@ -1138,9 +1138,9 @@ function cl({
1138
1138
  /* @__PURE__ */ e.jsxs(
1139
1139
  va,
1140
1140
  {
1141
- title: `${S() ? "Remove from" : "Add to"} Assistant Scope`,
1142
- pressed: S(),
1143
- onPressedChange: I,
1141
+ title: `${w() ? "Remove from" : "Add to"} Assistant Scope`,
1142
+ pressed: w(),
1143
+ onPressedChange: O,
1144
1144
  variant: "outline",
1145
1145
  className: Z("h-9 px-2", {
1146
1146
  // 'outline outline-1 outline-green-400': isInAIScopeTable(),
@@ -1150,8 +1150,8 @@ function cl({
1150
1150
  Qe,
1151
1151
  {
1152
1152
  className: Z("mr-1 size-4", {
1153
- "text-green-400": S(),
1154
- "text-muted-foreground": !S()
1153
+ "text-green-400": w(),
1154
+ "text-muted-foreground": !w()
1155
1155
  })
1156
1156
  }
1157
1157
  ),
@@ -1160,7 +1160,7 @@ function cl({
1160
1160
  }
1161
1161
  ),
1162
1162
  /* @__PURE__ */ e.jsxs(
1163
- M,
1163
+ D,
1164
1164
  {
1165
1165
  disabled: t !== "Success",
1166
1166
  onClick: R,
@@ -1174,10 +1174,10 @@ function cl({
1174
1174
  }
1175
1175
  ),
1176
1176
  /* @__PURE__ */ e.jsxs(
1177
- M,
1177
+ D,
1178
1178
  {
1179
1179
  disabled: t !== "Success",
1180
- onClick: w,
1180
+ onClick: C,
1181
1181
  size: "sm",
1182
1182
  variant: "secondary",
1183
1183
  className: "w-full",
@@ -1189,14 +1189,14 @@ function cl({
1189
1189
  )
1190
1190
  ] }),
1191
1191
  /* @__PURE__ */ e.jsxs(
1192
- be,
1192
+ ve,
1193
1193
  {
1194
1194
  className: "flex-1 basis-0 border-b border-t border-muted py-3",
1195
1195
  children: [
1196
1196
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children: a == null ? void 0 : a.map((h) => /* @__PURE__ */ e.jsxs(
1197
1197
  "div",
1198
1198
  {
1199
- onClick: () => C(h),
1199
+ onClick: () => S(h),
1200
1200
  className: Z(
1201
1201
  "group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-1 text-sm transition-colors hover:bg-muted/50",
1202
1202
  {
@@ -1211,7 +1211,7 @@ function cl({
1211
1211
  /* @__PURE__ */ e.jsx(
1212
1212
  "div",
1213
1213
  {
1214
- onClick: (f) => f.stopPropagation(),
1214
+ onClick: (p) => p.stopPropagation(),
1215
1215
  className: "flex items-center justify-end",
1216
1216
  children: ba(h.data_type) && /* @__PURE__ */ e.jsx(ol, { column: h })
1217
1217
  }
@@ -1230,7 +1230,7 @@ function cl({
1230
1230
  function Ee(s, n) {
1231
1231
  var Us, Gs, Ws, Js, Ks, Qs;
1232
1232
  let a = ys(() => [], []);
1233
- const t = Oe().authToken || s, l = u(
1233
+ const t = Ie().authToken || s, l = u(
1234
1234
  (y) => y.selectedConnectionId
1235
1235
  ), r = u(
1236
1236
  (y) => y.selectedDatamodelId
@@ -1248,7 +1248,7 @@ function Ee(s, n) {
1248
1248
  (y) => y.actions.setSelectedDatabaseName
1249
1249
  ), d = u(
1250
1250
  (y) => y.actions.setSelectedSchemaName
1251
- ), p = u(
1251
+ ), f = u(
1252
1252
  (y) => y.actions.setSelectedTableName
1253
1253
  ), g = u((y) => y.actions.setCardSql);
1254
1254
  function N(y) {
@@ -1262,9 +1262,9 @@ function Ee(s, n) {
1262
1262
  }
1263
1263
  const {
1264
1264
  data: F,
1265
- isLoading: C,
1266
- isError: S
1267
- } = De({
1265
+ isLoading: S,
1266
+ isError: w
1267
+ } = Me({
1268
1268
  queryKey: ["connections"],
1269
1269
  queryFn: () => qe(
1270
1270
  "https://semaphor.cloud/api/v1/connections",
@@ -1273,10 +1273,10 @@ function Ee(s, n) {
1273
1273
  enabled: !!(t != null && t.accessToken)
1274
1274
  // Only fetch if authToken is present
1275
1275
  }), {
1276
- data: I,
1276
+ data: O,
1277
1277
  isLoading: R,
1278
- isError: w
1279
- } = De({
1278
+ isError: C
1279
+ } = Me({
1280
1280
  queryKey: ["models", l],
1281
1281
  queryFn: () => qe(
1282
1282
  "https://semaphor.cloud/api/v1/datamodels",
@@ -1289,13 +1289,13 @@ function Ee(s, n) {
1289
1289
  // Only fetch if authToken is present
1290
1290
  }), h = F == null ? void 0 : F.connections.find(
1291
1291
  (y) => y.id === l
1292
- ), f = h == null ? void 0 : h.type, z = (h == null ? void 0 : h.type) === "API" || (h == null ? void 0 : h.type) === "S3", {
1293
- data: O,
1294
- isLoading: q,
1292
+ ), p = h == null ? void 0 : h.type, z = (h == null ? void 0 : h.type) === "API" || (h == null ? void 0 : h.type) === "S3", {
1293
+ data: I,
1294
+ isLoading: A,
1295
1295
  isFetching: B,
1296
1296
  isError: X,
1297
1297
  refetch: Y
1298
- } = De({
1298
+ } = Me({
1299
1299
  queryKey: ["databases", l],
1300
1300
  queryFn: () => qe(
1301
1301
  "https://semaphor.cloud/api/v1/databases",
@@ -1304,15 +1304,15 @@ function Ee(s, n) {
1304
1304
  connection_id: l
1305
1305
  }
1306
1306
  ),
1307
- enabled: V(f)
1307
+ enabled: V(p)
1308
1308
  // !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
1309
1309
  }), {
1310
- data: U,
1310
+ data: G,
1311
1311
  isLoading: le,
1312
1312
  isFetching: ce,
1313
1313
  isError: $,
1314
1314
  refetch: re
1315
- } = De({
1315
+ } = Me({
1316
1316
  queryKey: ["schemas", l, i],
1317
1317
  queryFn: () => qe(
1318
1318
  "https://semaphor.cloud/api/v1/schemas",
@@ -1326,11 +1326,11 @@ function Ee(s, n) {
1326
1326
  //currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
1327
1327
  }), {
1328
1328
  data: E,
1329
- isLoading: D,
1329
+ isLoading: M,
1330
1330
  isFetching: ae,
1331
1331
  isError: P,
1332
1332
  refetch: W
1333
- } = De({
1333
+ } = Me({
1334
1334
  queryKey: [
1335
1335
  "tables",
1336
1336
  l,
@@ -1346,13 +1346,13 @@ function Ee(s, n) {
1346
1346
  schema_name: o
1347
1347
  }
1348
1348
  ),
1349
- enabled: N(f)
1349
+ enabled: N(p)
1350
1350
  }), {
1351
1351
  data: te,
1352
- isLoading: ye,
1353
- isFetching: ue,
1352
+ isLoading: Ne,
1353
+ isFetching: me,
1354
1354
  isError: L
1355
- } = De({
1355
+ } = Me({
1356
1356
  queryKey: [
1357
1357
  "columns",
1358
1358
  l,
@@ -1373,7 +1373,7 @@ function Ee(s, n) {
1373
1373
  table_name: c
1374
1374
  }
1375
1375
  ),
1376
- enabled: b(f)
1376
+ enabled: b(p)
1377
1377
  // (!!selectedConnectionId &&
1378
1378
  // !!selectedDatabaseName &&
1379
1379
  // !!selectedSchemaName &&
@@ -1387,19 +1387,19 @@ function Ee(s, n) {
1387
1387
  }, [te, m, a]), se(() => {
1388
1388
  }, [
1389
1389
  z,
1390
- f,
1391
- g,
1392
1390
  p,
1391
+ g,
1392
+ f,
1393
1393
  d,
1394
1394
  v,
1395
1395
  h
1396
1396
  ]);
1397
- const G = (h == null ? void 0 : h.type) === "API" ? (Us = h == null ? void 0 : h.type) == null ? void 0 : Us.toLowerCase() : c || "", Ne = z ? "" : o || "";
1397
+ const U = (h == null ? void 0 : h.type) === "API" ? (Us = h == null ? void 0 : h.type) == null ? void 0 : Us.toLowerCase() : c || "", de = z ? "" : o || "";
1398
1398
  function Ae(y) {
1399
- d(y), p("");
1399
+ d(y), f("");
1400
1400
  }
1401
- function Ie(y) {
1402
- v(y === "none" ? "" : y), d(""), p(""), y !== "none" && y !== "" && j("");
1401
+ function Oe(y) {
1402
+ v(y === "none" ? "" : y), d(""), f(""), y !== "none" && y !== "" && j("");
1403
1403
  }
1404
1404
  function k(y) {
1405
1405
  x(y);
@@ -1407,59 +1407,59 @@ function Ee(s, n) {
1407
1407
  function ie(y) {
1408
1408
  j(y === "none" ? "" : y), y !== "none" && y !== "" && v("");
1409
1409
  }
1410
- O && ((Gs = O == null ? void 0 : O.databases) == null ? void 0 : Gs.length) > 0, U && ((Ws = U == null ? void 0 : U.schemas) == null ? void 0 : Ws.length) > 0, te && ((Js = te == null ? void 0 : te.columns) == null ? void 0 : Js.length) > 0 && (a = te.columns.map((y) => ({
1410
+ I && ((Gs = I == null ? void 0 : I.databases) == null ? void 0 : Gs.length) > 0, G && ((Ws = G == null ? void 0 : G.schemas) == null ? void 0 : Ws.length) > 0, te && ((Js = te == null ? void 0 : te.columns) == null ? void 0 : Js.length) > 0 && (a = te.columns.map((y) => ({
1411
1411
  ...y,
1412
1412
  data_type: y.data_type.toLowerCase()
1413
- }))), X && (a = []), (L || S) && (a = []);
1414
- const Me = F == null ? void 0 : F.connections.map(
1413
+ }))), X && (a = []), (L || w) && (a = []);
1414
+ const De = F == null ? void 0 : F.connections.map(
1415
1415
  (y) => ({
1416
1416
  id: y.id,
1417
1417
  name: y.name,
1418
1418
  type: y.type
1419
1419
  })
1420
- ), de = (Ks = I == null ? void 0 : I.datamodels) == null ? void 0 : Ks.map((y) => ({
1420
+ ), ue = (Ks = O == null ? void 0 : O.datamodels) == null ? void 0 : Ks.map((y) => ({
1421
1421
  id: y.id,
1422
1422
  name: y.name
1423
- })), He = O == null ? void 0 : O.databases.map((y) => ({
1423
+ })), He = I == null ? void 0 : I.databases.map((y) => ({
1424
1424
  id: y.database_name,
1425
1425
  name: y.database_name
1426
- })), gs = U == null ? void 0 : U.schemas.map((y) => ({
1426
+ })), gs = G == null ? void 0 : G.schemas.map((y) => ({
1427
1427
  id: y.schema_name,
1428
1428
  name: y.schema_name
1429
1429
  })), Ze = E == null ? void 0 : E.tables.map((y) => ({
1430
1430
  id: y.table_name,
1431
1431
  name: y.table_name
1432
- })), js = (Qs = I == null ? void 0 : I.datamodels.find(
1432
+ })), js = (Qs = O == null ? void 0 : O.datamodels.find(
1433
1433
  (y) => y.id === r
1434
1434
  )) == null ? void 0 : Qs.name;
1435
- return {
1436
- connectionItems: Me,
1437
- isConnectionsLoading: C,
1438
- isConnectionsError: S,
1439
- modelItems: de,
1435
+ return (p === "S3" || p === "API") && (v(""), d(""), j("")), {
1436
+ connectionItems: De,
1437
+ isConnectionsLoading: S,
1438
+ isConnectionsError: w,
1439
+ modelItems: ue,
1440
1440
  selectedDatamodelId: r,
1441
1441
  selectedDatamodelName: js,
1442
1442
  isModelsLoading: R,
1443
- isModelsError: w,
1443
+ isModelsError: C,
1444
1444
  databaseItems: He,
1445
- isDatabasesLoadingOrFetching: q || B,
1445
+ isDatabasesLoadingOrFetching: A || B,
1446
1446
  isDatabaseError: X,
1447
1447
  schemaItems: gs,
1448
1448
  isSchemaLoadingOrFetching: le || ce,
1449
1449
  isSchemaError: $,
1450
1450
  tableItems: Ze,
1451
- isTableLoadingOrFetching: D || ae,
1451
+ isTableLoadingOrFetching: M || ae,
1452
1452
  isTableError: P,
1453
1453
  columns: a,
1454
- isColumnsLoadingOrFetching: ye || ue,
1454
+ isColumnsLoadingOrFetching: Ne || me,
1455
1455
  isColumnsError: L,
1456
1456
  isNonDbConnection: z,
1457
- connectionType: f,
1458
- tableName: G,
1459
- schemaName: Ne,
1457
+ connectionType: p,
1458
+ tableName: U,
1459
+ schemaName: de,
1460
1460
  handleConnectionChange: k,
1461
1461
  handleDatamodelChange: ie,
1462
- handleDatabaseChange: Ie,
1462
+ handleDatabaseChange: Oe,
1463
1463
  handleSchemaChange: Ae
1464
1464
  };
1465
1465
  }
@@ -1485,34 +1485,34 @@ function Ra({
1485
1485
  tableItems: j,
1486
1486
  columns: v,
1487
1487
  isConnectionsLoading: d,
1488
- isModelsLoading: p,
1488
+ isModelsLoading: f,
1489
1489
  isConnectionsError: g,
1490
1490
  isModelsError: N,
1491
1491
  isDatabasesLoadingOrFetching: b,
1492
1492
  isDatabaseError: V,
1493
1493
  isSchemaLoadingOrFetching: F,
1494
- isSchemaError: C,
1495
- isColumnsError: S,
1496
- isColumnsLoadingOrFetching: I,
1494
+ isSchemaError: S,
1495
+ isColumnsError: w,
1496
+ isColumnsLoadingOrFetching: O,
1497
1497
  isTableLoadingOrFetching: R,
1498
- isTableError: w,
1498
+ isTableError: C,
1499
1499
  connectionType: h,
1500
- isNonDbConnection: f,
1500
+ isNonDbConnection: p,
1501
1501
  handleConnectionChange: z,
1502
- handleDatabaseChange: O,
1503
- handleSchemaChange: q,
1502
+ handleDatabaseChange: I,
1503
+ handleSchemaChange: A,
1504
1504
  handleDatamodelChange: B,
1505
1505
  tableName: X,
1506
1506
  schemaName: Y
1507
1507
  } = Ee();
1508
- function U() {
1508
+ function G() {
1509
1509
  return s ? s(Y, X, v) : /* @__PURE__ */ e.jsx(
1510
1510
  cl,
1511
1511
  {
1512
1512
  schemaName: Y,
1513
1513
  tableName: X,
1514
1514
  columns: v,
1515
- status: I ? "Loading..." : S ? "Error" : "Success"
1515
+ status: O ? "Loading..." : w ? "Error" : "Success"
1516
1516
  }
1517
1517
  );
1518
1518
  }
@@ -1526,7 +1526,7 @@ function Ra({
1526
1526
  Pe,
1527
1527
  {
1528
1528
  showNone: !0,
1529
- onChange: O,
1529
+ onChange: I,
1530
1530
  isError: V,
1531
1531
  isLoading: b,
1532
1532
  items: x,
@@ -1536,7 +1536,7 @@ function Ra({
1536
1536
  );
1537
1537
  }
1538
1538
  function $() {
1539
- if (n && !f && (!t || t === "none") && (!a || a === "none"))
1539
+ if (n && !p && (!t || t === "none") && (!a || a === "none"))
1540
1540
  return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
1541
1541
  /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(ke, {}) }),
1542
1542
  /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(H, { children: "OR" }) }),
@@ -1552,7 +1552,7 @@ function Ra({
1552
1552
  showNone: !0,
1553
1553
  onChange: B,
1554
1554
  isError: N,
1555
- isLoading: p,
1555
+ isLoading: f,
1556
1556
  items: c,
1557
1557
  value: a || "",
1558
1558
  title: "Model"
@@ -1563,8 +1563,8 @@ function Ra({
1563
1563
  return !n || h === "S3" || h === "API" || !t || t === "none" ? null : /* @__PURE__ */ e.jsx(
1564
1564
  Pe,
1565
1565
  {
1566
- onChange: q,
1567
- isError: C,
1566
+ onChange: A,
1567
+ isError: S,
1568
1568
  isLoading: F,
1569
1569
  items: m,
1570
1570
  value: l || "",
@@ -1572,7 +1572,7 @@ function Ra({
1572
1572
  }
1573
1573
  );
1574
1574
  }
1575
- function D() {
1575
+ function M() {
1576
1576
  function P() {
1577
1577
  let W = !1;
1578
1578
  return h === "API" ? (W = !1, W) : ((h === "S3" || n && t && t !== "none" && l) && (W = !0), W);
@@ -1581,7 +1581,7 @@ function Ra({
1581
1581
  Pe,
1582
1582
  {
1583
1583
  onChange: i,
1584
- isError: w,
1584
+ isError: C,
1585
1585
  items: j,
1586
1586
  isLoading: R,
1587
1587
  value: r || "",
@@ -1609,11 +1609,11 @@ function Ra({
1609
1609
  $(),
1610
1610
  re(),
1611
1611
  E(),
1612
- D()
1612
+ M()
1613
1613
  ] }),
1614
- U(),
1614
+ G(),
1615
1615
  /* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
1616
- M,
1616
+ D,
1617
1617
  {
1618
1618
  onClick: le,
1619
1619
  size: "sm",
@@ -1650,16 +1650,16 @@ function ul({
1650
1650
  setTriggerAIRun: t
1651
1651
  }) {
1652
1652
  return /* @__PURE__ */ e.jsxs(Ts, { openDelay: 0, children: [
1653
- /* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(Tn, { className: "h-4 w-4 text-red-500" }) }) }),
1653
+ /* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(D, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(Tn, { className: "h-4 w-4 text-red-500" }) }) }),
1654
1654
  /* @__PURE__ */ e.jsx(
1655
1655
  Ls,
1656
1656
  {
1657
1657
  align: "start",
1658
1658
  className: "w-full min-w-fit max-w-[700px]",
1659
1659
  children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
1660
- /* @__PURE__ */ e.jsx(be, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1660
+ /* @__PURE__ */ e.jsx(ve, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1661
1661
  /* @__PURE__ */ e.jsxs(
1662
- M,
1662
+ D,
1663
1663
  {
1664
1664
  onClick: () => {
1665
1665
  n(!0), a(s), t(!0);
@@ -1684,30 +1684,30 @@ function ml({
1684
1684
  triggerAIRun: t,
1685
1685
  setTriggerAIRun: l
1686
1686
  }) {
1687
- const r = is(null), i = is(null), [o, c] = A(""), [m, x] = A(null), { authToken: j } = Oe(), [v, d] = A(!1), [p, g] = A(!1), N = u((L) => L.actions.setCardSql), b = u((L) => L.actions.setRunSql), V = u(
1687
+ const r = is(null), i = is(null), [o, c] = q(""), [m, x] = q(null), { authToken: j } = Ie(), [v, d] = q(!1), [f, g] = q(!1), N = u((L) => L.actions.setCardSql), b = u((L) => L.actions.setRunSql), V = u(
1688
1688
  (L) => L.actions.switchCardType
1689
- ), F = u((L) => L.currentColumns), C = u(
1689
+ ), F = u((L) => L.currentColumns), S = u(
1690
1690
  (L) => L.selectedDatabaseName
1691
- ), S = u((L) => L.selectedTableName), I = u(
1691
+ ), w = u((L) => L.selectedTableName), O = u(
1692
1692
  (L) => L.selectedConnectionId
1693
1693
  ), R = u(
1694
1694
  (L) => L.selectedSchemaName
1695
- ), w = T(
1695
+ ), C = T(
1696
1696
  (L) => L.dashboard.aiScopeTables
1697
- ), { removeFromAIScope: h, addToAIScope: f } = Re(), { selectedDatamodelName: z, selectedDatamodelId: O, connectionType: q } = Ee(), B = ts({
1697
+ ), { removeFromAIScope: h, addToAIScope: p } = Re(), { selectedDatamodelName: z, selectedDatamodelId: I, connectionType: A } = Ee(), B = ts({
1698
1698
  schemaName: R || "",
1699
- tableName: S || "",
1699
+ tableName: w || "",
1700
1700
  modelName: z,
1701
- connectionType: q || ""
1702
- }), X = q === "api" || q === "S3" ? "DuckDb" : q, {
1701
+ connectionType: A || ""
1702
+ }), X = A === "api" || A === "S3" ? "DuckDb" : A, {
1703
1703
  messages: Y,
1704
- setMessages: U,
1704
+ setMessages: G,
1705
1705
  reload: le,
1706
1706
  append: ce,
1707
1707
  input: $,
1708
1708
  status: re,
1709
1709
  handleInputChange: E,
1710
- handleSubmit: D,
1710
+ handleSubmit: M,
1711
1711
  addToolResult: ae,
1712
1712
  stop: P
1713
1713
  } = xt({
@@ -1770,54 +1770,54 @@ function ml({
1770
1770
  // };
1771
1771
  // }
1772
1772
  // },
1773
- onFinish(L, G) {
1774
- W(G.usage), c(""), console.log("onFinish", L, G), G.finishReason === "stop" && c("");
1773
+ onFinish(L, U) {
1774
+ W(U.usage), c(""), console.log("onFinish", L, U), U.finishReason === "stop" && c("");
1775
1775
  }
1776
1776
  });
1777
1777
  se(() => {
1778
1778
  t && a && (E({
1779
1779
  target: { value: a }
1780
1780
  }), setTimeout(() => {
1781
- D(), l(!1);
1781
+ M(), l(!1);
1782
1782
  }, 100));
1783
1783
  }, [
1784
1784
  t,
1785
- D,
1785
+ M,
1786
1786
  a,
1787
1787
  l,
1788
1788
  E
1789
1789
  ]), se(() => {
1790
1790
  const L = setTimeout(() => {
1791
- var G;
1791
+ var U;
1792
1792
  i.current && (i.current.scroll({
1793
1793
  top: i.current.scrollHeight,
1794
1794
  behavior: "auto"
1795
1795
  // 'smooth'
1796
- }), (G = r.current) == null || G.focus());
1796
+ }), (U = r.current) == null || U.focus());
1797
1797
  }, 50);
1798
1798
  return () => clearTimeout(L);
1799
1799
  }, [Y, s]);
1800
1800
  function W(L) {
1801
- x((G) => G ? {
1802
- promptTokens: G.promptTokens + L.promptTokens,
1803
- completionTokens: G.completionTokens + L.completionTokens,
1804
- totalTokens: G.totalTokens + L.totalTokens
1801
+ x((U) => U ? {
1802
+ promptTokens: U.promptTokens + L.promptTokens,
1803
+ completionTokens: U.completionTokens + L.completionTokens,
1804
+ totalTokens: U.totalTokens + L.totalTokens
1805
1805
  } : L);
1806
1806
  }
1807
1807
  async function te({
1808
1808
  toolCall: L
1809
1809
  }) {
1810
1810
  if (L.toolName === "getAiScopeTables")
1811
- return c("Getting tables in scope..."), {
1812
- status: "success",
1813
- tables: w || []
1814
- };
1811
+ return c("Getting tables in scope..."), { status: "success", tables: C == null ? void 0 : C.map((de) => ({
1812
+ ...de,
1813
+ sqlDialect: A === "S3" || A === "API" ? "DuckDb" : A
1814
+ })) };
1815
1815
  if (L.toolName === "createChart") {
1816
1816
  console.log("createChart", L.args);
1817
- const G = L.args.sql, Ne = L.args.chartType;
1818
- return V(Ne), N(G), b(!0), {
1817
+ const U = L.args.sql, de = L.args.chartType;
1818
+ return V(de), N(U), b(!0), {
1819
1819
  status: "success",
1820
- query: G
1820
+ query: U
1821
1821
  };
1822
1822
  }
1823
1823
  if (L.toolName === "getTableColumns" && c("Getting table columns..."), L.toolName === "getCurrentSchema")
@@ -1826,22 +1826,23 @@ function ml({
1826
1826
  tableName: B,
1827
1827
  columns: F
1828
1828
  };
1829
+ c("Thinking...");
1829
1830
  }
1830
- function ye(L) {
1831
+ function Ne(L) {
1831
1832
  n(!1), N(L), b(!0);
1832
1833
  }
1833
- const ue = !["ready", "error"].includes(re);
1834
+ const me = !["ready", "error"].includes(re);
1834
1835
  return /* @__PURE__ */ e.jsxs(Ss, { open: s, onOpenChange: n, children: [
1835
1836
  /* @__PURE__ */ e.jsx(ws, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1836
- M,
1837
+ D,
1837
1838
  {
1838
1839
  onClick: () => {
1839
- (!w || (w == null ? void 0 : w.length) === 0) && f({
1840
- connectionId: I || "",
1841
- connectionType: q || "",
1842
- databaseName: C || "",
1840
+ (!C || (C == null ? void 0 : C.length) === 0) && p({
1841
+ connectionId: O || "",
1842
+ connectionType: A || "",
1843
+ databaseName: S || "",
1843
1844
  schemaName: R || "",
1844
- tableName: S || "",
1845
+ tableName: w || "",
1845
1846
  datamodelName: z || ""
1846
1847
  });
1847
1848
  },
@@ -1854,10 +1855,10 @@ function ml({
1854
1855
  /* @__PURE__ */ e.jsxs(ks, { className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]", children: [
1855
1856
  /* @__PURE__ */ e.jsx(zs, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-2 pr-5", children: [
1856
1857
  /* @__PURE__ */ e.jsxs("div", { children: [
1857
- /* @__PURE__ */ e.jsx(Os, { children: "Assistant" }),
1858
- w && w.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
1858
+ /* @__PURE__ */ e.jsx(Is, { children: "Assistant" }),
1859
+ C && C.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
1859
1860
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "Tables in scope:" }),
1860
- w == null ? void 0 : w.map((L, G) => /* @__PURE__ */ e.jsxs(
1861
+ C == null ? void 0 : C.map((L, U) => /* @__PURE__ */ e.jsxs(
1861
1862
  "div",
1862
1863
  {
1863
1864
  className: "flex items-center gap-2 rounded-md bg-muted px-2 py-1 text-xs",
@@ -1879,24 +1880,24 @@ function ml({
1879
1880
  )
1880
1881
  ]
1881
1882
  },
1882
- G
1883
+ U
1883
1884
  ))
1884
1885
  ] }),
1885
- (!w || (w == null ? void 0 : w.length) === 0) && /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
1886
+ (!C || (C == null ? void 0 : C.length) === 0) && /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
1886
1887
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "Tables in scope: None" }),
1887
1888
  /* @__PURE__ */ e.jsxs(
1888
- M,
1889
+ D,
1889
1890
  {
1890
1891
  className: "h-6 text-xs",
1891
1892
  size: "sm",
1892
1893
  variant: "secondary",
1893
1894
  onClick: () => {
1894
- f({
1895
- connectionId: I || "",
1896
- connectionType: q || "",
1897
- databaseName: C || "",
1895
+ p({
1896
+ connectionId: O || "",
1897
+ connectionType: A || "",
1898
+ databaseName: S || "",
1898
1899
  schemaName: R || "",
1899
- tableName: S || "",
1900
+ tableName: w || "",
1900
1901
  datamodelName: z || ""
1901
1902
  });
1902
1903
  },
@@ -1909,9 +1910,9 @@ function ml({
1909
1910
  ] })
1910
1911
  ] }),
1911
1912
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1912
- /* @__PURE__ */ e.jsxs(Is, { children: [
1913
- /* @__PURE__ */ e.jsx(Ms, { children: /* @__PURE__ */ e.jsx(Hs, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }),
1914
- /* @__PURE__ */ e.jsxs(Ds, { align: "end", children: [
1913
+ /* @__PURE__ */ e.jsxs(Os, { children: [
1914
+ /* @__PURE__ */ e.jsx(Ds, { children: /* @__PURE__ */ e.jsx(Hs, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }),
1915
+ /* @__PURE__ */ e.jsxs(Ms, { align: "end", children: [
1915
1916
  /* @__PURE__ */ e.jsx(ua, { children: "Options" }),
1916
1917
  /* @__PURE__ */ e.jsx(ma, {}),
1917
1918
  /* @__PURE__ */ e.jsx(
@@ -1925,21 +1926,21 @@ function ml({
1925
1926
  /* @__PURE__ */ e.jsx(
1926
1927
  Xs,
1927
1928
  {
1928
- checked: p,
1929
+ checked: f,
1929
1930
  onCheckedChange: g,
1930
- children: p ? "Hide Tool Invocations" : "Show Tool Invocations"
1931
+ children: f ? "Hide Tool Invocations" : "Show Tool Invocations"
1931
1932
  }
1932
1933
  )
1933
1934
  ] })
1934
1935
  ] }),
1935
1936
  /* @__PURE__ */ e.jsx(
1936
- M,
1937
+ D,
1937
1938
  {
1938
1939
  className: "h-8",
1939
1940
  size: "sm",
1940
1941
  variant: "secondary",
1941
1942
  onClick: () => {
1942
- U([]), le();
1943
+ G([]), le();
1943
1944
  },
1944
1945
  children: "Clear"
1945
1946
  }
@@ -1956,15 +1957,15 @@ function ml({
1956
1957
  pt,
1957
1958
  {
1958
1959
  messages: Y,
1959
- showTools: p,
1960
- handleRun: ye
1960
+ showTools: f,
1961
+ handleRun: Ne
1961
1962
  }
1962
1963
  ),
1963
1964
  /* @__PURE__ */ e.jsx(
1964
1965
  ft,
1965
1966
  {
1966
1967
  status: gt(re, o),
1967
- isLoading: ue
1968
+ isLoading: me
1968
1969
  }
1969
1970
  )
1970
1971
  ] })
@@ -1977,8 +1978,8 @@ function ml({
1977
1978
  ref: r,
1978
1979
  input: $,
1979
1980
  handleInputChange: E,
1980
- handleSubmit: D,
1981
- isLoading: ue
1981
+ handleSubmit: M,
1982
+ isLoading: me
1982
1983
  }
1983
1984
  ),
1984
1985
  m && v && /* @__PURE__ */ e.jsx("div", { className: "flex h-8 items-center justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "text-xs text-muted-foreground", children: [
@@ -2075,7 +2076,7 @@ function Ha(s) {
2075
2076
  key: a
2076
2077
  }, n.attr), Ha(n.child)));
2077
2078
  }
2078
- function ve(s) {
2079
+ function ye(s) {
2079
2080
  return (n) => /* @__PURE__ */ ze.createElement(bl, os({
2080
2081
  attr: cs({}, s.attr)
2081
2082
  }, n), Ha(s.child));
@@ -2104,11 +2105,11 @@ function bl(s) {
2104
2105
  return na !== void 0 ? /* @__PURE__ */ ze.createElement(na.Consumer, null, (a) => n(a)) : n(_a);
2105
2106
  }
2106
2107
  function vl(s) {
2107
- return ve({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2108
+ return ye({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2108
2109
  }
2109
2110
  function yl({ sql: s }) {
2110
2111
  return /* @__PURE__ */ e.jsxs(Ts, { children: [
2111
- /* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(bt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2112
+ /* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(D, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(bt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2112
2113
  /* @__PURE__ */ e.jsx(
2113
2114
  Ls,
2114
2115
  {
@@ -2116,14 +2117,14 @@ function yl({ sql: s }) {
2116
2117
  className: "w-full min-w-fit max-w-[700px] p-3 pt-2",
2117
2118
  children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2118
2119
  /* @__PURE__ */ e.jsx(H, { className: "text-xs font-semibold", children: "Resolved Query" }),
2119
- /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-col space-y-2", children: /* @__PURE__ */ e.jsx(be, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 font-mono text-xs leading-relaxed", children: s }) }) })
2120
+ /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-col space-y-2", children: /* @__PURE__ */ e.jsx(ve, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 font-mono text-xs leading-relaxed", children: s }) }) })
2120
2121
  ] })
2121
2122
  }
2122
2123
  )
2123
2124
  ] });
2124
2125
  }
2125
2126
  function Pa(s) {
2126
- const { theme: n } = vt(), a = T((g) => g.theme), t = u((g) => g.frame), l = u((g) => g.card), r = u((g) => g.activeTabCardId), i = yt(), { refetch: o } = Fe(l), { updateCardTab: c, setRunSql: m } = ne(), x = is(), j = is({}), v = t.cards.find((g) => g.id === r), d = Da(() => {
2127
+ const { theme: n } = vt(), a = T((g) => g.theme), t = u((g) => g.frame), l = u((g) => g.card), r = u((g) => g.activeTabCardId), i = yt(), { refetch: o } = Fe(l), { updateCardTab: c, setRunSql: m } = ne(), x = is(), j = is({}), v = t.cards.find((g) => g.id === r), d = Ma(() => {
2127
2128
  let g = "";
2128
2129
  return s === "python" && (g = (v == null ? void 0 : v.python) || ya), s === "sql" && (g = (v == null ? void 0 : v.sql) || ""), g;
2129
2130
  }, [s, v]);
@@ -2174,14 +2175,14 @@ function Pa(s) {
2174
2175
  }
2175
2176
  );
2176
2177
  }, [i, o, l]);
2177
- function p(g, N) {
2178
+ function f(g, N) {
2178
2179
  if (x.current = g, !j.current[l.id]) {
2179
2180
  const b = g.getModel(), V = d();
2180
2181
  j.current[l.id] = b || (N == null ? void 0 : N.editor.createModel(V, s)) || g.getModel();
2181
2182
  }
2182
2183
  g.setModel(j.current[l.id]);
2183
2184
  }
2184
- return { handleEditorDidMount: p };
2185
+ return { handleEditorDidMount: f };
2185
2186
  }
2186
2187
  function Nl() {
2187
2188
  const s = u((i) => i.card.sql), n = u((i) => i.sqlGen), { setCardSql: a, setSqlGen: t } = ne(), { handleEditorDidMount: l } = Pa("sql");
@@ -2273,11 +2274,11 @@ function Sl() {
2273
2274
  );
2274
2275
  }
2275
2276
  function wl() {
2276
- var Ie;
2277
- const [s, n] = A({
2277
+ var Oe;
2278
+ const [s, n] = q({
2278
2279
  queryKey: [],
2279
2280
  queryData: null
2280
- }), a = St(), [t, l] = A(!1), [r, i] = A(!1), [o, c] = A(!1), [m, x] = A(""), [j, v] = A(!1), d = u((k) => k.frame), p = u((k) => k.card), g = u((k) => k.isShowingVisual), N = u(
2281
+ }), a = St(), [t, l] = q(!1), [r, i] = q(!1), [o, c] = q(!1), [m, x] = q(""), [j, v] = q(!1), d = u((k) => k.frame), f = u((k) => k.card), g = u((k) => k.isShowingVisual), N = u(
2281
2282
  (k) => k.selectedConnectionId
2282
2283
  ), b = u(
2283
2284
  (k) => k.selectedDatabaseName
@@ -2285,71 +2286,71 @@ function wl() {
2285
2286
  (k) => k.selectedDatamodelId
2286
2287
  ), F = u(
2287
2288
  (k) => k.selectedSchemaName
2288
- ), C = u((k) => k.selectedTableName), S = u((k) => {
2289
+ ), S = u((k) => k.selectedTableName), w = u((k) => {
2289
2290
  var ie;
2290
2291
  return (ie = k == null ? void 0 : k.card) == null ? void 0 : ie.sql;
2291
- }), I = u((k) => k.applyFilters), {
2292
+ }), O = u((k) => k.applyFilters), {
2292
2293
  setCardCustomCfg: R,
2293
- setQueryResultColumns: w,
2294
+ setQueryResultColumns: C,
2294
2295
  setCardSql: h,
2295
2296
  // setQueryError,
2296
- setPythonStdOut: f,
2297
+ setPythonStdOut: p,
2297
2298
  setCardPreferences: z,
2298
- setCardType: O
2299
- } = ne(), q = u((k) => k.onSave), B = u((k) => k.onClose), X = u((k) => k.actions.setSqlGen), Y = u((k) => k.runSql), U = u((k) => k.actions.setRunSql), le = u((k) => k.actions.setCardCfg), ce = u(
2299
+ setCardType: I
2300
+ } = ne(), A = u((k) => k.onSave), B = u((k) => k.onClose), X = u((k) => k.actions.setSqlGen), Y = u((k) => k.runSql), G = u((k) => k.actions.setRunSql), le = u((k) => k.actions.setCardCfg), ce = u(
2300
2301
  (k) => k.actions.setIsSqlRunning
2301
2302
  ), {
2302
2303
  data: $,
2303
2304
  isLoading: re,
2304
2305
  isFetching: E,
2305
- isSuccess: D,
2306
+ isSuccess: M,
2306
2307
  isError: ae,
2307
2308
  error: P,
2308
2309
  queryKey: W,
2309
2310
  refetch: te
2310
- } = Fe(p);
2311
+ } = Fe(f);
2311
2312
  se(() => {
2312
2313
  if ($ && ($.rowLimitExceeded && We.error("Row limit (10,000) exceeded. Refine your query.", {
2313
2314
  position: "top-center",
2314
2315
  richColors: !0
2315
- }), f(($ == null ? void 0 : $.output) || ""), $.records.length > 0)) {
2316
+ }), p(($ == null ? void 0 : $.output) || ""), $.records.length > 0)) {
2316
2317
  const { dimensionKeys: k } = vs($.records);
2317
- w(k);
2318
+ C(k);
2318
2319
  }
2319
- }, [$, w, f]), se(() => {
2320
- (re || E) && ce(!0), (ae || D) && ce(!1), ae && (w([]), f(""));
2320
+ }, [$, C, p]), se(() => {
2321
+ (re || E) && ce(!0), (ae || M) && ce(!1), ae && (C([]), p(""));
2321
2322
  }, [
2322
2323
  re,
2323
2324
  E,
2324
2325
  $,
2325
- f,
2326
+ p,
2326
2327
  ae,
2327
- D,
2328
+ M,
2328
2329
  ce,
2329
- w,
2330
+ C,
2330
2331
  // setQueryError,
2331
2332
  P
2332
2333
  ]), se(() => {
2333
- Y && (a.getQueryData(W) || te(), U(!1));
2334
- }, [Y, te, U, W, a]);
2335
- function ye() {
2334
+ Y && (a.getQueryData(W) || te(), G(!1));
2335
+ }, [Y, te, G, W, a]);
2336
+ function Ne() {
2336
2337
  const k = a.getQueryData(W);
2337
2338
  s.queryData || n({
2338
2339
  queryKey: W,
2339
2340
  queryData: k
2340
- }), a.setQueryData(W, null), a.removeQueries({ queryKey: W, exact: !0 }), h(""), X({}), le(void 0), R(""), z({}), O("bar");
2341
+ }), a.setQueryData(W, null), a.removeQueries({ queryKey: W, exact: !0 }), h(""), X({}), le(void 0), R(""), z({}), I("bar");
2341
2342
  }
2342
- function ue(k, ie) {
2343
+ function me(k, ie) {
2343
2344
  if (k.length === 0)
2344
2345
  return "";
2345
2346
  if (ie) {
2346
- const Me = k.find((de) => de.id === ie);
2347
- if (Me) {
2348
- const de = Me.tabTitle;
2349
- if (de == "All__Header")
2347
+ const De = k.find((ue) => ue.id === ie);
2348
+ if (De) {
2349
+ const ue = De.tabTitle;
2350
+ if (ue == "All__Header")
2350
2351
  return k[0].id;
2351
- if (de && de.endsWith("__Header")) {
2352
- const gs = de.split("__")[0], Ze = k.find(
2352
+ if (ue && ue.endsWith("__Header")) {
2353
+ const gs = ue.split("__")[0], Ze = k.find(
2353
2354
  (js) => js.tabTitle === gs
2354
2355
  );
2355
2356
  return Ze ? Ze.id : k[0].id;
@@ -2360,32 +2361,32 @@ function wl() {
2360
2361
  return k[0].id;
2361
2362
  }
2362
2363
  function L() {
2363
- let k = S;
2364
- S && !S.includes("{{") && (k = dl(S), h(k));
2364
+ let k = w;
2365
+ w && !w.includes("{{") && (k = dl(w), h(k));
2365
2366
  const ie = {
2366
- ...p,
2367
+ ...f,
2367
2368
  lastSelectedSchema: F,
2368
2369
  lastSelectedDatamodelId: V,
2369
2370
  lastSelectedDatabase: b,
2370
- lastSelectedTable: C,
2371
+ lastSelectedTable: S,
2371
2372
  connectionId: N,
2372
- type: g ? p.type : "table",
2373
+ type: g ? f.type : "table",
2373
2374
  sql: k,
2374
- customCfg: g ? p.customCfg : null
2375
- }, Me = d.cards.map(
2376
- (He) => He.id === p.id ? ie : He
2377
- ), de = {
2375
+ customCfg: g ? f.customCfg : null
2376
+ }, De = d.cards.map(
2377
+ (He) => He.id === f.id ? ie : He
2378
+ ), ue = {
2378
2379
  ...d,
2379
- cards: Me,
2380
- activeCardId: ue(Me, d.activeCardId)
2380
+ cards: De,
2381
+ activeCardId: me(De, d.activeCardId)
2381
2382
  };
2382
- q == null || q(de);
2383
+ A == null || A(ue);
2383
2384
  }
2384
- function G() {
2385
+ function U() {
2385
2386
  const { queryKey: k, queryData: ie } = s;
2386
2387
  k && ie && a.setQueryData(k, ie), X({}), B == null || B();
2387
2388
  }
2388
- function Ne() {
2389
+ function de() {
2389
2390
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2390
2391
  r && /* @__PURE__ */ e.jsx(
2391
2392
  "div",
@@ -2414,7 +2415,7 @@ function wl() {
2414
2415
  className: Z(
2415
2416
  "absolute bottom-4 right-6 h-3 w-3 text-foreground/50 hover:cursor-pointer hover:text-foreground",
2416
2417
  {
2417
- "font-bold text-red-800": I
2418
+ "font-bold text-red-800": O
2418
2419
  }
2419
2420
  )
2420
2421
  }
@@ -2486,7 +2487,7 @@ function wl() {
2486
2487
  children: [
2487
2488
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex grow justify-between overflow-y-scroll", children: [
2488
2489
  Ae(),
2489
- Ne()
2490
+ de()
2490
2491
  ] }),
2491
2492
  /* @__PURE__ */ e.jsxs(
2492
2493
  "div",
@@ -2496,7 +2497,7 @@ function wl() {
2496
2497
  children: [
2497
2498
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
2498
2499
  /* @__PURE__ */ e.jsxs(
2499
- M,
2500
+ D,
2500
2501
  {
2501
2502
  title: "Shift + Enter",
2502
2503
  disabled: re || E,
@@ -2515,16 +2516,16 @@ function wl() {
2515
2516
  (ae || ($ == null ? void 0 : $.error)) && /* @__PURE__ */ e.jsx(
2516
2517
  ul,
2517
2518
  {
2518
- error: (P == null ? void 0 : P.message) || ((Ie = $ == null ? void 0 : $.error) == null ? void 0 : Ie.message),
2519
+ error: (P == null ? void 0 : P.message) || ((Oe = $ == null ? void 0 : $.error) == null ? void 0 : Oe.message),
2519
2520
  setShowAIDialog: c,
2520
2521
  setTriggerAIRun: v,
2521
2522
  setUserInputforAI: x
2522
2523
  }
2523
2524
  ),
2524
2525
  /* @__PURE__ */ e.jsxs(
2525
- M,
2526
+ D,
2526
2527
  {
2527
- onClick: ye,
2528
+ onClick: Ne,
2528
2529
  className: "",
2529
2530
  size: "sm",
2530
2531
  variant: "outline",
@@ -2559,9 +2560,9 @@ function wl() {
2559
2560
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2560
2561
  ($ == null ? void 0 : $.sql) && /* @__PURE__ */ e.jsx(yl, { sql: $.sql }),
2561
2562
  /* @__PURE__ */ e.jsxs(
2562
- M,
2563
+ D,
2563
2564
  {
2564
- onClick: G,
2565
+ onClick: U,
2565
2566
  className: "w-full",
2566
2567
  size: "sm",
2567
2568
  variant: "outline",
@@ -2572,7 +2573,7 @@ function wl() {
2572
2573
  }
2573
2574
  ),
2574
2575
  /* @__PURE__ */ e.jsxs(
2575
- M,
2576
+ D,
2576
2577
  {
2577
2578
  onClick: L,
2578
2579
  size: "sm",
@@ -2606,12 +2607,12 @@ function kl({ data: s }) {
2606
2607
  onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
2607
2608
  children: [
2608
2609
  o,
2609
- m === "asc" ? /* @__PURE__ */ e.jsx(zt, { className: "ml-2 h-5 w-5" }) : m === "desc" ? /* @__PURE__ */ e.jsx(Ot, { className: "ml-2 h-5 w-5" }) : null
2610
+ m === "asc" ? /* @__PURE__ */ e.jsx(zt, { className: "ml-2 h-5 w-5" }) : m === "desc" ? /* @__PURE__ */ e.jsx(It, { className: "ml-2 h-5 w-5" }) : null
2610
2611
  ]
2611
2612
  }
2612
2613
  ) });
2613
2614
  }
2614
- })), r = It({
2615
+ })), r = Ot({
2615
2616
  data: s,
2616
2617
  columns: l,
2617
2618
  getCoreRowModel: Ft(),
@@ -2624,8 +2625,8 @@ function kl({ data: s }) {
2624
2625
  }
2625
2626
  });
2626
2627
  return /* @__PURE__ */ e.jsx("div", { className: "font-mono text-xs text-foreground/95", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
2627
- /* @__PURE__ */ e.jsx(Mt, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(bs, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2628
- Dt,
2628
+ /* @__PURE__ */ e.jsx(Dt, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(bs, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2629
+ Mt,
2629
2630
  {
2630
2631
  className: "sticky top-0 h-11 bg-muted font-semibold",
2631
2632
  children: c.isPlaceholder ? null : Ys(
@@ -2647,43 +2648,43 @@ function kl({ data: s }) {
2647
2648
  ] }) });
2648
2649
  }
2649
2650
  function zl({ card: s }) {
2650
- var b, V, F, C, S, I, R, w, h, f, z;
2651
- const [n, a] = A(!1), [t, l] = A(
2651
+ var b, V, F, S, w, O, R, C, h, p, z;
2652
+ const [n, a] = q(!1), [t, l] = q(
2652
2653
  []
2653
- ), { authToken: r } = Oe(), i = Vt(r == null ? void 0 : r.accessToken), o = T((O) => O.themeStyle), c = {
2654
+ ), { authToken: r } = Ie(), i = Vt(r == null ? void 0 : r.accessToken), o = T((I) => I.themeStyle), c = {
2654
2655
  colors: ((V = (b = o == null ? void 0 : o.chart) == null ? void 0 : b.dataset) == null ? void 0 : V.backgroundColor) || []
2655
2656
  };
2656
2657
  (F = s.customCardPreferences) != null && F.inputData;
2657
- const { getCard: m } = Na(((C = s.customCardPreferences) == null ? void 0 : C.url) || ""), x = ((S = s.customCardPreferences) == null ? void 0 : S.visualType) || "single", j = u((O) => O.frame);
2658
+ const { getCard: m } = Na(((S = s.customCardPreferences) == null ? void 0 : S.url) || ""), x = ((w = s.customCardPreferences) == null ? void 0 : w.visualType) || "single", j = u((I) => I.frame);
2658
2659
  ne();
2659
- const { data: v } = Fe(s), d = Da((O, q) => {
2660
+ const { data: v } = Fe(s), d = Ma((I, A) => {
2660
2661
  l((B) => ({
2661
2662
  ...B,
2662
- [O]: q
2663
+ [I]: A
2663
2664
  }));
2664
2665
  }, []);
2665
- if (!((I = s.customCardPreferences) != null && I.componentName))
2666
+ if (!((O = s.customCardPreferences) != null && O.componentName))
2666
2667
  return null;
2667
- const p = m(
2668
+ const f = m(
2668
2669
  (R = s.customCardPreferences) == null ? void 0 : R.componentName
2669
2670
  );
2670
- function g(O) {
2671
- a(O);
2671
+ function g(I) {
2672
+ a(I);
2672
2673
  }
2673
2674
  const N = Object.keys(
2674
- ((w = s.customCardPreferences) == null ? void 0 : w.dataInputCardIds) || {}
2675
- ).map((O) => {
2676
- var X, Y, U;
2677
- const q = (Y = (X = s.customCardPreferences) == null ? void 0 : X.dataInputCardIds) == null ? void 0 : Y[O].cardId, B = (U = j == null ? void 0 : j.cards) == null ? void 0 : U.find((le) => le.id === q);
2675
+ ((C = s.customCardPreferences) == null ? void 0 : C.dataInputCardIds) || {}
2676
+ ).map((I) => {
2677
+ var X, Y, G;
2678
+ const A = (Y = (X = s.customCardPreferences) == null ? void 0 : X.dataInputCardIds) == null ? void 0 : Y[I].cardId, B = (G = j == null ? void 0 : j.cards) == null ? void 0 : G.find((le) => le.id === A);
2678
2679
  return B || null;
2679
2680
  });
2680
2681
  return /* @__PURE__ */ e.jsx("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs(
2681
- On,
2682
+ In,
2682
2683
  {
2683
2684
  fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
2684
2685
  children: [
2685
- p && x === "single" && /* @__PURE__ */ e.jsx(
2686
- p,
2686
+ f && x === "single" && /* @__PURE__ */ e.jsx(
2687
+ f,
2687
2688
  {
2688
2689
  params: i,
2689
2690
  theme: c,
@@ -2692,13 +2693,13 @@ function zl({ card: s }) {
2692
2693
  data: (v == null ? void 0 : v.records) || []
2693
2694
  }
2694
2695
  ),
2695
- p && x === "multiple" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2696
+ f && x === "multiple" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2696
2697
  Object.keys(
2697
- ((f = s.customCardPreferences) == null ? void 0 : f.dataInputCardIds) || {}
2698
- ).map((O) => {
2699
- var X, Y, U;
2700
- const q = (Y = (X = s.customCardPreferences) == null ? void 0 : X.dataInputCardIds) == null ? void 0 : Y[O].cardId, B = (U = j == null ? void 0 : j.cards) == null ? void 0 : U.find(
2701
- (le) => le.id === q
2698
+ ((p = s.customCardPreferences) == null ? void 0 : p.dataInputCardIds) || {}
2699
+ ).map((I) => {
2700
+ var X, Y, G;
2701
+ const A = (Y = (X = s.customCardPreferences) == null ? void 0 : X.dataInputCardIds) == null ? void 0 : Y[I].cardId, B = (G = j == null ? void 0 : j.cards) == null ? void 0 : G.find(
2702
+ (le) => le.id === A
2702
2703
  );
2703
2704
  if (B)
2704
2705
  return /* @__PURE__ */ e.jsx(
@@ -2706,24 +2707,24 @@ function zl({ card: s }) {
2706
2707
  {
2707
2708
  onLoadingStatus: g,
2708
2709
  onDataChange: d,
2709
- dataInputIndex: O,
2710
+ dataInputIndex: I,
2710
2711
  card: B
2711
2712
  },
2712
- B.id + O
2713
+ B.id + I
2713
2714
  );
2714
2715
  }),
2715
2716
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsx(
2716
- p,
2717
+ f,
2717
2718
  {
2718
2719
  theme: c,
2719
2720
  onDataChange: d,
2720
2721
  settings: N.map(
2721
- (O) => {
2722
- var q;
2723
- return (q = O == null ? void 0 : O.customCardPreferences) == null ? void 0 : q.settings;
2722
+ (I) => {
2723
+ var A;
2724
+ return (A = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : A.settings;
2724
2725
  }
2725
2726
  ),
2726
- data: N.map((O) => O != null && O.id ? t == null ? void 0 : t[O.id] : [])
2727
+ data: N.map((I) => I != null && I.id ? t == null ? void 0 : t[I.id] : [])
2727
2728
  }
2728
2729
  ) })
2729
2730
  ] })
@@ -2752,7 +2753,7 @@ function Ba({
2752
2753
  preferences: a.preferences,
2753
2754
  topoJson: v
2754
2755
  }));
2755
- function p(b) {
2756
+ function f(b) {
2756
2757
  return /* @__PURE__ */ e.jsx(zl, { card: b });
2757
2758
  }
2758
2759
  function g() {
@@ -2763,7 +2764,7 @@ function Ba({
2763
2764
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
2764
2765
  ] });
2765
2766
  if (a.type === "custom")
2766
- return p(a);
2767
+ return f(a);
2767
2768
  if (!["table", "custom"].includes(a.type) && d)
2768
2769
  return /* @__PURE__ */ e.jsx(
2769
2770
  $t,
@@ -2773,7 +2774,7 @@ function Ba({
2773
2774
  JSON.stringify(d) + JSON.stringify(a.preferences) + ((b = a == null ? void 0 : a.preferences) == null ? void 0 : b.customVisualCode)
2774
2775
  );
2775
2776
  if (a.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
2776
- return /* @__PURE__ */ e.jsxs(be, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
2777
+ return /* @__PURE__ */ e.jsxs(ve, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
2777
2778
  /* @__PURE__ */ e.jsx(Ut, { card: a, data: c == null ? void 0 : c.records }),
2778
2779
  /* @__PURE__ */ e.jsx(Je, { orientation: "horizontal" })
2779
2780
  ] });
@@ -2844,8 +2845,8 @@ const ra = ({ language: s, value: n, onChange: a }) => /* @__PURE__ */ e.jsx(
2844
2845
  value: n,
2845
2846
  onChange: a
2846
2847
  }
2847
- ), Ol = () => /* @__PURE__ */ e.jsxs(zs, { children: [
2848
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Os, { children: "Customize Card" }) }),
2848
+ ), Il = () => /* @__PURE__ */ e.jsxs(zs, { children: [
2849
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Is, { children: "Customize Card" }) }),
2849
2850
  /* @__PURE__ */ e.jsxs(ca, { children: [
2850
2851
  "See the configuration options and documentation",
2851
2852
  /* @__PURE__ */ e.jsx(
@@ -2858,7 +2859,7 @@ const ra = ({ language: s, value: n, onChange: a }) => /* @__PURE__ */ e.jsx(
2858
2859
  }
2859
2860
  )
2860
2861
  ] })
2861
- ] }), Il = ({
2862
+ ] }), Ol = ({
2862
2863
  defaultConfig: s,
2863
2864
  customCode: n,
2864
2865
  customConfig: a,
@@ -2915,7 +2916,7 @@ const ra = ({ language: s, value: n, onChange: a }) => /* @__PURE__ */ e.jsx(
2915
2916
  )
2916
2917
  }
2917
2918
  )
2918
- ] }), Ml = ({
2919
+ ] }), Dl = ({
2919
2920
  error: s,
2920
2921
  hasCustomConfig: n,
2921
2922
  onReset: a,
@@ -2923,28 +2924,28 @@ const ra = ({ language: s, value: n, onChange: a }) => /* @__PURE__ */ e.jsx(
2923
2924
  onClose: l
2924
2925
  }) => /* @__PURE__ */ e.jsxs(da, { className: "flex items-center", children: [
2925
2926
  /* @__PURE__ */ e.jsx(H, { className: "mr-2 text-red-500", children: s }),
2926
- /* @__PURE__ */ e.jsx(M, { disabled: !n, onClick: a, variant: "outline", children: "Reset" }),
2927
- /* @__PURE__ */ e.jsx(M, { onClick: t, variant: "outline", children: "Apply" }),
2928
- /* @__PURE__ */ e.jsx(M, { onClick: l, variant: "outline", children: "Close" })
2927
+ /* @__PURE__ */ e.jsx(D, { disabled: !n, onClick: a, variant: "outline", children: "Reset" }),
2928
+ /* @__PURE__ */ e.jsx(D, { onClick: t, variant: "outline", children: "Apply" }),
2929
+ /* @__PURE__ */ e.jsx(D, { onClick: l, variant: "outline", children: "Close" })
2929
2930
  ] });
2930
- function Dl() {
2931
- const [s, n] = A(!1), [a, t] = A(""), [l, r] = A(""), [i, o] = A(""), [c, m] = A(""), x = u((C) => C.card), j = u((C) => C.card.customCfg), { data: v } = Fe(x), { data: d } = Vs(x), { setCardCustomCfg: p, setCustomVisualCode: g } = ne(), N = (C, S) => Ce.transform(C, (I, R, w) => {
2932
- if (!Ce.isEqual(R, S[w]))
2933
- if (Ce.isArray(R) && Ce.isArray(S[w]))
2934
- I[w] = S[w];
2935
- else if (Ce.isObject(R) && Ce.isObject(S[w])) {
2936
- const h = N(R, S[w]);
2937
- Ce.isEmpty(h) || (I[w] = h);
2931
+ function Ml() {
2932
+ const [s, n] = q(!1), [a, t] = q(""), [l, r] = q(""), [i, o] = q(""), [c, m] = q(""), x = u((S) => S.card), j = u((S) => S.card.customCfg), { data: v } = Fe(x), { data: d } = Vs(x), { setCardCustomCfg: f, setCustomVisualCode: g } = ne(), N = (S, w) => Ce.transform(S, (O, R, C) => {
2933
+ if (!Ce.isEqual(R, w[C]))
2934
+ if (Ce.isArray(R) && Ce.isArray(w[C]))
2935
+ O[C] = w[C];
2936
+ else if (Ce.isObject(R) && Ce.isObject(w[C])) {
2937
+ const h = N(R, w[C]);
2938
+ Ce.isEmpty(h) || (O[C] = h);
2938
2939
  } else
2939
- I[w] = S[w];
2940
- }), b = (C) => {
2941
- var S, I;
2940
+ O[C] = w[C];
2941
+ }), b = (S) => {
2942
+ var w, O;
2942
2943
  return JSON.stringify(
2943
2944
  {
2944
- ...C,
2945
+ ...S,
2945
2946
  data: {
2946
- ...C.data,
2947
- datasets: (I = (S = C.data) == null ? void 0 : S.datasets) == null ? void 0 : I.map((R) => ({
2947
+ ...S.data,
2948
+ datasets: (O = (w = S.data) == null ? void 0 : w.datasets) == null ? void 0 : O.map((R) => ({
2948
2949
  ...R,
2949
2950
  data: []
2950
2951
  }))
@@ -2954,30 +2955,30 @@ function Dl() {
2954
2955
  2
2955
2956
  );
2956
2957
  }, V = () => {
2957
- var S, I;
2958
- if (!((S = v == null ? void 0 : v.records) != null && S.length)) return;
2959
- const C = Ca({
2958
+ var w, O;
2959
+ if (!((w = v == null ? void 0 : v.records) != null && w.length)) return;
2960
+ const S = Ca({
2960
2961
  data: v.records,
2961
2962
  cardType: x.type,
2962
2963
  cfg: x.cfg,
2963
2964
  preferences: x.preferences,
2964
2965
  topoJson: d
2965
2966
  });
2966
- if (C) {
2967
- t(b(C)), o(((I = x.preferences) == null ? void 0 : I.customVisualCode) || "");
2968
- const R = Ce.merge(C, j);
2967
+ if (S) {
2968
+ t(b(S)), o(((O = x.preferences) == null ? void 0 : O.customVisualCode) || "");
2969
+ const R = Ce.merge(S, j);
2969
2970
  r(b(R));
2970
2971
  }
2971
2972
  }, F = () => {
2972
2973
  try {
2973
2974
  if (i && g(i), l) {
2974
- const C = JSON.parse(
2975
+ const S = JSON.parse(
2975
2976
  l
2976
- ), S = N(
2977
+ ), w = N(
2977
2978
  JSON.parse(a),
2978
- C
2979
+ S
2979
2980
  );
2980
- p(S), m("");
2981
+ f(w), m("");
2981
2982
  }
2982
2983
  } catch {
2983
2984
  m("Invalid JSON configuration");
@@ -2985,7 +2986,7 @@ function Dl() {
2985
2986
  };
2986
2987
  return /* @__PURE__ */ e.jsxs(Ss, { open: s, onOpenChange: n, children: [
2987
2988
  /* @__PURE__ */ e.jsx(ws, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2988
- M,
2989
+ D,
2989
2990
  {
2990
2991
  onClick: V,
2991
2992
  size: "sm",
@@ -2995,27 +2996,27 @@ function Dl() {
2995
2996
  }
2996
2997
  ) }),
2997
2998
  /* @__PURE__ */ e.jsxs(ks, { className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
2998
- /* @__PURE__ */ e.jsx(Ol, {}),
2999
+ /* @__PURE__ */ e.jsx(Il, {}),
2999
3000
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
3000
3001
  /* @__PURE__ */ e.jsx(us, { FallbackComponent: wa, children: /* @__PURE__ */ e.jsx(Ba, { className: "w-1/2 rounded shadow-none" }) }),
3001
3002
  /* @__PURE__ */ e.jsx(
3002
- Il,
3003
+ Ol,
3003
3004
  {
3004
3005
  defaultConfig: a,
3005
3006
  customCode: i,
3006
3007
  customConfig: l,
3007
- onConfigChange: (C) => r(C ?? ""),
3008
- onCodeChange: (C) => o(C ?? "")
3008
+ onConfigChange: (S) => r(S ?? ""),
3009
+ onCodeChange: (S) => o(S ?? "")
3009
3010
  }
3010
3011
  )
3011
3012
  ] }),
3012
3013
  /* @__PURE__ */ e.jsx(
3013
- Ml,
3014
+ Dl,
3014
3015
  {
3015
3016
  error: c,
3016
3017
  hasCustomConfig: !!j,
3017
3018
  onReset: () => {
3018
- r(a), p(null);
3019
+ r(a), f(null);
3019
3020
  },
3020
3021
  onApply: F,
3021
3022
  onClose: () => n(!1)
@@ -3025,40 +3026,40 @@ function Dl() {
3025
3026
  ] });
3026
3027
  }
3027
3028
  function $a(s) {
3028
- return ve({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
3029
+ return ye({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
3029
3030
  }
3030
3031
  function Ua(s) {
3031
- return ve({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24a8,8,0,0,0-8,8V88a8,8,0,0,0,8,8,32,32,0,1,1-27.72,16,8,8,0,0,0-2.93-10.93l-48.5-28A8,8,0,0,0,37.92,76,104,104,0,1,0,128,24ZM48.09,91.1,83,111.26A48.09,48.09,0,0,0,80,128c0,1.53.08,3,.22,4.52L41.28,143A88.16,88.16,0,0,1,48.09,91.1Zm-2.67,67.31,39-10.44A48.1,48.1,0,0,0,120,175.32v40.31A88.2,88.2,0,0,1,45.42,158.41ZM136,215.63V175.32a48,48,0,0,0,0-94.65V40.36a88,88,0,0,1,0,175.27Z" }, child: [] }] })(s);
3032
+ return ye({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24a8,8,0,0,0-8,8V88a8,8,0,0,0,8,8,32,32,0,1,1-27.72,16,8,8,0,0,0-2.93-10.93l-48.5-28A8,8,0,0,0,37.92,76,104,104,0,1,0,128,24ZM48.09,91.1,83,111.26A48.09,48.09,0,0,0,80,128c0,1.53.08,3,.22,4.52L41.28,143A88.16,88.16,0,0,1,48.09,91.1Zm-2.67,67.31,39-10.44A48.1,48.1,0,0,0,120,175.32v40.31A88.2,88.2,0,0,1,45.42,158.41ZM136,215.63V175.32a48,48,0,0,0,0-94.65V40.36a88,88,0,0,1,0,175.27Z" }, child: [] }] })(s);
3032
3033
  }
3033
3034
  function Ga(s) {
3034
- return ve({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
3035
+ return ye({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
3035
3036
  }
3036
3037
  function Wa(s) {
3037
- return ve({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
3038
+ return ye({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
3038
3039
  }
3039
3040
  function Ja(s) {
3040
- return ve({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
3041
+ return ye({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
3041
3042
  }
3042
3043
  function Ka(s) {
3043
- return ve({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
3044
+ return ye({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
3044
3045
  }
3045
3046
  function Qa(s) {
3046
- return ve({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
3047
+ return ye({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
3047
3048
  }
3048
3049
  function Za(s) {
3049
- return ve({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
3050
+ return ye({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
3050
3051
  }
3051
3052
  function Xa(s) {
3052
- const [n, a] = A(null);
3053
+ const [n, a] = q(null);
3053
3054
  return se(() => {
3054
3055
  s && (async () => {
3055
- const r = (await import("./lucide-react-69gCJpeX.js"))[s];
3056
+ const r = (await import("./lucide-react-Ds4vVLCA.js"))[s];
3056
3057
  a(r);
3057
3058
  })();
3058
3059
  }, [s]), n;
3059
3060
  }
3060
3061
  function Ya() {
3061
- const { authToken: s } = Oe(), { data: n, isLoading: a, isFetching: t, isError: l } = De({
3062
+ const { authToken: s } = Ie(), { data: n, isLoading: a, isFetching: t, isError: l } = Me({
3062
3063
  queryKey: ["plugins", s == null ? void 0 : s.accessToken],
3063
3064
  queryFn: () => Jt(s == null ? void 0 : s.accessToken)
3064
3065
  // staleTime: Infinity,
@@ -3068,7 +3069,7 @@ function Ya() {
3068
3069
  function Tl({
3069
3070
  onChartTypeChange: s
3070
3071
  }) {
3071
- const [n, a] = A([]), { data: t } = Ya();
3072
+ const [n, a] = q([]), { data: t } = Ya();
3072
3073
  return se(() => {
3073
3074
  (async () => {
3074
3075
  var r;
@@ -3102,11 +3103,11 @@ const Fl = ({
3102
3103
  onClick: a
3103
3104
  }) => {
3104
3105
  const t = Xa(n || ""), l = s.charAt(0).toUpperCase();
3105
- return /* @__PURE__ */ e.jsx(M, { onClick: a, title: s, variant: "ghost", children: t ? /* @__PURE__ */ e.jsx(t, { className: "h-4 w-4" }) : l });
3106
+ return /* @__PURE__ */ e.jsx(D, { onClick: a, title: s, variant: "ghost", children: t ? /* @__PURE__ */ e.jsx(t, { className: "h-4 w-4" }) : l });
3106
3107
  };
3107
3108
  function Ll() {
3108
3109
  var x, j;
3109
- const [s, n] = A(!1), a = u((v) => v.card), t = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = u((v) => v.actions), { setCardCustomCfg: o, setCustomCardPreferences: c } = ne();
3110
+ const [s, n] = q(!1), a = u((v) => v.card), t = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = u((v) => v.actions), { setCardCustomCfg: o, setCustomCardPreferences: c } = ne();
3110
3111
  function m(v, d) {
3111
3112
  o(null), r({}), l(v), d && c({
3112
3113
  type: "component",
@@ -3117,7 +3118,7 @@ function Ll() {
3117
3118
  }), n(!1);
3118
3119
  }
3119
3120
  return /* @__PURE__ */ e.jsxs(ms, { open: s, onOpenChange: n, children: [
3120
- /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3121
+ /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(D, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3121
3122
  El,
3122
3123
  {
3123
3124
  className: "h-4 w-4",
@@ -3129,7 +3130,7 @@ function Ll() {
3129
3130
  /* @__PURE__ */ e.jsxs(xs, { className: "w-50", children: [
3130
3131
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 place-items-center", children: [
3131
3132
  /* @__PURE__ */ e.jsx(
3132
- M,
3133
+ D,
3133
3134
  {
3134
3135
  onClick: () => m("bar"),
3135
3136
  className: "font-normal",
@@ -3138,7 +3139,7 @@ function Ll() {
3138
3139
  }
3139
3140
  ),
3140
3141
  /* @__PURE__ */ e.jsx(
3141
- M,
3142
+ D,
3142
3143
  {
3143
3144
  onClick: () => m("line"),
3144
3145
  variant: "ghost",
@@ -3146,7 +3147,7 @@ function Ll() {
3146
3147
  }
3147
3148
  ),
3148
3149
  /* @__PURE__ */ e.jsx(
3149
- M,
3150
+ D,
3150
3151
  {
3151
3152
  onClick: () => m("stackedBar"),
3152
3153
  variant: "ghost",
@@ -3154,7 +3155,7 @@ function Ll() {
3154
3155
  }
3155
3156
  ),
3156
3157
  /* @__PURE__ */ e.jsx(
3157
- M,
3158
+ D,
3158
3159
  {
3159
3160
  onClick: () => m("stackedLine"),
3160
3161
  variant: "ghost",
@@ -3162,7 +3163,7 @@ function Ll() {
3162
3163
  }
3163
3164
  ),
3164
3165
  /* @__PURE__ */ e.jsx(
3165
- M,
3166
+ D,
3166
3167
  {
3167
3168
  onClick: () => m("scatter"),
3168
3169
  variant: "ghost",
@@ -3170,7 +3171,7 @@ function Ll() {
3170
3171
  }
3171
3172
  ),
3172
3173
  /* @__PURE__ */ e.jsx(
3173
- M,
3174
+ D,
3174
3175
  {
3175
3176
  onClick: () => m("bubble"),
3176
3177
  variant: "ghost",
@@ -3178,7 +3179,7 @@ function Ll() {
3178
3179
  }
3179
3180
  ),
3180
3181
  /* @__PURE__ */ e.jsx(
3181
- M,
3182
+ D,
3182
3183
  {
3183
3184
  onClick: () => m("pie"),
3184
3185
  variant: "ghost",
@@ -3186,7 +3187,7 @@ function Ll() {
3186
3187
  }
3187
3188
  ),
3188
3189
  /* @__PURE__ */ e.jsx(
3189
- M,
3190
+ D,
3190
3191
  {
3191
3192
  onClick: () => m("doughnut"),
3192
3193
  variant: "ghost",
@@ -3194,7 +3195,7 @@ function Ll() {
3194
3195
  }
3195
3196
  ),
3196
3197
  /* @__PURE__ */ e.jsx(
3197
- M,
3198
+ D,
3198
3199
  {
3199
3200
  onClick: () => m("radar"),
3200
3201
  variant: "ghost",
@@ -3208,7 +3209,7 @@ function Ll() {
3208
3209
  }
3209
3210
  ),
3210
3211
  /* @__PURE__ */ e.jsx(
3211
- M,
3212
+ D,
3212
3213
  {
3213
3214
  onClick: () => m("polarArea"),
3214
3215
  variant: "ghost",
@@ -3216,7 +3217,7 @@ function Ll() {
3216
3217
  }
3217
3218
  ),
3218
3219
  /* @__PURE__ */ e.jsx(
3219
- M,
3220
+ D,
3220
3221
  {
3221
3222
  onClick: () => m("pyramid"),
3222
3223
  variant: "ghost",
@@ -3224,7 +3225,7 @@ function Ll() {
3224
3225
  }
3225
3226
  ),
3226
3227
  /* @__PURE__ */ e.jsx(
3227
- M,
3228
+ D,
3228
3229
  {
3229
3230
  onClick: () => m("range"),
3230
3231
  variant: "ghost",
@@ -3232,7 +3233,7 @@ function Ll() {
3232
3233
  }
3233
3234
  ),
3234
3235
  /* @__PURE__ */ e.jsx(
3235
- M,
3236
+ D,
3236
3237
  {
3237
3238
  onClick: () => m("table"),
3238
3239
  variant: "ghost",
@@ -3240,7 +3241,7 @@ function Ll() {
3240
3241
  }
3241
3242
  ),
3242
3243
  /* @__PURE__ */ e.jsx(
3243
- M,
3244
+ D,
3244
3245
  {
3245
3246
  onClick: () => m("kpi"),
3246
3247
  variant: "ghost",
@@ -3248,7 +3249,7 @@ function Ll() {
3248
3249
  }
3249
3250
  ),
3250
3251
  /* @__PURE__ */ e.jsx(
3251
- M,
3252
+ D,
3252
3253
  {
3253
3254
  onClick: () => m("text"),
3254
3255
  variant: "ghost",
@@ -3256,7 +3257,7 @@ function Ll() {
3256
3257
  }
3257
3258
  ),
3258
3259
  /* @__PURE__ */ e.jsx(
3259
- M,
3260
+ D,
3260
3261
  {
3261
3262
  onClick: () => m("map"),
3262
3263
  variant: "ghost",
@@ -3264,7 +3265,7 @@ function Ll() {
3264
3265
  }
3265
3266
  ),
3266
3267
  /* @__PURE__ */ e.jsx(
3267
- M,
3268
+ D,
3268
3269
  {
3269
3270
  onClick: () => m("custom"),
3270
3271
  variant: "ghost",
@@ -3323,9 +3324,9 @@ function El({
3323
3324
  function Vl() {
3324
3325
  var n;
3325
3326
  const s = u((a) => a.card);
3326
- return (n = s.customCardPreferences) == null || n.showCardHeader, ne(), /* @__PURE__ */ e.jsxs(Is, { children: [
3327
- /* @__PURE__ */ e.jsx(Ms, { asChild: !0, children: /* @__PURE__ */ e.jsx(Hs, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3328
- /* @__PURE__ */ e.jsx(Ds, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3327
+ return (n = s.customCardPreferences) == null || n.showCardHeader, ne(), /* @__PURE__ */ e.jsxs(Os, { children: [
3328
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(Hs, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3329
+ /* @__PURE__ */ e.jsx(Ms, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3329
3330
  Qt,
3330
3331
  {
3331
3332
  onClick: () => {
@@ -3341,7 +3342,7 @@ function Vl() {
3341
3342
  ] });
3342
3343
  }
3343
3344
  function ia() {
3344
- var w;
3345
+ var C;
3345
3346
  const s = u((h) => h.frame), n = u((h) => h.card), a = u((h) => h.isShowingVisual), t = u((h) => h.isSqlRunning), l = u((h) => h.pythonStdOut);
3346
3347
  u((h) => h.actions.setRunSql);
3347
3348
  const { setFrame: r, setCard: i, updateCardInFrame: o, setActiveTabCardId: c } = ne(), { data: m, isLoading: x, isFetching: j, error: v } = Fe(n);
@@ -3364,15 +3365,15 @@ function ia() {
3364
3365
  sql: "",
3365
3366
  data: []
3366
3367
  };
3367
- p(h);
3368
+ f(h);
3368
3369
  }
3369
- function p(h) {
3370
- const f = {
3370
+ function f(h) {
3371
+ const p = {
3371
3372
  ...s,
3372
3373
  cards: [...s.cards, h],
3373
3374
  activeCardId: h.id
3374
3375
  };
3375
- r(f), c(h.id);
3376
+ r(p), c(h.id);
3376
3377
  }
3377
3378
  function g() {
3378
3379
  const h = {
@@ -3381,46 +3382,46 @@ function ia() {
3381
3382
  title: `${n.title} Copy`,
3382
3383
  tabTitle: `${n.tabTitle || n.title} Copy`
3383
3384
  };
3384
- p(h);
3385
+ f(h);
3385
3386
  }
3386
3387
  function N(h) {
3387
- const f = s.cards.filter((q) => q.id !== h), z = f[0], O = {
3388
+ const p = s.cards.filter((A) => A.id !== h), z = p[0], I = {
3388
3389
  ...s,
3389
- cards: f,
3390
+ cards: p,
3390
3391
  // update the active card to the first card in the frame
3391
3392
  activeCardId: z.id
3392
3393
  };
3393
- r(O), c(z.id), i(z);
3394
+ r(I), c(z.id), i(z);
3394
3395
  }
3395
3396
  function b(h) {
3396
3397
  c(h);
3397
3398
  }
3398
- const V = (h, f) => {
3399
- console.log("handleDragStart", f), h.dataTransfer.setData("tabIndex", f.toString());
3399
+ const V = (h, p) => {
3400
+ console.log("handleDragStart", p), h.dataTransfer.setData("tabIndex", p.toString());
3400
3401
  }, F = (h) => {
3401
3402
  h.preventDefault();
3402
- }, C = (h, f) => {
3403
+ }, S = (h, p) => {
3403
3404
  const z = h.dataTransfer.getData("tabIndex");
3404
- if (z === f.toString()) return;
3405
- const O = Array.from(s.cards), [q] = O.splice(parseInt(z), 1);
3406
- O.splice(f, 0, q), r({ ...s, cards: O });
3405
+ if (z === p.toString()) return;
3406
+ const I = Array.from(s.cards), [A] = I.splice(parseInt(z), 1);
3407
+ I.splice(p, 0, A), r({ ...s, cards: I });
3407
3408
  };
3408
- function S(h, f) {
3409
- return h.cards.length === 1 && (f.displayTab === !0 || f.displayTab === void 0) || h.activeCardId !== f.id && (f.displayTab === !0 || f.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
3409
+ function w(h, p) {
3410
+ return h.cards.length === 1 && (p.displayTab === !0 || p.displayTab === void 0) || h.activeCardId !== p.id && (p.displayTab === !0 || p.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
3410
3411
  "div",
3411
3412
  {
3412
3413
  onClick: () => {
3413
- const z = f.displayTab === void 0 ? !1 : !f.displayTab;
3414
- i({ ...f, displayTab: z }), o({
3415
- ...f,
3414
+ const z = p.displayTab === void 0 ? !1 : !p.displayTab;
3415
+ i({ ...p, displayTab: z }), o({
3416
+ ...p,
3416
3417
  displayTab: z
3417
3418
  });
3418
3419
  },
3419
- children: f.displayTab === !0 || f.displayTab === void 0 ? /* @__PURE__ */ e.jsx(sn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Vn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3420
+ children: p.displayTab === !0 || p.displayTab === void 0 ? /* @__PURE__ */ e.jsx(sn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Vn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3420
3421
  }
3421
3422
  );
3422
3423
  }
3423
- function I() {
3424
+ function O() {
3424
3425
  return /* @__PURE__ */ e.jsxs(
3425
3426
  ka,
3426
3427
  {
@@ -3430,7 +3431,7 @@ function ia() {
3430
3431
  children: [
3431
3432
  s.cards.map((h) => /* @__PURE__ */ e.jsx(as, { className: "mt-0 grow", value: h.id, children: R() }, h.id)),
3432
3433
  /* @__PURE__ */ e.jsx(za, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3433
- s.cards.map((h, f) => /* @__PURE__ */ e.jsx(
3434
+ s.cards.map((h, p) => /* @__PURE__ */ e.jsx(
3434
3435
  es,
3435
3436
  {
3436
3437
  text: h.tabTitle || h.title,
@@ -3441,13 +3442,13 @@ function ia() {
3441
3442
  ss,
3442
3443
  {
3443
3444
  draggable: !0,
3444
- onDragStart: (z) => V(z, f),
3445
+ onDragStart: (z) => V(z, p),
3445
3446
  onDragOver: F,
3446
- onDrop: (z) => C(z, f),
3447
+ onDrop: (z) => S(z, p),
3447
3448
  className: "",
3448
3449
  value: h.id,
3449
3450
  children: [
3450
- S(s, h),
3451
+ w(s, h),
3451
3452
  h.tabTitle || h.title,
3452
3453
  s.activeCardId === h.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
3453
3454
  Es,
@@ -3463,7 +3464,7 @@ function ia() {
3463
3464
  h.id
3464
3465
  )),
3465
3466
  /* @__PURE__ */ e.jsx(
3466
- M,
3467
+ D,
3467
3468
  {
3468
3469
  className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
3469
3470
  variant: "outline",
@@ -3472,7 +3473,7 @@ function ia() {
3472
3473
  }
3473
3474
  ),
3474
3475
  /* @__PURE__ */ e.jsx(
3475
- M,
3476
+ D,
3476
3477
  {
3477
3478
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
3478
3479
  variant: "outline",
@@ -3486,7 +3487,7 @@ function ia() {
3486
3487
  );
3487
3488
  }
3488
3489
  function R() {
3489
- return n.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Xt, { card: n, data: m == null ? void 0 : m.records }) }) }) : n.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(be, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3490
+ return n.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Xt, { card: n, data: m == null ? void 0 : m.records }) }) }) : n.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(ve, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3490
3491
  Yt,
3491
3492
  {
3492
3493
  isLoading: t,
@@ -3500,12 +3501,12 @@ function ia() {
3500
3501
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
3501
3502
  a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
3502
3503
  /* @__PURE__ */ e.jsx(Ll, {}),
3503
- !["table", "custom"].includes(n.type) && /* @__PURE__ */ e.jsx(Dl, {}),
3504
+ !["table", "custom"].includes(n.type) && /* @__PURE__ */ e.jsx(Ml, {}),
3504
3505
  /* @__PURE__ */ e.jsx(Vl, {})
3505
3506
  ] }),
3506
3507
  /* @__PURE__ */ e.jsx(ql, {})
3507
3508
  ] }),
3508
- a ? I() : /* @__PURE__ */ e.jsxs(
3509
+ a ? O() : /* @__PURE__ */ e.jsxs(
3509
3510
  ns,
3510
3511
  {
3511
3512
  className: "px-6",
@@ -3532,9 +3533,9 @@ function ia() {
3532
3533
  order: 2,
3533
3534
  minSize: 10,
3534
3535
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
3535
- children: /* @__PURE__ */ e.jsxs(be, { className: "relative flex h-full min-h-0 w-full flex-1 basis-0", children: [
3536
+ children: /* @__PURE__ */ e.jsxs(ve, { className: "relative flex h-full min-h-0 w-full flex-1 basis-0", children: [
3536
3537
  (m == null ? void 0 : m.records) && (m == null ? void 0 : m.records.length) > 0 && /* @__PURE__ */ e.jsx(kl, { data: (m == null ? void 0 : m.records) || [] }),
3537
- (v || (m == null ? void 0 : m.error)) && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: (v == null ? void 0 : v.message) || ((w = m == null ? void 0 : m.error) == null ? void 0 : w.message) }),
3538
+ (v || (m == null ? void 0 : m.error)) && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: (v == null ? void 0 : v.message) || ((C = m == null ? void 0 : m.error) == null ? void 0 : C.message) }),
3538
3539
  /* @__PURE__ */ e.jsx(Je, { orientation: "horizontal" })
3539
3540
  ] })
3540
3541
  }
@@ -3550,7 +3551,7 @@ function Al() {
3550
3551
  const n = s.replace(/\n/g, "<br>");
3551
3552
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex w-full flex-col border-r", children: [
3552
3553
  /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex max-h-11 min-h-11 grow items-center border-b bg-muted px-3 font-mono text-xs font-semibold text-foreground/70", children: "Python Output" }),
3553
- /* @__PURE__ */ e.jsxs(be, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
3554
+ /* @__PURE__ */ e.jsxs(ve, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
3554
3555
  /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: n } }),
3555
3556
  /* @__PURE__ */ e.jsx(Je, { orientation: "horizontal" })
3556
3557
  ] })
@@ -3592,23 +3593,23 @@ function Rl({
3592
3593
  }
3593
3594
  );
3594
3595
  }
3595
- function he({
3596
+ function xe({
3596
3597
  label: s,
3597
3598
  options: n,
3598
3599
  value: a,
3599
3600
  onValueChange: t,
3600
3601
  className: l
3601
3602
  }) {
3602
- return /* @__PURE__ */ e.jsxs(xe, { value: a, onValueChange: t, children: [
3603
+ return /* @__PURE__ */ e.jsxs(pe, { value: a, onValueChange: t, children: [
3603
3604
  /* @__PURE__ */ e.jsx(
3604
- pe,
3605
+ fe,
3605
3606
  {
3606
3607
  className: Z("w-full focus:ring-0 focus:ring-offset-0", l),
3607
- children: /* @__PURE__ */ e.jsx(fe, { placeholder: s })
3608
+ children: /* @__PURE__ */ e.jsx(ge, { placeholder: s })
3608
3609
  }
3609
3610
  ),
3610
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
3611
- /* @__PURE__ */ e.jsx(je, { children: s }),
3611
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
3612
+ /* @__PURE__ */ e.jsx(be, { children: s }),
3612
3613
  n.map((r) => /* @__PURE__ */ e.jsx(ee, { value: r.value, children: r.label }, r.value))
3613
3614
  ] }) })
3614
3615
  ] });
@@ -3645,7 +3646,7 @@ function _l() {
3645
3646
  );
3646
3647
  function x(b, V) {
3647
3648
  if (!s) return;
3648
- const C = {
3649
+ const S = {
3649
3650
  ...(s == null ? void 0 : s.dataInputCardIds) || {},
3650
3651
  [b]: {
3651
3652
  cardId: V,
@@ -3654,71 +3655,71 @@ function _l() {
3654
3655
  };
3655
3656
  i({
3656
3657
  ...s,
3657
- dataInputCardIds: C
3658
+ dataInputCardIds: S
3658
3659
  });
3659
3660
  }
3660
3661
  function j(b) {
3661
- var F, C;
3662
- const V = (F = l == null ? void 0 : l.cards) == null ? void 0 : F.filter((S) => {
3663
- var I;
3664
- return ((I = S == null ? void 0 : S.customCardPreferences) == null ? void 0 : I.visualType) !== "multiple";
3665
- }).map((S) => ({
3666
- value: S.id,
3667
- label: S.tabTitle || S.title
3662
+ var F, S;
3663
+ const V = (F = l == null ? void 0 : l.cards) == null ? void 0 : F.filter((w) => {
3664
+ var O;
3665
+ return ((O = w == null ? void 0 : w.customCardPreferences) == null ? void 0 : O.visualType) !== "multiple";
3666
+ }).map((w) => ({
3667
+ value: w.id,
3668
+ label: w.tabTitle || w.title
3668
3669
  }));
3669
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (C = b == null ? void 0 : b.dataInputs) == null ? void 0 : C.map((S, I) => {
3670
- var R, w;
3670
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (S = b == null ? void 0 : b.dataInputs) == null ? void 0 : S.map((w, O) => {
3671
+ var R, C;
3671
3672
  return /* @__PURE__ */ e.jsxs(
3672
3673
  "div",
3673
3674
  {
3674
3675
  className: "grid grid-cols-10 gap-2",
3675
3676
  children: [
3676
- /* @__PURE__ */ e.jsx("div", { className: "col-span-4 flex items-center", children: S }),
3677
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-4 flex items-center", children: w }),
3677
3678
  /* @__PURE__ */ e.jsx(
3678
- he,
3679
+ xe,
3679
3680
  {
3680
3681
  className: "col-span-6 h-8 w-full justify-between",
3681
3682
  label: "",
3682
3683
  options: V || [],
3683
- value: ((w = (R = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : R[I]) == null ? void 0 : w.cardId) || "",
3684
- onValueChange: (h) => x(I, h)
3684
+ value: ((C = (R = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : R[O]) == null ? void 0 : C.cardId) || "",
3685
+ onValueChange: (h) => x(O, h)
3685
3686
  }
3686
3687
  )
3687
3688
  ]
3688
3689
  },
3689
- I + Math.random()
3690
+ O + Math.random()
3690
3691
  );
3691
3692
  }) });
3692
3693
  }
3693
3694
  function v(b, V, F = []) {
3694
- var C, S;
3695
+ var S, w;
3695
3696
  return s ? b === "input" ? /* @__PURE__ */ e.jsx(
3696
3697
  oe,
3697
3698
  {
3698
3699
  className: `h-8 w-full ${Be}`,
3699
- value: ((C = s == null ? void 0 : s.settings) == null ? void 0 : C[V]) || "",
3700
- onChange: (I) => {
3700
+ value: ((S = s == null ? void 0 : s.settings) == null ? void 0 : S[V]) || "",
3701
+ onChange: (O) => {
3701
3702
  i({
3702
3703
  ...s,
3703
3704
  settings: {
3704
3705
  ...s == null ? void 0 : s.settings,
3705
- [V]: I.target.value
3706
+ [V]: O.target.value
3706
3707
  }
3707
3708
  });
3708
3709
  }
3709
3710
  },
3710
3711
  V
3711
3712
  ) : b === "select" ? /* @__PURE__ */ e.jsx(
3712
- he,
3713
+ xe,
3713
3714
  {
3714
3715
  className: "h-8 w-full",
3715
3716
  label: "",
3716
3717
  options: F,
3717
- value: ((S = s == null ? void 0 : s.settings) == null ? void 0 : S[V]) || "",
3718
- onValueChange: (I) => {
3718
+ value: ((w = s == null ? void 0 : s.settings) == null ? void 0 : w[V]) || "",
3719
+ onValueChange: (O) => {
3719
3720
  i({
3720
3721
  ...s,
3721
- settings: { ...s == null ? void 0 : s.settings, [V]: I }
3722
+ settings: { ...s == null ? void 0 : s.settings, [V]: O }
3722
3723
  });
3723
3724
  }
3724
3725
  }
@@ -3726,16 +3727,16 @@ function _l() {
3726
3727
  }
3727
3728
  function d(b) {
3728
3729
  const V = Object.entries((b == null ? void 0 : b.settings) || {});
3729
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: V.map(([F, C]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3730
- /* @__PURE__ */ e.jsx(H, { children: C.title }),
3730
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: V.map(([F, S]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3731
+ /* @__PURE__ */ e.jsx(H, { children: S.title }),
3731
3732
  v(
3732
- C.ui,
3733
+ S.ui,
3733
3734
  F,
3734
- C.options
3735
+ S.options
3735
3736
  )
3736
3737
  ] }, F)) });
3737
3738
  }
3738
- function p(b) {
3739
+ function f(b) {
3739
3740
  s && i({
3740
3741
  ...s,
3741
3742
  visualType: b,
@@ -3749,7 +3750,7 @@ function _l() {
3749
3750
  children: [
3750
3751
  /* @__PURE__ */ e.jsx($e, { summary: "Plugin Settings", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 text-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 text-sm", children: [
3751
3752
  /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
3752
- he,
3753
+ xe,
3753
3754
  {
3754
3755
  className: "h-8 w-full",
3755
3756
  label: "",
@@ -3772,13 +3773,13 @@ function _l() {
3772
3773
  { value: "multiple", label: "Multi-Visual" }
3773
3774
  ],
3774
3775
  value: r,
3775
- onValueChange: p
3776
+ onValueChange: f
3776
3777
  }
3777
3778
  ),
3778
3779
  ((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && s && /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3779
3780
  /* @__PURE__ */ e.jsx(H, { children: "Component" }),
3780
3781
  /* @__PURE__ */ e.jsx("div", { className: "space-y-2 px-2", children: o && /* @__PURE__ */ e.jsx(
3781
- he,
3782
+ xe,
3782
3783
  {
3783
3784
  className: "h-8 w-full",
3784
3785
  label: "",
@@ -3812,7 +3813,7 @@ function _l() {
3812
3813
  );
3813
3814
  }
3814
3815
  function Ve() {
3815
- const [s, n] = A([]);
3816
+ const [s, n] = q([]);
3816
3817
  u(
3817
3818
  (x) => x.card.cfg
3818
3819
  );
@@ -3849,31 +3850,31 @@ function Ve() {
3849
3850
  }) : (r({
3850
3851
  ...a,
3851
3852
  onClickFilter: (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.filter(
3852
- (p) => p.columnIndex !== x
3853
+ (f) => f.columnIndex !== x
3853
3854
  )
3854
- }), n((p) => {
3855
- const g = [...p];
3855
+ }), n((f) => {
3856
+ const g = [...f];
3856
3857
  return g[x] = !1, g;
3857
3858
  }));
3858
3859
  }
3859
3860
  function c(x, j) {
3860
3861
  var d;
3861
- const v = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.map((p) => p.columnIndex === x ? {
3862
- ...p,
3862
+ const v = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.map((f) => f.columnIndex === x ? {
3863
+ ...f,
3863
3864
  expression: j.target.value
3864
- } : p);
3865
+ } : f);
3865
3866
  r({
3866
3867
  ...a,
3867
3868
  onClickFilter: v
3868
3869
  });
3869
3870
  }
3870
3871
  function m(x) {
3871
- var j, v, d, p;
3872
+ var j, v, d, f;
3872
3873
  if (s != null && s[x] || (v = (j = a == null ? void 0 : a.onClickFilter) == null ? void 0 : j.find((g) => g.columnIndex === x)) != null && v.expression)
3873
3874
  return /* @__PURE__ */ e.jsx(
3874
3875
  oe,
3875
3876
  {
3876
- value: (p = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find((g) => g.columnIndex === x)) == null ? void 0 : p.expression,
3877
+ value: (f = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find((g) => g.columnIndex === x)) == null ? void 0 : f.expression,
3877
3878
  onChange: (g) => c(x, g),
3878
3879
  type: "text",
3879
3880
  className: "h-9 w-full font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
@@ -3895,9 +3896,9 @@ function Ve() {
3895
3896
  As,
3896
3897
  {
3897
3898
  checked: !!((v = a == null ? void 0 : a.onClickFilter) != null && v.find(
3898
- (p) => p.columnIndex === j
3899
+ (f) => f.columnIndex === j
3899
3900
  )),
3900
- onCheckedChange: (p) => o(j, p)
3901
+ onCheckedChange: (f) => o(j, f)
3901
3902
  }
3902
3903
  ),
3903
3904
  /* @__PURE__ */ e.jsx(
@@ -3908,14 +3909,14 @@ function Ve() {
3908
3909
  }
3909
3910
  ),
3910
3911
  /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find(
3911
- (p) => p.columnIndex === j
3912
+ (f) => f.columnIndex === j
3912
3913
  )) && /* @__PURE__ */ e.jsx(
3913
3914
  ha,
3914
3915
  {
3915
3916
  onClick: () => {
3916
- n((p) => {
3917
- const g = [...p];
3918
- return g[j] = !p[j], g;
3917
+ n((f) => {
3918
+ const g = [...f];
3919
+ return g[j] = !f[j], g;
3919
3920
  });
3920
3921
  },
3921
3922
  className: "invisible size-3 cursor-pointer text-gray-400 group-hover:visible"
@@ -3962,43 +3963,43 @@ function fs() {
3962
3963
  const Xe = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
3963
3964
  function oa(s, n) {
3964
3965
  var t, l, r;
3965
- const a = Oa(s, n);
3966
+ const a = Ia(s, n);
3966
3967
  return ((r = (l = (t = s == null ? void 0 : s.chartOptions) == null ? void 0 : t.scales) == null ? void 0 : l[a]) == null ? void 0 : r.type) || "linear";
3967
3968
  }
3968
3969
  function et() {
3969
- var Y, U, le, ce, $, re;
3970
- const [s, n] = A(!1), a = u((E) => {
3971
- var D;
3972
- return (D = E.card) == null ? void 0 : D.preferences;
3970
+ var Y, G, le, ce, $, re;
3971
+ const [s, n] = q(!1), a = u((E) => {
3972
+ var M;
3973
+ return (M = E.card) == null ? void 0 : M.preferences;
3973
3974
  }), t = u((E) => {
3974
- var D;
3975
- return (D = E.card) == null ? void 0 : D.cfg;
3976
- }), l = Oa(a, t), [r, i] = A(
3975
+ var M;
3976
+ return (M = E.card) == null ? void 0 : M.cfg;
3977
+ }), l = Ia(a, t), [r, i] = q(
3977
3978
  oa(a)
3978
- ), [o, c] = A(
3979
- ((le = (U = (Y = a == null ? void 0 : a.chartOptions) == null ? void 0 : Y.scales) == null ? void 0 : U[l]) == null ? void 0 : le.min) || ""
3980
- ), [m, x] = A(
3979
+ ), [o, c] = q(
3980
+ ((le = (G = (Y = a == null ? void 0 : a.chartOptions) == null ? void 0 : Y.scales) == null ? void 0 : G[l]) == null ? void 0 : le.min) || ""
3981
+ ), [m, x] = q(
3981
3982
  ((re = ($ = (ce = a == null ? void 0 : a.chartOptions) == null ? void 0 : ce.scales) == null ? void 0 : $[l]) == null ? void 0 : re.max) || ""
3982
- ), [j, v] = A(o || m ? "custom" : "auto"), [d, p] = A(""), [g, N] = A(0), [b, V] = A(""), [F, C] = A(""), [S, I] = A(""), R = u(
3983
+ ), [j, v] = q(o || m ? "custom" : "auto"), [d, f] = q(""), [g, N] = q(0), [b, V] = q(""), [F, S] = q(""), [w, O] = q(""), R = u(
3983
3984
  (E) => E.actions.setCardPreferences
3984
- ), { updateCardInFrame: w } = ne(), h = u((E) => E.card), f = u((E) => {
3985
- var D;
3986
- return (D = E.card) == null ? void 0 : D.type;
3987
- }), z = ["pie", "doughnut", "polarArea"].includes(f);
3985
+ ), { updateCardInFrame: C } = ne(), h = u((E) => E.card), p = u((E) => {
3986
+ var M;
3987
+ return (M = E.card) == null ? void 0 : M.type;
3988
+ }), z = ["pie", "doughnut", "polarArea"].includes(p);
3988
3989
  se(() => {
3989
- var E, D, ae, P, W, te, ye, ue, L, G, Ne, Ae, Ie, k;
3990
+ var E, M, ae, P, W, te, Ne, me, L, U, de, Ae, Oe, k;
3990
3991
  i(oa(a)), c(
3991
- ((ae = (D = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : D[l]) == null ? void 0 : ae.min) === 0 ? 0 : ""
3992
- ), x(((te = (W = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : W[l]) == null ? void 0 : te.max) || ""), p(
3993
- ((G = (L = (ue = (ye = a == null ? void 0 : a.chartOptions) == null ? void 0 : ye.scales) == null ? void 0 : ue[l]) == null ? void 0 : L.ticks) == null ? void 0 : G.stepSize) || ""
3994
- ), N(((Ne = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ne.decimalPlaces) || 0), V(((Ae = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ae.suffix) || ""), C(((Ie = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ie.currency) || ""), I(((k = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : k.locale) || "");
3992
+ ((ae = (M = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : M[l]) == null ? void 0 : ae.min) === 0 ? 0 : ""
3993
+ ), x(((te = (W = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : W[l]) == null ? void 0 : te.max) || ""), f(
3994
+ ((U = (L = (me = (Ne = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ne.scales) == null ? void 0 : me[l]) == null ? void 0 : L.ticks) == null ? void 0 : U.stepSize) || ""
3995
+ ), N(((de = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : de.decimalPlaces) || 0), V(((Ae = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ae.suffix) || ""), S(((Oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Oe.currency) || ""), O(((k = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : k.locale) || "");
3995
3996
  }, [s, a, l]);
3996
- function O(E, D) {
3997
- return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(E);
3997
+ function I(E, M) {
3998
+ return M === "" || /^[0-9\b]+$/.test(M) ? Number(M) : Number(E);
3998
3999
  }
3999
- function q() {
4000
+ function A() {
4000
4001
  const E = [
4001
- ...new Set(rs.map((D) => D.currency))
4002
+ ...new Set(rs.map((M) => M.currency))
4002
4003
  ];
4003
4004
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
4004
4005
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
@@ -4018,31 +4019,31 @@ function et() {
4018
4019
  }
4019
4020
  ),
4020
4021
  /* @__PURE__ */ e.jsxs(
4021
- xe,
4022
+ pe,
4022
4023
  {
4023
4024
  value: F || "none",
4024
- onValueChange: (D) => C(D === "none" ? "" : D),
4025
+ onValueChange: (M) => S(M === "none" ? "" : M),
4025
4026
  children: [
4026
- /* @__PURE__ */ e.jsx(pe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(fe, {}) }),
4027
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4028
- /* @__PURE__ */ e.jsx(je, { children: "Currency" }),
4027
+ /* @__PURE__ */ e.jsx(fe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(ge, {}) }),
4028
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4029
+ /* @__PURE__ */ e.jsx(be, { children: "Currency" }),
4029
4030
  /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }),
4030
- E.map((D) => /* @__PURE__ */ e.jsx(ee, { value: D, children: D }, D))
4031
+ E.map((M) => /* @__PURE__ */ e.jsx(ee, { value: M, children: M }, M))
4031
4032
  ] }) })
4032
4033
  ]
4033
4034
  }
4034
4035
  ),
4035
- /* @__PURE__ */ e.jsxs(xe, { value: S, onValueChange: (D) => I(D), children: [
4036
+ /* @__PURE__ */ e.jsxs(pe, { value: w, onValueChange: (M) => O(M), children: [
4036
4037
  /* @__PURE__ */ e.jsx(
4037
- pe,
4038
+ fe,
4038
4039
  {
4039
4040
  className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0",
4040
- children: /* @__PURE__ */ e.jsx(fe, {})
4041
+ children: /* @__PURE__ */ e.jsx(ge, {})
4041
4042
  }
4042
4043
  ),
4043
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4044
- /* @__PURE__ */ e.jsx(je, { children: "Locale" }),
4045
- rs.map((D) => /* @__PURE__ */ e.jsx(ee, { value: D.locale, children: D.locale }, D.locale))
4044
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4045
+ /* @__PURE__ */ e.jsx(be, { children: "Locale" }),
4046
+ rs.map((M) => /* @__PURE__ */ e.jsx(ee, { value: M.locale, children: M.locale }, M.locale))
4046
4047
  ] }) })
4047
4048
  ] })
4048
4049
  ] }),
@@ -4052,7 +4053,7 @@ function et() {
4052
4053
  oe,
4053
4054
  {
4054
4055
  value: g,
4055
- onChange: (D) => N(Number(D.target.value)),
4056
+ onChange: (M) => N(Number(M.target.value)),
4056
4057
  id: "format",
4057
4058
  className: `col-span-6 h-8 w-full tracking-wide ${Xe}`
4058
4059
  }
@@ -4069,7 +4070,7 @@ function et() {
4069
4070
  {
4070
4071
  id: "min",
4071
4072
  value: o,
4072
- onChange: (E) => c((D) => O(D, E.target.value)),
4073
+ onChange: (E) => c((M) => I(M, E.target.value)),
4073
4074
  className: `col-span-1 h-8 w-full ${Xe}`
4074
4075
  }
4075
4076
  ),
@@ -4077,7 +4078,7 @@ function et() {
4077
4078
  oe,
4078
4079
  {
4079
4080
  value: m,
4080
- onChange: (E) => x((D) => O(D, E.target.value)),
4081
+ onChange: (E) => x((M) => I(M, E.target.value)),
4081
4082
  id: "max",
4082
4083
  className: `col-span-1 h-8 w-full ${Xe}`
4083
4084
  }
@@ -4089,7 +4090,7 @@ function et() {
4089
4090
  oe,
4090
4091
  {
4091
4092
  value: d,
4092
- onChange: (E) => p((D) => O(D, E.target.value)),
4093
+ onChange: (E) => f((M) => I(M, E.target.value)),
4093
4094
  id: "step-size",
4094
4095
  className: `col-span-1 h-8 w-full ${Xe}`
4095
4096
  }
@@ -4107,7 +4108,7 @@ function et() {
4107
4108
  stepSize: d
4108
4109
  }
4109
4110
  });
4110
- const D = {
4111
+ const M = {
4111
4112
  ...a || {},
4112
4113
  chartOptions: {
4113
4114
  ...a == null ? void 0 : a.chartOptions,
@@ -4124,15 +4125,15 @@ function et() {
4124
4125
  decimalPlaces: g,
4125
4126
  suffix: b,
4126
4127
  currency: F,
4127
- locale: S
4128
+ locale: w
4128
4129
  }
4129
4130
  };
4130
- console.log(D), R(D);
4131
+ console.log(M), R(M);
4131
4132
  const ae = {
4132
4133
  ...h,
4133
- preferences: D
4134
+ preferences: M
4134
4135
  };
4135
- w(ae);
4136
+ C(ae);
4136
4137
  }
4137
4138
  return /* @__PURE__ */ e.jsxs(ms, { onOpenChange: (E) => n(E), children: [
4138
4139
  /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(tn, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
@@ -4145,15 +4146,15 @@ function et() {
4145
4146
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
4146
4147
  /* @__PURE__ */ e.jsx(H, { htmlFor: "scale", children: "Type" }),
4147
4148
  /* @__PURE__ */ e.jsxs(
4148
- xe,
4149
+ pe,
4149
4150
  {
4150
4151
  disabled: z,
4151
4152
  value: r,
4152
4153
  onValueChange: (E) => i(E),
4153
4154
  children: [
4154
- /* @__PURE__ */ e.jsx(pe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(fe, {}) }),
4155
- /* @__PURE__ */ e.jsx(ge, { id: "type", children: /* @__PURE__ */ e.jsxs(we, { children: [
4156
- /* @__PURE__ */ e.jsx(je, { children: "Option" }),
4155
+ /* @__PURE__ */ e.jsx(fe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(ge, {}) }),
4156
+ /* @__PURE__ */ e.jsx(je, { id: "type", children: /* @__PURE__ */ e.jsxs(we, { children: [
4157
+ /* @__PURE__ */ e.jsx(be, { children: "Option" }),
4157
4158
  /* @__PURE__ */ e.jsx(ee, { value: "linear", children: "Linear" }),
4158
4159
  /* @__PURE__ */ e.jsx(ee, { value: "logarithmic", children: "Logarithmic" })
4159
4160
  ] }) })
@@ -4186,10 +4187,10 @@ function et() {
4186
4187
  )
4187
4188
  ] }),
4188
4189
  j === "custom" && r == "linear" && B(),
4189
- q(),
4190
+ A(),
4190
4191
  /* @__PURE__ */ e.jsx(nn, {}),
4191
4192
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
4192
- M,
4193
+ D,
4193
4194
  {
4194
4195
  onClick: X,
4195
4196
  variant: "secondary",
@@ -4249,7 +4250,7 @@ function Hl({ idx: s }) {
4249
4250
  /* @__PURE__ */ e.jsx(hs, { children: /* @__PURE__ */ e.jsx(Zn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4250
4251
  /* @__PURE__ */ e.jsx(xs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4251
4252
  /* @__PURE__ */ e.jsx(
4252
- M,
4253
+ D,
4253
4254
  {
4254
4255
  onClick: () => i("none", s),
4255
4256
  size: "sm",
@@ -4259,7 +4260,7 @@ function Hl({ idx: s }) {
4259
4260
  }
4260
4261
  ),
4261
4262
  /* @__PURE__ */ e.jsx(
4262
- M,
4263
+ D,
4263
4264
  {
4264
4265
  onClick: () => i("start", s),
4265
4266
  size: "sm",
@@ -4276,7 +4277,7 @@ function Hl({ idx: s }) {
4276
4277
  }
4277
4278
  ),
4278
4279
  /* @__PURE__ */ e.jsx(
4279
- M,
4280
+ D,
4280
4281
  {
4281
4282
  onClick: () => i("center", s),
4282
4283
  size: "sm",
@@ -4293,7 +4294,7 @@ function Hl({ idx: s }) {
4293
4294
  }
4294
4295
  ),
4295
4296
  /* @__PURE__ */ e.jsx(
4296
- M,
4297
+ D,
4297
4298
  {
4298
4299
  onClick: () => i("end", s),
4299
4300
  size: "sm",
@@ -4400,7 +4401,7 @@ function Pl({ col: s, idx: n }) {
4400
4401
  }
4401
4402
  ),
4402
4403
  /* @__PURE__ */ e.jsx(
4403
- Dn,
4404
+ Mn,
4404
4405
  {
4405
4406
  onClick: () => i("area"),
4406
4407
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
@@ -4412,30 +4413,30 @@ function Pl({ col: s, idx: n }) {
4412
4413
  }
4413
4414
  function at() {
4414
4415
  const s = u((d) => d.selectedConnectionId), n = u((d) => d.selectedDatamodelId), a = u((d) => d.selectedDatabaseName), t = u((d) => d.selectedSchemaName), l = u((d) => d.selectedTableName), r = T((d) => d.dashboard.filters) || [], i = T((d) => d.actions.addFilter), o = T((d) => d.actions.removeFilter), { removeFilterValues: c } = Re(), { modelItems: m, tableName: x, connectionType: j } = Ee();
4415
- function v(d, p = "dashboard") {
4416
+ function v(d, f = "dashboard") {
4416
4417
  var R;
4417
- const g = me(d.column_name), N = me(a || ""), b = me(t || ""), V = me(x);
4418
+ const g = he(d.column_name), N = he(a || ""), b = he(t || ""), V = he(x);
4418
4419
  let F = cn(
4419
4420
  b,
4420
4421
  V,
4421
4422
  j
4422
- ), C = `${F}.${g}`;
4423
- const S = (R = m == null ? void 0 : m.find(
4424
- (w) => w.id === n
4423
+ ), S = `${F}.${g}`;
4424
+ const w = (R = m == null ? void 0 : m.find(
4425
+ (C) => C.id === n
4425
4426
  )) == null ? void 0 : R.name;
4426
- n && n !== "none" && (C = `${aa}.${S}.${g}`, F = `${aa}.${S}`);
4427
- const I = r == null ? void 0 : r.find(
4428
- (w) => w.column === C && w.table === V && (w.database === N || w.database === a)
4427
+ n && n !== "none" && (S = `${aa}.${w}.${g}`, F = `${aa}.${w}`);
4428
+ const O = r == null ? void 0 : r.find(
4429
+ (C) => C.column === S && C.table === V && (C.database === N || C.database === a)
4429
4430
  );
4430
- if (I)
4431
- c(I.id), o(I.id);
4431
+ if (O)
4432
+ c(O.id), o(O.id);
4432
4433
  else {
4433
- const w = Ge();
4434
+ const C = Ge();
4434
4435
  return x === "api" && s ? (i({
4435
- location: p,
4436
- id: w,
4436
+ location: f,
4437
+ id: C,
4437
4438
  //uuidv4(),
4438
- column: C,
4439
+ column: S,
4439
4440
  title: d.column_name,
4440
4441
  dataType: d.data_type,
4441
4442
  table: "api",
@@ -4449,11 +4450,11 @@ function at() {
4449
4450
  g
4450
4451
  )
4451
4452
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
4452
- }), w) : (i({
4453
- id: w,
4453
+ }), C) : (i({
4454
+ id: C,
4454
4455
  //uuidv4(),
4455
- location: p,
4456
- column: C,
4456
+ location: f,
4457
+ column: S,
4457
4458
  //columnName, //`${qualifiedTableName}.${formattedColumnName}`,
4458
4459
  title: d.column_name,
4459
4460
  dataType: d.data_type,
@@ -4467,7 +4468,7 @@ function at() {
4467
4468
  g
4468
4469
  )
4469
4470
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
4470
- }), w);
4471
+ }), C);
4471
4472
  }
4472
4473
  }
4473
4474
  return { assignFilter: v };
@@ -4484,7 +4485,7 @@ function _e() {
4484
4485
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
4485
4486
  /* @__PURE__ */ e.jsx(H, { children: "Card Filter" }),
4486
4487
  /* @__PURE__ */ e.jsx(Bl, { onSelect: r, columns: t }),
4487
- i && /* @__PURE__ */ e.jsx(Ia, { filter: i })
4488
+ i && /* @__PURE__ */ e.jsx(Oa, { filter: i })
4488
4489
  ] });
4489
4490
  }
4490
4491
  function Bl({
@@ -4495,7 +4496,7 @@ function Bl({
4495
4496
  const [a, t] = ta.useState(!1), [l, r] = ta.useState("");
4496
4497
  return /* @__PURE__ */ e.jsxs(ms, { open: a, onOpenChange: t, children: [
4497
4498
  /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4498
- M,
4499
+ D,
4499
4500
  {
4500
4501
  size: "sm",
4501
4502
  variant: "outline",
@@ -4616,15 +4617,15 @@ function $s() {
4616
4617
  !["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(et, {})
4617
4618
  ] }),
4618
4619
  /* @__PURE__ */ e.jsxs(
4619
- xe,
4620
+ pe,
4620
4621
  {
4621
4622
  value: (i = (r = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : r.datalabels) == null ? void 0 : i.anchor,
4622
4623
  onValueChange: t,
4623
4624
  defaultValue: "none",
4624
4625
  children: [
4625
- /* @__PURE__ */ e.jsx(pe, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(fe, { placeholder: "Select position" }) }),
4626
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4627
- /* @__PURE__ */ e.jsx(je, { children: "Data Labels" }),
4626
+ /* @__PURE__ */ e.jsx(fe, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(ge, { placeholder: "Select position" }) }),
4627
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4628
+ /* @__PURE__ */ e.jsx(be, { children: "Data Labels" }),
4628
4629
  /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }),
4629
4630
  a !== "pyramid" && /* @__PURE__ */ e.jsx(ee, { value: "start", children: "Start" }),
4630
4631
  /* @__PURE__ */ e.jsx(ee, { value: "center", children: "Center" }),
@@ -4831,19 +4832,19 @@ function Ql() {
4831
4832
  );
4832
4833
  u(
4833
4834
  (d) => {
4834
- var p, g;
4835
- return (g = (p = d.card.preferences) == null ? void 0 : p.formatNumber) == null ? void 0 : g.decimalPlaces;
4835
+ var f, g;
4836
+ return (g = (f = d.card.preferences) == null ? void 0 : f.formatNumber) == null ? void 0 : g.decimalPlaces;
4836
4837
  }
4837
4838
  );
4838
4839
  const t = u(
4839
4840
  (d) => {
4840
- var p, g;
4841
- return (g = (p = d.card.preferences) == null ? void 0 : p.formatNumber) == null ? void 0 : g.locale;
4841
+ var f, g;
4842
+ return (g = (f = d.card.preferences) == null ? void 0 : f.formatNumber) == null ? void 0 : g.locale;
4842
4843
  }
4843
4844
  ), l = u(
4844
4845
  (d) => {
4845
- var p, g;
4846
- return (g = (p = d.card.preferences) == null ? void 0 : p.formatNumber) == null ? void 0 : g.currency;
4846
+ var f, g;
4847
+ return (g = (f = d.card.preferences) == null ? void 0 : f.formatNumber) == null ? void 0 : g.currency;
4847
4848
  }
4848
4849
  );
4849
4850
  u(
@@ -4851,8 +4852,8 @@ function Ql() {
4851
4852
  );
4852
4853
  const r = u(
4853
4854
  (d) => {
4854
- var p, g;
4855
- return (g = (p = d.card.preferences) == null ? void 0 : p.formatNumber) == null ? void 0 : g.colorRanges;
4855
+ var f, g;
4856
+ return (g = (f = d.card.preferences) == null ? void 0 : f.formatNumber) == null ? void 0 : g.colorRanges;
4856
4857
  }
4857
4858
  ) || [], i = u(
4858
4859
  (d) => d.actions.setColorRanges
@@ -4882,22 +4883,22 @@ function Ql() {
4882
4883
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
4883
4884
  /* @__PURE__ */ e.jsx(H, { children: "Locale" }),
4884
4885
  /* @__PURE__ */ e.jsxs(
4885
- xe,
4886
+ pe,
4886
4887
  {
4887
4888
  value: t || "none",
4888
4889
  onValueChange: (d) => {
4889
- var p, g, N;
4890
+ var f, g, N;
4890
4891
  return a(
4891
- ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) || 0,
4892
+ ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.decimalPlaces) || 0,
4892
4893
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.currency) || "",
4893
4894
  d,
4894
4895
  ((N = s == null ? void 0 : s.formatNumber) == null ? void 0 : N.suffix) || ""
4895
4896
  );
4896
4897
  },
4897
4898
  children: [
4898
- /* @__PURE__ */ e.jsx(pe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(fe, {}) }),
4899
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4900
- /* @__PURE__ */ e.jsx(je, { children: "Format" }),
4899
+ /* @__PURE__ */ e.jsx(fe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(ge, {}) }),
4900
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4901
+ /* @__PURE__ */ e.jsx(be, { children: "Format" }),
4901
4902
  /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }, "none"),
4902
4903
  rs.map((d) => /* @__PURE__ */ e.jsx(ee, { value: d.locale, children: d.locale }, d.locale))
4903
4904
  ] }) })
@@ -4908,22 +4909,22 @@ function Ql() {
4908
4909
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
4909
4910
  /* @__PURE__ */ e.jsx(H, { children: "Currency" }),
4910
4911
  /* @__PURE__ */ e.jsxs(
4911
- xe,
4912
+ pe,
4912
4913
  {
4913
4914
  value: l || "none",
4914
4915
  onValueChange: (d) => {
4915
- var p, g, N;
4916
+ var f, g, N;
4916
4917
  console.log("currency", d), a(
4917
- ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) || 0,
4918
+ ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.decimalPlaces) || 0,
4918
4919
  d === "none" ? "" : d,
4919
4920
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.locale) || "",
4920
4921
  ((N = s == null ? void 0 : s.formatNumber) == null ? void 0 : N.suffix) || ""
4921
4922
  );
4922
4923
  },
4923
4924
  children: [
4924
- /* @__PURE__ */ e.jsx(pe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(fe, {}) }),
4925
- /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4926
- /* @__PURE__ */ e.jsx(je, { children: "Currency" }),
4925
+ /* @__PURE__ */ e.jsx(fe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(ge, {}) }),
4926
+ /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4927
+ /* @__PURE__ */ e.jsx(be, { children: "Currency" }),
4927
4928
  /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }, "none"),
4928
4929
  o.map((d) => /* @__PURE__ */ e.jsx(ee, { value: d, children: d }, d))
4929
4930
  ] }) })
@@ -4936,21 +4937,21 @@ function Ql() {
4936
4937
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
4937
4938
  /* @__PURE__ */ e.jsx(H, { children: "Decimals" }),
4938
4939
  /* @__PURE__ */ e.jsxs(
4939
- xe,
4940
+ pe,
4940
4941
  {
4941
4942
  value: ((j = (x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.decimalPlaces) == null ? void 0 : j.toString()) || "0",
4942
4943
  onValueChange: (d) => {
4943
- var p, g, N;
4944
+ var f, g, N;
4944
4945
  return a(
4945
4946
  Number(d),
4946
- ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.currency) || "",
4947
+ ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.currency) || "",
4947
4948
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.locale) || "",
4948
4949
  ((N = s == null ? void 0 : s.formatNumber) == null ? void 0 : N.suffix) || ""
4949
4950
  );
4950
4951
  },
4951
4952
  children: [
4952
- /* @__PURE__ */ e.jsx(pe, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(fe, {}) }),
4953
- /* @__PURE__ */ e.jsx(ge, { children: ["0", "1", "2", "3", "4"].map((d) => /* @__PURE__ */ e.jsx(ee, { value: d, children: d }, d)) })
4953
+ /* @__PURE__ */ e.jsx(fe, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(ge, {}) }),
4954
+ /* @__PURE__ */ e.jsx(je, { children: ["0", "1", "2", "3", "4"].map((d) => /* @__PURE__ */ e.jsx(ee, { value: d, children: d }, d)) })
4954
4955
  ]
4955
4956
  }
4956
4957
  )
@@ -4964,9 +4965,9 @@ function Ql() {
4964
4965
  className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
4965
4966
  placeholder: "K, M, B, %",
4966
4967
  onChange: (d) => {
4967
- var p, g, N;
4968
+ var f, g, N;
4968
4969
  return a(
4969
- ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) || 0,
4970
+ ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.decimalPlaces) || 0,
4970
4971
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.currency) || "",
4971
4972
  ((N = s == null ? void 0 : s.formatNumber) == null ? void 0 : N.locale) || "",
4972
4973
  d.target.value
@@ -5120,12 +5121,12 @@ const Xl = [
5120
5121
  value: s
5121
5122
  }));
5122
5123
  function sr() {
5123
- var c, m, x, j, v, d, p, g, N, b, V, F, C, S, I, R, w, h;
5124
- const s = u((f) => f.card), n = (m = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : m.topoJsonUrl, [a, t] = A(
5124
+ var c, m, x, j, v, d, f, g, N, b, V, F, S, w, O, R, C, h;
5125
+ const s = u((p) => p.card), n = (m = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : m.topoJsonUrl, [a, t] = q(
5125
5126
  ((j = (x = s == null ? void 0 : s.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : j.customTopoJsonUrl) || ""
5126
- ), { setCardPreferences: l } = ne(), { data: r } = Vs(s), i = Object.keys((r == null ? void 0 : r.objects) || {}).map((f) => ({
5127
- label: f,
5128
- value: f
5127
+ ), { setCardPreferences: l } = ne(), { data: r } = Vs(s), i = Object.keys((r == null ? void 0 : r.objects) || {}).map((p) => ({
5128
+ label: p,
5129
+ value: p
5129
5130
  })) || [], o = [
5130
5131
  {
5131
5132
  label: "US States 10m",
@@ -5145,15 +5146,15 @@ function sr() {
5145
5146
  /* @__PURE__ */ e.jsx(ke, { className: "my-4" }),
5146
5147
  /* @__PURE__ */ e.jsx($e, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
5147
5148
  /* @__PURE__ */ e.jsx(
5148
- he,
5149
+ xe,
5149
5150
  {
5150
5151
  className: "h-9",
5151
5152
  options: o,
5152
- onValueChange: (f) => {
5153
- console.log("value", f), l({
5153
+ onValueChange: (p) => {
5154
+ console.log("value", p), l({
5154
5155
  ...s.preferences,
5155
5156
  mapVisualOptions: {
5156
- topoJsonUrl: f
5157
+ topoJsonUrl: p
5157
5158
  // customTopoJson: undefined,
5158
5159
  }
5159
5160
  });
@@ -5165,15 +5166,15 @@ function sr() {
5165
5166
  n === "custom" && /* @__PURE__ */ e.jsx(
5166
5167
  oe,
5167
5168
  {
5168
- onChange: (f) => {
5169
- t(f.target.value);
5169
+ onChange: (p) => {
5170
+ t(p.target.value);
5170
5171
  },
5171
5172
  onBlur: () => {
5172
- var f;
5173
+ var p;
5173
5174
  console.log("onBlur", a), l({
5174
5175
  ...s.preferences,
5175
5176
  mapVisualOptions: {
5176
- ...(f = s.preferences) == null ? void 0 : f.mapVisualOptions,
5177
+ ...(p = s.preferences) == null ? void 0 : p.mapVisualOptions,
5177
5178
  customTopoJsonUrl: a
5178
5179
  }
5179
5180
  });
@@ -5187,19 +5188,19 @@ function sr() {
5187
5188
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
5188
5189
  /* @__PURE__ */ e.jsx(H, { children: "Map Object" }),
5189
5190
  /* @__PURE__ */ e.jsx(
5190
- he,
5191
+ xe,
5191
5192
  {
5192
5193
  className: "h-9",
5193
5194
  options: i,
5194
5195
  value: ((d = (v = s.preferences) == null ? void 0 : v.mapVisualOptions) == null ? void 0 : d.objectKey) || "",
5195
5196
  label: "Map Object",
5196
- onValueChange: (f) => {
5197
+ onValueChange: (p) => {
5197
5198
  var z;
5198
5199
  l({
5199
5200
  ...s.preferences,
5200
5201
  mapVisualOptions: {
5201
5202
  ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5202
- objectKey: f
5203
+ objectKey: p
5203
5204
  }
5204
5205
  });
5205
5206
  }
@@ -5209,19 +5210,19 @@ function sr() {
5209
5210
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
5210
5211
  /* @__PURE__ */ e.jsx(H, { children: "Projection" }),
5211
5212
  /* @__PURE__ */ e.jsx(
5212
- he,
5213
+ xe,
5213
5214
  {
5214
5215
  className: "h-9",
5215
5216
  options: Xl,
5216
- value: ((g = (p = s.preferences) == null ? void 0 : p.mapVisualOptions) == null ? void 0 : g.projection) || "",
5217
+ value: ((g = (f = s.preferences) == null ? void 0 : f.mapVisualOptions) == null ? void 0 : g.projection) || "",
5217
5218
  label: "Projection",
5218
- onValueChange: (f) => {
5219
+ onValueChange: (p) => {
5219
5220
  var z;
5220
5221
  l({
5221
5222
  ...s.preferences,
5222
5223
  mapVisualOptions: {
5223
5224
  ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5224
- projection: f
5225
+ projection: p
5225
5226
  }
5226
5227
  });
5227
5228
  }
@@ -5231,19 +5232,19 @@ function sr() {
5231
5232
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
5232
5233
  /* @__PURE__ */ e.jsx(H, { children: "Colors" }),
5233
5234
  /* @__PURE__ */ e.jsx(
5234
- he,
5235
+ xe,
5235
5236
  {
5236
5237
  className: "h-9",
5237
5238
  options: er,
5238
5239
  value: ((b = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : b.colorScale) || "",
5239
5240
  label: "Select Color Scale",
5240
- onValueChange: (f) => {
5241
+ onValueChange: (p) => {
5241
5242
  var z;
5242
5243
  l({
5243
5244
  ...s.preferences,
5244
5245
  mapVisualOptions: {
5245
5246
  ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5246
- colorScale: f
5247
+ colorScale: p
5247
5248
  }
5248
5249
  });
5249
5250
  }
@@ -5261,13 +5262,13 @@ function sr() {
5261
5262
  type: "number",
5262
5263
  step: 0.1,
5263
5264
  value: ((F = (V = s.preferences) == null ? void 0 : V.mapVisualOptions) == null ? void 0 : F.projectionScale) || 1,
5264
- onChange: (f) => {
5265
+ onChange: (p) => {
5265
5266
  var z;
5266
5267
  l({
5267
5268
  ...s.preferences,
5268
5269
  mapVisualOptions: {
5269
5270
  ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5270
- projectionScale: Number(f.target.value)
5271
+ projectionScale: Number(p.target.value)
5271
5272
  }
5272
5273
  });
5273
5274
  }
@@ -5280,16 +5281,16 @@ function sr() {
5280
5281
  className: `h-9 w-full ${Be}`,
5281
5282
  type: "number",
5282
5283
  step: 10,
5283
- value: ((I = (S = (C = s.preferences) == null ? void 0 : C.mapVisualOptions) == null ? void 0 : S.projectionOffset) == null ? void 0 : I[0]) || 0,
5284
- onChange: (f) => {
5285
- var z, O, q, B;
5284
+ value: ((O = (w = (S = s.preferences) == null ? void 0 : S.mapVisualOptions) == null ? void 0 : w.projectionOffset) == null ? void 0 : O[0]) || 0,
5285
+ onChange: (p) => {
5286
+ var z, I, A, B;
5286
5287
  l({
5287
5288
  ...s.preferences,
5288
5289
  mapVisualOptions: {
5289
5290
  ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5290
5291
  projectionOffset: [
5291
- Number(f.target.value),
5292
- ((B = (q = (O = s.preferences) == null ? void 0 : O.mapVisualOptions) == null ? void 0 : q.projectionOffset) == null ? void 0 : B[1]) || 0
5292
+ Number(p.target.value),
5293
+ ((B = (A = (I = s.preferences) == null ? void 0 : I.mapVisualOptions) == null ? void 0 : A.projectionOffset) == null ? void 0 : B[1]) || 0
5293
5294
  ]
5294
5295
  }
5295
5296
  });
@@ -5303,16 +5304,16 @@ function sr() {
5303
5304
  className: `h-9 w-full ${Be}`,
5304
5305
  type: "number",
5305
5306
  step: 10,
5306
- value: ((h = (w = (R = s.preferences) == null ? void 0 : R.mapVisualOptions) == null ? void 0 : w.projectionOffset) == null ? void 0 : h[1]) || 0,
5307
- onChange: (f) => {
5308
- var z, O, q, B;
5307
+ value: ((h = (C = (R = s.preferences) == null ? void 0 : R.mapVisualOptions) == null ? void 0 : C.projectionOffset) == null ? void 0 : h[1]) || 0,
5308
+ onChange: (p) => {
5309
+ var z, I, A, B;
5309
5310
  l({
5310
5311
  ...s.preferences,
5311
5312
  mapVisualOptions: {
5312
5313
  ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5313
5314
  projectionOffset: [
5314
- ((B = (q = (O = s.preferences) == null ? void 0 : O.mapVisualOptions) == null ? void 0 : q.projectionOffset) == null ? void 0 : B[0]) || 0,
5315
- Number(f.target.value)
5315
+ ((B = (A = (I = s.preferences) == null ? void 0 : I.mapVisualOptions) == null ? void 0 : A.projectionOffset) == null ? void 0 : B[0]) || 0,
5316
+ Number(p.target.value)
5316
5317
  ]
5317
5318
  }
5318
5319
  });
@@ -5415,7 +5416,7 @@ function tr() {
5415
5416
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
5416
5417
  /* @__PURE__ */ e.jsx(H, { children: "Sort" }),
5417
5418
  /* @__PURE__ */ e.jsx(
5418
- he,
5419
+ xe,
5419
5420
  {
5420
5421
  className: "h-8",
5421
5422
  label: "Sort Chart",
@@ -5609,7 +5610,7 @@ function or() {
5609
5610
  return /* @__PURE__ */ e.jsx(Jl, {});
5610
5611
  }
5611
5612
  }
5612
- return /* @__PURE__ */ e.jsx(be, { className: "h-full w-full text-sm", children: n(s) });
5613
+ return /* @__PURE__ */ e.jsx(ve, { className: "h-full w-full text-sm", children: n(s) });
5613
5614
  }
5614
5615
  function cr() {
5615
5616
  const s = u((n) => n.isShowingVisual);
@@ -5664,7 +5665,7 @@ function dr({ authToken: s, onSave: n, onClose: a }) {
5664
5665
  n && t(n), a && l(a);
5665
5666
  }, [n, t, a, l]), se(() => {
5666
5667
  s && s.accessToken && r(s);
5667
- }, [s, r]), /* @__PURE__ */ e.jsx(us, { FallbackComponent: Ma, children: /* @__PURE__ */ e.jsxs(
5668
+ }, [s, r]), /* @__PURE__ */ e.jsx(us, { FallbackComponent: Da, children: /* @__PURE__ */ e.jsxs(
5668
5669
  bn,
5669
5670
  {
5670
5671
  style: {
@@ -5702,9 +5703,9 @@ function ur() {
5702
5703
  }
5703
5704
  function mr() {
5704
5705
  const s = u((r) => r.selectedDatabaseName), n = u((r) => r.selectedTableName), a = T((r) => r.dashboard.filters) || [], { columns: t } = Ee(), { assignFilter: l } = at();
5705
- return /* @__PURE__ */ e.jsx(be, { className: "flex-1 basis-0 flex-col px-3", children: t == null ? void 0 : t.map((r) => {
5706
+ return /* @__PURE__ */ e.jsx(ve, { className: "flex-1 basis-0 flex-col px-3", children: t == null ? void 0 : t.map((r) => {
5706
5707
  const i = a == null ? void 0 : a.find(
5707
- (o) => o.column === me(r.column_name) && o.table === n && o.database === s
5708
+ (o) => o.column === he(r.column_name) && o.table === n && o.database === s
5708
5709
  );
5709
5710
  return /* @__PURE__ */ e.jsx(
5710
5711
  "div",
@@ -5734,7 +5735,7 @@ function hr() {
5734
5735
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
5735
5736
  /* @__PURE__ */ e.jsx(H, { className: "px-2 text-lg", children: "Filters" }),
5736
5737
  /* @__PURE__ */ e.jsx(
5737
- M,
5738
+ D,
5738
5739
  {
5739
5740
  onClick: () => s(!1),
5740
5741
  className: "h-7 w-7 p-0",
@@ -5771,7 +5772,7 @@ function xr() {
5771
5772
  {
5772
5773
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
5773
5774
  children: [
5774
- /* @__PURE__ */ e.jsx(Ia, { filter: t }),
5775
+ /* @__PURE__ */ e.jsx(Oa, { filter: t }),
5775
5776
  /* @__PURE__ */ e.jsx(Sa, { filter: t })
5776
5777
  ]
5777
5778
  },
@@ -5853,7 +5854,7 @@ function vr({
5853
5854
  showFooter: n = !0,
5854
5855
  ...a
5855
5856
  }) {
5856
- return /* @__PURE__ */ e.jsx(us, { FallbackComponent: Ma, children: /* @__PURE__ */ e.jsxs(Sn, { dashboardProps: a, children: [
5857
+ return /* @__PURE__ */ e.jsx(us, { FallbackComponent: Da, children: /* @__PURE__ */ e.jsxs(Sn, { dashboardProps: a, children: [
5857
5858
  /* @__PURE__ */ e.jsx(wn, {}),
5858
5859
  /* @__PURE__ */ e.jsxs(kn, { children: [
5859
5860
  /* @__PURE__ */ e.jsx(fr, {}),
@@ -5867,8 +5868,8 @@ function vr({
5867
5868
  }
5868
5869
  export {
5869
5870
  Pe as A,
5870
- In as B,
5871
- Dn as C,
5871
+ On as B,
5872
+ Mn as C,
5872
5873
  vr as D,
5873
5874
  Hs as E,
5874
5875
  Aa as F,
@@ -5881,7 +5882,7 @@ export {
5881
5882
  Gn as P,
5882
5883
  Wn as S,
5883
5884
  Ps as T,
5884
- Mn as a,
5885
+ Dn as a,
5885
5886
  Rs as b,
5886
5887
  _s as c,
5887
5888
  Ta as d,