react-semaphor 0.0.373 → 0.0.376

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { c as P, x as ks, y as z, z as Ze, A as Ie, B as e, H as Os, J as zs, K as T, p as Xe, M as Is, N as Ms, Q as Ts, R as Ds, V as $, W as de, Y as ha, Z as Fs, _ as Ls, $ as Es, a0 as ma, a1 as xa, a2 as rt, a3 as ea, a4 as Y, a5 as Ge, i as it, a6 as h, a7 as ot, a8 as ct, P as pa, F as fa, a9 as Je, aa as We, ab as ga, ac as dt, ad as ja, ae as ge, af as je, ag as be, ah as ve, ai as ke, aj as ye, ak as se, al as Vs, am as As, an as qs, ao as ba, ap as va, aq as pe, ar as ut, as as ht, at as ya, au as mt, C as xt, av as pt, aw as Na, ax as Ne, ay as ft, az as Ke, aA as Ns, aB as De, aC as Re, aD as Oe, aE as gt, aF as jt, aG as sa, aH as bt, X as ds, aI as vt, aJ as yt, aK as Nt, aL as Ct, aM as vs, l as St, aN as wt, aO as kt, aP as Le, aQ as le, aR as Ca, aS as Ot, aT as us, aU as zt, aV as It, aW as Cs, o as Mt, a as Tt, aX as ls, aY as we, aZ as rs, a_ as Dt, a$ as Ft, b0 as Lt, b1 as Et, b2 as ys, b3 as Vt, b4 as aa, b5 as At, b6 as ta, b7 as qt, b8 as Rt, b9 as _t, ba as Ht, bb as Sa, bc as Pt, bd as Rs, be as wa, bf as $t, bg as Bt, bh as as, bi as Ut, bj as Gt, bk as ka, bl as Jt, u as Wt, bm as Kt, bn as Qt, s as Zt, bo as hs, bp as Oa, bq as za, br as Ia, bs as ts, bt as ns, bu as Xt, bv as Se, bw as Yt, bx as en, by as ms, bz as xs, bA as ps, bB as sn, I as an, bC as tn, bD as nn, bE as ln, bF as rn, E as on, bG as fs, bH as Fe, f as cn, bI as $e, bJ as _s, bK as Ma, bL as dn, bM as un, bN as is, bO as hn, bP as mn, bQ as xn, bR as pn, bS as na, bT as la, bU as Ta, bV as fn, bW as gn, bX as jn, bY as bn, bZ as vn, b_ as yn, b$ as Nn, c0 as Cn, c1 as Ee, c2 as Q, c3 as Z, c4 as Hs, c5 as X, c6 as Sn, c7 as Da, c8 as wn, c9 as kn, ca as On, cb as zn, cc as In, cd as Mn, ce as Tn, cf as Dn, cg as Fn } from "./index-PwLsV4fg.js";
1
+ import { c as P, x as ks, y as O, z as Ze, A as Ie, B as e, H as zs, J as Os, K as M, p as Xe, M as Is, N as Ts, Q as Ms, R as Ds, V as $, W as de, Y as ha, Z as Fs, _ as Ls, $ as Es, a0 as ma, a1 as xa, a2 as it, a3 as ea, a4 as Y, a5 as Je, i as ot, a6 as h, a7 as ct, a8 as dt, P as pa, F as fa, a9 as We, aa as Ke, ab as ga, ac as ut, ad as ja, ae as ge, af as je, ag as be, ah as ve, ai as ke, aj as ye, ak as se, al as Vs, am as As, an as qs, ao as ba, ap as va, aq as pe, ar as ht, as as mt, at as ya, au as xt, C as pt, av as ft, aw as Na, ax as Ne, ay as gt, az as _e, aA as Ns, aB as De, aC as Re, aD as ze, aE as jt, aF as bt, aG as sa, aH as vt, X as ds, aI as yt, aJ as Nt, aK as Ct, aL as St, aM as vs, l as wt, aN as kt, aO as zt, aP as Le, aQ as le, aR as Ca, aS as Ot, aT as us, aU as It, aV as Tt, aW as Cs, o as Mt, a as Dt, aX as ls, aY as we, aZ as rs, a_ as Ft, a$ as Lt, b0 as Et, b1 as Vt, b2 as ys, b3 as At, b4 as aa, b5 as qt, b6 as ta, b7 as Rt, b8 as _t, b9 as Ht, ba as Pt, bb as Sa, bc as $t, bd as Rs, be as wa, bf as Bt, bg as Ut, bh as as, bi as Gt, bj as Jt, bk as ka, bl as Wt, u as Kt, bm as Qt, bn as Zt, s as Xt, bo as hs, bp as za, bq as Oa, br as Ia, bs as ts, bt as ns, bu as Yt, bv as Se, bw as en, bx as sn, by as ms, bz as xs, bA as ps, bB as an, I as tn, bC as nn, bD as ln, bE as rn, bF as on, E as cn, bG as fs, bH as Fe, f as dn, bI as Be, bJ as _s, bK as Ta, bL as un, bM as hn, bN as is, bO as mn, bP as xn, bQ as pn, bR as fn, bS as na, bT as la, bU as Ma, bV as gn, bW as jn, bX as bn, bY as vn, bZ as yn, b_ as Nn, b$ as Cn, c0 as Sn, c1 as Ee, c2 as Q, c3 as Z, c4 as Hs, c5 as X, c6 as wn, c7 as Da, c8 as kn, c9 as zn, ca as On, cb as In, cc as Tn, cd as Mn, ce as Dn, cf as Fn, cg as Ln } from "./index-BOpp3w2L.js";
2
2
  import * as ra from "react";
3
- import ze, { useState as H, useMemo as Ss, useEffect as te, useRef as Be, useCallback as Fa, Suspense as Ln } from "react";
3
+ import Oe, { useState as H, useMemo as Ss, useEffect as te, useRef as Ue, useCallback as Fa, Suspense as En } from "react";
4
4
  import "react-dom";
5
5
  /**
6
6
  * @license lucide-react v0.453.0 - ISC
@@ -8,7 +8,7 @@ import "react-dom";
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const En = P("Box", [
11
+ const Vn = P("Box", [
12
12
  [
13
13
  "path",
14
14
  {
@@ -25,7 +25,7 @@ const En = P("Box", [
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const Vn = P("Braces", [
28
+ const An = P("Braces", [
29
29
  [
30
30
  "path",
31
31
  { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
@@ -44,7 +44,7 @@ const Vn = P("Braces", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const An = P("ChartArea", [
47
+ const qn = P("ChartArea", [
48
48
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
49
49
  [
50
50
  "path",
@@ -123,7 +123,7 @@ const Va = P("ChartScatter", [
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
125
  */
126
- const qn = P("CircleX", [
126
+ const Rn = P("CircleX", [
127
127
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
128
128
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
129
129
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -134,7 +134,7 @@ const qn = P("CircleX", [
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
136
  */
137
- const Rn = P("CopyPlus", [
137
+ const _n = P("CopyPlus", [
138
138
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
139
139
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
140
140
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -146,7 +146,7 @@ const Rn = P("CopyPlus", [
146
146
  * This source code is licensed under the ISC license.
147
147
  * See the LICENSE file in the root directory of this source tree.
148
148
  */
149
- const _n = P("Database", [
149
+ const Hn = P("Database", [
150
150
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
151
151
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
152
152
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -168,7 +168,7 @@ const Bs = P("EllipsisVertical", [
168
168
  * This source code is licensed under the ISC license.
169
169
  * See the LICENSE file in the root directory of this source tree.
170
170
  */
171
- const Hn = P("Eraser", [
171
+ const Pn = P("Eraser", [
172
172
  [
173
173
  "path",
174
174
  {
@@ -185,7 +185,7 @@ const Hn = P("Eraser", [
185
185
  * This source code is licensed under the ISC license.
186
186
  * See the LICENSE file in the root directory of this source tree.
187
187
  */
188
- const Pn = P("EyeClosed", [
188
+ const $n = P("EyeClosed", [
189
189
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
190
190
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
191
191
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -198,7 +198,7 @@ const Pn = P("EyeClosed", [
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
200
  */
201
- const $n = P("FileJson2", [
201
+ const Bn = P("FileJson2", [
202
202
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
203
203
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
204
204
  [
@@ -216,7 +216,7 @@ const $n = P("FileJson2", [
216
216
  * This source code is licensed under the ISC license.
217
217
  * See the LICENSE file in the root directory of this source tree.
218
218
  */
219
- const Bn = P("Glasses", [
219
+ const Un = P("Glasses", [
220
220
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
221
221
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
222
222
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -229,7 +229,7 @@ const Bn = P("Glasses", [
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
231
  */
232
- const Un = P("Hammer", [
232
+ const Gn = P("Hammer", [
233
233
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
234
234
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
235
235
  [
@@ -246,7 +246,7 @@ const Un = P("Hammer", [
246
246
  * This source code is licensed under the ISC license.
247
247
  * See the LICENSE file in the root directory of this source tree.
248
248
  */
249
- const Gn = P("Hash", [
249
+ const Jn = P("Hash", [
250
250
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
251
251
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
252
252
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -258,7 +258,7 @@ const Gn = P("Hash", [
258
258
  * This source code is licensed under the ISC license.
259
259
  * See the LICENSE file in the root directory of this source tree.
260
260
  */
261
- const Jn = P("House", [
261
+ const Wn = P("House", [
262
262
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
263
263
  [
264
264
  "path",
@@ -274,7 +274,7 @@ const Jn = P("House", [
274
274
  * This source code is licensed under the ISC license.
275
275
  * See the LICENSE file in the root directory of this source tree.
276
276
  */
277
- const Wn = P("ListEnd", [
277
+ const Kn = P("ListEnd", [
278
278
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
279
279
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
280
280
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -287,7 +287,7 @@ const Wn = P("ListEnd", [
287
287
  * This source code is licensed under the ISC license.
288
288
  * See the LICENSE file in the root directory of this source tree.
289
289
  */
290
- const Kn = P("ListStart", [
290
+ const Qn = P("ListStart", [
291
291
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
292
292
  ["path", { d: "M16 18H3", key: "12xzn7" }],
293
293
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -300,7 +300,7 @@ const Kn = P("ListStart", [
300
300
  * This source code is licensed under the ISC license.
301
301
  * See the LICENSE file in the root directory of this source tree.
302
302
  */
303
- const Qn = P("ListX", [
303
+ const Zn = P("ListX", [
304
304
  ["path", { d: "M11 12H3", key: "51ecnj" }],
305
305
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
306
306
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -339,7 +339,7 @@ const Aa = P("Map", [
339
339
  * This source code is licensed under the ISC license.
340
340
  * See the LICENSE file in the root directory of this source tree.
341
341
  */
342
- const Zn = P("MessageSquareMore", [
342
+ const Xn = P("MessageSquareMore", [
343
343
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }],
344
344
  ["path", { d: "M8 10h.01", key: "19clt8" }],
345
345
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -351,7 +351,7 @@ const Zn = P("MessageSquareMore", [
351
351
  * This source code is licensed under the ISC license.
352
352
  * See the LICENSE file in the root directory of this source tree.
353
353
  */
354
- const Xn = P("Network", [
354
+ const Yn = P("Network", [
355
355
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
356
356
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
357
357
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -364,7 +364,7 @@ const Xn = P("Network", [
364
364
  * This source code is licensed under the ISC license.
365
365
  * See the LICENSE file in the root directory of this source tree.
366
366
  */
367
- const Yn = P("Plug2", [
367
+ const el = P("Plug2", [
368
368
  ["path", { d: "M9 2v6", key: "17ngun" }],
369
369
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
370
370
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -377,7 +377,7 @@ const Yn = P("Plug2", [
377
377
  * This source code is licensed under the ISC license.
378
378
  * See the LICENSE file in the root directory of this source tree.
379
379
  */
380
- const el = P("RefreshCw", [
380
+ const sl = P("RefreshCw", [
381
381
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
382
382
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
383
383
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
@@ -389,7 +389,7 @@ const el = P("RefreshCw", [
389
389
  * This source code is licensed under the ISC license.
390
390
  * See the LICENSE file in the root directory of this source tree.
391
391
  */
392
- const sl = P("Save", [
392
+ const al = P("Save", [
393
393
  [
394
394
  "path",
395
395
  {
@@ -423,7 +423,7 @@ const qa = P("Shapes", [
423
423
  * This source code is licensed under the ISC license.
424
424
  * See the LICENSE file in the root directory of this source tree.
425
425
  */
426
- const al = P("ShieldQuestion", [
426
+ const tl = P("ShieldQuestion", [
427
427
  [
428
428
  "path",
429
429
  {
@@ -440,7 +440,7 @@ const al = P("ShieldQuestion", [
440
440
  * This source code is licensed under the ISC license.
441
441
  * See the LICENSE file in the root directory of this source tree.
442
442
  */
443
- const tl = P("Sigma", [
443
+ const nl = P("Sigma", [
444
444
  [
445
445
  "path",
446
446
  {
@@ -455,7 +455,7 @@ const tl = P("Sigma", [
455
455
  * This source code is licensed under the ISC license.
456
456
  * See the LICENSE file in the root directory of this source tree.
457
457
  */
458
- const nl = P("SwatchBook", [
458
+ const ll = P("SwatchBook", [
459
459
  ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
460
460
  ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
461
461
  ["path", { d: "M 7 17h.01", key: "1euzgo" }],
@@ -485,7 +485,7 @@ const Us = P("Table", [
485
485
  * This source code is licensed under the ISC license.
486
486
  * See the LICENSE file in the root directory of this source tree.
487
487
  */
488
- const ll = P("Tag", [
488
+ const rl = P("Tag", [
489
489
  [
490
490
  "path",
491
491
  {
@@ -501,7 +501,7 @@ const ll = P("Tag", [
501
501
  * This source code is licensed under the ISC license.
502
502
  * See the LICENSE file in the root directory of this source tree.
503
503
  */
504
- const rl = P("TicketX", [
504
+ const il = P("TicketX", [
505
505
  [
506
506
  "path",
507
507
  {
@@ -518,7 +518,7 @@ const rl = P("TicketX", [
518
518
  * This source code is licensed under the ISC license.
519
519
  * See the LICENSE file in the root directory of this source tree.
520
520
  */
521
- const il = P("ToggleLeft", [
521
+ const ol = P("ToggleLeft", [
522
522
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
523
523
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
524
524
  ]);
@@ -545,14 +545,14 @@ function Ra(s) {
545
545
  var r;
546
546
  return {
547
547
  ...l,
548
- cards: (r = l.cards) == null ? void 0 : r.map((i) => ol(i))
548
+ cards: (r = l.cards) == null ? void 0 : r.map((i) => cl(i))
549
549
  };
550
550
  })
551
551
  };
552
552
  })
553
553
  };
554
554
  }
555
- function ol(s) {
555
+ function cl(s) {
556
556
  var t, a, n, l;
557
557
  return {
558
558
  ...s,
@@ -567,12 +567,12 @@ function ol(s) {
567
567
  }))
568
568
  }
569
569
  },
570
- customCfg: cl(s.customCfg),
570
+ customCfg: dl(s.customCfg),
571
571
  // if customCfg is present, clean it, otherwise return null{
572
572
  data: []
573
573
  };
574
574
  }
575
- function cl(s) {
575
+ function dl(s) {
576
576
  var t, a;
577
577
  return s ? {
578
578
  ...s,
@@ -586,7 +586,7 @@ function cl(s) {
586
586
  }
587
587
  } : null;
588
588
  }
589
- async function dl(s, t, a, n) {
589
+ async function ul(s, t, a, n) {
590
590
  if (!n)
591
591
  return null;
592
592
  const l = JSON.stringify(t);
@@ -610,19 +610,19 @@ async function ws(s, t) {
610
610
  operation: "update"
611
611
  });
612
612
  }
613
- async function ul(s, t) {
613
+ async function hl(s, t) {
614
614
  return t ? await ks("https://semaphor.cloud/api/v1/lens", t, {
615
615
  operation: "delete",
616
616
  lensId: s
617
617
  }) : null;
618
618
  }
619
- function hl() {
620
- const [s, t] = H(""), [a, n] = H(!1), l = z((p) => p.lenses), { setLenses: r, setSelectedLensId: i } = Ze(), [o, d] = H(!1), [u, m] = H(!1), g = z((p) => p.dashboard), v = z((p) => p.filterValues), { authToken: c } = Ie();
619
+ function ml() {
620
+ const [s, t] = H(""), [a, n] = H(!1), l = O((p) => p.lenses), { setLenses: r, setSelectedLensId: i } = Ze(), [o, d] = H(!1), [u, m] = H(!1), g = O((p) => p.dashboard), v = O((p) => p.filterValues), { authToken: c } = Ie();
621
621
  async function x() {
622
622
  d(!0);
623
623
  const p = Ra(
624
624
  g
625
- ), S = await dl(
625
+ ), S = await ul(
626
626
  s,
627
627
  p,
628
628
  v,
@@ -630,9 +630,9 @@ function hl() {
630
630
  );
631
631
  S && (r([...l || [], S]), i(S.id), m(!1)), d(!1);
632
632
  }
633
- return /* @__PURE__ */ e.jsxs(Os, { open: u, onOpenChange: m, children: [
634
- /* @__PURE__ */ e.jsx(zs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
635
- T,
633
+ return /* @__PURE__ */ e.jsxs(zs, { open: u, onOpenChange: m, children: [
634
+ /* @__PURE__ */ e.jsx(Os, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
635
+ M,
636
636
  {
637
637
  variant: "secondary",
638
638
  className: "h-7 p-2",
@@ -644,8 +644,8 @@ function hl() {
644
644
  }
645
645
  ) }),
646
646
  /* @__PURE__ */ e.jsxs(Is, { className: "sm:max-w-[425px]", children: [
647
- /* @__PURE__ */ e.jsxs(Ms, { children: [
648
- /* @__PURE__ */ e.jsx(Ts, { children: "Create Lens" }),
647
+ /* @__PURE__ */ e.jsxs(Ts, { children: [
648
+ /* @__PURE__ */ e.jsx(Ms, { children: "Create Lens" }),
649
649
  /* @__PURE__ */ e.jsx(Ds, { children: "Lenses are private by default and are only visible to you." })
650
650
  ] }),
651
651
  /* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-8 items-center gap-4", children: [
@@ -664,7 +664,7 @@ function hl() {
664
664
  ] }) }),
665
665
  a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
666
666
  /* @__PURE__ */ e.jsx(ha, { children: /* @__PURE__ */ e.jsx(
667
- T,
667
+ M,
668
668
  {
669
669
  size: "sm",
670
670
  variant: "outline",
@@ -677,13 +677,13 @@ function hl() {
677
677
  ] })
678
678
  ] });
679
679
  }
680
- function ml() {
681
- const [s, t] = H(!1), a = z((m) => m.lenses), n = z((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: r } = Ze(), { authToken: i } = Ie();
680
+ function xl() {
681
+ const [s, t] = H(!1), a = O((m) => m.lenses), n = O((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: r } = Ze(), { authToken: i } = Ie();
682
682
  async function o(m) {
683
683
  r(m);
684
684
  }
685
685
  async function d(m) {
686
- if (await ul(m, i == null ? void 0 : i.accessToken)) {
686
+ if (await hl(m, i == null ? void 0 : i.accessToken)) {
687
687
  const v = a == null ? void 0 : a.filter((c) => c.id !== m);
688
688
  l(v || []), r("original");
689
689
  }
@@ -712,12 +712,12 @@ function ml() {
712
712
  }
713
713
  }
714
714
  return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: t, children: [
715
- /* @__PURE__ */ e.jsx(Ls, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Bn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
715
+ /* @__PURE__ */ e.jsx(Ls, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Un, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
716
716
  /* @__PURE__ */ e.jsxs(Es, { align: "end", className: "w-60", children: [
717
717
  /* @__PURE__ */ e.jsx(ma, { className: "px-3", children: "Lenses" }),
718
718
  /* @__PURE__ */ e.jsx(xa, {}),
719
719
  /* @__PURE__ */ e.jsxs(
720
- rt,
720
+ it,
721
721
  {
722
722
  value: n,
723
723
  onValueChange: o,
@@ -732,7 +732,7 @@ function ml() {
732
732
  /* @__PURE__ */ e.jsx("p", { children: m.name }),
733
733
  /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-3", children: [
734
734
  /* @__PURE__ */ e.jsx(
735
- Jn,
735
+ Wn,
736
736
  {
737
737
  onClick: (g) => {
738
738
  g.preventDefault(), u(m);
@@ -748,7 +748,7 @@ function ml() {
748
748
  }
749
749
  ),
750
750
  /* @__PURE__ */ e.jsx(
751
- Ge,
751
+ Je,
752
752
  {
753
753
  onClick: (g) => {
754
754
  g.preventDefault(), d(m.id);
@@ -768,15 +768,15 @@ function ml() {
768
768
  ] })
769
769
  ] });
770
770
  }
771
- async function xl() {
771
+ async function pl() {
772
772
  var c;
773
- const s = z.getState().authToken, t = z.getState().theme, a = z.getState().filterValues, n = (c = z.getState().dashboard) == null ? void 0 : c.title, l = z.getState().isDownloadingPdf, r = z.getState().selectedSheetId;
773
+ const s = O.getState().authToken, t = O.getState().theme, a = O.getState().filterValues, n = (c = O.getState().dashboard) == null ? void 0 : c.title, l = O.getState().isDownloadingPdf, r = O.getState().selectedSheetId;
774
774
  if (l)
775
775
  return;
776
776
  const i = new URLSearchParams();
777
777
  i.set("token", (s == null ? void 0 : s.accessToken) || ""), i.set("theme", t || "light"), i.set("filterValues", JSON.stringify(a)), i.set("selectedSheetId", r || "");
778
778
  const o = `https://semaphor.cloud/api/v1/generate-pdf?params=${encodeURIComponent(i.toString())}`;
779
- z.setState({ isDownloadingPdf: !0 });
779
+ O.setState({ isDownloadingPdf: !0 });
780
780
  const m = (await (await fetch(o, {
781
781
  method: "GET",
782
782
  headers: {
@@ -785,28 +785,28 @@ async function xl() {
785
785
  })).json()).url, g = document.createElement("a");
786
786
  g.href = m;
787
787
  const v = `${n}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
788
- g.download = v, g.click(), z.setState({ isDownloadingPdf: !1 });
788
+ g.download = v, g.click(), O.setState({ isDownloadingPdf: !1 });
789
789
  }
790
- function pl({
790
+ function fl({
791
791
  iconClassName: s
792
792
  }) {
793
- Ie(), z((n) => {
793
+ Ie(), O((n) => {
794
794
  var l;
795
795
  return (l = n.dashboard) == null ? void 0 : l.title;
796
- }), z((n) => n.theme), z((n) => n.filterValues);
797
- const t = z((n) => n.isDownloadingPdf);
796
+ }), O((n) => n.theme), O((n) => n.filterValues);
797
+ const t = O((n) => n.isDownloadingPdf);
798
798
  async function a() {
799
- await xl();
799
+ await pl();
800
800
  }
801
801
  return /* @__PURE__ */ e.jsx(
802
- T,
802
+ M,
803
803
  {
804
804
  variant: "link",
805
805
  className: "group h-7 p-2",
806
806
  size: "sm",
807
807
  onClick: a,
808
808
  children: t ? /* @__PURE__ */ e.jsx(Qe, { className: Y("size-3.5 animate-spin", s) }) : /* @__PURE__ */ e.jsx(
809
- it,
809
+ ot,
810
810
  {
811
811
  className: Y("size-3.5", s),
812
812
  strokeWidth: 1.5
@@ -815,31 +815,31 @@ function pl({
815
815
  }
816
816
  );
817
817
  }
818
- function fl() {
818
+ function gl() {
819
819
  const { authToken: s } = Ie();
820
- z((f) => f.theme);
821
- const t = z((f) => f.lenses), a = z((f) => f.selectedLensId), n = t == null ? void 0 : t.find((f) => f.id === a), l = z((f) => f.dashboard);
822
- z((f) => f.selectedSheetId);
823
- const r = z(
820
+ O((f) => f.theme);
821
+ const t = O((f) => f.lenses), a = O((f) => f.selectedLensId), n = t == null ? void 0 : t.find((f) => f.id === a), l = O((f) => f.dashboard);
822
+ O((f) => f.selectedSheetId);
823
+ const r = O(
824
824
  (f) => f.isDashboardEditing
825
825
  ), i = h(
826
826
  (f) => f.selectedConnectionId
827
- ), [o, d] = H(!1), u = z((f) => f.filterValues), m = z((f) => f.isVisualEditing), g = z((f) => f.showFilters);
828
- z(
827
+ ), [o, d] = H(!1), u = O((f) => f.filterValues), m = O((f) => f.isVisualEditing), g = O((f) => f.showFilters);
828
+ O(
829
829
  (f) => f.showDashboardJSON
830
830
  );
831
- const v = z((f) => f.onSaveFunction), c = z(
831
+ const v = O((f) => f.onSaveFunction), c = O(
832
832
  (f) => f.actions.setShowFilters
833
- ), { addFrame: x, setSelectedFrameId: p } = z(
833
+ ), { addFrame: x, setSelectedFrameId: p } = O(
834
834
  (f) => f.actions
835
- ), { getSelectedSheet: S, setIsDashboardEditing: j, setShowDashboardJSON: A } = z((f) => f.actions), D = S(), { tenantId: k, endUserId: C } = Ss(
836
- () => ot(s == null ? void 0 : s.accessToken),
835
+ ), { getSelectedSheet: S, setIsDashboardEditing: j, setShowDashboardJSON: A } = O((f) => f.actions), D = S(), { tenantId: k, endUserId: C } = Ss(
836
+ () => ct(s == null ? void 0 : s.accessToken),
837
837
  [s == null ? void 0 : s.accessToken]
838
838
  ), E = Ss(() => k || C, [k, C]), R = () => {
839
839
  if (!r || !D) return;
840
840
  const f = {
841
841
  connectionId: i,
842
- id: Je(),
842
+ id: We(),
843
843
  title: "Title",
844
844
  description: "Description",
845
845
  preferences: {
@@ -854,7 +854,7 @@ function fl() {
854
854
  sql: "select COUNT(*) from YOUR_TABLE",
855
855
  data: []
856
856
  }, b = {
857
- id: Je(),
857
+ id: We(),
858
858
  cards: [f],
859
859
  activeCardId: f.id
860
860
  };
@@ -871,7 +871,7 @@ function fl() {
871
871
  template: b,
872
872
  filterValues: u
873
873
  };
874
- await ws(N, s == null ? void 0 : s.accessToken), We.success("Lens saved"), v == null || v(f), d(!1);
874
+ await ws(N, s == null ? void 0 : s.accessToken), Ke.success("Lens saved"), v == null || v(f), d(!1);
875
875
  }
876
876
  return m ? null : /* @__PURE__ */ e.jsxs(
877
877
  "div",
@@ -881,12 +881,12 @@ function fl() {
881
881
  children: [
882
882
  !m && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx($, { children: n == null ? void 0 : n.name }) }),
883
883
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
884
- /* @__PURE__ */ e.jsx("button", { onClick: ct, children: /* @__PURE__ */ e.jsx(rl, { className: "h-4 w-4", strokeWidth: 1.5 }) }),
885
- /* @__PURE__ */ e.jsx(pl, {}),
886
- r && !m && E && /* @__PURE__ */ e.jsx(hl, {}),
887
- !m && E && /* @__PURE__ */ e.jsx(ml, {}),
884
+ /* @__PURE__ */ e.jsx("button", { onClick: dt, children: /* @__PURE__ */ e.jsx(il, { className: "h-4 w-4", strokeWidth: 1.5 }) }),
885
+ /* @__PURE__ */ e.jsx(fl, {}),
886
+ r && !m && E && /* @__PURE__ */ e.jsx(ml, {}),
887
+ !m && E && /* @__PURE__ */ e.jsx(xl, {}),
888
888
  r && !m && /* @__PURE__ */ e.jsxs(
889
- T,
889
+ M,
890
890
  {
891
891
  variant: "secondary",
892
892
  className: "h-7 p-2",
@@ -900,7 +900,7 @@ function fl() {
900
900
  }
901
901
  ),
902
902
  !r && /* @__PURE__ */ e.jsx(
903
- T,
903
+ M,
904
904
  {
905
905
  variant: "ghost",
906
906
  className: "h-7 p-2",
@@ -910,7 +910,7 @@ function fl() {
910
910
  }
911
911
  ),
912
912
  r && !m && /* @__PURE__ */ e.jsx(
913
- T,
913
+ M,
914
914
  {
915
915
  variant: "ghost",
916
916
  role: "close",
@@ -919,22 +919,22 @@ function fl() {
919
919
  j(!1), A(!1);
920
920
  },
921
921
  size: "sm",
922
- children: /* @__PURE__ */ e.jsx(Ge, { className: "h-4 w-4", strokeWidth: 1.5 })
922
+ children: /* @__PURE__ */ e.jsx(Je, { className: "h-4 w-4", strokeWidth: 1.5 })
923
923
  }
924
924
  ),
925
925
  r && !m && E && /* @__PURE__ */ e.jsx(
926
- T,
926
+ M,
927
927
  {
928
928
  className: "h-7 p-2",
929
929
  variant: "ghost",
930
930
  disabled: o,
931
931
  onClick: y,
932
932
  size: "sm",
933
- children: /* @__PURE__ */ e.jsx(sl, { className: "h-4 w-4", strokeWidth: 1.5 })
933
+ children: /* @__PURE__ */ e.jsx(al, { className: "h-4 w-4", strokeWidth: 1.5 })
934
934
  }
935
935
  ),
936
936
  !g && !m && r && /* @__PURE__ */ e.jsx(
937
- T,
937
+ M,
938
938
  {
939
939
  className: "h-7 p-2",
940
940
  variant: "ghost",
@@ -950,7 +950,7 @@ function fl() {
950
950
  }
951
951
  );
952
952
  }
953
- function Pe({
953
+ function $e({
954
954
  title: s,
955
955
  items: t,
956
956
  value: a,
@@ -967,19 +967,19 @@ function Pe({
967
967
  const v = n ? "Loading..." : l ? "Error" : a;
968
968
  function c() {
969
969
  if (s === "Connection")
970
- return /* @__PURE__ */ e.jsx(Yn, { className: "size-4 rotate-90" });
970
+ return /* @__PURE__ */ e.jsx(el, { className: "size-4 rotate-90" });
971
971
  if (s === "Database")
972
- return /* @__PURE__ */ e.jsx(_n, { className: "size-4" });
972
+ return /* @__PURE__ */ e.jsx(Hn, { className: "size-4" });
973
973
  if (s === "Schema")
974
- return /* @__PURE__ */ e.jsx(Xn, { className: "size-4" });
974
+ return /* @__PURE__ */ e.jsx(Yn, { className: "size-4" });
975
975
  if (s === "Table")
976
976
  return /* @__PURE__ */ e.jsx(Us, { className: "size-4" });
977
977
  if (s === "Model")
978
- return /* @__PURE__ */ e.jsx(En, { className: "size-4" });
978
+ return /* @__PURE__ */ e.jsx(Vn, { className: "size-4" });
979
979
  }
980
980
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
981
981
  m && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(ga, { children: [
982
- /* @__PURE__ */ e.jsx(dt, { children: c() }),
982
+ /* @__PURE__ */ e.jsx(ut, { children: c() }),
983
983
  /* @__PURE__ */ e.jsx(ja, { className: "text-xs", align: "start", children: i })
984
984
  ] }) : c() }),
985
985
  /* @__PURE__ */ e.jsxs(ge, { disabled: g, value: v, onValueChange: o, children: [
@@ -1002,7 +1002,7 @@ function Pe({
1002
1002
  n ? /* @__PURE__ */ e.jsx(ye, { children: "Loading..." }) : /* @__PURE__ */ e.jsxs(ye, { className: "flex items-center justify-between gap-2", children: [
1003
1003
  s,
1004
1004
  /* @__PURE__ */ e.jsx(
1005
- el,
1005
+ sl,
1006
1006
  {
1007
1007
  className: "mr-1 size-3 cursor-pointer text-muted-foreground hover:text-foreground",
1008
1008
  onClick: r
@@ -1018,7 +1018,7 @@ function Pe({
1018
1018
  ] })
1019
1019
  ] });
1020
1020
  }
1021
- function gl({ column: s }) {
1021
+ function jl({ column: s }) {
1022
1022
  const [t, a] = H(!1), n = h((x) => x.selectedTableName), l = h(
1023
1023
  (x) => x.selectedSchemaName
1024
1024
  ), r = h(
@@ -1097,11 +1097,11 @@ function gl({ column: s }) {
1097
1097
  }
1098
1098
  function _a({ column: s }) {
1099
1099
  return /* @__PURE__ */ e.jsxs(ga, { children: [
1100
- /* @__PURE__ */ e.jsx(ut, { asChild: !0, children: ht(s.data_type) ? /* @__PURE__ */ e.jsx(Gs, { className: "size-3" }) : ya(s.data_type) ? /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) : mt(s.data_type) ? /* @__PURE__ */ e.jsx(xt, { className: "size-3" }) : pt(s.data_type) ? /* @__PURE__ */ e.jsx(il, { className: "size-3" }) : s.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e.jsx(Vn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(al, { className: "size-3" }) }),
1100
+ /* @__PURE__ */ e.jsx(ht, { asChild: !0, children: mt(s.data_type) ? /* @__PURE__ */ e.jsx(Gs, { className: "size-3" }) : ya(s.data_type) ? /* @__PURE__ */ e.jsx(Jn, { className: "size-3" }) : xt(s.data_type) ? /* @__PURE__ */ e.jsx(pt, { className: "size-3" }) : ft(s.data_type) ? /* @__PURE__ */ e.jsx(ol, { className: "size-3" }) : s.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e.jsx(An, { className: "size-3" }) : /* @__PURE__ */ e.jsx(tl, { className: "size-3" }) }),
1101
1101
  /* @__PURE__ */ e.jsx(ja, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1102
1102
  ] });
1103
1103
  }
1104
- function jl({
1104
+ function bl({
1105
1105
  schemaName: s,
1106
1106
  tableName: t,
1107
1107
  columns: a,
@@ -1115,20 +1115,20 @@ function jl({
1115
1115
  (y) => y.selectedSchemaName
1116
1116
  ), d = h((y) => y.selectedTableName), u = h(
1117
1117
  (y) => y.selectedDatamodelId
1118
- ), m = z(
1118
+ ), m = O(
1119
1119
  (y) => y.dashboard.aiScopeTables
1120
1120
  ), { addToAIScope: g, removeFromAIScope: v } = Ze();
1121
- z((y) => y.actions);
1121
+ O((y) => y.actions);
1122
1122
  const c = h((y) => y.actions.setRunSql), x = h((y) => y.actions.setSqlGen), p = h(
1123
1123
  (y) => y.actions.setIsShowingVisual
1124
1124
  ), S = h((y) => y.actions.setCardSql), { connectionType: j, modelItems: A, selectedDatamodelName: D } = Ve();
1125
1125
  function k(y) {
1126
- var M;
1126
+ var T;
1127
1127
  const f = ba(y, l);
1128
1128
  x(f);
1129
- const b = (M = A == null ? void 0 : A.find(
1129
+ const b = (T = A == null ? void 0 : A.find(
1130
1130
  (q) => q.id === u
1131
- )) == null ? void 0 : M.name, N = va(
1131
+ )) == null ? void 0 : T.name, N = va(
1132
1132
  f,
1133
1133
  pe(s),
1134
1134
  pe(t),
@@ -1150,7 +1150,7 @@ function jl({
1150
1150
  schemaName: o,
1151
1151
  tableName: d,
1152
1152
  datamodelName: D
1153
- }), We.success("Added to Assistant Scope", {
1153
+ }), Ke.success("Added to Assistant Scope", {
1154
1154
  position: "top-right",
1155
1155
  duration: 2500,
1156
1156
  richColors: !0
@@ -1159,7 +1159,7 @@ function jl({
1159
1159
  connectionType: j || "",
1160
1160
  tableName: d || "",
1161
1161
  datamodelName: D || ""
1162
- }), We("Removed from Assistant Scope", {
1162
+ }), Ke("Removed from Assistant Scope", {
1163
1163
  position: "top-right",
1164
1164
  duration: 2e3,
1165
1165
  richColors: !0
@@ -1212,7 +1212,7 @@ function jl({
1212
1212
  }
1213
1213
  ),
1214
1214
  /* @__PURE__ */ e.jsxs(
1215
- T,
1215
+ M,
1216
1216
  {
1217
1217
  disabled: n !== "Success",
1218
1218
  onClick: R,
@@ -1220,13 +1220,13 @@ function jl({
1220
1220
  variant: "secondary",
1221
1221
  className: "flex",
1222
1222
  children: [
1223
- n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(nl, { className: "mr-2 size-4" }),
1223
+ n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(ll, { className: "mr-2 size-4" }),
1224
1224
  "Top 10"
1225
1225
  ]
1226
1226
  }
1227
1227
  ),
1228
1228
  /* @__PURE__ */ e.jsxs(
1229
- T,
1229
+ M,
1230
1230
  {
1231
1231
  disabled: n !== "Success",
1232
1232
  onClick: V,
@@ -1234,7 +1234,7 @@ function jl({
1234
1234
  variant: "secondary",
1235
1235
  className: "w-full",
1236
1236
  children: [
1237
- n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(tl, { className: "mr-2 size-4" }),
1237
+ n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(nl, { className: "mr-2 size-4" }),
1238
1238
  "Count"
1239
1239
  ]
1240
1240
  }
@@ -1252,7 +1252,7 @@ function jl({
1252
1252
  className: Y(
1253
1253
  "group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-1 text-sm transition-colors hover:bg-muted/50",
1254
1254
  {
1255
- "border border-dashed border-muted-foreground bg-muted": ft(y, l)
1255
+ "border border-dashed border-muted-foreground bg-muted": gt(y, l)
1256
1256
  }
1257
1257
  ),
1258
1258
  children: [
@@ -1265,15 +1265,15 @@ function jl({
1265
1265
  {
1266
1266
  onClick: (f) => f.stopPropagation(),
1267
1267
  className: "flex items-center justify-end",
1268
- children: ya(y.data_type) && /* @__PURE__ */ e.jsx(gl, { column: y })
1268
+ children: ya(y.data_type) && /* @__PURE__ */ e.jsx(jl, { column: y })
1269
1269
  }
1270
1270
  )
1271
1271
  ]
1272
1272
  },
1273
1273
  y.column_name
1274
1274
  )) }),
1275
- /* @__PURE__ */ e.jsx(Ke, { orientation: "vertical" }),
1276
- /* @__PURE__ */ e.jsx(Ke, { orientation: "horizontal" })
1275
+ /* @__PURE__ */ e.jsx(_e, { orientation: "vertical" }),
1276
+ /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
1277
1277
  ]
1278
1278
  }
1279
1279
  )
@@ -1345,7 +1345,7 @@ function Ve(s, t) {
1345
1345
  }), f = D == null ? void 0 : D.connections.find(
1346
1346
  (w) => w.id === l
1347
1347
  ), b = f == null ? void 0 : f.type, N = (f == null ? void 0 : f.type) === "API" || (f == null ? void 0 : f.type) === "S3", {
1348
- data: M,
1348
+ data: T,
1349
1349
  isLoading: q,
1350
1350
  isFetching: J,
1351
1351
  isError: B,
@@ -1405,7 +1405,7 @@ function Ve(s, t) {
1405
1405
  }), {
1406
1406
  data: ae,
1407
1407
  isLoading: he,
1408
- isFetching: O,
1408
+ isFetching: z,
1409
1409
  isError: L,
1410
1410
  refetch: G
1411
1411
  } = De({
@@ -1450,7 +1450,7 @@ function Ve(s, t) {
1450
1450
  g
1451
1451
  ]);
1452
1452
  const Ce = (f == null ? void 0 : f.type) === "API" ? (Ws = f == null ? void 0 : f.type) == null ? void 0 : Ws.toLowerCase() : d || "", qe = N ? "" : o || "";
1453
- function Me(w) {
1453
+ function Te(w) {
1454
1454
  c(w), x("");
1455
1455
  }
1456
1456
  function I(w) {
@@ -1459,10 +1459,10 @@ function Ve(s, t) {
1459
1459
  function ce(w) {
1460
1460
  m(w);
1461
1461
  }
1462
- function Te(w) {
1462
+ function Me(w) {
1463
1463
  g(w === "none" ? "" : w), w !== "none" && w !== "" && v("");
1464
1464
  }
1465
- M && ((Ks = M == null ? void 0 : M.databases) == null ? void 0 : Ks.length) > 0, K && ((Qs = K == null ? void 0 : K.schemas) == null ? void 0 : Qs.length) > 0, ae && ((Zs = ae == null ? void 0 : ae.columns) == null ? void 0 : Zs.length) > 0 && (a = ae.columns.map((w) => ({
1465
+ T && ((Ks = T == null ? void 0 : T.databases) == null ? void 0 : Ks.length) > 0, K && ((Qs = K == null ? void 0 : K.schemas) == null ? void 0 : Qs.length) > 0, ae && ((Zs = ae == null ? void 0 : ae.columns) == null ? void 0 : Zs.length) > 0 && (a = ae.columns.map((w) => ({
1466
1466
  ...w,
1467
1467
  data_type: w.data_type.toLowerCase()
1468
1468
  }))), B && (a = []), (L || C) && (a = []);
@@ -1472,10 +1472,10 @@ function Ve(s, t) {
1472
1472
  name: w.name,
1473
1473
  type: w.type
1474
1474
  })
1475
- ), He = (Xs = R == null ? void 0 : R.datamodels) == null ? void 0 : Xs.map((w) => ({
1475
+ ), Pe = (Xs = R == null ? void 0 : R.datamodels) == null ? void 0 : Xs.map((w) => ({
1476
1476
  id: w.id,
1477
1477
  name: w.name
1478
- })), js = M == null ? void 0 : M.databases.map((w) => ({
1478
+ })), js = T == null ? void 0 : T.databases.map((w) => ({
1479
1479
  id: w.database_name,
1480
1480
  name: w.database_name
1481
1481
  })), Ye = K == null ? void 0 : K.schemas.map((w) => ({
@@ -1484,16 +1484,16 @@ function Ve(s, t) {
1484
1484
  })), bs = F == null ? void 0 : F.tables.map((w) => ({
1485
1485
  id: w.table_name,
1486
1486
  name: w.table_name
1487
- })), lt = (Ys = R == null ? void 0 : R.datamodels.find(
1487
+ })), rt = (Ys = R == null ? void 0 : R.datamodels.find(
1488
1488
  (w) => w.id === r
1489
1489
  )) == null ? void 0 : Ys.name;
1490
1490
  return {
1491
1491
  connectionItems: me,
1492
1492
  isConnectionsLoading: k,
1493
1493
  isConnectionsError: C,
1494
- modelItems: He,
1494
+ modelItems: Pe,
1495
1495
  selectedDatamodelId: r,
1496
- selectedDatamodelName: lt,
1496
+ selectedDatamodelName: rt,
1497
1497
  isModelsLoading: V,
1498
1498
  isModelsError: y,
1499
1499
  databaseItems: js,
@@ -1506,7 +1506,7 @@ function Ve(s, t) {
1506
1506
  isTableLoadingOrFetching: ie || ee,
1507
1507
  isTableError: oe,
1508
1508
  columns: a,
1509
- isColumnsLoadingOrFetching: he || O,
1509
+ isColumnsLoadingOrFetching: he || z,
1510
1510
  isColumnsError: L,
1511
1511
  isNonDbConnection: N,
1512
1512
  connectionType: b,
@@ -1519,15 +1519,15 @@ function Ve(s, t) {
1519
1519
  refetchTables: ne,
1520
1520
  refetchColumns: G,
1521
1521
  handleConnectionChange: ce,
1522
- handleDatamodelChange: Te,
1522
+ handleDatamodelChange: Me,
1523
1523
  handleDatabaseChange: I,
1524
- handleSchemaChange: Me
1524
+ handleSchemaChange: Te
1525
1525
  };
1526
1526
  }
1527
1527
  function Ha({
1528
1528
  ColumnsComponent: s
1529
1529
  }) {
1530
- var O;
1530
+ var z;
1531
1531
  const t = h(
1532
1532
  (L) => L.selectedConnectionId
1533
1533
  ), a = h(
@@ -1561,7 +1561,7 @@ function Ha({
1561
1561
  isNonDbConnection: f,
1562
1562
  refetchDatabases: b,
1563
1563
  refetchModels: N,
1564
- refetchSchemas: M,
1564
+ refetchSchemas: T,
1565
1565
  refetchTables: q,
1566
1566
  refetchColumns: J,
1567
1567
  refetchConnections: B,
@@ -1574,7 +1574,7 @@ function Ha({
1574
1574
  } = Ve();
1575
1575
  function F() {
1576
1576
  return s ? s(_, U, v) : /* @__PURE__ */ e.jsx(
1577
- jl,
1577
+ bl,
1578
1578
  {
1579
1579
  schemaName: _,
1580
1580
  tableName: U,
@@ -1590,7 +1590,7 @@ function Ha({
1590
1590
  if (!t || y === "S3" || y === "API") return null;
1591
1591
  if (!a || a === "none")
1592
1592
  return /* @__PURE__ */ e.jsx(
1593
- Pe,
1593
+ $e,
1594
1594
  {
1595
1595
  refetch: b,
1596
1596
  showNone: !0,
@@ -1606,16 +1606,16 @@ function Ha({
1606
1606
  function oe() {
1607
1607
  if (t && !f && (!n || n === "none") && (!a || a === "none"))
1608
1608
  return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
1609
- /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Oe, {}) }),
1609
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(ze, {}) }),
1610
1610
  /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx($, { children: "OR" }) }),
1611
- /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Oe, {}) })
1611
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(ze, {}) })
1612
1612
  ] });
1613
1613
  }
1614
1614
  function ne() {
1615
1615
  if (!t || y === "S3" || y === "API") return null;
1616
1616
  if (!n || n === "none")
1617
1617
  return /* @__PURE__ */ e.jsx(
1618
- Pe,
1618
+ $e,
1619
1619
  {
1620
1620
  refetch: N,
1621
1621
  showNone: !0,
@@ -1630,9 +1630,9 @@ function Ha({
1630
1630
  }
1631
1631
  function ae() {
1632
1632
  return !t || y === "S3" || y === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
1633
- Pe,
1633
+ $e,
1634
1634
  {
1635
- refetch: M,
1635
+ refetch: T,
1636
1636
  onChange: ue,
1637
1637
  isError: k,
1638
1638
  isLoading: D,
@@ -1648,7 +1648,7 @@ function Ha({
1648
1648
  return y === "API" ? (G = !1, G) : ((y === "S3" || t && n && n !== "none" && l) && (G = !0), G);
1649
1649
  }
1650
1650
  return L() ? /* @__PURE__ */ e.jsx(
1651
- Pe,
1651
+ $e,
1652
1652
  {
1653
1653
  refetch: q,
1654
1654
  onChange: i,
@@ -1663,7 +1663,7 @@ function Ha({
1663
1663
  return /* @__PURE__ */ e.jsxs("aside", { className: "flex grow flex-col justify-between", children: [
1664
1664
  /* @__PURE__ */ e.jsxs("section", { className: "space-y-3 px-6 py-4", children: [
1665
1665
  /* @__PURE__ */ e.jsx(
1666
- Pe,
1666
+ $e,
1667
1667
  {
1668
1668
  refetch: B,
1669
1669
  items: o,
@@ -1672,9 +1672,9 @@ function Ha({
1672
1672
  onChange: W,
1673
1673
  isLoading: c,
1674
1674
  isError: p,
1675
- connectionTooltip: ((O = o == null ? void 0 : o.find(
1675
+ connectionTooltip: ((z = o == null ? void 0 : o.find(
1676
1676
  (L) => L.id === t
1677
- )) == null ? void 0 : O.type) || ""
1677
+ )) == null ? void 0 : z.type) || ""
1678
1678
  }
1679
1679
  ),
1680
1680
  ee(),
@@ -1685,21 +1685,21 @@ function Ha({
1685
1685
  ] }),
1686
1686
  F(),
1687
1687
  /* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
1688
- T,
1688
+ M,
1689
1689
  {
1690
1690
  onClick: ie,
1691
1691
  size: "sm",
1692
1692
  variant: "secondary",
1693
1693
  className: "w-full",
1694
1694
  children: [
1695
- /* @__PURE__ */ e.jsx(Zn, { className: "mr-2 size-4" }),
1695
+ /* @__PURE__ */ e.jsx(Xn, { className: "mr-2 size-4" }),
1696
1696
  "Help"
1697
1697
  ]
1698
1698
  }
1699
1699
  ) })
1700
1700
  ] });
1701
1701
  }
1702
- function bl(s) {
1702
+ function vl(s) {
1703
1703
  const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1704
1704
  let r = s.length;
1705
1705
  if (l !== -1 && (r = l), n !== -1 && n < r && (r = n), t !== -1) {
@@ -1715,14 +1715,14 @@ function bl(s) {
1715
1715
  return console.log("beforeClause", i), console.log("afterClause", o), o ? `${i} {{ filters | where }} ${o}` : `${i.replace(/;$/, "")} {{ filters | where }}`;
1716
1716
  }
1717
1717
  }
1718
- function vl({
1718
+ function yl({
1719
1719
  error: s,
1720
1720
  setShowAIDialog: t,
1721
1721
  setUserInputforAI: a,
1722
1722
  setTriggerAIRun: n
1723
1723
  }) {
1724
1724
  return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, children: [
1725
- /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(qn, { className: "h-4 w-4 text-red-500" }) }) }),
1725
+ /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(Rn, { className: "h-4 w-4 text-red-500" }) }) }),
1726
1726
  /* @__PURE__ */ e.jsx(
1727
1727
  qs,
1728
1728
  {
@@ -1731,7 +1731,7 @@ function vl({
1731
1731
  children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
1732
1732
  /* @__PURE__ */ e.jsx(Ne, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1733
1733
  /* @__PURE__ */ e.jsxs(
1734
- T,
1734
+ M,
1735
1735
  {
1736
1736
  onClick: () => {
1737
1737
  t(!0), a(s), n(!0);
@@ -1739,7 +1739,7 @@ function vl({
1739
1739
  size: "sm",
1740
1740
  variant: "outline",
1741
1741
  children: [
1742
- /* @__PURE__ */ e.jsx(Un, { className: "mr-2 h-4 w-4" }),
1742
+ /* @__PURE__ */ e.jsx(Gn, { className: "mr-2 h-4 w-4" }),
1743
1743
  "Debug with AI"
1744
1744
  ]
1745
1745
  }
@@ -1749,41 +1749,41 @@ function vl({
1749
1749
  )
1750
1750
  ] });
1751
1751
  }
1752
- function yl({
1752
+ function Nl({
1753
1753
  userInput: s,
1754
1754
  triggerAIRun: t,
1755
1755
  setTriggerAIRun: a,
1756
1756
  open: n,
1757
1757
  setOpen: l
1758
1758
  }) {
1759
- const r = Be(null), i = Be(null), [o, d] = H([]), [u, m] = H(""), [g, v] = H(null), { authToken: c } = Ie(), x = h((O) => {
1759
+ const r = Ue(null), i = Ue(null), [o, d] = H([]), [u, m] = H(""), [g, v] = H(null), { authToken: c } = Ie(), x = h((z) => {
1760
1760
  var L;
1761
- return (L = O == null ? void 0 : O.card) == null ? void 0 : L.sql;
1762
- }), p = h((O) => {
1761
+ return (L = z == null ? void 0 : z.card) == null ? void 0 : L.sql;
1762
+ }), p = h((z) => {
1763
1763
  var L;
1764
- return (L = O == null ? void 0 : O.card) == null ? void 0 : L.python;
1765
- }), S = h((O) => O.actions.setCardSql), j = h((O) => O.actions.setRunSql), A = h(
1766
- (O) => O.actions.switchCardType
1764
+ return (L = z == null ? void 0 : z.card) == null ? void 0 : L.python;
1765
+ }), S = h((z) => z.actions.setCardSql), j = h((z) => z.actions.setRunSql), A = h(
1766
+ (z) => z.actions.switchCardType
1767
1767
  ), D = h(
1768
- (O) => O.selectedDatabaseName
1769
- ), k = h((O) => O.selectedTableName), C = h(
1770
- (O) => O.selectedConnectionId
1768
+ (z) => z.selectedDatabaseName
1769
+ ), k = h((z) => z.selectedTableName), C = h(
1770
+ (z) => z.selectedConnectionId
1771
1771
  ), E = h(
1772
- (O) => O.selectedSchemaName
1773
- ), R = z(
1774
- (O) => O.dashboard.aiScopeTables
1772
+ (z) => z.selectedSchemaName
1773
+ ), R = O(
1774
+ (z) => z.dashboard.aiScopeTables
1775
1775
  ), { selectedDatamodelName: V, connectionType: y } = Ve(), {
1776
1776
  messages: f,
1777
1777
  setMessages: b,
1778
1778
  reload: N,
1779
- append: M,
1779
+ append: T,
1780
1780
  input: q,
1781
1781
  status: J,
1782
1782
  handleInputChange: B,
1783
1783
  handleSubmit: W,
1784
1784
  addToolResult: K,
1785
1785
  stop: ue
1786
- } = gt({
1786
+ } = jt({
1787
1787
  api: "https://semaphor.cloud/api/v1/assistant",
1788
1788
  headers: {
1789
1789
  Authorization: `Bearer ${c == null ? void 0 : c.accessToken}`
@@ -1794,8 +1794,8 @@ function yl({
1794
1794
  maxSteps: 10,
1795
1795
  //maxToolRoundtrips: 5,
1796
1796
  onToolCall: F,
1797
- onFinish(O, L) {
1798
- U(L.usage), m(""), console.log("onFinish", O, L), L.finishReason === "stop" && m("");
1797
+ onFinish(z, L) {
1798
+ U(L.usage), m(""), console.log("onFinish", z, L), L.finishReason === "stop" && m("");
1799
1799
  }
1800
1800
  });
1801
1801
  te(() => {
@@ -1811,45 +1811,45 @@ function yl({
1811
1811
  a,
1812
1812
  B
1813
1813
  ]);
1814
- const re = Be(n);
1814
+ const re = Ue(n);
1815
1815
  te(() => {
1816
- const O = re.current ? "smooth" : "auto";
1816
+ const z = re.current ? "smooth" : "auto";
1817
1817
  re.current = n;
1818
1818
  const L = setTimeout(() => {
1819
1819
  var G;
1820
1820
  i.current && (i.current.scroll({
1821
1821
  top: i.current.scrollHeight,
1822
- behavior: O
1822
+ behavior: z
1823
1823
  }), (G = r.current) == null || G.focus());
1824
1824
  }, 50);
1825
1825
  return () => clearTimeout(L);
1826
1826
  }, [f, n]);
1827
- function U(O) {
1827
+ function U(z) {
1828
1828
  v((L) => L ? {
1829
- promptTokens: L.promptTokens + O.promptTokens,
1830
- completionTokens: L.completionTokens + O.completionTokens,
1831
- totalTokens: L.totalTokens + O.totalTokens
1832
- } : O);
1829
+ promptTokens: L.promptTokens + z.promptTokens,
1830
+ completionTokens: L.completionTokens + z.completionTokens,
1831
+ totalTokens: L.totalTokens + z.totalTokens
1832
+ } : z);
1833
1833
  }
1834
- function _(O) {
1835
- const L = jt(o, O);
1834
+ function _(z) {
1835
+ const L = bt(o, z);
1836
1836
  ee(L);
1837
1837
  }
1838
1838
  async function F({
1839
- toolCall: O
1839
+ toolCall: z
1840
1840
  }) {
1841
- if (O.toolName === "createChart") {
1842
- console.log("createChart", O.args);
1843
- const L = O.args.sql, G = O.args.chartType;
1841
+ if (z.toolName === "createChart") {
1842
+ console.log("createChart", z.args);
1843
+ const L = z.args.sql, G = z.args.chartType;
1844
1844
  return A(G), S(L), j(!0), {
1845
1845
  status: "success",
1846
1846
  message: "Let the user know that chart is created"
1847
1847
  // query: sql,
1848
1848
  };
1849
- } else if (O.toolName === "getTableColumns")
1849
+ } else if (z.toolName === "getTableColumns")
1850
1850
  m("Getting table columns...");
1851
1851
  else {
1852
- if (O.toolName === "getUserSql")
1852
+ if (z.toolName === "getUserSql")
1853
1853
  return x ? (console.log("cardSql", x), console.log("cardPython", p), {
1854
1854
  status: "success",
1855
1855
  sql: x,
@@ -1861,14 +1861,14 @@ function yl({
1861
1861
  m("Thinking...");
1862
1862
  }
1863
1863
  }
1864
- function ie(O) {
1865
- return O.map((G) => ({
1864
+ function ie(z) {
1865
+ return z.map((G) => ({
1866
1866
  ...G,
1867
1867
  connectionType: G.connectionType === "API" || G.connectionType === "S3" ? "DuckDb" : G.connectionType
1868
1868
  }));
1869
1869
  }
1870
- function ee(O) {
1871
- const L = ie(O);
1870
+ function ee(z) {
1871
+ const L = ie(z);
1872
1872
  d(L), b((G) => [
1873
1873
  ...G,
1874
1874
  {
@@ -1879,48 +1879,48 @@ function yl({
1879
1879
  ]);
1880
1880
  }
1881
1881
  function oe() {
1882
- const O = {
1882
+ const z = {
1883
1883
  databaseName: D || "",
1884
1884
  schemaName: E || "",
1885
1885
  tableName: k || "",
1886
1886
  datamodelName: V || "",
1887
1887
  connectionId: C || "",
1888
1888
  connectionType: y || ""
1889
- }, L = sa([...o, O]);
1889
+ }, L = sa([...o, z]);
1890
1890
  ee(L);
1891
1891
  }
1892
1892
  function ne() {
1893
- const O = {
1893
+ const z = {
1894
1894
  databaseName: D || "",
1895
1895
  schemaName: E || "",
1896
1896
  tableName: k || "",
1897
1897
  datamodelName: V || "",
1898
1898
  connectionId: C || "",
1899
1899
  connectionType: y || ""
1900
- }, L = bt(
1900
+ }, L = vt(
1901
1901
  [...R || [], ...o],
1902
- O
1902
+ z
1903
1903
  );
1904
1904
  if (console.log("isInScope", L), !L || o.length === 0) {
1905
1905
  const G = sa([
1906
1906
  ...R || [],
1907
1907
  ...o,
1908
- O
1908
+ z
1909
1909
  ]).filter(
1910
- (Ce) => Ce.connectionId === O.connectionId
1910
+ (Ce) => Ce.connectionId === z.connectionId
1911
1911
  );
1912
1912
  ee(G);
1913
1913
  }
1914
1914
  }
1915
- function ae(O) {
1916
- l(!1), S(O), j(!0);
1915
+ function ae(z) {
1916
+ l(!1), S(z), j(!0);
1917
1917
  }
1918
1918
  const he = !["ready", "error"].includes(J);
1919
1919
  return {
1920
1920
  messages: f,
1921
1921
  setMessages: b,
1922
1922
  reload: N,
1923
- append: M,
1923
+ append: T,
1924
1924
  input: q,
1925
1925
  isLoading: he,
1926
1926
  handleRun: ae,
@@ -1939,15 +1939,15 @@ function yl({
1939
1939
  llmUsage: g
1940
1940
  };
1941
1941
  }
1942
- const Nl = !1;
1943
- function Cl({
1942
+ const Cl = !1;
1943
+ function Sl({
1944
1944
  open: s,
1945
1945
  setOpen: t,
1946
1946
  userInput: a,
1947
1947
  triggerAIRun: n,
1948
1948
  setTriggerAIRun: l
1949
1949
  }) {
1950
- const [r, i] = H(!1), [o, d] = H(Nl), [u, m] = H(!1), {
1950
+ const [r, i] = H(!1), [o, d] = H(Cl), [u, m] = H(!1), {
1951
1951
  messages: g,
1952
1952
  setMessages: v,
1953
1953
  reload: c,
@@ -1966,9 +1966,9 @@ function Cl({
1966
1966
  handleSubmit: f,
1967
1967
  stop: b,
1968
1968
  chatStatus: N,
1969
- toolStatus: M,
1969
+ toolStatus: T,
1970
1970
  llmUsage: q
1971
- } = yl({
1971
+ } = Nl({
1972
1972
  userInput: a,
1973
1973
  triggerAIRun: n,
1974
1974
  setTriggerAIRun: l,
@@ -2008,9 +2008,9 @@ function Cl({
2008
2008
  ] })
2009
2009
  ] });
2010
2010
  }
2011
- return /* @__PURE__ */ e.jsxs(Os, { open: s, onOpenChange: t, children: [
2012
- /* @__PURE__ */ e.jsx(zs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2013
- T,
2011
+ return /* @__PURE__ */ e.jsxs(zs, { open: s, onOpenChange: t, children: [
2012
+ /* @__PURE__ */ e.jsx(Os, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2013
+ M,
2014
2014
  {
2015
2015
  onClick: A,
2016
2016
  size: "sm",
@@ -2020,9 +2020,9 @@ function Cl({
2020
2020
  }
2021
2021
  ) }),
2022
2022
  /* @__PURE__ */ e.jsxs(Is, { className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]", children: [
2023
- /* @__PURE__ */ e.jsx(Ms, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-2 pr-5", children: [
2023
+ /* @__PURE__ */ e.jsx(Ts, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-2 pr-5", children: [
2024
2024
  /* @__PURE__ */ e.jsxs("div", { children: [
2025
- /* @__PURE__ */ e.jsx(Ts, { children: "Assistant" }),
2025
+ /* @__PURE__ */ e.jsx(Ms, { children: "Assistant" }),
2026
2026
  /* @__PURE__ */ e.jsx(Ds, { children: "What can I help you with?" }),
2027
2027
  C && C.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
2028
2028
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "Tables in scope:" }),
@@ -2054,7 +2054,7 @@ function Cl({
2054
2054
  (C == null ? void 0 : C.length) === 0 && /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
2055
2055
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "Tables in scope: None" }),
2056
2056
  /* @__PURE__ */ e.jsxs(
2057
- T,
2057
+ M,
2058
2058
  {
2059
2059
  className: "h-6 text-xs",
2060
2060
  size: "sm",
@@ -2071,7 +2071,7 @@ function Cl({
2071
2071
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2072
2072
  J(),
2073
2073
  /* @__PURE__ */ e.jsx(
2074
- T,
2074
+ M,
2075
2075
  {
2076
2076
  className: "h-8",
2077
2077
  size: "sm",
@@ -2091,7 +2091,7 @@ function Cl({
2091
2091
  className: "h-[625px] w-full overflow-auto border-t border-t-muted",
2092
2092
  children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 py-2 pr-3", role: "messages", children: [
2093
2093
  /* @__PURE__ */ e.jsx(
2094
- vt,
2094
+ yt,
2095
2095
  {
2096
2096
  messages: g,
2097
2097
  showTools: o,
@@ -2100,9 +2100,9 @@ function Cl({
2100
2100
  }
2101
2101
  ),
2102
2102
  /* @__PURE__ */ e.jsx(
2103
- yt,
2103
+ Nt,
2104
2104
  {
2105
- status: Nt(N, M),
2105
+ status: Ct(N, T),
2106
2106
  isLoading: S
2107
2107
  }
2108
2108
  )
@@ -2110,7 +2110,7 @@ function Cl({
2110
2110
  }
2111
2111
  ),
2112
2112
  /* @__PURE__ */ e.jsx(
2113
- Ct,
2113
+ St,
2114
2114
  {
2115
2115
  stop: b,
2116
2116
  ref: V,
@@ -2140,10 +2140,10 @@ var Pa = {
2140
2140
  className: void 0,
2141
2141
  style: void 0,
2142
2142
  attr: void 0
2143
- }, ia = ze.createContext && /* @__PURE__ */ ze.createContext(Pa), Sl = ["attr", "size", "title"];
2144
- function wl(s, t) {
2143
+ }, ia = Oe.createContext && /* @__PURE__ */ Oe.createContext(Pa), wl = ["attr", "size", "title"];
2144
+ function kl(s, t) {
2145
2145
  if (s == null) return {};
2146
- var a = kl(s, t), n, l;
2146
+ var a = zl(s, t), n, l;
2147
2147
  if (Object.getOwnPropertySymbols) {
2148
2148
  var r = Object.getOwnPropertySymbols(s);
2149
2149
  for (l = 0; l < r.length; l++)
@@ -2151,7 +2151,7 @@ function wl(s, t) {
2151
2151
  }
2152
2152
  return a;
2153
2153
  }
2154
- function kl(s, t) {
2154
+ function zl(s, t) {
2155
2155
  if (s == null) return {};
2156
2156
  var a = {};
2157
2157
  for (var n in s)
@@ -2193,13 +2193,13 @@ function cs(s) {
2193
2193
  return s;
2194
2194
  }
2195
2195
  function Ol(s, t, a) {
2196
- return t = zl(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2196
+ return t = Il(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2197
2197
  }
2198
- function zl(s) {
2199
- var t = Il(s, "string");
2198
+ function Il(s) {
2199
+ var t = Tl(s, "string");
2200
2200
  return typeof t == "symbol" ? t : t + "";
2201
2201
  }
2202
- function Il(s, t) {
2202
+ function Tl(s, t) {
2203
2203
  if (typeof s != "object" || !s) return s;
2204
2204
  var a = s[Symbol.toPrimitive];
2205
2205
  if (a !== void 0) {
@@ -2210,12 +2210,12 @@ function Il(s, t) {
2210
2210
  return (t === "string" ? String : Number)(s);
2211
2211
  }
2212
2212
  function $a(s) {
2213
- return s && s.map((t, a) => /* @__PURE__ */ ze.createElement(t.tag, cs({
2213
+ return s && s.map((t, a) => /* @__PURE__ */ Oe.createElement(t.tag, cs({
2214
2214
  key: a
2215
2215
  }, t.attr), $a(t.child)));
2216
2216
  }
2217
2217
  function xe(s) {
2218
- return (t) => /* @__PURE__ */ ze.createElement(Ml, os({
2218
+ return (t) => /* @__PURE__ */ Oe.createElement(Ml, os({
2219
2219
  attr: cs({}, s.attr)
2220
2220
  }, t), $a(s.child));
2221
2221
  }
@@ -2225,8 +2225,8 @@ function Ml(s) {
2225
2225
  attr: n,
2226
2226
  size: l,
2227
2227
  title: r
2228
- } = s, i = wl(s, Sl), o = l || a.size || "1em", d;
2229
- return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ ze.createElement("svg", os({
2228
+ } = s, i = kl(s, wl), o = l || a.size || "1em", d;
2229
+ return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ Oe.createElement("svg", os({
2230
2230
  stroke: "currentColor",
2231
2231
  fill: "currentColor",
2232
2232
  strokeWidth: "0"
@@ -2238,16 +2238,16 @@ function Ml(s) {
2238
2238
  height: o,
2239
2239
  width: o,
2240
2240
  xmlns: "http://www.w3.org/2000/svg"
2241
- }), r && /* @__PURE__ */ ze.createElement("title", null, r), s.children);
2241
+ }), r && /* @__PURE__ */ Oe.createElement("title", null, r), s.children);
2242
2242
  };
2243
- return ia !== void 0 ? /* @__PURE__ */ ze.createElement(ia.Consumer, null, (a) => t(a)) : t(Pa);
2243
+ return ia !== void 0 ? /* @__PURE__ */ Oe.createElement(ia.Consumer, null, (a) => t(a)) : t(Pa);
2244
2244
  }
2245
- function Tl(s) {
2245
+ function Dl(s) {
2246
2246
  return xe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2247
2247
  }
2248
- function Dl({ sql: s }) {
2248
+ function Fl({ sql: s }) {
2249
2249
  return /* @__PURE__ */ e.jsxs(Vs, { children: [
2250
- /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(St, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2250
+ /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(wt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2251
2251
  /* @__PURE__ */ e.jsx(
2252
2252
  qs,
2253
2253
  {
@@ -2262,7 +2262,7 @@ function Dl({ sql: s }) {
2262
2262
  ] });
2263
2263
  }
2264
2264
  function Ba(s) {
2265
- const { theme: t } = wt(), a = z((p) => p.theme), n = h((p) => p.frame), l = h((p) => p.card), r = h((p) => p.activeTabCardId), i = kt(), { refetch: o } = Le(l), { updateCardTab: d, setRunSql: u } = le(), m = Be(), g = Be({}), v = n.cards.find((p) => p.id === r), c = Fa(() => {
2265
+ const { theme: t } = kt(), a = O((p) => p.theme), n = h((p) => p.frame), l = h((p) => p.card), r = h((p) => p.activeTabCardId), i = zt(), { refetch: o } = Le(l), { updateCardTab: d, setRunSql: u } = le(), m = Ue(), g = Ue({}), v = n.cards.find((p) => p.id === r), c = Fa(() => {
2266
2266
  let p = "";
2267
2267
  return s === "python" && (p = (v == null ? void 0 : v.python) || Ca), s === "sql" && (p = (v == null ? void 0 : v.sql) || ""), p;
2268
2268
  }, [s, v]);
@@ -2322,10 +2322,10 @@ function Ba(s) {
2322
2322
  }
2323
2323
  return { handleEditorDidMount: x };
2324
2324
  }
2325
- function Fl() {
2325
+ function Ll() {
2326
2326
  const s = h((i) => i.card.sql), t = h((i) => i.sqlGen), { setCardSql: a, setSqlGen: n } = le(), { handleEditorDidMount: l } = Ba("sql");
2327
2327
  function r(i) {
2328
- a(i), zt(t) || n({});
2328
+ a(i), It(t) || n({});
2329
2329
  }
2330
2330
  return /* @__PURE__ */ e.jsx(
2331
2331
  us,
@@ -2351,7 +2351,7 @@ function Fl() {
2351
2351
  }
2352
2352
  );
2353
2353
  }
2354
- function Ll() {
2354
+ function El() {
2355
2355
  const s = h((l) => l.card.python), { setCardPython: t } = le(), { handleEditorDidMount: a } = Ba("python");
2356
2356
  function n(l) {
2357
2357
  t(l);
@@ -2380,8 +2380,8 @@ function Ll() {
2380
2380
  }
2381
2381
  );
2382
2382
  }
2383
- function El() {
2384
- const s = z((r) => r.dashboard.filters), t = z((r) => r.filterValues), a = z((r) => r.selectedSheetId), n = s == null ? void 0 : s.filter(
2383
+ function Vl() {
2384
+ const s = O((r) => r.dashboard.filters), t = O((r) => r.filterValues), a = O((r) => r.selectedSheetId), n = s == null ? void 0 : s.filter(
2385
2385
  (r) => r.sheetId === a || !r.sheetId
2386
2386
  ), l = t == null ? void 0 : t.filter(
2387
2387
  (r) => (n == null ? void 0 : n.some((i) => i.id === r.filterId)) || r.filterId.endsWith(a)
@@ -2411,12 +2411,12 @@ function El() {
2411
2411
  }
2412
2412
  );
2413
2413
  }
2414
- function Vl() {
2415
- var Me;
2414
+ function Al() {
2415
+ var Te;
2416
2416
  const [s, t] = H({
2417
2417
  queryKey: [],
2418
2418
  queryData: null
2419
- }), a = It(), [n, l] = H(!1), [r, i] = H(!1), [o, d] = H(!1), [u, m] = H(""), [g, v] = H(!1), c = h((I) => I.frame), x = h((I) => I.card), p = h((I) => I.isShowingVisual), S = h(
2419
+ }), a = Tt(), [n, l] = H(!1), [r, i] = H(!1), [o, d] = H(!1), [u, m] = H(""), [g, v] = H(!1), c = h((I) => I.frame), x = h((I) => I.card), p = h((I) => I.isShowingVisual), S = h(
2420
2420
  (I) => I.selectedConnectionId
2421
2421
  ), j = h(
2422
2422
  (I) => I.selectedDatabaseName
@@ -2435,7 +2435,7 @@ function Vl() {
2435
2435
  setPythonStdOut: f,
2436
2436
  setCardPreferences: b,
2437
2437
  setCardType: N,
2438
- setCardPython: M
2438
+ setCardPython: T
2439
2439
  } = le(), q = h((I) => I.onSave), J = h((I) => I.onClose), B = h((I) => I.actions.setSqlGen), W = h((I) => I.runSql), K = h((I) => I.actions.setRunSql), ue = h((I) => I.actions.setCardCfg), re = h(
2440
2440
  (I) => I.actions.setIsSqlRunning
2441
2441
  ), {
@@ -2449,7 +2449,7 @@ function Vl() {
2449
2449
  refetch: ae
2450
2450
  } = Le(x);
2451
2451
  te(() => {
2452
- if (U && (U.rowLimitExceeded && We.error("Row limit (10,000) exceeded. Refine your query.", {
2452
+ if (U && (U.rowLimitExceeded && Ke.error("Row limit (10,000) exceeded. Refine your query.", {
2453
2453
  position: "top-center",
2454
2454
  richColors: !0
2455
2455
  }), f((U == null ? void 0 : U.output) || ""), U.records.length > 0)) {
@@ -2477,15 +2477,15 @@ function Vl() {
2477
2477
  s.queryData || t({
2478
2478
  queryKey: ne,
2479
2479
  queryData: I
2480
- }), a.setQueryData(ne, null), a.removeQueries({ queryKey: ne, exact: !0 }), y(""), B({}), M(""), ue(void 0), R(""), b({}), N("bar");
2480
+ }), a.setQueryData(ne, null), a.removeQueries({ queryKey: ne, exact: !0 }), y(""), B({}), T(""), ue(void 0), R(""), b({}), N("bar");
2481
2481
  }
2482
- function O(I, ce) {
2482
+ function z(I, ce) {
2483
2483
  if (I.length === 0)
2484
2484
  return "";
2485
2485
  if (ce) {
2486
- const Te = I.find((me) => me.id === ce);
2487
- if (Te) {
2488
- const me = Te.tabTitle;
2486
+ const Me = I.find((me) => me.id === ce);
2487
+ if (Me) {
2488
+ const me = Me.tabTitle;
2489
2489
  if (me == "All__Header")
2490
2490
  return I[0].id;
2491
2491
  if (me && me.endsWith("__Header")) {
@@ -2501,7 +2501,7 @@ function Vl() {
2501
2501
  }
2502
2502
  function L() {
2503
2503
  let I = C;
2504
- C && !C.includes("{{") && (I = bl(C), y(I));
2504
+ C && !C.includes("{{") && (I = vl(C), y(I));
2505
2505
  const ce = {
2506
2506
  ...x,
2507
2507
  lastSelectedSchema: D,
@@ -2512,12 +2512,12 @@ function Vl() {
2512
2512
  type: p ? x.type : "table",
2513
2513
  sql: I,
2514
2514
  customCfg: p ? x.customCfg : null
2515
- }, Te = c.cards.map(
2516
- (He) => He.id === x.id ? ce : He
2515
+ }, Me = c.cards.map(
2516
+ (Pe) => Pe.id === x.id ? ce : Pe
2517
2517
  ), me = {
2518
2518
  ...c,
2519
- cards: Te,
2520
- activeCardId: O(Te, c.activeCardId)
2519
+ cards: Me,
2520
+ activeCardId: z(Me, c.activeCardId)
2521
2521
  };
2522
2522
  q == null || q(me);
2523
2523
  }
@@ -2536,14 +2536,14 @@ function Vl() {
2536
2536
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
2537
2537
  /* @__PURE__ */ e.jsx($, { className: "ml-6 text-xs font-semibold", children: "Filters" }),
2538
2538
  r && /* @__PURE__ */ e.jsx(
2539
- Ge,
2539
+ Je,
2540
2540
  {
2541
2541
  onClick: () => i(!1),
2542
2542
  className: "bg-background/50 text-foreground/50 hover:cursor-pointer hover:text-foreground"
2543
2543
  }
2544
2544
  )
2545
2545
  ] }),
2546
- /* @__PURE__ */ e.jsx(El, {})
2546
+ /* @__PURE__ */ e.jsx(Vl, {})
2547
2547
  ] })
2548
2548
  }
2549
2549
  ),
@@ -2582,7 +2582,7 @@ function Vl() {
2582
2582
  {
2583
2583
  id: "sql-container",
2584
2584
  className: "relative flex w-[99%]",
2585
- children: /* @__PURE__ */ e.jsx(Fl, {})
2585
+ children: /* @__PURE__ */ e.jsx(Ll, {})
2586
2586
  }
2587
2587
  ),
2588
2588
  n && /* @__PURE__ */ e.jsx("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "sql" })
@@ -2604,7 +2604,7 @@ function Vl() {
2604
2604
  {
2605
2605
  id: "python-container",
2606
2606
  className: "relative flex w-[99%] pt-0",
2607
- children: /* @__PURE__ */ e.jsx(Ll, {})
2607
+ children: /* @__PURE__ */ e.jsx(El, {})
2608
2608
  }
2609
2609
  ),
2610
2610
  /* @__PURE__ */ e.jsx("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "python" })
@@ -2636,7 +2636,7 @@ function Vl() {
2636
2636
  children: [
2637
2637
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
2638
2638
  /* @__PURE__ */ e.jsxs(
2639
- T,
2639
+ M,
2640
2640
  {
2641
2641
  title: "Shift + Enter",
2642
2642
  disabled: _ || F,
@@ -2653,23 +2653,23 @@ function Vl() {
2653
2653
  }
2654
2654
  ),
2655
2655
  (ee || (U == null ? void 0 : U.error)) && /* @__PURE__ */ e.jsx(
2656
- vl,
2656
+ yl,
2657
2657
  {
2658
- error: (oe == null ? void 0 : oe.message) || ((Me = U == null ? void 0 : U.error) == null ? void 0 : Me.message),
2658
+ error: (oe == null ? void 0 : oe.message) || ((Te = U == null ? void 0 : U.error) == null ? void 0 : Te.message),
2659
2659
  setShowAIDialog: d,
2660
2660
  setTriggerAIRun: v,
2661
2661
  setUserInputforAI: m
2662
2662
  }
2663
2663
  ),
2664
2664
  /* @__PURE__ */ e.jsxs(
2665
- T,
2665
+ M,
2666
2666
  {
2667
2667
  onClick: he,
2668
2668
  className: "",
2669
2669
  size: "sm",
2670
2670
  variant: "outline",
2671
2671
  children: [
2672
- /* @__PURE__ */ e.jsx(Hn, { className: "mr-2 size-4" }),
2672
+ /* @__PURE__ */ e.jsx(Pn, { className: "mr-2 size-4" }),
2673
2673
  "Clear"
2674
2674
  ]
2675
2675
  }
@@ -2682,11 +2682,11 @@ function Vl() {
2682
2682
  className: "",
2683
2683
  size: "sm",
2684
2684
  variant: "outline",
2685
- children: /* @__PURE__ */ e.jsx(Tl, { className: "size-4 text-foreground/70" })
2685
+ children: /* @__PURE__ */ e.jsx(Dl, { className: "size-4 text-foreground/70" })
2686
2686
  }
2687
2687
  ),
2688
2688
  /* @__PURE__ */ e.jsx(
2689
- Cl,
2689
+ Sl,
2690
2690
  {
2691
2691
  open: o,
2692
2692
  setOpen: d,
@@ -2697,28 +2697,28 @@ function Vl() {
2697
2697
  )
2698
2698
  ] }),
2699
2699
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2700
- (U == null ? void 0 : U.sql) && /* @__PURE__ */ e.jsx(Dl, { sql: U.sql }),
2700
+ (U == null ? void 0 : U.sql) && /* @__PURE__ */ e.jsx(Fl, { sql: U.sql }),
2701
2701
  /* @__PURE__ */ e.jsxs(
2702
- T,
2702
+ M,
2703
2703
  {
2704
2704
  onClick: G,
2705
2705
  className: "w-full",
2706
2706
  size: "sm",
2707
2707
  variant: "outline",
2708
2708
  children: [
2709
- /* @__PURE__ */ e.jsx(Ge, { className: "mr-2 size-4" }),
2709
+ /* @__PURE__ */ e.jsx(Je, { className: "mr-2 size-4" }),
2710
2710
  "Close"
2711
2711
  ]
2712
2712
  }
2713
2713
  ),
2714
2714
  /* @__PURE__ */ e.jsxs(
2715
- T,
2715
+ M,
2716
2716
  {
2717
2717
  onClick: L,
2718
2718
  size: "sm",
2719
2719
  variant: "outline",
2720
2720
  children: [
2721
- /* @__PURE__ */ e.jsx(Tt, { className: "mr-2 size-4 font-bold text-green-600" }),
2721
+ /* @__PURE__ */ e.jsx(Dt, { className: "mr-2 size-4 font-bold text-green-600" }),
2722
2722
  "Accept"
2723
2723
  ]
2724
2724
  }
@@ -2732,9 +2732,9 @@ function Vl() {
2732
2732
  )
2733
2733
  );
2734
2734
  }
2735
- function Al({ data: s }) {
2735
+ function ql({ data: s }) {
2736
2736
  var i;
2737
- const [t, a] = ze.useState([]), l = Object.keys(s[0]).map((o) => ({
2737
+ const [t, a] = Oe.useState([]), l = Object.keys(s[0]).map((o) => ({
2738
2738
  // header: key,
2739
2739
  accessorKey: o,
2740
2740
  header: ({ column: d }) => {
@@ -2746,26 +2746,26 @@ function Al({ data: s }) {
2746
2746
  onClick: () => d.toggleSorting(d.getIsSorted() === "asc"),
2747
2747
  children: [
2748
2748
  o,
2749
- u === "asc" ? /* @__PURE__ */ e.jsx(Dt, { className: "ml-2 h-5 w-5" }) : u === "desc" ? /* @__PURE__ */ e.jsx(Ft, { className: "ml-2 h-5 w-5" }) : null
2749
+ u === "asc" ? /* @__PURE__ */ e.jsx(Ft, { className: "ml-2 h-5 w-5" }) : u === "desc" ? /* @__PURE__ */ e.jsx(Lt, { className: "ml-2 h-5 w-5" }) : null
2750
2750
  ]
2751
2751
  }
2752
2752
  ) });
2753
2753
  }
2754
- })), r = Lt({
2754
+ })), r = Et({
2755
2755
  data: s,
2756
2756
  columns: l,
2757
- getCoreRowModel: qt(),
2758
- getPaginationRowModel: Rt(),
2757
+ getCoreRowModel: Rt(),
2758
+ getPaginationRowModel: _t(),
2759
2759
  onSortingChange: a,
2760
- getSortedRowModel: _t(),
2760
+ getSortedRowModel: Ht(),
2761
2761
  manualPagination: !0,
2762
2762
  state: {
2763
2763
  sorting: t
2764
2764
  }
2765
2765
  });
2766
2766
  return /* @__PURE__ */ e.jsx("div", { className: "font-mono text-xs text-foreground/95", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
2767
- /* @__PURE__ */ e.jsx(Et, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(ys, { children: o.headers.map((d) => /* @__PURE__ */ e.jsx(
2768
- Vt,
2767
+ /* @__PURE__ */ e.jsx(Vt, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(ys, { children: o.headers.map((d) => /* @__PURE__ */ e.jsx(
2768
+ At,
2769
2769
  {
2770
2770
  className: "sticky top-0 h-11 bg-muted font-semibold",
2771
2771
  children: d.isPlaceholder ? null : aa(
@@ -2775,7 +2775,7 @@ function Al({ data: s }) {
2775
2775
  },
2776
2776
  d.id
2777
2777
  )) }, o.id)) }),
2778
- /* @__PURE__ */ e.jsx(At, { children: (i = r.getRowModel().rows) != null && i.length ? r.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2778
+ /* @__PURE__ */ e.jsx(qt, { children: (i = r.getRowModel().rows) != null && i.length ? r.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2779
2779
  ys,
2780
2780
  {
2781
2781
  className: "whitespace-nowrap py-2",
@@ -2786,20 +2786,20 @@ function Al({ data: s }) {
2786
2786
  )) : /* @__PURE__ */ e.jsx(ys, { children: /* @__PURE__ */ e.jsx(ta, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2787
2787
  ] }) });
2788
2788
  }
2789
- function ql({ card: s }) {
2789
+ function Rl({ card: s }) {
2790
2790
  var j, A, D, k, C, E, R, V, y, f, b;
2791
2791
  const [t, a] = H(!1), [n, l] = H(
2792
2792
  []
2793
- ), { authToken: r } = Ie(), i = Ht(r == null ? void 0 : r.accessToken), o = z((N) => N.themeStyle), d = {
2793
+ ), { authToken: r } = Ie(), i = Pt(r == null ? void 0 : r.accessToken), o = O((N) => N.themeStyle), d = {
2794
2794
  colors: ((A = (j = o == null ? void 0 : o.chart) == null ? void 0 : j.dataset) == null ? void 0 : A.backgroundColor) || []
2795
2795
  };
2796
2796
  (D = s.customCardPreferences) != null && D.inputData;
2797
2797
  const { getCard: u } = Sa(((k = s.customCardPreferences) == null ? void 0 : k.url) || ""), m = ((C = s.customCardPreferences) == null ? void 0 : C.visualType) || "single", g = h((N) => N.frame);
2798
2798
  le();
2799
- const { data: v } = Le(s), c = Fa((N, M) => {
2799
+ const { data: v } = Le(s), c = Fa((N, T) => {
2800
2800
  l((q) => ({
2801
2801
  ...q,
2802
- [N]: M
2802
+ [N]: T
2803
2803
  }));
2804
2804
  }, []);
2805
2805
  if (!((E = s.customCardPreferences) != null && E.componentName))
@@ -2814,11 +2814,11 @@ function ql({ card: s }) {
2814
2814
  ((V = s.customCardPreferences) == null ? void 0 : V.dataInputCardIds) || {}
2815
2815
  ).map((N) => {
2816
2816
  var J, B, W;
2817
- const M = (B = (J = s.customCardPreferences) == null ? void 0 : J.dataInputCardIds) == null ? void 0 : B[N].cardId, q = (W = g == null ? void 0 : g.cards) == null ? void 0 : W.find((K) => K.id === M);
2817
+ const T = (B = (J = s.customCardPreferences) == null ? void 0 : J.dataInputCardIds) == null ? void 0 : B[N].cardId, q = (W = g == null ? void 0 : g.cards) == null ? void 0 : W.find((K) => K.id === T);
2818
2818
  return q || null;
2819
2819
  });
2820
2820
  return /* @__PURE__ */ e.jsx("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs(
2821
- Ln,
2821
+ En,
2822
2822
  {
2823
2823
  fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
2824
2824
  children: [
@@ -2837,12 +2837,12 @@ function ql({ card: s }) {
2837
2837
  ((f = s.customCardPreferences) == null ? void 0 : f.dataInputCardIds) || {}
2838
2838
  ).map((N) => {
2839
2839
  var J, B, W;
2840
- const M = (B = (J = s.customCardPreferences) == null ? void 0 : J.dataInputCardIds) == null ? void 0 : B[N].cardId, q = (W = g == null ? void 0 : g.cards) == null ? void 0 : W.find(
2841
- (K) => K.id === M
2840
+ const T = (B = (J = s.customCardPreferences) == null ? void 0 : J.dataInputCardIds) == null ? void 0 : B[N].cardId, q = (W = g == null ? void 0 : g.cards) == null ? void 0 : W.find(
2841
+ (K) => K.id === T
2842
2842
  );
2843
2843
  if (q)
2844
2844
  return /* @__PURE__ */ e.jsx(
2845
- Pt,
2845
+ $t,
2846
2846
  {
2847
2847
  onLoadingStatus: p,
2848
2848
  onDataChange: c,
@@ -2859,8 +2859,8 @@ function ql({ card: s }) {
2859
2859
  onDataChange: c,
2860
2860
  settings: S.map(
2861
2861
  (N) => {
2862
- var M;
2863
- return (M = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : M.settings;
2862
+ var T;
2863
+ return (T = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : T.settings;
2864
2864
  }
2865
2865
  ),
2866
2866
  data: S.map((N) => N != null && N.id ? n == null ? void 0 : n[N.id] : [])
@@ -2879,7 +2879,7 @@ function Ua({
2879
2879
  ...t
2880
2880
  }) {
2881
2881
  var S;
2882
- const a = h((j) => j.card), n = ((S = a.customCardPreferences) == null ? void 0 : S.showCardHeader) ?? !0, l = h((j) => j.frame), r = z((j) => j.dashboard.filters);
2882
+ const a = h((j) => j.card), n = ((S = a.customCardPreferences) == null ? void 0 : S.showCardHeader) ?? !0, l = h((j) => j.frame), r = O((j) => j.dashboard.filters);
2883
2883
  h((j) => j.actions.setRunSql);
2884
2884
  const { updateFilter: i } = Ze(), o = r == null ? void 0 : r.find((j) => j.id === l.filterId), { data: d, isLoading: u, isFetching: m } = Le(a), { setCard: g } = le(), { data: v } = Rs(a);
2885
2885
  if (!a.id) return null;
@@ -2893,20 +2893,20 @@ function Ua({
2893
2893
  topoJson: v
2894
2894
  }));
2895
2895
  function x(j) {
2896
- return /* @__PURE__ */ e.jsx(ql, { card: j });
2896
+ return /* @__PURE__ */ e.jsx(Rl, { card: j });
2897
2897
  }
2898
2898
  function p() {
2899
2899
  var j;
2900
2900
  if (d != null && d.records && (d == null ? void 0 : d.records.length) === 0 && !u && !m)
2901
2901
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
2902
- /* @__PURE__ */ e.jsx(Wt, { className: "size-8 text-muted-foreground" }),
2902
+ /* @__PURE__ */ e.jsx(Kt, { className: "size-8 text-muted-foreground" }),
2903
2903
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
2904
2904
  ] });
2905
2905
  if (a.type === "custom")
2906
2906
  return x(a);
2907
2907
  if (!["table", "custom"].includes(a.type) && c)
2908
2908
  return /* @__PURE__ */ e.jsx(
2909
- Kt,
2909
+ Qt,
2910
2910
  {
2911
2911
  cfg: c
2912
2912
  },
@@ -2914,25 +2914,25 @@ function Ua({
2914
2914
  );
2915
2915
  if (a.type === "table" && (d != null && d.records) && (d == null ? void 0 : d.records.length) > 0)
2916
2916
  return /* @__PURE__ */ e.jsxs(Ne, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
2917
- /* @__PURE__ */ e.jsx(Qt, { card: a, data: d == null ? void 0 : d.records }),
2918
- /* @__PURE__ */ e.jsx(Ke, { orientation: "horizontal" })
2917
+ /* @__PURE__ */ e.jsx(Zt, { card: a, data: d == null ? void 0 : d.records }),
2918
+ /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
2919
2919
  ] });
2920
2920
  }
2921
2921
  return /* @__PURE__ */ e.jsxs(
2922
- $t,
2922
+ Bt,
2923
2923
  {
2924
2924
  role: "editor-visual-card",
2925
2925
  className: Y("relative flex h-full flex-col rounded-none", s),
2926
2926
  ...t,
2927
2927
  children: [
2928
- n && /* @__PURE__ */ e.jsxs(Bt, { className: "flex flex-row items-start justify-between py-4", children: [
2928
+ n && /* @__PURE__ */ e.jsxs(Ut, { className: "flex flex-row items-start justify-between py-4", children: [
2929
2929
  /* @__PURE__ */ e.jsxs("div", { children: [
2930
2930
  /* @__PURE__ */ e.jsx(
2931
2931
  as,
2932
2932
  {
2933
2933
  text: a.title,
2934
2934
  onSave: (j) => g({ ...a, title: j }),
2935
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Ut, { className: "text-base", children: a.title || "Edit title..." }) })
2935
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Gt, { className: "text-base", children: a.title || "Edit title..." }) })
2936
2936
  },
2937
2937
  a.title
2938
2938
  ),
@@ -2941,7 +2941,7 @@ function Ua({
2941
2941
  {
2942
2942
  text: a.description || "",
2943
2943
  onSave: (j) => g({ ...a, description: j }),
2944
- children: /* @__PURE__ */ e.jsx(Gt, { children: a.description || "Edit description..." })
2944
+ children: /* @__PURE__ */ e.jsx(Jt, { children: a.description || "Edit description..." })
2945
2945
  },
2946
2946
  a.description
2947
2947
  )
@@ -2959,7 +2959,7 @@ function Ua({
2959
2959
  /* @__PURE__ */ e.jsx(ka, { filter: o })
2960
2960
  ] })
2961
2961
  ] }),
2962
- /* @__PURE__ */ e.jsx(Jt, { className: "flex grow flex-col", children: p() })
2962
+ /* @__PURE__ */ e.jsx(Wt, { className: "flex grow flex-col", children: p() })
2963
2963
  ]
2964
2964
  }
2965
2965
  );
@@ -2984,8 +2984,8 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
2984
2984
  value: t,
2985
2985
  onChange: a
2986
2986
  }
2987
- ), Rl = () => /* @__PURE__ */ e.jsxs(Ms, { children: [
2988
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Ts, { children: "Customize Card" }) }),
2987
+ ), _l = () => /* @__PURE__ */ e.jsxs(Ts, { children: [
2988
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Ms, { children: "Customize Card" }) }),
2989
2989
  /* @__PURE__ */ e.jsxs(Ds, { children: [
2990
2990
  "See the configuration options and documentation",
2991
2991
  /* @__PURE__ */ e.jsx(
@@ -2998,13 +2998,13 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
2998
2998
  }
2999
2999
  )
3000
3000
  ] })
3001
- ] }), _l = ({
3001
+ ] }), Hl = ({
3002
3002
  defaultConfig: s,
3003
3003
  customCode: t,
3004
3004
  customConfig: a,
3005
3005
  onConfigChange: n,
3006
3006
  onCodeChange: l
3007
- }) => /* @__PURE__ */ e.jsxs(za, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
3007
+ }) => /* @__PURE__ */ e.jsxs(Oa, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
3008
3008
  /* @__PURE__ */ e.jsxs(Ia, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
3009
3009
  /* @__PURE__ */ e.jsx(ts, { value: "custom-config", children: a ? "Custom Config" : "Default Config" }),
3010
3010
  /* @__PURE__ */ e.jsx(ts, { value: "output", children: "Output" }),
@@ -3016,7 +3016,7 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3016
3016
  value: "output",
3017
3017
  className: "mt-0 grow rounded-b border border-t-0 p-2",
3018
3018
  children: /* @__PURE__ */ e.jsx(
3019
- Xt,
3019
+ Yt,
3020
3020
  {
3021
3021
  readOnly: !0,
3022
3022
  value: s,
@@ -3055,7 +3055,7 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3055
3055
  )
3056
3056
  }
3057
3057
  )
3058
- ] }), Hl = ({
3058
+ ] }), Pl = ({
3059
3059
  error: s,
3060
3060
  hasCustomConfig: t,
3061
3061
  onReset: a,
@@ -3063,11 +3063,11 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3063
3063
  onClose: l
3064
3064
  }) => /* @__PURE__ */ e.jsxs(ha, { className: "flex items-center", children: [
3065
3065
  /* @__PURE__ */ e.jsx($, { className: "mr-2 text-red-500", children: s }),
3066
- /* @__PURE__ */ e.jsx(T, { disabled: !t, onClick: a, variant: "outline", children: "Reset" }),
3067
- /* @__PURE__ */ e.jsx(T, { onClick: n, variant: "outline", children: "Apply" }),
3068
- /* @__PURE__ */ e.jsx(T, { onClick: l, variant: "outline", children: "Close" })
3066
+ /* @__PURE__ */ e.jsx(M, { disabled: !t, onClick: a, variant: "outline", children: "Reset" }),
3067
+ /* @__PURE__ */ e.jsx(M, { onClick: n, variant: "outline", children: "Apply" }),
3068
+ /* @__PURE__ */ e.jsx(M, { onClick: l, variant: "outline", children: "Close" })
3069
3069
  ] });
3070
- function Pl() {
3070
+ function $l() {
3071
3071
  const [s, t] = H(!1), [a, n] = H(""), [l, r] = H(""), [i, o] = H(""), [d, u] = H(""), m = h((k) => k.card), g = h((k) => k.card.customCfg), { data: v } = Le(m), { data: c } = Rs(m), { setCardCustomCfg: x, setCustomVisualCode: p } = le(), S = (k, C) => Se.transform(k, (E, R, V) => {
3072
3072
  if (!Se.isEqual(R, C[V]))
3073
3073
  if (Se.isArray(R) && Se.isArray(C[V]))
@@ -3123,23 +3123,23 @@ function Pl() {
3123
3123
  u("Invalid JSON configuration");
3124
3124
  }
3125
3125
  };
3126
- return /* @__PURE__ */ e.jsxs(Os, { open: s, onOpenChange: t, children: [
3127
- /* @__PURE__ */ e.jsx(zs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
3128
- T,
3126
+ return /* @__PURE__ */ e.jsxs(zs, { open: s, onOpenChange: t, children: [
3127
+ /* @__PURE__ */ e.jsx(Os, { asChild: !0, children: /* @__PURE__ */ e.jsx(
3128
+ M,
3129
3129
  {
3130
3130
  onClick: A,
3131
3131
  size: "sm",
3132
3132
  variant: "outline",
3133
3133
  className: g ? "border-foreground/50 dark:border-foreground/70" : "",
3134
- children: /* @__PURE__ */ e.jsx(Zt, { className: "h-4 w-4" })
3134
+ children: /* @__PURE__ */ e.jsx(Xt, { className: "h-4 w-4" })
3135
3135
  }
3136
3136
  ) }),
3137
3137
  /* @__PURE__ */ e.jsxs(Is, { className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
3138
- /* @__PURE__ */ e.jsx(Rl, {}),
3138
+ /* @__PURE__ */ e.jsx(_l, {}),
3139
3139
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
3140
- /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Oa, children: /* @__PURE__ */ e.jsx(Ua, { className: "w-1/2 rounded shadow-none" }) }),
3140
+ /* @__PURE__ */ e.jsx(hs, { FallbackComponent: za, children: /* @__PURE__ */ e.jsx(Ua, { className: "w-1/2 rounded shadow-none" }) }),
3141
3141
  /* @__PURE__ */ e.jsx(
3142
- _l,
3142
+ Hl,
3143
3143
  {
3144
3144
  defaultConfig: a,
3145
3145
  customCode: i,
@@ -3150,7 +3150,7 @@ function Pl() {
3150
3150
  )
3151
3151
  ] }),
3152
3152
  /* @__PURE__ */ e.jsx(
3153
- Hl,
3153
+ Pl,
3154
3154
  {
3155
3155
  error: d,
3156
3156
  hasCustomConfig: !!g,
@@ -3173,7 +3173,7 @@ function Ja(s) {
3173
3173
  function Wa(s) {
3174
3174
  return xe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
3175
3175
  }
3176
- function $l(s) {
3176
+ function Bl(s) {
3177
3177
  return xe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z" }, child: [] }] })(s);
3178
3178
  }
3179
3179
  function Ka(s) {
@@ -3195,7 +3195,7 @@ function et(s) {
3195
3195
  const [t, a] = H(null);
3196
3196
  return te(() => {
3197
3197
  s && (async () => {
3198
- const r = (await import("./lucide-react-DXbiJQ14.js"))[s];
3198
+ const r = (await import("./lucide-react-BCNS53ze.js"))[s];
3199
3199
  a(r);
3200
3200
  })();
3201
3201
  }, [s]), t;
@@ -3203,12 +3203,12 @@ function et(s) {
3203
3203
  function st() {
3204
3204
  const { authToken: s } = Ie(), { data: t, isLoading: a, isFetching: n, isError: l } = De({
3205
3205
  queryKey: ["plugins", s == null ? void 0 : s.accessToken],
3206
- queryFn: () => Yt(s == null ? void 0 : s.accessToken)
3206
+ queryFn: () => en(s == null ? void 0 : s.accessToken)
3207
3207
  // staleTime: Infinity,
3208
3208
  });
3209
3209
  return { data: t, isLoading: a, isFetching: n, isError: l };
3210
3210
  }
3211
- function Bl({
3211
+ function Ul({
3212
3212
  onChartTypeChange: s
3213
3213
  }) {
3214
3214
  const [t, a] = H([]), { data: n } = st();
@@ -3217,7 +3217,7 @@ function Bl({
3217
3217
  var r;
3218
3218
  if (n) {
3219
3219
  const o = (await Promise.all(
3220
- (r = n == null ? void 0 : n.plugins) == null ? void 0 : r.map(async (d) => (await en(d.value)).visuals.map((g) => ({
3220
+ (r = n == null ? void 0 : n.plugins) == null ? void 0 : r.map(async (d) => (await sn(d.value)).visuals.map((g) => ({
3221
3221
  name: g.name,
3222
3222
  icon: g.icon,
3223
3223
  url: d.value
@@ -3227,9 +3227,9 @@ function Bl({
3227
3227
  }
3228
3228
  })();
3229
3229
  }, [n]), t.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3230
- /* @__PURE__ */ e.jsx(Oe, { className: "my-2" }),
3230
+ /* @__PURE__ */ e.jsx(ze, { className: "my-2" }),
3231
3231
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: t.map((l, r) => /* @__PURE__ */ e.jsx(
3232
- Ul,
3232
+ Gl,
3233
3233
  {
3234
3234
  text: l.name,
3235
3235
  onClick: () => s("custom", l),
@@ -3239,15 +3239,15 @@ function Bl({
3239
3239
  )) })
3240
3240
  ] });
3241
3241
  }
3242
- const Ul = ({
3242
+ const Gl = ({
3243
3243
  text: s,
3244
3244
  icon: t,
3245
3245
  onClick: a
3246
3246
  }) => {
3247
3247
  const n = et(t || ""), l = s.charAt(0).toUpperCase();
3248
- return /* @__PURE__ */ e.jsx(T, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
3248
+ return /* @__PURE__ */ e.jsx(M, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
3249
3249
  };
3250
- function Gl() {
3250
+ function Jl() {
3251
3251
  var m, g;
3252
3252
  const [s, t] = H(!1), a = h((v) => v.card), n = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = h((v) => v.actions), { setCardCustomCfg: o, setCustomCardPreferences: d } = le();
3253
3253
  function u(v, c) {
@@ -3260,8 +3260,8 @@ function Gl() {
3260
3260
  }), t(!1);
3261
3261
  }
3262
3262
  return /* @__PURE__ */ e.jsxs(ms, { open: s, onOpenChange: t, children: [
3263
- /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3264
- Jl,
3263
+ /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3264
+ Wl,
3265
3265
  {
3266
3266
  className: "h-4 w-4",
3267
3267
  chartType: n,
@@ -3272,7 +3272,7 @@ function Gl() {
3272
3272
  /* @__PURE__ */ e.jsxs(ps, { className: "w-50", children: [
3273
3273
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 place-items-center", children: [
3274
3274
  /* @__PURE__ */ e.jsx(
3275
- T,
3275
+ M,
3276
3276
  {
3277
3277
  onClick: () => u("bar"),
3278
3278
  className: "font-normal",
@@ -3281,7 +3281,7 @@ function Gl() {
3281
3281
  }
3282
3282
  ),
3283
3283
  /* @__PURE__ */ e.jsx(
3284
- T,
3284
+ M,
3285
3285
  {
3286
3286
  onClick: () => u("line"),
3287
3287
  variant: "ghost",
@@ -3289,7 +3289,7 @@ function Gl() {
3289
3289
  }
3290
3290
  ),
3291
3291
  /* @__PURE__ */ e.jsx(
3292
- T,
3292
+ M,
3293
3293
  {
3294
3294
  onClick: () => u("stackedBar"),
3295
3295
  variant: "ghost",
@@ -3297,7 +3297,7 @@ function Gl() {
3297
3297
  }
3298
3298
  ),
3299
3299
  /* @__PURE__ */ e.jsx(
3300
- T,
3300
+ M,
3301
3301
  {
3302
3302
  onClick: () => u("stackedLine"),
3303
3303
  variant: "ghost",
@@ -3305,7 +3305,7 @@ function Gl() {
3305
3305
  }
3306
3306
  ),
3307
3307
  /* @__PURE__ */ e.jsx(
3308
- T,
3308
+ M,
3309
3309
  {
3310
3310
  onClick: () => u("scatter"),
3311
3311
  variant: "ghost",
@@ -3313,7 +3313,7 @@ function Gl() {
3313
3313
  }
3314
3314
  ),
3315
3315
  /* @__PURE__ */ e.jsx(
3316
- T,
3316
+ M,
3317
3317
  {
3318
3318
  onClick: () => u("bubble"),
3319
3319
  variant: "ghost",
@@ -3321,7 +3321,7 @@ function Gl() {
3321
3321
  }
3322
3322
  ),
3323
3323
  /* @__PURE__ */ e.jsx(
3324
- T,
3324
+ M,
3325
3325
  {
3326
3326
  onClick: () => u("pie"),
3327
3327
  variant: "ghost",
@@ -3329,7 +3329,7 @@ function Gl() {
3329
3329
  }
3330
3330
  ),
3331
3331
  /* @__PURE__ */ e.jsx(
3332
- T,
3332
+ M,
3333
3333
  {
3334
3334
  onClick: () => u("doughnut"),
3335
3335
  variant: "ghost",
@@ -3337,7 +3337,7 @@ function Gl() {
3337
3337
  }
3338
3338
  ),
3339
3339
  /* @__PURE__ */ e.jsx(
3340
- T,
3340
+ M,
3341
3341
  {
3342
3342
  onClick: () => u("radar"),
3343
3343
  variant: "ghost",
@@ -3351,7 +3351,7 @@ function Gl() {
3351
3351
  }
3352
3352
  ),
3353
3353
  /* @__PURE__ */ e.jsx(
3354
- T,
3354
+ M,
3355
3355
  {
3356
3356
  onClick: () => u("polarArea"),
3357
3357
  variant: "ghost",
@@ -3359,7 +3359,7 @@ function Gl() {
3359
3359
  }
3360
3360
  ),
3361
3361
  /* @__PURE__ */ e.jsx(
3362
- T,
3362
+ M,
3363
3363
  {
3364
3364
  onClick: () => u("pyramid"),
3365
3365
  variant: "ghost",
@@ -3367,7 +3367,7 @@ function Gl() {
3367
3367
  }
3368
3368
  ),
3369
3369
  /* @__PURE__ */ e.jsx(
3370
- T,
3370
+ M,
3371
3371
  {
3372
3372
  onClick: () => u("range"),
3373
3373
  variant: "ghost",
@@ -3375,7 +3375,7 @@ function Gl() {
3375
3375
  }
3376
3376
  ),
3377
3377
  /* @__PURE__ */ e.jsx(
3378
- T,
3378
+ M,
3379
3379
  {
3380
3380
  onClick: () => u("table"),
3381
3381
  variant: "ghost",
@@ -3383,7 +3383,7 @@ function Gl() {
3383
3383
  }
3384
3384
  ),
3385
3385
  /* @__PURE__ */ e.jsx(
3386
- T,
3386
+ M,
3387
3387
  {
3388
3388
  onClick: () => u("kpi"),
3389
3389
  variant: "ghost",
@@ -3391,7 +3391,7 @@ function Gl() {
3391
3391
  }
3392
3392
  ),
3393
3393
  /* @__PURE__ */ e.jsx(
3394
- T,
3394
+ M,
3395
3395
  {
3396
3396
  onClick: () => u("text"),
3397
3397
  variant: "ghost",
@@ -3399,7 +3399,7 @@ function Gl() {
3399
3399
  }
3400
3400
  ),
3401
3401
  /* @__PURE__ */ e.jsx(
3402
- T,
3402
+ M,
3403
3403
  {
3404
3404
  onClick: () => u("map"),
3405
3405
  variant: "ghost",
@@ -3407,7 +3407,7 @@ function Gl() {
3407
3407
  }
3408
3408
  ),
3409
3409
  /* @__PURE__ */ e.jsx(
3410
- T,
3410
+ M,
3411
3411
  {
3412
3412
  onClick: () => u("custom"),
3413
3413
  variant: "ghost",
@@ -3415,11 +3415,11 @@ function Gl() {
3415
3415
  }
3416
3416
  )
3417
3417
  ] }),
3418
- /* @__PURE__ */ e.jsx(Bl, { onChartTypeChange: u })
3418
+ /* @__PURE__ */ e.jsx(Ul, { onChartTypeChange: u })
3419
3419
  ] })
3420
3420
  ] });
3421
3421
  }
3422
- function Jl({
3422
+ function Wl({
3423
3423
  chartType: s,
3424
3424
  className: t,
3425
3425
  customIcon: a,
@@ -3463,20 +3463,20 @@ function Jl({
3463
3463
  return /* @__PURE__ */ e.jsx(Us, { className: t });
3464
3464
  }
3465
3465
  }
3466
- function Wl() {
3466
+ function Kl() {
3467
3467
  var t;
3468
3468
  const s = h((a) => a.card);
3469
3469
  return (t = s.customCardPreferences) == null || t.showCardHeader, le(), /* @__PURE__ */ e.jsxs(Fs, { children: [
3470
3470
  /* @__PURE__ */ e.jsx(Ls, { asChild: !0, children: /* @__PURE__ */ e.jsx(Bs, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3471
3471
  /* @__PURE__ */ e.jsx(Es, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3472
- sn,
3472
+ an,
3473
3473
  {
3474
3474
  onClick: () => {
3475
- navigator.clipboard.writeText(s.id), We.success("Card ID copied to clipboard");
3475
+ navigator.clipboard.writeText(s.id), Ke.success("Card ID copied to clipboard");
3476
3476
  },
3477
3477
  className: "cursor-pointer space-x-2",
3478
3478
  children: [
3479
- /* @__PURE__ */ e.jsx(an, { className: "size-5" }),
3479
+ /* @__PURE__ */ e.jsx(tn, { className: "size-5" }),
3480
3480
  /* @__PURE__ */ e.jsx("span", { children: "Copy Card ID" })
3481
3481
  ]
3482
3482
  }
@@ -3492,7 +3492,7 @@ function da() {
3492
3492
  function c() {
3493
3493
  const b = {
3494
3494
  connectionId: t.connectionId,
3495
- id: Je(),
3495
+ id: We(),
3496
3496
  title: "Title",
3497
3497
  description: "Description",
3498
3498
  preferences: {
@@ -3520,20 +3520,20 @@ function da() {
3520
3520
  function p() {
3521
3521
  const b = {
3522
3522
  ...t,
3523
- id: Je(),
3523
+ id: We(),
3524
3524
  title: `${t.title} Copy`,
3525
3525
  tabTitle: `${t.tabTitle || t.title} Copy`
3526
3526
  };
3527
3527
  x(b);
3528
3528
  }
3529
3529
  function S(b) {
3530
- const N = s.cards.filter((J) => J.id !== b), M = N[0], q = {
3530
+ const N = s.cards.filter((J) => J.id !== b), T = N[0], q = {
3531
3531
  ...s,
3532
3532
  cards: N,
3533
3533
  // update the active card to the first card in the frame
3534
- activeCardId: M.id
3534
+ activeCardId: T.id
3535
3535
  };
3536
- r(q), d(M.id), i(M);
3536
+ r(q), d(T.id), i(T);
3537
3537
  }
3538
3538
  function j(b) {
3539
3539
  d(b);
@@ -3543,9 +3543,9 @@ function da() {
3543
3543
  }, D = (b) => {
3544
3544
  b.preventDefault();
3545
3545
  }, k = (b, N) => {
3546
- const M = b.dataTransfer.getData("tabIndex");
3547
- if (M === N.toString()) return;
3548
- const q = Array.from(s.cards), [J] = q.splice(parseInt(M), 1);
3546
+ const T = b.dataTransfer.getData("tabIndex");
3547
+ if (T === N.toString()) return;
3548
+ const q = Array.from(s.cards), [J] = q.splice(parseInt(T), 1);
3549
3549
  q.splice(N, 0, J), r({ ...s, cards: q });
3550
3550
  };
3551
3551
  function C(b, N) {
@@ -3553,19 +3553,19 @@ function da() {
3553
3553
  "div",
3554
3554
  {
3555
3555
  onClick: () => {
3556
- const M = N.displayTab === void 0 ? !1 : !N.displayTab;
3557
- i({ ...N, displayTab: M }), o({
3556
+ const T = N.displayTab === void 0 ? !1 : !N.displayTab;
3557
+ i({ ...N, displayTab: T }), o({
3558
3558
  ...N,
3559
- displayTab: M
3559
+ displayTab: T
3560
3560
  });
3561
3561
  },
3562
- children: N.displayTab === !0 || N.displayTab === void 0 ? /* @__PURE__ */ e.jsx(on, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Pn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3562
+ children: N.displayTab === !0 || N.displayTab === void 0 ? /* @__PURE__ */ e.jsx(cn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx($n, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3563
3563
  }
3564
3564
  );
3565
3565
  }
3566
3566
  function E() {
3567
3567
  return /* @__PURE__ */ e.jsxs(
3568
- za,
3568
+ Oa,
3569
3569
  {
3570
3570
  onValueChange: j,
3571
3571
  value: s.activeCardId,
@@ -3577,16 +3577,16 @@ function da() {
3577
3577
  as,
3578
3578
  {
3579
3579
  text: b.tabTitle || b.title,
3580
- onSave: (M) => {
3581
- i({ ...t, tabTitle: M }), o({ ...t, tabTitle: M });
3580
+ onSave: (T) => {
3581
+ i({ ...t, tabTitle: T }), o({ ...t, tabTitle: T });
3582
3582
  },
3583
3583
  children: /* @__PURE__ */ e.jsxs(
3584
3584
  ts,
3585
3585
  {
3586
3586
  draggable: !0,
3587
- onDragStart: (M) => A(M, N),
3587
+ onDragStart: (T) => A(T, N),
3588
3588
  onDragOver: D,
3589
- onDrop: (M) => k(M, N),
3589
+ onDrop: (T) => k(T, N),
3590
3590
  className: "",
3591
3591
  value: b.id,
3592
3592
  children: [
@@ -3606,7 +3606,7 @@ function da() {
3606
3606
  b.id
3607
3607
  )),
3608
3608
  /* @__PURE__ */ e.jsx(
3609
- T,
3609
+ M,
3610
3610
  {
3611
3611
  className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
3612
3612
  variant: "outline",
@@ -3615,12 +3615,12 @@ function da() {
3615
3615
  }
3616
3616
  ),
3617
3617
  /* @__PURE__ */ e.jsx(
3618
- T,
3618
+ M,
3619
3619
  {
3620
3620
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
3621
3621
  variant: "outline",
3622
3622
  onClick: p,
3623
- children: /* @__PURE__ */ e.jsx(Rn, { className: "h-4 w-4" })
3623
+ children: /* @__PURE__ */ e.jsx(_n, { className: "h-4 w-4" })
3624
3624
  }
3625
3625
  )
3626
3626
  ] }) })
@@ -3629,18 +3629,18 @@ function da() {
3629
3629
  );
3630
3630
  }
3631
3631
  function R() {
3632
- return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(nn, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Ne, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3633
- ln,
3632
+ return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(ln, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Ne, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3633
+ rn,
3634
3634
  {
3635
3635
  isLoading: n,
3636
3636
  card: t,
3637
3637
  data: u == null ? void 0 : u.records
3638
3638
  }
3639
- ) }) }) }) : /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Oa, children: /* @__PURE__ */ e.jsx(Ua, { className: "grow border-none shadow-none" }) });
3639
+ ) }) }) }) : /* @__PURE__ */ e.jsx(hs, { FallbackComponent: za, children: /* @__PURE__ */ e.jsx(Ua, { className: "grow border-none shadow-none" }) });
3640
3640
  }
3641
3641
  function V() {
3642
- const b = JSON.stringify(u == null ? void 0 : u.records, null, 2), N = new Blob([b], { type: "application/json" }), M = URL.createObjectURL(N), q = document.createElement("a");
3643
- q.href = M, q.download = `${t.title}.json`, q.click();
3642
+ const b = JSON.stringify(u == null ? void 0 : u.records, null, 2), N = new Blob([b], { type: "application/json" }), T = URL.createObjectURL(N), q = document.createElement("a");
3643
+ q.href = T, q.download = `${t.title}.json`, q.click();
3644
3644
  }
3645
3645
  function y() {
3646
3646
  const N = [
@@ -3649,47 +3649,47 @@ function da() {
3649
3649
  ).join(","),
3650
3650
  ...((u == null ? void 0 : u.records) || []).map((B) => Object.values(B).join(","))
3651
3651
  ].join(`
3652
- `), M = new Blob([N], { type: "text/csv" }), q = URL.createObjectURL(M), J = document.createElement("a");
3652
+ `), T = new Blob([N], { type: "text/csv" }), q = URL.createObjectURL(T), J = document.createElement("a");
3653
3653
  J.href = q, J.download = `${t.title}.csv`, J.click();
3654
3654
  }
3655
3655
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
3656
3656
  (m || g) && /* @__PURE__ */ e.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e.jsx(Qe, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
3657
3657
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
3658
3658
  a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
3659
- /* @__PURE__ */ e.jsx(Gl, {}),
3660
- !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(Pl, {}),
3661
- /* @__PURE__ */ e.jsx(Wl, {})
3659
+ /* @__PURE__ */ e.jsx(Jl, {}),
3660
+ !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx($l, {}),
3661
+ /* @__PURE__ */ e.jsx(Kl, {})
3662
3662
  ] }),
3663
3663
  !a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-1", children: [
3664
3664
  /* @__PURE__ */ e.jsx(
3665
- T,
3665
+ M,
3666
3666
  {
3667
3667
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70",
3668
3668
  variant: "ghost",
3669
3669
  size: "icon",
3670
3670
  onClick: y,
3671
- children: /* @__PURE__ */ e.jsx($l, { className: "size-4" })
3671
+ children: /* @__PURE__ */ e.jsx(Bl, { className: "size-4" })
3672
3672
  }
3673
3673
  ),
3674
3674
  /* @__PURE__ */ e.jsx(
3675
- T,
3675
+ M,
3676
3676
  {
3677
3677
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70",
3678
3678
  variant: "ghost",
3679
3679
  size: "icon",
3680
3680
  onClick: V,
3681
- children: /* @__PURE__ */ e.jsx($n, { strokeWidth: 1.5, className: "size-4" })
3681
+ children: /* @__PURE__ */ e.jsx(Bn, { strokeWidth: 1.5, className: "size-4" })
3682
3682
  }
3683
3683
  ),
3684
3684
  /* @__PURE__ */ e.jsx(
3685
- tn,
3685
+ nn,
3686
3686
  {
3687
3687
  text: JSON.stringify(u == null ? void 0 : u.records, null, 2),
3688
3688
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70"
3689
3689
  }
3690
3690
  )
3691
3691
  ] }),
3692
- /* @__PURE__ */ e.jsx(Ql, {})
3692
+ /* @__PURE__ */ e.jsx(Zl, {})
3693
3693
  ] }),
3694
3694
  a ? E() : /* @__PURE__ */ e.jsxs(
3695
3695
  ls,
@@ -3706,7 +3706,7 @@ function da() {
3706
3706
  defaultSize: 30,
3707
3707
  minSize: 10,
3708
3708
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
3709
- children: l && /* @__PURE__ */ e.jsx(Kl, {})
3709
+ children: l && /* @__PURE__ */ e.jsx(Ql, {})
3710
3710
  }
3711
3711
  ),
3712
3712
  /* @__PURE__ */ e.jsx(rs, {})
@@ -3719,9 +3719,9 @@ function da() {
3719
3719
  minSize: 10,
3720
3720
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
3721
3721
  children: /* @__PURE__ */ e.jsxs(Ne, { className: "relative flex h-full min-h-0 w-full flex-1 basis-0", children: [
3722
- (u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(Al, { data: (u == null ? void 0 : u.records) || [] }),
3722
+ (u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(ql, { data: (u == null ? void 0 : u.records) || [] }),
3723
3723
  (v || (u == null ? void 0 : u.error)) && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: (v == null ? void 0 : v.message) || ((f = u == null ? void 0 : u.error) == null ? void 0 : f.message) }),
3724
- /* @__PURE__ */ e.jsx(Ke, { orientation: "horizontal" })
3724
+ /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
3725
3725
  ] })
3726
3726
  }
3727
3727
  )
@@ -3730,7 +3730,7 @@ function da() {
3730
3730
  )
3731
3731
  ] });
3732
3732
  }
3733
- function Kl() {
3733
+ function Ql() {
3734
3734
  const s = h((a) => a.pythonStdOut);
3735
3735
  if (!s) return null;
3736
3736
  const t = s.replace(/\n/g, "<br>");
@@ -3738,18 +3738,18 @@ function Kl() {
3738
3738
  /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex max-h-11 min-h-11 grow items-center border-b bg-muted px-3 font-mono text-xs font-semibold text-foreground/70", children: "Python Output" }),
3739
3739
  /* @__PURE__ */ e.jsxs(Ne, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
3740
3740
  /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: t } }),
3741
- /* @__PURE__ */ e.jsx(Ke, { orientation: "horizontal" })
3741
+ /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
3742
3742
  ] })
3743
3743
  ] });
3744
3744
  }
3745
- function Ql() {
3745
+ function Zl() {
3746
3746
  const s = h((a) => a.isShowingVisual), t = h(
3747
3747
  (a) => a.actions.setIsShowingVisual
3748
3748
  );
3749
3749
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3750
3750
  /* @__PURE__ */ e.jsx($, { htmlFor: "visualize", children: "Chart" }),
3751
3751
  /* @__PURE__ */ e.jsx(
3752
- rn,
3752
+ on,
3753
3753
  {
3754
3754
  checked: s,
3755
3755
  onCheckedChange: () => t(!s),
@@ -3759,7 +3759,7 @@ function Ql() {
3759
3759
  )
3760
3760
  ] });
3761
3761
  }
3762
- function Zl({
3762
+ function Xl({
3763
3763
  options: s,
3764
3764
  value: t,
3765
3765
  onValueChange: a
@@ -3799,7 +3799,7 @@ function fe({
3799
3799
  ] }) })
3800
3800
  ] });
3801
3801
  }
3802
- function Ue({
3802
+ function Ge({
3803
3803
  children: s,
3804
3804
  summary: t,
3805
3805
  open: a,
@@ -3813,14 +3813,14 @@ function Ue({
3813
3813
  children: [
3814
3814
  /* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
3815
3815
  /* @__PURE__ */ e.jsx($, { children: t }),
3816
- /* @__PURE__ */ e.jsx(cn, { className: "h-4 w-4" })
3816
+ /* @__PURE__ */ e.jsx(dn, { className: "h-4 w-4" })
3817
3817
  ] }),
3818
3818
  /* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
3819
3819
  ]
3820
3820
  }
3821
3821
  );
3822
3822
  }
3823
- function Xl() {
3823
+ function Yl() {
3824
3824
  var p, S;
3825
3825
  const s = h(
3826
3826
  (j) => j.card.customCardPreferences
@@ -3881,7 +3881,7 @@ function Xl() {
3881
3881
  return s ? j === "input" ? /* @__PURE__ */ e.jsx(
3882
3882
  de,
3883
3883
  {
3884
- className: `h-8 w-full ${$e}`,
3884
+ className: `h-8 w-full ${Be}`,
3885
3885
  value: ((k = s == null ? void 0 : s.settings) == null ? void 0 : k[A]) || "",
3886
3886
  onChange: (E) => {
3887
3887
  i({
@@ -3933,7 +3933,7 @@ function Xl() {
3933
3933
  {
3934
3934
  className: "p-6",
3935
3935
  children: [
3936
- /* @__PURE__ */ e.jsx(Ue, { summary: "Plugin Settings", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 text-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 text-sm", children: [
3936
+ /* @__PURE__ */ e.jsx(Ge, { summary: "Plugin Settings", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 text-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 text-sm", children: [
3937
3937
  /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
3938
3938
  fe,
3939
3939
  {
@@ -3951,7 +3951,7 @@ function Xl() {
3951
3951
  }
3952
3952
  ) }) }),
3953
3953
  ((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && /* @__PURE__ */ e.jsx(
3954
- Zl,
3954
+ Xl,
3955
3955
  {
3956
3956
  options: [
3957
3957
  { value: "single", label: "Single Visual" },
@@ -3985,8 +3985,8 @@ function Xl() {
3985
3985
  ) })
3986
3986
  ] }) })
3987
3987
  ] }) }) }),
3988
- /* @__PURE__ */ e.jsx(Oe, { className: "my-4" }),
3989
- ((S = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : S.componentName) && /* @__PURE__ */ e.jsxs(Ue, { summary: "Component Settings", children: [
3988
+ /* @__PURE__ */ e.jsx(ze, { className: "my-4" }),
3989
+ ((S = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : S.componentName) && /* @__PURE__ */ e.jsxs(Ge, { summary: "Component Settings", children: [
3990
3990
  u && u.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3991
3991
  /* @__PURE__ */ e.jsx($, { children: "Input Mapping" }),
3992
3992
  /* @__PURE__ */ e.jsx("div", { className: "px-2", children: g(u) })
@@ -4148,7 +4148,7 @@ function gs() {
4148
4148
  const es = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
4149
4149
  function ua(s, t) {
4150
4150
  var n, l, r;
4151
- const a = Ma(s, t);
4151
+ const a = Ta(s, t);
4152
4152
  return ((r = (l = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : l[a]) == null ? void 0 : r.type) || "linear";
4153
4153
  }
4154
4154
  function at() {
@@ -4159,7 +4159,7 @@ function at() {
4159
4159
  }), n = h((_) => {
4160
4160
  var F;
4161
4161
  return (F = _.card) == null ? void 0 : F.cfg;
4162
- }), l = Ma(a, n), [r, i] = H(
4162
+ }), l = Ta(a, n), [r, i] = H(
4163
4163
  ua(a)
4164
4164
  ), [o, d] = H(
4165
4165
  ((K = (W = (B = a == null ? void 0 : a.chartOptions) == null ? void 0 : B.scales) == null ? void 0 : W[l]) == null ? void 0 : K.min) || ""
@@ -4172,17 +4172,17 @@ function at() {
4172
4172
  return (F = _.card) == null ? void 0 : F.type;
4173
4173
  }), b = ["pie", "doughnut", "polarArea"].includes(f);
4174
4174
  te(() => {
4175
- var _, F, ie, ee, oe, ne, ae, he, O, L, G, Ce, qe, Me;
4175
+ var _, F, ie, ee, oe, ne, ae, he, z, L, G, Ce, qe, Te;
4176
4176
  i(ua(a)), d(
4177
4177
  ((ie = (F = (_ = a == null ? void 0 : a.chartOptions) == null ? void 0 : _.scales) == null ? void 0 : F[l]) == null ? void 0 : ie.min) === 0 ? 0 : ""
4178
4178
  ), m(((ne = (oe = (ee = a == null ? void 0 : a.chartOptions) == null ? void 0 : ee.scales) == null ? void 0 : oe[l]) == null ? void 0 : ne.max) || ""), x(
4179
- ((L = (O = (he = (ae = a == null ? void 0 : a.chartOptions) == null ? void 0 : ae.scales) == null ? void 0 : he[l]) == null ? void 0 : O.ticks) == null ? void 0 : L.stepSize) || ""
4180
- ), S(((G = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : G.decimalPlaces) || 0), A(((Ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ce.suffix) || ""), k(((qe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : qe.currency) || ""), E(((Me = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Me.locale) || "");
4179
+ ((L = (z = (he = (ae = a == null ? void 0 : a.chartOptions) == null ? void 0 : ae.scales) == null ? void 0 : he[l]) == null ? void 0 : z.ticks) == null ? void 0 : L.stepSize) || ""
4180
+ ), S(((G = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : G.decimalPlaces) || 0), A(((Ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ce.suffix) || ""), k(((qe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : qe.currency) || ""), E(((Te = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Te.locale) || "");
4181
4181
  }, [s, a, l]);
4182
4182
  function N(_, F) {
4183
4183
  return F === "" || /^[0-9\b]+$/.test(F) ? Number(F) : Number(_);
4184
4184
  }
4185
- function M() {
4185
+ function T() {
4186
4186
  const _ = [
4187
4187
  ...new Set(is.map((F) => F.currency))
4188
4188
  ];
@@ -4321,7 +4321,7 @@ function at() {
4321
4321
  V(ie);
4322
4322
  }
4323
4323
  return /* @__PURE__ */ e.jsxs(ms, { onOpenChange: (_) => t(_), children: [
4324
- /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(dn, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4324
+ /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(un, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4325
4325
  /* @__PURE__ */ e.jsx(ps, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4326
4326
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4327
4327
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
@@ -4372,10 +4372,10 @@ function at() {
4372
4372
  )
4373
4373
  ] }),
4374
4374
  g === "custom" && r == "linear" && q(),
4375
- M(),
4376
- /* @__PURE__ */ e.jsx(un, {}),
4375
+ T(),
4376
+ /* @__PURE__ */ e.jsx(hn, {}),
4377
4377
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
4378
- T,
4378
+ M,
4379
4379
  {
4380
4380
  onClick: J,
4381
4381
  variant: "secondary",
@@ -4387,7 +4387,7 @@ function at() {
4387
4387
  ] }) })
4388
4388
  ] });
4389
4389
  }
4390
- function Yl({ idx: s }) {
4390
+ function er({ idx: s }) {
4391
4391
  var o;
4392
4392
  const t = h((d) => {
4393
4393
  var u;
@@ -4401,7 +4401,7 @@ function Yl({ idx: s }) {
4401
4401
  (d) => d.actions.setCardPreferences
4402
4402
  ), l = (o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis, r = a == null ? void 0 : a.find((d) => d.idx === s);
4403
4403
  function i(d, u) {
4404
- (d === "end" || d === "start") && hn(mn());
4404
+ (d === "end" || d === "start") && mn(xn());
4405
4405
  const m = {
4406
4406
  display: d !== "none",
4407
4407
  align: d,
@@ -4432,10 +4432,10 @@ function Yl({ idx: s }) {
4432
4432
  }
4433
4433
  }
4434
4434
  return /* @__PURE__ */ e.jsxs(ms, { children: [
4435
- /* @__PURE__ */ e.jsx(xs, { children: /* @__PURE__ */ e.jsx(ll, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4435
+ /* @__PURE__ */ e.jsx(xs, { children: /* @__PURE__ */ e.jsx(rl, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4436
4436
  /* @__PURE__ */ e.jsx(ps, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4437
4437
  /* @__PURE__ */ e.jsx(
4438
- T,
4438
+ M,
4439
4439
  {
4440
4440
  onClick: () => i("none", s),
4441
4441
  size: "sm",
@@ -4445,14 +4445,14 @@ function Yl({ idx: s }) {
4445
4445
  }
4446
4446
  ),
4447
4447
  /* @__PURE__ */ e.jsx(
4448
- T,
4448
+ M,
4449
4449
  {
4450
4450
  onClick: () => i("start", s),
4451
4451
  size: "sm",
4452
4452
  variant: "secondary",
4453
4453
  className: "h-7 p-1 text-xs font-normal",
4454
4454
  children: /* @__PURE__ */ e.jsx(
4455
- Wn,
4455
+ Kn,
4456
4456
  {
4457
4457
  className: Y("h-4 w-4", {
4458
4458
  "rotate-90": l === "y"
@@ -4462,14 +4462,14 @@ function Yl({ idx: s }) {
4462
4462
  }
4463
4463
  ),
4464
4464
  /* @__PURE__ */ e.jsx(
4465
- T,
4465
+ M,
4466
4466
  {
4467
4467
  onClick: () => i("center", s),
4468
4468
  size: "sm",
4469
4469
  variant: "secondary",
4470
4470
  className: "h-7 p-1 text-xs font-normal",
4471
4471
  children: /* @__PURE__ */ e.jsx(
4472
- Qn,
4472
+ Zn,
4473
4473
  {
4474
4474
  className: Y("h-4 w-4", {
4475
4475
  "rotate-90": l === "y"
@@ -4479,14 +4479,14 @@ function Yl({ idx: s }) {
4479
4479
  }
4480
4480
  ),
4481
4481
  /* @__PURE__ */ e.jsx(
4482
- T,
4482
+ M,
4483
4483
  {
4484
4484
  onClick: () => i("end", s),
4485
4485
  size: "sm",
4486
4486
  variant: "secondary",
4487
4487
  className: "h-7 p-1 text-xs font-normal",
4488
4488
  children: /* @__PURE__ */ e.jsx(
4489
- Kn,
4489
+ Qn,
4490
4490
  {
4491
4491
  className: Y("h-4 w-4", {
4492
4492
  "rotate-90": l === "y"
@@ -4511,7 +4511,7 @@ function tt() {
4511
4511
  } = Cs((a == null ? void 0 : a.records) || []);
4512
4512
  let d = i;
4513
4513
  if (["stackedBar", "stackedLine"].includes(s.type)) {
4514
- const u = xn({
4514
+ const u = pn({
4515
4515
  dataArray: (a == null ? void 0 : a.records) || [],
4516
4516
  groupKey: o[0],
4517
4517
  pivotKey: o[1],
@@ -4522,18 +4522,21 @@ function tt() {
4522
4522
  return r.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
4523
4523
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4524
4524
  /* @__PURE__ */ e.jsx($, { children: n }),
4525
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-2 py-1 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { children: o[0] }) }) })
4525
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-3 py-2 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { title: o[0], children: nt(o[0]) }) }) })
4526
4526
  ] }),
4527
4527
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4528
4528
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
4529
4529
  /* @__PURE__ */ e.jsx($, { children: l }),
4530
4530
  /* @__PURE__ */ e.jsx(at, {})
4531
4531
  ] }),
4532
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((u, m) => /* @__PURE__ */ e.jsx(er, { col: u, idx: m }, u)) })
4532
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: d.map((u, m) => /* @__PURE__ */ e.jsx(sr, { col: u, idx: m }, u)) })
4533
4533
  ] })
4534
4534
  ] });
4535
4535
  }
4536
- function er({ col: s, idx: t }) {
4536
+ function nt(s, t = 30) {
4537
+ return s.length > t ? s.slice(0, t) + "..." : s;
4538
+ }
4539
+ function sr({ col: s, idx: t }) {
4537
4540
  const a = h((o) => {
4538
4541
  var d;
4539
4542
  return (d = o.card) == null ? void 0 : d.preferences;
@@ -4568,8 +4571,8 @@ function er({ col: s, idx: t }) {
4568
4571
  });
4569
4572
  }
4570
4573
  }
4571
- return /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center justify-between gap-5 rounded-md bg-muted/70 px-2 py-1 hover:bg-muted", children: [
4572
- /* @__PURE__ */ e.jsx("p", { children: s }),
4574
+ return /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center justify-between gap-5 rounded-md bg-muted/70 px-3 py-2 hover:bg-muted", children: [
4575
+ /* @__PURE__ */ e.jsx("p", { title: s, children: nt(s) }),
4573
4576
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
4574
4577
  /* @__PURE__ */ e.jsx(
4575
4578
  Ps,
@@ -4586,22 +4589,22 @@ function er({ col: s, idx: t }) {
4586
4589
  }
4587
4590
  ),
4588
4591
  /* @__PURE__ */ e.jsx(
4589
- An,
4592
+ qn,
4590
4593
  {
4591
4594
  onClick: () => i("area"),
4592
4595
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
4593
4596
  }
4594
4597
  ),
4595
- /* @__PURE__ */ e.jsx(Yl, { idx: t })
4598
+ /* @__PURE__ */ e.jsx(er, { idx: t })
4596
4599
  ] })
4597
4600
  ] });
4598
4601
  }
4599
- function nt() {
4600
- const s = h((c) => c.selectedConnectionId), t = h((c) => c.selectedDatamodelId), a = h((c) => c.selectedDatabaseName), n = h((c) => c.selectedSchemaName), l = h((c) => c.selectedTableName), r = z((c) => c.dashboard.filters) || [], i = z((c) => c.actions.addFilter), o = z((c) => c.actions.removeFilter), { removeFilterValues: d } = Ze(), { modelItems: u, tableName: m, connectionType: g } = Ve();
4602
+ function lt() {
4603
+ const s = h((c) => c.selectedConnectionId), t = h((c) => c.selectedDatamodelId), a = h((c) => c.selectedDatabaseName), n = h((c) => c.selectedSchemaName), l = h((c) => c.selectedTableName), r = O((c) => c.dashboard.filters) || [], i = O((c) => c.actions.addFilter), o = O((c) => c.actions.removeFilter), { removeFilterValues: d } = Ze(), { modelItems: u, tableName: m, connectionType: g } = Ve();
4601
4604
  function v(c, x = "dashboard") {
4602
4605
  var R;
4603
4606
  const p = pe(c.column_name), S = pe(a || ""), j = pe(n || ""), A = pe(m);
4604
- let D = pn(
4607
+ let D = fn(
4605
4608
  j,
4606
4609
  A,
4607
4610
  g
@@ -4616,7 +4619,7 @@ function nt() {
4616
4619
  if (E)
4617
4620
  d(E.id), o(E.id);
4618
4621
  else {
4619
- const V = Je();
4622
+ const V = We();
4620
4623
  return m === "api" && s ? (i({
4621
4624
  location: x,
4622
4625
  id: V,
@@ -4658,10 +4661,10 @@ function nt() {
4658
4661
  }
4659
4662
  return { assignFilter: v };
4660
4663
  }
4661
- function _e() {
4662
- const s = z(
4664
+ function He() {
4665
+ const s = O(
4663
4666
  (o) => o.dashboard.filters
4664
- ), t = h((o) => o.frame), { setFrame: a } = le(), { columns: n } = Ve(), { assignFilter: l } = nt();
4667
+ ), t = h((o) => o.frame), { setFrame: a } = le(), { columns: n } = Ve(), { assignFilter: l } = lt();
4665
4668
  function r(o) {
4666
4669
  const d = l(o, "frame");
4667
4670
  a({ ...t, filterId: d });
@@ -4669,11 +4672,11 @@ function _e() {
4669
4672
  const i = s == null ? void 0 : s.find((o) => o.id === t.filterId);
4670
4673
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
4671
4674
  /* @__PURE__ */ e.jsx($, { children: "Card Filter" }),
4672
- /* @__PURE__ */ e.jsx(sr, { onSelect: r, columns: n }),
4673
- i && /* @__PURE__ */ e.jsx(Ta, { filter: i })
4675
+ /* @__PURE__ */ e.jsx(ar, { onSelect: r, columns: n }),
4676
+ i && /* @__PURE__ */ e.jsx(Ma, { filter: i })
4674
4677
  ] });
4675
4678
  }
4676
- function sr({
4679
+ function ar({
4677
4680
  columns: s,
4678
4681
  onSelect: t
4679
4682
  }) {
@@ -4681,7 +4684,7 @@ function sr({
4681
4684
  const [a, n] = ra.useState(!1), [l, r] = ra.useState("");
4682
4685
  return /* @__PURE__ */ e.jsxs(ms, { open: a, onOpenChange: n, children: [
4683
4686
  /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4684
- T,
4687
+ M,
4685
4688
  {
4686
4689
  size: "sm",
4687
4690
  variant: "outline",
@@ -4690,16 +4693,16 @@ function sr({
4690
4693
  className: "w-full justify-between font-normal",
4691
4694
  children: [
4692
4695
  l ? (i = s.find((o) => o.column_name === l)) == null ? void 0 : i.column_name : "Select Column...",
4693
- /* @__PURE__ */ e.jsx(fn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4696
+ /* @__PURE__ */ e.jsx(gn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4694
4697
  ]
4695
4698
  }
4696
4699
  ) }),
4697
- /* @__PURE__ */ e.jsx(ps, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(gn, { children: [
4698
- /* @__PURE__ */ e.jsx(jn, { placeholder: "Search column", className: "h-9" }),
4699
- /* @__PURE__ */ e.jsxs(bn, { children: [
4700
- /* @__PURE__ */ e.jsx(vn, { children: "No framework found." }),
4701
- /* @__PURE__ */ e.jsx(yn, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
4702
- Nn,
4700
+ /* @__PURE__ */ e.jsx(ps, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(jn, { children: [
4701
+ /* @__PURE__ */ e.jsx(bn, { placeholder: "Search column", className: "h-9" }),
4702
+ /* @__PURE__ */ e.jsxs(vn, { children: [
4703
+ /* @__PURE__ */ e.jsx(yn, { children: "No framework found." }),
4704
+ /* @__PURE__ */ e.jsx(Nn, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
4705
+ Cn,
4703
4706
  {
4704
4707
  value: o.column_name,
4705
4708
  onSelect: (d) => {
@@ -4709,7 +4712,7 @@ function sr({
4709
4712
  children: [
4710
4713
  o.column_name,
4711
4714
  /* @__PURE__ */ e.jsx(
4712
- Cn,
4715
+ Sn,
4713
4716
  {
4714
4717
  className: Y(
4715
4718
  "ml-auto h-4 w-4",
@@ -4725,7 +4728,7 @@ function sr({
4725
4728
  ] }) })
4726
4729
  ] });
4727
4730
  }
4728
- function ar({
4731
+ function tr({
4729
4732
  cardType: s
4730
4733
  }) {
4731
4734
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ee, { defaultValue: ["item-2"], type: "multiple", children: [
@@ -4765,7 +4768,7 @@ function ar({
4765
4768
  /* @__PURE__ */ e.jsx(Z, { children: "Filters" }),
4766
4769
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
4767
4770
  /* @__PURE__ */ e.jsx(Ae, {}),
4768
- /* @__PURE__ */ e.jsx(_e, {})
4771
+ /* @__PURE__ */ e.jsx(He, {})
4769
4772
  ] })
4770
4773
  ] })
4771
4774
  ] }) });
@@ -4821,7 +4824,7 @@ function Js() {
4821
4824
  )
4822
4825
  ] });
4823
4826
  }
4824
- function tr({
4827
+ function nr({
4825
4828
  cardType: s
4826
4829
  }) {
4827
4830
  function t(a) {
@@ -4863,12 +4866,12 @@ function tr({
4863
4866
  /* @__PURE__ */ e.jsx(Z, { children: "Filters" }),
4864
4867
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
4865
4868
  /* @__PURE__ */ e.jsx(Ae, {}),
4866
- /* @__PURE__ */ e.jsx(_e, {})
4869
+ /* @__PURE__ */ e.jsx(He, {})
4867
4870
  ] })
4868
4871
  ] })
4869
4872
  ] }) });
4870
4873
  }
4871
- const nr = {
4874
+ const lr = {
4872
4875
  datasets: [
4873
4876
  {
4874
4877
  type: "line",
@@ -4881,7 +4884,7 @@ const nr = {
4881
4884
  data: []
4882
4885
  }
4883
4886
  ]
4884
- }, lr = {
4887
+ }, rr = {
4885
4888
  datasets: [
4886
4889
  {
4887
4890
  fill: "origin",
@@ -4891,7 +4894,7 @@ const nr = {
4891
4894
  }
4892
4895
  ]
4893
4896
  };
4894
- function rr() {
4897
+ function ir() {
4895
4898
  const s = h((t) => t.card.type);
4896
4899
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
4897
4900
  /* @__PURE__ */ e.jsx(
@@ -4900,18 +4903,18 @@ function rr() {
4900
4903
  className: " ",
4901
4904
  type: "single",
4902
4905
  collapsible: !0,
4903
- children: ir(s)
4906
+ children: or(s)
4904
4907
  }
4905
4908
  ),
4906
4909
  /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(gs, {}) }),
4907
4910
  !["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
4908
4911
  /* @__PURE__ */ e.jsx(Js, {}),
4909
4912
  /* @__PURE__ */ e.jsx(Ae, {}),
4910
- /* @__PURE__ */ e.jsx(_e, {})
4913
+ /* @__PURE__ */ e.jsx(He, {})
4911
4914
  ] })
4912
4915
  ] });
4913
4916
  }
4914
- function ir(s) {
4917
+ function or(s) {
4915
4918
  if (["line", "bar"].includes(s))
4916
4919
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
4917
4920
  /* @__PURE__ */ e.jsxs(Q, { value: "item-1", children: [
@@ -4932,7 +4935,7 @@ function ir(s) {
4932
4935
  /* @__PURE__ */ e.jsx("b", { children: "Customize" }),
4933
4936
  " and change the `type` property in the dataset."
4934
4937
  ] }),
4935
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(nr, null, 2) })
4938
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(lr, null, 2) })
4936
4939
  ] })
4937
4940
  ] }),
4938
4941
  /* @__PURE__ */ e.jsxs(Q, { value: "item-3", children: [
@@ -4953,7 +4956,7 @@ function ir(s) {
4953
4956
  ),
4954
4957
  "for more options."
4955
4958
  ] }),
4956
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(lr, null, 2) })
4959
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(rr, null, 2) })
4957
4960
  ] })
4958
4961
  ] })
4959
4962
  ] });
@@ -5008,7 +5011,7 @@ function ir(s) {
5008
5011
  ] })
5009
5012
  ] }) });
5010
5013
  }
5011
- function or() {
5014
+ function cr() {
5012
5015
  var d, u, m, g, v;
5013
5016
  const s = h((c) => c.card.preferences), t = h(
5014
5017
  (c) => c.actions.setCardPreferences
@@ -5163,9 +5166,9 @@ function or() {
5163
5166
  ] })
5164
5167
  ] })
5165
5168
  ] }) }),
5166
- /* @__PURE__ */ e.jsx(Oe, { className: "my-3" }),
5169
+ /* @__PURE__ */ e.jsx(ze, { className: "my-3" }),
5167
5170
  /* @__PURE__ */ e.jsx(
5168
- Sn,
5171
+ wn,
5169
5172
  {
5170
5173
  colorRanges: r,
5171
5174
  setColorRanges: i
@@ -5174,7 +5177,7 @@ function or() {
5174
5177
  ] })
5175
5178
  ] });
5176
5179
  }
5177
- function cr() {
5180
+ function dr() {
5178
5181
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
5179
5182
  /* @__PURE__ */ e.jsx(Ee, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(Q, { value: "item-1", children: [
5180
5183
  /* @__PURE__ */ e.jsx(Z, { className: "", children: "KPI Query" }),
@@ -5200,12 +5203,12 @@ function cr() {
5200
5203
  ] })
5201
5204
  ] })
5202
5205
  ] }) }),
5203
- /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(or, {}) }),
5206
+ /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(cr, {}) }),
5204
5207
  /* @__PURE__ */ e.jsx("div", {}),
5205
5208
  /* @__PURE__ */ e.jsx("div", {})
5206
5209
  ] });
5207
5210
  }
5208
- const dr = [
5211
+ const ur = [
5209
5212
  {
5210
5213
  label: "Mercator",
5211
5214
  value: "mercator"
@@ -5262,7 +5265,7 @@ const dr = [
5262
5265
  label: "Natural Earth 1",
5263
5266
  value: "naturalEarth1"
5264
5267
  }
5265
- ], ur = [
5268
+ ], hr = [
5266
5269
  "blues",
5267
5270
  "brBG",
5268
5271
  "buGn",
@@ -5301,11 +5304,11 @@ const dr = [
5301
5304
  "ylGnBu",
5302
5305
  "ylOrBr",
5303
5306
  "ylOrRd"
5304
- ], hr = ur.map((s) => ({
5307
+ ], mr = hr.map((s) => ({
5305
5308
  label: s,
5306
5309
  value: s
5307
5310
  }));
5308
- function mr() {
5311
+ function xr() {
5309
5312
  var d, u, m, g, v, c, x, p, S, j, A, D, k, C, E, R, V, y;
5310
5313
  const s = h((f) => f.card), t = (u = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [a, n] = H(
5311
5314
  ((g = (m = s == null ? void 0 : s.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : g.customTopoJsonUrl) || ""
@@ -5327,9 +5330,9 @@ function mr() {
5327
5330
  }
5328
5331
  ];
5329
5332
  return /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
5330
- /* @__PURE__ */ e.jsx(Ue, { summary: "Map Query", children: /* @__PURE__ */ e.jsx("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
5331
- /* @__PURE__ */ e.jsx(Oe, { className: "my-4" }),
5332
- /* @__PURE__ */ e.jsx(Ue, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
5333
+ /* @__PURE__ */ e.jsx(Ge, { summary: "Map Query", children: /* @__PURE__ */ e.jsx("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
5334
+ /* @__PURE__ */ e.jsx(ze, { className: "my-4" }),
5335
+ /* @__PURE__ */ e.jsx(Ge, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
5333
5336
  /* @__PURE__ */ e.jsx(
5334
5337
  fe,
5335
5338
  {
@@ -5365,7 +5368,7 @@ function mr() {
5365
5368
  });
5366
5369
  },
5367
5370
  value: a,
5368
- className: `h-9 w-full ${$e}`,
5371
+ className: `h-9 w-full ${Be}`,
5369
5372
  placeholder: "Custom URL"
5370
5373
  }
5371
5374
  ),
@@ -5398,7 +5401,7 @@ function mr() {
5398
5401
  fe,
5399
5402
  {
5400
5403
  className: "h-9",
5401
- options: dr,
5404
+ options: ur,
5402
5405
  value: ((p = (x = s.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : p.projection) || "",
5403
5406
  label: "Projection",
5404
5407
  onValueChange: (f) => {
@@ -5420,7 +5423,7 @@ function mr() {
5420
5423
  fe,
5421
5424
  {
5422
5425
  className: "h-9",
5423
- options: hr,
5426
+ options: mr,
5424
5427
  value: ((j = (S = s.preferences) == null ? void 0 : S.mapVisualOptions) == null ? void 0 : j.colorScale) || "",
5425
5428
  label: "Select Color Scale",
5426
5429
  onValueChange: (f) => {
@@ -5438,12 +5441,12 @@ function mr() {
5438
5441
  ] })
5439
5442
  ] })
5440
5443
  ] }) }),
5441
- /* @__PURE__ */ e.jsx(Oe, { className: "my-4" }),
5442
- /* @__PURE__ */ e.jsx(Ue, { className: "", summary: "Scale Options", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
5444
+ /* @__PURE__ */ e.jsx(ze, { className: "my-4" }),
5445
+ /* @__PURE__ */ e.jsx(Ge, { className: "", summary: "Scale Options", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
5443
5446
  /* @__PURE__ */ e.jsx(
5444
5447
  de,
5445
5448
  {
5446
- className: `h-9 w-full ${$e}`,
5449
+ className: `h-9 w-full ${Be}`,
5447
5450
  type: "number",
5448
5451
  step: 0.1,
5449
5452
  value: ((D = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : D.projectionScale) || 1,
@@ -5463,19 +5466,19 @@ function mr() {
5463
5466
  /* @__PURE__ */ e.jsx(
5464
5467
  de,
5465
5468
  {
5466
- className: `h-9 w-full ${$e}`,
5469
+ className: `h-9 w-full ${Be}`,
5467
5470
  type: "number",
5468
5471
  step: 10,
5469
5472
  value: ((E = (C = (k = s.preferences) == null ? void 0 : k.mapVisualOptions) == null ? void 0 : C.projectionOffset) == null ? void 0 : E[0]) || 0,
5470
5473
  onChange: (f) => {
5471
- var b, N, M, q;
5474
+ var b, N, T, q;
5472
5475
  l({
5473
5476
  ...s.preferences,
5474
5477
  mapVisualOptions: {
5475
5478
  ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5476
5479
  projectionOffset: [
5477
5480
  Number(f.target.value),
5478
- ((q = (M = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : M.projectionOffset) == null ? void 0 : q[1]) || 0
5481
+ ((q = (T = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : T.projectionOffset) == null ? void 0 : q[1]) || 0
5479
5482
  ]
5480
5483
  }
5481
5484
  });
@@ -5486,18 +5489,18 @@ function mr() {
5486
5489
  /* @__PURE__ */ e.jsx(
5487
5490
  de,
5488
5491
  {
5489
- className: `h-9 w-full ${$e}`,
5492
+ className: `h-9 w-full ${Be}`,
5490
5493
  type: "number",
5491
5494
  step: 10,
5492
5495
  value: ((y = (V = (R = s.preferences) == null ? void 0 : R.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : y[1]) || 0,
5493
5496
  onChange: (f) => {
5494
- var b, N, M, q;
5497
+ var b, N, T, q;
5495
5498
  l({
5496
5499
  ...s.preferences,
5497
5500
  mapVisualOptions: {
5498
5501
  ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5499
5502
  projectionOffset: [
5500
- ((q = (M = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : M.projectionOffset) == null ? void 0 : q[0]) || 0,
5503
+ ((q = (T = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : T.projectionOffset) == null ? void 0 : q[0]) || 0,
5501
5504
  Number(f.target.value)
5502
5505
  ]
5503
5506
  }
@@ -5506,11 +5509,11 @@ function mr() {
5506
5509
  }
5507
5510
  )
5508
5511
  ] }) }),
5509
- /* @__PURE__ */ e.jsx(Oe, { className: "my-4" }),
5512
+ /* @__PURE__ */ e.jsx(ze, { className: "my-4" }),
5510
5513
  /* @__PURE__ */ e.jsx(Ae, {})
5511
5514
  ] });
5512
5515
  }
5513
- function xr() {
5516
+ function pr() {
5514
5517
  var n;
5515
5518
  const s = h((l) => l.card.preferences), { setCardPreferences: t } = h((l) => l.actions);
5516
5519
  function a(l) {
@@ -5578,19 +5581,19 @@ function ss({
5578
5581
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
5579
5582
  s === "range" && /* @__PURE__ */ e.jsx(gs, {}),
5580
5583
  s !== "text" && /* @__PURE__ */ e.jsx(Js, {}),
5581
- s === "text" && /* @__PURE__ */ e.jsx(xr, {})
5584
+ s === "text" && /* @__PURE__ */ e.jsx(pr, {})
5582
5585
  ] })
5583
5586
  ] }),
5584
5587
  !["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(Q, { value: "item-3", children: [
5585
5588
  /* @__PURE__ */ e.jsx(Z, { children: "Filters" }),
5586
5589
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
5587
5590
  /* @__PURE__ */ e.jsx(Ae, {}),
5588
- /* @__PURE__ */ e.jsx(_e, {})
5591
+ /* @__PURE__ */ e.jsx(He, {})
5589
5592
  ] })
5590
5593
  ] })
5591
5594
  ] }) });
5592
5595
  }
5593
- function pr() {
5596
+ function fr() {
5594
5597
  const s = h(
5595
5598
  (n) => {
5596
5599
  var l, r;
@@ -5665,12 +5668,12 @@ function pr() {
5665
5668
  /* @__PURE__ */ e.jsx(Z, { children: "Filters" }),
5666
5669
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
5667
5670
  /* @__PURE__ */ e.jsx(Ae, {}),
5668
- /* @__PURE__ */ e.jsx(_e, {})
5671
+ /* @__PURE__ */ e.jsx(He, {})
5669
5672
  ] })
5670
5673
  ] })
5671
5674
  ] }) });
5672
5675
  }
5673
- function fr({}) {
5676
+ function gr({}) {
5674
5677
  const s = h((n) => {
5675
5678
  var l;
5676
5679
  return (l = n.card) == null ? void 0 : l.preferences;
@@ -5687,7 +5690,7 @@ function fr({}) {
5687
5690
  /* @__PURE__ */ e.jsx(Z, { children: "Filters" }),
5688
5691
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
5689
5692
  /* @__PURE__ */ e.jsx(Ae, {}),
5690
- /* @__PURE__ */ e.jsx(_e, {})
5693
+ /* @__PURE__ */ e.jsx(He, {})
5691
5694
  ] })
5692
5695
  ] }) }),
5693
5696
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
@@ -5703,7 +5706,7 @@ function fr({}) {
5703
5706
  ] })
5704
5707
  ] });
5705
5708
  }
5706
- const gr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5709
+ const jr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5707
5710
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
5708
5711
  /* @__PURE__ */ e.jsxs("div", { children: [
5709
5712
  "See ",
@@ -5719,7 +5722,7 @@ const gr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5719
5722
  ),
5720
5723
  " in the docs."
5721
5724
  ] })
5722
- ] }), jr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5725
+ ] }), br = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5723
5726
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
5724
5727
  /* @__PURE__ */ e.jsxs("div", { children: [
5725
5728
  "See ",
@@ -5735,7 +5738,7 @@ const gr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5735
5738
  ),
5736
5739
  " in the docs."
5737
5740
  ] })
5738
- ] }), br = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5741
+ ] }), vr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5739
5742
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
5740
5743
  /* @__PURE__ */ e.jsxs("div", { children: [
5741
5744
  "See ",
@@ -5752,22 +5755,22 @@ const gr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5752
5755
  " in the docs."
5753
5756
  ] })
5754
5757
  ] });
5755
- function vr() {
5758
+ function yr() {
5756
5759
  const s = h((a) => a.card.type);
5757
5760
  function t(a) {
5758
5761
  switch (a) {
5759
5762
  case "stackedBar":
5760
5763
  case "stackedLine":
5761
- return /* @__PURE__ */ e.jsx(pr, {});
5764
+ return /* @__PURE__ */ e.jsx(fr, {});
5762
5765
  case "pyramid":
5763
- return /* @__PURE__ */ e.jsx(ss, { docContent: gr, cardType: a });
5766
+ return /* @__PURE__ */ e.jsx(ss, { docContent: jr, cardType: a });
5764
5767
  case "kpi":
5765
- return /* @__PURE__ */ e.jsx(cr, {});
5768
+ return /* @__PURE__ */ e.jsx(dr, {});
5766
5769
  case "line":
5767
5770
  case "bar":
5768
- return /* @__PURE__ */ e.jsx(ar, { cardType: a });
5771
+ return /* @__PURE__ */ e.jsx(tr, { cardType: a });
5769
5772
  case "range":
5770
- return /* @__PURE__ */ e.jsx(ss, { docContent: jr, cardType: a });
5773
+ return /* @__PURE__ */ e.jsx(ss, { docContent: br, cardType: a });
5771
5774
  case "pie":
5772
5775
  case "doughnut":
5773
5776
  case "polarArea":
@@ -5775,29 +5778,32 @@ function vr() {
5775
5778
  return /* @__PURE__ */ e.jsx(ss, { cardType: a });
5776
5779
  case "bubble":
5777
5780
  case "scatter":
5778
- return /* @__PURE__ */ e.jsx(tr, { cardType: a });
5781
+ return /* @__PURE__ */ e.jsx(nr, { cardType: a });
5779
5782
  case "table":
5780
- return /* @__PURE__ */ e.jsx(fr, { cardType: a });
5783
+ return /* @__PURE__ */ e.jsx(gr, { cardType: a });
5781
5784
  case "text":
5782
5785
  return /* @__PURE__ */ e.jsx(
5783
5786
  ss,
5784
5787
  {
5785
- docContent: br,
5788
+ docContent: vr,
5786
5789
  cardType: a,
5787
5790
  suffix: "Visual"
5788
5791
  }
5789
5792
  );
5790
5793
  case "map":
5791
- return /* @__PURE__ */ e.jsx(mr, {});
5794
+ return /* @__PURE__ */ e.jsx(xr, {});
5792
5795
  case "custom":
5793
- return /* @__PURE__ */ e.jsx(Xl, {});
5796
+ return /* @__PURE__ */ e.jsx(Yl, {});
5794
5797
  default:
5795
- return /* @__PURE__ */ e.jsx(rr, {});
5798
+ return /* @__PURE__ */ e.jsx(ir, {});
5796
5799
  }
5797
5800
  }
5798
- return /* @__PURE__ */ e.jsx(Ne, { className: "h-full w-full text-sm", children: t(s) });
5801
+ return /* @__PURE__ */ e.jsxs(Ne, { className: "h-full w-full text-sm", children: [
5802
+ t(s),
5803
+ /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
5804
+ ] });
5799
5805
  }
5800
- function yr() {
5806
+ function Nr() {
5801
5807
  const s = h((t) => t.isShowingVisual);
5802
5808
  return /* @__PURE__ */ e.jsxs(
5803
5809
  ls,
@@ -5812,7 +5818,7 @@ function yr() {
5812
5818
  className: "flex",
5813
5819
  minSize: 20,
5814
5820
  defaultSize: 40,
5815
- children: /* @__PURE__ */ e.jsx(Vl, {})
5821
+ children: /* @__PURE__ */ e.jsx(Al, {})
5816
5822
  }
5817
5823
  ),
5818
5824
  /* @__PURE__ */ e.jsx(rs, { withHandle: !0, className: "border" }),
@@ -5831,7 +5837,7 @@ function yr() {
5831
5837
  minSize: 20,
5832
5838
  defaultSize: 25,
5833
5839
  maxSize: 30,
5834
- children: /* @__PURE__ */ e.jsx(vr, {})
5840
+ children: /* @__PURE__ */ e.jsx(yr, {})
5835
5841
  }
5836
5842
  ) }),
5837
5843
  /* @__PURE__ */ e.jsx(rs, { className: "border" }),
@@ -5843,15 +5849,15 @@ function yr() {
5843
5849
  }
5844
5850
  );
5845
5851
  }
5846
- function Nr({ authToken: s, onSave: t, onClose: a }) {
5847
- z((i) => i.themeStyle);
5848
- const n = h((i) => i.actions.setOnSave), l = h((i) => i.actions.setOnClose), r = z((i) => i.actions.setAuthToken);
5852
+ function Cr({ authToken: s, onSave: t, onClose: a }) {
5853
+ O((i) => i.themeStyle);
5854
+ const n = h((i) => i.actions.setOnSave), l = h((i) => i.actions.setOnClose), r = O((i) => i.actions.setAuthToken);
5849
5855
  return te(() => {
5850
5856
  t && n(t), a && l(a);
5851
5857
  }, [t, n, a, l]), te(() => {
5852
5858
  s && s.accessToken && r(s);
5853
5859
  }, [s, r]), /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Da, children: /* @__PURE__ */ e.jsxs(
5854
- wn,
5860
+ kn,
5855
5861
  {
5856
5862
  style: {
5857
5863
  // borderRadius: currentStyle?.chart?.options?.borderRadius,
@@ -5860,15 +5866,15 @@ function Nr({ authToken: s, onSave: t, onClose: a }) {
5860
5866
  className: "rounded-none",
5861
5867
  role: "editor-panel",
5862
5868
  children: [
5863
- /* @__PURE__ */ e.jsx(kn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Ha, {}) }),
5864
- /* @__PURE__ */ e.jsx(On, { children: /* @__PURE__ */ e.jsx(yr, {}) })
5869
+ /* @__PURE__ */ e.jsx(zn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Ha, {}) }),
5870
+ /* @__PURE__ */ e.jsx(On, { children: /* @__PURE__ */ e.jsx(Nr, {}) })
5865
5871
  ]
5866
5872
  }
5867
5873
  ) });
5868
5874
  }
5869
- function Cr() {
5870
- z((i) => i.selectedCardId);
5871
- const s = z((i) => i.selectedSheetId), { setIsVisualEditing: t } = z((i) => i.actions), a = z((i) => i.isVisualEditing), n = z((i) => i.actions.updateFrame);
5875
+ function Sr() {
5876
+ O((i) => i.selectedCardId);
5877
+ const s = O((i) => i.selectedSheetId), { setIsVisualEditing: t } = O((i) => i.actions), a = O((i) => i.isVisualEditing), n = O((i) => i.actions.updateFrame);
5872
5878
  function l(i) {
5873
5879
  s && (n(s, i), t(!1));
5874
5880
  }
@@ -5882,12 +5888,12 @@ function Cr() {
5882
5888
  className: Y("flex grow", {
5883
5889
  "max-h-0 overflow-hidden": !a
5884
5890
  }),
5885
- children: /* @__PURE__ */ e.jsx(Nr, { onSave: l, onClose: r })
5891
+ children: /* @__PURE__ */ e.jsx(Cr, { onSave: l, onClose: r })
5886
5892
  }
5887
5893
  );
5888
5894
  }
5889
- function Sr() {
5890
- const s = h((r) => r.selectedDatabaseName), t = h((r) => r.selectedTableName), a = z((r) => r.dashboard.filters) || [], { columns: n } = Ve(), { assignFilter: l } = nt();
5895
+ function wr() {
5896
+ const s = h((r) => r.selectedDatabaseName), t = h((r) => r.selectedTableName), a = O((r) => r.dashboard.filters) || [], { columns: n } = Ve(), { assignFilter: l } = lt();
5891
5897
  return /* @__PURE__ */ e.jsx(Ne, { className: "flex-1 basis-0 flex-col px-3", children: n == null ? void 0 : n.map((r) => {
5892
5898
  const i = a == null ? void 0 : a.find(
5893
5899
  (o) => o.column === pe(r.column_name) && o.table === t && o.database === s
@@ -5911,21 +5917,21 @@ function Sr() {
5911
5917
  );
5912
5918
  }) });
5913
5919
  }
5914
- function wr() {
5915
- z((t) => t.showFilters);
5916
- const s = z(
5920
+ function kr() {
5921
+ O((t) => t.showFilters);
5922
+ const s = O(
5917
5923
  (t) => t.actions.setShowFilters
5918
5924
  );
5919
5925
  return /* @__PURE__ */ e.jsxs("section", { className: "relative flex min-w-[320px] grow flex-col border-l px-1", children: [
5920
5926
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
5921
5927
  /* @__PURE__ */ e.jsx($, { className: "px-2 text-lg", children: "Filters" }),
5922
5928
  /* @__PURE__ */ e.jsx(
5923
- T,
5929
+ M,
5924
5930
  {
5925
5931
  onClick: () => s(!1),
5926
5932
  className: "h-7 w-7 p-0",
5927
5933
  variant: "ghost",
5928
- children: /* @__PURE__ */ e.jsx(Ge, {})
5934
+ children: /* @__PURE__ */ e.jsx(Je, {})
5929
5935
  }
5930
5936
  )
5931
5937
  ] }),
@@ -5935,7 +5941,7 @@ function wr() {
5935
5941
  ColumnsComponent: () => (
5936
5942
  // schemaName, tableName, columns
5937
5943
  /* @__PURE__ */ e.jsx(
5938
- Sr,
5944
+ wr,
5939
5945
  {}
5940
5946
  )
5941
5947
  )
@@ -5943,8 +5949,8 @@ function wr() {
5943
5949
  ) })
5944
5950
  ] });
5945
5951
  }
5946
- function kr() {
5947
- const s = z((n) => n.dashboard.filters), t = z((n) => n.theme), a = s == null ? void 0 : s.filter((n) => n.hide);
5952
+ function zr() {
5953
+ const s = O((n) => n.dashboard.filters), t = O((n) => n.theme), a = s == null ? void 0 : s.filter((n) => n.hide);
5948
5954
  return a != null && a.length ? /* @__PURE__ */ e.jsx(
5949
5955
  "div",
5950
5956
  {
@@ -5957,7 +5963,7 @@ function kr() {
5957
5963
  {
5958
5964
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
5959
5965
  children: [
5960
- /* @__PURE__ */ e.jsx(Ta, { filter: n }),
5966
+ /* @__PURE__ */ e.jsx(Ma, { filter: n }),
5961
5967
  /* @__PURE__ */ e.jsx(ka, { filter: n })
5962
5968
  ]
5963
5969
  },
@@ -5967,7 +5973,7 @@ function kr() {
5967
5973
  ) : null;
5968
5974
  }
5969
5975
  function Or() {
5970
- const s = z((n) => n.showFilters), t = z((n) => n.isVisualEditing), a = z(
5976
+ const s = O((n) => n.showFilters), t = O((n) => n.isVisualEditing), a = O(
5971
5977
  (n) => n.isDashboardEditing
5972
5978
  );
5973
5979
  return /* @__PURE__ */ e.jsxs(
@@ -5982,18 +5988,18 @@ function Or() {
5982
5988
  }),
5983
5989
  children: [
5984
5990
  /* @__PURE__ */ e.jsxs("section", { className: "flex grow flex-col", children: [
5985
- a && /* @__PURE__ */ e.jsx(kr, {}),
5986
- /* @__PURE__ */ e.jsx(zn, {})
5991
+ a && /* @__PURE__ */ e.jsx(zr, {}),
5992
+ /* @__PURE__ */ e.jsx(In, {})
5987
5993
  ] }),
5988
- s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(wr, {}) })
5994
+ s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(kr, {}) })
5989
5995
  ]
5990
5996
  }
5991
5997
  );
5992
5998
  }
5993
- function zr() {
5994
- const s = z((l) => l.dashboard), t = z((l) => l.actions.setDashboard), a = z(
5999
+ function Ir() {
6000
+ const s = O((l) => l.dashboard), t = O((l) => l.actions.setDashboard), a = O(
5995
6001
  (l) => l.showDashboardJSON
5996
- ), n = z(
6002
+ ), n = O(
5997
6003
  (l) => l.actions.setShowDashboardJSON
5998
6004
  );
5999
6005
  return /* @__PURE__ */ e.jsxs(
@@ -6004,7 +6010,7 @@ function zr() {
6004
6010
  }),
6005
6011
  children: [
6006
6012
  /* @__PURE__ */ e.jsxs(
6007
- T,
6013
+ M,
6008
6014
  {
6009
6015
  variant: "secondary",
6010
6016
  size: "sm",
@@ -6017,7 +6023,7 @@ function zr() {
6017
6023
  }
6018
6024
  ),
6019
6025
  /* @__PURE__ */ e.jsx(
6020
- In,
6026
+ Tn,
6021
6027
  {
6022
6028
  onChange: (l) => {
6023
6029
  if (l)
@@ -6049,18 +6055,18 @@ function zr() {
6049
6055
  }
6050
6056
  );
6051
6057
  }
6052
- function Dr({
6058
+ function Fr({
6053
6059
  showControls: s = !1,
6054
6060
  showFooter: t = !0,
6055
6061
  ...a
6056
6062
  }) {
6057
6063
  return /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Da, children: /* @__PURE__ */ e.jsxs(Mn, { dashboardProps: a, children: [
6058
- /* @__PURE__ */ e.jsx(Tn, {}),
6059
- /* @__PURE__ */ e.jsxs(Dn, { children: [
6060
- /* @__PURE__ */ e.jsx(zr, {}),
6061
- /* @__PURE__ */ e.jsxs(Fn, { ...a, children: [
6062
- s && /* @__PURE__ */ e.jsx(fl, {}),
6063
- /* @__PURE__ */ e.jsx(Cr, {}),
6064
+ /* @__PURE__ */ e.jsx(Dn, {}),
6065
+ /* @__PURE__ */ e.jsxs(Fn, { children: [
6066
+ /* @__PURE__ */ e.jsx(Ir, {}),
6067
+ /* @__PURE__ */ e.jsxs(Ln, { ...a, children: [
6068
+ s && /* @__PURE__ */ e.jsx(gl, {}),
6069
+ /* @__PURE__ */ e.jsx(Sr, {}),
6064
6070
  /* @__PURE__ */ e.jsx(Or, {})
6065
6071
  ] })
6066
6072
  ] })
@@ -6068,47 +6074,47 @@ function Dr({
6068
6074
  }
6069
6075
  export {
6070
6076
  Ve as A,
6071
- En as B,
6072
- An as C,
6073
- Dr as D,
6077
+ Vn as B,
6078
+ qn as C,
6079
+ Fr as D,
6074
6080
  Bs as E,
6075
- $n as F,
6076
- Bn as G,
6077
- Un as H,
6078
- Pe as I,
6081
+ Bn as F,
6082
+ Un as G,
6083
+ Gn as H,
6084
+ $e as I,
6079
6085
  Ra as J,
6080
- ol as K,
6081
- Wn as L,
6086
+ cl as K,
6087
+ Kn as L,
6082
6088
  Aa as M,
6083
- Xn as N,
6084
- Yn as P,
6085
- el as R,
6086
- sl as S,
6089
+ Yn as N,
6090
+ el as P,
6091
+ sl as R,
6092
+ al as S,
6087
6093
  Us as T,
6088
- Vn as a,
6094
+ An as a,
6089
6095
  Ps as b,
6090
6096
  $s as c,
6091
6097
  La as d,
6092
6098
  Ea as e,
6093
6099
  Va as f,
6094
- qn as g,
6095
- Rn as h,
6096
- _n as i,
6097
- Hn as j,
6098
- Pn as k,
6099
- Gn as l,
6100
- Jn as m,
6101
- Kn as n,
6102
- Qn as o,
6100
+ Rn as g,
6101
+ _n as h,
6102
+ Hn as i,
6103
+ Pn as j,
6104
+ $n as k,
6105
+ Jn as l,
6106
+ Wn as m,
6107
+ Qn as n,
6108
+ Zn as o,
6103
6109
  Qe as p,
6104
- Zn as q,
6110
+ Xn as q,
6105
6111
  qa as r,
6106
- al as s,
6107
- tl as t,
6108
- nl as u,
6109
- ll as v,
6110
- rl as w,
6111
- il as x,
6112
+ tl as s,
6113
+ nl as t,
6114
+ ll as u,
6115
+ rl as v,
6116
+ il as w,
6117
+ ol as x,
6112
6118
  Gs as y,
6113
- xl as z
6119
+ pl as z
6114
6120
  };