react-semaphor 0.0.541 → 0.0.542

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,14 +1,14 @@
1
- var Qs = (t) => {
1
+ var Ys = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var Oa = (t, a, n) => a.has(t) || Qs("Cannot " + n);
5
- var Ce = (t, a, n) => (Oa(t, a, "read from private field"), n ? n.call(t) : a.get(t)), nn = (t, a, n) => a.has(t) ? Qs("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, n), an = (t, a, n, r) => (Oa(t, a, "write to private field"), r ? r.call(t, n) : a.set(t, n), n), sn = (t, a, n) => (Oa(t, a, "access private method"), n);
4
+ var Oa = (t, a, n) => a.has(t) || Ys("Cannot " + n);
5
+ var Ce = (t, a, n) => (Oa(t, a, "read from private field"), n ? n.call(t) : a.get(t)), nn = (t, a, n) => a.has(t) ? Ys("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, n), an = (t, a, n, r) => (Oa(t, a, "write to private field"), r ? r.call(t, n) : a.set(t, n), n), sn = (t, a, n) => (Oa(t, a, "access private method"), n);
6
6
  import { jsxs as s, jsx as e, Fragment as ne } from "react/jsx-runtime";
7
- import { E as Di, F as Ti, G as Zs, H as Mi, I as kr, J as He, K as Ei, L as Oi, M as H, N as ts, w as Y, A as yt, O as Oe, P as On, Q as Dr, R as V, T as Re, U as In, V as An, W as Rn, X as zn, Y as Q, Z as je, _ as ma, $ as Ln, a0 as Fn, a1 as le, a2 as _n, a3 as Tr, a4 as rn, a5 as Ii, a6 as Xs, a7 as Mr, a8 as G, a9 as ns, aa as Ee, ab as Ai, ac as ge, ad as ye, ae as ve, af as xe, ag as Pt, ah as Vt, ai as te, aj as Er, ak as at, al as st, am as Ri, an as Kt, ao as St, ap as Lt, aq as Ue, ar as qe, as as Ge, at as ht, au as as, av as Pn, aw as Vn, ax as Or, ay as vt, az as ln, aA as dn, aB as rt, aC as De, aD as Je, aE as ss, aF as zi, aG as aa, aH as Ir, aI as dt, aJ as Ar, aK as ha, aL as rs, aM as Li, aN as ze, aO as ie, aP as Ne, aQ as un, aR as lt, aS as mn, aT as Fi, aU as Ft, aV as tt, aW as jn, aX as pa, aY as Nn, aZ as ls, a_ as Cn, a$ as it, b0 as Jt, b1 as Un, b2 as $n, b3 as Rr, b4 as Wt, b5 as is, b6 as os, b7 as cs, b8 as ds, b9 as hn, ba as Bn, bb as zr, bc as us, bd as fa, be as ms, bf as _i, bg as hs, bh as Pi, bi as Vi, bj as Yt, bk as Qt, bl as Fe, bm as Et, bn as Lr, C as se, bo as Gt, B as E, bp as Fr, bq as _r, br as Pr, bs as Vr, bt as jr, bu as Ur, bv as $r, bw as Br, bx as ji, by as Ui, bz as Ua, bA as ps, bB as $i, bC as Bi, bD as qi, bE as qr, bF as fs, bG as pn, bH as qn, bI as Gn, bJ as Hn, bK as Kn, bL as jt, bM as fn, bN as wn, v as ot, bO as Gr, m as Hr, l as Kr, f as et, bP as Gi, g as ut, bQ as Hi, h as Ht, j as mt, k as Ki, bR as Ji, bS as Wi, bT as It, bU as Ot, bV as Jr, bW as Yi, e as Wr, bX as Sn, bY as kt, bZ as Qi, b_ as $a, b$ as gs, c0 as Jn, c1 as ft, c2 as Yr, r as sa, q as er, c3 as Le, c4 as Xn, c5 as Qr, c6 as Zi, c7 as Xi, c8 as eo, c9 as Zr, ca as to, cb as ga, cc as no, cd as ra, ce as ao, cf as Ba, cg as Dt, ch as Ve, ci as Tt, cj as so, ck as ro, cl as lo, cm as io, cn as oo, co as Ia, cp as co, cq as tr, cr as uo, cs as nr, ct as mo, cu as ho, cv as po, cw as fo, cx as ys, cy as go, cz as Xr, cA as vs, cB as el, cC as ea, cD as tl, cE as yo, cF as vo, cG as xo, cH as nl, cI as al, cJ as ya, cK as sl, cL as bo, cM as No, cN as Co, cO as rl, cP as xs, cQ as ll, cR as wo, cS as ar, cT as va, cU as xa, cV as ba, cW as So, cX as ko, cY as Do, cZ as xt, c_ as we, c$ as Se, d0 as ke, d1 as To, d2 as Mo, d3 as Eo, d4 as Oo, s as Io, d5 as sr, d6 as il, d7 as Ao, d8 as Ro, d9 as zo, da as ol, db as bs, dc as gn, dd as Ns, de as At, df as Lo, dg as yn, dh as cl, di as Fo, dj as _o, dk as Po, dl as Vo, dm as jo, dn as rr, dp as Uo, dq as $o, dr as Bo, ds as qo, dt as Go, du as Ho, dv as Ko, dw as dl, dx as Jo, dy as Wo, dz as Yo, dA as Qo, dB as Zo, dC as ul, dD as Aa, dE as Qe, dF as ml, dG as lr, dH as Na, dI as Xo, dJ as ec, dK as hl, dL as Cs, dM as tc, dN as nc, dO as kn, dP as qa, dQ as ac, dR as sc, dS as ir, dT as Ga, dU as Ha, dV as la, dW as on, dX as Dn, dY as rc, dZ as pl, d_ as lc, d$ as ic, S as oc, e0 as cc, e1 as dc, e2 as uc } from "./index-CTwDj1wp.js";
7
+ import { E as Di, F as Ti, G as Qs, H as Mi, I as Sr, J as He, K as Ei, L as Oi, M as H, N as ts, w as Y, A as yt, O as Ee, P as On, Q as kr, R as V, T as Re, U as In, V as An, W as Rn, X as zn, Y as Q, Z as je, _ as ma, $ as Ln, a0 as Fn, a1 as le, a2 as _n, a3 as Dr, a4 as rn, a5 as Ii, a6 as Zs, a7 as Tr, a8 as G, a9 as ns, aa as Me, ab as Ai, ac as ge, ad as ye, ae as ve, af as xe, ag as Pt, ah as Vt, ai as te, aj as Mr, ak as at, al as st, am as Ri, an as Kt, ao as St, ap as Lt, aq as Ue, ar as qe, as as Ge, at as ht, au as as, av as Pn, aw as Vn, ax as Er, ay as vt, az as ln, aA as dn, aB as rt, aC as De, aD as Je, aE as ss, aF as zi, aG as aa, aH as Or, aI as dt, aJ as Ir, aK as ha, aL as rs, aM as Li, aN as ze, aO as ie, aP as Ne, aQ as un, aR as lt, aS as mn, aT as Fi, aU as Ft, aV as tt, aW as jn, aX as pa, aY as Nn, aZ as ls, a_ as Cn, a$ as it, b0 as Jt, b1 as Un, b2 as $n, b3 as Ar, b4 as Wt, b5 as is, b6 as os, b7 as cs, b8 as ds, b9 as hn, ba as Bn, bb as Rr, bc as us, bd as fa, be as ms, bf as _i, bg as hs, bh as Pi, bi as Vi, bj as Yt, bk as Qt, bl as Fe, bm as Et, bn as zr, C as se, bo as Gt, B as E, bp as Lr, bq as Fr, br as _r, bs as Pr, bt as Vr, bu as jr, bv as Ur, bw as $r, bx as ji, by as Ui, bz as Ua, bA as ps, bB as $i, bC as Bi, bD as qi, bE as Br, bF as fs, bG as pn, bH as qn, bI as Gn, bJ as Hn, bK as Kn, bL as jt, bM as fn, bN as wn, v as ot, bO as qr, m as Gr, l as Hr, f as et, bP as Gi, g as ut, bQ as Hi, h as Ht, j as mt, k as Ki, bR as Ji, bS as Wi, bT as It, bU as Ot, bV as Kr, bW as Yi, e as Jr, bX as Sn, bY as kt, bZ as Qi, b_ as $a, b$ as gs, c0 as Jn, c1 as ft, c2 as Wr, r as sa, q as Xs, c3 as Le, c4 as Xn, c5 as Yr, c6 as Zi, c7 as Xi, c8 as eo, c9 as Qr, ca as to, cb as ga, cc as no, cd as ra, ce as ao, cf as Ba, cg as Dt, ch as Ve, ci as Tt, cj as so, ck as ro, cl as lo, cm as io, cn as oo, co as Ia, cp as co, cq as er, cr as uo, cs as tr, ct as mo, cu as ho, cv as po, cw as fo, cx as ys, cy as go, cz as Zr, cA as vs, cB as Xr, cC as ea, cD as el, cE as yo, cF as vo, cG as xo, cH as tl, cI as nl, cJ as ya, cK as al, cL as bo, cM as No, cN as Co, cO as sl, cP as xs, cQ as rl, cR as wo, cS as nr, cT as va, cU as xa, cV as ba, cW as So, cX as ko, cY as Do, cZ as xt, c_ as we, c$ as Se, d0 as ke, d1 as To, d2 as Mo, d3 as Eo, d4 as Oo, s as Io, d5 as ar, d6 as ll, d7 as Ao, d8 as Ro, d9 as zo, da as il, db as bs, dc as gn, dd as Ns, de as At, df as Lo, dg as yn, dh as ol, di as Fo, dj as _o, dk as Po, dl as Vo, dm as jo, dn as sr, dp as Uo, dq as $o, dr as Bo, ds as qo, dt as Go, du as Ho, dv as Ko, dw as cl, dx as Jo, dy as Wo, dz as Yo, dA as Qo, dB as Zo, dC as dl, dD as Aa, dE as Qe, dF as ul, dG as rr, dH as Na, dI as Xo, dJ as ec, dK as ml, dL as Cs, dM as tc, dN as nc, dO as kn, dP as qa, dQ as ac, dR as sc, dS as lr, dT as Ga, dU as Ha, dV as la, dW as on, dX as Dn, dY as rc, dZ as hl, d_ as lc, d$ as ic, S as oc, e0 as cc, e1 as dc, e2 as uc } from "./index-tok2NXq1.js";
8
8
  import * as Ke from "react";
9
- import Ie, { useState as P, useCallback as me, useEffect as Me, useRef as nt, useMemo as Be, Suspense as fl, useContext as mc } from "react";
9
+ import Ie, { useState as P, useCallback as me, useEffect as Te, useRef as nt, useMemo as Be, Suspense as pl, useContext as mc } from "react";
10
10
  import "react-dom";
11
- var Ct, wt, $e, ct, pt, ta, Ka, Sr, hc = (Sr = class extends Di {
11
+ var Ct, wt, $e, ct, pt, ta, Ka, wr, hc = (wr = class extends Di {
12
12
  constructor(a, n) {
13
13
  super();
14
14
  nn(this, pt);
@@ -28,7 +28,7 @@ var Ct, wt, $e, ct, pt, ta, Ka, Sr, hc = (Sr = class extends Di {
28
28
  type: "observerOptionsUpdated",
29
29
  mutation: Ce(this, $e),
30
30
  observer: this
31
- }), n != null && n.mutationKey && this.options.mutationKey && Zs(n.mutationKey) !== Zs(this.options.mutationKey) ? this.reset() : ((r = Ce(this, $e)) == null ? void 0 : r.state.status) === "pending" && Ce(this, $e).setOptions(this.options);
31
+ }), n != null && n.mutationKey && this.options.mutationKey && Qs(n.mutationKey) !== Qs(this.options.mutationKey) ? this.reset() : ((r = Ce(this, $e)) == null ? void 0 : r.state.status) === "pending" && Ce(this, $e).setOptions(this.options);
32
32
  }
33
33
  onUnsubscribe() {
34
34
  var a;
@@ -61,7 +61,7 @@ var Ct, wt, $e, ct, pt, ta, Ka, Sr, hc = (Sr = class extends Di {
61
61
  reset: this.reset
62
62
  });
63
63
  }, Ka = function(a) {
64
- kr.batch(() => {
64
+ Sr.batch(() => {
65
65
  var n, r, l, i, c, o, d, u;
66
66
  if (Ce(this, ct) && this.hasListeners()) {
67
67
  const h = Ce(this, wt).variables, m = Ce(this, wt).context;
@@ -77,7 +77,7 @@ var Ct, wt, $e, ct, pt, ta, Ka, Sr, hc = (Sr = class extends Di {
77
77
  h(Ce(this, wt));
78
78
  });
79
79
  });
80
- }, Sr);
80
+ }, wr);
81
81
  function Zt(t, a) {
82
82
  const n = He(), [r] = Ke.useState(
83
83
  () => new hc(
@@ -90,7 +90,7 @@ function Zt(t, a) {
90
90
  }, [r, t]);
91
91
  const l = Ke.useSyncExternalStore(
92
92
  Ke.useCallback(
93
- (c) => r.subscribe(kr.batchCalls(c)),
93
+ (c) => r.subscribe(Sr.batchCalls(c)),
94
94
  [r]
95
95
  ),
96
96
  () => r.getCurrentResult(),
@@ -264,7 +264,7 @@ const kc = H("BookOpenText", [
264
264
  * This source code is licensed under the ISC license.
265
265
  * See the LICENSE file in the root directory of this source tree.
266
266
  */
267
- const gl = H("BookType", [
267
+ const fl = H("BookType", [
268
268
  ["path", { d: "M10 13h4", key: "ytezjc" }],
269
269
  ["path", { d: "M12 6v7", key: "1f6ttz" }],
270
270
  ["path", { d: "M16 8V6H8v2", key: "x8j6u4" }],
@@ -318,7 +318,7 @@ const Tc = H("Braces", [
318
318
  * This source code is licensed under the ISC license.
319
319
  * See the LICENSE file in the root directory of this source tree.
320
320
  */
321
- const or = H("Building", [
321
+ const ir = H("Building", [
322
322
  ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
323
323
  ["path", { d: "M9 22v-4h6v4", key: "r93iot" }],
324
324
  ["path", { d: "M8 6h.01", key: "1dz90k" }],
@@ -355,7 +355,7 @@ const Mc = H("Calculator", [
355
355
  * This source code is licensed under the ISC license.
356
356
  * See the LICENSE file in the root directory of this source tree.
357
357
  */
358
- const yl = H("ChartArea", [
358
+ const gl = H("ChartArea", [
359
359
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
360
360
  [
361
361
  "path",
@@ -475,7 +475,7 @@ const Oc = H("CircleArrowRight", [
475
475
  * This source code is licensed under the ISC license.
476
476
  * See the LICENSE file in the root directory of this source tree.
477
477
  */
478
- const vl = H("CircleX", [
478
+ const yl = H("CircleX", [
479
479
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
480
480
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
481
481
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -581,7 +581,7 @@ const Ds = H("Donut", [
581
581
  * This source code is licensed under the ISC license.
582
582
  * See the LICENSE file in the root directory of this source tree.
583
583
  */
584
- const xl = H("Expand", [
584
+ const vl = H("Expand", [
585
585
  ["path", { d: "m21 21-6-6m6 6v-4.8m0 4.8h-4.8", key: "1c15vz" }],
586
586
  ["path", { d: "M3 16.2V21m0 0h4.8M3 21l6-6", key: "1fsnz2" }],
587
587
  ["path", { d: "M21 7.8V3m0 0h-4.8M21 3l-6 6", key: "hawz9i" }],
@@ -798,7 +798,7 @@ const Wc = H("ListX", [
798
798
  * This source code is licensed under the ISC license.
799
799
  * See the LICENSE file in the root directory of this source tree.
800
800
  */
801
- const bl = H("Lock", [
801
+ const xl = H("Lock", [
802
802
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
803
803
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
804
804
  ]);
@@ -889,7 +889,7 @@ const ed = H("MessageCircle", [
889
889
  * This source code is licensed under the ISC license.
890
890
  * See the LICENSE file in the root directory of this source tree.
891
891
  */
892
- const cr = H("MoveHorizontal", [
892
+ const or = H("MoveHorizontal", [
893
893
  ["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
894
894
  ["path", { d: "M2 12h20", key: "9i4pu4" }],
895
895
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
@@ -900,7 +900,7 @@ const cr = H("MoveHorizontal", [
900
900
  * This source code is licensed under the ISC license.
901
901
  * See the LICENSE file in the root directory of this source tree.
902
902
  */
903
- const dr = H("MoveVertical", [
903
+ const cr = H("MoveVertical", [
904
904
  ["path", { d: "M12 2v20", key: "t6zp3m" }],
905
905
  ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
906
906
  ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
@@ -968,7 +968,7 @@ const Es = H("Radar", [
968
968
  * This source code is licensed under the ISC license.
969
969
  * See the LICENSE file in the root directory of this source tree.
970
970
  */
971
- const Nl = H("RefreshCw", [
971
+ const bl = H("RefreshCw", [
972
972
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
973
973
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
974
974
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
@@ -991,7 +991,7 @@ const sd = H("Rows3", [
991
991
  * This source code is licensed under the ISC license.
992
992
  * See the LICENSE file in the root directory of this source tree.
993
993
  */
994
- const Cl = H("Save", [
994
+ const Nl = H("Save", [
995
995
  [
996
996
  "path",
997
997
  {
@@ -1073,7 +1073,7 @@ const id = H("Shrink", [
1073
1073
  * This source code is licensed under the ISC license.
1074
1074
  * See the LICENSE file in the root directory of this source tree.
1075
1075
  */
1076
- const wl = H("Sigma", [
1076
+ const Cl = H("Sigma", [
1077
1077
  [
1078
1078
  "path",
1079
1079
  {
@@ -1131,7 +1131,7 @@ const ka = H("Table2", [
1131
1131
  * This source code is licensed under the ISC license.
1132
1132
  * See the LICENSE file in the root directory of this source tree.
1133
1133
  */
1134
- const Sl = H("Tag", [
1134
+ const wl = H("Tag", [
1135
1135
  [
1136
1136
  "path",
1137
1137
  {
@@ -1157,7 +1157,7 @@ const dd = H("Terminal", [
1157
1157
  * This source code is licensed under the ISC license.
1158
1158
  * See the LICENSE file in the root directory of this source tree.
1159
1159
  */
1160
- const kl = H("ToggleLeft", [
1160
+ const Sl = H("ToggleLeft", [
1161
1161
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
1162
1162
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
1163
1163
  ]);
@@ -1180,7 +1180,7 @@ const Os = H("Tornado", [
1180
1180
  * This source code is licensed under the ISC license.
1181
1181
  * See the LICENSE file in the root directory of this source tree.
1182
1182
  */
1183
- const Dl = H("Type", [
1183
+ const kl = H("Type", [
1184
1184
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
1185
1185
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
1186
1186
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
@@ -1207,7 +1207,7 @@ const gt = H("Users", [
1207
1207
  ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
1208
1208
  ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
1209
1209
  ]);
1210
- function Tl(t) {
1210
+ function Dl(t) {
1211
1211
  var a;
1212
1212
  return {
1213
1213
  ...t,
@@ -1292,10 +1292,10 @@ async function pd(t, a) {
1292
1292
  }) : null;
1293
1293
  }
1294
1294
  function fd() {
1295
- const [t, a] = P(""), [n, r] = P(!1), l = Y((p) => p.lenses), { setLenses: i, setSelectedLensId: c } = yt(), [o, d] = P(!1), [u, h] = P(!1), m = Y((p) => p.dashboard), f = Y((p) => p.filterValues), { authToken: g } = Oe();
1295
+ const [t, a] = P(""), [n, r] = P(!1), l = Y((p) => p.lenses), { setLenses: i, setSelectedLensId: c } = yt(), [o, d] = P(!1), [u, h] = P(!1), m = Y((p) => p.dashboard), f = Y((p) => p.filterValues), { authToken: g } = Ee();
1296
1296
  async function y() {
1297
1297
  d(!0);
1298
- const p = Tl(
1298
+ const p = Dl(
1299
1299
  m
1300
1300
  ), b = await hd(
1301
1301
  t,
@@ -1306,7 +1306,7 @@ function fd() {
1306
1306
  b && (i([...l || [], b]), c(b.id), h(!1)), d(!1);
1307
1307
  }
1308
1308
  return /* @__PURE__ */ s(On, { open: u, onOpenChange: h, children: [
1309
- /* @__PURE__ */ e(Dr, { asChild: !0, children: /* @__PURE__ */ s(
1309
+ /* @__PURE__ */ e(kr, { asChild: !0, children: /* @__PURE__ */ s(
1310
1310
  V,
1311
1311
  {
1312
1312
  variant: "secondary",
@@ -1353,7 +1353,7 @@ function fd() {
1353
1353
  ] });
1354
1354
  }
1355
1355
  function gd() {
1356
- const [t, a] = P(!1), n = Y((h) => h.lenses), r = Y((h) => h.selectedLensId), { setLenses: l, setSelectedLensId: i } = yt(), { authToken: c } = Oe();
1356
+ const [t, a] = P(!1), n = Y((h) => h.lenses), r = Y((h) => h.selectedLensId), { setLenses: l, setSelectedLensId: i } = yt(), { authToken: c } = Ee();
1357
1357
  async function o(h) {
1358
1358
  i(h);
1359
1359
  }
@@ -1389,7 +1389,7 @@ function gd() {
1389
1389
  return /* @__PURE__ */ s(Ln, { open: t, onOpenChange: a, children: [
1390
1390
  /* @__PURE__ */ e(Fn, { asChild: !0, children: /* @__PURE__ */ e(le, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e($c, { className: "h-4 w-4" }) }) }),
1391
1391
  /* @__PURE__ */ s(_n, { align: "end", className: "w-60", children: [
1392
- /* @__PURE__ */ e(Tr, { className: "px-3", children: "Lenses" }),
1392
+ /* @__PURE__ */ e(Dr, { className: "px-3", children: "Lenses" }),
1393
1393
  /* @__PURE__ */ e(rn, {}),
1394
1394
  /* @__PURE__ */ s(
1395
1395
  Ii,
@@ -1397,9 +1397,9 @@ function gd() {
1397
1397
  value: r,
1398
1398
  onValueChange: o,
1399
1399
  children: [
1400
- /* @__PURE__ */ e(Xs, { value: "original", children: "Original" }),
1400
+ /* @__PURE__ */ e(Zs, { value: "original", children: "Original" }),
1401
1401
  n == null ? void 0 : n.map((h) => /* @__PURE__ */ s(
1402
- Xs,
1402
+ Zs,
1403
1403
  {
1404
1404
  className: "group flex justify-between gap-2",
1405
1405
  value: h.id,
@@ -1407,7 +1407,7 @@ function gd() {
1407
1407
  /* @__PURE__ */ e("p", { children: h.name }),
1408
1408
  /* @__PURE__ */ s("span", { className: "flex items-center gap-3", children: [
1409
1409
  /* @__PURE__ */ e(
1410
- Mr,
1410
+ Tr,
1411
1411
  {
1412
1412
  onClick: (m) => {
1413
1413
  m.preventDefault(), u(h);
@@ -1443,7 +1443,7 @@ function gd() {
1443
1443
  ] })
1444
1444
  ] });
1445
1445
  }
1446
- function Ml() {
1446
+ function Tl() {
1447
1447
  var i;
1448
1448
  const t = Y.getState().authToken, a = Y.getState().theme, n = Y.getState().filterValues, r = (i = Y.getState().dashboard) == null ? void 0 : i.title, l = Y.getState().selectedSheetId;
1449
1449
  return {
@@ -1455,7 +1455,7 @@ function Ml() {
1455
1455
  };
1456
1456
  }
1457
1457
  async function yd() {
1458
- const t = Y.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: r, dashboardTitle: l, selectedSheetId: i } = Ml();
1458
+ const t = Y.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: r, dashboardTitle: l, selectedSheetId: i } = Tl();
1459
1459
  if (t)
1460
1460
  return;
1461
1461
  const c = new URLSearchParams();
@@ -1475,7 +1475,7 @@ async function yd() {
1475
1475
  function vd({
1476
1476
  iconClassName: t
1477
1477
  }) {
1478
- const { authToken: a } = Oe();
1478
+ const { authToken: a } = Ee();
1479
1479
  Y((l) => {
1480
1480
  var i;
1481
1481
  return (i = l.dashboard) == null ? void 0 : i.title;
@@ -1490,7 +1490,7 @@ function vd({
1490
1490
  tooltip: "Download PDF",
1491
1491
  className: "h-7 p-2",
1492
1492
  onClick: r,
1493
- children: n ? /* @__PURE__ */ e(Ee, { className: G("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(Ai, { className: G("size-4", t) })
1493
+ children: n ? /* @__PURE__ */ e(Me, { className: G("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(Ai, { className: G("size-4", t) })
1494
1494
  }
1495
1495
  );
1496
1496
  }
@@ -1529,7 +1529,7 @@ function Ye({
1529
1529
  }
1530
1530
  );
1531
1531
  }
1532
- const ur = [
1532
+ const dr = [
1533
1533
  { value: "daily", label: "Daily" },
1534
1534
  { value: "weekly", label: "Weekly" },
1535
1535
  { value: "biweekly", label: "Bi-Weekly" },
@@ -1545,8 +1545,8 @@ function xd({
1545
1545
  status: l,
1546
1546
  error: i,
1547
1547
  isDeleting: c
1548
- } = bd(), [o, d] = P(""), [u, h] = P(ur[0].value), [m, f] = P("06:00"), [g, y] = P("");
1549
- return /* @__PURE__ */ e(Er, { delayDuration: 0, children: /* @__PURE__ */ s(at, { children: [
1548
+ } = bd(), [o, d] = P(""), [u, h] = P(dr[0].value), [m, f] = P("06:00"), [g, y] = P("");
1549
+ return /* @__PURE__ */ e(Mr, { delayDuration: 0, children: /* @__PURE__ */ s(at, { children: [
1550
1550
  /* @__PURE__ */ e(st, { asChild: !0, children: /* @__PURE__ */ e(
1551
1551
  le,
1552
1552
  {
@@ -1595,7 +1595,7 @@ function xd({
1595
1595
  {
1596
1596
  className: "col-span-2 h-8",
1597
1597
  label: "Select Frequency",
1598
- options: ur,
1598
+ options: dr,
1599
1599
  value: u,
1600
1600
  onValueChange: (p) => h(p)
1601
1601
  }
@@ -1628,10 +1628,10 @@ function xd({
1628
1628
  className: "h-8 p-2",
1629
1629
  disabled: l === "loading" || !o,
1630
1630
  children: [
1631
- l === "loading" && /* @__PURE__ */ e(Ee, { className: "mr-2 size-4 animate-spin" }),
1631
+ l === "loading" && /* @__PURE__ */ e(Me, { className: "mr-2 size-4 animate-spin" }),
1632
1632
  l === "success" && /* @__PURE__ */ e(Lt, { className: "mr-2 size-4" }),
1633
1633
  l === "error" && /* @__PURE__ */ s(Ue, { children: [
1634
- /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(vl, { className: "mr-2 size-4 text-destructive" }) }),
1634
+ /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(yl, { className: "mr-2 size-4 text-destructive" }) }),
1635
1635
  /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ e("p", { children: i }) })
1636
1636
  ] }),
1637
1637
  "Schedule"
@@ -1661,14 +1661,14 @@ function xd({
1661
1661
  ] }) }),
1662
1662
  /* @__PURE__ */ s("div", { className: "col-span-2 flex items-center justify-end gap-4", children: [
1663
1663
  /* @__PURE__ */ e(
1664
- mr,
1664
+ ur,
1665
1665
  {
1666
1666
  tooltip: `Next Run: ${new Date(p.nextRun).toLocaleString()} ${p.timezone}`,
1667
1667
  children: /* @__PURE__ */ e(Oc, { className: "size-3.5" })
1668
1668
  }
1669
1669
  ),
1670
- /* @__PURE__ */ e(mr, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Qc, { className: "size-3.5" }) }),
1671
- c === p.id ? /* @__PURE__ */ e(Ee, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1670
+ /* @__PURE__ */ e(ur, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Qc, { className: "size-3.5" }) }),
1671
+ c === p.id ? /* @__PURE__ */ e(Me, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1672
1672
  Vn,
1673
1673
  {
1674
1674
  onClick: () => r(p.id),
@@ -1685,15 +1685,15 @@ function xd({
1685
1685
  ] }) })
1686
1686
  ] }) });
1687
1687
  }
1688
- const mr = ({
1688
+ const ur = ({
1689
1689
  children: t,
1690
1690
  tooltip: a
1691
- }) => /* @__PURE__ */ e(Er, { delayDuration: 0, children: /* @__PURE__ */ s(Ue, { children: [
1691
+ }) => /* @__PURE__ */ e(Mr, { delayDuration: 0, children: /* @__PURE__ */ s(Ue, { children: [
1692
1692
  /* @__PURE__ */ e(qe, { asChild: !0, children: t }),
1693
1693
  /* @__PURE__ */ e(Ge, { children: a })
1694
1694
  ] }) });
1695
1695
  function bd() {
1696
- const [t, a] = P("idle"), [n, r] = P(""), [l, i] = P(null), c = Y((w) => w.authToken), o = Y((w) => w.dashboard.id), d = Y((w) => w.dashboard.title), { endUserId: u } = Or((c == null ? void 0 : c.accessToken) || ""), h = "https://semaphor.cloud/api/v1/subscriptions/get", m = {
1696
+ const [t, a] = P("idle"), [n, r] = P(""), [l, i] = P(null), c = Y((w) => w.authToken), o = Y((w) => w.dashboard.id), d = Y((w) => w.dashboard.title), { endUserId: u } = Er((c == null ? void 0 : c.accessToken) || ""), h = "https://semaphor.cloud/api/v1/subscriptions/get", m = {
1697
1697
  dashboardId: o,
1698
1698
  endUserId: u
1699
1699
  }, { data: f, isLoading: g, isError: y, isFetching: p, refetch: b } = vt({
@@ -1707,7 +1707,7 @@ function bd() {
1707
1707
  frequency: M,
1708
1708
  time: S
1709
1709
  }) {
1710
- const { authToken: C, ...T } = Ml(), k = Intl.DateTimeFormat().resolvedOptions().timeZone, R = {
1710
+ const { authToken: C, ...T } = Tl(), k = Intl.DateTimeFormat().resolvedOptions().timeZone, R = {
1711
1711
  email: w,
1712
1712
  frequency: M,
1713
1713
  time: S,
@@ -1760,7 +1760,7 @@ function bd() {
1760
1760
  };
1761
1761
  }
1762
1762
  function Da() {
1763
- const { authToken: t, tokenProps: a } = Oe();
1763
+ const { authToken: t, tokenProps: a } = Ee();
1764
1764
  let n = null;
1765
1765
  a && (a.endUserId && a.endUserEmail && a.tenantId ? n = {
1766
1766
  id: a.endUserId,
@@ -1798,7 +1798,7 @@ function Da() {
1798
1798
  });
1799
1799
  return { currentUser: n ? { ...n, ...r || {} } : null, isLoading: l, isError: i };
1800
1800
  }
1801
- function El() {
1801
+ function Ml() {
1802
1802
  return /* @__PURE__ */ e(rt, { className: "w-full flex-1", children: /* @__PURE__ */ s("div", { className: "space-y-4 px-4", children: [
1803
1803
  /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "h-8 w-full rounded bg-muted" }) }),
1804
1804
  /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "h-8 w-full rounded bg-muted" }) }),
@@ -1943,7 +1943,7 @@ const Nd = async (t, a, n, r, l, i) => {
1943
1943
  );
1944
1944
  };
1945
1945
  function Od(t) {
1946
- const { authToken: a } = Oe();
1946
+ const { authToken: a } = Ee();
1947
1947
  return vt({
1948
1948
  queryKey: ["tenants"],
1949
1949
  queryFn: () => dn(
@@ -1954,7 +1954,7 @@ function Od(t) {
1954
1954
  });
1955
1955
  }
1956
1956
  function Id(t, a, n, r, l) {
1957
- const { authToken: i } = Oe();
1957
+ const { authToken: i } = Ee();
1958
1958
  return vt({
1959
1959
  queryKey: [t, a, n, r, l],
1960
1960
  queryFn: () => Nd(
@@ -1965,7 +1965,7 @@ function Id(t, a, n, r, l) {
1965
1965
  });
1966
1966
  }
1967
1967
  function Ad(t, a) {
1968
- const { authToken: n } = Oe(), r = He();
1968
+ const { authToken: n } = Ee(), r = He();
1969
1969
  return Zt({
1970
1970
  mutationFn: (l) => Cd((n == null ? void 0 : n.accessToken) || "", t, l),
1971
1971
  onMutate: async () => {
@@ -1982,7 +1982,7 @@ function Ad(t, a) {
1982
1982
  });
1983
1983
  }
1984
1984
  function Rd(t) {
1985
- const { authToken: a } = Oe(), n = He();
1985
+ const { authToken: a } = Ee(), n = He();
1986
1986
  return Zt({
1987
1987
  mutationFn: ({
1988
1988
  resourceId: r,
@@ -2007,7 +2007,7 @@ function Rd(t) {
2007
2007
  });
2008
2008
  }
2009
2009
  function zd(t, a) {
2010
- const { authToken: n } = Oe(), r = He();
2010
+ const { authToken: n } = Ee(), r = He();
2011
2011
  return Zt({
2012
2012
  mutationFn: (l) => Sd((n == null ? void 0 : n.accessToken) || "", t, l),
2013
2013
  onMutate: async () => {
@@ -2024,7 +2024,7 @@ function zd(t, a) {
2024
2024
  });
2025
2025
  }
2026
2026
  function Ld(t) {
2027
- const { authToken: a } = Oe(), n = He();
2027
+ const { authToken: a } = Ee(), n = He();
2028
2028
  return Zt({
2029
2029
  mutationFn: (r) => kd((a == null ? void 0 : a.accessToken) || "", t, r),
2030
2030
  onMutate: async () => {
@@ -2041,7 +2041,7 @@ function Ld(t) {
2041
2041
  });
2042
2042
  }
2043
2043
  function Fd() {
2044
- const { authToken: t } = Oe(), a = He();
2044
+ const { authToken: t } = Ee(), a = He();
2045
2045
  return Zt({
2046
2046
  mutationFn: ({
2047
2047
  resourceType: n,
@@ -2077,7 +2077,7 @@ function Fd() {
2077
2077
  });
2078
2078
  }
2079
2079
  function _d() {
2080
- const { authToken: t } = Oe(), a = He();
2080
+ const { authToken: t } = Ee(), a = He();
2081
2081
  return Zt({
2082
2082
  mutationFn: ({
2083
2083
  resourceType: n,
@@ -2113,7 +2113,7 @@ function _d() {
2113
2113
  });
2114
2114
  }
2115
2115
  function Pd(t, a) {
2116
- const { authToken: n } = Oe();
2116
+ const { authToken: n } = Ee();
2117
2117
  return vt({
2118
2118
  queryKey: ["resource-shares", t, a],
2119
2119
  queryFn: () => Md(
@@ -2125,7 +2125,7 @@ function Pd(t, a) {
2125
2125
  });
2126
2126
  }
2127
2127
  function Vd(t, a, n) {
2128
- const { authToken: r } = Oe();
2128
+ const { authToken: r } = Ee();
2129
2129
  return vt({
2130
2130
  queryKey: ["resource-by-id", t, a],
2131
2131
  queryFn: () => Ed((r == null ? void 0 : r.accessToken) || "", t, a),
@@ -2135,7 +2135,7 @@ function Vd(t, a, n) {
2135
2135
  function jd(t, a) {
2136
2136
  return Vd(ue.VISUAL, t, a);
2137
2137
  }
2138
- function Ol() {
2138
+ function El() {
2139
2139
  const [t, a] = P(/* @__PURE__ */ new Map()), n = me((i, c) => {
2140
2140
  a((o) => {
2141
2141
  const d = new Map(o), u = new Set(d.get(i) || []);
@@ -2159,7 +2159,7 @@ function Ol() {
2159
2159
  isUpdating: l
2160
2160
  };
2161
2161
  }
2162
- function Il(t, a, n) {
2162
+ function Ol(t, a, n) {
2163
2163
  var m;
2164
2164
  const r = Id(t), l = Ad(
2165
2165
  t,
@@ -2198,21 +2198,21 @@ function Il(t, a, n) {
2198
2198
  };
2199
2199
  }
2200
2200
  function Ud(t, a) {
2201
- return Il(
2201
+ return Ol(
2202
2202
  ue.DASHBOARD,
2203
2203
  t,
2204
2204
  a
2205
2205
  );
2206
2206
  }
2207
2207
  function $d(t, a) {
2208
- return Il(
2208
+ return Ol(
2209
2209
  ue.VISUAL,
2210
2210
  t,
2211
2211
  a
2212
2212
  );
2213
2213
  }
2214
2214
  function Bd() {
2215
- const { authToken: t } = Oe(), a = He();
2215
+ const { authToken: t } = Ee(), a = He();
2216
2216
  return Zt({
2217
2217
  mutationFn: async ({
2218
2218
  visualId: n,
@@ -2258,10 +2258,10 @@ function qd({
2258
2258
  }) {
2259
2259
  var M;
2260
2260
  const { selectVisual: f } = ss(), g = zi(t.id), [y, p] = P(!1), [b, v] = P(!1);
2261
- Me(() => {
2261
+ Te(() => {
2262
2262
  n ? (p(!0), v(!0)) : b && (p(!1), v(!1));
2263
2263
  }, [n, b]);
2264
- const N = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(bl, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5 text-slate-500" }), w = () => /* @__PURE__ */ e(rs, { className: "h-4 w-4 text-slate-400" }), z = () => {
2264
+ const N = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(xl, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5 text-slate-500" }), w = () => /* @__PURE__ */ e(rs, { className: "h-4 w-4 text-slate-400" }), z = () => {
2265
2265
  f(t), c == null || c(t);
2266
2266
  };
2267
2267
  return /* @__PURE__ */ s(
@@ -2341,7 +2341,7 @@ function qd({
2341
2341
  variant: "ghost",
2342
2342
  className: "h-6 w-6 p-0 hover:bg-slate-200 dark:hover:bg-slate-700",
2343
2343
  onClick: (S) => S.stopPropagation(),
2344
- children: /* @__PURE__ */ e(Ir, { className: "h-3 w-3" })
2344
+ children: /* @__PURE__ */ e(Or, { className: "h-3 w-3" })
2345
2345
  }
2346
2346
  ) }),
2347
2347
  /* @__PURE__ */ s(_n, { align: "end", className: "z-[51] w-40", children: [
@@ -2365,7 +2365,7 @@ function qd({
2365
2365
  },
2366
2366
  disabled: n,
2367
2367
  children: [
2368
- n ? /* @__PURE__ */ e(Ee, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Ar, { className: "mr-2 h-3 w-3" }),
2368
+ n ? /* @__PURE__ */ e(Me, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Ir, { className: "mr-2 h-3 w-3" }),
2369
2369
  n ? "Duplicating..." : "Duplicate"
2370
2370
  ]
2371
2371
  }
@@ -2435,7 +2435,7 @@ function qd({
2435
2435
  t.id
2436
2436
  );
2437
2437
  }
2438
- function Al({
2438
+ function Il({
2439
2439
  value: t,
2440
2440
  onChange: a,
2441
2441
  placeholder: n = "Search users by name, email, or department..."
@@ -2499,7 +2499,7 @@ function ia({
2499
2499
  )) })
2500
2500
  ] }) : /* @__PURE__ */ e(ie, { variant: "outline", className: `text-xs ${l}`, children: c });
2501
2501
  }
2502
- function Rl({
2502
+ function Al({
2503
2503
  selectedUsers: t,
2504
2504
  selectedUserObjects: a,
2505
2505
  onRemove: n,
@@ -2549,7 +2549,7 @@ function Rl({
2549
2549
  /* @__PURE__ */ e(ht, {})
2550
2550
  ] });
2551
2551
  }
2552
- function zl({
2552
+ function Rl({
2553
2553
  usersToRemove: t,
2554
2554
  allUsers: a,
2555
2555
  onRemove: n
@@ -2586,7 +2586,7 @@ function zl({
2586
2586
  /* @__PURE__ */ e(ht, {})
2587
2587
  ] });
2588
2588
  }
2589
- function Ll({
2589
+ function zl({
2590
2590
  usersToUpdate: t,
2591
2591
  allUsers: a,
2592
2592
  onRemove: n,
@@ -2640,9 +2640,9 @@ function Ll({
2640
2640
  )) })
2641
2641
  ] });
2642
2642
  }
2643
- function Fl(t, a = {}) {
2643
+ function Ll(t, a = {}) {
2644
2644
  const { enabled: n = !0, eventType: r = "mousedown" } = a, l = nt(null);
2645
- return Me(() => {
2645
+ return Te(() => {
2646
2646
  const i = (c) => {
2647
2647
  const o = c.target;
2648
2648
  l.current && l.current.contains(o) || o instanceof Element && (o.closest("[data-radix-popper-content-wrapper]") || o.closest("[data-radix-select-content]") || o.closest("[data-radix-popover-content]") || o.closest("[data-radix-dropdown-menu-content]") || o.closest("[data-radix-tooltip-content]") || o.closest('[role="listbox"]') || o.closest('[role="option"]') || o.closest('[role="combobox"]')) || o instanceof Element && o.hasAttribute("data-radix-") || t();
@@ -2659,11 +2659,11 @@ function Ze(t, a) {
2659
2659
  function Gd(t) {
2660
2660
  return ["POWER_USER", "ADMIN", "EDITOR"].includes(t);
2661
2661
  }
2662
- function _l(t) {
2662
+ function Fl(t) {
2663
2663
  return "tenantId" in t && t.tenantId ? "tenant" : "organization";
2664
2664
  }
2665
2665
  function Hd(t, a, n) {
2666
- const r = _l(t), l = (n == null ? void 0 : n.type) || "organization";
2666
+ const r = Fl(t), l = (n == null ? void 0 : n.type) || "organization";
2667
2667
  if (!(!a || !a.shares))
2668
2668
  if (l === "organization")
2669
2669
  if (r === "organization") {
@@ -2681,7 +2681,7 @@ function Hd(t, a, n) {
2681
2681
  );
2682
2682
  }
2683
2683
  function Kd({ user: t }) {
2684
- return _l(t) === "tenant" ? /* @__PURE__ */ e(ie, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(ie, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
2684
+ return Fl(t) === "tenant" ? /* @__PURE__ */ e(ie, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(ie, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
2685
2685
  }
2686
2686
  function Jd({
2687
2687
  user: t,
@@ -2762,11 +2762,11 @@ function Yd({
2762
2762
  }) {
2763
2763
  return /* @__PURE__ */ s(ne, { children: [
2764
2764
  t && /* @__PURE__ */ e("span", { className: "text-xs font-medium text-red-600", children: r ? /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
2765
- /* @__PURE__ */ e(Ee, { className: "h-3 w-3 animate-spin" }),
2765
+ /* @__PURE__ */ e(Me, { className: "h-3 w-3 animate-spin" }),
2766
2766
  "Removing..."
2767
2767
  ] }) : "⚠ Will remove access" }),
2768
2768
  a && !n && /* @__PURE__ */ e("span", { className: "text-xs font-medium text-blue-600", children: l ? /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
2769
- /* @__PURE__ */ e(Ee, { className: "h-3 w-3 animate-spin" }),
2769
+ /* @__PURE__ */ e(Me, { className: "h-3 w-3 animate-spin" }),
2770
2770
  "Sharing..."
2771
2771
  ] }) : "Will share" })
2772
2772
  ] });
@@ -3118,7 +3118,7 @@ function Zd({
3118
3118
  availableUsers: n
3119
3119
  }) {
3120
3120
  return t ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
3121
- /* @__PURE__ */ e(Ee, { className: "h-4 w-4 animate-spin" }),
3121
+ /* @__PURE__ */ e(Me, { className: "h-4 w-4 animate-spin" }),
3122
3122
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading users..." })
3123
3123
  ] }) }) : n.length === 0 ? /* @__PURE__ */ e("div", { className: "py-8 text-center text-sm text-muted-foreground", children: a ? "No users found matching your search." : "No users available to share with." }) : null;
3124
3124
  }
@@ -3219,7 +3219,7 @@ function Xd({
3219
3219
  }
3220
3220
  );
3221
3221
  }
3222
- function Pl({
3222
+ function _l({
3223
3223
  existingShares: t,
3224
3224
  isInitialLoading: a,
3225
3225
  isSearching: n,
@@ -3313,7 +3313,7 @@ function Pl({
3313
3313
  ] })
3314
3314
  ] });
3315
3315
  }
3316
- function Vl({
3316
+ function Pl({
3317
3317
  shareType: t,
3318
3318
  onShareTypeChange: a,
3319
3319
  currentUser: n,
@@ -3435,7 +3435,7 @@ function eu({
3435
3435
  ),
3436
3436
  (y || p) && /* @__PURE__ */ e(ie, { variant: "destructive", className: "ml-2", children: "No Access" })
3437
3437
  ] }),
3438
- /* @__PURE__ */ e(Rr, { children: y || p ? "No access for all users." : "This will share the dashboard with all users in your " + ((t == null ? void 0 : t.type) === "organization" ? "organization" : "tenant") + ". Select an access level below." })
3438
+ /* @__PURE__ */ e(Ar, { children: y || p ? "No access for all users." : "This will share the dashboard with all users in your " + ((t == null ? void 0 : t.type) === "organization" ? "organization" : "tenant") + ". Select an access level below." })
3439
3439
  ] }),
3440
3440
  /* @__PURE__ */ e(Wt, { className: "space-y-4", children: /* @__PURE__ */ s("div", { className: "space-y-3", children: [
3441
3441
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
@@ -3501,7 +3501,7 @@ function eu({
3501
3501
  }
3502
3502
  ) });
3503
3503
  }
3504
- function jl({
3504
+ function Vl({
3505
3505
  currentUser: t,
3506
3506
  currentShare: a,
3507
3507
  isSharing: n,
@@ -3541,7 +3541,7 @@ const tu = async (t, a = {}) => {
3541
3541
  };
3542
3542
  function nu(t = {}) {
3543
3543
  var r, l, i;
3544
- const { authToken: a } = Oe(), n = vt({
3544
+ const { authToken: a } = Ee(), n = vt({
3545
3545
  queryKey: ["unified-users", t],
3546
3546
  queryFn: () => tu((a == null ? void 0 : a.accessToken) || "", t),
3547
3547
  enabled: !!(a != null && a.accessToken),
@@ -3601,7 +3601,7 @@ function au({
3601
3601
  isRemoving: c = !1
3602
3602
  }) {
3603
3603
  var ae, B;
3604
- const o = hn(), d = Bn(), { searchQuery: u, setSearchQuery: h, debouncedSearchQuery: m } = zr(), f = un(), g = lt(), y = mn(), p = it(), b = us(), v = Ft(), [N, w] = Ie.useState("specific_users"), z = () => {
3604
+ const o = hn(), d = Bn(), { searchQuery: u, setSearchQuery: h, debouncedSearchQuery: m } = Rr(), f = un(), g = lt(), y = mn(), p = it(), b = us(), v = Ft(), [N, w] = Ie.useState("specific_users"), z = () => {
3605
3605
  if (o === "org") return "organization";
3606
3606
  if (o === "tenant") return "tenant";
3607
3607
  }, M = () => {
@@ -3658,7 +3658,7 @@ function au({
3658
3658
  const U = T, oe = !1;
3659
3659
  return n ? /* @__PURE__ */ s(ne, { children: [
3660
3660
  /* @__PURE__ */ e(
3661
- Vl,
3661
+ Pl,
3662
3662
  {
3663
3663
  shareType: N,
3664
3664
  onShareTypeChange: k,
@@ -3686,9 +3686,9 @@ function au({
3686
3686
  }
3687
3687
  ),
3688
3688
  N === "specific_users" ? /* @__PURE__ */ s("div", { className: "mt-3 space-y-2", children: [
3689
- /* @__PURE__ */ e(Al, { value: u, onChange: h }),
3689
+ /* @__PURE__ */ e(Il, { value: u, onChange: h }),
3690
3690
  /* @__PURE__ */ e(
3691
- Rl,
3691
+ Al,
3692
3692
  {
3693
3693
  selectedUsers: f,
3694
3694
  selectedUserObjects: D,
@@ -3698,7 +3698,7 @@ function au({
3698
3698
  }
3699
3699
  ),
3700
3700
  /* @__PURE__ */ e(
3701
- zl,
3701
+ Rl,
3702
3702
  {
3703
3703
  usersToRemove: g,
3704
3704
  allUsers: R,
@@ -3706,7 +3706,7 @@ function au({
3706
3706
  }
3707
3707
  ),
3708
3708
  /* @__PURE__ */ e(
3709
- Ll,
3709
+ zl,
3710
3710
  {
3711
3711
  usersToUpdate: y,
3712
3712
  allUsers: R,
@@ -3715,7 +3715,7 @@ function au({
3715
3715
  }
3716
3716
  ),
3717
3717
  /* @__PURE__ */ e(
3718
- Pl,
3718
+ _l,
3719
3719
  {
3720
3720
  existingShares: C,
3721
3721
  isInitialLoading: U,
@@ -3735,7 +3735,7 @@ function au({
3735
3735
  }
3736
3736
  )
3737
3737
  ] }) : /* @__PURE__ */ e("div", { className: "mt-3", children: /* @__PURE__ */ e(
3738
- jl,
3738
+ Vl,
3739
3739
  {
3740
3740
  currentUser: n,
3741
3741
  currentShare: $,
@@ -3753,7 +3753,7 @@ function au({
3753
3753
  ) })
3754
3754
  ] }) : null;
3755
3755
  }
3756
- function hr({
3756
+ function mr({
3757
3757
  resource: t,
3758
3758
  resourceType: a,
3759
3759
  currentUser: n,
@@ -3763,7 +3763,7 @@ function hr({
3763
3763
  isRemoving: c = !1
3764
3764
  }) {
3765
3765
  var ee;
3766
- const { searchQuery: o, debouncedSearchQuery: d, setSearchQuery: u } = zr(), h = un(), m = lt(), f = mn(), g = it(), y = fa(), p = ms(), b = Bn(), v = Ft(), { data: N, isLoading: w } = Od({
3766
+ const { searchQuery: o, debouncedSearchQuery: d, setSearchQuery: u } = Rr(), h = un(), m = lt(), f = mn(), g = it(), y = fa(), p = ms(), b = Bn(), v = Ft(), { data: N, isLoading: w } = Od({
3767
3767
  enabled: (n == null ? void 0 : n.type) === "organization"
3768
3768
  }), [z, M] = P(
3769
3769
  (n == null ? void 0 : n.type) === "organization" ? "all_tenants" : "specific_tenant_users"
@@ -3772,7 +3772,7 @@ function hr({
3772
3772
  (n == null ? void 0 : n.type) === "tenant" ? (v.setCurrentContext("tenant-dialog"), v.setCurrentMode("specificTenantUsers")) : (v.setCurrentContext("tenant-tab"), v.setCurrentMode("allTenants"));
3773
3773
  }, [v, n == null ? void 0 : n.type]);
3774
3774
  const S = (W) => {
3775
- var pe, be, he, Te;
3775
+ var pe, be, he, Oe;
3776
3776
  M(
3777
3777
  W
3778
3778
  );
@@ -3781,7 +3781,7 @@ function hr({
3781
3781
  const X = (be = (pe = k == null ? void 0 : k.shares) == null ? void 0 : pe.tenantWide) == null ? void 0 : be[0];
3782
3782
  X && X.role !== void 0 && v.setTenantWideRole(X.role);
3783
3783
  } else if (W === "all_tenants") {
3784
- const X = (Te = (he = k == null ? void 0 : k.shares) == null ? void 0 : he.allTenantsOnly) == null ? void 0 : Te[0];
3784
+ const X = (Oe = (he = k == null ? void 0 : k.shares) == null ? void 0 : he.allTenantsOnly) == null ? void 0 : Oe[0];
3785
3785
  X && X.role !== void 0 && v.setAllTenantsRole(X.role);
3786
3786
  }
3787
3787
  }, C = (W) => {
@@ -3801,8 +3801,8 @@ function hr({
3801
3801
  // For tenant users, use their tenantId; for org users, use selectedTenant
3802
3802
  tenantId: (n == null ? void 0 : n.type) === "tenant" ? n.tenantId : b
3803
3803
  }), I = (W) => {
3804
- var he, Te;
3805
- const de = h.some((X) => X.id === W), pe = m.includes(W), be = (Te = (he = k == null ? void 0 : k.shares) == null ? void 0 : he.specificTenantUsers) == null ? void 0 : Te.some(
3804
+ var he, Oe;
3805
+ const de = h.some((X) => X.id === W), pe = m.includes(W), be = (Oe = (he = k == null ? void 0 : k.shares) == null ? void 0 : he.specificTenantUsers) == null ? void 0 : Oe.some(
3806
3806
  (X) => X.tenantUserId === W
3807
3807
  );
3808
3808
  de ? v.removeSelectedUser(W) : pe ? v.removeUserFromRemove(W) : be || v.addSelectedUser({ id: W, role: "VIEWER" });
@@ -3853,7 +3853,7 @@ function hr({
3853
3853
  ] }) }),
3854
3854
  !q && n && /* @__PURE__ */ s("div", { className: "max-h-[500px] space-y-4 overflow-y-auto", children: [
3855
3855
  /* @__PURE__ */ e(
3856
- Vl,
3856
+ Pl,
3857
3857
  {
3858
3858
  shareType: z,
3859
3859
  onShareTypeChange: S,
@@ -3876,13 +3876,13 @@ function hr({
3876
3876
  value: "all_tenants",
3877
3877
  label: "All Tenants",
3878
3878
  description: "Share with all tenants and their users",
3879
- icon: /* @__PURE__ */ e(or, { className: "mb-3 h-6 w-6 text-purple-500" })
3879
+ icon: /* @__PURE__ */ e(ir, { className: "mb-3 h-6 w-6 text-purple-500" })
3880
3880
  },
3881
3881
  {
3882
3882
  value: "all_tenant_users",
3883
3883
  label: "Specific Tenant",
3884
3884
  description: "Share with all users of a specific tenant",
3885
- icon: /* @__PURE__ */ e(Mr, { className: "mb-3 h-6 w-6 text-blue-500" })
3885
+ icon: /* @__PURE__ */ e(Tr, { className: "mb-3 h-6 w-6 text-blue-500" })
3886
3886
  },
3887
3887
  {
3888
3888
  value: "specific_tenant_users",
@@ -3915,14 +3915,14 @@ function hr({
3915
3915
  ] }),
3916
3916
  Z() ? /* @__PURE__ */ e(ne, { children: z === "specific_tenant_users" ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
3917
3917
  /* @__PURE__ */ e(
3918
- Al,
3918
+ Il,
3919
3919
  {
3920
3920
  value: o,
3921
3921
  onChange: u
3922
3922
  }
3923
3923
  ),
3924
3924
  /* @__PURE__ */ e(
3925
- Rl,
3925
+ Al,
3926
3926
  {
3927
3927
  selectedUsers: h,
3928
3928
  selectedUserObjects: K,
@@ -3932,7 +3932,7 @@ function hr({
3932
3932
  }
3933
3933
  ),
3934
3934
  /* @__PURE__ */ e(
3935
- zl,
3935
+ Rl,
3936
3936
  {
3937
3937
  usersToRemove: m,
3938
3938
  allUsers: T,
@@ -3940,7 +3940,7 @@ function hr({
3940
3940
  }
3941
3941
  ),
3942
3942
  /* @__PURE__ */ e(
3943
- Ll,
3943
+ zl,
3944
3944
  {
3945
3945
  usersToUpdate: f,
3946
3946
  allUsers: T,
@@ -3949,7 +3949,7 @@ function hr({
3949
3949
  }
3950
3950
  ),
3951
3951
  /* @__PURE__ */ e(
3952
- Pl,
3952
+ _l,
3953
3953
  {
3954
3954
  existingShares: k,
3955
3955
  isInitialLoading: !!J,
@@ -3967,7 +3967,7 @@ function hr({
3967
3967
  }
3968
3968
  )
3969
3969
  ] }) : z === "all_tenant_users" || z === "all_tenants" ? /* @__PURE__ */ e("div", { className: "mt-6", children: /* @__PURE__ */ e(
3970
- jl,
3970
+ Vl,
3971
3971
  {
3972
3972
  currentUser: n,
3973
3973
  currentShare: B,
@@ -3985,14 +3985,14 @@ function hr({
3985
3985
  ) }) : null }) : (
3986
3986
  /* Show message for org users when no tenant is selected */
3987
3987
  (n == null ? void 0 : n.type) === "organization" && (z === "specific_tenant_users" || z === "all_tenant_users") && /* @__PURE__ */ e("div", { className: "mt-6 flex items-center justify-center py-8", children: /* @__PURE__ */ s("div", { className: "text-center", children: [
3988
- /* @__PURE__ */ e(or, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
3988
+ /* @__PURE__ */ e(ir, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
3989
3989
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Please select a tenant to continue" })
3990
3990
  ] }) })
3991
3991
  )
3992
3992
  ] })
3993
3993
  ] });
3994
3994
  }
3995
- const Ul = () => {
3995
+ const jl = () => {
3996
3996
  const t = hs(), a = it(), n = un(), r = lt(), l = mn(), i = Bn(), c = us(), o = ms(), d = fa(), u = Be(() => () => Pi({
3997
3997
  currentContext: t,
3998
3998
  currentMode: a,
@@ -4052,7 +4052,7 @@ const Ul = () => {
4052
4052
  tenantWideRole: d
4053
4053
  };
4054
4054
  };
4055
- function pr({
4055
+ function hr({
4056
4056
  resource: t,
4057
4057
  existingShares: a,
4058
4058
  isSharing: n,
@@ -4068,7 +4068,7 @@ function pr({
4068
4068
  it(), hs();
4069
4069
  const g = Bn();
4070
4070
  hn();
4071
- const y = us(), p = ms(), b = fa(), { buildShareData: v, validateShareData: N, isCurrentStateValid: w } = Ul(), z = n || r || l, M = () => {
4071
+ const y = us(), p = ms(), b = fa(), { buildShareData: v, validateShareData: N, isCurrentStateValid: w } = jl(), z = n || r || l, M = () => {
4072
4072
  var R, D, L, A;
4073
4073
  if (z) return "Updating...";
4074
4074
  if (o === "specific_users") {
@@ -4197,7 +4197,7 @@ function pr({
4197
4197
  variant: "default",
4198
4198
  children: [
4199
4199
  z ? /* @__PURE__ */ s(ne, { children: [
4200
- /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin" }),
4200
+ /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin" }),
4201
4201
  "Updating..."
4202
4202
  ] }) : /* @__PURE__ */ e(Mn, { className: "mr-2 h-4 w-4" }),
4203
4203
  !z && M()
@@ -4212,7 +4212,7 @@ function pr({
4212
4212
  variant: k(),
4213
4213
  children: [
4214
4214
  z ? /* @__PURE__ */ s(ne, { children: [
4215
- /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin" }),
4215
+ /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin" }),
4216
4216
  "Updating..."
4217
4217
  ] }) : /* @__PURE__ */ e(gt, { className: "mr-2 h-4 w-4" }),
4218
4218
  !z && M()
@@ -4235,7 +4235,7 @@ function su({
4235
4235
  it(), hs();
4236
4236
  const m = fa();
4237
4237
  Bn();
4238
- const { buildShareData: f, validateShareData: g, isCurrentStateValid: y } = Ul(), p = a || n || r, b = () => {
4238
+ const { buildShareData: f, validateShareData: g, isCurrentStateValid: y } = jl(), p = a || n || r, b = () => {
4239
4239
  if (p) return "Updating...";
4240
4240
  if (c === "specific_users") {
4241
4241
  if (d.length === 0 && u.length === 0 && h.length === 0)
@@ -4289,7 +4289,7 @@ function su({
4289
4289
  variant: "default",
4290
4290
  children: [
4291
4291
  p ? /* @__PURE__ */ s(ne, { children: [
4292
- /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin" }),
4292
+ /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin" }),
4293
4293
  "Updating..."
4294
4294
  ] }) : /* @__PURE__ */ e(Mn, { className: "mr-2 h-4 w-4" }),
4295
4295
  !p && b()
@@ -4304,7 +4304,7 @@ function su({
4304
4304
  variant: z(),
4305
4305
  children: [
4306
4306
  p ? /* @__PURE__ */ s(ne, { children: [
4307
- /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin" }),
4307
+ /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin" }),
4308
4308
  "Updating..."
4309
4309
  ] }) : /* @__PURE__ */ e(Mn, { className: "mr-2 h-4 w-4" }),
4310
4310
  !p && b()
@@ -4313,7 +4313,7 @@ function su({
4313
4313
  )
4314
4314
  ] });
4315
4315
  }
4316
- function $l({
4316
+ function Ul({
4317
4317
  resource: t,
4318
4318
  resourceType: a,
4319
4319
  isSharing: n,
@@ -4394,7 +4394,7 @@ function $l({
4394
4394
  value: "tenant",
4395
4395
  className: "min-h-0 flex-1 overflow-hidden",
4396
4396
  children: /* @__PURE__ */ e("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ e(
4397
- hr,
4397
+ mr,
4398
4398
  {
4399
4399
  resource: t,
4400
4400
  resourceType: a,
@@ -4415,7 +4415,7 @@ function $l({
4415
4415
  ) : (
4416
4416
  // Tenant users see content directly without tabs
4417
4417
  /* @__PURE__ */ e("div", { className: "mb-4 min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ e(
4418
- hr,
4418
+ mr,
4419
4419
  {
4420
4420
  resource: t,
4421
4421
  resourceType: a,
@@ -4430,7 +4430,7 @@ function $l({
4430
4430
  /* @__PURE__ */ e("div", { className: "mt-auto flex-shrink-0", children: S ? (
4431
4431
  // Organization users - show footer based on selected tab
4432
4432
  y === "org" ? /* @__PURE__ */ e(
4433
- pr,
4433
+ hr,
4434
4434
  {
4435
4435
  resource: t,
4436
4436
  existingShares: v,
@@ -4446,7 +4446,7 @@ function $l({
4446
4446
  ) : (
4447
4447
  // For tenant tab, use OrgUserFooter with actual share type from store
4448
4448
  /* @__PURE__ */ e(
4449
- pr,
4449
+ hr,
4450
4450
  {
4451
4451
  resource: t,
4452
4452
  existingShares: b,
@@ -4494,7 +4494,7 @@ function Mt(t, a, n) {
4494
4494
  data: { shares: n }
4495
4495
  };
4496
4496
  }
4497
- function Bl(t, a) {
4497
+ function $l(t, a) {
4498
4498
  const {
4499
4499
  resourceType: n,
4500
4500
  resourceId: r,
@@ -4756,7 +4756,7 @@ function Bl(t, a) {
4756
4756
  break;
4757
4757
  }
4758
4758
  }
4759
- function ql(t, a, n, r) {
4759
+ function Bl(t, a, n, r) {
4760
4760
  var u, h, m, f, g, y;
4761
4761
  const {
4762
4762
  resourceType: l,
@@ -4868,7 +4868,7 @@ function ru(t, a, n) {
4868
4868
  existingShares: o,
4869
4869
  resetUserSelections: d
4870
4870
  };
4871
- Bl(m, f);
4871
+ $l(m, f);
4872
4872
  },
4873
4873
  [
4874
4874
  t,
@@ -4886,7 +4886,7 @@ function ru(t, a, n) {
4886
4886
  existingShares: o,
4887
4887
  resetUserSelections: d
4888
4888
  };
4889
- ql(
4889
+ Bl(
4890
4890
  l,
4891
4891
  i || "",
4892
4892
  c || "",
@@ -4926,7 +4926,7 @@ function lu(t, a, n) {
4926
4926
  existingShares: o,
4927
4927
  resetUserSelections: d
4928
4928
  };
4929
- Bl(m, f);
4929
+ $l(m, f);
4930
4930
  },
4931
4931
  [
4932
4932
  t,
@@ -4944,7 +4944,7 @@ function lu(t, a, n) {
4944
4944
  existingShares: o,
4945
4945
  resetUserSelections: d
4946
4946
  };
4947
- ql(
4947
+ Bl(
4948
4948
  l,
4949
4949
  i || "",
4950
4950
  c || "",
@@ -4965,7 +4965,7 @@ function lu(t, a, n) {
4965
4965
  handleRemoveAccess: h
4966
4966
  };
4967
4967
  }
4968
- function Gl(t) {
4968
+ function ql(t) {
4969
4969
  const a = t.toUpperCase().indexOf("WHERE"), n = t.toUpperCase().indexOf("GROUP BY"), r = t.toUpperCase().indexOf("LIMIT"), l = t.toUpperCase().indexOf("ORDER BY");
4970
4970
  let i = t.length;
4971
4971
  if (l !== -1 && (i = l), r !== -1 && r < i && (i = r), a !== -1) {
@@ -4983,7 +4983,7 @@ function Gl(t) {
4983
4983
  }
4984
4984
  function Is(t) {
4985
4985
  const [a, n] = P(null), [r, l] = P(null);
4986
- return Me(() => {
4986
+ return Te(() => {
4987
4987
  if (!t || t.trim() === "") {
4988
4988
  n(null), l(null);
4989
4989
  return;
@@ -5018,7 +5018,7 @@ function Is(t) {
5018
5018
  })();
5019
5019
  }, [t]), a;
5020
5020
  }
5021
- function Hl(t, a) {
5021
+ function Gl(t, a) {
5022
5022
  if (t.length === 0)
5023
5023
  return "";
5024
5024
  if (a) {
@@ -5038,7 +5038,7 @@ function Hl(t, a) {
5038
5038
  }
5039
5039
  return t[0].id;
5040
5040
  }
5041
- async function fr(t, a, n) {
5041
+ async function pr(t, a, n) {
5042
5042
  if (!t || !a)
5043
5043
  throw new Error("Missing auth token or visual ID");
5044
5044
  const r = ["resource-by-id", "visual", a], l = n.getQueryData(r);
@@ -5089,7 +5089,7 @@ function ou() {
5089
5089
  return { getUpdatedFrame: me(() => {
5090
5090
  var v;
5091
5091
  let g = h;
5092
- h && !h.includes("{{") && (g = Gl(h), t(g));
5092
+ h && !h.includes("{{") && (g = ql(h), t(g));
5093
5093
  const y = (v = r == null ? void 0 : r.getState()) == null ? void 0 : v.settings, p = {
5094
5094
  ...n,
5095
5095
  dataSource: n.dataSource || { mode: "directSource" },
@@ -5113,7 +5113,7 @@ function ou() {
5113
5113
  return {
5114
5114
  ...a,
5115
5115
  cards: b,
5116
- activeCardId: Hl(b, a.activeCardId)
5116
+ activeCardId: Gl(b, a.activeCardId)
5117
5117
  };
5118
5118
  }, [
5119
5119
  n,
@@ -5129,8 +5129,8 @@ function ou() {
5129
5129
  h
5130
5130
  ]) };
5131
5131
  }
5132
- function Kl() {
5133
- const { authToken: t } = Oe(), a = He(), n = Lr(), { selectVisual: r } = ss(), { setFrame: l, setCard: i } = se(), {
5132
+ function Hl() {
5133
+ const { authToken: t } = Ee(), a = He(), n = zr(), { selectVisual: r } = ss(), { setFrame: l, setCard: i } = se(), {
5134
5134
  setIsDashboardEditing: c,
5135
5135
  setIsVisualEditing: o,
5136
5136
  setSelectedFrameId: d,
@@ -5142,7 +5142,7 @@ function Kl() {
5142
5142
  async (p) => {
5143
5143
  try {
5144
5144
  r(p);
5145
- const { data: b, fromCache: v } = await fr(
5145
+ const { data: b, fromCache: v } = await pr(
5146
5146
  (t == null ? void 0 : t.accessToken) || "",
5147
5147
  p.id,
5148
5148
  a
@@ -5175,7 +5175,7 @@ function Kl() {
5175
5175
  success: !1,
5176
5176
  error: "No sheet selected. Please select a sheet first."
5177
5177
  };
5178
- const { data: b, fromCache: v } = await fr(
5178
+ const { data: b, fromCache: v } = await pr(
5179
5179
  (t == null ? void 0 : t.accessToken) || "",
5180
5180
  p.id,
5181
5181
  a
@@ -5216,7 +5216,7 @@ function Kl() {
5216
5216
  function cu() {
5217
5217
  const [t, a] = P(""), [n, r] = P(!1), [l, i] = P(""), [c, o] = P(""), [d, u] = P(!1), [h, m] = P(
5218
5218
  null
5219
- ), [f, g] = P(!1), [y, p] = P(null), [b, v] = P(null), { setIsDashboardEditing: N, setIsVisualEditing: w } = yt(), { handleEditLibraryVisual: z, handleAddLibraryVisual: M } = Kl(), {
5219
+ ), [f, g] = P(!1), [y, p] = P(null), [b, v] = P(null), { setIsDashboardEditing: N, setIsVisualEditing: w } = yt(), { handleEditLibraryVisual: z, handleAddLibraryVisual: M } = Hl(), {
5220
5220
  resources: S,
5221
5221
  isLoading: C,
5222
5222
  isError: T,
@@ -5267,7 +5267,7 @@ function cu() {
5267
5267
  startUpdating: Z,
5268
5268
  stopUpdating: ee,
5269
5269
  isUpdating: W
5270
- } = Ol(), de = (F, re) => {
5270
+ } = El(), de = (F, re) => {
5271
5271
  const Ae = re.title !== void 0 ? "title" : "description";
5272
5272
  Z(F, Ae), R(
5273
5273
  {
@@ -5291,7 +5291,7 @@ function cu() {
5291
5291
  z(F);
5292
5292
  }, he = (F) => {
5293
5293
  M(F);
5294
- }, Te = (F) => {
5294
+ }, Oe = (F) => {
5295
5295
  const re = S.find((Ae) => Ae.id === F);
5296
5296
  re && R({
5297
5297
  resourceId: F,
@@ -5307,7 +5307,7 @@ function cu() {
5307
5307
  resourceId: (h == null ? void 0 : h.id) || "",
5308
5308
  resourceType: ue.VISUAL,
5309
5309
  userType: "tenant"
5310
- }), C ? /* @__PURE__ */ e(El, {}) : T ? /* @__PURE__ */ e(rt, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ s("div", { className: "py-8 text-center text-muted-foreground", children: [
5310
+ }), C ? /* @__PURE__ */ e(Ml, {}) : T ? /* @__PURE__ */ e(rt, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ s("div", { className: "py-8 text-center text-muted-foreground", children: [
5311
5311
  /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load visuals" }),
5312
5312
  /* @__PURE__ */ e(
5313
5313
  V,
@@ -5410,7 +5410,7 @@ function cu() {
5410
5410
  onUpdateVisual: de,
5411
5411
  onDeleteClick: J,
5412
5412
  onDuplicateVisual: pe,
5413
- onTogglePrivacy: Te,
5413
+ onTogglePrivacy: Oe,
5414
5414
  onShareVisual: X,
5415
5415
  isDeleting: x,
5416
5416
  isDuplicating: b === F.id,
@@ -5421,7 +5421,7 @@ function cu() {
5421
5421
  F.id
5422
5422
  )) }) }),
5423
5423
  d && h && /* @__PURE__ */ e(
5424
- $l,
5424
+ Ul,
5425
5425
  {
5426
5426
  resource: h,
5427
5427
  resourceType: ue.VISUAL,
@@ -5436,25 +5436,25 @@ function cu() {
5436
5436
  }
5437
5437
  ),
5438
5438
  /* @__PURE__ */ e(
5439
- Fr,
5439
+ Lr,
5440
5440
  {
5441
5441
  open: f,
5442
5442
  onOpenChange: (F) => {
5443
5443
  !F && x || (g(F), F || p(null));
5444
5444
  },
5445
- children: /* @__PURE__ */ s(_r, { children: [
5446
- /* @__PURE__ */ s(Pr, { children: [
5447
- /* @__PURE__ */ e(Vr, { children: "Delete Visual" }),
5448
- /* @__PURE__ */ s(jr, { children: [
5445
+ children: /* @__PURE__ */ s(Fr, { children: [
5446
+ /* @__PURE__ */ s(_r, { children: [
5447
+ /* @__PURE__ */ e(Pr, { children: "Delete Visual" }),
5448
+ /* @__PURE__ */ s(Vr, { children: [
5449
5449
  'Are you sure you want to delete "',
5450
5450
  y == null ? void 0 : y.title,
5451
5451
  '"? This action cannot be undone.'
5452
5452
  ] })
5453
5453
  ] }),
5454
- /* @__PURE__ */ s(Ur, { children: [
5455
- /* @__PURE__ */ e($r, { disabled: x, children: "Cancel" }),
5454
+ /* @__PURE__ */ s(jr, { children: [
5455
+ /* @__PURE__ */ e(Ur, { disabled: x, children: "Cancel" }),
5456
5456
  /* @__PURE__ */ e(
5457
- Br,
5457
+ $r,
5458
5458
  {
5459
5459
  onClick: (F) => {
5460
5460
  F.preventDefault(), F.stopPropagation(), q();
@@ -5488,10 +5488,10 @@ function du({
5488
5488
  }) {
5489
5489
  var M;
5490
5490
  const { selectDashboard: f } = ss(), g = ji(t.id), [y, p] = P(!1), [b, v] = P(!1);
5491
- Me(() => {
5491
+ Te(() => {
5492
5492
  n ? (p(!0), v(!0)) : b && (p(!1), v(!1));
5493
5493
  }, [n, b]);
5494
- const N = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(bl, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5 text-slate-500" }), w = () => /* @__PURE__ */ e(Ui, { className: "h-4 w-4 text-slate-400" }), z = () => {
5494
+ const N = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(xl, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5 text-slate-500" }), w = () => /* @__PURE__ */ e(Ui, { className: "h-4 w-4 text-slate-400" }), z = () => {
5495
5495
  f(t), i(t.id), m == null || m(t.id);
5496
5496
  };
5497
5497
  return /* @__PURE__ */ s(
@@ -5559,7 +5559,7 @@ function du({
5559
5559
  variant: "ghost",
5560
5560
  className: "h-6 w-6 p-0 hover:bg-slate-200 dark:hover:bg-slate-700",
5561
5561
  onClick: (S) => S.stopPropagation(),
5562
- children: /* @__PURE__ */ e(Ir, { className: "h-3 w-3" })
5562
+ children: /* @__PURE__ */ e(Or, { className: "h-3 w-3" })
5563
5563
  }
5564
5564
  ) }),
5565
5565
  /* @__PURE__ */ s(_n, { align: "end", className: "z-[51] w-40", children: [
@@ -5571,7 +5571,7 @@ function du({
5571
5571
  },
5572
5572
  disabled: n,
5573
5573
  children: [
5574
- n ? /* @__PURE__ */ e(Ee, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Ar, { className: "mr-2 h-3 w-3" }),
5574
+ n ? /* @__PURE__ */ e(Me, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Ir, { className: "mr-2 h-3 w-3" }),
5575
5575
  n ? "Duplicating..." : "Duplicate"
5576
5576
  ]
5577
5577
  }
@@ -5699,7 +5699,7 @@ function mu(t) {
5699
5699
  startUpdating: W,
5700
5700
  stopUpdating: de,
5701
5701
  isUpdating: pe
5702
- } = Ol(), be = (X, F) => {
5702
+ } = El(), be = (X, F) => {
5703
5703
  const re = F.title !== void 0 ? "title" : "description";
5704
5704
  W(X, re), k(
5705
5705
  {
@@ -5725,7 +5725,7 @@ function mu(t) {
5725
5725
  isPrivate: !F.isPrivate
5726
5726
  }
5727
5727
  });
5728
- }, Te = (X) => {
5728
+ }, Oe = (X) => {
5729
5729
  f(X), oe == null || oe.type, h(!0);
5730
5730
  };
5731
5731
  return zt({
@@ -5733,7 +5733,7 @@ function mu(t) {
5733
5733
  resourceId: (m == null ? void 0 : m.id) || "",
5734
5734
  resourceType: ue.DASHBOARD,
5735
5735
  userType: "tenant"
5736
- }), S ? /* @__PURE__ */ e(El, {}) : C ? /* @__PURE__ */ e(uu, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ s("div", { className: "mt-1 flex h-full flex-1 flex-col gap-3 px-4", children: [
5736
+ }), S ? /* @__PURE__ */ e(Ml, {}) : C ? /* @__PURE__ */ e(uu, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ s("div", { className: "mt-1 flex h-full flex-1 flex-col gap-3 px-4", children: [
5737
5737
  /* @__PURE__ */ e("div", { className: "px-1", children: r ? /* @__PURE__ */ s(Jt, { className: "border-dashed p-4 pb-2", children: [
5738
5738
  /* @__PURE__ */ e(Un, { className: "px-0 pb-3 pt-0", children: /* @__PURE__ */ e($n, { className: "text-sm", children: "New Dashboard" }) }),
5739
5739
  /* @__PURE__ */ s(Wt, { className: "space-y-3 px-0 pb-0", children: [
@@ -5832,14 +5832,14 @@ function mu(t) {
5832
5832
  onDeleteClick: q,
5833
5833
  onDuplicateDashboard: ee,
5834
5834
  onTogglePrivacy: he,
5835
- onShareDashboard: Te,
5835
+ onShareDashboard: Oe,
5836
5836
  formatDate: B,
5837
5837
  onDashboardItemClick: t.onDashboardItemClick
5838
5838
  },
5839
5839
  X.id
5840
5840
  )) }) }),
5841
5841
  u && m && /* @__PURE__ */ e(
5842
- $l,
5842
+ Ul,
5843
5843
  {
5844
5844
  resource: m,
5845
5845
  resourceType: ue.DASHBOARD,
@@ -5854,25 +5854,25 @@ function mu(t) {
5854
5854
  }
5855
5855
  ),
5856
5856
  /* @__PURE__ */ e(
5857
- Fr,
5857
+ Lr,
5858
5858
  {
5859
5859
  open: g,
5860
5860
  onOpenChange: (X) => {
5861
5861
  !X && A || (y(X), X || b(null));
5862
5862
  },
5863
- children: /* @__PURE__ */ s(_r, { children: [
5864
- /* @__PURE__ */ s(Pr, { children: [
5865
- /* @__PURE__ */ e(Vr, { children: "Delete Dashboard" }),
5866
- /* @__PURE__ */ s(jr, { children: [
5863
+ children: /* @__PURE__ */ s(Fr, { children: [
5864
+ /* @__PURE__ */ s(_r, { children: [
5865
+ /* @__PURE__ */ e(Pr, { children: "Delete Dashboard" }),
5866
+ /* @__PURE__ */ s(Vr, { children: [
5867
5867
  'Are you sure you want to delete "',
5868
5868
  p == null ? void 0 : p.title,
5869
5869
  '"? This action cannot be undone.'
5870
5870
  ] })
5871
5871
  ] }),
5872
- /* @__PURE__ */ s(Ur, { children: [
5873
- /* @__PURE__ */ e($r, { disabled: A, children: "Cancel" }),
5872
+ /* @__PURE__ */ s(jr, { children: [
5873
+ /* @__PURE__ */ e(Ur, { disabled: A, children: "Cancel" }),
5874
5874
  /* @__PURE__ */ e(
5875
- Br,
5875
+ $r,
5876
5876
  {
5877
5877
  onClick: (X) => {
5878
5878
  X.preventDefault(), X.stopPropagation(), Z();
@@ -5902,7 +5902,7 @@ function hu({
5902
5902
  } = Da(), o = c, [d, u] = ps(
5903
5903
  "resource-management-active-tab",
5904
5904
  "dashboards"
5905
- ), h = Fl(a, {
5905
+ ), h = Ll(a, {
5906
5906
  enabled: t
5907
5907
  }), m = (g) => {
5908
5908
  }, f = (g) => {
@@ -5986,7 +5986,7 @@ function hu({
5986
5986
  ) });
5987
5987
  }
5988
5988
  function pu() {
5989
- const { authToken: t, tokenProps: a } = Oe();
5989
+ const { authToken: t, tokenProps: a } = Ee();
5990
5990
  Y((O) => O.theme);
5991
5991
  const n = Y((O) => O.lenses), r = Y((O) => O.selectedLensId), l = n == null ? void 0 : n.find((O) => O.id === r), i = Y((O) => O.dashboard);
5992
5992
  Y((O) => O.selectedSheetId);
@@ -6005,7 +6005,7 @@ function pu() {
6005
6005
  ), { addFrame: N, setSelectedFrameId: w } = Y(
6006
6006
  (O) => O.actions
6007
6007
  ), { getSelectedSheet: z, setIsDashboardEditing: M, setShowDashboardJSON: S } = Y((O) => O.actions), C = z(), { tenantId: T, endUserId: k } = Be(
6008
- () => Or(t == null ? void 0 : t.accessToken),
6008
+ () => Er(t == null ? void 0 : t.accessToken),
6009
6009
  [t == null ? void 0 : t.accessToken]
6010
6010
  ), R = Be(() => T || k, [T, k]), D = () => {
6011
6011
  if (!c || !C) return;
@@ -6038,7 +6038,7 @@ function pu() {
6038
6038
  };
6039
6039
  async function A() {
6040
6040
  if (h(!0), !r || !l) return;
6041
- const O = Tl(
6041
+ const O = Dl(
6042
6042
  i
6043
6043
  ), _ = JSON.stringify(O), j = {
6044
6044
  ...l,
@@ -6095,7 +6095,7 @@ function pu() {
6095
6095
  className: "h-7 p-2",
6096
6096
  onClick: L,
6097
6097
  size: "sm",
6098
- children: /* @__PURE__ */ e(qr, { className: "h-4 w-4" })
6098
+ children: /* @__PURE__ */ e(Br, { className: "h-4 w-4" })
6099
6099
  }
6100
6100
  ),
6101
6101
  c && !y && /* @__PURE__ */ e(
@@ -6116,7 +6116,7 @@ function pu() {
6116
6116
  disabled: u,
6117
6117
  onClick: A,
6118
6118
  size: "sm",
6119
- children: /* @__PURE__ */ e(Cl, { className: "h-4 w-4" })
6119
+ children: /* @__PURE__ */ e(Nl, { className: "h-4 w-4" })
6120
6120
  }
6121
6121
  ),
6122
6122
  !p && !y && c && /* @__PURE__ */ e(
@@ -6193,7 +6193,7 @@ function fu({
6193
6193
  /* @__PURE__ */ s("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
6194
6194
  /* @__PURE__ */ e(Gn, { className: "h-9", placeholder: "Search..." }),
6195
6195
  /* @__PURE__ */ e(le, { className: "h-7", onClick: c, children: /* @__PURE__ */ e(
6196
- Nl,
6196
+ bl,
6197
6197
  {
6198
6198
  className: G(
6199
6199
  "size-3.5 opacity-50",
@@ -6283,7 +6283,7 @@ function xn({
6283
6283
  r ? /* @__PURE__ */ e(Vt, { children: "Loading..." }) : /* @__PURE__ */ s(Vt, { className: "flex items-center justify-between gap-2", children: [
6284
6284
  t,
6285
6285
  /* @__PURE__ */ e(
6286
- Nl,
6286
+ bl,
6287
6287
  {
6288
6288
  className: G(
6289
6289
  "mr-1 size-3 cursor-pointer text-muted-foreground hover:text-foreground",
@@ -6330,11 +6330,11 @@ function gu({ column: t }) {
6330
6330
  ), o = E((p) => p.sqlGen), { modelItems: d, connectionType: u } = ot(), h = E((p) => p.actions.setSqlGen), m = E((p) => p.actions.setCardSql), f = E((p) => p.actions.setRunSql);
6331
6331
  function g(p, b) {
6332
6332
  var z;
6333
- const v = Hr(p, o, b), N = (z = d == null ? void 0 : d.find(
6333
+ const v = Gr(p, o, b), N = (z = d == null ? void 0 : d.find(
6334
6334
  (M) => M.id === c
6335
6335
  )) == null ? void 0 : z.name;
6336
6336
  h(v);
6337
- const w = Kr(
6337
+ const w = Hr(
6338
6338
  v,
6339
6339
  et(l || ""),
6340
6340
  et(r),
@@ -6389,7 +6389,7 @@ function gu({ column: t }) {
6389
6389
  ] });
6390
6390
  }
6391
6391
  return /* @__PURE__ */ s(is, { openDelay: 0, open: a, onOpenChange: n, children: [
6392
- /* @__PURE__ */ e(os, { asChild: !0, children: /* @__PURE__ */ e(Gr, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
6392
+ /* @__PURE__ */ e(os, { asChild: !0, children: /* @__PURE__ */ e(qr, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
6393
6393
  /* @__PURE__ */ e(
6394
6394
  cs,
6395
6395
  {
@@ -6402,7 +6402,7 @@ function gu({ column: t }) {
6402
6402
  }
6403
6403
  function As({ column: t }) {
6404
6404
  return /* @__PURE__ */ s(Ue, { children: [
6405
- /* @__PURE__ */ e(Gi, { className: "shrink-0", asChild: !0, children: ut(t.data_type) ? /* @__PURE__ */ e(Hi, { className: "size-3 text-muted-foreground" }) : Ht(t.data_type) ? /* @__PURE__ */ e(Ts, { className: "size-3 text-muted-foreground" }) : mt(t.data_type) ? /* @__PURE__ */ e(ha, { className: "size-3 text-muted-foreground" }) : Ki(t.data_type) ? /* @__PURE__ */ e(kl, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(Tc, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Ji, { className: "size-3 text-muted-foreground" }) }),
6405
+ /* @__PURE__ */ e(Gi, { className: "shrink-0", asChild: !0, children: ut(t.data_type) ? /* @__PURE__ */ e(Hi, { className: "size-3 text-muted-foreground" }) : Ht(t.data_type) ? /* @__PURE__ */ e(Ts, { className: "size-3 text-muted-foreground" }) : mt(t.data_type) ? /* @__PURE__ */ e(ha, { className: "size-3 text-muted-foreground" }) : Ki(t.data_type) ? /* @__PURE__ */ e(Sl, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(Tc, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Ji, { className: "size-3 text-muted-foreground" }) }),
6406
6406
  /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
6407
6407
  ] });
6408
6408
  }
@@ -6489,7 +6489,7 @@ function vu({
6489
6489
  }
6490
6490
  ),
6491
6491
  children: [
6492
- n === a.column_name && /* @__PURE__ */ e(Jr, { children: /* @__PURE__ */ e(
6492
+ n === a.column_name && /* @__PURE__ */ e(Kr, { children: /* @__PURE__ */ e(
6493
6493
  Ra,
6494
6494
  {
6495
6495
  column: a,
@@ -6520,7 +6520,7 @@ const za = {
6520
6520
  id: "__placeholder__",
6521
6521
  role: "filter",
6522
6522
  type: "string"
6523
- }, Jl = {
6523
+ }, Kl = {
6524
6524
  id: "__placeholder__"
6525
6525
  }, $t = "droppable-group-by", Bt = "droppable-metrics", qt = "droppable-pivot-by", oa = "sortable-group-by", Wa = "sortable-metrics", ca = "sortable-pivot-by", Ya = "droppable-filters", Qa = "sortable-filters", Rs = "sortable-order-by";
6526
6526
  function xu() {
@@ -6562,7 +6562,7 @@ function xu() {
6562
6562
  setFilterColumns: y,
6563
6563
  setOrderByColumns: p,
6564
6564
  setPivotByColumns: b
6565
- } = se(), { columns: v } = Wr(), { formattedTableName: N } = ot(), w = Sn(
6565
+ } = se(), { columns: v } = Jr(), { formattedTableName: N } = ot(), w = Sn(
6566
6566
  kt(Qi, {
6567
6567
  activationConstraint: {
6568
6568
  distance: 1
@@ -6878,11 +6878,11 @@ function bu({
6878
6878
  function T(x) {
6879
6879
  var O;
6880
6880
  if (i) {
6881
- const _ = Hr(x, l);
6881
+ const _ = Gr(x, l);
6882
6882
  w(_);
6883
6883
  const j = (O = S == null ? void 0 : S.find(
6884
6884
  (U) => U.id === m
6885
- )) == null ? void 0 : O.name, $ = Kr(
6885
+ )) == null ? void 0 : O.name, $ = Hr(
6886
6886
  _,
6887
6887
  et(t),
6888
6888
  et(a),
@@ -6969,7 +6969,7 @@ function bu({
6969
6969
  }));
6970
6970
  }
6971
6971
  function R() {
6972
- const x = er({
6972
+ const x = Xs({
6973
6973
  schemaName: t,
6974
6974
  tableName: a,
6975
6975
  modelName: C,
@@ -6981,7 +6981,7 @@ function bu({
6981
6981
  v(O), N(!0);
6982
6982
  }
6983
6983
  function D() {
6984
- const x = er({
6984
+ const x = Xs({
6985
6985
  schemaName: t,
6986
6986
  tableName: a,
6987
6987
  modelName: C,
@@ -7021,7 +7021,7 @@ function bu({
7021
7021
  function I() {
7022
7022
  return /* @__PURE__ */ s(ne, { children: [
7023
7023
  /* @__PURE__ */ s(
7024
- Yr,
7024
+ Wr,
7025
7025
  {
7026
7026
  title: `${L() ? "Remove from" : "Add to"} Assistant Scope`,
7027
7027
  pressed: L(),
@@ -7053,7 +7053,7 @@ function bu({
7053
7053
  variant: "secondary",
7054
7054
  className: "flex",
7055
7055
  children: [
7056
- r !== "Success" ? /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Yc, { className: "mr-2 size-4" }),
7056
+ r !== "Success" ? /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Yc, { className: "mr-2 size-4" }),
7057
7057
  "Top 10"
7058
7058
  ]
7059
7059
  }
@@ -7067,7 +7067,7 @@ function bu({
7067
7067
  variant: "secondary",
7068
7068
  className: "w-full",
7069
7069
  children: [
7070
- r !== "Success" ? /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(wl, { className: "mr-2 size-4" }),
7070
+ r !== "Success" ? /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Cl, { className: "mr-2 size-4" }),
7071
7071
  "Count"
7072
7072
  ]
7073
7073
  }
@@ -7103,7 +7103,7 @@ function bu({
7103
7103
  )
7104
7104
  ] });
7105
7105
  }
7106
- function Wl({
7106
+ function Jl({
7107
7107
  ColumnsComponent: t,
7108
7108
  type: a
7109
7109
  }) {
@@ -7165,7 +7165,7 @@ function Wl({
7165
7165
  function he() {
7166
7166
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
7167
7167
  }
7168
- function Te(fe) {
7168
+ function Oe(fe) {
7169
7169
  fe === !0 ? de && (f(de.userSql), setTimeout(() => {
7170
7170
  pe();
7171
7171
  }, 100)) : f(""), m(fe);
@@ -7289,7 +7289,7 @@ function Wl({
7289
7289
  {
7290
7290
  className: "data-[state=checked]:bg-muted-foreground/80",
7291
7291
  checked: u,
7292
- onCheckedChange: Te,
7292
+ onCheckedChange: Oe,
7293
7293
  id: "dev-mode"
7294
7294
  }
7295
7295
  ),
@@ -7313,7 +7313,7 @@ function Wl({
7313
7313
  }
7314
7314
  );
7315
7315
  }
7316
- function Yl({
7316
+ function Wl({
7317
7317
  error: t,
7318
7318
  className: a = "",
7319
7319
  textClassName: n = "",
@@ -7345,7 +7345,7 @@ function Yl({
7345
7345
  className: `relative rounded-md border border-red-200 bg-red-50 p-3 dark:border-red-800 dark:bg-red-950/20 ${a}`,
7346
7346
  children: [
7347
7347
  /* @__PURE__ */ e("div", { className: "float-right mb-2 ml-2", children: /* @__PURE__ */ e(
7348
- Qr,
7348
+ Yr,
7349
7349
  {
7350
7350
  text: t,
7351
7351
  className: `h-6 w-6 p-0 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ${r}`
@@ -7372,7 +7372,7 @@ function Yl({
7372
7372
  }
7373
7373
  );
7374
7374
  }
7375
- function Ql({
7375
+ function Yl({
7376
7376
  sql: t,
7377
7377
  error: a,
7378
7378
  onDebugWithAssistant: n
@@ -7385,7 +7385,7 @@ function Ql({
7385
7385
  }
7386
7386
  return /* @__PURE__ */ e("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ s("div", { className: "flex grow flex-col space-y-2", children: [
7387
7387
  /* @__PURE__ */ s(rt, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
7388
- a && /* @__PURE__ */ e(Yl, { error: a }),
7388
+ a && /* @__PURE__ */ e(Wl, { error: a }),
7389
7389
  t && /* @__PURE__ */ e("div", { className: "flex flex-col space-y-1.5", children: /* @__PURE__ */ e("div", { className: "rounded-md", children: /* @__PURE__ */ e(Zi, { code: t, language: "sql" }) }) })
7390
7390
  ] }),
7391
7391
  !r && t && /* @__PURE__ */ s(V, { onClick: o, variant: "secondary", size: "sm", children: [
@@ -7406,15 +7406,15 @@ function Ql({
7406
7406
  )
7407
7407
  ] }) });
7408
7408
  }
7409
- function Zl({
7409
+ function Ql({
7410
7410
  sql: t,
7411
7411
  error: a,
7412
7412
  onDebugWithAssistant: n
7413
7413
  }) {
7414
7414
  return /* @__PURE__ */ s(is, { openDelay: a ? 0 : 500, children: [
7415
- /* @__PURE__ */ e(os, { asChild: !0, children: /* @__PURE__ */ e(V, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(vl, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(jn, { className: "h-4 w-4 text-muted-foreground" }) }) }),
7415
+ /* @__PURE__ */ e(os, { asChild: !0, children: /* @__PURE__ */ e(V, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(yl, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(jn, { className: "h-4 w-4 text-muted-foreground" }) }) }),
7416
7416
  /* @__PURE__ */ e(cs, { align: "start", className: "flex w-[600px]", children: /* @__PURE__ */ e(
7417
- Ql,
7417
+ Yl,
7418
7418
  {
7419
7419
  sql: t,
7420
7420
  error: a,
@@ -7423,13 +7423,13 @@ function Zl({
7423
7423
  ) })
7424
7424
  ] });
7425
7425
  }
7426
- var Xl = {
7426
+ var Zl = {
7427
7427
  color: void 0,
7428
7428
  size: void 0,
7429
7429
  className: void 0,
7430
7430
  style: void 0,
7431
7431
  attr: void 0
7432
- }, gr = Ie.createContext && /* @__PURE__ */ Ie.createContext(Xl), Nu = ["attr", "size", "title"];
7432
+ }, fr = Ie.createContext && /* @__PURE__ */ Ie.createContext(Zl), Nu = ["attr", "size", "title"];
7433
7433
  function Cu(t, a) {
7434
7434
  if (t == null) return {};
7435
7435
  var n = wu(t, a), r, l;
@@ -7460,7 +7460,7 @@ function da() {
7460
7460
  return t;
7461
7461
  }, da.apply(this, arguments);
7462
7462
  }
7463
- function yr(t, a) {
7463
+ function gr(t, a) {
7464
7464
  var n = Object.keys(t);
7465
7465
  if (Object.getOwnPropertySymbols) {
7466
7466
  var r = Object.getOwnPropertySymbols(t);
@@ -7473,9 +7473,9 @@ function yr(t, a) {
7473
7473
  function ua(t) {
7474
7474
  for (var a = 1; a < arguments.length; a++) {
7475
7475
  var n = arguments[a] != null ? arguments[a] : {};
7476
- a % 2 ? yr(Object(n), !0).forEach(function(r) {
7476
+ a % 2 ? gr(Object(n), !0).forEach(function(r) {
7477
7477
  Su(t, r, n[r]);
7478
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : yr(Object(n)).forEach(function(r) {
7478
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : gr(Object(n)).forEach(function(r) {
7479
7479
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
7480
7480
  });
7481
7481
  }
@@ -7498,15 +7498,15 @@ function Du(t, a) {
7498
7498
  }
7499
7499
  return (a === "string" ? String : Number)(t);
7500
7500
  }
7501
- function ei(t) {
7501
+ function Xl(t) {
7502
7502
  return t && t.map((a, n) => /* @__PURE__ */ Ie.createElement(a.tag, ua({
7503
7503
  key: n
7504
- }, a.attr), ei(a.child)));
7504
+ }, a.attr), Xl(a.child)));
7505
7505
  }
7506
7506
  function Xt(t) {
7507
7507
  return (a) => /* @__PURE__ */ Ie.createElement(Tu, da({
7508
7508
  attr: ua({}, t.attr)
7509
- }, a), ei(t.child));
7509
+ }, a), Xl(t.child));
7510
7510
  }
7511
7511
  function Tu(t) {
7512
7512
  var a = (n) => {
@@ -7529,17 +7529,17 @@ function Tu(t) {
7529
7529
  xmlns: "http://www.w3.org/2000/svg"
7530
7530
  }), i && /* @__PURE__ */ Ie.createElement("title", null, i), t.children);
7531
7531
  };
7532
- return gr !== void 0 ? /* @__PURE__ */ Ie.createElement(gr.Consumer, null, (n) => a(n)) : a(Xl);
7532
+ return fr !== void 0 ? /* @__PURE__ */ Ie.createElement(fr.Consumer, null, (n) => a(n)) : a(Zl);
7533
7533
  }
7534
7534
  function Mu(t) {
7535
7535
  return Xt({ 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: [] }] })(t);
7536
7536
  }
7537
- function ti(t) {
7537
+ function ei(t) {
7538
7538
  const { theme: a } = Xi(), n = Y((p) => p.theme), r = E((p) => p.frame), l = E((p) => p.card), i = E((p) => p.activeTabCardId), c = eo(), { refetch: o } = Le(l), { updateCardTab: d, setRunSql: u } = se(), h = nt(), m = nt({}), f = r.cards.find((p) => p.id === i), g = me(() => {
7539
7539
  let p = "";
7540
- return t === "python" && (p = (f == null ? void 0 : f.python) || Zr), t === "sql" && (p = (f == null ? void 0 : f.sql) || ""), p;
7540
+ return t === "python" && (p = (f == null ? void 0 : f.python) || Qr), t === "sql" && (p = (f == null ? void 0 : f.sql) || ""), p;
7541
7541
  }, [t, f]);
7542
- Me(() => {
7542
+ Te(() => {
7543
7543
  if (i && l.id && l.id !== i) {
7544
7544
  if (h.current && c) {
7545
7545
  const p = h.current.getModel();
@@ -7561,7 +7561,7 @@ function ti(t) {
7561
7561
  u,
7562
7562
  t,
7563
7563
  g
7564
- ]), Me(() => {
7564
+ ]), Te(() => {
7565
7565
  if (!c) return;
7566
7566
  const p = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", b = n === "system" ? p : n;
7567
7567
  c.editor.defineTheme("default", {
@@ -7577,7 +7577,7 @@ function ti(t) {
7577
7577
  // : getCssVariableValue('--semaphor-background'),
7578
7578
  }
7579
7579
  }), c.editor.setTheme("default");
7580
- }, [a, n, c]), Me(() => {
7580
+ }, [a, n, c]), Te(() => {
7581
7581
  const p = h.current;
7582
7582
  p && c && l && p.addCommand(
7583
7583
  c.KeyMod.Shift | c.KeyCode.Enter,
@@ -7596,7 +7596,7 @@ function ti(t) {
7596
7596
  return { handleEditorDidMount: y };
7597
7597
  }
7598
7598
  function Eu() {
7599
- const t = E((c) => c.card.sql), a = E((c) => c.sqlGen), { setCardSql: n, setSqlGen: r } = se(), { handleEditorDidMount: l } = ti("sql");
7599
+ const t = E((c) => c.card.sql), a = E((c) => c.sqlGen), { setCardSql: n, setSqlGen: r } = se(), { handleEditorDidMount: l } = ei("sql");
7600
7600
  function i(c) {
7601
7601
  n(c), no(a) || r({});
7602
7602
  }
@@ -7628,7 +7628,7 @@ function Eu() {
7628
7628
  ] });
7629
7629
  }
7630
7630
  function Ou() {
7631
- const t = E((l) => l.card.python), { setCardPython: a } = se(), { handleEditorDidMount: n } = ti("python");
7631
+ const t = E((l) => l.card.python), { setCardPython: a } = se(), { handleEditorDidMount: n } = ei("python");
7632
7632
  function r(l) {
7633
7633
  a(l);
7634
7634
  }
@@ -7638,7 +7638,7 @@ function Ou() {
7638
7638
  className: "pt-3",
7639
7639
  theme: "default",
7640
7640
  onChange: r,
7641
- value: t || Zr,
7641
+ value: t || Qr,
7642
7642
  options: {
7643
7643
  minimap: {
7644
7644
  enabled: !1
@@ -7700,7 +7700,7 @@ function zs({
7700
7700
  function g() {
7701
7701
  var z;
7702
7702
  let p = m;
7703
- m && !m.includes("{{") && (p = Gl(m), a(p));
7703
+ m && !m.includes("{{") && (p = ql(m), a(p));
7704
7704
  const b = (z = l == null ? void 0 : l.getState()) == null ? void 0 : z.settings, v = {
7705
7705
  ...r,
7706
7706
  dataSource: r.dataSource || { mode: "directSource" },
@@ -7725,7 +7725,7 @@ function zs({
7725
7725
  ), w = {
7726
7726
  ...n,
7727
7727
  cards: N,
7728
- activeCardId: Hl(N, n.activeCardId)
7728
+ activeCardId: Gl(N, n.activeCardId)
7729
7729
  };
7730
7730
  f == null || f(w);
7731
7731
  }
@@ -7746,7 +7746,7 @@ function zs({
7746
7746
  function Au() {
7747
7747
  const t = He(), [a, n] = P(!1), r = Y(
7748
7748
  (u) => u.actions.setIsDashboardPanelOpen
7749
- ), { setIsVisualEditing: l } = yt(), { getUpdatedFrame: i } = Kl(), c = Lr(), o = Bd();
7749
+ ), { setIsVisualEditing: l } = yt(), { getUpdatedFrame: i } = Hl(), c = zr(), o = Bd();
7750
7750
  return /* @__PURE__ */ s(V, { onClick: () => {
7751
7751
  const u = i();
7752
7752
  if (!(c != null && c.id)) {
@@ -7774,11 +7774,11 @@ function Au() {
7774
7774
  );
7775
7775
  }, className: "h-8", size: "sm", children: [
7776
7776
  a && /* @__PURE__ */ s(ne, { children: [
7777
- /* @__PURE__ */ e(Ee, { className: "mr-2 size-4 animate-spin font-bold" }),
7777
+ /* @__PURE__ */ e(Me, { className: "mr-2 size-4 animate-spin font-bold" }),
7778
7778
  " Saving"
7779
7779
  ] }),
7780
7780
  !a && /* @__PURE__ */ s(ne, { children: [
7781
- /* @__PURE__ */ e(Cl, { className: "mr-2 size-4 font-bold" }),
7781
+ /* @__PURE__ */ e(Nl, { className: "mr-2 size-4 font-bold" }),
7782
7782
  "Save"
7783
7783
  ] })
7784
7784
  ] });
@@ -7887,7 +7887,7 @@ function Ru() {
7887
7887
  refetch: I,
7888
7888
  errorMessage: x
7889
7889
  } = Le(i);
7890
- Me(() => {
7890
+ Te(() => {
7891
7891
  if (C && (C.rowLimitExceeded && De.error("Row limit (10,000) exceeded. Refine your query.", {
7892
7892
  position: "top-center",
7893
7893
  richColors: !0
@@ -7895,7 +7895,7 @@ function Ru() {
7895
7895
  const { dimensionKeys: U } = Ba(C.records);
7896
7896
  m(U);
7897
7897
  }
7898
- }, [C, m, y]), Me(() => {
7898
+ }, [C, m, y]), Te(() => {
7899
7899
  (T || k) && S(!0), (D || R) && S(!1), D && (m([]), y(""));
7900
7900
  }, [
7901
7901
  T,
@@ -7908,7 +7908,7 @@ function Ru() {
7908
7908
  m,
7909
7909
  // setQueryError,
7910
7910
  L
7911
- ]), Me(() => {
7911
+ ]), Te(() => {
7912
7912
  z && (t.getQueryData(A) || I(), M(!1));
7913
7913
  }, [z, I, M, A, t]);
7914
7914
  async function O() {
@@ -8027,13 +8027,13 @@ ${d}` : ""}
8027
8027
  className: "h-8 shrink-0",
8028
8028
  size: "sm",
8029
8029
  children: [
8030
- T || k ? /* @__PURE__ */ e(Ee, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(so, { className: "mr-2 h-4 w-4" }),
8030
+ T || k ? /* @__PURE__ */ e(Me, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(so, { className: "mr-2 h-4 w-4" }),
8031
8031
  "Run"
8032
8032
  ]
8033
8033
  }
8034
8034
  ),
8035
8035
  /* @__PURE__ */ e(
8036
- Zl,
8036
+ Ql,
8037
8037
  {
8038
8038
  sql: C == null ? void 0 : C.sql,
8039
8039
  error: x,
@@ -8042,7 +8042,7 @@ ${d}` : ""}
8042
8042
  ),
8043
8043
  /* @__PURE__ */ e(Ta, {}),
8044
8044
  /* @__PURE__ */ e(
8045
- Yr,
8045
+ Wr,
8046
8046
  {
8047
8047
  pressed: a,
8048
8048
  onPressedChange: (U) => n(U),
@@ -8126,7 +8126,7 @@ function zu({ data: t }) {
8126
8126
  co,
8127
8127
  {
8128
8128
  className: "h-11 font-semibold text-foreground",
8129
- children: d.isPlaceholder ? null : tr(
8129
+ children: d.isPlaceholder ? null : er(
8130
8130
  d.column.columnDef.header,
8131
8131
  d.getContext()
8132
8132
  )
@@ -8138,10 +8138,10 @@ function zu({ data: t }) {
8138
8138
  {
8139
8139
  className: "h-11 whitespace-nowrap py-2",
8140
8140
  "data-state": o.getIsSelected() && "selected",
8141
- children: o.getVisibleCells().map((d) => /* @__PURE__ */ e(nr, { className: "py-2", children: tr(d.column.columnDef.cell, d.getContext()) }, d.id))
8141
+ children: o.getVisibleCells().map((d) => /* @__PURE__ */ e(tr, { className: "py-2", children: er(d.column.columnDef.cell, d.getContext()) }, d.id))
8142
8142
  },
8143
8143
  o.id
8144
- )) : /* @__PURE__ */ e(Ia, { children: /* @__PURE__ */ e(nr, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
8144
+ )) : /* @__PURE__ */ e(Ia, { children: /* @__PURE__ */ e(tr, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
8145
8145
  ] }),
8146
8146
  /* @__PURE__ */ e(ft, { orientation: "horizontal" })
8147
8147
  ] });
@@ -8150,7 +8150,7 @@ function Lu({ card: t }) {
8150
8150
  var N, w, z, M, S, C, T, k, R, D, L;
8151
8151
  const [a, n] = P(!1), [r, l] = P(
8152
8152
  []
8153
- ), { authToken: i } = Oe(), c = fo(i == null ? void 0 : i.accessToken), o = Y((A) => A.themeStyle), d = {
8153
+ ), { authToken: i } = Ee(), c = fo(i == null ? void 0 : i.accessToken), o = Y((A) => A.themeStyle), d = {
8154
8154
  colors: ((w = (N = o == null ? void 0 : o.chart) == null ? void 0 : N.dataset) == null ? void 0 : w.backgroundColor) || []
8155
8155
  };
8156
8156
  (z = t.customCardPreferences) != null && z.inputData;
@@ -8176,7 +8176,7 @@ function Lu({ card: t }) {
8176
8176
  return x || null;
8177
8177
  });
8178
8178
  return /* @__PURE__ */ e("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ s(
8179
- fl,
8179
+ pl,
8180
8180
  {
8181
8181
  fallback: /* @__PURE__ */ e(ne, {}),
8182
8182
  children: [
@@ -8231,16 +8231,16 @@ function Lu({ card: t }) {
8231
8231
  (L = t.customCardPreferences) == null ? void 0 : L.componentName
8232
8232
  ) });
8233
8233
  }
8234
- function ni({
8234
+ function ti({
8235
8235
  // card,
8236
8236
  // showCard,
8237
8237
  className: t,
8238
8238
  ...a
8239
8239
  }) {
8240
8240
  var N;
8241
- const n = E((w) => w.card), r = Xr(n), l = ((N = n.customCardPreferences) == null ? void 0 : N.showCardHeader) ?? !0, i = E((w) => w.frame), c = Y((w) => w.dashboard.filters);
8241
+ const n = E((w) => w.card), r = Zr(n), l = ((N = n.customCardPreferences) == null ? void 0 : N.showCardHeader) ?? !0, i = E((w) => w.frame), c = Y((w) => w.dashboard.filters);
8242
8242
  E((w) => w.actions.setRunSql);
8243
- const { updateFilter: o } = yt(), d = c == null ? void 0 : c.find((w) => w.id === i.filterId), { data: u, isLoading: h, isFetching: m, errorMessage: f } = Le(n), { setCard: g } = se(), { data: y } = vs(n), p = Be(() => !n.id || !(u != null && u.records) ? null : el({
8243
+ const { updateFilter: o } = yt(), d = c == null ? void 0 : c.find((w) => w.id === i.filterId), { data: u, isLoading: h, isFetching: m, errorMessage: f } = Le(n), { setCard: g } = se(), { data: y } = vs(n), p = Be(() => !n.id || !(u != null && u.records) ? null : Xr({
8244
8244
  card: n,
8245
8245
  data: u == null ? void 0 : u.records,
8246
8246
  cardType: n.type,
@@ -8281,7 +8281,7 @@ function ni({
8281
8281
  }
8282
8282
  ) });
8283
8283
  if (n.type === "table" && (u != null && u.records) && (u == null ? void 0 : u.records.length) > 0)
8284
- return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(nl, { card: n, data: u == null ? void 0 : u.records }) });
8284
+ return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(tl, { card: n, data: u == null ? void 0 : u.records }) });
8285
8285
  }
8286
8286
  return /* @__PURE__ */ s(
8287
8287
  Jt,
@@ -8308,7 +8308,7 @@ function ni({
8308
8308
  enabled: !0,
8309
8309
  text: n.description || "",
8310
8310
  onSave: (w) => g({ ...n, description: w }),
8311
- children: /* @__PURE__ */ e(Rr, { children: n.description || "Add description" })
8311
+ children: /* @__PURE__ */ e(Ar, { children: n.description || "Add description" })
8312
8312
  },
8313
8313
  n.description
8314
8314
  )
@@ -8324,7 +8324,7 @@ function ni({
8324
8324
  children: /* @__PURE__ */ e(Q, { children: d.title })
8325
8325
  }
8326
8326
  ),
8327
- /* @__PURE__ */ e(tl, { filter: d })
8327
+ /* @__PURE__ */ e(el, { filter: d })
8328
8328
  ] })
8329
8329
  ] }),
8330
8330
  /* @__PURE__ */ e(Wt, { className: "flex grow flex-col", children: v() })
@@ -8464,7 +8464,7 @@ function Vu() {
8464
8464
  }, N = () => {
8465
8465
  var S, C;
8466
8466
  if (!((S = g == null ? void 0 : g.records) != null && S.length)) return;
8467
- const M = el({
8467
+ const M = Xr({
8468
8468
  card: h,
8469
8469
  data: g.records,
8470
8470
  cardType: h.type,
@@ -8494,19 +8494,19 @@ function Vu() {
8494
8494
  }
8495
8495
  }, z = Object.keys(m || {}).length === 0;
8496
8496
  return /* @__PURE__ */ s(On, { open: t, onOpenChange: a, children: [
8497
- /* @__PURE__ */ e(Dr, { asChild: !0, children: /* @__PURE__ */ e(
8497
+ /* @__PURE__ */ e(kr, { asChild: !0, children: /* @__PURE__ */ e(
8498
8498
  le,
8499
8499
  {
8500
8500
  tooltip: "Customize Visual",
8501
8501
  onClick: N,
8502
8502
  className: z ? "" : "text-green-600 hover:text-green-700",
8503
- children: /* @__PURE__ */ e(al, { className: "h-4 w-4" })
8503
+ children: /* @__PURE__ */ e(nl, { className: "h-4 w-4" })
8504
8504
  }
8505
8505
  ) }),
8506
8506
  /* @__PURE__ */ s(In, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
8507
8507
  /* @__PURE__ */ e(Fu, {}),
8508
8508
  /* @__PURE__ */ s("div", { className: "flex grow gap-2", children: [
8509
- /* @__PURE__ */ e(ya, { FallbackComponent: sl, children: /* @__PURE__ */ e(ni, { className: "w-1/2 rounded shadow-none" }) }),
8509
+ /* @__PURE__ */ e(ya, { FallbackComponent: al, children: /* @__PURE__ */ e(ti, { className: "w-1/2 rounded shadow-none" }) }),
8510
8510
  /* @__PURE__ */ e(
8511
8511
  _u,
8512
8512
  {
@@ -8538,7 +8538,7 @@ function Ma(t) {
8538
8538
  return a;
8539
8539
  }
8540
8540
  function Fs() {
8541
- const { authToken: t } = Oe(), { data: a, isLoading: n, isFetching: r, isError: l } = vt({
8541
+ const { authToken: t } = Ee(), { data: a, isLoading: n, isFetching: r, isError: l } = vt({
8542
8542
  queryKey: ["plugins", t == null ? void 0 : t.accessToken],
8543
8543
  queryFn: () => Co(t == null ? void 0 : t.accessToken)
8544
8544
  // staleTime: Infinity,
@@ -8563,12 +8563,12 @@ function ju({
8563
8563
  icon: h.icon
8564
8564
  }), t == null || t();
8565
8565
  }
8566
- return Me(() => {
8566
+ return Te(() => {
8567
8567
  (async () => {
8568
8568
  var h;
8569
8569
  if (o) {
8570
8570
  const f = (await Promise.all(
8571
- (h = o == null ? void 0 : o.plugins) == null ? void 0 : h.map(async (g) => (await rl(g.value)).visuals.map((b) => ({
8571
+ (h = o == null ? void 0 : o.plugins) == null ? void 0 : h.map(async (g) => (await sl(g.value)).visuals.map((b) => ({
8572
8572
  name: b.name,
8573
8573
  icon: b.icon,
8574
8574
  url: g.value
@@ -8616,7 +8616,7 @@ function js(t) {
8616
8616
  function Us(t) {
8617
8617
  return Xt({ 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: [] }] })(t);
8618
8618
  }
8619
- function ai({
8619
+ function ni({
8620
8620
  onChartTypeChange: t,
8621
8621
  iconClassName: a
8622
8622
  }) {
@@ -8790,7 +8790,7 @@ function ai({
8790
8790
  tooltip: "Text",
8791
8791
  onClick: () => d("text"),
8792
8792
  className: "h-10 p-4",
8793
- children: /* @__PURE__ */ e(gl, { className: G("size-5", a) })
8793
+ children: /* @__PURE__ */ e(fl, { className: G("size-5", a) })
8794
8794
  }
8795
8795
  ),
8796
8796
  /* @__PURE__ */ e(
@@ -8852,7 +8852,7 @@ function Bu({
8852
8852
  case "kpi":
8853
8853
  return /* @__PURE__ */ e(Us, { className: a });
8854
8854
  case "text":
8855
- return /* @__PURE__ */ e(Dl, { className: a });
8855
+ return /* @__PURE__ */ e(kl, { className: a });
8856
8856
  case "map":
8857
8857
  return /* @__PURE__ */ e(Ms, { className: a });
8858
8858
  case "custom":
@@ -8861,7 +8861,7 @@ function Bu({
8861
8861
  return /* @__PURE__ */ e(ka, { className: a });
8862
8862
  }
8863
8863
  }
8864
- function si({
8864
+ function ai({
8865
8865
  variant: t = "ghost"
8866
8866
  }) {
8867
8867
  var i, c;
@@ -8890,7 +8890,7 @@ function si({
8890
8890
  className: "w-72 p-1",
8891
8891
  children: [
8892
8892
  /* @__PURE__ */ e(
8893
- ai,
8893
+ ni,
8894
8894
  {
8895
8895
  onChartTypeChange: () => n(!1)
8896
8896
  }
@@ -8902,9 +8902,9 @@ function si({
8902
8902
  ] });
8903
8903
  }
8904
8904
  const Wn = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
8905
- function vr(t, a) {
8905
+ function yr(t, a) {
8906
8906
  var r, l, i;
8907
- const n = ll(t, {});
8907
+ const n = rl(t, {});
8908
8908
  return ["pie", "doughnut", "polarArea", "funnel"].includes(a) ? "category" : ((i = (l = (r = t == null ? void 0 : t.chartOptions) == null ? void 0 : r.scales) == null ? void 0 : l[n]) == null ? void 0 : i.type) || "linear";
8909
8909
  }
8910
8910
  function qu() {
@@ -8915,8 +8915,8 @@ function qu() {
8915
8915
  }), r = E((ae) => {
8916
8916
  var B;
8917
8917
  return (B = ae.card) == null ? void 0 : B.type;
8918
- }), l = ll(n, {}), [i, c] = P(
8919
- vr(n, r)
8918
+ }), l = rl(n, {}), [i, c] = P(
8919
+ yr(n, r)
8920
8920
  ), [o, d] = P(
8921
8921
  ((j = (_ = (O = n == null ? void 0 : n.chartOptions) == null ? void 0 : O.scales) == null ? void 0 : _[l]) == null ? void 0 : j.min) || ""
8922
8922
  ), [u, h] = P(
@@ -8926,20 +8926,20 @@ function qu() {
8926
8926
  ), { updateCardInFrame: T } = se(), k = E((ae) => ae.card), R = ["pie", "doughnut", "polarArea", "funnel"].includes(
8927
8927
  r
8928
8928
  );
8929
- Me(() => {
8930
- var ae, B, K, J, q, Z, ee, W, de, pe, be, he, Te, X;
8931
- c(vr(n, r)), d(
8929
+ Te(() => {
8930
+ var ae, B, K, J, q, Z, ee, W, de, pe, be, he, Oe, X;
8931
+ c(yr(n, r)), d(
8932
8932
  ((K = (B = (ae = n == null ? void 0 : n.chartOptions) == null ? void 0 : ae.scales) == null ? void 0 : B[l]) == null ? void 0 : K.min) === 0 ? 0 : ""
8933
8933
  ), h(((Z = (q = (J = n == null ? void 0 : n.chartOptions) == null ? void 0 : J.scales) == null ? void 0 : q[l]) == null ? void 0 : Z.max) || ""), y(
8934
8934
  ((pe = (de = (W = (ee = n == null ? void 0 : n.chartOptions) == null ? void 0 : ee.scales) == null ? void 0 : W[l]) == null ? void 0 : de.ticks) == null ? void 0 : pe.stepSize) || ""
8935
- ), b(((be = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : be.decimalPlaces) || 0), N(((he = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : he.suffix) || ""), z(((Te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Te.currency) || ""), S(((X = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : X.locale) || "");
8935
+ ), b(((be = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : be.decimalPlaces) || 0), N(((he = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : he.suffix) || ""), z(((Oe = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Oe.currency) || ""), S(((X = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : X.locale) || "");
8936
8936
  }, [t, n, l, r]);
8937
8937
  function D(ae, B) {
8938
8938
  return B === "" || /^[0-9\b]+$/.test(B) ? Number(B) : Number(ae);
8939
8939
  }
8940
8940
  function L() {
8941
8941
  const ae = [
8942
- ...new Set(ar.map((B) => B.currency))
8942
+ ...new Set(nr.map((B) => B.currency))
8943
8943
  ];
8944
8944
  return /* @__PURE__ */ s(ne, { children: [
8945
8945
  /* @__PURE__ */ s("div", { className: "grid grid-cols-6 items-center gap-2", children: [
@@ -8983,7 +8983,7 @@ function qu() {
8983
8983
  ),
8984
8984
  /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ s(Pt, { children: [
8985
8985
  /* @__PURE__ */ e(Vt, { children: "Locale" }),
8986
- ar.map((B) => /* @__PURE__ */ e(te, { value: B.locale, children: B.locale }, B.locale))
8986
+ nr.map((B) => /* @__PURE__ */ e(te, { value: B.locale, children: B.locale }, B.locale))
8987
8987
  ] }) })
8988
8988
  ] })
8989
8989
  ] }),
@@ -9291,7 +9291,7 @@ function Hu() {
9291
9291
  n(t === "x" || t === void 0 ? "y" : "x");
9292
9292
  },
9293
9293
  tooltip: "Chart Orientation",
9294
- children: t === "x" || t === void 0 ? /* @__PURE__ */ e(dr, { className: "size-4" }) : /* @__PURE__ */ e(cr, { className: "size-4" })
9294
+ children: t === "x" || t === void 0 ? /* @__PURE__ */ e(cr, { className: "size-4" }) : /* @__PURE__ */ e(or, { className: "size-4" })
9295
9295
  }
9296
9296
  );
9297
9297
  }
@@ -9303,13 +9303,13 @@ function Hu() {
9303
9303
  n(t === "y" || t === void 0 ? "x" : "y");
9304
9304
  },
9305
9305
  tooltip: "Chart Orientation",
9306
- children: t === "y" || t === void 0 ? /* @__PURE__ */ e(dr, { className: "size-4" }) : /* @__PURE__ */ e(cr, { className: "size-4" })
9306
+ children: t === "y" || t === void 0 ? /* @__PURE__ */ e(cr, { className: "size-4" }) : /* @__PURE__ */ e(or, { className: "size-4" })
9307
9307
  }
9308
9308
  );
9309
9309
  }
9310
9310
  return /* @__PURE__ */ e(ne, { children: a === "funnel" ? l() : r() });
9311
9311
  }
9312
- function ri() {
9312
+ function si() {
9313
9313
  const t = E((c) => c.card), a = E((c) => c.isShowingVisual), n = E(
9314
9314
  (c) => {
9315
9315
  var o, d;
@@ -9488,7 +9488,7 @@ function Ku() {
9488
9488
  )
9489
9489
  ] }) });
9490
9490
  }
9491
- function li() {
9491
+ function ri() {
9492
9492
  const t = E((p) => p.frame), a = E((p) => p.card), n = E((p) => p.isSqlRunning), r = E((p) => p.isDevMode), { setFrame: l, setActiveTabCardId: i, setCard: c, setIsDevMode: o, setRunSql: d } = se(), { data: u, isLoading: h, isFetching: m } = Le(a);
9493
9493
  function f(p) {
9494
9494
  const b = t.cards.find((v) => v.id === p);
@@ -9520,7 +9520,7 @@ function li() {
9520
9520
  card: a,
9521
9521
  data: u == null ? void 0 : u.records
9522
9522
  }
9523
- ) }) }) }) : /* @__PURE__ */ e(ya, { FallbackComponent: sl, children: /* @__PURE__ */ e(ni, { className: "grow border-none shadow-none" }) });
9523
+ ) }) }) }) : /* @__PURE__ */ e(ya, { FallbackComponent: al, children: /* @__PURE__ */ e(ti, { className: "grow border-none shadow-none" }) });
9524
9524
  }
9525
9525
  return /* @__PURE__ */ s(
9526
9526
  Yt,
@@ -9565,14 +9565,14 @@ function Yn({
9565
9565
  {
9566
9566
  className: "relative isolate flex h-full flex-col py-2 pb-3",
9567
9567
  children: [
9568
- (f || g) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Ee, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
9568
+ (f || g) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Me, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
9569
9569
  /* @__PURE__ */ s(
9570
9570
  "div",
9571
9571
  {
9572
9572
  className: "z-10 mb-0 flex min-h-10 items-center justify-end gap-2 px-6",
9573
9573
  children: [
9574
9574
  r && /* @__PURE__ */ s("div", { className: "flex grow items-center", children: [
9575
- /* @__PURE__ */ e(si, {}),
9575
+ /* @__PURE__ */ e(ai, {}),
9576
9576
  l && /* @__PURE__ */ e(le, { tooltip: "Visual Docs", onClick: v, children: /* @__PURE__ */ e(kc, { className: "size-4" }) }),
9577
9577
  !["table", "custom"].includes(a.type) && l && /* @__PURE__ */ e(Vu, {})
9578
9578
  ] }),
@@ -9598,7 +9598,7 @@ function Yn({
9598
9598
  }
9599
9599
  ),
9600
9600
  /* @__PURE__ */ e(
9601
- Qr,
9601
+ Yr,
9602
9602
  {
9603
9603
  text: JSON.stringify(m == null ? void 0 : m.records, null, 2),
9604
9604
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70"
@@ -9607,13 +9607,13 @@ function Yn({
9607
9607
  ] }),
9608
9608
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
9609
9609
  t,
9610
- /* @__PURE__ */ e(ri, {})
9610
+ /* @__PURE__ */ e(si, {})
9611
9611
  ] }),
9612
9612
  n && /* @__PURE__ */ e(Wu, {})
9613
9613
  ]
9614
9614
  }
9615
9615
  ),
9616
- r ? /* @__PURE__ */ e(li, {}) : /* @__PURE__ */ s(
9616
+ r ? /* @__PURE__ */ e(ri, {}) : /* @__PURE__ */ s(
9617
9617
  Dt,
9618
9618
  {
9619
9619
  className: "px-6",
@@ -9642,7 +9642,7 @@ function Yn({
9642
9642
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
9643
9643
  children: [
9644
9644
  (m == null ? void 0 : m.records) && (m == null ? void 0 : m.records.length) > 0 && /* @__PURE__ */ e(zu, { data: (m == null ? void 0 : m.records) || [] }),
9645
- y && /* @__PURE__ */ e(Yl, { error: y })
9645
+ y && /* @__PURE__ */ e(Wl, { error: y })
9646
9646
  ]
9647
9647
  }
9648
9648
  )
@@ -9877,7 +9877,7 @@ function en() {
9877
9877
  var h;
9878
9878
  return (h = u.card.preferences) == null ? void 0 : h.filterOnClickColumnIndex;
9879
9879
  }
9880
- ), Me(() => {
9880
+ ), Te(() => {
9881
9881
  i && a(new Array(i.length).fill(!1));
9882
9882
  }, [i]);
9883
9883
  function c(u, h) {
@@ -9963,7 +9963,7 @@ function en() {
9963
9963
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: ((f = n == null ? void 0 : n.onClickFilter) == null ? void 0 : f.find(
9964
9964
  (g) => g.columnIndex === h
9965
9965
  )) && /* @__PURE__ */ e(
9966
- qr,
9966
+ Br,
9967
9967
  {
9968
9968
  onClick: () => {
9969
9969
  a((g) => {
@@ -10028,7 +10028,7 @@ function Qu({ idx: t }) {
10028
10028
  }
10029
10029
  }
10030
10030
  return /* @__PURE__ */ s(at, { children: [
10031
- /* @__PURE__ */ e(st, { children: /* @__PURE__ */ e(Sl, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
10031
+ /* @__PURE__ */ e(st, { children: /* @__PURE__ */ e(wl, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
10032
10032
  /* @__PURE__ */ e(Kt, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ s("div", { className: "flex gap-1", children: [
10033
10033
  /* @__PURE__ */ e(
10034
10034
  "button",
@@ -10124,7 +10124,7 @@ function $s({
10124
10124
  /* @__PURE__ */ e(Ge, { children: t })
10125
10125
  ] }) });
10126
10126
  }
10127
- function ii() {
10127
+ function li() {
10128
10128
  const t = E((d) => d.card), a = E(
10129
10129
  (d) => {
10130
10130
  var u, h, m;
@@ -10139,7 +10139,7 @@ function ii() {
10139
10139
  {
10140
10140
  className: "flex h-8 items-center rounded-md bg-muted/70 px-3 hover:bg-muted",
10141
10141
  title: d,
10142
- children: oi(d)
10142
+ children: ii(d)
10143
10143
  },
10144
10144
  d
10145
10145
  )) })
@@ -10147,7 +10147,7 @@ function ii() {
10147
10147
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
10148
10148
  /* @__PURE__ */ e(Q, { children: l }),
10149
10149
  /* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: c.map((d, u) => /* @__PURE__ */ e(
10150
- ci,
10150
+ oi,
10151
10151
  {
10152
10152
  className: "flex h-8 items-center bg-muted/70 px-3 hover:bg-muted",
10153
10153
  iconClassName: "invisible group-hover:visible",
@@ -10159,10 +10159,10 @@ function ii() {
10159
10159
  ] })
10160
10160
  ] });
10161
10161
  }
10162
- function oi(t, a = 30) {
10162
+ function ii(t, a = 30) {
10163
10163
  return t.length > a ? t.slice(0, a) + "..." : t;
10164
10164
  }
10165
- function ci({
10165
+ function oi({
10166
10166
  col: t,
10167
10167
  idx: a,
10168
10168
  className: n,
@@ -10211,7 +10211,7 @@ function ci({
10211
10211
  n
10212
10212
  ),
10213
10213
  children: [
10214
- l || /* @__PURE__ */ e($s, { className: "max-w-[100px]", title: t, children: oi(t) }),
10214
+ l || /* @__PURE__ */ e($s, { className: "max-w-[100px]", title: t, children: ii(t) }),
10215
10215
  /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
10216
10216
  /* @__PURE__ */ e(
10217
10217
  Ca,
@@ -10234,7 +10234,7 @@ function ci({
10234
10234
  }
10235
10235
  ),
10236
10236
  /* @__PURE__ */ e(
10237
- yl,
10237
+ gl,
10238
10238
  {
10239
10239
  onClick: () => u("area"),
10240
10240
  className: G(
@@ -10249,7 +10249,7 @@ function ci({
10249
10249
  }
10250
10250
  );
10251
10251
  }
10252
- function di() {
10252
+ function ci() {
10253
10253
  const t = E((g) => g.selectedConnectionId), a = E((g) => g.selectedDatamodelId), n = E((g) => g.selectedDatabaseName), r = E((g) => g.selectedSchemaName), l = E((g) => g.selectedTableName), i = Y((g) => g.dashboard.filters) || [], c = Y((g) => g.actions.addFilter), o = Y((g) => g.actions.removeFilter), { removeFilterValues: d } = yt(), { modelItems: u, tableName: h, connectionType: m } = ot();
10254
10254
  function f(g, y = "dashboard") {
10255
10255
  var C;
@@ -10263,7 +10263,7 @@ function di() {
10263
10263
  const M = (C = u == null ? void 0 : u.find(
10264
10264
  (T) => T.id === a
10265
10265
  )) == null ? void 0 : C.name;
10266
- a && a !== "none" && (z = `${sr}.${M}.${p}`, w = `${sr}.${M}`);
10266
+ a && a !== "none" && (z = `${ar}.${M}.${p}`, w = `${ar}.${M}`);
10267
10267
  const S = i == null ? void 0 : i.find(
10268
10268
  (T) => T.column === z && T.table === N && (T.database === b || T.database === n)
10269
10269
  );
@@ -10315,7 +10315,7 @@ function di() {
10315
10315
  function vn() {
10316
10316
  const t = Y(
10317
10317
  (o) => o.dashboard.filters
10318
- ), a = E((o) => o.frame), { setFrame: n } = se(), { columns: r } = ot(), { assignFilter: l } = di();
10318
+ ), a = E((o) => o.frame), { setFrame: n } = se(), { columns: r } = ot(), { assignFilter: l } = ci();
10319
10319
  function i(o) {
10320
10320
  const d = l(o, "frame");
10321
10321
  n({ ...a, filterId: d });
@@ -10324,7 +10324,7 @@ function vn() {
10324
10324
  return /* @__PURE__ */ s("div", { className: "space-y-3", children: [
10325
10325
  /* @__PURE__ */ e(Q, { children: "Card Filter" }),
10326
10326
  /* @__PURE__ */ e(Xu, { onSelect: i, columns: r }),
10327
- c && /* @__PURE__ */ e(il, { filter: c })
10327
+ c && /* @__PURE__ */ e(ll, { filter: c })
10328
10328
  ] });
10329
10329
  }
10330
10330
  function Xu({
@@ -10410,7 +10410,7 @@ function em({
10410
10410
  ] }),
10411
10411
  /* @__PURE__ */ s(we, { value: "item-2", children: [
10412
10412
  /* @__PURE__ */ e(Se, { children: "Settings" }),
10413
- /* @__PURE__ */ e(ke, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(ii, {}) })
10413
+ /* @__PURE__ */ e(ke, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(li, {}) })
10414
10414
  ] }),
10415
10415
  /* @__PURE__ */ s(we, { value: "item-3", children: [
10416
10416
  /* @__PURE__ */ e(Se, { children: "Filters" }),
@@ -10721,7 +10721,7 @@ function Va({
10721
10721
  children: [
10722
10722
  /* @__PURE__ */ s("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
10723
10723
  /* @__PURE__ */ e(Q, { children: a }),
10724
- /* @__PURE__ */ e(ol, { className: "h-4 w-4" })
10724
+ /* @__PURE__ */ e(il, { className: "h-4 w-4" })
10725
10725
  ] }),
10726
10726
  /* @__PURE__ */ e("div", { className: "transition-all ease-in-out", children: t })
10727
10727
  ]
@@ -11179,7 +11179,7 @@ function mm() {
11179
11179
  /* @__PURE__ */ e(Se, { children: "Settings" }),
11180
11180
  /* @__PURE__ */ s(ke, { className: "space-y-4 px-2", children: [
11181
11181
  n(),
11182
- /* @__PURE__ */ e(ii, {})
11182
+ /* @__PURE__ */ e(li, {})
11183
11183
  ] })
11184
11184
  ] }),
11185
11185
  /* @__PURE__ */ s(we, { value: "item-3", children: [
@@ -11326,7 +11326,7 @@ function ym() {
11326
11326
  /* @__PURE__ */ e(ft, { orientation: "horizontal" })
11327
11327
  ] });
11328
11328
  }
11329
- function ui({
11329
+ function di({
11330
11330
  label: t,
11331
11331
  column: a,
11332
11332
  functions: n,
@@ -11358,7 +11358,7 @@ const vm = [
11358
11358
  {
11359
11359
  label: "Sum",
11360
11360
  value: "SUM",
11361
- logo: /* @__PURE__ */ e(wl, { className: "size-3.5" })
11361
+ logo: /* @__PURE__ */ e(Cl, { className: "size-3.5" })
11362
11362
  },
11363
11363
  {
11364
11364
  label: "Count",
@@ -11403,7 +11403,7 @@ function xm({ column: t }) {
11403
11403
  a(t.id, i);
11404
11404
  }
11405
11405
  return /* @__PURE__ */ e(
11406
- ui,
11406
+ di,
11407
11407
  {
11408
11408
  column: t,
11409
11409
  functions: n,
@@ -11445,7 +11445,7 @@ function Nm({ column: t }) {
11445
11445
  a(t.id, l);
11446
11446
  }
11447
11447
  return /* @__PURE__ */ e(
11448
- ui,
11448
+ di,
11449
11449
  {
11450
11450
  column: t,
11451
11451
  functions: bm,
@@ -11459,7 +11459,7 @@ function Cm({
11459
11459
  onChange: a,
11460
11460
  droppableId: n
11461
11461
  }) {
11462
- const { columns: r } = Wr(), l = Be(() => {
11462
+ const { columns: r } = Jr(), l = Be(() => {
11463
11463
  let o = [];
11464
11464
  (n === $t || n === Bt || n === qt) && (o = r);
11465
11465
  const d = o == null ? void 0 : o.filter(
@@ -11499,7 +11499,7 @@ function Cm({
11499
11499
  }
11500
11500
  );
11501
11501
  }
11502
- function mi({
11502
+ function ui({
11503
11503
  column: t
11504
11504
  }) {
11505
11505
  const a = E((d) => d.card.type), n = E(
@@ -11511,7 +11511,7 @@ function mi({
11511
11511
  (d) => d === t.label || d === t.name
11512
11512
  ), i = l ? r.indexOf(l) : -1;
11513
11513
  function c() {
11514
- return /* @__PURE__ */ e("div", { className: "pr-1", children: l && /* @__PURE__ */ e(ci, { idx: i, col: l, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
11514
+ return /* @__PURE__ */ e("div", { className: "pr-1", children: l && /* @__PURE__ */ e(oi, { idx: i, col: l, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
11515
11515
  }
11516
11516
  function o() {
11517
11517
  return /* @__PURE__ */ s("div", { className: "space-y-1", children: [
@@ -11616,7 +11616,7 @@ function wm({
11616
11616
  {
11617
11617
  "data-setting-container": "",
11618
11618
  className: "mt-1.5 max-h-32 overflow-y-auto rounded-md border border-border p-3 text-sm",
11619
- children: /* @__PURE__ */ e(mi, { column: t })
11619
+ children: /* @__PURE__ */ e(ui, { column: t })
11620
11620
  }
11621
11621
  );
11622
11622
  }
@@ -11659,7 +11659,7 @@ function wm({
11659
11659
  )
11660
11660
  }
11661
11661
  ) : /* @__PURE__ */ e(
11662
- xl,
11662
+ vl,
11663
11663
  {
11664
11664
  className: G(
11665
11665
  "size-3 cursor-pointer items-center justify-center rounded-r-sm text-muted-foreground"
@@ -11727,7 +11727,7 @@ function ja({
11727
11727
  ] }),
11728
11728
  y(),
11729
11729
  /* @__PURE__ */ e("div", { className: "space-y-2", children: f == null ? void 0 : f.map(
11730
- (v) => v.id === Jl.id ? /* @__PURE__ */ e(Sm, {}, v.id) : /* @__PURE__ */ e(
11730
+ (v) => v.id === Kl.id ? /* @__PURE__ */ e(Sm, {}, v.id) : /* @__PURE__ */ e(
11731
11731
  wm,
11732
11732
  {
11733
11733
  droppableId: t,
@@ -11745,7 +11745,7 @@ function ja({
11745
11745
  function Sm() {
11746
11746
  return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground bg-background px-2 py-1 text-sm", children: /* @__PURE__ */ e("span", { className: "text-muted-foreground/70", children: "Drop here" }) });
11747
11747
  }
11748
- function hi({ children: t, id: a, type: n }) {
11748
+ function mi({ children: t, id: a, type: n }) {
11749
11749
  const {
11750
11750
  attributes: r,
11751
11751
  listeners: l,
@@ -11830,7 +11830,7 @@ function km() {
11830
11830
  t.map((v) => {
11831
11831
  var N, w;
11832
11832
  return /* @__PURE__ */ e(
11833
- hi,
11833
+ mi,
11834
11834
  {
11835
11835
  id: bn(v.columnId),
11836
11836
  type: Rs,
@@ -11841,7 +11841,7 @@ function km() {
11841
11841
  children: /* @__PURE__ */ s("div", { className: "flex h-full grow items-center justify-between gap-2", children: [
11842
11842
  /* @__PURE__ */ s("div", { className: "flex h-full grow items-center justify-between gap-2 rounded-sm bg-muted px-2", children: [
11843
11843
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
11844
- /* @__PURE__ */ e(xl, { className: "size-3 cursor-move text-muted-foreground hover:text-foreground" }),
11844
+ /* @__PURE__ */ e(vl, { className: "size-3 cursor-move text-muted-foreground hover:text-foreground" }),
11845
11845
  /* @__PURE__ */ e($s, { className: "w-[175px] text-sm", children: ((N = g(v.columnId)) == null ? void 0 : N.label) || ((w = g(v.columnId)) == null ? void 0 : w.name) })
11846
11846
  ] }),
11847
11847
  /* @__PURE__ */ e(
@@ -11913,7 +11913,7 @@ function Dm() {
11913
11913
  }
11914
11914
  let g = "Group By", y = "Metrics", p = "Stack By";
11915
11915
  return a === "table" && (g = "Rows", y = "Metrics", p = "Columns"), /* @__PURE__ */ s("div", { className: "flex h-full w-full flex-col gap-3 py-4", children: [
11916
- /* @__PURE__ */ e(ai, { iconClassName: "size-[19px]" }),
11916
+ /* @__PURE__ */ e(ni, { iconClassName: "size-[19px]" }),
11917
11917
  /* @__PURE__ */ s(Jn, { className: "flex min-h-0 grow basis-0 flex-col gap-4 overflow-y-auto", children: [
11918
11918
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-4 p-4", children: [
11919
11919
  /* @__PURE__ */ e(
@@ -11973,7 +11973,7 @@ function Bs({
11973
11973
  function h(m) {
11974
11974
  o(m);
11975
11975
  }
11976
- return /* @__PURE__ */ e(hi, { id: n, type: r, children: /* @__PURE__ */ s(
11976
+ return /* @__PURE__ */ e(mi, { id: n, type: r, children: /* @__PURE__ */ s(
11977
11977
  "div",
11978
11978
  {
11979
11979
  className: G(
@@ -12059,7 +12059,7 @@ function Tm({
12059
12059
  connectionId: i,
12060
12060
  // not needed
12061
12061
  dataType: t.type
12062
- }, { data: f, isLoading: g, isFetching: y, isError: p } = cl(m), b = Be(() => {
12062
+ }, { data: f, isLoading: g, isFetching: y, isError: p } = ol(m), b = Be(() => {
12063
12063
  var z;
12064
12064
  return m.column ? (z = f == null ? void 0 : f.records) == null ? void 0 : z.map((M) => {
12065
12065
  let S = m.column.split(".").slice(-1)[0].replace(/"/g, "");
@@ -12149,7 +12149,7 @@ function Em({
12149
12149
  title: "",
12150
12150
  // not needed
12151
12151
  dataType: t.type
12152
- }, { isLoading: d, isFetching: u, isError: h, data: m } = cl(o), f = m == null ? void 0 : m.records, { dateRange: g, setDateRange: y, initialDateRange: p } = Fo(f), { updateEditorFilterValue: b } = se();
12152
+ }, { isLoading: d, isFetching: u, isError: h, data: m } = ol(o), f = m == null ? void 0 : m.records, { dateRange: g, setDateRange: y, initialDateRange: p } = Fo(f), { updateEditorFilterValue: b } = se();
12153
12153
  function v(z) {
12154
12154
  var S, C;
12155
12155
  const M = {
@@ -12206,7 +12206,7 @@ function Om({
12206
12206
  }
12207
12207
  function f(b) {
12208
12208
  const v = mt(b.type);
12209
- return b.id === Jl.id ? /* @__PURE__ */ e(
12209
+ return b.id === Kl.id ? /* @__PURE__ */ e(
12210
12210
  Bs,
12211
12211
  {
12212
12212
  id: b.id,
@@ -12295,7 +12295,7 @@ function Rm() {
12295
12295
  ]
12296
12296
  }
12297
12297
  ),
12298
- /* @__PURE__ */ e(Zl, { sql: r == null ? void 0 : r.sql, error: l })
12298
+ /* @__PURE__ */ e(Ql, { sql: r == null ? void 0 : r.sql, error: l })
12299
12299
  ] }),
12300
12300
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
12301
12301
  /* @__PURE__ */ e("div", { className: "rounded-full bg-green-300 px-3 py-1 text-xs font-medium text-black", children: "Preview" }),
@@ -12306,7 +12306,7 @@ function Rm() {
12306
12306
  }
12307
12307
  function zm() {
12308
12308
  const t = nt(null), a = nt(null), n = E((o) => o.isShowingVisual), r = E((o) => o.showAIDialog), l = E((o) => o.isDevMode);
12309
- Me(() => {
12309
+ Te(() => {
12310
12310
  var o, d, u, h;
12311
12311
  r ? ((o = t.current) == null || o.resize(0), (d = a.current) == null || d.resize(0)) : ((u = t.current) == null || u.resize(25), (h = a.current) == null || h.resize(25));
12312
12312
  }, [r]);
@@ -12397,7 +12397,7 @@ function zm() {
12397
12397
  function Lm(t) {
12398
12398
  const a = Po(
12399
12399
  (F) => F.currentAIContext
12400
- ), [n, r] = P(""), [l, i] = P(null), { authToken: c } = Oe(), o = E((F) => {
12400
+ ), [n, r] = P(""), [l, i] = P(null), { authToken: c } = Ee(), o = E((F) => {
12401
12401
  var re;
12402
12402
  return (re = F == null ? void 0 : F.card) == null ? void 0 : re.sql;
12403
12403
  }), d = E((F) => F.isDevMode), u = E((F) => {
@@ -12454,7 +12454,7 @@ function Lm(t) {
12454
12454
  W(re.usage), r(""), re.finishReason === "stop" && r("");
12455
12455
  }
12456
12456
  });
12457
- Me(() => {
12457
+ Te(() => {
12458
12458
  v && b && (oe({
12459
12459
  role: "user",
12460
12460
  content: b
@@ -12542,7 +12542,7 @@ function Lm(t) {
12542
12542
  datamodelName: sa(I),
12543
12543
  connectionId: M || "",
12544
12544
  connectionType: x || ""
12545
- }, re = rr([...p, F]);
12545
+ }, re = sr([...p, F]);
12546
12546
  pe(re);
12547
12547
  }
12548
12548
  function he() {
@@ -12559,7 +12559,7 @@ function Lm(t) {
12559
12559
  [...C || [], ...p],
12560
12560
  F
12561
12561
  ) || p.length === 0) {
12562
- const Ae = rr([
12562
+ const Ae = sr([
12563
12563
  ...C || [],
12564
12564
  ...p,
12565
12565
  F
@@ -12569,7 +12569,7 @@ function Lm(t) {
12569
12569
  pe(Ae);
12570
12570
  }
12571
12571
  }
12572
- const Te = !["ready", "error"].includes(K), X = Uo(U);
12572
+ const Oe = !["ready", "error"].includes(K), X = Uo(U);
12573
12573
  return {
12574
12574
  messages: _,
12575
12575
  setMessages: j,
@@ -12577,7 +12577,7 @@ function Lm(t) {
12577
12577
  append: oe,
12578
12578
  input: ae,
12579
12579
  setInput: B,
12580
- isLoading: Te,
12580
+ isLoading: Oe,
12581
12581
  handleSetAIScope: he,
12582
12582
  handleAddCurrentTableToScope: be,
12583
12583
  removeFromCurrentSelections: de,
@@ -12603,7 +12603,7 @@ const Fm = [
12603
12603
  subtitle: "sales by category"
12604
12604
  }
12605
12605
  ];
12606
- function xr() {
12606
+ function vr() {
12607
12607
  const t = nt(null), a = nt(null), [n, r] = P(!1), [l, i] = P(as), [c, o] = P(!1), [d, u] = P(!1), h = qo(), { setCurrentAIContext: m } = Go(), f = Y((Z) => Z.dashboard.aiContext), g = E((Z) => Z.card.dataSource), y = E((Z) => Z.actions.setCardSql), p = E((Z) => Z.actions.setRunSql), b = E((Z) => Z.showAIDialog), v = Y(
12608
12608
  (Z) => Z.handleOpenAssistantProfile
12609
12609
  ), { setShowAIDialog: N, setCardPython: w } = se(), { setDataSource: z } = se(), { assistantProfile: M } = Ho(), {
@@ -12625,7 +12625,7 @@ function xr() {
12625
12625
  scrollContainerRef: t,
12626
12626
  inputRef: a,
12627
12627
  messages: S
12628
- }), Me(() => {
12628
+ }), Te(() => {
12629
12629
  var Z;
12630
12630
  b && ((Z = a.current) == null || Z.focus(), m({
12631
12631
  selectedEntities: (g == null ? void 0 : g.selectedEntities) || []
@@ -12665,11 +12665,11 @@ function xr() {
12665
12665
  className: "h-7 p-2 text-muted-foreground hover:text-foreground",
12666
12666
  size: "sm",
12667
12667
  variant: "ghost",
12668
- children: /* @__PURE__ */ e(Gr, { className: "size-3.5" })
12668
+ children: /* @__PURE__ */ e(qr, { className: "size-3.5" })
12669
12669
  }
12670
12670
  ) }),
12671
12671
  /* @__PURE__ */ s(_n, { align: "end", children: [
12672
- /* @__PURE__ */ e(Tr, { children: "Options" }),
12672
+ /* @__PURE__ */ e(Dr, { children: "Options" }),
12673
12673
  /* @__PURE__ */ e(rn, {}),
12674
12674
  /* @__PURE__ */ e(
12675
12675
  Aa,
@@ -12733,7 +12733,7 @@ function xr() {
12733
12733
  tooltip: "Add Context",
12734
12734
  className: "h-7 p-2 text-muted-foreground hover:text-foreground",
12735
12735
  onClick: U,
12736
- children: /* @__PURE__ */ e(al, { className: "size-4" })
12736
+ children: /* @__PURE__ */ e(nl, { className: "size-4" })
12737
12737
  }
12738
12738
  ),
12739
12739
  /* @__PURE__ */ e(
@@ -12756,7 +12756,7 @@ function xr() {
12756
12756
  onClick: () => {
12757
12757
  N(!1);
12758
12758
  },
12759
- children: /* @__PURE__ */ e(dl, { className: "size-4" })
12759
+ children: /* @__PURE__ */ e(cl, { className: "size-4" })
12760
12760
  }
12761
12761
  )
12762
12762
  ] })
@@ -12833,7 +12833,7 @@ function xr() {
12833
12833
  " total tokens"
12834
12834
  ] }) }),
12835
12835
  /* @__PURE__ */ e(
12836
- ul,
12836
+ dl,
12837
12837
  {
12838
12838
  incomingSelectedEntities: (g == null ? void 0 : g.selectedEntities) || [],
12839
12839
  open: d,
@@ -12847,10 +12847,10 @@ function xr() {
12847
12847
  }
12848
12848
  );
12849
12849
  }
12850
- function pi(t, a) {
12850
+ function hi(t, a) {
12851
12851
  return `${t}-${a.qualifiedEntityName}-${a.name}-${Date.now()}`;
12852
12852
  }
12853
- function fi(t, a) {
12853
+ function pi(t, a) {
12854
12854
  const n = Je(t.replace(/_/g, " "));
12855
12855
  switch (a) {
12856
12856
  case "SUM":
@@ -12874,18 +12874,18 @@ function _m(t, a) {
12874
12874
  return n === "number" ? "metrics" : n === "date" || n === "string" ? "groupBy" : "metrics";
12875
12875
  }
12876
12876
  function Za(t, a) {
12877
- const n = pi(a, t), r = Qe(t.dataType), l = r === "date", i = {
12877
+ const n = hi(a, t), r = Qe(t.dataType), l = r === "date", i = {
12878
12878
  id: n,
12879
12879
  name: t.name,
12880
12880
  dataType: t.dataType,
12881
- label: ml(t.name),
12881
+ label: ul(t.name),
12882
12882
  qualifiedEntityName: t.qualifiedEntityName,
12883
12883
  entityId: t.entityId,
12884
12884
  entityName: t.entityName,
12885
12885
  entityType: t.entityType
12886
12886
  };
12887
12887
  if (a === "metrics") {
12888
- const c = r === "number" ? "SUM" : "COUNT", o = fi(t.label, c);
12888
+ const c = r === "number" ? "SUM" : "COUNT", o = pi(t.label, c);
12889
12889
  return {
12890
12890
  ...i,
12891
12891
  role: "metric",
@@ -12910,10 +12910,10 @@ function Za(t, a) {
12910
12910
  direction: "asc"
12911
12911
  } : null;
12912
12912
  }
12913
- function gi(t, a, n) {
12913
+ function fi(t, a, n) {
12914
12914
  var r;
12915
12915
  return !n || !((r = n.baseEntity) != null && r.name) || !n.joins ? !1 : t === a || t === n.baseEntity.name || a === n.baseEntity.name ? !0 : n.joins.some((l) => {
12916
- const i = lr(l.source), c = lr(l.target);
12916
+ const i = rr(l.source), c = rr(l.target);
12917
12917
  return i === t && c === a || i === a && c === t;
12918
12918
  });
12919
12919
  }
@@ -12925,7 +12925,7 @@ function Pm(t, a, n) {
12925
12925
  return { isValid: !0 };
12926
12926
  if (r !== t.qualifiedEntityName && t.qualifiedEntityName)
12927
12927
  if (n) {
12928
- if (!gi(
12928
+ if (!fi(
12929
12929
  r,
12930
12930
  t.qualifiedEntityName,
12931
12931
  n
@@ -13087,7 +13087,7 @@ const qs = (t) => {
13087
13087
  const x = f("metrics")[L];
13088
13088
  x && r(m, x.id, {
13089
13089
  aggregate: A,
13090
- label: fi(
13090
+ label: pi(
13091
13091
  x.name,
13092
13092
  A
13093
13093
  )
@@ -13268,13 +13268,13 @@ function Vm({ field: t }) {
13268
13268
  case "date":
13269
13269
  return ha;
13270
13270
  case "boolean":
13271
- return kl;
13271
+ return Sl;
13272
13272
  case "json":
13273
13273
  return Ic;
13274
13274
  case "geo":
13275
13275
  return Zc;
13276
13276
  default:
13277
- return Dl;
13277
+ return kl;
13278
13278
  }
13279
13279
  })(t.dataType);
13280
13280
  return /* @__PURE__ */ s(
@@ -13371,7 +13371,7 @@ function Vm({ field: t }) {
13371
13371
  // </div>
13372
13372
  /* @__PURE__ */ e("div", { className: "text-muted-foreground-700 px-2 pb-3 text-sm", children: /* @__PURE__ */ e(Jt, { className: "", children: /* @__PURE__ */ s(Wt, { className: "space-y-2 p-3", children: [
13373
13373
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
13374
- /* @__PURE__ */ e(Sl, { className: "h-4 w-4 text-muted-foreground" }),
13374
+ /* @__PURE__ */ e(wl, { className: "h-4 w-4 text-muted-foreground" }),
13375
13375
  /* @__PURE__ */ e("span", { className: "break-all", children: t.label || t.name })
13376
13376
  ] }),
13377
13377
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
@@ -13402,7 +13402,7 @@ function jm() {
13402
13402
  )).reduce((w, z) => {
13403
13403
  const M = z.qualifiedEntityName || "Other Fields";
13404
13404
  return w[M] || (w[M] = {
13405
- label: ml(z.entityName),
13405
+ label: ul(z.entityName),
13406
13406
  fields: []
13407
13407
  }), w[M].fields.push(z), w;
13408
13408
  }, {}), y = Object.keys(f), p = u.filter(
@@ -13413,7 +13413,7 @@ function jm() {
13413
13413
  (w) => h(w) === "calculated"
13414
13414
  ).length, N = u.length > 0;
13415
13415
  return o ? /* @__PURE__ */ s("div", { className: "flex h-[calc(100vh-200px)] w-[290px] flex-col items-center justify-center", children: [
13416
- /* @__PURE__ */ e(Ee, { className: "h-8 w-8 animate-spin text-gray-400" }),
13416
+ /* @__PURE__ */ e(Me, { className: "h-8 w-8 animate-spin text-gray-400" }),
13417
13417
  /* @__PURE__ */ e("span", { className: "mt-2 text-sm text-gray-500", children: "Loading fields..." })
13418
13418
  ] }) : d ? /* @__PURE__ */ s("div", { className: "flex h-[calc(100vh-200px)] w-[290px] flex-col items-center justify-center", children: [
13419
13419
  /* @__PURE__ */ e(wn, { className: "mb-4 h-12 w-12 text-red-300" }),
@@ -13931,7 +13931,7 @@ function Bm({
13931
13931
  variant: "ghost",
13932
13932
  size: "sm",
13933
13933
  onClick: () => p(D.id),
13934
- children: I ? /* @__PURE__ */ e(ol, { className: "h-4 w-4" }) : /* @__PURE__ */ e(pn, { className: "h-4 w-4" })
13934
+ children: I ? /* @__PURE__ */ e(il, { className: "h-4 w-4" }) : /* @__PURE__ */ e(pn, { className: "h-4 w-4" })
13935
13935
  }
13936
13936
  ),
13937
13937
  /* @__PURE__ */ e(
@@ -14381,7 +14381,7 @@ function Bm({
14381
14381
  ] })
14382
14382
  ] });
14383
14383
  }
14384
- function br({
14384
+ function xr({
14385
14385
  children: t,
14386
14386
  open: a,
14387
14387
  onOpenChange: n,
@@ -14600,7 +14600,7 @@ ${p.joinType} JOIN ${b.name}
14600
14600
  )
14601
14601
  ] }) }),
14602
14602
  /* @__PURE__ */ e(
14603
- br,
14603
+ xr,
14604
14604
  {
14605
14605
  open: r,
14606
14606
  onOpenChange: l,
@@ -14614,7 +14614,7 @@ ${p.joinType} JOIN ${b.name}
14614
14614
  )
14615
14615
  ] }),
14616
14616
  n.joins.length === 0 && /* @__PURE__ */ e(
14617
- br,
14617
+ xr,
14618
14618
  {
14619
14619
  open: r,
14620
14620
  onOpenChange: l,
@@ -14644,7 +14644,7 @@ function Hm({
14644
14644
  title: a,
14645
14645
  maxDetails: n = 10
14646
14646
  }) {
14647
- const l = hl(t).slice(0, n), i = l.find(
14647
+ const l = ml(t).slice(0, n), i = l.find(
14648
14648
  (o) => o.label === "Description"
14649
14649
  ), c = l.filter((o) => o.label === "Description" ? !1 : !["Connection", "Database", "Schema"].includes(o.label));
14650
14650
  return /* @__PURE__ */ e(Ge, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
@@ -14671,7 +14671,7 @@ function Km({
14671
14671
  " more entities"
14672
14672
  ] }),
14673
14673
  /* @__PURE__ */ e("div", { className: "space-y-1", children: t.map((a, n) => {
14674
- const r = hl(a), l = r.find(
14674
+ const r = ml(a), l = r.find(
14675
14675
  (c) => c.label === "Description"
14676
14676
  ), i = r.filter((c) => c.label === "Description" ? !1 : !["Connection", "Database", "Schema"].includes(c.label)).slice(0, 3);
14677
14677
  return /* @__PURE__ */ s(
@@ -14761,7 +14761,7 @@ function Jm({
14761
14761
  className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
14762
14762
  onClick: a,
14763
14763
  title: "Hide Data Source Panel",
14764
- children: /* @__PURE__ */ e(dl, { className: "h-3.5 w-3.5" })
14764
+ children: /* @__PURE__ */ e(cl, { className: "h-3.5 w-3.5" })
14765
14765
  }
14766
14766
  ),
14767
14767
  /* @__PURE__ */ s(
@@ -14841,7 +14841,7 @@ function Jm({
14841
14841
  ),
14842
14842
  /* @__PURE__ */ e(Um, {}),
14843
14843
  /* @__PURE__ */ e(
14844
- ul,
14844
+ dl,
14845
14845
  {
14846
14846
  incomingSelectedEntities: (c == null ? void 0 : c.selectedEntities) || [],
14847
14847
  dialogMode: "dataSource",
@@ -14859,7 +14859,7 @@ const na = [
14859
14859
  { id: "table", icon: ka, label: "Table" },
14860
14860
  { id: "bar", icon: Ca, label: "Bar Chart" },
14861
14861
  { id: "line", icon: wa, label: "Line Chart" },
14862
- { id: "area", icon: yl, label: "Area Chart" },
14862
+ { id: "area", icon: gl, label: "Area Chart" },
14863
14863
  { id: "stackedBar", icon: ws, label: "Stacked Bar Chart" },
14864
14864
  { id: "combo", icon: Ec, label: "Combo Chart" },
14865
14865
  {
@@ -14877,7 +14877,7 @@ const na = [
14877
14877
  { id: "tornado", icon: Os, label: "Tornado Chart" },
14878
14878
  { id: "range", icon: Ss, label: "Range Chart" },
14879
14879
  { id: "kpi", icon: Us, label: "KPI" },
14880
- { id: "text", icon: gl, label: "Text" },
14880
+ { id: "text", icon: fl, label: "Text" },
14881
14881
  { id: "map", icon: Ms, label: "Map" }
14882
14882
  ], Gs = (t) => {
14883
14883
  const a = t.toLowerCase();
@@ -14900,7 +14900,7 @@ function Ym() {
14900
14900
  );
14901
14901
  return { standardFirst: t, updatePreference: a };
14902
14902
  }
14903
- const Nr = ({
14903
+ const br = ({
14904
14904
  pluginVisual: t,
14905
14905
  index: a,
14906
14906
  onSelect: n
@@ -14932,7 +14932,7 @@ const Nr = ({
14932
14932
  },
14933
14933
  `${t.url}-${t.name}-${a}`
14934
14934
  );
14935
- }, Cr = [
14935
+ }, Nr = [
14936
14936
  "default",
14937
14937
  "standardPlugin",
14938
14938
  "customPlugin"
@@ -14950,15 +14950,15 @@ function Qm({
14950
14950
  (C) => C.actions
14951
14951
  ), { setCardCustomCfg: f, setCustomCardPreferences: g, setQueryConfig: y } = se(), [p, b] = ps("chart-section-active", null), v = Be(() => p ? [
14952
14952
  p,
14953
- ...Cr.filter((C) => C !== p)
14954
- ] : Cr, [p]);
14955
- Me(() => {
14953
+ ...Nr.filter((C) => C !== p)
14954
+ ] : Nr, [p]);
14955
+ Te(() => {
14956
14956
  (async () => {
14957
14957
  if (c) {
14958
14958
  const k = (await Promise.allSettled(
14959
14959
  c.plugins.map(async (R) => {
14960
14960
  try {
14961
- return (await rl(R.value)).visuals.map((L) => ({
14961
+ return (await sl(R.value)).visuals.map((L) => ({
14962
14962
  name: L.name,
14963
14963
  icon: L.icon,
14964
14964
  url: R.value,
@@ -15110,7 +15110,7 @@ function Qm({
15110
15110
  ] }),
15111
15111
  className: "[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
15112
15112
  children: T.filter((k) => k.componentType === "chart").map((k, R) => /* @__PURE__ */ e(
15113
- Nr,
15113
+ br,
15114
15114
  {
15115
15115
  pluginVisual: k,
15116
15116
  index: R,
@@ -15151,7 +15151,7 @@ function Qm({
15151
15151
  ] }),
15152
15152
  className: "[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
15153
15153
  children: T.map((k, R) => /* @__PURE__ */ e(
15154
- Nr,
15154
+ br,
15155
15155
  {
15156
15156
  pluginVisual: k,
15157
15157
  index: R,
@@ -15175,7 +15175,7 @@ const Zm = ({
15175
15175
  }) => {
15176
15176
  const n = Ma(), r = Gs(a);
15177
15177
  return n ? /* @__PURE__ */ e(n, { className: "h-4 w-4" }) : r || /* @__PURE__ */ e(Tn, { className: "h-4 w-4" });
15178
- }, yi = ({ dataType: t }) => {
15178
+ }, gi = ({ dataType: t }) => {
15179
15179
  const a = Qe(t);
15180
15180
  return a === "string" ? /* @__PURE__ */ e("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-sm bg-blue-500 text-xs text-white", children: "T" }) : a === "number" ? /* @__PURE__ */ e("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-sm bg-green-500 text-xs text-white", children: "#" }) : a === "date" ? /* @__PURE__ */ e("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-sm bg-purple-500 text-xs text-white", children: "D" }) : a === "boolean" ? /* @__PURE__ */ e("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-sm bg-orange-500 text-xs text-white", children: "B" }) : /* @__PURE__ */ e("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-sm bg-gray-500 text-xs text-white", children: "?" });
15181
15181
  };
@@ -15361,7 +15361,7 @@ function eh({
15361
15361
  ] })
15362
15362
  ] });
15363
15363
  }
15364
- function wr({
15364
+ function Cr({
15365
15365
  value: t,
15366
15366
  onSave: a,
15367
15367
  placeholder: n = "",
@@ -15432,7 +15432,7 @@ function th({
15432
15432
  hasPivotColumns: i = !1,
15433
15433
  cardType: c
15434
15434
  }) {
15435
- var Js;
15435
+ var Ks;
15436
15436
  const {
15437
15437
  attributes: o,
15438
15438
  listeners: d,
@@ -15478,7 +15478,7 @@ function th({
15478
15478
  }, pe = {
15479
15479
  transform: It.Transform.toString(h),
15480
15480
  transition: m
15481
- }, be = Qe(t.dataType), he = be === "date", Te = c === "kpi", X = [
15481
+ }, be = Qe(t.dataType), he = be === "date", Oe = c === "kpi", X = [
15482
15482
  { value: "MM-DD-YYYY", label: "01-15-2024 (MM-DD-YYYY)" },
15483
15483
  { value: "YYYY-MM-DD", label: "2024-01-15 (YYYY-MM-DD)" },
15484
15484
  { value: "MM/DD/YYYY", label: "01/15/2024 (MM/DD/YYYY)" },
@@ -15489,7 +15489,7 @@ function th({
15489
15489
  { value: "YYYY-MM", label: "2024-01 (YYYY-MM)" },
15490
15490
  { value: "MMMM YYYY", label: "January 2024 (MMMM YYYY)" },
15491
15491
  { value: "custom", label: "Custom Format..." }
15492
- ], F = !Te && a !== "pivotBy", re = Te && he && a === "groupBy", Ae = !Te && he && a === "groupBy", bt = Te && he && a === "groupBy", _t = Te && a === "metrics" && ((Js = g.config) == null ? void 0 : Js.comparisonType) === "target", fe = a === "metrics", _e = () => /* @__PURE__ */ e(
15492
+ ], F = !Oe && a !== "pivotBy", re = he && a === "groupBy", Ae = !Oe && he && a === "groupBy", bt = Oe && he && a === "groupBy", _t = Oe && a === "metrics" && ((Ks = g.config) == null ? void 0 : Ks.comparisonType) === "target", fe = a === "metrics", _e = () => /* @__PURE__ */ e(
15493
15493
  "div",
15494
15494
  {
15495
15495
  onPointerDown: (ce) => {
@@ -15499,14 +15499,14 @@ function th({
15499
15499
  children: `${t.entityName}.${t.name}`
15500
15500
  }
15501
15501
  ), Pe = () => F ? /* @__PURE__ */ e(
15502
- wr,
15502
+ Cr,
15503
15503
  {
15504
15504
  value: t.label ?? "",
15505
15505
  onSave: W,
15506
15506
  placeholder: "Display label...",
15507
15507
  type: "text"
15508
15508
  }
15509
- ) : null, Ks = () => re ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
15509
+ ) : null, xi = () => re ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
15510
15510
  /* @__PURE__ */ e(Q, { className: "text-xs font-medium text-muted-foreground", children: "Granularity" }),
15511
15511
  /* @__PURE__ */ s(
15512
15512
  ge,
@@ -15525,39 +15525,36 @@ function th({
15525
15525
  ]
15526
15526
  }
15527
15527
  )
15528
- ] }) : null, bi = () => Ae ? /* @__PURE__ */ s(ne, { children: [
15529
- Ks(),
15530
- /* @__PURE__ */ s("div", { className: "space-y-1", children: [
15531
- /* @__PURE__ */ e(Q, { className: "text-xs font-medium text-muted-foreground", children: "Date Format" }),
15532
- /* @__PURE__ */ s(
15533
- ge,
15528
+ ] }) : null, bi = () => Ae ? /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ s("div", { className: "space-y-1", children: [
15529
+ /* @__PURE__ */ e(Q, { className: "text-xs font-medium text-muted-foreground", children: "Date Format" }),
15530
+ /* @__PURE__ */ s(
15531
+ ge,
15532
+ {
15533
+ value: O ? "custom" : L,
15534
+ onValueChange: K,
15535
+ children: [
15536
+ /* @__PURE__ */ e(ye, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(ve, { placeholder: "Select date format..." }) }),
15537
+ /* @__PURE__ */ e(xe, { children: X.map((ce) => /* @__PURE__ */ e(te, { value: ce.value, children: ce.label }, ce.value)) })
15538
+ ]
15539
+ }
15540
+ ),
15541
+ O && /* @__PURE__ */ s("div", { className: "mt-2 space-y-1", children: [
15542
+ /* @__PURE__ */ e(
15543
+ ze,
15534
15544
  {
15535
- value: O ? "custom" : L,
15536
- onValueChange: K,
15537
- children: [
15538
- /* @__PURE__ */ e(ye, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(ve, { placeholder: "Select date format..." }) }),
15539
- /* @__PURE__ */ e(xe, { children: X.map((ce) => /* @__PURE__ */ e(te, { value: ce.value, children: ce.label }, ce.value)) })
15540
- ]
15545
+ placeholder: "Enter custom format (e.g., YYYY-MM-DD HH:mm)",
15546
+ value: I,
15547
+ onChange: (ce) => {
15548
+ ce.stopPropagation(), J(ce.target.value);
15549
+ },
15550
+ onClick: (ce) => ce.stopPropagation(),
15551
+ className: "h-8 text-xs"
15541
15552
  }
15542
15553
  ),
15543
- O && /* @__PURE__ */ s("div", { className: "mt-2 space-y-1", children: [
15544
- /* @__PURE__ */ e(
15545
- ze,
15546
- {
15547
- placeholder: "Enter custom format (e.g., YYYY-MM-DD HH:mm)",
15548
- value: I,
15549
- onChange: (ce) => {
15550
- ce.stopPropagation(), J(ce.target.value);
15551
- },
15552
- onClick: (ce) => ce.stopPropagation(),
15553
- className: "h-8 text-xs"
15554
- }
15555
- ),
15556
- /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Examples: YYYY-MM-DD, MM/DD/YY, DD-MMM-YYYY HH:mm" })
15557
- ] })
15554
+ /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Examples: YYYY-MM-DD, MM/DD/YY, DD-MMM-YYYY HH:mm" })
15558
15555
  ] })
15559
- ] }) : null, Ni = () => {
15560
- var ce, Nt, tn, Ws, Ys;
15556
+ ] }) }) : null, Ni = () => {
15557
+ var ce, Nt, tn, Js, Ws;
15561
15558
  return bt ? /* @__PURE__ */ s(ne, { children: [
15562
15559
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
15563
15560
  /* @__PURE__ */ e(Q, { className: "text-xs font-medium text-muted-foreground", children: "Comparison Type" }),
@@ -15597,7 +15594,7 @@ function th({
15597
15594
  type: "number",
15598
15595
  min: "1",
15599
15596
  max: "365",
15600
- value: ((Ws = g.config) == null ? void 0 : Ws.trendlineWindow) || 30,
15597
+ value: ((Js = g.config) == null ? void 0 : Js.trendlineWindow) || 30,
15601
15598
  onChange: (Si) => {
15602
15599
  const ki = parseInt(Si.target.value) || 30;
15603
15600
  C(ki);
@@ -15612,7 +15609,7 @@ function th({
15612
15609
  /* @__PURE__ */ s(
15613
15610
  ge,
15614
15611
  {
15615
- value: ((Ys = g.config) == null ? void 0 : Ys.trendlineGranularity) || "day",
15612
+ value: ((Ws = g.config) == null ? void 0 : Ws.trendlineGranularity) || "day",
15616
15613
  onValueChange: T,
15617
15614
  children: [
15618
15615
  /* @__PURE__ */ e(ye, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(ve, { placeholder: "Select granularity..." }) }),
@@ -15632,7 +15629,7 @@ function th({
15632
15629
  return _t ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
15633
15630
  /* @__PURE__ */ e(Q, { className: "text-xs font-medium text-muted-foreground", children: "Target Value" }),
15634
15631
  /* @__PURE__ */ e(
15635
- wr,
15632
+ Cr,
15636
15633
  {
15637
15634
  value: ((ce = g.config) == null ? void 0 : ce.targetValue) !== void 0 && ((Nt = g.config) == null ? void 0 : Nt.targetValue) !== null ? String(g.config.targetValue) : "",
15638
15635
  onSave: (tn) => {
@@ -15670,7 +15667,7 @@ function th({
15670
15667
  }
15671
15668
  )
15672
15669
  ] }),
15673
- /* @__PURE__ */ e(mi, { column: t }),
15670
+ /* @__PURE__ */ e(ui, { column: t }),
15674
15671
  i && /* @__PURE__ */ s(ne, { children: [
15675
15672
  /* @__PURE__ */ e(
15676
15673
  Xm,
@@ -15699,7 +15696,7 @@ function th({
15699
15696
  children: [
15700
15697
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
15701
15698
  /* @__PURE__ */ e(yn, { className: "h-3 w-3" }),
15702
- /* @__PURE__ */ e(yi, { dataType: be }),
15699
+ /* @__PURE__ */ e(gi, { dataType: be }),
15703
15700
  /* @__PURE__ */ e($s, { className: "max-w-[180px] flex-1 text-sm", children: t.label || t.name }),
15704
15701
  a !== "sortBy" && /* @__PURE__ */ e(
15705
15702
  V,
@@ -15754,7 +15751,7 @@ function th({
15754
15751
  R && /* @__PURE__ */ s("div", { className: "space-y-3", children: [
15755
15752
  _e(),
15756
15753
  Pe(),
15757
- Ks(),
15754
+ xi(),
15758
15755
  bi(),
15759
15756
  Ni(),
15760
15757
  Ci(),
@@ -16280,7 +16277,7 @@ function lh({
16280
16277
  const ih = (t) => {
16281
16278
  switch (t) {
16282
16279
  case "table":
16283
- return /* @__PURE__ */ e(ir, { className: "h-3 w-3" });
16280
+ return /* @__PURE__ */ e(lr, { className: "h-3 w-3" });
16284
16281
  case "view":
16285
16282
  return /* @__PURE__ */ e(Nn, { className: "h-3 w-3" });
16286
16283
  case "dataset":
@@ -16288,7 +16285,7 @@ const ih = (t) => {
16288
16285
  case "file":
16289
16286
  return /* @__PURE__ */ e(Vc, { className: "h-3 w-3" });
16290
16287
  default:
16291
- return /* @__PURE__ */ e(ir, { className: "h-3 w-3" });
16288
+ return /* @__PURE__ */ e(lr, { className: "h-3 w-3" });
16292
16289
  }
16293
16290
  }, oh = (t) => {
16294
16291
  if (t.qualifiedEntityName) {
@@ -16383,7 +16380,7 @@ function ch({
16383
16380
  }
16384
16381
  function Hs(t) {
16385
16382
  var y;
16386
- const a = E((p) => p.card), { authToken: n } = Oe(), r = E((p) => p.card.config), l = r == null ? void 0 : r.joinPlan, i = {
16383
+ const a = E((p) => p.card), { authToken: n } = Ee(), r = E((p) => p.card.config), l = r == null ? void 0 : r.joinPlan, i = {
16387
16384
  ...t,
16388
16385
  alias: t.name,
16389
16386
  // we need exact field name in the output for the filters to work.
@@ -16517,11 +16514,11 @@ function dh({
16517
16514
  ] }) })
16518
16515
  ] }) });
16519
16516
  }
16520
- const vi = (t) => {
16517
+ const yi = (t) => {
16521
16518
  if (!t) return 0;
16522
16519
  let a = t.conditions.length;
16523
16520
  return t.groups.forEach((n) => {
16524
- a += vi(n);
16521
+ a += yi(n);
16525
16522
  }), a;
16526
16523
  };
16527
16524
  function uh({
@@ -16533,7 +16530,7 @@ function uh({
16533
16530
  }) {
16534
16531
  const { filterValues: i, isPending: c, error: o } = Hs(t);
16535
16532
  return c ? /* @__PURE__ */ s("div", { className: "flex flex-1 items-center justify-center p-2 text-xs text-gray-500", children: [
16536
- /* @__PURE__ */ e(Ee, { className: "mr-2 size-3.5 animate-spin" }),
16533
+ /* @__PURE__ */ e(Me, { className: "mr-2 size-3.5 animate-spin" }),
16537
16534
  " Loading values..."
16538
16535
  ] }) : o ? /* @__PURE__ */ e("div", { className: "flex-1 p-2 text-xs text-red-500", children: "Error loading values" }) : /* @__PURE__ */ s(ge, { value: a, onValueChange: n, children: [
16539
16536
  /* @__PURE__ */ e(ye, { className: l || "flex-1", children: /* @__PURE__ */ e(ve, { placeholder: r, children: a }) }),
@@ -16601,7 +16598,7 @@ function yh(t) {
16601
16598
  return mh;
16602
16599
  }
16603
16600
  }
16604
- function xi({
16601
+ function vi({
16605
16602
  condition: t,
16606
16603
  index: a,
16607
16604
  groupId: n,
@@ -16693,7 +16690,7 @@ function xi({
16693
16690
  }
16694
16691
  ),
16695
16692
  Qe(t.field.dataType) === "string" ? t.operator === "in" || t.operator === "not in" ? p ? /* @__PURE__ */ s("div", { className: "flex flex-1 items-center justify-center p-2 text-xs text-gray-500", children: [
16696
- /* @__PURE__ */ e(Ee, { className: "mr-2 size-3.5 animate-spin" }),
16693
+ /* @__PURE__ */ e(Me, { className: "mr-2 size-3.5 animate-spin" }),
16697
16694
  " Loading values..."
16698
16695
  ] }) : b ? /* @__PURE__ */ e("div", { className: "flex-1 p-2 text-xs text-red-500", children: "Error loading values" }) : /* @__PURE__ */ e(
16699
16696
  dh,
@@ -16883,7 +16880,7 @@ function vh({
16883
16880
  items: t.conditions.map((k) => k.id),
16884
16881
  strategy: kn,
16885
16882
  children: t.conditions.map((k, R) => /* @__PURE__ */ e(
16886
- xi,
16883
+ vi,
16887
16884
  {
16888
16885
  condition: k,
16889
16886
  index: R,
@@ -17026,7 +17023,7 @@ function xh({
17026
17023
  items: D.conditions.map((I) => I.id),
17027
17024
  strategy: kn,
17028
17025
  children: D.conditions.map((I, x) => /* @__PURE__ */ e(
17029
- xi,
17026
+ vi,
17030
17027
  {
17031
17028
  condition: I,
17032
17029
  index: x,
@@ -17122,7 +17119,7 @@ function xh({
17122
17119
  updateConditionFields: g
17123
17120
  },
17124
17121
  D.id
17125
- ), R = vi(t);
17122
+ ), R = yi(t);
17126
17123
  return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
17127
17124
  /* @__PURE__ */ e(Jt, { children: /* @__PURE__ */ e(Wt, { className: "p-4", children: /* @__PURE__ */ s("div", { className: "space-y-4", children: [
17128
17125
  o ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center p-4", children: [
@@ -17258,7 +17255,7 @@ function Nh({
17258
17255
  }
17259
17256
  if (k !== M.qualifiedEntityName && M.qualifiedEntityName)
17260
17257
  if (o) {
17261
- if (!gi(
17258
+ if (!fi(
17262
17259
  k,
17263
17260
  M.qualifiedEntityName,
17264
17261
  o
@@ -17332,7 +17329,7 @@ function Ch({
17332
17329
  onAccept: n
17333
17330
  }) {
17334
17331
  const r = E((g) => g.isDevMode), l = E((g) => g.card);
17335
- Xr(l);
17332
+ Zr(l);
17336
17333
  const { config: i } = mc(rc).tokenProps, c = (i == null ? void 0 : i.showAdvancedMode) !== !1, { setIsDevMode: o } = se(), d = E((g) => g.showAIDialog), u = E((g) => g.frame), h = Ua((g) => g.selectedVisual), m = (h == null ? void 0 : h.id) === (u == null ? void 0 : u.id), { setShowAIDialog: f } = se();
17337
17334
  return /* @__PURE__ */ s(
17338
17335
  "div",
@@ -17454,7 +17451,7 @@ function Dh({
17454
17451
  isOpen: t,
17455
17452
  onClose: a
17456
17453
  }) {
17457
- const n = Fl(a, {
17454
+ const n = Ll(a, {
17458
17455
  enabled: t
17459
17456
  }), r = E(
17460
17457
  (h) => {
@@ -17497,7 +17494,7 @@ function Dh({
17497
17494
  }
17498
17495
  )
17499
17496
  ] }),
17500
- /* @__PURE__ */ e("div", { className: "h-full min-h-0 flex-1", children: u && /* @__PURE__ */ e(fl, { fallback: /* @__PURE__ */ e("div", { children: "Loading chart settings..." }), children: /* @__PURE__ */ e(
17497
+ /* @__PURE__ */ e("div", { className: "h-full min-h-0 flex-1", children: u && /* @__PURE__ */ e(pl, { fallback: /* @__PURE__ */ e("div", { children: "Loading chart settings..." }), children: /* @__PURE__ */ e(
17501
17498
  u,
17502
17499
  {
17503
17500
  chartData: (o == null ? void 0 : o.records) || [],
@@ -17583,7 +17580,7 @@ function Th({
17583
17580
  (B) => B.label === O
17584
17581
  ), U = j || $;
17585
17582
  return U ? {
17586
- id: pi("sortBy", U),
17583
+ id: hi("sortBy", U),
17587
17584
  name: U.name,
17588
17585
  dataType: U.dataType,
17589
17586
  label: U.label,
@@ -17623,7 +17620,7 @@ function Th({
17623
17620
  /* @__PURE__ */ s("div", { className: "group/visualization relative flex h-full max-w-full grow flex-col pt-4", children: [
17624
17621
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2 px-6", children: [
17625
17622
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2", children: [
17626
- t === "chart" && b && /* @__PURE__ */ e(si, { variant: "outline" }),
17623
+ t === "chart" && b && /* @__PURE__ */ e(ai, { variant: "outline" }),
17627
17624
  /* @__PURE__ */ e(wh, { activeView: t, onViewChange: a }),
17628
17625
  o && /* @__PURE__ */ s(
17629
17626
  le,
@@ -17640,7 +17637,7 @@ function Th({
17640
17637
  /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(kh, {}) }),
17641
17638
  b && /* @__PURE__ */ e(Ta, {})
17642
17639
  ] }),
17643
- /* @__PURE__ */ e("div", { className: G("flex grow items-center justify-end"), children: t === "chart" && /* @__PURE__ */ e(ri, {}) })
17640
+ /* @__PURE__ */ e("div", { className: G("flex grow items-center justify-end"), children: t === "chart" && /* @__PURE__ */ e(si, {}) })
17644
17641
  ] }),
17645
17642
  !v && w && /* @__PURE__ */ e(
17646
17643
  le,
@@ -17653,11 +17650,11 @@ function Th({
17653
17650
  }
17654
17651
  ),
17655
17652
  /* @__PURE__ */ s("div", { className: "flex grow flex-col", children: [
17656
- t === "chart" && /* @__PURE__ */ e("div", { className: "flex grow flex-col pb-6", children: C || T ? /* @__PURE__ */ e("div", { className: "m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Ee, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) : /* @__PURE__ */ e(li, {}) }),
17653
+ t === "chart" && /* @__PURE__ */ e("div", { className: "flex grow flex-col pb-6", children: C || T ? /* @__PURE__ */ e("div", { className: "m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Me, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) : /* @__PURE__ */ e(ri, {}) }),
17657
17654
  t === "table" && (z == null ? void 0 : z.records) && /* @__PURE__ */ s("div", { className: "relative flex h-full min-h-0 max-w-full flex-1 grow basis-0 p-6", children: [
17658
- (C || T) && /* @__PURE__ */ e("div", { className: "absolute flex h-full w-full items-center justify-between", children: /* @__PURE__ */ e("div", { className: "z-10 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Ee, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
17655
+ (C || T) && /* @__PURE__ */ e("div", { className: "absolute flex h-full w-full items-center justify-between", children: /* @__PURE__ */ e("div", { className: "z-10 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Me, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
17659
17656
  /* @__PURE__ */ e(
17660
- nl,
17657
+ tl,
17661
17658
  {
17662
17659
  card: u,
17663
17660
  data: z == null ? void 0 : z.records,
@@ -17668,7 +17665,7 @@ function Th({
17668
17665
  ] }),
17669
17666
  t === "sql" && /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ s("div", { className: "rounded-md border bg-background p-4", children: [
17670
17667
  (z == null ? void 0 : z.sql) && /* @__PURE__ */ e("h3", { className: "mb-3 text-sm font-medium", children: "Generated SQL Query" }),
17671
- /* @__PURE__ */ e(Ql, { sql: z == null ? void 0 : z.sql, error: M })
17668
+ /* @__PURE__ */ e(Yl, { sql: z == null ? void 0 : z.sql, error: M })
17672
17669
  ] }) })
17673
17670
  ] }),
17674
17671
  /* @__PURE__ */ e(
@@ -17683,7 +17680,7 @@ function Th({
17683
17680
  }
17684
17681
  function Mh({ activeField: t }) {
17685
17682
  const [a, n] = P(!0);
17686
- return Me(() => {
17683
+ return Te(() => {
17687
17684
  t && n(!0);
17688
17685
  }, [t]), t ? /* @__PURE__ */ s(
17689
17686
  "div",
@@ -17691,7 +17688,7 @@ function Mh({ activeField: t }) {
17691
17688
  className: `flex max-w-[300px] items-center gap-2 rounded-lg border border-blue-500 bg-background p-2 shadow-lg transition-all duration-200 ${a ? "scale-100 opacity-100" : "scale-95 opacity-0"}`,
17692
17689
  children: [
17693
17690
  /* @__PURE__ */ e(yn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
17694
- /* @__PURE__ */ e(yi, { dataType: t.dataType }),
17691
+ /* @__PURE__ */ e(gi, { dataType: t.dataType }),
17695
17692
  /* @__PURE__ */ e("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap text-sm dark:text-muted-foreground", children: t.label || t.name })
17696
17693
  ]
17697
17694
  }
@@ -17729,7 +17726,7 @@ function Oh() {
17729
17726
  const [t, a] = P(
17730
17727
  "chart"
17731
17728
  ), [n, r] = P(!1), [l, i] = P(!1), [c, o] = P(!0), d = E((J) => J.showAIDialog), u = Y((J) => J.isVisualEditing), { setCardType: h } = se(), m = E((J) => J.card.type);
17732
- Me(() => Eh(), []);
17729
+ Te(() => Eh(), []);
17733
17730
  const f = () => {
17734
17731
  console.log("Accept clicked - would save/apply current configuration");
17735
17732
  }, g = () => {
@@ -17857,7 +17854,7 @@ function Oh() {
17857
17854
  onOpenChange: i
17858
17855
  }
17859
17856
  ),
17860
- /* @__PURE__ */ e(Jr, { dropAnimation: null, children: /* @__PURE__ */ e(Mh, { activeField: x || null }) })
17857
+ /* @__PURE__ */ e(Kr, { dropAnimation: null, children: /* @__PURE__ */ e(Mh, { activeField: x || null }) })
17861
17858
  ]
17862
17859
  }
17863
17860
  );
@@ -17870,11 +17867,11 @@ function Ih({ authToken: t, onSave: a, onClose: n }) {
17870
17867
  handleDragCancel: g,
17871
17868
  sensors: y
17872
17869
  } = xu();
17873
- Me(() => {
17870
+ Te(() => {
17874
17871
  a && d(a), n && u(n);
17875
- }, [a, d, n, u]), Me(() => {
17872
+ }, [a, d, n, u]), Te(() => {
17876
17873
  t && t.accessToken && c(t);
17877
- }, [t, c]), Me(() => {
17874
+ }, [t, c]), Te(() => {
17878
17875
  var N, w;
17879
17876
  l ? ((N = r.current) == null || N.resize(40), o(!0)) : (o(!1), (w = r.current) == null || w.resize(0));
17880
17877
  }, [l, o]);
@@ -17883,7 +17880,7 @@ function Ih({ authToken: t, onSave: a, onClose: n }) {
17883
17880
  }
17884
17881
  function b() {
17885
17882
  return /* @__PURE__ */ s(ne, { children: [
17886
- /* @__PURE__ */ e(Wl, { type: "main" }),
17883
+ /* @__PURE__ */ e(Jl, { type: "main" }),
17887
17884
  /* @__PURE__ */ s(
17888
17885
  Dt,
17889
17886
  {
@@ -17900,7 +17897,7 @@ function Ih({ authToken: t, onSave: a, onClose: n }) {
17900
17897
  ref: r,
17901
17898
  onResize: p,
17902
17899
  defaultSize: 0,
17903
- children: /* @__PURE__ */ e(xr, {})
17900
+ children: /* @__PURE__ */ e(vr, {})
17904
17901
  }
17905
17902
  )
17906
17903
  ]
@@ -17925,14 +17922,14 @@ function Ih({ authToken: t, onSave: a, onClose: n }) {
17925
17922
  ref: r,
17926
17923
  onResize: p,
17927
17924
  defaultSize: 0,
17928
- children: /* @__PURE__ */ e(xr, {})
17925
+ children: /* @__PURE__ */ e(vr, {})
17929
17926
  }
17930
17927
  )
17931
17928
  ]
17932
17929
  }
17933
17930
  );
17934
17931
  }
17935
- return /* @__PURE__ */ e(ya, { FallbackComponent: pl, children: i ? /* @__PURE__ */ e(
17932
+ return /* @__PURE__ */ e(ya, { FallbackComponent: hl, children: i ? /* @__PURE__ */ e(
17936
17933
  on,
17937
17934
  {
17938
17935
  sensors: y,
@@ -17972,7 +17969,7 @@ function Ah() {
17972
17969
  );
17973
17970
  }
17974
17971
  function Rh() {
17975
- const t = E((i) => i.selectedDatabaseName), a = E((i) => i.selectedTableName), n = Y((i) => i.dashboard.filters) || [], { columns: r } = ot(), { assignFilter: l } = di();
17972
+ const t = E((i) => i.selectedDatabaseName), a = E((i) => i.selectedTableName), n = Y((i) => i.dashboard.filters) || [], { columns: r } = ot(), { assignFilter: l } = ci();
17976
17973
  return /* @__PURE__ */ e(rt, { className: "flex-1 basis-0 flex-col px-3", children: r == null ? void 0 : r.map((i) => {
17977
17974
  const c = n == null ? void 0 : n.find(
17978
17975
  (o) => o.column === et(i.column_name) && o.table === a && o.database === t
@@ -18015,7 +18012,7 @@ function zh() {
18015
18012
  )
18016
18013
  ] }),
18017
18014
  /* @__PURE__ */ e("div", { className: "flex grow", children: /* @__PURE__ */ e(
18018
- Wl,
18015
+ Jl,
18019
18016
  {
18020
18017
  type: "filter",
18021
18018
  ColumnsComponent: () => (
@@ -18043,8 +18040,8 @@ function Lh() {
18043
18040
  {
18044
18041
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
18045
18042
  children: [
18046
- /* @__PURE__ */ e(il, { filter: r }),
18047
- /* @__PURE__ */ e(tl, { filter: r })
18043
+ /* @__PURE__ */ e(ll, { filter: r }),
18044
+ /* @__PURE__ */ e(el, { filter: r })
18048
18045
  ]
18049
18046
  },
18050
18047
  r.id
@@ -18140,7 +18137,7 @@ function Bh({
18140
18137
  showFooter: a = !0,
18141
18138
  ...n
18142
18139
  }) {
18143
- return /* @__PURE__ */ e(ya, { FallbackComponent: pl, children: /* @__PURE__ */ s(oc, { dashboardProps: n, children: [
18140
+ return /* @__PURE__ */ e(ya, { FallbackComponent: hl, children: /* @__PURE__ */ s(oc, { dashboardProps: n, children: [
18144
18141
  /* @__PURE__ */ e(cc, {}),
18145
18142
  /* @__PURE__ */ s(dc, { children: [
18146
18143
  /* @__PURE__ */ e(_h, {}),
@@ -18161,5 +18158,5 @@ export {
18161
18158
  xn as a,
18162
18159
  ud as c,
18163
18160
  yd as d,
18164
- Tl as g
18161
+ Dl as g
18165
18162
  };