react-semaphor 0.0.595 → 0.0.596

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
1
  var gr = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var Gn = (t, a, n) => a.has(t) || gr("Cannot " + n);
5
- var Ae = (t, a, n) => (Gn(t, a, "read from private field"), n ? n.call(t) : a.get(t)), wa = (t, a, n) => a.has(t) ? gr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, n), Sa = (t, a, n, r) => (Gn(t, a, "write to private field"), r ? r.call(t, n) : a.set(t, n), n), ka = (t, a, n) => (Gn(t, a, "access private method"), n);
4
+ var Jn = (t, a, n) => a.has(t) || gr("Cannot " + n);
5
+ var Ae = (t, a, n) => (Jn(t, a, "read from private field"), n ? n.call(t) : a.get(t)), wa = (t, a, n) => a.has(t) ? gr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, n), Sa = (t, a, n, r) => (Jn(t, a, "write to private field"), r ? r.call(t, n) : a.set(t, n), n), ka = (t, a, n) => (Jn(t, a, "access private method"), n);
6
6
  import { jsxs as s, jsx as e, Fragment as se } from "react/jsx-runtime";
7
- import { E as Li, F as Pi, G as xr, H as _i, I as Kr, J as tt, K as Vi, L as ji, M as re, N as Cs, w as Z, A as wt, O as Me, P as Zt, Q as Jr, R as _, T as $e, U as ea, V as ta, W as aa, X as ga, Y as V, Z as De, _ as Ta, $ as Fa, a0 as za, a1 as ye, a2 as La, a3 as Wr, a4 as Ma, a5 as Bi, a6 as yr, a7 as Hr, a8 as J, a9 as ws, aa as Fe, ab as Ui, ac as de, ad as ue, ae as me, af as he, ag as Aa, ah as Ea, ai as X, aj as Qr, ak as mt, al as ht, am as $i, an as St, ao as it, ap as oa, aq as _e, ar as je, as as Be, at as Qe, au as En, av as He, aw as ln, ax as qi, ay as kt, az as xa, aA as Pa, aB as st, aC as Ie, aD as dt, aE as Ss, aF as Yi, aG as Wt, aH as Xr, aI as yt, aJ as Zr, aK as bt, aL as on, aM as _a, aN as Re, aO as ce, aP as ke, aQ as Va, aR as Dt, aS as ja, aT as Gi, aU as ca, aV as Ze, aW as cn, aX as nt, aY as Wa, aZ as el, a_ as rs, a$ as Tt, b0 as va, b1 as dn, b2 as un, b3 as tl, b4 as Na, b5 as ks, b6 as Ds, b7 as Ts, b8 as Ms, b9 as Ba, ba as mn, bb as al, bc as As, bd as zn, be as Es, bf as Ki, bg as Is, bh as Ji, bi as Wi, bj as _t, bk as Vt, bl as Ee, bm as Ht, bn as nl, C as le, bo as Nt, B as A, bp as Ln, bq as sl, br as rl, bs as ll, bt as il, bu as ol, bv as cl, bw as dl, bx as ul, by as Hi, bz as Qi, bA as Da, bB as Os, bC as Xi, bD as Zi, bE as eo, bF as ml, bG as Ha, bH as da, bI as hn, bJ as pn, bK as fn, bL as gn, bM as ua, bN as Ua, bO as Ct, bP as Pn, v as Mt, bQ as Rs, m as hl, l as pl, f as vt, bR as Pe, bS as to, bT as na, bU as Qt, bV as fl, bW as ao, e as gl, bX as Qa, bY as Yt, bZ as no, h as Xt, g as It, j as Ot, b_ as ls, b$ as Fs, c0 as zs, c1 as _n, c2 as sa, q as vr, c3 as Ve, c4 as Ls, c5 as Mn, c6 as Ps, c7 as so, c8 as ro, c9 as lo, ca as io, cb as xl, cc as oo, cd as Vn, ce as co, cf as Ia, cg as uo, ch as is, ci as Gt, cj as Ge, ck as Kt, cl as mo, cm as ho, cn as po, co as _s, cp as fo, cq as Vs, cr as js, cs as go, ct as yl, cu as vl, cv as xo, cw as yo, cx as Xa, cy as vo, cz as Bs, cA as No, cB as bo, cC as Nr, cD as Co, cE as xn, cF as Us, cG as $s, cH as wo, cI as So, cJ as ko, cK as Do, cL as To, cM as Nl, cN as qs, cO as bl, cP as Cl, cQ as wl, cR as Sl, cS as kl, cT as Ys, cU as Gs, cV as Dl, cW as Tl, cX as Ml, cY as jn, cZ as Bn, c_ as Mo, c$ as Ao, d0 as Eo, d1 as Io, d2 as Oo, d3 as Ro, d4 as Fo, d5 as zo, d6 as Xe, d7 as et, d8 as be, d9 as Ce, da as we, db as Lo, dc as Po, dd as _o, de as Vo, df as jo, s as Bo, dg as br, dh as Al, di as Uo, dj as $o, dk as wn, dl as Cr, dm as qo, dn as wr, dp as Sr, dq as Yo, dr as Go, ds as Ko, dt as Jo, du as Ks, dv as Js, dw as Ws, dx as $a, dy as Hs, dz as ra, dA as Wo, dB as Un, dC as El, dD as Kn, dE as Ho, dF as Qo, dG as kr, dH as Xo, dI as Zo, dJ as ec, dK as tc, dL as ac, r as Dr, dM as Tr, dN as nc, dO as sc, dP as rc, dQ as lc, dR as ic, dS as oc, dT as cc, dU as dc, dV as uc, dW as mc, dX as hc, dY as pc, dZ as fc, d_ as gc, d$ as xc, e0 as yc, e1 as vc, e2 as Nc, e3 as bc, e4 as Qs, e5 as Jn, e6 as Cc, e7 as wc, e8 as os, e9 as Sc, ea as cs, eb as ds, ec as qa, ed as kc, ee as Mr, ef as Dc, eg as us, eh as Il, ei as Xs, ej as Tc, ek as Mc, el as Wn, em as Zs, en as Ac, eo as Ec, ep as Ic, eq as Za, er as Oc, es as ms, et as Rc, eu as Fc, ev as zc, ew as Lc, ex as hs, ey as ps, ez as In, eA as Pc, eB as Oa, eC as en, eD as _c, eE as Vc, eF as jc, eG as Bc, eH as Uc, eI as Ol, eJ as $c, eK as qc, k as Yc, eL as Gc, x as Kc, eM as Jc, eN as Wc, S as Hc, eO as Qc, eP as Xc, eQ as Zc } from "./index-CEB_fg8r.js";
7
+ import { E as zi, F as Li, G as xr, H as Pi, I as Kr, J as tt, K as _i, L as Vi, M as re, N as Cs, w as Z, A as wt, O as Me, P as Zt, Q as Jr, R as _, T as $e, U as ea, V as ta, W as aa, X as ga, Y as V, Z as De, _ as Ta, $ as Fa, a0 as za, a1 as ye, a2 as La, a3 as Wr, a4 as Ma, a5 as ji, a6 as yr, a7 as Hr, a8 as J, a9 as ws, aa as Fe, ab as Bi, ac as de, ad as ue, ae as me, af as he, ag as Aa, ah as Ea, ai as X, aj as Qr, ak as mt, al as ht, am as Ui, an as St, ao as it, ap as oa, aq as _e, ar as je, as as Be, at as Qe, au as On, av as He, aw as ln, ax as $i, ay as kt, az as xa, aA as Pa, aB as st, aC as Ie, aD as dt, aE as Ss, aF as qi, aG as Wt, aH as Xr, aI as yt, aJ as Zr, aK as bt, aL as on, aM as _a, aN as Re, aO as ce, aP as ke, aQ as Va, aR as Dt, aS as ja, aT as Yi, aU as ca, aV as Ze, aW as cn, aX as nt, aY as Wa, aZ as el, a_ as is, a$ as Tt, b0 as va, b1 as dn, b2 as un, b3 as Gi, b4 as Na, b5 as ks, b6 as Ds, b7 as Ts, b8 as Ms, b9 as Ba, ba as mn, bb as tl, bc as As, bd as Pn, be as Es, bf as Ki, bg as Is, bh as Ji, bi as Wi, bj as _t, bk as Vt, bl as Ee, bm as Ht, bn as al, C as le, bo as Nt, B as A, bp as _n, bq as nl, br as sl, bs as rl, bt as ll, bu as il, bv as ol, bw as cl, bx as dl, by as Hi, bz as Qi, bA as Da, bB as Os, bC as Xi, bD as Zi, bE as eo, bF as ul, bG as Ha, bH as da, bI as hn, bJ as pn, bK as fn, bL as gn, bM as ua, bN as Ua, bO as Ct, bP as Vn, v as Mt, bQ as Rs, m as ml, l as hl, f as vt, bR as Pe, bS as to, bT as na, bU as Qt, bV as pl, bW as ao, e as fl, bX as Qa, bY as Yt, bZ as no, h as Xt, g as It, j as Ot, b_ as os, b$ as Fs, c0 as zs, c1 as jn, c2 as sa, q as vr, c3 as Ve, c4 as Ls, c5 as Mn, c6 as Ps, c7 as so, c8 as ro, c9 as lo, ca as io, cb as gl, cc as oo, cd as Bn, ce as co, cf as Ia, cg as uo, ch as cs, ci as Gt, cj as Ge, ck as Kt, cl as mo, cm as ho, cn as po, co as _s, cp as fo, cq as Vs, cr as js, cs as go, ct as xl, cu as yl, cv as xo, cw as yo, cx as Xa, cy as vo, cz as Bs, cA as No, cB as bo, cC as Nr, cD as Co, cE as xn, cF as Us, cG as $s, cH as wo, cI as So, cJ as ko, cK as Do, cL as To, cM as vl, cN as qs, cO as Nl, cP as bl, cQ as Cl, cR as wl, cS as Sl, cT as Ys, cU as Gs, cV as kl, cW as Dl, cX as Tl, cY as Un, cZ as $n, c_ as Mo, c$ as Ao, d0 as Eo, d1 as Io, d2 as Oo, d3 as Ro, d4 as Fo, d5 as zo, d6 as Xe, d7 as et, d8 as be, d9 as Ce, da as we, db as Lo, dc as Po, dd as _o, de as Vo, df as jo, s as Bo, dg as br, dh as Ml, di as Uo, dj as $o, dk as wn, dl as Cr, dm as qo, dn as wr, dp as Sr, dq as Yo, dr as Go, ds as Ko, dt as Jo, du as Ks, dv as Js, dw as Ws, dx as $a, dy as Hs, dz as ra, dA as Wo, dB as qn, dC as Al, dD as Wn, dE as Ho, dF as Qo, dG as kr, dH as Xo, dI as Zo, dJ as ec, dK as tc, dL as ac, r as Dr, dM as Tr, dN as nc, dO as sc, dP as rc, dQ as lc, dR as ic, dS as oc, dT as cc, dU as dc, dV as uc, dW as mc, dX as hc, dY as pc, dZ as fc, d_ as gc, d$ as xc, e0 as yc, e1 as vc, e2 as Nc, e3 as bc, e4 as Qs, e5 as Hn, e6 as Cc, e7 as wc, e8 as ds, e9 as Sc, ea as An, eb as En, ec as qa, ed as kc, ee as Mr, ef as Dc, eg as us, eh as El, ei as Xs, ej as Tc, ek as Mc, el as Qn, em as Zs, en as Ac, eo as Ec, ep as Ic, eq as Za, er as Oc, es as ms, et as Rc, eu as Fc, ev as zc, ew as Lc, ex as hs, ey as ps, ez as Rn, eA as Pc, eB as Oa, eC as en, eD as _c, eE as Vc, eF as jc, eG as Bc, eH as Uc, eI as Il, eJ as $c, eK as qc, k as Yc, eL as Gc, x as Kc, eM as Jc, eN as Wc, S as Hc, eO as Qc, eP as Xc, eQ as Zc } from "./index-CYlUGQ4D.js";
8
8
  import * as at from "react";
9
- import ct, { useState as j, useCallback as Ne, useEffect as Te, useRef as zt, useMemo as Ke, Suspense as Rl, useContext as ed } from "react";
9
+ import ct, { useState as j, useCallback as Ne, useEffect as Te, useRef as zt, useMemo as Ke, Suspense as Ol, useContext as ed } from "react";
10
10
  import "react-dom";
11
- var $t, qt, We, Et, Ft, An, fs, Gr, td = (Gr = class extends Li {
11
+ var $t, qt, We, Et, Ft, In, fs, Gr, td = (Gr = class extends zi {
12
12
  constructor(a, n) {
13
13
  super();
14
14
  wa(this, Ft);
@@ -16,7 +16,7 @@ var $t, qt, We, Et, Ft, An, fs, Gr, td = (Gr = class extends Li {
16
16
  wa(this, qt);
17
17
  wa(this, We);
18
18
  wa(this, Et);
19
- Sa(this, $t, a), this.setOptions(n), this.bindMethods(), ka(this, Ft, An).call(this);
19
+ Sa(this, $t, a), this.setOptions(n), this.bindMethods(), ka(this, Ft, In).call(this);
20
20
  }
21
21
  bindMethods() {
22
22
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -24,7 +24,7 @@ var $t, qt, We, Et, Ft, An, fs, Gr, td = (Gr = class extends Li {
24
24
  setOptions(a) {
25
25
  var r;
26
26
  const n = this.options;
27
- this.options = Ae(this, $t).defaultMutationOptions(a), Pi(this.options, n) || Ae(this, $t).getMutationCache().notify({
27
+ this.options = Ae(this, $t).defaultMutationOptions(a), Li(this.options, n) || Ae(this, $t).getMutationCache().notify({
28
28
  type: "observerOptionsUpdated",
29
29
  mutation: Ae(this, We),
30
30
  observer: this
@@ -35,22 +35,22 @@ var $t, qt, We, Et, Ft, An, fs, Gr, td = (Gr = class extends Li {
35
35
  this.hasListeners() || (a = Ae(this, We)) == null || a.removeObserver(this);
36
36
  }
37
37
  onMutationUpdate(a) {
38
- ka(this, Ft, An).call(this), ka(this, Ft, fs).call(this, a);
38
+ ka(this, Ft, In).call(this), ka(this, Ft, fs).call(this, a);
39
39
  }
40
40
  getCurrentResult() {
41
41
  return Ae(this, qt);
42
42
  }
43
43
  reset() {
44
44
  var a;
45
- (a = Ae(this, We)) == null || a.removeObserver(this), Sa(this, We, void 0), ka(this, Ft, An).call(this), ka(this, Ft, fs).call(this);
45
+ (a = Ae(this, We)) == null || a.removeObserver(this), Sa(this, We, void 0), ka(this, Ft, In).call(this), ka(this, Ft, fs).call(this);
46
46
  }
47
47
  mutate(a, n) {
48
48
  var r;
49
49
  return Sa(this, Et, n), (r = Ae(this, We)) == null || r.removeObserver(this), Sa(this, We, Ae(this, $t).getMutationCache().build(Ae(this, $t), this.options)), Ae(this, We).addObserver(this), Ae(this, We).execute(a);
50
50
  }
51
- }, $t = new WeakMap(), qt = new WeakMap(), We = new WeakMap(), Et = new WeakMap(), Ft = new WeakSet(), An = function() {
51
+ }, $t = new WeakMap(), qt = new WeakMap(), We = new WeakMap(), Et = new WeakMap(), Ft = new WeakSet(), In = function() {
52
52
  var n;
53
- const a = ((n = Ae(this, We)) == null ? void 0 : n.state) ?? _i();
53
+ const a = ((n = Ae(this, We)) == null ? void 0 : n.state) ?? Pi();
54
54
  Sa(this, qt, {
55
55
  ...a,
56
56
  isPending: a.status === "pending",
@@ -97,11 +97,11 @@ function ba(t, a) {
97
97
  () => r.getCurrentResult()
98
98
  ), i = at.useCallback(
99
99
  (c, o) => {
100
- r.mutate(c, o).catch(Vi);
100
+ r.mutate(c, o).catch(_i);
101
101
  },
102
102
  [r]
103
103
  );
104
- if (l.error && ji(r.options.throwOnError, [l.error]))
104
+ if (l.error && Vi(r.options.throwOnError, [l.error]))
105
105
  throw l.error;
106
106
  return { ...l, mutate: i, mutateAsync: l.mutate };
107
107
  }
@@ -295,7 +295,7 @@ const ud = re("CircleArrowRight", [
295
295
  * This source code is licensed under the ISC license.
296
296
  * See the LICENSE file in the root directory of this source tree.
297
297
  */
298
- const Fl = re("CircleX", [
298
+ const Rl = re("CircleX", [
299
299
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
300
300
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
301
301
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -388,7 +388,7 @@ const fd = re("DatabaseZap", [
388
388
  * This source code is licensed under the ISC license.
389
389
  * See the LICENSE file in the root directory of this source tree.
390
390
  */
391
- const zl = re("Expand", [
391
+ const Fl = re("Expand", [
392
392
  ["path", { d: "m21 21-6-6m6 6v-4.8m0 4.8h-4.8", key: "1c15vz" }],
393
393
  ["path", { d: "M3 16.2V21m0 0h4.8M3 21l6-6", key: "1fsnz2" }],
394
394
  ["path", { d: "M21 7.8V3m0 0h-4.8M21 3l-6 6", key: "hawz9i" }],
@@ -623,7 +623,7 @@ const Ed = re("List", [
623
623
  * This source code is licensed under the ISC license.
624
624
  * See the LICENSE file in the root directory of this source tree.
625
625
  */
626
- const Ll = re("Lock", [
626
+ const zl = re("Lock", [
627
627
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
628
628
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
629
629
  ]);
@@ -779,7 +779,7 @@ const _d = re("Plug", [
779
779
  * This source code is licensed under the ISC license.
780
780
  * See the LICENSE file in the root directory of this source tree.
781
781
  */
782
- const Pl = re("RefreshCw", [
782
+ const Ll = re("RefreshCw", [
783
783
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
784
784
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
785
785
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
@@ -872,7 +872,7 @@ const Bd = re("Shrink", [
872
872
  * This source code is licensed under the ISC license.
873
873
  * See the LICENSE file in the root directory of this source tree.
874
874
  */
875
- const _l = re("Sigma", [
875
+ const Pl = re("Sigma", [
876
876
  [
877
877
  "path",
878
878
  {
@@ -913,7 +913,7 @@ const $d = re("Square", [
913
913
  * This source code is licensed under the ISC license.
914
914
  * See the LICENSE file in the root directory of this source tree.
915
915
  */
916
- const Vl = re("Tag", [
916
+ const _l = re("Tag", [
917
917
  [
918
918
  "path",
919
919
  {
@@ -1196,7 +1196,7 @@ function Xd() {
1196
1196
  /* @__PURE__ */ e(Wr, { className: "px-3", children: "Lenses" }),
1197
1197
  /* @__PURE__ */ e(Ma, {}),
1198
1198
  /* @__PURE__ */ s(
1199
- Bi,
1199
+ ji,
1200
1200
  {
1201
1201
  value: r,
1202
1202
  onValueChange: o,
@@ -1247,7 +1247,7 @@ function Xd() {
1247
1247
  ] })
1248
1248
  ] });
1249
1249
  }
1250
- function jl() {
1250
+ function Vl() {
1251
1251
  var i;
1252
1252
  const t = Z.getState().authToken, a = Z.getState().theme, n = Z.getState().filterValues, r = (i = Z.getState().dashboard) == null ? void 0 : i.title, l = Z.getState().selectedSheetId;
1253
1253
  return {
@@ -1259,7 +1259,7 @@ function jl() {
1259
1259
  };
1260
1260
  }
1261
1261
  async function Zd() {
1262
- const t = Z.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: r, dashboardTitle: l, selectedSheetId: i } = jl();
1262
+ const t = Z.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: r, dashboardTitle: l, selectedSheetId: i } = Vl();
1263
1263
  if (t)
1264
1264
  return;
1265
1265
  const c = new URLSearchParams();
@@ -1294,7 +1294,7 @@ function eu({
1294
1294
  tooltip: "Download PDF",
1295
1295
  className: "h-7 p-2",
1296
1296
  onClick: r,
1297
- children: n ? /* @__PURE__ */ e(Fe, { className: J("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(Ui, { className: J("size-4", t) })
1297
+ children: n ? /* @__PURE__ */ e(Fe, { className: J("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(Bi, { className: J("size-4", t) })
1298
1298
  }
1299
1299
  );
1300
1300
  }
@@ -1356,7 +1356,7 @@ function tu({
1356
1356
  {
1357
1357
  tooltip: "Schedule Dashboard",
1358
1358
  className: J("h-7 p-2", t),
1359
- children: /* @__PURE__ */ e($i, { className: "size-4" })
1359
+ children: /* @__PURE__ */ e(Ui, { className: "size-4" })
1360
1360
  }
1361
1361
  ) }),
1362
1362
  /* @__PURE__ */ e(St, { align: "end", className: "w-80", children: /* @__PURE__ */ s("div", { className: "grid gap-4", children: [
@@ -1435,7 +1435,7 @@ function tu({
1435
1435
  l === "loading" && /* @__PURE__ */ e(Fe, { className: "mr-2 size-4 animate-spin" }),
1436
1436
  l === "success" && /* @__PURE__ */ e(oa, { className: "mr-2 size-4" }),
1437
1437
  l === "error" && /* @__PURE__ */ s(_e, { children: [
1438
- /* @__PURE__ */ e(je, { children: /* @__PURE__ */ e(Fl, { className: "mr-2 size-4 text-destructive" }) }),
1438
+ /* @__PURE__ */ e(je, { children: /* @__PURE__ */ e(Rl, { className: "mr-2 size-4 text-destructive" }) }),
1439
1439
  /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e("p", { children: i }) })
1440
1440
  ] }),
1441
1441
  "Schedule"
@@ -1449,7 +1449,7 @@ function tu({
1449
1449
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Subscriptions" }),
1450
1450
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Active email subscriptions" })
1451
1451
  ] }),
1452
- En
1452
+ On
1453
1453
  ] }) }),
1454
1454
  /* @__PURE__ */ e("div", { className: "grid gap-2", children: a == null ? void 0 : a.map((p) => /* @__PURE__ */ s(
1455
1455
  "div",
@@ -1497,7 +1497,7 @@ const Rr = ({
1497
1497
  /* @__PURE__ */ e(Be, { children: a })
1498
1498
  ] }) });
1499
1499
  function au() {
1500
- const [t, a] = j("idle"), [n, r] = j(""), [l, i] = j(null), c = Z((M) => M.authToken), o = Z((M) => M.dashboard.id), u = Z((M) => M.dashboard.title), { endUserId: d } = qi((c == null ? void 0 : c.accessToken) || ""), m = "https://semaphor.cloud/api/v1/subscriptions/get", h = {
1500
+ const [t, a] = j("idle"), [n, r] = j(""), [l, i] = j(null), c = Z((M) => M.authToken), o = Z((M) => M.dashboard.id), u = Z((M) => M.dashboard.title), { endUserId: d } = $i((c == null ? void 0 : c.accessToken) || ""), m = "https://semaphor.cloud/api/v1/subscriptions/get", h = {
1501
1501
  dashboardId: o,
1502
1502
  endUserId: d
1503
1503
  }, { data: g, isLoading: x, isError: y, isFetching: p, refetch: N } = kt({
@@ -1511,7 +1511,7 @@ function au() {
1511
1511
  frequency: C,
1512
1512
  time: k
1513
1513
  }) {
1514
- const { authToken: v, ...T } = jl(), S = Intl.DateTimeFormat().resolvedOptions().timeZone, F = {
1514
+ const { authToken: v, ...T } = Vl(), S = Intl.DateTimeFormat().resolvedOptions().timeZone, F = {
1515
1515
  email: M,
1516
1516
  frequency: C,
1517
1517
  time: k,
@@ -1602,7 +1602,7 @@ function jt() {
1602
1602
  });
1603
1603
  return { currentUser: n ? { ...n, ...r || {} } : null, isLoading: l, isError: i };
1604
1604
  }
1605
- function Bl() {
1605
+ function jl() {
1606
1606
  return /* @__PURE__ */ e(st, { className: "w-full flex-1", children: /* @__PURE__ */ s("div", { className: "space-y-4 px-4", children: [
1607
1607
  /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "h-8 w-full rounded bg-muted" }) }),
1608
1608
  /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "h-8 w-full rounded bg-muted" }) }),
@@ -1785,7 +1785,7 @@ function pu(t, a) {
1785
1785
  }
1786
1786
  });
1787
1787
  }
1788
- function Ul(t) {
1788
+ function Bl(t) {
1789
1789
  const { authToken: a } = Me(), n = tt();
1790
1790
  return ba({
1791
1791
  mutationFn: ({
@@ -1939,7 +1939,7 @@ function Nu(t, a, n) {
1939
1939
  function bu(t, a) {
1940
1940
  return Nu(xe.VISUAL, t, a);
1941
1941
  }
1942
- function $l() {
1942
+ function Ul() {
1943
1943
  const [t, a] = j(/* @__PURE__ */ new Map()), n = Ne((i, c) => {
1944
1944
  a((o) => {
1945
1945
  const u = new Map(o), d = new Set(u.get(i) || []);
@@ -1968,7 +1968,7 @@ function er(t, a, n) {
1968
1968
  const r = hu(t), l = pu(
1969
1969
  t,
1970
1970
  n
1971
- ), i = Ul(t), c = fu(
1971
+ ), i = Bl(t), c = fu(
1972
1972
  t,
1973
1973
  a
1974
1974
  ), o = gu(t), u = xu(), d = yu(), m = {
@@ -2061,13 +2061,13 @@ function ku({
2061
2061
  formatDate: h
2062
2062
  }) {
2063
2063
  var k;
2064
- const { selectVisual: g } = Ss(), x = Yi(t.id), y = Z(
2064
+ const { selectVisual: g } = Ss(), x = qi(t.id), y = Z(
2065
2065
  (v) => v.actions.setIsDashboardPanelOpen
2066
2066
  ), [p, N] = j(!1), [f, b] = j(!1);
2067
2067
  Te(() => {
2068
2068
  n ? (N(!0), b(!0)) : f && (N(!1), b(!1));
2069
2069
  }, [n, f]);
2070
- const M = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(Ll, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Pt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5 text-slate-500" }), R = () => /* @__PURE__ */ e(on, { className: "h-4 w-4 text-slate-400" }), C = () => {
2070
+ const M = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(zl, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Pt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5 text-slate-500" }), R = () => /* @__PURE__ */ e(on, { className: "h-4 w-4 text-slate-400" }), C = () => {
2071
2071
  g(t), c == null || c(t);
2072
2072
  };
2073
2073
  return /* @__PURE__ */ s(
@@ -2241,7 +2241,7 @@ function ku({
2241
2241
  t.id
2242
2242
  );
2243
2243
  }
2244
- function ql({
2244
+ function $l({
2245
2245
  value: t,
2246
2246
  onChange: a,
2247
2247
  placeholder: n = "Search users by name, email, or department..."
@@ -2259,7 +2259,7 @@ function ql({
2259
2259
  )
2260
2260
  ] });
2261
2261
  }
2262
- function On({
2262
+ function Fn({
2263
2263
  currentRole: t,
2264
2264
  onRoleChange: a,
2265
2265
  roleOptions: n,
@@ -2305,7 +2305,7 @@ function On({
2305
2305
  )) })
2306
2306
  ] }) : /* @__PURE__ */ e(ce, { variant: "outline", className: `text-xs ${l}`, children: c });
2307
2307
  }
2308
- function Yl({
2308
+ function ql({
2309
2309
  selectedUsers: t,
2310
2310
  selectedUserObjects: a,
2311
2311
  onRemove: n,
@@ -2335,7 +2335,7 @@ function Yl({
2335
2335
  return /* @__PURE__ */ s(ce, { variant: "secondary", className: "gap-1", children: [
2336
2336
  i.name,
2337
2337
  /* @__PURE__ */ e(
2338
- On,
2338
+ Fn,
2339
2339
  {
2340
2340
  currentRole: (c == null ? void 0 : c.role) || "VIEWER",
2341
2341
  onRoleChange: (u) => r(i.id, u),
@@ -2355,7 +2355,7 @@ function Yl({
2355
2355
  /* @__PURE__ */ e(Qe, {})
2356
2356
  ] });
2357
2357
  }
2358
- function Gl({
2358
+ function Yl({
2359
2359
  usersToRemove: t,
2360
2360
  allUsers: a,
2361
2361
  onRemove: n
@@ -2392,7 +2392,7 @@ function Gl({
2392
2392
  /* @__PURE__ */ e(Qe, {})
2393
2393
  ] });
2394
2394
  }
2395
- function Kl({
2395
+ function Gl({
2396
2396
  usersToUpdate: t,
2397
2397
  allUsers: a,
2398
2398
  onRemove: n,
@@ -2446,7 +2446,7 @@ function Kl({
2446
2446
  )) })
2447
2447
  ] });
2448
2448
  }
2449
- function Jl(t, a = {}) {
2449
+ function Kl(t, a = {}) {
2450
2450
  const { enabled: n = !0, eventType: r = "mousedown" } = a, l = zt(null);
2451
2451
  return Te(() => {
2452
2452
  const i = (c) => {
@@ -2465,11 +2465,11 @@ function gt(t, a) {
2465
2465
  function Du(t) {
2466
2466
  return ["POWER_USER", "ADMIN", "EDITOR"].includes(t);
2467
2467
  }
2468
- function Wl(t) {
2468
+ function Jl(t) {
2469
2469
  return "tenantId" in t && t.tenantId ? "tenant" : "organization";
2470
2470
  }
2471
2471
  function Tu(t, a, n) {
2472
- const r = Wl(t), l = (n == null ? void 0 : n.type) || "organization";
2472
+ const r = Jl(t), l = (n == null ? void 0 : n.type) || "organization";
2473
2473
  if (!(!a || !a.shares))
2474
2474
  if (l === "organization")
2475
2475
  if (r === "organization") {
@@ -2487,7 +2487,7 @@ function Tu(t, a, n) {
2487
2487
  );
2488
2488
  }
2489
2489
  function Mu({ user: t }) {
2490
- return Wl(t) === "tenant" ? /* @__PURE__ */ e(ce, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(ce, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
2490
+ return Jl(t) === "tenant" ? /* @__PURE__ */ e(ce, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(ce, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
2491
2491
  }
2492
2492
  function Au({
2493
2493
  user: t,
@@ -2504,7 +2504,7 @@ function Au({
2504
2504
  (h) => h.id === t.id
2505
2505
  ), d = u ? u.newRole : a == null ? void 0 : a.role, m = l(t.type);
2506
2506
  return a ? /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: c ? /* @__PURE__ */ e(
2507
- On,
2507
+ Fn,
2508
2508
  {
2509
2509
  currentRole: d,
2510
2510
  onRoleChange: (h) => {
@@ -2970,7 +2970,7 @@ function Fu({
2970
2970
  ] }),
2971
2971
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
2972
2972
  r && !n ? /* @__PURE__ */ e(
2973
- On,
2973
+ Fn,
2974
2974
  {
2975
2975
  currentRole: a == null ? void 0 : a.role,
2976
2976
  onRoleChange: (y) => g(t.id, a.role, y),
@@ -2990,7 +2990,7 @@ function Fu({
2990
2990
  }
2991
2991
  ),
2992
2992
  i && !l && /* @__PURE__ */ e("div", { onClick: (y) => y.stopPropagation(), children: /* @__PURE__ */ e(
2993
- On,
2993
+ Fn,
2994
2994
  {
2995
2995
  currentRole: (c == null ? void 0 : c.role) || "VIEWER",
2996
2996
  onRoleChange: (y) => x(t.id, y),
@@ -3025,7 +3025,7 @@ function Fu({
3025
3025
  }
3026
3026
  );
3027
3027
  }
3028
- function Hl({
3028
+ function Wl({
3029
3029
  existingShares: t,
3030
3030
  isInitialLoading: a,
3031
3031
  isSearching: n,
@@ -3037,7 +3037,7 @@ function Hl({
3037
3037
  handleRemoveAccess: u,
3038
3038
  handleUpdateAccess: d
3039
3039
  }) {
3040
- const m = Va(), h = Dt(), g = ja(), x = Gi(), y = ca(), p = c || ((C) => {
3040
+ const m = Va(), h = Dt(), g = ja(), x = Yi(), y = ca(), p = c || ((C) => {
3041
3041
  const k = m.some((T) => T.id === C), v = h.includes(C);
3042
3042
  k ? y.removeSelectedUser(C) : v ? y.removeUserFromRemove(C) : y.addSelectedUser({ id: C, role: "VIEWER" });
3043
3043
  }), N = o || y.updateSelectedUserRole, f = u || y.addUserToRemove, b = d || ((C, k, v) => {
@@ -3119,7 +3119,7 @@ function Hl({
3119
3119
  ] })
3120
3120
  ] });
3121
3121
  }
3122
- function Ql({
3122
+ function Hl({
3123
3123
  shareType: t,
3124
3124
  onShareTypeChange: a,
3125
3125
  currentUser: n,
@@ -3135,7 +3135,7 @@ function Ql({
3135
3135
  className: `grid grid-cols-${r.length} gap-4`,
3136
3136
  children: r.map((i) => /* @__PURE__ */ s("div", { children: [
3137
3137
  /* @__PURE__ */ e(
3138
- rs,
3138
+ is,
3139
3139
  {
3140
3140
  value: i.value,
3141
3141
  id: i.value,
@@ -3241,7 +3241,7 @@ function zu({
3241
3241
  ),
3242
3242
  (y || p) && /* @__PURE__ */ e(ce, { variant: "destructive", className: "ml-2", children: "No Access" })
3243
3243
  ] }),
3244
- /* @__PURE__ */ e(tl, { 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." })
3244
+ /* @__PURE__ */ e(Gi, { 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." })
3245
3245
  ] }),
3246
3246
  /* @__PURE__ */ e(Na, { className: "space-y-4", children: /* @__PURE__ */ s("div", { className: "space-y-3", children: [
3247
3247
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
@@ -3307,7 +3307,7 @@ function zu({
3307
3307
  }
3308
3308
  ) });
3309
3309
  }
3310
- function Xl({
3310
+ function Ql({
3311
3311
  currentUser: t,
3312
3312
  currentShare: a,
3313
3313
  isSharing: n,
@@ -3407,7 +3407,7 @@ function _u({
3407
3407
  isRemoving: c = !1
3408
3408
  }) {
3409
3409
  var ie, te;
3410
- const o = Ba(), u = mn(), { searchQuery: d, setSearchQuery: m, debouncedSearchQuery: h } = al(), g = Va(), x = Dt(), y = ja(), p = Tt(), N = As(), f = ca(), [b, M] = ct.useState("specific_users"), R = () => {
3410
+ const o = Ba(), u = mn(), { searchQuery: d, setSearchQuery: m, debouncedSearchQuery: h } = tl(), g = Va(), x = Dt(), y = ja(), p = Tt(), N = As(), f = ca(), [b, M] = ct.useState("specific_users"), R = () => {
3411
3411
  if (o === "org") return "organization";
3412
3412
  if (o === "tenant") return "tenant";
3413
3413
  }, C = () => {
@@ -3464,7 +3464,7 @@ function _u({
3464
3464
  const B = T, ee = !1;
3465
3465
  return n ? /* @__PURE__ */ s(se, { children: [
3466
3466
  /* @__PURE__ */ e(
3467
- Ql,
3467
+ Hl,
3468
3468
  {
3469
3469
  shareType: b,
3470
3470
  onShareTypeChange: S,
@@ -3492,9 +3492,9 @@ function _u({
3492
3492
  }
3493
3493
  ),
3494
3494
  b === "specific_users" ? /* @__PURE__ */ s("div", { className: "mt-3 space-y-2", children: [
3495
- /* @__PURE__ */ e(ql, { value: d, onChange: m }),
3495
+ /* @__PURE__ */ e($l, { value: d, onChange: m }),
3496
3496
  /* @__PURE__ */ e(
3497
- Yl,
3497
+ ql,
3498
3498
  {
3499
3499
  selectedUsers: g,
3500
3500
  selectedUserObjects: w,
@@ -3504,7 +3504,7 @@ function _u({
3504
3504
  }
3505
3505
  ),
3506
3506
  /* @__PURE__ */ e(
3507
- Gl,
3507
+ Yl,
3508
3508
  {
3509
3509
  usersToRemove: x,
3510
3510
  allUsers: F,
@@ -3512,7 +3512,7 @@ function _u({
3512
3512
  }
3513
3513
  ),
3514
3514
  /* @__PURE__ */ e(
3515
- Kl,
3515
+ Gl,
3516
3516
  {
3517
3517
  usersToUpdate: y,
3518
3518
  allUsers: F,
@@ -3521,7 +3521,7 @@ function _u({
3521
3521
  }
3522
3522
  ),
3523
3523
  /* @__PURE__ */ e(
3524
- Hl,
3524
+ Wl,
3525
3525
  {
3526
3526
  existingShares: v,
3527
3527
  isInitialLoading: B,
@@ -3541,7 +3541,7 @@ function _u({
3541
3541
  }
3542
3542
  )
3543
3543
  ] }) : /* @__PURE__ */ e("div", { className: "mt-3", children: /* @__PURE__ */ e(
3544
- Xl,
3544
+ Ql,
3545
3545
  {
3546
3546
  currentUser: n,
3547
3547
  currentShare: U,
@@ -3569,7 +3569,7 @@ function Fr({
3569
3569
  isRemoving: c = !1
3570
3570
  }) {
3571
3571
  var $;
3572
- const { searchQuery: o, debouncedSearchQuery: u, setSearchQuery: d } = al(), m = Va(), h = Dt(), g = ja(), x = Tt(), y = zn(), p = Es(), N = mn(), f = ca(), { data: b, isLoading: M } = mu({
3572
+ const { searchQuery: o, debouncedSearchQuery: u, setSearchQuery: d } = tl(), m = Va(), h = Dt(), g = ja(), x = Tt(), y = Pn(), p = Es(), N = mn(), f = ca(), { data: b, isLoading: M } = mu({
3573
3573
  enabled: (n == null ? void 0 : n.type) === "organization"
3574
3574
  }), [R, C] = j(
3575
3575
  (n == null ? void 0 : n.type) === "organization" ? "all_tenants" : "specific_tenant_users"
@@ -3659,7 +3659,7 @@ function Fr({
3659
3659
  ] }) }),
3660
3660
  !Y && n && /* @__PURE__ */ s("div", { className: "max-h-[500px] space-y-4 overflow-y-auto", children: [
3661
3661
  /* @__PURE__ */ e(
3662
- Ql,
3662
+ Hl,
3663
3663
  {
3664
3664
  shareType: R,
3665
3665
  onShareTypeChange: k,
@@ -3721,14 +3721,14 @@ function Fr({
3721
3721
  ] }),
3722
3722
  q() ? /* @__PURE__ */ e(se, { children: R === "specific_tenant_users" ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
3723
3723
  /* @__PURE__ */ e(
3724
- ql,
3724
+ $l,
3725
3725
  {
3726
3726
  value: o,
3727
3727
  onChange: d
3728
3728
  }
3729
3729
  ),
3730
3730
  /* @__PURE__ */ e(
3731
- Yl,
3731
+ ql,
3732
3732
  {
3733
3733
  selectedUsers: m,
3734
3734
  selectedUserObjects: W,
@@ -3738,7 +3738,7 @@ function Fr({
3738
3738
  }
3739
3739
  ),
3740
3740
  /* @__PURE__ */ e(
3741
- Gl,
3741
+ Yl,
3742
3742
  {
3743
3743
  usersToRemove: h,
3744
3744
  allUsers: T,
@@ -3746,7 +3746,7 @@ function Fr({
3746
3746
  }
3747
3747
  ),
3748
3748
  /* @__PURE__ */ e(
3749
- Kl,
3749
+ Gl,
3750
3750
  {
3751
3751
  usersToUpdate: g,
3752
3752
  allUsers: T,
@@ -3755,7 +3755,7 @@ function Fr({
3755
3755
  }
3756
3756
  ),
3757
3757
  /* @__PURE__ */ e(
3758
- Hl,
3758
+ Wl,
3759
3759
  {
3760
3760
  existingShares: S,
3761
3761
  isInitialLoading: !!Q,
@@ -3773,7 +3773,7 @@ function Fr({
3773
3773
  }
3774
3774
  )
3775
3775
  ] }) : R === "all_tenant_users" || R === "all_tenants" ? /* @__PURE__ */ e("div", { className: "mt-6", children: /* @__PURE__ */ e(
3776
- Xl,
3776
+ Ql,
3777
3777
  {
3778
3778
  currentUser: n,
3779
3779
  currentShare: te,
@@ -3798,8 +3798,8 @@ function Fr({
3798
3798
  ] })
3799
3799
  ] });
3800
3800
  }
3801
- const Zl = () => {
3802
- const t = Is(), a = Tt(), n = Va(), r = Dt(), l = ja(), i = mn(), c = As(), o = Es(), u = zn(), d = Ke(() => () => Ji({
3801
+ const Xl = () => {
3802
+ const t = Is(), a = Tt(), n = Va(), r = Dt(), l = ja(), i = mn(), c = As(), o = Es(), u = Pn(), d = Ke(() => () => Ji({
3803
3803
  currentContext: t,
3804
3804
  currentMode: a,
3805
3805
  selectedUsers: n,
@@ -3874,7 +3874,7 @@ function zr({
3874
3874
  Tt(), Is();
3875
3875
  const x = mn();
3876
3876
  Ba();
3877
- const y = As(), p = Es(), N = zn(), { buildShareData: f, validateShareData: b, isCurrentStateValid: M } = Zl(), R = n || r || l, C = () => {
3877
+ const y = As(), p = Es(), N = Pn(), { buildShareData: f, validateShareData: b, isCurrentStateValid: M } = Xl(), R = n || r || l, C = () => {
3878
3878
  var F, w, L, D;
3879
3879
  if (R) return "Updating...";
3880
3880
  if (o === "specific_users") {
@@ -4039,9 +4039,9 @@ function Vu({
4039
4039
  }) {
4040
4040
  const u = Va(), d = Dt(), m = ja();
4041
4041
  Tt(), Is();
4042
- const h = zn();
4042
+ const h = Pn();
4043
4043
  mn();
4044
- const { buildShareData: g, validateShareData: x, isCurrentStateValid: y } = Zl(), p = a || n || r, N = () => {
4044
+ const { buildShareData: g, validateShareData: x, isCurrentStateValid: y } = Xl(), p = a || n || r, N = () => {
4045
4045
  if (p) return "Updating...";
4046
4046
  if (c === "specific_users") {
4047
4047
  if (u.length === 0 && d.length === 0 && m.length === 0)
@@ -4119,7 +4119,7 @@ function Vu({
4119
4119
  )
4120
4120
  ] });
4121
4121
  }
4122
- function ei({
4122
+ function Zl({
4123
4123
  resource: t,
4124
4124
  resourceType: a,
4125
4125
  isSharing: n,
@@ -4300,7 +4300,7 @@ function Jt(t, a, n) {
4300
4300
  data: { shares: n }
4301
4301
  };
4302
4302
  }
4303
- function ti(t, a, n) {
4303
+ function ei(t, a, n) {
4304
4304
  const {
4305
4305
  resourceType: r,
4306
4306
  resourceId: l,
@@ -4564,7 +4564,7 @@ function ti(t, a, n) {
4564
4564
  break;
4565
4565
  }
4566
4566
  }
4567
- function ai(t, a, n, r) {
4567
+ function ti(t, a, n, r) {
4568
4568
  var d, m, h, g, x, y;
4569
4569
  const {
4570
4570
  resourceType: l,
@@ -4676,7 +4676,7 @@ function ju(t, a, n) {
4676
4676
  existingShares: u,
4677
4677
  resetUserSelections: d
4678
4678
  };
4679
- ti(g, x, o);
4679
+ ei(g, x, o);
4680
4680
  },
4681
4681
  [
4682
4682
  t,
@@ -4695,7 +4695,7 @@ function ju(t, a, n) {
4695
4695
  existingShares: u,
4696
4696
  resetUserSelections: d
4697
4697
  };
4698
- ai(
4698
+ ti(
4699
4699
  l,
4700
4700
  i || "",
4701
4701
  c || "",
@@ -4735,7 +4735,7 @@ function Bu(t, a, n) {
4735
4735
  existingShares: u,
4736
4736
  resetUserSelections: d
4737
4737
  };
4738
- ti(g, x, r);
4738
+ ei(g, x, r);
4739
4739
  },
4740
4740
  [
4741
4741
  t,
@@ -4754,7 +4754,7 @@ function Bu(t, a, n) {
4754
4754
  existingShares: u,
4755
4755
  resetUserSelections: d
4756
4756
  };
4757
- ai(
4757
+ ti(
4758
4758
  i,
4759
4759
  c || "",
4760
4760
  o || "",
@@ -4940,7 +4940,7 @@ function Yu() {
4940
4940
  ]) };
4941
4941
  }
4942
4942
  function ar() {
4943
- const { authToken: t } = Me(), a = tt(), n = nl(), { selectVisual: r } = Ss(), { setFrame: l, setCard: i } = le(), {
4943
+ const { authToken: t } = Me(), a = tt(), n = al(), { selectVisual: r } = Ss(), { setFrame: l, setCard: i } = le(), {
4944
4944
  setIsDashboardEditing: c,
4945
4945
  setIsVisualEditing: o,
4946
4946
  setSelectedFrameId: u,
@@ -5077,7 +5077,7 @@ function Gu() {
5077
5077
  startUpdating: q,
5078
5078
  stopUpdating: $,
5079
5079
  isUpdating: G
5080
- } = $l(), oe = (ne, Se) => {
5080
+ } = Ul(), oe = (ne, Se) => {
5081
5081
  const Ue = Se.title !== void 0 ? "title" : "description";
5082
5082
  q(ne, Ue), F(
5083
5083
  {
@@ -5117,7 +5117,7 @@ function Gu() {
5117
5117
  resourceId: (m == null ? void 0 : m.id) || "",
5118
5118
  resourceType: xe.VISUAL,
5119
5119
  userType: "tenant"
5120
- }), v ? /* @__PURE__ */ e(Bl, {}) : T ? /* @__PURE__ */ e(st, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ s("div", { className: "py-8 text-center text-muted-foreground", children: [
5120
+ }), v ? /* @__PURE__ */ e(jl, {}) : T ? /* @__PURE__ */ e(st, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ s("div", { className: "py-8 text-center text-muted-foreground", children: [
5121
5121
  /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load visuals" }),
5122
5122
  /* @__PURE__ */ e(
5123
5123
  _,
@@ -5209,7 +5209,7 @@ function Gu() {
5209
5209
  }
5210
5210
  ) }),
5211
5211
  /* @__PURE__ */ e("div", { className: "mb-4 flex flex-1 flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-2 overflow-y-auto p-1", children: ie.length === 0 ? /* @__PURE__ */ s("div", { className: "py-8 text-center text-muted-foreground", children: [
5212
- /* @__PURE__ */ e(Ln, { className: "mx-auto mb-2 h-8 w-8 opacity-50" }),
5212
+ /* @__PURE__ */ e(_n, { className: "mx-auto mb-2 h-8 w-8 opacity-50" }),
5213
5213
  /* @__PURE__ */ e("p", { className: "text-sm", children: "No visuals found" })
5214
5214
  ] }) : ie.map((ne) => /* @__PURE__ */ e(
5215
5215
  ku,
@@ -5231,7 +5231,7 @@ function Gu() {
5231
5231
  ne.id
5232
5232
  )) }) }),
5233
5233
  u && m && /* @__PURE__ */ e(
5234
- ei,
5234
+ Zl,
5235
5235
  {
5236
5236
  resource: m,
5237
5237
  resourceType: xe.VISUAL,
@@ -5246,25 +5246,25 @@ function Gu() {
5246
5246
  }
5247
5247
  ),
5248
5248
  /* @__PURE__ */ e(
5249
- sl,
5249
+ nl,
5250
5250
  {
5251
5251
  open: g,
5252
5252
  onOpenChange: (ne) => {
5253
5253
  !ne && I || (x(ne), ne || p(null));
5254
5254
  },
5255
- children: /* @__PURE__ */ s(rl, { children: [
5256
- /* @__PURE__ */ s(ll, { children: [
5257
- /* @__PURE__ */ e(il, { children: "Delete Visual" }),
5258
- /* @__PURE__ */ s(ol, { children: [
5255
+ children: /* @__PURE__ */ s(sl, { children: [
5256
+ /* @__PURE__ */ s(rl, { children: [
5257
+ /* @__PURE__ */ e(ll, { children: "Delete Visual" }),
5258
+ /* @__PURE__ */ s(il, { children: [
5259
5259
  'Are you sure you want to delete "',
5260
5260
  y == null ? void 0 : y.title,
5261
5261
  '"? This action cannot be undone.'
5262
5262
  ] })
5263
5263
  ] }),
5264
- /* @__PURE__ */ s(cl, { children: [
5265
- /* @__PURE__ */ e(dl, { disabled: I, children: "Cancel" }),
5264
+ /* @__PURE__ */ s(ol, { children: [
5265
+ /* @__PURE__ */ e(cl, { disabled: I, children: "Cancel" }),
5266
5266
  /* @__PURE__ */ e(
5267
- ul,
5267
+ dl,
5268
5268
  {
5269
5269
  onClick: (ne) => {
5270
5270
  ne.preventDefault(), ne.stopPropagation(), Y();
@@ -5303,7 +5303,7 @@ function Ku({
5303
5303
  Te(() => {
5304
5304
  n ? (p(!0), f(!0)) : N && (p(!1), f(!1));
5305
5305
  }, [n, N]);
5306
- const M = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(Ll, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Pt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5 text-slate-500" }), R = () => /* @__PURE__ */ e(Qi, { className: "h-4 w-4 text-slate-400" }), C = () => {
5306
+ const M = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(zl, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Pt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5 text-slate-500" }), R = () => /* @__PURE__ */ e(Qi, { className: "h-4 w-4 text-slate-400" }), C = () => {
5307
5307
  g(t), i(t.id), h == null || h(t.id);
5308
5308
  };
5309
5309
  return /* @__PURE__ */ s(
@@ -5511,7 +5511,7 @@ function Wu(t) {
5511
5511
  startUpdating: G,
5512
5512
  stopUpdating: oe,
5513
5513
  isUpdating: ve
5514
- } = $l(), K = (ae, ne) => {
5514
+ } = Ul(), K = (ae, ne) => {
5515
5515
  const Se = ne.title !== void 0 ? "title" : "description";
5516
5516
  G(ae, Se), S(
5517
5517
  {
@@ -5545,7 +5545,7 @@ function Wu(t) {
5545
5545
  resourceId: (h == null ? void 0 : h.id) || "",
5546
5546
  resourceType: xe.DASHBOARD,
5547
5547
  userType: "tenant"
5548
- }), k ? /* @__PURE__ */ e(Bl, {}) : v ? /* @__PURE__ */ e(Ju, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ s("div", { className: "mt-1 flex h-full flex-1 flex-col gap-3 px-4", children: [
5548
+ }), k ? /* @__PURE__ */ e(jl, {}) : v ? /* @__PURE__ */ e(Ju, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ s("div", { className: "mt-1 flex h-full flex-1 flex-col gap-3 px-4", children: [
5549
5549
  /* @__PURE__ */ e("div", { className: "px-1", children: r ? /* @__PURE__ */ s(va, { className: "border-dashed p-4 pb-2", children: [
5550
5550
  /* @__PURE__ */ e(dn, { className: "px-0 pb-3 pt-0", children: /* @__PURE__ */ e(un, { className: "text-sm", children: "New Dashboard" }) }),
5551
5551
  /* @__PURE__ */ s(Na, { className: "space-y-3 px-0 pb-0", children: [
@@ -5651,7 +5651,7 @@ function Wu(t) {
5651
5651
  ae.id
5652
5652
  )) }) }),
5653
5653
  d && h && /* @__PURE__ */ e(
5654
- ei,
5654
+ Zl,
5655
5655
  {
5656
5656
  resource: h,
5657
5657
  resourceType: xe.DASHBOARD,
@@ -5666,25 +5666,25 @@ function Wu(t) {
5666
5666
  }
5667
5667
  ),
5668
5668
  /* @__PURE__ */ e(
5669
- sl,
5669
+ nl,
5670
5670
  {
5671
5671
  open: x,
5672
5672
  onOpenChange: (ae) => {
5673
5673
  !ae && D || (y(ae), ae || N(null));
5674
5674
  },
5675
- children: /* @__PURE__ */ s(rl, { children: [
5676
- /* @__PURE__ */ s(ll, { children: [
5677
- /* @__PURE__ */ e(il, { children: "Delete Dashboard" }),
5678
- /* @__PURE__ */ s(ol, { children: [
5675
+ children: /* @__PURE__ */ s(sl, { children: [
5676
+ /* @__PURE__ */ s(rl, { children: [
5677
+ /* @__PURE__ */ e(ll, { children: "Delete Dashboard" }),
5678
+ /* @__PURE__ */ s(il, { children: [
5679
5679
  'Are you sure you want to delete "',
5680
5680
  p == null ? void 0 : p.title,
5681
5681
  '"? This action cannot be undone.'
5682
5682
  ] })
5683
5683
  ] }),
5684
- /* @__PURE__ */ s(cl, { children: [
5685
- /* @__PURE__ */ e(dl, { disabled: D, children: "Cancel" }),
5684
+ /* @__PURE__ */ s(ol, { children: [
5685
+ /* @__PURE__ */ e(cl, { disabled: D, children: "Cancel" }),
5686
5686
  /* @__PURE__ */ e(
5687
- ul,
5687
+ dl,
5688
5688
  {
5689
5689
  onClick: (ae) => {
5690
5690
  ae.preventDefault(), ae.stopPropagation(), q();
@@ -5714,7 +5714,7 @@ function Hu({
5714
5714
  } = jt(), o = c, [u, d] = Os(
5715
5715
  "resource-management-active-tab",
5716
5716
  "dashboards"
5717
- ), m = Jl(a, {
5717
+ ), m = Kl(a, {
5718
5718
  enabled: t
5719
5719
  }), h = (x) => {
5720
5720
  }, g = (x) => {
@@ -5876,7 +5876,7 @@ function Qu() {
5876
5876
  C(F.id, G), k(G.id);
5877
5877
  }, O = () => {
5878
5878
  T(!0);
5879
- }, [z, U] = j(!1), B = Ul(xe.DASHBOARD);
5879
+ }, [z, U] = j(!1), B = Bl(xe.DASHBOARD);
5880
5880
  async function ee() {
5881
5881
  const q = xs(
5882
5882
  i
@@ -5960,7 +5960,7 @@ function Qu() {
5960
5960
  onClick: O,
5961
5961
  size: "sm",
5962
5962
  children: [
5963
- /* @__PURE__ */ e(ml, { className: "mr-2 h-4 w-4" }),
5963
+ /* @__PURE__ */ e(ul, { className: "mr-2 h-4 w-4" }),
5964
5964
  "Edit"
5965
5965
  ]
5966
5966
  }
@@ -6081,7 +6081,7 @@ function Xu({
6081
6081
  /* @__PURE__ */ s("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
6082
6082
  /* @__PURE__ */ e(pn, { className: "h-9", placeholder: "Search..." }),
6083
6083
  /* @__PURE__ */ e(ye, { className: "h-7", onClick: c, children: /* @__PURE__ */ e(
6084
- Pl,
6084
+ Ll,
6085
6085
  {
6086
6086
  className: J(
6087
6087
  "size-3.5 opacity-50",
@@ -6146,7 +6146,7 @@ function Ka({
6146
6146
  if (t === "Schema")
6147
6147
  return /* @__PURE__ */ e(zd, { className: "size-4" });
6148
6148
  if (t === "Table")
6149
- return /* @__PURE__ */ e(Pn, { className: "size-4" });
6149
+ return /* @__PURE__ */ e(Vn, { className: "size-4" });
6150
6150
  if (t === "Model")
6151
6151
  return /* @__PURE__ */ e(cd, { className: "size-4" });
6152
6152
  }
@@ -6171,7 +6171,7 @@ function Ka({
6171
6171
  r ? /* @__PURE__ */ e(Ea, { children: "Loading..." }) : /* @__PURE__ */ s(Ea, { className: "flex items-center justify-between gap-2", children: [
6172
6172
  t,
6173
6173
  /* @__PURE__ */ e(
6174
- Pl,
6174
+ Ll,
6175
6175
  {
6176
6176
  className: J(
6177
6177
  "mr-1 size-3 cursor-pointer text-muted-foreground hover:text-foreground",
@@ -6218,11 +6218,11 @@ function Zu({ column: t }) {
6218
6218
  ), o = A((p) => p.sqlGen), { modelItems: u, connectionType: d } = Mt(), m = A((p) => p.actions.setSqlGen), h = A((p) => p.actions.setCardSql), g = A((p) => p.actions.setRunSql);
6219
6219
  function x(p, N) {
6220
6220
  var R;
6221
- const f = hl(p, o, N), b = (R = u == null ? void 0 : u.find(
6221
+ const f = ml(p, o, N), b = (R = u == null ? void 0 : u.find(
6222
6222
  (C) => C.id === c
6223
6223
  )) == null ? void 0 : R.name;
6224
6224
  m(f);
6225
- const M = pl(
6225
+ const M = hl(
6226
6226
  f,
6227
6227
  vt(l || ""),
6228
6228
  vt(r),
@@ -6292,7 +6292,7 @@ function em({ dataType: t }) {
6292
6292
  const a = Pe(t);
6293
6293
  return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ut, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e(Lt, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(bt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ya, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(tn, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(an, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(yn, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ut, { className: "h-3 w-3" }) });
6294
6294
  }
6295
- function Hn({
6295
+ function Xn({
6296
6296
  column: t,
6297
6297
  className: a
6298
6298
  }) {
@@ -6375,40 +6375,40 @@ function am({
6375
6375
  }
6376
6376
  ),
6377
6377
  children: [
6378
- n === a.column_name && /* @__PURE__ */ e(fl, { children: /* @__PURE__ */ e(
6379
- Hn,
6378
+ n === a.column_name && /* @__PURE__ */ e(pl, { children: /* @__PURE__ */ e(
6379
+ Xn,
6380
6380
  {
6381
6381
  column: a,
6382
6382
  className: "rounded-md border-2 border-dashed border-muted-foreground bg-muted shadow-md"
6383
6383
  }
6384
6384
  ) }),
6385
- n === a.column_name && /* @__PURE__ */ e("div", { className: "absolute inset-0", children: n === a.column_name && /* @__PURE__ */ e(Hn, { column: a }) }),
6386
- /* @__PURE__ */ e(tm, { id: a.column_name, type: "column", children: /* @__PURE__ */ e(Hn, { column: a }) })
6385
+ n === a.column_name && /* @__PURE__ */ e("div", { className: "absolute inset-0", children: n === a.column_name && /* @__PURE__ */ e(Xn, { column: a }) }),
6386
+ /* @__PURE__ */ e(tm, { id: a.column_name, type: "column", children: /* @__PURE__ */ e(Xn, { column: a }) })
6387
6387
  ]
6388
6388
  }
6389
6389
  )
6390
6390
  );
6391
6391
  }
6392
- const Qn = {
6392
+ const Zn = {
6393
6393
  id: "__placeholder__",
6394
6394
  role: "groupby",
6395
6395
  type: "string"
6396
- }, Xn = {
6396
+ }, es = {
6397
6397
  id: "__placeholder__",
6398
6398
  role: "groupby",
6399
6399
  type: "string"
6400
- }, Zn = {
6400
+ }, ts = {
6401
6401
  id: "__placeholder__",
6402
6402
  role: "metric",
6403
6403
  type: "number"
6404
- }, es = {
6404
+ }, as = {
6405
6405
  name: "Filter",
6406
6406
  id: "__placeholder__",
6407
6407
  role: "filter",
6408
6408
  type: "string"
6409
- }, ni = {
6409
+ }, ai = {
6410
6410
  id: "__placeholder__"
6411
- }, ha = "droppable-group-by", pa = "droppable-metrics", fa = "droppable-pivot-by", Rn = "sortable-group-by", vs = "sortable-metrics", Fn = "sortable-pivot-by", Ns = "droppable-filters", bs = "sortable-filters", nr = "sortable-order-by";
6411
+ }, ha = "droppable-group-by", pa = "droppable-metrics", fa = "droppable-pivot-by", zn = "sortable-group-by", vs = "sortable-metrics", Ln = "sortable-pivot-by", Ns = "droppable-filters", bs = "sortable-filters", nr = "sortable-order-by";
6412
6412
  function nm() {
6413
6413
  const t = Qt((E) => E.insertIndex), a = A(
6414
6414
  (E) => {
@@ -6448,7 +6448,7 @@ function nm() {
6448
6448
  setFilterColumns: y,
6449
6449
  setOrderByColumns: p,
6450
6450
  setPivotByColumns: N
6451
- } = le(), { columns: f } = gl(), { formattedTableName: b } = Mt(), M = Qa(
6451
+ } = le(), { columns: f } = fl(), { formattedTableName: b } = Mt(), M = Qa(
6452
6452
  Yt(no, {
6453
6453
  activationConstraint: {
6454
6454
  distance: 1
@@ -6473,12 +6473,12 @@ function nm() {
6473
6473
  );
6474
6474
  c(W);
6475
6475
  const Q = a.filter(
6476
- (Y) => Y.id !== Qn.id
6476
+ (Y) => Y.id !== Zn.id
6477
6477
  );
6478
- Q.splice(W, 0, Qn), u(Q);
6478
+ Q.splice(W, 0, Zn), u(Q);
6479
6479
  } else if (P.id === ha) {
6480
6480
  c(a.length);
6481
- const W = [...a, Qn];
6481
+ const W = [...a, Zn];
6482
6482
  u(W), d(n), m(r);
6483
6483
  }
6484
6484
  }
@@ -6491,12 +6491,12 @@ function nm() {
6491
6491
  );
6492
6492
  c(W);
6493
6493
  const Q = i.filter(
6494
- (Y) => Y.id !== Xn.id
6494
+ (Y) => Y.id !== es.id
6495
6495
  );
6496
- Q.splice(W, 0, Xn), h(Q);
6496
+ Q.splice(W, 0, es), h(Q);
6497
6497
  } else if (P.id === fa) {
6498
6498
  c(i.length);
6499
- const W = [...i, Xn];
6499
+ const W = [...i, es];
6500
6500
  h(W), u(a), d(n), m(r);
6501
6501
  }
6502
6502
  }
@@ -6508,12 +6508,12 @@ function nm() {
6508
6508
  const W = n.findIndex((Y) => Y.id === z);
6509
6509
  c(W);
6510
6510
  const Q = n.filter(
6511
- (Y) => Y.id !== Zn.id
6511
+ (Y) => Y.id !== ts.id
6512
6512
  );
6513
- Q.splice(W, 0, Zn), d(Q);
6513
+ Q.splice(W, 0, ts), d(Q);
6514
6514
  } else if (P.id === pa) {
6515
6515
  c(n.length);
6516
- const W = [...n, Zn];
6516
+ const W = [...n, ts];
6517
6517
  d(W), m(r), u(a), h(i);
6518
6518
  }
6519
6519
  }
@@ -6524,12 +6524,12 @@ function nm() {
6524
6524
  const W = r.findIndex((Y) => Y.id === z);
6525
6525
  c(W);
6526
6526
  const Q = r.filter(
6527
- (Y) => Y.id !== es.id
6527
+ (Y) => Y.id !== as.id
6528
6528
  );
6529
- Q.splice(W, 0, es), m(Q);
6529
+ Q.splice(W, 0, as), m(Q);
6530
6530
  } else if (P.id === Ns) {
6531
6531
  c(r.length);
6532
- const W = [...r, es];
6532
+ const W = [...r, as];
6533
6533
  m(W), d(n), u(a), h(i);
6534
6534
  }
6535
6535
  }
@@ -6608,7 +6608,7 @@ function nm() {
6608
6608
  // Unique ID
6609
6609
  name: E.column_name,
6610
6610
  type: E.data_type,
6611
- sql: ls(
6611
+ sql: os(
6612
6612
  E.data_type,
6613
6613
  b,
6614
6614
  vt(E.column_name)
@@ -6626,9 +6626,9 @@ function nm() {
6626
6626
  );
6627
6627
  if (!Y) return;
6628
6628
  const q = Xt(Y.data_type), $ = It(Y.data_type), G = Ot(Y.data_type);
6629
- ($ || G) && (P.id === ha || ((z = P.data.current) == null ? void 0 : z.type) === Rn) && S(Y), ($ || G) && (P.id === fa || ((U = P.data.current) == null ? void 0 : U.type) === Fn) ? T(Y) : (q || $) && (P.id === pa || ((B = P.data.current) == null ? void 0 : B.type) === vs) ? (q && v(Y), $ && v(Y, "COUNT")) : k(Y) && (P.id === Ns || ((ee = P.data.current) == null ? void 0 : ee.type) === bs) && F(Y);
6629
+ ($ || G) && (P.id === ha || ((z = P.data.current) == null ? void 0 : z.type) === zn) && S(Y), ($ || G) && (P.id === fa || ((U = P.data.current) == null ? void 0 : U.type) === Ln) ? T(Y) : (q || $) && (P.id === pa || ((B = P.data.current) == null ? void 0 : B.type) === vs) ? (q && v(Y), $ && v(Y, "COUNT")) : k(Y) && (P.id === Ns || ((ee = P.data.current) == null ? void 0 : ee.type) === bs) && F(Y);
6630
6630
  }
6631
- if (P && ((ie = P.data.current) == null ? void 0 : ie.type) === Rn && a.some((Y) => Y.id === I.id)) {
6631
+ if (P && ((ie = P.data.current) == null ? void 0 : ie.type) === zn && a.some((Y) => Y.id === I.id)) {
6632
6632
  const Y = a.findIndex(
6633
6633
  ($) => $.id === I.id
6634
6634
  ), q = a.findIndex(($) => $.id === P.id);
@@ -6637,7 +6637,7 @@ function nm() {
6637
6637
  $.splice(q, 0, G), g($);
6638
6638
  }
6639
6639
  }
6640
- if (P && ((te = P.data.current) == null ? void 0 : te.type) === Fn && i.some((Y) => Y.id === I.id)) {
6640
+ if (P && ((te = P.data.current) == null ? void 0 : te.type) === Ln && i.some((Y) => Y.id === I.id)) {
6641
6641
  const Y = i.findIndex(($) => $.id === I.id), q = i.findIndex(($) => $.id === P.id);
6642
6642
  if (Y !== -1 && q !== -1 && Y !== q) {
6643
6643
  const $ = [...i], [G] = $.splice(Y, 1);
@@ -6774,11 +6774,11 @@ function rm({
6774
6774
  function T(z) {
6775
6775
  var U;
6776
6776
  if (d) {
6777
- const B = hl(z, u);
6777
+ const B = ml(z, u);
6778
6778
  M(B);
6779
6779
  const ee = (U = k == null ? void 0 : k.find(
6780
6780
  (te) => te.id === g
6781
- )) == null ? void 0 : U.name, ie = pl(
6781
+ )) == null ? void 0 : U.name, ie = hl(
6782
6782
  B,
6783
6783
  vt(t),
6784
6784
  vt(a),
@@ -6916,7 +6916,7 @@ function rm({
6916
6916
  variant: "secondary",
6917
6917
  className: "grow",
6918
6918
  children: [
6919
- r !== "Success" ? /* @__PURE__ */ e(Fe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(_l, { className: "mr-2 size-4" }),
6919
+ r !== "Success" ? /* @__PURE__ */ e(Fe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Pl, { className: "mr-2 size-4" }),
6920
6920
  "Count"
6921
6921
  ]
6922
6922
  }
@@ -6968,7 +6968,7 @@ function rm({
6968
6968
  )
6969
6969
  ] }),
6970
6970
  /* @__PURE__ */ s(
6971
- _n,
6971
+ jn,
6972
6972
  {
6973
6973
  className: "flex-1 basis-0 overflow-y-auto px-4 pt-3",
6974
6974
  children: [
@@ -6990,7 +6990,7 @@ function rm({
6990
6990
  )
6991
6991
  ] });
6992
6992
  }
6993
- function si({
6993
+ function ni({
6994
6994
  ColumnsComponent: t,
6995
6995
  type: a
6996
6996
  }) {
@@ -7224,7 +7224,7 @@ function si({
7224
7224
  }
7225
7225
  );
7226
7226
  }
7227
- function ri({
7227
+ function si({
7228
7228
  error: t,
7229
7229
  className: a = "",
7230
7230
  textClassName: n = "",
@@ -7283,7 +7283,7 @@ function ri({
7283
7283
  }
7284
7284
  );
7285
7285
  }
7286
- function li({
7286
+ function ri({
7287
7287
  sql: t,
7288
7288
  error: a,
7289
7289
  onDebugWithAssistant: n
@@ -7296,7 +7296,7 @@ function li({
7296
7296
  }
7297
7297
  return /* @__PURE__ */ e("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ s("div", { className: "flex grow flex-col space-y-2", children: [
7298
7298
  /* @__PURE__ */ s(st, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
7299
- a && /* @__PURE__ */ e(ri, { error: a }),
7299
+ a && /* @__PURE__ */ e(si, { error: a }),
7300
7300
  t && /* @__PURE__ */ e("div", { className: "flex flex-col space-y-1.5", children: /* @__PURE__ */ e("div", { className: "rounded-md", children: /* @__PURE__ */ e(so, { code: t, language: "sql" }) }) })
7301
7301
  ] }),
7302
7302
  !r && t && /* @__PURE__ */ s(_, { onClick: o, variant: "secondary", size: "sm", children: [
@@ -7317,15 +7317,15 @@ function li({
7317
7317
  )
7318
7318
  ] }) });
7319
7319
  }
7320
- function ii({
7320
+ function li({
7321
7321
  sql: t,
7322
7322
  error: a,
7323
7323
  onDebugWithAssistant: n
7324
7324
  }) {
7325
7325
  return /* @__PURE__ */ s(ks, { openDelay: a ? 0 : 500, children: [
7326
- /* @__PURE__ */ e(Ds, { asChild: !0, children: /* @__PURE__ */ e(_, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Fl, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(cn, { className: "h-4 w-4 text-muted-foreground" }) }) }),
7326
+ /* @__PURE__ */ e(Ds, { asChild: !0, children: /* @__PURE__ */ e(_, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Rl, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(cn, { className: "h-4 w-4 text-muted-foreground" }) }) }),
7327
7327
  /* @__PURE__ */ e(Ts, { align: "start", className: "flex w-[600px]", children: /* @__PURE__ */ e(
7328
- li,
7328
+ ri,
7329
7329
  {
7330
7330
  sql: t,
7331
7331
  error: a,
@@ -7337,10 +7337,10 @@ function ii({
7337
7337
  function lm(t) {
7338
7338
  return ro({ 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);
7339
7339
  }
7340
- function oi(t) {
7340
+ function ii(t) {
7341
7341
  const { theme: a } = lo(), n = Z((p) => p.theme), r = A((p) => p.frame), l = A((p) => p.card), i = A((p) => p.activeTabCardId), c = io(), { refetch: o } = Ve(l), { updateCardTab: u, setRunSql: d } = le(), m = zt(), h = zt({}), g = r.cards.find((p) => p.id === i), x = Ne(() => {
7342
7342
  let p = "";
7343
- return t === "python" && (p = (g == null ? void 0 : g.python) || xl), t === "sql" && (p = (g == null ? void 0 : g.sql) || ""), p;
7343
+ return t === "python" && (p = (g == null ? void 0 : g.python) || gl), t === "sql" && (p = (g == null ? void 0 : g.sql) || ""), p;
7344
7344
  }, [t, g]);
7345
7345
  Te(() => {
7346
7346
  if (i && l.id && l.id !== i) {
@@ -7399,14 +7399,14 @@ function oi(t) {
7399
7399
  return { handleEditorDidMount: y };
7400
7400
  }
7401
7401
  function im() {
7402
- const t = A((c) => c.card.sql), a = A((c) => c.sqlGen), { setCardSql: n, setSqlGen: r } = le(), { handleEditorDidMount: l } = oi("sql");
7402
+ const t = A((c) => c.card.sql), a = A((c) => c.sqlGen), { setCardSql: n, setSqlGen: r } = le(), { handleEditorDidMount: l } = ii("sql");
7403
7403
  function i(c) {
7404
7404
  n(c), co(a) || r({});
7405
7405
  }
7406
7406
  return /* @__PURE__ */ s("div", { className: "relative h-full w-full", children: [
7407
7407
  !t && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-[65px] top-3 z-10 font-mono text-sm text-muted-foreground", children: "Write your SQL here" }),
7408
7408
  /* @__PURE__ */ e(
7409
- Vn,
7409
+ Bn,
7410
7410
  {
7411
7411
  theme: "default",
7412
7412
  className: "pt-3",
@@ -7431,17 +7431,17 @@ function im() {
7431
7431
  ] });
7432
7432
  }
7433
7433
  function om() {
7434
- const t = A((l) => l.card.python), { setCardPython: a } = le(), { handleEditorDidMount: n } = oi("python");
7434
+ const t = A((l) => l.card.python), { setCardPython: a } = le(), { handleEditorDidMount: n } = ii("python");
7435
7435
  function r(l) {
7436
7436
  a(l);
7437
7437
  }
7438
7438
  return /* @__PURE__ */ e(
7439
- Vn,
7439
+ Bn,
7440
7440
  {
7441
7441
  className: "pt-3",
7442
7442
  theme: "default",
7443
7443
  onChange: r,
7444
- value: t || xl,
7444
+ value: t || gl,
7445
7445
  options: {
7446
7446
  minimap: {
7447
7447
  enabled: !1
@@ -7461,7 +7461,7 @@ function om() {
7461
7461
  }
7462
7462
  function cm({ jsonString: t }) {
7463
7463
  return /* @__PURE__ */ e(
7464
- Vn,
7464
+ Bn,
7465
7465
  {
7466
7466
  theme: "default",
7467
7467
  defaultLanguage: "json",
@@ -7525,7 +7525,7 @@ function sr({
7525
7525
  function dm() {
7526
7526
  const t = tt(), [a, n] = j(!1), r = Z(
7527
7527
  (d) => d.actions.setIsDashboardPanelOpen
7528
- ), { setIsVisualEditing: l } = wt(), { getUpdatedFrame: i } = ar(), c = nl(), o = Su();
7528
+ ), { setIsVisualEditing: l } = wt(), { getUpdatedFrame: i } = ar(), c = al(), o = Su();
7529
7529
  return /* @__PURE__ */ s(_, { onClick: () => {
7530
7530
  const d = i();
7531
7531
  if (!(c != null && c.id)) {
@@ -7585,7 +7585,7 @@ function rr() {
7585
7585
  }
7586
7586
  );
7587
7587
  }
7588
- function $n() {
7588
+ function Yn() {
7589
7589
  const { setTempQueryData: t } = le(), a = tt(), n = A((N) => N.isDevMode), r = A((N) => N.tempQueryData), l = A((N) => N.card), { queryKey: i } = Ve(l), {
7590
7590
  setCardSql: c,
7591
7591
  setSqlGen: o,
@@ -7671,7 +7671,7 @@ function um() {
7671
7671
  position: "top-center",
7672
7672
  richColors: !0
7673
7673
  }), y((v == null ? void 0 : v.output) || ""), v.records.length > 0)) {
7674
- const { dimensionKeys: B } = is(v.records);
7674
+ const { dimensionKeys: B } = cs(v.records);
7675
7675
  h(B);
7676
7676
  }
7677
7677
  }, [v, h, y]), Te(() => {
@@ -7812,14 +7812,14 @@ ${u}` : ""}
7812
7812
  }
7813
7813
  ),
7814
7814
  /* @__PURE__ */ e(
7815
- ii,
7815
+ li,
7816
7816
  {
7817
7817
  sql: v == null ? void 0 : v.sql,
7818
7818
  error: I,
7819
7819
  onDebugWithAssistant: P
7820
7820
  }
7821
7821
  ),
7822
- /* @__PURE__ */ e($n, {}),
7822
+ /* @__PURE__ */ e(Yn, {}),
7823
7823
  /* @__PURE__ */ e(
7824
7824
  ho,
7825
7825
  {
@@ -7899,7 +7899,7 @@ function mm({ card: t }) {
7899
7899
  return I || null;
7900
7900
  });
7901
7901
  return /* @__PURE__ */ e("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ s(
7902
- Rl,
7902
+ Ol,
7903
7903
  {
7904
7904
  fallback: /* @__PURE__ */ e(se, {}),
7905
7905
  children: [
@@ -7954,7 +7954,7 @@ function mm({ card: t }) {
7954
7954
  (L = t.customCardPreferences) == null ? void 0 : L.componentName
7955
7955
  ) });
7956
7956
  }
7957
- function ci({
7957
+ function oi({
7958
7958
  // card,
7959
7959
  // showCard,
7960
7960
  className: t,
@@ -7988,7 +7988,7 @@ function ci({
7988
7988
  }
7989
7989
  };
7990
7990
  p(w), N(w), n.sql && ((D = (L = n.preferences) == null ? void 0 : L.tablePrefs) != null && D.enableDevModePagination) && o(!0);
7991
- }, C = Ke(() => !n.id || !(m != null && m.records) ? null : yl({
7991
+ }, C = Ke(() => !n.id || !(m != null && m.records) ? null : xl({
7992
7992
  card: n,
7993
7993
  data: m == null ? void 0 : m.records,
7994
7994
  cardType: n.type,
@@ -8107,7 +8107,7 @@ function ci({
8107
8107
  inputClassName: "text-base font-semibold"
8108
8108
  }
8109
8109
  ) }) }),
8110
- /* @__PURE__ */ e(tl, { className: "w-1/2", children: /* @__PURE__ */ e(
8110
+ /* @__PURE__ */ e("div", { className: "w-1/2", children: /* @__PURE__ */ e(
8111
8111
  Wt,
8112
8112
  {
8113
8113
  value: n.description || "",
@@ -8131,7 +8131,7 @@ function ci({
8131
8131
  inputClassName: "text-sm"
8132
8132
  }
8133
8133
  ) }),
8134
- /* @__PURE__ */ e(vl, { filter: d })
8134
+ /* @__PURE__ */ e(yl, { filter: d })
8135
8135
  ] })
8136
8136
  ] }),
8137
8137
  /* @__PURE__ */ e(Na, { className: "flex grow flex-col", children: v() })
@@ -8139,13 +8139,13 @@ function ci({
8139
8139
  }
8140
8140
  );
8141
8141
  }
8142
- const ts = ({
8142
+ const ns = ({
8143
8143
  language: t,
8144
8144
  value: a,
8145
8145
  onChange: n,
8146
8146
  readonly: r
8147
8147
  }) => /* @__PURE__ */ e(
8148
- Vn,
8148
+ Bn,
8149
8149
  {
8150
8150
  className: "h-full w-full overflow-hidden text-xs",
8151
8151
  theme: "default",
@@ -8198,7 +8198,7 @@ const ts = ({
8198
8198
  value: "final-config",
8199
8199
  className: "mt-0 grow rounded-b border border-t-0",
8200
8200
  children: /* @__PURE__ */ e(
8201
- ts,
8201
+ ns,
8202
8202
  {
8203
8203
  language: "json",
8204
8204
  value: n,
@@ -8213,7 +8213,7 @@ const ts = ({
8213
8213
  value: "custom-config",
8214
8214
  className: "mt-0 grow rounded-b border border-t-0",
8215
8215
  children: /* @__PURE__ */ e(
8216
- ts,
8216
+ ns,
8217
8217
  {
8218
8218
  readonly: !0,
8219
8219
  language: "json",
@@ -8230,7 +8230,7 @@ const ts = ({
8230
8230
  value: "custom-code",
8231
8231
  className: "mt-0 grow rounded-b border border-t-0",
8232
8232
  children: /* @__PURE__ */ e(
8233
- ts,
8233
+ ns,
8234
8234
  {
8235
8235
  language: "javascript",
8236
8236
  value: t,
@@ -8271,7 +8271,7 @@ function gm() {
8271
8271
  }, b = () => {
8272
8272
  var k, v;
8273
8273
  if (!((k = x == null ? void 0 : x.records) != null && k.length)) return;
8274
- const C = yl({
8274
+ const C = xl({
8275
8275
  card: m,
8276
8276
  data: x.records,
8277
8277
  cardType: m.type,
@@ -8313,7 +8313,7 @@ function gm() {
8313
8313
  /* @__PURE__ */ s(ea, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
8314
8314
  /* @__PURE__ */ e(hm, {}),
8315
8315
  /* @__PURE__ */ s("div", { className: "flex grow gap-2", children: [
8316
- /* @__PURE__ */ e(xn, { FallbackComponent: Us, children: /* @__PURE__ */ e(ci, { className: "w-1/2 rounded shadow-none" }) }),
8316
+ /* @__PURE__ */ e(xn, { FallbackComponent: Us, children: /* @__PURE__ */ e(oi, { className: "w-1/2 rounded shadow-none" }) }),
8317
8317
  /* @__PURE__ */ e(
8318
8318
  pm,
8319
8319
  {
@@ -8340,11 +8340,11 @@ function gm() {
8340
8340
  ] })
8341
8341
  ] });
8342
8342
  }
8343
- function qn(t) {
8343
+ function Gn(t) {
8344
8344
  const [a, n] = j(null);
8345
8345
  return a;
8346
8346
  }
8347
- function di() {
8347
+ function ci() {
8348
8348
  const { authToken: t } = Me(), { data: a, isLoading: n, isFetching: r, isError: l } = kt({
8349
8349
  queryKey: ["plugins", t == null ? void 0 : t.accessToken],
8350
8350
  queryFn: () => ko(t == null ? void 0 : t.accessToken)
@@ -8352,12 +8352,12 @@ function di() {
8352
8352
  });
8353
8353
  return { data: a, isLoading: n, isFetching: r, isError: l };
8354
8354
  }
8355
- function ui() {
8355
+ function di() {
8356
8356
  const {
8357
8357
  data: t,
8358
8358
  isLoading: a,
8359
8359
  isError: n
8360
- } = di(), r = Do({
8360
+ } = ci(), r = Do({
8361
8361
  queries: ((t == null ? void 0 : t.plugins) || []).map((o) => ({
8362
8362
  queryKey: ["manifest", o.value],
8363
8363
  queryFn: () => To(o.value),
@@ -8399,7 +8399,7 @@ function xm({
8399
8399
  setCardPreferences: n,
8400
8400
  setCardType: r,
8401
8401
  setCustomCardPreferences: l
8402
- } = le(), { data: i, isLoading: c, isError: o } = ui(), u = Ne(
8402
+ } = le(), { data: i, isLoading: c, isError: o } = di(), u = Ne(
8403
8403
  (d, m) => {
8404
8404
  a(null), n({}), r(d), m && l({
8405
8405
  type: "component",
@@ -8441,10 +8441,10 @@ const ym = ({
8441
8441
  icon: a,
8442
8442
  onClick: n
8443
8443
  }) => {
8444
- const r = qn(), l = t.charAt(0).toUpperCase();
8444
+ const r = Gn(), l = t.charAt(0).toUpperCase();
8445
8445
  return /* @__PURE__ */ e(ye, { onClick: n, tooltip: t, children: r ? /* @__PURE__ */ e(r, { className: "h-4 w-4" }) : l });
8446
8446
  };
8447
- function mi({
8447
+ function ui({
8448
8448
  onChartTypeChange: t,
8449
8449
  iconClassName: a
8450
8450
  }) {
@@ -8463,7 +8463,7 @@ function mi({
8463
8463
  tooltip: "Table",
8464
8464
  onClick: () => u("table"),
8465
8465
  className: "h-10 p-4",
8466
- children: /* @__PURE__ */ e(Pn, { className: J("size-5", a) })
8466
+ children: /* @__PURE__ */ e(Vn, { className: J("size-5", a) })
8467
8467
  }
8468
8468
  ),
8469
8469
  /* @__PURE__ */ e(
@@ -8473,7 +8473,7 @@ function mi({
8473
8473
  tooltip: "Bar Chart",
8474
8474
  onClick: () => u("bar"),
8475
8475
  className: "h-10 p-4",
8476
- children: /* @__PURE__ */ e(Bn, { className: J("size-5", a) })
8476
+ children: /* @__PURE__ */ e($n, { className: J("size-5", a) })
8477
8477
  }
8478
8478
  ),
8479
8479
  /* @__PURE__ */ e(
@@ -8483,7 +8483,7 @@ function mi({
8483
8483
  tooltip: "Line Chart",
8484
8484
  onClick: () => u("line"),
8485
8485
  className: "h-10 p-4",
8486
- children: /* @__PURE__ */ e(jn, { className: J("size-5", a) })
8486
+ children: /* @__PURE__ */ e(Un, { className: J("size-5", a) })
8487
8487
  }
8488
8488
  ),
8489
8489
  /* @__PURE__ */ e(
@@ -8504,7 +8504,7 @@ function mi({
8504
8504
  onClick: () => u("stackedLine"),
8505
8505
  className: "h-10 p-4",
8506
8506
  children: /* @__PURE__ */ e(
8507
- kl,
8507
+ Sl,
8508
8508
  {
8509
8509
  className: J("size-5", a),
8510
8510
  strokeWidth: 0
@@ -8519,7 +8519,7 @@ function mi({
8519
8519
  tooltip: "Scatter Chart",
8520
8520
  onClick: () => u("scatter"),
8521
8521
  className: "h-10 p-4",
8522
- children: /* @__PURE__ */ e(Tl, { className: J("size-5", a) })
8522
+ children: /* @__PURE__ */ e(Dl, { className: J("size-5", a) })
8523
8523
  }
8524
8524
  ),
8525
8525
  /* @__PURE__ */ e(
@@ -8529,7 +8529,7 @@ function mi({
8529
8529
  tooltip: "Bubble Chart",
8530
8530
  onClick: () => u("bubble"),
8531
8531
  className: "h-10 p-4",
8532
- children: /* @__PURE__ */ e(Dl, { className: J("size-5", a) })
8532
+ children: /* @__PURE__ */ e(kl, { className: J("size-5", a) })
8533
8533
  }
8534
8534
  ),
8535
8535
  /* @__PURE__ */ e(
@@ -8539,7 +8539,7 @@ function mi({
8539
8539
  tooltip: "Pie Chart",
8540
8540
  onClick: () => u("pie"),
8541
8541
  className: "h-10 p-4",
8542
- children: /* @__PURE__ */ e(Ln, { className: J("size-5", a) })
8542
+ children: /* @__PURE__ */ e(_n, { className: J("size-5", a) })
8543
8543
  }
8544
8544
  ),
8545
8545
  /* @__PURE__ */ e(
@@ -8559,7 +8559,7 @@ function mi({
8559
8559
  tooltip: "Funnel Chart",
8560
8560
  onClick: () => u("funnel"),
8561
8561
  className: "h-10 p-4",
8562
- children: /* @__PURE__ */ e(wl, { className: J("size-5", a) })
8562
+ children: /* @__PURE__ */ e(Cl, { className: J("size-5", a) })
8563
8563
  }
8564
8564
  ),
8565
8565
  /* @__PURE__ */ e(
@@ -8569,7 +8569,7 @@ function mi({
8569
8569
  tooltip: "Radar Chart",
8570
8570
  onClick: () => u("radar"),
8571
8571
  className: "h-10 p-4",
8572
- children: /* @__PURE__ */ e(Ml, { className: J("size-5", a) })
8572
+ children: /* @__PURE__ */ e(Tl, { className: J("size-5", a) })
8573
8573
  }
8574
8574
  ),
8575
8575
  /* @__PURE__ */ e(
@@ -8579,7 +8579,7 @@ function mi({
8579
8579
  tooltip: "Polar Area Chart",
8580
8580
  onClick: () => u("polarArea"),
8581
8581
  className: "h-10 p-4",
8582
- children: /* @__PURE__ */ e(Sl, { className: J("size-5", a) })
8582
+ children: /* @__PURE__ */ e(wl, { className: J("size-5", a) })
8583
8583
  }
8584
8584
  ),
8585
8585
  /* @__PURE__ */ e(
@@ -8589,7 +8589,7 @@ function mi({
8589
8589
  tooltip: "Tornado Chart",
8590
8590
  onClick: () => u("tornado"),
8591
8591
  className: "h-10 p-4",
8592
- children: /* @__PURE__ */ e(Cl, { className: J("size-5", a) })
8592
+ children: /* @__PURE__ */ e(bl, { className: J("size-5", a) })
8593
8593
  }
8594
8594
  ),
8595
8595
  /* @__PURE__ */ e(
@@ -8598,7 +8598,7 @@ function mi({
8598
8598
  tooltip: "Range Chart",
8599
8599
  onClick: () => u("range"),
8600
8600
  className: "h-10 p-4",
8601
- children: /* @__PURE__ */ e(bl, { className: J("size-5", a) })
8601
+ children: /* @__PURE__ */ e(Nl, { className: J("size-5", a) })
8602
8602
  }
8603
8603
  ),
8604
8604
  /* @__PURE__ */ e(
@@ -8627,7 +8627,7 @@ function mi({
8627
8627
  tooltip: "Map",
8628
8628
  onClick: () => u("map"),
8629
8629
  className: "h-10 p-4",
8630
- children: /* @__PURE__ */ e(Nl, { className: J("size-5", a) })
8630
+ children: /* @__PURE__ */ e(vl, { className: J("size-5", a) })
8631
8631
  }
8632
8632
  ),
8633
8633
  /* @__PURE__ */ e(
@@ -8648,48 +8648,48 @@ function vm({
8648
8648
  customIcon: n,
8649
8649
  componentName: r
8650
8650
  }) {
8651
- const l = qn();
8651
+ const l = Gn();
8652
8652
  switch (t) {
8653
8653
  case "bar":
8654
- return /* @__PURE__ */ e(Bn, { className: a });
8654
+ return /* @__PURE__ */ e($n, { className: a });
8655
8655
  case "line":
8656
- return /* @__PURE__ */ e(jn, { className: a });
8656
+ return /* @__PURE__ */ e(Un, { className: a });
8657
8657
  case "pie":
8658
- return /* @__PURE__ */ e(Ln, { className: a });
8658
+ return /* @__PURE__ */ e(_n, { className: a });
8659
8659
  case "radar":
8660
- return /* @__PURE__ */ e(Ml, { className: a });
8661
- case "scatter":
8662
8660
  return /* @__PURE__ */ e(Tl, { className: a });
8663
- case "bubble":
8661
+ case "scatter":
8664
8662
  return /* @__PURE__ */ e(Dl, { className: a });
8663
+ case "bubble":
8664
+ return /* @__PURE__ */ e(kl, { className: a });
8665
8665
  case "doughnut":
8666
8666
  return /* @__PURE__ */ e(Gs, { className: a });
8667
8667
  case "stackedBar":
8668
8668
  return /* @__PURE__ */ e(Ys, { className: a });
8669
8669
  case "stackedLine":
8670
- return /* @__PURE__ */ e(kl, { className: a });
8671
- case "polarArea":
8672
8670
  return /* @__PURE__ */ e(Sl, { className: a });
8673
- case "funnel":
8671
+ case "polarArea":
8674
8672
  return /* @__PURE__ */ e(wl, { className: a });
8673
+ case "funnel":
8674
+ return /* @__PURE__ */ e(Cl, { className: a });
8675
8675
  case "tornado":
8676
8676
  case "pyramid":
8677
- return /* @__PURE__ */ e(Cl, { className: a });
8678
- case "range":
8679
8677
  return /* @__PURE__ */ e(bl, { className: a });
8678
+ case "range":
8679
+ return /* @__PURE__ */ e(Nl, { className: a });
8680
8680
  case "kpi":
8681
8681
  return /* @__PURE__ */ e(qs, { className: a });
8682
8682
  case "text":
8683
8683
  return /* @__PURE__ */ e(ut, { className: a });
8684
8684
  case "map":
8685
- return /* @__PURE__ */ e(Nl, { className: a });
8685
+ return /* @__PURE__ */ e(vl, { className: a });
8686
8686
  case "custom":
8687
8687
  return n && l ? /* @__PURE__ */ e(l, { className: a }) : r ? r == null ? void 0 : r.charAt(0).toUpperCase() : /* @__PURE__ */ e(nn, { className: a });
8688
8688
  default:
8689
- return /* @__PURE__ */ e(Pn, { className: a });
8689
+ return /* @__PURE__ */ e(Vn, { className: a });
8690
8690
  }
8691
8691
  }
8692
- function hi({
8692
+ function mi({
8693
8693
  variant: t = "ghost"
8694
8694
  }) {
8695
8695
  var i, c;
@@ -8718,7 +8718,7 @@ function hi({
8718
8718
  className: "w-72 p-1",
8719
8719
  children: [
8720
8720
  /* @__PURE__ */ e(
8721
- mi,
8721
+ ui,
8722
8722
  {
8723
8723
  onChartTypeChange: () => n(!1)
8724
8724
  }
@@ -8762,7 +8762,7 @@ function Nm() {
8762
8762
  }
8763
8763
  return /* @__PURE__ */ e(se, { children: a === "funnel" ? l() : r() });
8764
8764
  }
8765
- function pi() {
8765
+ function hi() {
8766
8766
  const t = A((c) => c.card), a = A((c) => c.isShowingVisual), n = A(
8767
8767
  (c) => {
8768
8768
  var o, u;
@@ -8938,7 +8938,7 @@ function bm() {
8938
8938
  )
8939
8939
  ] }) });
8940
8940
  }
8941
- function fi() {
8941
+ function pi() {
8942
8942
  const t = A((p) => p.frame), a = A((p) => p.card), n = A((p) => p.isSqlRunning), r = A((p) => p.isDevMode), { setFrame: l, setActiveTabCardId: i, setCard: c, setIsDevMode: o, setRunSql: u } = le(), { data: d, isLoading: m, isFetching: h } = Ve(a);
8943
8943
  function g(p) {
8944
8944
  const N = t.cards.find((f) => f.id === p);
@@ -8977,7 +8977,7 @@ function fi() {
8977
8977
  card: a,
8978
8978
  data: d == null ? void 0 : d.records
8979
8979
  }
8980
- ) }) }) }) : /* @__PURE__ */ e(xn, { FallbackComponent: Us, children: /* @__PURE__ */ e(ci, { className: "grow border-none shadow-none" }) });
8980
+ ) }) }) }) : /* @__PURE__ */ e(xn, { FallbackComponent: Us, children: /* @__PURE__ */ e(oi, { className: "grow border-none shadow-none" }) });
8981
8981
  }
8982
8982
  return /* @__PURE__ */ s(
8983
8983
  _t,
@@ -9036,7 +9036,7 @@ function Sn({
9036
9036
  className: "z-10 mb-0 flex min-h-10 items-center justify-end gap-2 px-6",
9037
9037
  children: [
9038
9038
  r && /* @__PURE__ */ s("div", { className: "flex grow items-center", children: [
9039
- /* @__PURE__ */ e(hi, {}),
9039
+ /* @__PURE__ */ e(mi, {}),
9040
9040
  l && /* @__PURE__ */ e(ye, { tooltip: "Visual Docs", onClick: M, children: /* @__PURE__ */ e(od, { className: "size-4" }) }),
9041
9041
  !["table", "custom"].includes(a.type) && l && /* @__PURE__ */ e(gm, {})
9042
9042
  ] }),
@@ -9071,7 +9071,7 @@ function Sn({
9071
9071
  ] }),
9072
9072
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
9073
9073
  t,
9074
- /* @__PURE__ */ e(pi, {})
9074
+ /* @__PURE__ */ e(hi, {})
9075
9075
  ] }),
9076
9076
  a.type === "table" && a.sql && !zo(a.config) && /* @__PURE__ */ s("div", { className: "mr-2 flex items-center gap-3", children: [
9077
9077
  /* @__PURE__ */ e(
@@ -9097,7 +9097,7 @@ function Sn({
9097
9097
  ]
9098
9098
  }
9099
9099
  ),
9100
- r ? /* @__PURE__ */ e(fi, {}) : /* @__PURE__ */ s(
9100
+ r ? /* @__PURE__ */ e(pi, {}) : /* @__PURE__ */ s(
9101
9101
  Gt,
9102
9102
  {
9103
9103
  className: "px-6",
@@ -9132,7 +9132,7 @@ function Sn({
9132
9132
  children: [
9133
9133
  (g == null ? void 0 : g.records) && (g == null ? void 0 : g.records.length) > 0 && // <ResultsTable data={data?.records || []} />
9134
9134
  /* @__PURE__ */ e(Bs, { card: a, data: (g == null ? void 0 : g.records) || [] }),
9135
- p && /* @__PURE__ */ e(ri, { error: p })
9135
+ p && /* @__PURE__ */ e(si, { error: p })
9136
9136
  ]
9137
9137
  }
9138
9138
  )
@@ -9176,7 +9176,7 @@ function Sm() {
9176
9176
  var p, N;
9177
9177
  const t = A(
9178
9178
  (f) => f.card.customCardPreferences
9179
- ), { data: a } = di(), n = (a == null ? void 0 : a.plugins) || [], r = A((f) => f.card), l = A((f) => f.frame), i = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: c } = le(), { components: o, manifest: u } = _s(
9179
+ ), { data: a } = ci(), n = (a == null ? void 0 : a.plugins) || [], r = A((f) => f.card), l = A((f) => f.frame), i = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: c } = le(), { components: o, manifest: u } = _s(
9180
9180
  (t == null ? void 0 : t.url) || ""
9181
9181
  ), d = (p = u == null ? void 0 : u.visuals) == null ? void 0 : p.find(
9182
9182
  (f) => f.name === (t == null ? void 0 : t.componentName)
@@ -9451,7 +9451,7 @@ function Ca() {
9451
9451
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: ((g = n == null ? void 0 : n.onClickFilter) == null ? void 0 : g.find(
9452
9452
  (x) => x.columnIndex === m
9453
9453
  )) && /* @__PURE__ */ e(
9454
- ml,
9454
+ ul,
9455
9455
  {
9456
9456
  onClick: () => {
9457
9457
  a((x) => {
@@ -9515,7 +9515,7 @@ function km({ idx: t }) {
9515
9515
  }
9516
9516
  }
9517
9517
  return /* @__PURE__ */ s(mt, { children: [
9518
- /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(Vl, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
9518
+ /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(_l, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
9519
9519
  /* @__PURE__ */ e(St, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ s("div", { className: "flex gap-1", children: [
9520
9520
  /* @__PURE__ */ e(
9521
9521
  "button",
@@ -9574,7 +9574,7 @@ function km({ idx: t }) {
9574
9574
  ] });
9575
9575
  }
9576
9576
  function Dm() {
9577
- const t = A((i) => i.card), { data: a } = Ve(t), { keys: n } = is((a == null ? void 0 : a.records) || []), r = n.slice(1).filter((i) => !_o.includes(i));
9577
+ const t = A((i) => i.card), { data: a } = Ve(t), { keys: n } = cs((a == null ? void 0 : a.records) || []), r = n.slice(1).filter((i) => !_o.includes(i));
9578
9578
  let l = r;
9579
9579
  if (["stackedBar", "stackedLine"].includes(t.type)) {
9580
9580
  const i = Vo({
@@ -9582,7 +9582,7 @@ function Dm() {
9582
9582
  groupKey: n[0],
9583
9583
  pivotKey: n[1],
9584
9584
  valueKey: n[2]
9585
- }), { keys: c } = is(i);
9585
+ }), { keys: c } = cs(i);
9586
9586
  l = c.slice(1);
9587
9587
  }
9588
9588
  return {
@@ -9592,7 +9592,7 @@ function Dm() {
9592
9592
  defaultMetricKeys: r
9593
9593
  };
9594
9594
  }
9595
- function Yn({
9595
+ function Kn({
9596
9596
  children: t,
9597
9597
  className: a,
9598
9598
  delayDuration: n
@@ -9611,7 +9611,7 @@ function Yn({
9611
9611
  /* @__PURE__ */ e(Be, { children: t })
9612
9612
  ] }) });
9613
9613
  }
9614
- function gi() {
9614
+ function fi() {
9615
9615
  const t = A((u) => u.card), a = A(
9616
9616
  (u) => {
9617
9617
  var d, m, h;
@@ -9626,7 +9626,7 @@ function gi() {
9626
9626
  {
9627
9627
  className: "flex h-8 items-center rounded-md bg-muted/70 px-3 hover:bg-muted",
9628
9628
  title: u,
9629
- children: xi(u)
9629
+ children: gi(u)
9630
9630
  },
9631
9631
  u
9632
9632
  )) })
@@ -9634,7 +9634,7 @@ function gi() {
9634
9634
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
9635
9635
  /* @__PURE__ */ e(V, { children: l }),
9636
9636
  /* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: c.map((u, d) => /* @__PURE__ */ e(
9637
- yi,
9637
+ xi,
9638
9638
  {
9639
9639
  className: "flex h-8 items-center bg-muted/70 px-3 hover:bg-muted",
9640
9640
  iconClassName: "invisible group-hover:visible",
@@ -9646,10 +9646,10 @@ function gi() {
9646
9646
  ] })
9647
9647
  ] });
9648
9648
  }
9649
- function xi(t, a = 30) {
9649
+ function gi(t, a = 30) {
9650
9650
  return t.length > a ? t.slice(0, a) + "..." : t;
9651
9651
  }
9652
- function yi({
9652
+ function xi({
9653
9653
  col: t,
9654
9654
  idx: a,
9655
9655
  className: n,
@@ -9698,10 +9698,10 @@ function yi({
9698
9698
  n
9699
9699
  ),
9700
9700
  children: [
9701
- l || /* @__PURE__ */ e(Yn, { className: "max-w-[100px]", title: t, children: xi(t) }),
9701
+ l || /* @__PURE__ */ e(Kn, { className: "max-w-[100px]", title: t, children: gi(t) }),
9702
9702
  /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
9703
9703
  /* @__PURE__ */ e(
9704
- Bn,
9704
+ $n,
9705
9705
  {
9706
9706
  onClick: () => d("bar"),
9707
9707
  className: J(
@@ -9711,7 +9711,7 @@ function yi({
9711
9711
  }
9712
9712
  ),
9713
9713
  /* @__PURE__ */ e(
9714
- jn,
9714
+ Un,
9715
9715
  {
9716
9716
  onClick: () => d("line"),
9717
9717
  className: J(
@@ -9770,7 +9770,7 @@ function lr() {
9770
9770
  // database: 'NA',
9771
9771
  connectionId: t,
9772
9772
  operation: "in",
9773
- sql: ls(
9773
+ sql: os(
9774
9774
  x.data_type,
9775
9775
  R,
9776
9776
  N
@@ -9788,7 +9788,7 @@ function lr() {
9788
9788
  database: n || "",
9789
9789
  connectionId: t || "",
9790
9790
  operation: "in",
9791
- sql: ls(
9791
+ sql: os(
9792
9792
  x.data_type,
9793
9793
  R,
9794
9794
  N
@@ -9811,7 +9811,7 @@ function Ya() {
9811
9811
  return /* @__PURE__ */ s("div", { className: "space-y-3", children: [
9812
9812
  /* @__PURE__ */ e(V, { children: "Card Filter" }),
9813
9813
  /* @__PURE__ */ e(Tm, { onSelect: i, columns: r }),
9814
- c && /* @__PURE__ */ e(Al, { filter: c })
9814
+ c && /* @__PURE__ */ e(Ml, { filter: c })
9815
9815
  ] });
9816
9816
  }
9817
9817
  function Tm({
@@ -9897,7 +9897,7 @@ function Mm({
9897
9897
  ] }),
9898
9898
  /* @__PURE__ */ s(be, { value: "item-2", children: [
9899
9899
  /* @__PURE__ */ e(Ce, { children: "Settings" }),
9900
- /* @__PURE__ */ e(we, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(gi, {}) })
9900
+ /* @__PURE__ */ e(we, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(fi, {}) })
9901
9901
  ] }),
9902
9902
  /* @__PURE__ */ s(be, { value: "item-3", children: [
9903
9903
  /* @__PURE__ */ e(Ce, { children: "Click Filters" }),
@@ -9951,7 +9951,7 @@ function Am({
9951
9951
  ] })
9952
9952
  ] }) });
9953
9953
  }
9954
- function vi() {
9954
+ function yi() {
9955
9955
  const t = A((o) => o.card.type), a = A((o) => o.isDevMode), n = A((o) => o.card.preferences), { setCardPreferences: r } = A((o) => o.actions);
9956
9956
  function l(o) {
9957
9957
  var m;
@@ -10056,7 +10056,7 @@ function Om() {
10056
10056
  }
10057
10057
  ),
10058
10058
  !["kpi"].includes(t) && /* @__PURE__ */ s("div", { className: "space-y-4", children: [
10059
- /* @__PURE__ */ e(vi, {}),
10059
+ /* @__PURE__ */ e(yi, {}),
10060
10060
  /* @__PURE__ */ e(Ca, {}),
10061
10061
  /* @__PURE__ */ e(Ya, {})
10062
10062
  ] })
@@ -10438,7 +10438,7 @@ function Lm() {
10438
10438
  /* @__PURE__ */ e("div", {})
10439
10439
  ] });
10440
10440
  }
10441
- function as({
10441
+ function ss({
10442
10442
  children: t,
10443
10443
  summary: a,
10444
10444
  open: n,
@@ -10568,9 +10568,9 @@ function jm() {
10568
10568
  value: F
10569
10569
  })) || [];
10570
10570
  return /* @__PURE__ */ s("div", { className: "p-6", children: [
10571
- /* @__PURE__ */ e(as, { summary: "Map Chart", children: /* @__PURE__ */ e("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
10571
+ /* @__PURE__ */ e(ss, { summary: "Map Chart", children: /* @__PURE__ */ e("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
10572
10572
  /* @__PURE__ */ e(Qe, { className: "my-4" }),
10573
- /* @__PURE__ */ e(as, { open: !0, summary: "Settings", children: /* @__PURE__ */ s("div", { className: "space-y-3 px-2", children: [
10573
+ /* @__PURE__ */ e(ss, { open: !0, summary: "Settings", children: /* @__PURE__ */ s("div", { className: "space-y-3 px-2", children: [
10574
10574
  /* @__PURE__ */ e(
10575
10575
  ot,
10576
10576
  {
@@ -10693,7 +10693,7 @@ function jm() {
10693
10693
  ] })
10694
10694
  ] }) }),
10695
10695
  /* @__PURE__ */ e(Qe, { className: "my-4" }),
10696
- /* @__PURE__ */ e(as, { className: "", summary: "Scale Options", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
10696
+ /* @__PURE__ */ e(ss, { className: "", summary: "Scale Options", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
10697
10697
  /* @__PURE__ */ e(
10698
10698
  De,
10699
10699
  {
@@ -10785,11 +10785,11 @@ function Bm() {
10785
10785
  defaultValue: "x",
10786
10786
  children: [
10787
10787
  /* @__PURE__ */ s("div", { className: "flex items-center space-x-2", children: [
10788
- /* @__PURE__ */ e(rs, { value: "static", id: "r1" }),
10788
+ /* @__PURE__ */ e(is, { value: "static", id: "r1" }),
10789
10789
  /* @__PURE__ */ e("label", { className: "text-sm", htmlFor: "r1", children: "Static" })
10790
10790
  ] }),
10791
10791
  /* @__PURE__ */ s("div", { className: "flex items-center space-x-2", children: [
10792
- /* @__PURE__ */ e(rs, { value: "dynamic", id: "r2" }),
10792
+ /* @__PURE__ */ e(is, { value: "dynamic", id: "r2" }),
10793
10793
  /* @__PURE__ */ e("label", { className: "text-sm", htmlFor: "r2", children: "Dynamic" })
10794
10794
  ] })
10795
10795
  ]
@@ -10907,7 +10907,7 @@ function Um() {
10907
10907
  /* @__PURE__ */ e(Ce, { children: "Settings" }),
10908
10908
  /* @__PURE__ */ s(we, { className: "space-y-4 px-2", children: [
10909
10909
  n(),
10910
- /* @__PURE__ */ e(gi, {})
10910
+ /* @__PURE__ */ e(fi, {})
10911
10911
  ] })
10912
10912
  ] }),
10913
10913
  /* @__PURE__ */ s(be, { value: "item-3", children: [
@@ -10955,7 +10955,7 @@ function $m({
10955
10955
  ] })
10956
10956
  ] });
10957
10957
  }
10958
- function Ni({ color: t, onColorChange: a, onClose: n }) {
10958
+ function vi({ color: t, onColorChange: a, onClose: n }) {
10959
10959
  const [r, l] = j(0), [i, c] = j(100), [o, u] = j(50), [d, m] = j(t);
10960
10960
  Te(() => {
10961
10961
  const N = Pr(t);
@@ -11165,7 +11165,7 @@ const Gm = [
11165
11165
  "#fbbf24"
11166
11166
  // yellow-400
11167
11167
  ];
11168
- function bi() {
11168
+ function Ni() {
11169
11169
  var M, R, C, k, v, T, S, F, w, L;
11170
11170
  const t = A((D) => D.card), a = A((D) => {
11171
11171
  var E;
@@ -11402,7 +11402,7 @@ function bi() {
11402
11402
  }
11403
11403
  ),
11404
11404
  /* @__PURE__ */ e("div", { className: "relative rounded-lg bg-white shadow-lg", children: /* @__PURE__ */ e(
11405
- Ni,
11405
+ vi,
11406
11406
  {
11407
11407
  color: d.color,
11408
11408
  onColorChange: (D) => {
@@ -11855,7 +11855,7 @@ function Vr({ axis: t, label: a, type: n, config: r, onChange: l }) {
11855
11855
  ] })
11856
11856
  ] });
11857
11857
  }
11858
- function Ci() {
11858
+ function bi() {
11859
11859
  const t = A((c) => c.card), a = A((c) => {
11860
11860
  var o;
11861
11861
  return (o = c.card) == null ? void 0 : o.preferences;
@@ -11906,7 +11906,7 @@ function Ci() {
11906
11906
  ] }) })
11907
11907
  ] });
11908
11908
  }
11909
- function wi() {
11909
+ function Ci() {
11910
11910
  const t = A((d) => d.card), a = A(
11911
11911
  (d) => {
11912
11912
  var m, h, g, x;
@@ -11971,7 +11971,7 @@ function wi() {
11971
11971
  ] }) })
11972
11972
  ] });
11973
11973
  }
11974
- function Si() {
11974
+ function wi() {
11975
11975
  var T, S, F, w, L, D, E, I, P;
11976
11976
  const t = A((O) => O.card), a = A(
11977
11977
  (O) => {
@@ -12273,10 +12273,10 @@ function Qm() {
12273
12273
  return /* @__PURE__ */ s("div", { className: "space-y-4 px-6 py-4", children: [
12274
12274
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium", children: "Chart Configuration" }),
12275
12275
  /* @__PURE__ */ s(et, { type: "single", collapsible: !0, className: "w-full px-2", children: [
12276
+ /* @__PURE__ */ e(Ni, {}),
12276
12277
  /* @__PURE__ */ e(bi, {}),
12277
12278
  /* @__PURE__ */ e(Ci, {}),
12278
- /* @__PURE__ */ e(wi, {}),
12279
- /* @__PURE__ */ e(Si, {})
12279
+ /* @__PURE__ */ e(wi, {})
12280
12280
  ] })
12281
12281
  ] });
12282
12282
  }
@@ -12401,7 +12401,7 @@ function th() {
12401
12401
  /* @__PURE__ */ e(sa, { orientation: "horizontal" })
12402
12402
  ] });
12403
12403
  }
12404
- function ki({
12404
+ function Si({
12405
12405
  label: t,
12406
12406
  column: a,
12407
12407
  functions: n,
@@ -12433,7 +12433,7 @@ const ah = [
12433
12433
  {
12434
12434
  label: "Sum",
12435
12435
  value: "SUM",
12436
- logo: /* @__PURE__ */ e(_l, { className: "size-3.5" })
12436
+ logo: /* @__PURE__ */ e(Pl, { className: "size-3.5" })
12437
12437
  },
12438
12438
  {
12439
12439
  label: "Count",
@@ -12478,7 +12478,7 @@ function nh({ column: t }) {
12478
12478
  a(t.id, i);
12479
12479
  }
12480
12480
  return /* @__PURE__ */ e(
12481
- ki,
12481
+ Si,
12482
12482
  {
12483
12483
  column: t,
12484
12484
  functions: n,
@@ -12520,7 +12520,7 @@ function rh({ column: t }) {
12520
12520
  a(t.id, l);
12521
12521
  }
12522
12522
  return /* @__PURE__ */ e(
12523
- ki,
12523
+ Si,
12524
12524
  {
12525
12525
  column: t,
12526
12526
  functions: sh,
@@ -12534,7 +12534,7 @@ function lh({
12534
12534
  onChange: a,
12535
12535
  droppableId: n
12536
12536
  }) {
12537
- const { columns: r } = gl(), l = Ke(() => {
12537
+ const { columns: r } = fl(), l = Ke(() => {
12538
12538
  let o = [];
12539
12539
  (n === ha || n === pa || n === fa) && (o = r);
12540
12540
  const u = o == null ? void 0 : o.filter(
@@ -12574,7 +12574,7 @@ function lh({
12574
12574
  }
12575
12575
  );
12576
12576
  }
12577
- function Di({
12577
+ function ki({
12578
12578
  column: t
12579
12579
  }) {
12580
12580
  const a = A((u) => u.card.type), n = A(
@@ -12586,12 +12586,12 @@ function Di({
12586
12586
  (u) => u === t.label || u === t.name
12587
12587
  ), i = l ? r.indexOf(l) : -1;
12588
12588
  function c() {
12589
- return /* @__PURE__ */ e("div", { className: "pr-1", children: l && /* @__PURE__ */ e(yi, { idx: i, col: l, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
12589
+ return /* @__PURE__ */ e("div", { className: "pr-1", children: l && /* @__PURE__ */ e(xi, { idx: i, col: l, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
12590
12590
  }
12591
12591
  function o() {
12592
12592
  return /* @__PURE__ */ s("div", { className: "space-y-1", children: [
12593
12593
  /* @__PURE__ */ e(V, { className: "text-xs font-medium text-muted-foreground", children: "Data Labels" }),
12594
- /* @__PURE__ */ e(vi, {})
12594
+ /* @__PURE__ */ e(yi, {})
12595
12595
  ] });
12596
12596
  }
12597
12597
  return /* @__PURE__ */ s("div", { className: "space-y-1", children: [
@@ -12691,7 +12691,7 @@ function ih({
12691
12691
  {
12692
12692
  "data-setting-container": "",
12693
12693
  className: "mt-1.5 max-h-32 overflow-y-auto rounded-md border border-border p-3 text-sm",
12694
- children: /* @__PURE__ */ e(Di, { column: t })
12694
+ children: /* @__PURE__ */ e(ki, { column: t })
12695
12695
  }
12696
12696
  );
12697
12697
  }
@@ -12734,7 +12734,7 @@ function ih({
12734
12734
  )
12735
12735
  }
12736
12736
  ) : /* @__PURE__ */ e(
12737
- zl,
12737
+ Fl,
12738
12738
  {
12739
12739
  className: J(
12740
12740
  "size-3 cursor-pointer items-center justify-center rounded-r-sm text-muted-foreground"
@@ -12767,7 +12767,7 @@ function ih({
12767
12767
  )
12768
12768
  ] }) });
12769
12769
  }
12770
- function ns({
12770
+ function rs({
12771
12771
  id: t,
12772
12772
  label: a,
12773
12773
  columns: n,
@@ -12781,7 +12781,7 @@ function ns({
12781
12781
  }), d = Qt((f) => f.activeId), m = A((f) => {
12782
12782
  var b;
12783
12783
  return (b = f.card) == null ? void 0 : b.type;
12784
- }), h = o || ((N = (p = u == null ? void 0 : u.data) == null ? void 0 : p.current) == null ? void 0 : N.type) === l, g = d ? r : n, x = l === Rn ? "Rows" : l === Fn ? "Pivot Columns" : "Columns";
12784
+ }), h = o || ((N = (p = u == null ? void 0 : u.data) == null ? void 0 : p.current) == null ? void 0 : N.type) === l, g = d ? r : n, x = l === zn ? "Rows" : l === Ln ? "Pivot Columns" : "Columns";
12785
12785
  function y() {
12786
12786
  if (!g || g.length === 0)
12787
12787
  return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground/80 bg-background px-2 py-1 text-sm text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "invisible text-muted-foreground/70 group-hover:visible", children: "Drag here" }) });
@@ -12802,7 +12802,7 @@ function ns({
12802
12802
  ] }),
12803
12803
  y(),
12804
12804
  /* @__PURE__ */ e("div", { className: "space-y-2", children: g == null ? void 0 : g.map(
12805
- (f) => f.id === ni.id ? /* @__PURE__ */ e(oh, {}, f.id) : /* @__PURE__ */ e(
12805
+ (f) => f.id === ai.id ? /* @__PURE__ */ e(oh, {}, f.id) : /* @__PURE__ */ e(
12806
12806
  ih,
12807
12807
  {
12808
12808
  droppableId: t,
@@ -12820,7 +12820,7 @@ function ns({
12820
12820
  function oh() {
12821
12821
  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" }) });
12822
12822
  }
12823
- function Ti({ children: t, id: a, type: n }) {
12823
+ function Di({ children: t, id: a, type: n }) {
12824
12824
  const {
12825
12825
  attributes: r,
12826
12826
  listeners: l,
@@ -12905,7 +12905,7 @@ function ch() {
12905
12905
  t.map((f) => {
12906
12906
  var b, M;
12907
12907
  return /* @__PURE__ */ e(
12908
- Ti,
12908
+ Di,
12909
12909
  {
12910
12910
  id: Ja(f.columnId),
12911
12911
  type: nr,
@@ -12916,8 +12916,8 @@ function ch() {
12916
12916
  children: /* @__PURE__ */ s("div", { className: "flex h-full grow items-center justify-between gap-2", children: [
12917
12917
  /* @__PURE__ */ s("div", { className: "flex h-full grow items-center justify-between gap-2 rounded-sm bg-muted px-2", children: [
12918
12918
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
12919
- /* @__PURE__ */ e(zl, { className: "size-3 cursor-move text-muted-foreground hover:text-foreground" }),
12920
- /* @__PURE__ */ e(Yn, { className: "w-[175px] text-sm", children: ((b = x(f.columnId)) == null ? void 0 : b.label) || ((M = x(f.columnId)) == null ? void 0 : M.name) })
12919
+ /* @__PURE__ */ e(Fl, { className: "size-3 cursor-move text-muted-foreground hover:text-foreground" }),
12920
+ /* @__PURE__ */ e(Kn, { className: "w-[175px] text-sm", children: ((b = x(f.columnId)) == null ? void 0 : b.label) || ((M = x(f.columnId)) == null ? void 0 : M.name) })
12921
12921
  ] }),
12922
12922
  /* @__PURE__ */ e(
12923
12923
  "button",
@@ -12988,14 +12988,14 @@ function dh() {
12988
12988
  }
12989
12989
  let x = "Group By", y = "Metrics", p = "Stack By";
12990
12990
  return a === "table" && (x = "Rows", y = "Metrics", p = "Columns"), /* @__PURE__ */ s("div", { className: "flex h-full w-full flex-col gap-3 py-4", children: [
12991
- /* @__PURE__ */ e(mi, { iconClassName: "size-[19px]" }),
12992
- /* @__PURE__ */ s(_n, { className: "flex min-h-0 grow basis-0 flex-col gap-4 overflow-y-auto", children: [
12991
+ /* @__PURE__ */ e(ui, { iconClassName: "size-[19px]" }),
12992
+ /* @__PURE__ */ s(jn, { className: "flex min-h-0 grow basis-0 flex-col gap-4 overflow-y-auto", children: [
12993
12993
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-4 p-4", children: [
12994
12994
  /* @__PURE__ */ e(
12995
- ns,
12995
+ rs,
12996
12996
  {
12997
12997
  onRemoveColumn: m,
12998
- sortableType: Rn,
12998
+ sortableType: zn,
12999
12999
  id: ha,
13000
13000
  label: x,
13001
13001
  columns: t,
@@ -13003,10 +13003,10 @@ function dh() {
13003
13003
  }
13004
13004
  ),
13005
13005
  /* @__PURE__ */ e(
13006
- ns,
13006
+ rs,
13007
13007
  {
13008
13008
  onRemoveColumn: g,
13009
- sortableType: Fn,
13009
+ sortableType: Ln,
13010
13010
  id: fa,
13011
13011
  label: p,
13012
13012
  columns: i,
@@ -13014,7 +13014,7 @@ function dh() {
13014
13014
  }
13015
13015
  ),
13016
13016
  /* @__PURE__ */ e(
13017
- ns,
13017
+ rs,
13018
13018
  {
13019
13019
  onRemoveColumn: h,
13020
13020
  sortableType: vs,
@@ -13048,7 +13048,7 @@ function or({
13048
13048
  function m(h) {
13049
13049
  o(h);
13050
13050
  }
13051
- return /* @__PURE__ */ e(Ti, { id: n, type: r, children: /* @__PURE__ */ s(
13051
+ return /* @__PURE__ */ e(Di, { id: n, type: r, children: /* @__PURE__ */ s(
13052
13052
  "div",
13053
13053
  {
13054
13054
  className: J(
@@ -13081,7 +13081,7 @@ function or({
13081
13081
  i && "border border-border"
13082
13082
  ),
13083
13083
  children: [
13084
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Un, { className: "mr-2 size-3.5 cursor-move items-center justify-center p-0 text-muted-foreground/60 hover:text-foreground" }) }),
13084
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(qn, { className: "mr-2 size-3.5 cursor-move items-center justify-center p-0 text-muted-foreground/60 hover:text-foreground" }) }),
13085
13085
  /* @__PURE__ */ e(
13086
13086
  "div",
13087
13087
  {
@@ -13134,7 +13134,7 @@ function uh({
13134
13134
  connectionId: i,
13135
13135
  // not needed
13136
13136
  dataType: t.type
13137
- }, { data: g, isLoading: x, isFetching: y, isError: p } = El(h), N = Ke(() => {
13137
+ }, { data: g, isLoading: x, isFetching: y, isError: p } = Al(h), N = Ke(() => {
13138
13138
  var R;
13139
13139
  return h.column ? (R = g == null ? void 0 : g.records) == null ? void 0 : R.map((C) => {
13140
13140
  let k = h.column.split(".").slice(-1)[0].replace(/"/g, "");
@@ -13245,11 +13245,11 @@ function hh({
13245
13245
  children: [
13246
13246
  /* @__PURE__ */ e(bt, { className: "mr-2 h-4 w-4" }),
13247
13247
  n != null && n.from ? n.to ? /* @__PURE__ */ s(se, { children: [
13248
- Kn(n.from, "LLL dd, y"),
13248
+ Wn(n.from, "LLL dd, y"),
13249
13249
  " -",
13250
13250
  " ",
13251
- Kn(n.to, "LLL dd, y")
13252
- ] }) : Kn(n.from, "LLL dd, y") : /* @__PURE__ */ e("span", { children: "Pick a date" })
13251
+ Wn(n.to, "LLL dd, y")
13252
+ ] }) : Wn(n.from, "LLL dd, y") : /* @__PURE__ */ e("span", { children: "Pick a date" })
13253
13253
  ]
13254
13254
  }
13255
13255
  )
@@ -13326,7 +13326,7 @@ function ph({
13326
13326
  title: "",
13327
13327
  // not needed
13328
13328
  dataType: t.type
13329
- }, { isLoading: u, isFetching: d, isError: m, data: h } = El(o), g = h == null ? void 0 : h.records, { dateRange: x, setDateRange: y, initialDateRange: p } = Qo(g), { updateEditorFilterValue: N } = le();
13329
+ }, { isLoading: u, isFetching: d, isError: m, data: h } = Al(o), g = h == null ? void 0 : h.records, { dateRange: x, setDateRange: y, initialDateRange: p } = Qo(g), { updateEditorFilterValue: N } = le();
13330
13330
  function f(R) {
13331
13331
  var k, v;
13332
13332
  const C = {
@@ -13383,7 +13383,7 @@ function fh({
13383
13383
  }
13384
13384
  function g(N) {
13385
13385
  const f = Ot(N.type);
13386
- return N.id === ni.id ? /* @__PURE__ */ e(
13386
+ return N.id === ai.id ? /* @__PURE__ */ e(
13387
13387
  or,
13388
13388
  {
13389
13389
  id: N.id,
@@ -13459,7 +13459,7 @@ function yh() {
13459
13459
  const t = A((i) => i.card), a = A((i) => i.showAIDialog), { setShowAIDialog: n } = le(), { data: r, errorMessage: l } = Ve(t);
13460
13460
  return /* @__PURE__ */ s("section", { className: "flex justify-between gap-2 p-4", children: [
13461
13461
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
13462
- /* @__PURE__ */ e($n, {}),
13462
+ /* @__PURE__ */ e(Yn, {}),
13463
13463
  !a && /* @__PURE__ */ s(
13464
13464
  _,
13465
13465
  {
@@ -13472,7 +13472,7 @@ function yh() {
13472
13472
  ]
13473
13473
  }
13474
13474
  ),
13475
- /* @__PURE__ */ e(ii, { sql: r == null ? void 0 : r.sql, error: l })
13475
+ /* @__PURE__ */ e(li, { sql: r == null ? void 0 : r.sql, error: l })
13476
13476
  ] }),
13477
13477
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
13478
13478
  /* @__PURE__ */ e("div", { className: "rounded-full bg-green-300 px-3 py-1 text-xs font-medium text-black", children: "Preview" }),
@@ -13815,7 +13815,7 @@ const bh = [
13815
13815
  }
13816
13816
  ];
13817
13817
  function jr() {
13818
- const t = zt(null), [a, n] = j(!1), [r, l] = j(En), [i, c] = j(!1), [o, u] = j(!1), d = rc(), { setCurrentAIContext: m } = lc(), { clearQueue: h } = ic(), { clearFileAttachments: g } = oc(), x = cc("editor"), y = Z((fe) => fe.dashboard.aiContext), p = A((fe) => fe.card.dataSource), N = A((fe) => fe.actions.setCardSql), f = A((fe) => fe.actions.setRunSql), b = A((fe) => fe.showAIDialog), M = Z(
13818
+ const t = zt(null), [a, n] = j(!1), [r, l] = j(On), [i, c] = j(!1), [o, u] = j(!1), d = rc(), { setCurrentAIContext: m } = lc(), { clearQueue: h } = ic(), { clearFileAttachments: g } = oc(), x = cc("editor"), y = Z((fe) => fe.dashboard.aiContext), p = A((fe) => fe.card.dataSource), N = A((fe) => fe.actions.setCardSql), f = A((fe) => fe.actions.setRunSql), b = A((fe) => fe.showAIDialog), M = Z(
13819
13819
  (fe) => fe.handleOpenAssistantProfile
13820
13820
  ), { setShowAIDialog: R, setCardPython: C } = le(), { setDataSource: k } = le(), { assistantProfile: v } = dc(), {
13821
13821
  messages: T,
@@ -13926,7 +13926,7 @@ function jr() {
13926
13926
  /* @__PURE__ */ e(Wr, { children: "Options" }),
13927
13927
  /* @__PURE__ */ e(Ma, {}),
13928
13928
  /* @__PURE__ */ e(
13929
- Jn,
13929
+ Hn,
13930
13930
  {
13931
13931
  checked: a,
13932
13932
  onCheckedChange: n,
@@ -13934,7 +13934,7 @@ function jr() {
13934
13934
  }
13935
13935
  ),
13936
13936
  /* @__PURE__ */ e(
13937
- Jn,
13937
+ Hn,
13938
13938
  {
13939
13939
  checked: r,
13940
13940
  onCheckedChange: l,
@@ -13942,7 +13942,7 @@ function jr() {
13942
13942
  }
13943
13943
  ),
13944
13944
  /* @__PURE__ */ e(
13945
- Jn,
13945
+ Hn,
13946
13946
  {
13947
13947
  checked: i,
13948
13948
  onCheckedChange: c,
@@ -13981,7 +13981,7 @@ function jr() {
13981
13981
  ),
13982
13982
  /* @__PURE__ */ s("div", { "data-role": "header-actions", className: "flex items-center", children: [
13983
13983
  At(),
13984
- En,
13984
+ On,
13985
13985
  /* @__PURE__ */ e(
13986
13986
  ye,
13987
13987
  {
@@ -14019,7 +14019,7 @@ function jr() {
14019
14019
  }
14020
14020
  ),
14021
14021
  /* @__PURE__ */ e(
14022
- _n,
14022
+ jn,
14023
14023
  {
14024
14024
  ref: Y,
14025
14025
  className: "mt-2 flex w-full grow basis-0",
@@ -14357,15 +14357,15 @@ const cr = (t) => {
14357
14357
  E
14358
14358
  );
14359
14359
  if (!I.isValid) {
14360
- I.showError && os();
14360
+ I.showError && ds();
14361
14361
  return;
14362
14362
  }
14363
14363
  const P = Sc(
14364
14364
  L,
14365
14365
  D
14366
14366
  ), O = g(P);
14367
- if (cs(L, O)) return;
14368
- const z = ds(L, P, O);
14367
+ if (An(L, O)) return;
14368
+ const z = En(L, P, O);
14369
14369
  z && x(P, [...O, z]);
14370
14370
  },
14371
14371
  [
@@ -14536,7 +14536,7 @@ function wh({ field: t }) {
14536
14536
  // </div>
14537
14537
  /* @__PURE__ */ e("div", { className: "text-muted-foreground-700 px-2 pb-3 text-sm", children: /* @__PURE__ */ e(va, { className: "", children: /* @__PURE__ */ s(Na, { className: "space-y-2 p-3", children: [
14538
14538
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
14539
- /* @__PURE__ */ e(Vl, { className: "h-4 w-4 text-muted-foreground" }),
14539
+ /* @__PURE__ */ e(_l, { className: "h-4 w-4 text-muted-foreground" }),
14540
14540
  /* @__PURE__ */ e("span", { className: "break-all", children: t.label || t.name })
14541
14541
  ] }),
14542
14542
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
@@ -14628,7 +14628,7 @@ function Sh() {
14628
14628
  }
14629
14629
  )
14630
14630
  ] }),
14631
- /* @__PURE__ */ s(_n, { className: "py-2", children: [
14631
+ /* @__PURE__ */ s(jn, { className: "py-2", children: [
14632
14632
  /* @__PURE__ */ e(
14633
14633
  et,
14634
14634
  {
@@ -15955,7 +15955,7 @@ function Ih({
15955
15955
  title: a,
15956
15956
  maxDetails: n = 10
15957
15957
  }) {
15958
- const l = Il(t).slice(0, n), i = l.find(
15958
+ const l = El(t).slice(0, n), i = l.find(
15959
15959
  (o) => o.label === "Description"
15960
15960
  ), c = l.filter((o) => o.label === "Description" ? !1 : !["Connection", "Database", "Schema"].includes(o.label));
15961
15961
  return /* @__PURE__ */ e(Be, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
@@ -15982,7 +15982,7 @@ function Oh({
15982
15982
  " more entities"
15983
15983
  ] }),
15984
15984
  /* @__PURE__ */ e("div", { className: "space-y-1", children: t.map((a, n) => {
15985
- const r = Il(a), l = r.find(
15985
+ const r = El(a), l = r.find(
15986
15986
  (c) => c.label === "Description"
15987
15987
  ), i = r.filter((c) => c.label === "Description" ? !1 : !["Connection", "Database", "Schema"].includes(c.label)).slice(0, 3);
15988
15988
  return /* @__PURE__ */ s(
@@ -16196,7 +16196,7 @@ const Ur = ({
16196
16196
  index: a,
16197
16197
  onSelect: n
16198
16198
  }) => {
16199
- const r = qn(t.icon || ""), l = t.name.charAt(0).toUpperCase(), i = Zs(t.name);
16199
+ const r = Gn(t.icon || ""), l = t.name.charAt(0).toUpperCase(), i = Zs(t.name);
16200
16200
  return /* @__PURE__ */ e(
16201
16201
  Ua,
16202
16202
  {
@@ -16233,7 +16233,7 @@ function Lh({
16233
16233
  onChartChange: a
16234
16234
  }) {
16235
16235
  var R;
16236
- const [n, r] = j(!1), { data: l } = ui();
16236
+ const [n, r] = j(!1), { data: l } = di();
16237
16237
  zh();
16238
16238
  const c = ((R = A((C) => C.card).customCardPreferences) == null ? void 0 : R.url) || "";
16239
16239
  tr(c);
@@ -16262,7 +16262,7 @@ function Lh({
16262
16262
  const v = A.getState().card;
16263
16263
  return ((k = v == null ? void 0 : v.customCardPreferences) == null ? void 0 : k.componentName) || "Custom Visual";
16264
16264
  }
16265
- const C = Wn.find((v) => v.id === t);
16265
+ const C = Qn.find((v) => v.id === t);
16266
16266
  return (C == null ? void 0 : C.label) || "Select chart type";
16267
16267
  };
16268
16268
  return /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ s(mt, { open: n, onOpenChange: r, children: [
@@ -16288,7 +16288,7 @@ function Lh({
16288
16288
  }
16289
16289
  return /* @__PURE__ */ e(nn, { className: "h-4 w-4" });
16290
16290
  }
16291
- const C = Wn.find((T) => T.id === t);
16291
+ const C = Qn.find((T) => T.id === t);
16292
16292
  if (C) {
16293
16293
  const T = C.icon;
16294
16294
  return /* @__PURE__ */ e(T, { className: "h-4 w-4" });
@@ -16328,7 +16328,7 @@ function Lh({
16328
16328
  ] })
16329
16329
  ] }),
16330
16330
  className: "[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
16331
- children: Wn.map((k) => {
16331
+ children: Qn.map((k) => {
16332
16332
  const v = k.icon;
16333
16333
  return /* @__PURE__ */ e(
16334
16334
  Ua,
@@ -16435,14 +16435,14 @@ const Ph = ({
16435
16435
  icon: t,
16436
16436
  componentName: a
16437
16437
  }) => {
16438
- const n = qn(), r = Zs(a);
16438
+ const n = Gn(), r = Zs(a);
16439
16439
  return n ? /* @__PURE__ */ e(n, { className: "h-4 w-4" }) : r || /* @__PURE__ */ e(nn, { className: "h-4 w-4" });
16440
16440
  }, _h = [
16441
- { id: "table", icon: Pn, label: "Table" },
16442
- { id: "bar", icon: Bn, label: "Bar Chart" },
16443
- { id: "line", icon: jn, label: "Line Chart" },
16441
+ { id: "table", icon: Vn, label: "Table" },
16442
+ { id: "bar", icon: $n, label: "Bar Chart" },
16443
+ { id: "line", icon: Un, label: "Line Chart" },
16444
16444
  { id: "stackedBar", icon: Ys, label: "Stacked Bar", requiresPivot: !0 },
16445
- { id: "pie", icon: Ln, label: "Pie Chart" },
16445
+ { id: "pie", icon: _n, label: "Pie Chart" },
16446
16446
  { id: "doughnut", icon: Gs, label: "Donut Chart" },
16447
16447
  { id: "kpi", icon: qs, label: "KPI" }
16448
16448
  ];
@@ -16987,7 +16987,7 @@ function qh({
16987
16987
  onCheckedChange: () => m(g.value)
16988
16988
  }
16989
16989
  ),
16990
- /* @__PURE__ */ e(Yn, { className: "text-sm", children: g.label })
16990
+ /* @__PURE__ */ e(Kn, { className: "text-sm", children: g.label })
16991
16991
  ]
16992
16992
  },
16993
16993
  g.id
@@ -17161,7 +17161,7 @@ function Yh({
17161
17161
  ]
17162
17162
  }
17163
17163
  )
17164
- ] }) : null, Ai = () => vn ? /* @__PURE__ */ s(se, { children: [
17164
+ ] }) : null, Mi = () => vn ? /* @__PURE__ */ s(se, { children: [
17165
17165
  mr(),
17166
17166
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
17167
17167
  /* @__PURE__ */ e(V, { className: "text-xs font-medium text-muted-foreground", children: "Date Format" }),
@@ -17200,7 +17200,7 @@ function Yh({
17200
17200
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Examples: YYYY-MM-DD, MM/DD/YY, DD-MMM-YYYY HH:mm" })
17201
17201
  ] })
17202
17202
  ] })
17203
- ] }) : null, Ei = () => {
17203
+ ] }) : null, Ai = () => {
17204
17204
  var H, ze, Le, Je, Ut;
17205
17205
  return Nn ? /* @__PURE__ */ s(se, { children: [
17206
17206
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
@@ -17243,8 +17243,8 @@ function Yh({
17243
17243
  max: "365",
17244
17244
  value: ((Je = x.config) == null ? void 0 : Je.trendlineWindow) || 30,
17245
17245
  onChange: (Cn) => {
17246
- const zi = parseInt(Cn.target.value) || 30;
17247
- v(zi);
17246
+ const Fi = parseInt(Cn.target.value) || 30;
17247
+ v(Fi);
17248
17248
  },
17249
17249
  className: "h-8 text-xs",
17250
17250
  placeholder: "30"
@@ -17271,7 +17271,7 @@ function Yh({
17271
17271
  ] })
17272
17272
  ] })
17273
17273
  ] }) : null;
17274
- }, Ii = () => {
17274
+ }, Ei = () => {
17275
17275
  var H, ze;
17276
17276
  return bn ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
17277
17277
  /* @__PURE__ */ e(V, { className: "text-xs font-medium text-muted-foreground", children: "Target Value" }),
@@ -17287,7 +17287,7 @@ function Yh({
17287
17287
  }
17288
17288
  )
17289
17289
  ] }) : null;
17290
- }, Oi = () => Ga ? /* @__PURE__ */ s(se, { children: [
17290
+ }, Ii = () => Ga ? /* @__PURE__ */ s(se, { children: [
17291
17291
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
17292
17292
  /* @__PURE__ */ e(V, { className: "text-xs font-medium text-muted-foreground", children: "Aggregation" }),
17293
17293
  /* @__PURE__ */ s(
@@ -17402,7 +17402,7 @@ function Yh({
17402
17402
  }
17403
17403
  )
17404
17404
  ] }),
17405
- /* @__PURE__ */ e(Di, { column: t }),
17405
+ /* @__PURE__ */ e(ki, { column: t }),
17406
17406
  i && /* @__PURE__ */ s(se, { children: [
17407
17407
  /* @__PURE__ */ e(
17408
17408
  jh,
@@ -17419,7 +17419,7 @@ function Yh({
17419
17419
  }
17420
17420
  )
17421
17421
  ] })
17422
- ] }) : null, { columns: Ri = [] } = qa(), Fi = ($ == null ? void 0 : $.conditions) && $.conditions.length > 0;
17422
+ ] }) : null, { columns: Oi = [] } = qa(), Ri = ($ == null ? void 0 : $.conditions) && $.conditions.length > 0;
17423
17423
  return /* @__PURE__ */ s(se, { children: [
17424
17424
  /* @__PURE__ */ s(
17425
17425
  "div",
@@ -17433,11 +17433,11 @@ function Yh({
17433
17433
  /* @__PURE__ */ s("div", { className: "flex grow items-center gap-2", children: [
17434
17434
  /* @__PURE__ */ e(dr, { dataType: At }),
17435
17435
  /* @__PURE__ */ e(
17436
- Yn,
17436
+ Kn,
17437
17437
  {
17438
17438
  className: J(
17439
17439
  "w-[140px] flex-1 text-sm",
17440
- Fi && "w-[120px]"
17440
+ Ri && "w-[120px]"
17441
17441
  ),
17442
17442
  children: Ec(t)
17443
17443
  }
@@ -17508,10 +17508,10 @@ function Yh({
17508
17508
  Bt(),
17509
17509
  Ye(),
17510
17510
  c === "kpi" && mr(),
17511
+ Mi(),
17511
17512
  Ai(),
17512
17513
  Ei(),
17513
- Ii(),
17514
- Oi()
17514
+ Ii()
17515
17515
  ] })
17516
17516
  ]
17517
17517
  }
@@ -17523,7 +17523,7 @@ function Yh({
17523
17523
  onOpenChange: (H) => {
17524
17524
  D(H), H || I(null);
17525
17525
  },
17526
- availableFields: Ri,
17526
+ availableFields: Oi,
17527
17527
  existingFilters: $,
17528
17528
  editingCondition: E,
17529
17529
  onSave: (H) => {
@@ -17732,7 +17732,7 @@ const qr = [
17732
17732
  "#ea580c"
17733
17733
  // orange-600
17734
17734
  ];
17735
- function ss({
17735
+ function ls({
17736
17736
  value: t,
17737
17737
  onChange: a,
17738
17738
  label: n
@@ -17791,7 +17791,7 @@ function ss({
17791
17791
  }
17792
17792
  ),
17793
17793
  /* @__PURE__ */ e("div", { className: "relative rounded-lg bg-white shadow-lg", children: /* @__PURE__ */ e(
17794
- Ni,
17794
+ vi,
17795
17795
  {
17796
17796
  color: o(),
17797
17797
  onColorChange: (u) => {
@@ -17980,7 +17980,7 @@ function Jh() {
17980
17980
  ] }),
17981
17981
  i.showColor !== !1 && /* @__PURE__ */ s("div", { className: "space-y-2 border-l-2 border-muted pl-3", children: [
17982
17982
  /* @__PURE__ */ e(
17983
- ss,
17983
+ ls,
17984
17984
  {
17985
17985
  value: ((h = i.colorConfig) == null ? void 0 : h.increase) || "green",
17986
17986
  onChange: (f) => c({
@@ -17993,7 +17993,7 @@ function Jh() {
17993
17993
  }
17994
17994
  ),
17995
17995
  /* @__PURE__ */ e(
17996
- ss,
17996
+ ls,
17997
17997
  {
17998
17998
  value: ((g = i.colorConfig) == null ? void 0 : g.decrease) || "red",
17999
17999
  onChange: (f) => c({
@@ -18006,7 +18006,7 @@ function Jh() {
18006
18006
  }
18007
18007
  ),
18008
18008
  /* @__PURE__ */ e(
18009
- ss,
18009
+ ls,
18010
18010
  {
18011
18011
  value: ((x = i.colorConfig) == null ? void 0 : x.noChange) || "neutral",
18012
18012
  onChange: (f) => c({
@@ -18279,10 +18279,10 @@ function Hh({
18279
18279
  /* @__PURE__ */ e(we, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ s(et, { type: "single", collapsible: !0, className: "w-full", children: [
18280
18280
  /* @__PURE__ */ e(Wh, {}),
18281
18281
  /* @__PURE__ */ e(Jh, {}),
18282
+ /* @__PURE__ */ e(Ni, {}),
18282
18283
  /* @__PURE__ */ e(bi, {}),
18283
18284
  /* @__PURE__ */ e(Ci, {}),
18284
- /* @__PURE__ */ e(wi, {}),
18285
- /* @__PURE__ */ e(Si, {})
18285
+ /* @__PURE__ */ e(wi, {})
18286
18286
  ] }) })
18287
18287
  ] })
18288
18288
  ]
@@ -18322,7 +18322,7 @@ function Qh({
18322
18322
  )
18323
18323
  ] }),
18324
18324
  /* @__PURE__ */ s("div", { className: J("flex justify-end gap-2 px-6 py-6"), children: [
18325
- /* @__PURE__ */ e("div", { className: J("invisible", { visible: o || m }), children: /* @__PURE__ */ e($n, {}) }),
18325
+ /* @__PURE__ */ e("div", { className: J("invisible", { visible: o || m }), children: /* @__PURE__ */ e(Yn, {}) }),
18326
18326
  !c && /* @__PURE__ */ s(
18327
18327
  _,
18328
18328
  {
@@ -19001,7 +19001,7 @@ function mp(t) {
19001
19001
  return lp;
19002
19002
  }
19003
19003
  }
19004
- function Mi({
19004
+ function Ti({
19005
19005
  condition: t,
19006
19006
  index: a,
19007
19007
  groupId: n,
@@ -19038,7 +19038,7 @@ function Mi({
19038
19038
  ...d,
19039
19039
  ...m,
19040
19040
  className: "cursor-grab active:cursor-grabbing",
19041
- children: /* @__PURE__ */ e(Un, { className: "h-4 w-4 flex-shrink-0 text-gray-400" })
19041
+ children: /* @__PURE__ */ e(qn, { className: "h-4 w-4 flex-shrink-0 text-gray-400" })
19042
19042
  }
19043
19043
  ),
19044
19044
  a > 0 && /* @__PURE__ */ s(
@@ -19245,7 +19245,7 @@ function hp({
19245
19245
  ...N,
19246
19246
  ...f,
19247
19247
  className: "cursor-grab active:cursor-grabbing",
19248
- children: /* @__PURE__ */ e(Un, { className: "h-4 w-4 text-muted-foreground" })
19248
+ children: /* @__PURE__ */ e(qn, { className: "h-4 w-4 text-muted-foreground" })
19249
19249
  }
19250
19250
  ),
19251
19251
  /* @__PURE__ */ e(
@@ -19290,7 +19290,7 @@ function hp({
19290
19290
  Oa,
19291
19291
  {
19292
19292
  sensors: Qa(
19293
- Yt(In),
19293
+ Yt(Rn),
19294
19294
  Yt(ps, {
19295
19295
  coordinateGetter: hs
19296
19296
  })
@@ -19303,7 +19303,7 @@ function hp({
19303
19303
  items: t.conditions.map((S) => S.id),
19304
19304
  strategy: Za,
19305
19305
  children: t.conditions.map((S, F) => /* @__PURE__ */ e(
19306
- Mi,
19306
+ Ti,
19307
19307
  {
19308
19308
  condition: S,
19309
19309
  index: F,
@@ -19326,7 +19326,7 @@ function hp({
19326
19326
  Oa,
19327
19327
  {
19328
19328
  sensors: Qa(
19329
- Yt(In),
19329
+ Yt(Rn),
19330
19330
  Yt(ps, {
19331
19331
  coordinateGetter: hs
19332
19332
  })
@@ -19406,7 +19406,7 @@ function pp({
19406
19406
  initialFilters: t,
19407
19407
  availableFields: a
19408
19408
  }), C = Qa(
19409
- Yt(In),
19409
+ Yt(Rn),
19410
19410
  Yt(ps, {
19411
19411
  coordinateGetter: hs
19412
19412
  })
@@ -19446,7 +19446,7 @@ function pp({
19446
19446
  items: w.conditions.map((E) => E.id),
19447
19447
  strategy: Za,
19448
19448
  children: w.conditions.map((E, I) => /* @__PURE__ */ e(
19449
- Mi,
19449
+ Ti,
19450
19450
  {
19451
19451
  condition: E,
19452
19452
  index: I,
@@ -19654,8 +19654,46 @@ function gp({
19654
19654
  return;
19655
19655
  }
19656
19656
  const f = p.id, b = N.id, M = d(f), R = d(b) || b;
19657
+ if (R === "sortBy") {
19658
+ if (M === "source") {
19659
+ const C = a.find((v) => v.id === f);
19660
+ if (!C) {
19661
+ i(null);
19662
+ return;
19663
+ }
19664
+ if (!(n("groupBy").some(
19665
+ (v) => v.name === C.name && v.qualifiedEntityName === C.qualifiedEntityName
19666
+ ) || n("metrics").some(
19667
+ (v) => v.name === C.name && v.qualifiedEntityName === C.qualifiedEntityName
19668
+ ))) {
19669
+ i(null);
19670
+ return;
19671
+ }
19672
+ } else if (M === "pivotBy") {
19673
+ i(null);
19674
+ return;
19675
+ } else if (M !== "groupBy" && M !== "metrics" && M !== "sortBy") {
19676
+ i(null);
19677
+ return;
19678
+ }
19679
+ }
19657
19680
  if (M === "source" && R === "sortBy") {
19658
- i(null);
19681
+ const C = [...a].find((T) => T.id === f);
19682
+ if (!C) {
19683
+ i(null);
19684
+ return;
19685
+ }
19686
+ const k = n("sortBy");
19687
+ if (An(C, k)) {
19688
+ i(null);
19689
+ return;
19690
+ }
19691
+ const v = En(
19692
+ C,
19693
+ "sortBy",
19694
+ k
19695
+ );
19696
+ i(null), r("sortBy", [...k, v]);
19659
19697
  return;
19660
19698
  }
19661
19699
  if (M === "source" && R !== "source" && R !== "sortBy") {
@@ -19683,20 +19721,20 @@ function gp({
19683
19721
  C.qualifiedEntityName,
19684
19722
  o
19685
19723
  )) {
19686
- os(), i(null);
19724
+ ds(), i(null);
19687
19725
  return;
19688
19726
  }
19689
19727
  } else {
19690
- os(), i(null);
19728
+ ds(), i(null);
19691
19729
  return;
19692
19730
  }
19693
19731
  }
19694
19732
  const v = n(R);
19695
- if (cs(C, v)) {
19733
+ if (An(C, v)) {
19696
19734
  i(null);
19697
19735
  return;
19698
19736
  }
19699
- const T = ds(
19737
+ const T = En(
19700
19738
  C,
19701
19739
  R,
19702
19740
  v
@@ -19710,17 +19748,13 @@ function gp({
19710
19748
  i(null);
19711
19749
  return;
19712
19750
  }
19713
- const T = ds(
19751
+ const T = En(
19714
19752
  v,
19715
19753
  R,
19716
19754
  k
19717
19755
  );
19718
19756
  if (i(null), R === "sortBy") {
19719
- if (M === "pivotBy") {
19720
- i(null);
19721
- return;
19722
- }
19723
- cs(v, k) || r(R, [...k, T]);
19757
+ An(v, k) || r(R, [...k, T]);
19724
19758
  return;
19725
19759
  }
19726
19760
  const S = C.filter(
@@ -19868,7 +19902,7 @@ function yp({
19868
19902
  /* @__PURE__ */ e(rr, {}),
19869
19903
  n && !p && /* @__PURE__ */ e(sr, { variant: "default" }),
19870
19904
  p && /* @__PURE__ */ e(dm, {}),
19871
- a && En
19905
+ a && On
19872
19906
  ] }),
19873
19907
  l && /* @__PURE__ */ e(
19874
19908
  Qs,
@@ -19972,7 +20006,7 @@ function Cp({
19972
20006
  isOpen: t,
19973
20007
  onClose: a
19974
20008
  }) {
19975
- const n = Jl(a, {
20009
+ const n = Kl(a, {
19976
20010
  enabled: t
19977
20011
  }), r = A(
19978
20012
  (m) => {
@@ -20015,7 +20049,7 @@ function Cp({
20015
20049
  }
20016
20050
  )
20017
20051
  ] }),
20018
- /* @__PURE__ */ e("div", { className: "h-full min-h-0 flex-1", children: d && /* @__PURE__ */ e(Rl, { fallback: /* @__PURE__ */ e("div", { children: "Loading chart settings..." }), children: /* @__PURE__ */ e(
20052
+ /* @__PURE__ */ e("div", { className: "h-full min-h-0 flex-1", children: d && /* @__PURE__ */ e(Ol, { fallback: /* @__PURE__ */ e("div", { children: "Loading chart settings..." }), children: /* @__PURE__ */ e(
20019
20053
  d,
20020
20054
  {
20021
20055
  chartData: (o == null ? void 0 : o.records) || [],
@@ -20151,7 +20185,7 @@ function wp({
20151
20185
  /* @__PURE__ */ s("div", { className: "group/visualization relative flex h-full max-w-full grow flex-col pt-4", children: [
20152
20186
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2 px-6", children: [
20153
20187
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2", children: [
20154
- t === "chart" && v && /* @__PURE__ */ e(hi, { variant: "outline" }),
20188
+ t === "chart" && v && /* @__PURE__ */ e(mi, { variant: "outline" }),
20155
20189
  /* @__PURE__ */ e(vp, { activeView: t, onViewChange: a }),
20156
20190
  o && /* @__PURE__ */ e(
20157
20191
  xp,
@@ -20163,9 +20197,9 @@ function wp({
20163
20197
  }
20164
20198
  ),
20165
20199
  /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(bp, {}) }),
20166
- v && /* @__PURE__ */ e($n, {})
20200
+ v && /* @__PURE__ */ e(Yn, {})
20167
20201
  ] }),
20168
- /* @__PURE__ */ e("div", { className: J("flex grow items-center justify-end"), children: t === "chart" && /* @__PURE__ */ e(pi, {}) })
20202
+ /* @__PURE__ */ e("div", { className: J("flex grow items-center justify-end"), children: t === "chart" && /* @__PURE__ */ e(hi, {}) })
20169
20203
  ] }),
20170
20204
  !T && F && /* @__PURE__ */ e(
20171
20205
  ye,
@@ -20178,7 +20212,7 @@ function wp({
20178
20212
  }
20179
20213
  ),
20180
20214
  /* @__PURE__ */ s("div", { className: "mt-3 flex grow flex-col", children: [
20181
- t === "chart" && /* @__PURE__ */ e("div", { className: "flex grow flex-col pb-6", children: /* @__PURE__ */ e(fi, {}) }),
20215
+ t === "chart" && /* @__PURE__ */ e("div", { className: "flex grow flex-col pb-6", children: /* @__PURE__ */ e(pi, {}) }),
20182
20216
  t === "table" && (w == null ? void 0 : w.records) && /* @__PURE__ */ e("div", { className: "relative flex h-full min-h-0 max-w-full flex-1 grow basis-0 p-6", children: /* @__PURE__ */ e(
20183
20217
  Bs,
20184
20218
  {
@@ -20228,7 +20262,7 @@ function wp({
20228
20262
  C && /* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: C })
20229
20263
  ] }),
20230
20264
  (w == null ? void 0 : w.sql) && /* @__PURE__ */ e("h3", { className: "mb-3 font-mono text-xs font-medium", children: "Generated SQL Query" }),
20231
- /* @__PURE__ */ e(li, { sql: w == null ? void 0 : w.sql, error: L })
20265
+ /* @__PURE__ */ e(ri, { sql: w == null ? void 0 : w.sql, error: L })
20232
20266
  ] }) })
20233
20267
  ] }),
20234
20268
  /* @__PURE__ */ e(
@@ -20250,7 +20284,7 @@ function Sp({ activeField: t }) {
20250
20284
  {
20251
20285
  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"}`,
20252
20286
  children: [
20253
- /* @__PURE__ */ e(Un, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
20287
+ /* @__PURE__ */ e(qn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
20254
20288
  /* @__PURE__ */ e(dr, { dataType: t.dataType }),
20255
20289
  /* @__PURE__ */ e("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap text-sm dark:text-muted-foreground", children: t.label || t.name })
20256
20290
  ]
@@ -20309,7 +20343,7 @@ function Dp() {
20309
20343
  isLoading: S,
20310
20344
  error: F
20311
20345
  } = qa(), w = Qa(
20312
- Yt(In, {
20346
+ Yt(Rn, {
20313
20347
  activationConstraint: {
20314
20348
  distance: 8
20315
20349
  }
@@ -20417,7 +20451,7 @@ function Dp() {
20417
20451
  onOpenChange: i
20418
20452
  }
20419
20453
  ),
20420
- /* @__PURE__ */ e(fl, { dropAnimation: null, children: /* @__PURE__ */ e(Sp, { activeField: I || null }) })
20454
+ /* @__PURE__ */ e(pl, { dropAnimation: null, children: /* @__PURE__ */ e(Sp, { activeField: I || null }) })
20421
20455
  ]
20422
20456
  }
20423
20457
  );
@@ -20443,7 +20477,7 @@ function Tp({ authToken: t, onSave: a, onClose: n }) {
20443
20477
  }
20444
20478
  function N() {
20445
20479
  return /* @__PURE__ */ s(se, { children: [
20446
- /* @__PURE__ */ e(si, { type: "main" }),
20480
+ /* @__PURE__ */ e(ni, { type: "main" }),
20447
20481
  /* @__PURE__ */ s(
20448
20482
  Gt,
20449
20483
  {
@@ -20492,7 +20526,7 @@ function Tp({ authToken: t, onSave: a, onClose: n }) {
20492
20526
  }
20493
20527
  );
20494
20528
  }
20495
- return /* @__PURE__ */ e(xn, { FallbackComponent: Ol, children: i ? /* @__PURE__ */ e(
20529
+ return /* @__PURE__ */ e(xn, { FallbackComponent: Il, children: i ? /* @__PURE__ */ e(
20496
20530
  Oa,
20497
20531
  {
20498
20532
  sensors: y,
@@ -20712,7 +20746,7 @@ function Rp() {
20712
20746
  ) : (
20713
20747
  // Show legacy filter columns with editor aside
20714
20748
  /* @__PURE__ */ e(
20715
- si,
20749
+ ni,
20716
20750
  {
20717
20751
  type: "filter",
20718
20752
  ColumnsComponent: () => /* @__PURE__ */ e(Ep, {})
@@ -20735,8 +20769,8 @@ function Fp() {
20735
20769
  {
20736
20770
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
20737
20771
  children: [
20738
- /* @__PURE__ */ e(Al, { filter: r }),
20739
- /* @__PURE__ */ e(vl, { filter: r })
20772
+ /* @__PURE__ */ e(Ml, { filter: r }),
20773
+ /* @__PURE__ */ e(yl, { filter: r })
20740
20774
  ]
20741
20775
  },
20742
20776
  r.id
@@ -20832,7 +20866,7 @@ function Up({
20832
20866
  showFooter: a = !0,
20833
20867
  ...n
20834
20868
  }) {
20835
- return typeof window > "u" ? null : /* @__PURE__ */ e(xn, { FallbackComponent: Ol, children: /* @__PURE__ */ s(Hc, { dashboardProps: n, children: [
20869
+ return typeof window > "u" ? null : /* @__PURE__ */ e(xn, { FallbackComponent: Il, children: /* @__PURE__ */ s(Hc, { dashboardProps: n, children: [
20836
20870
  /* @__PURE__ */ e(Qc, {}),
20837
20871
  /* @__PURE__ */ s(Xc, { children: [
20838
20872
  /* @__PURE__ */ e(Lp, {}),