react-semaphor 0.0.441 → 0.0.442

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { c as A, p as nn, u as _, a as rt, b as Ve, d as jn, e as Bn, B as ee, P as mt, f as Pn, g as Hn, h as Gn, i as Un, L as U, I as he, j as $n, k as Qn, l as Kn, m as X, n as Jn, o as Wn, q as Yn, r as ks, s as On, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as Zn, F as Je, G as We, H as It, J as ze, K as sn, M as Ot, N as rn, O as Tt, Q as Le, R as Xn, U as zt, V as ea, W as Ae, X as Tn, Y as Re, Z as f, _ as ta, $ as nt, a0 as bt, a1 as Ds, a2 as na, a3 as aa, a4 as sa, a5 as ra, a6 as ia, a7 as la, a8 as oa, a9 as ca, aa as da, ab as ua, ac as ma, ad as ha, ae as xe, af as Is, ag as Se, ah as $e, ai as we, aj as Os, ak as Ts, al as zs, am as vt, an as Ee, ao as As, ap as xt, aq as Fs, ar as W, as as Ls, at as Es, au as _s, av as Jt, aw as pa, ax as ln, ay as At, az as Qe, aA as fa, aB as Ct, aC as ge, aD as Vs, aE as qs, aF as it, aG as Rs, aH as js, aI as Bs, aJ as ga, aK as Ps, aL as Ft, aM as Hs, aN as Gs, aO as Us, aP as zn, aQ as $s, aR as Qs, aS as on, aT as Ce, aU as Ks, aV as Wt, aW as je, aX as pe, aY as Be, aZ as Js, a_ as Ws, a$ as Ys, b0 as Zs, b1 as Xs, b2 as Rt, b3 as er, b4 as An, b5 as tr, b6 as Fn, b7 as nr, b8 as ar, b9 as sr, ba as rr, bb as ya, bc as ir, bd as cn, be as ba, bf as lr, bg as or, bh as et, bi as cr, bj as dr, bk as va, bl as ur, bm as mr, bn as hr, bo as pr, bp as fr, bq as Lt, br as xa, bs as gr, bt as dn, bu as un, bv as tt, bw as yt, bx as yr, by as br, bz as vr, bA as mn, bB as Ca, bC as Na, bD as Nt, bE as xr, bF as St, bG as Sa, bH as wa, bI as ka, bJ as Cr, bK as Nr, bL as Sr, bM as wr, bN as qe, bO as le, bP as oe, bQ as ce, bR as hn, bS as kr, bT as Mr, bU as Dr, bV as Ir, bW as Ln, bX as Ma, bY as Or, bZ as Tr, b_ as zr, b$ as Ar, c0 as pn, c1 as Da, c2 as Ia, c3 as fn, c4 as Fr, c5 as Oa, c6 as Lr, c7 as Er, c8 as _r, c9 as Vr, ca as qr, cb as Rr, cc as jr, cd as Br, ce as Pr, cf as jt, cg as Ta, ch as Hr, ci as Gr, cj as Ur, ck as $r, cl as Qr, cm as Kr, cn as Jr } from "./chunks/index-CVGp1HR6.js";
2
- import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-CVGp1HR6.js";
1
+ import { c as A, p as nn, u as _, a as rt, b as Ve, d as jn, e as Bn, B as ee, P as mt, f as Pn, g as Hn, h as Gn, i as Un, L as U, I as he, j as $n, k as Qn, l as Kn, m as X, n as Jn, o as Wn, q as Yn, r as ks, s as On, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as Zn, F as Je, G as We, H as It, J as ze, K as sn, M as Ot, N as rn, O as Tt, Q as Le, R as Xn, U as zt, V as ea, W as Ae, X as Tn, Y as Re, Z as f, _ as ta, $ as nt, a0 as bt, a1 as Ds, a2 as na, a3 as aa, a4 as sa, a5 as ra, a6 as la, a7 as ia, a8 as oa, a9 as ca, aa as da, ab as ua, ac as ma, ad as ha, ae as xe, af as Is, ag as Se, ah as $e, ai as we, aj as Os, ak as Ts, al as zs, am as vt, an as Ee, ao as As, ap as xt, aq as Fs, ar as W, as as Ls, at as Es, au as _s, av as Jt, aw as pa, ax as ln, ay as At, az as Qe, aA as fa, aB as Ct, aC as ge, aD as Vs, aE as qs, aF as lt, aG as Rs, aH as js, aI as Bs, aJ as ga, aK as Ps, aL as Ft, aM as Hs, aN as Gs, aO as Us, aP as zn, aQ as $s, aR as Qs, aS as on, aT as Ce, aU as Ks, aV as Wt, aW as je, aX as pe, aY as Be, aZ as Js, a_ as Ws, a$ as Ys, b0 as Zs, b1 as Xs, b2 as Rt, b3 as er, b4 as An, b5 as tr, b6 as Fn, b7 as nr, b8 as ar, b9 as sr, ba as rr, bb as ya, bc as lr, bd as cn, be as ba, bf as ir, bg as or, bh as et, bi as cr, bj as dr, bk as va, bl as ur, bm as mr, bn as hr, bo as pr, bp as fr, bq as Lt, br as xa, bs as gr, bt as dn, bu as un, bv as tt, bw as yt, bx as yr, by as br, bz as vr, bA as mn, bB as Ca, bC as Na, bD as Nt, bE as xr, bF as St, bG as Sa, bH as wa, bI as ka, bJ as Cr, bK as Nr, bL as Sr, bM as wr, bN as qe, bO as ie, bP as oe, bQ as ce, bR as hn, bS as kr, bT as Mr, bU as Dr, bV as Ir, bW as Ln, bX as Ma, bY as Or, bZ as Tr, b_ as zr, b$ as Ar, c0 as pn, c1 as Da, c2 as Ia, c3 as fn, c4 as Fr, c5 as Oa, c6 as Lr, c7 as Er, c8 as _r, c9 as Vr, ca as qr, cb as Rr, cc as jr, cd as Br, ce as Pr, cf as jt, cg as Ta, ch as Hr, ci as Gr, cj as Ur, ck as $r, cl as Qr, cm as Kr, cn as Jr } from "./chunks/index-DOmtfIhq.js";
2
+ import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-DOmtfIhq.js";
3
3
  import { jsxs as r, jsx as e, Fragment as ae } from "react/jsx-runtime";
4
4
  import * as Xe from "react";
5
5
  import _e, { useState as J, useMemo as Pe, useEffect as me, useRef as at, useCallback as za, Suspense as Wr } from "react";
@@ -43,7 +43,7 @@ const Xr = A("AlignRight", [
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
45
  */
46
- const ei = A("ArrowDown10", [
46
+ const el = A("ArrowDown10", [
47
47
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
48
48
  ["path", { d: "M7 20V4", key: "1yoxec" }],
49
49
  ["path", { d: "M17 10V4h-2", key: "zcsr5x" }],
@@ -56,7 +56,7 @@ const ei = A("ArrowDown10", [
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
58
  */
59
- const ti = A("ArrowDownZA", [
59
+ const tl = A("ArrowDownZA", [
60
60
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
61
61
  ["path", { d: "M7 4v16", key: "1glfcx" }],
62
62
  ["path", { d: "M15 4h5l-5 6h5", key: "8asdl1" }],
@@ -79,7 +79,7 @@ const Aa = A("ArrowDown", [
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
81
  */
82
- const ni = A("ArrowLeftRight", [
82
+ const nl = A("ArrowLeftRight", [
83
83
  ["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
84
84
  ["path", { d: "M4 7h16", key: "6tx8e3" }],
85
85
  ["path", { d: "m16 21 4-4-4-4", key: "siv7j2" }],
@@ -91,7 +91,7 @@ const ni = A("ArrowLeftRight", [
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
93
  */
94
- const ai = A("ArrowLeft", [
94
+ const al = A("ArrowLeft", [
95
95
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
96
96
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
97
97
  ]);
@@ -101,7 +101,7 @@ const ai = A("ArrowLeft", [
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
103
  */
104
- const si = A("ArrowRight", [
104
+ const sl = A("ArrowRight", [
105
105
  ["path", { d: "M5 12h14", key: "1ays0h" }],
106
106
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
107
107
  ]);
@@ -111,7 +111,7 @@ const si = A("ArrowRight", [
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
113
  */
114
- const ri = A("ArrowUp01", [
114
+ const rl = A("ArrowUp01", [
115
115
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
116
116
  ["path", { d: "M7 4v16", key: "1glfcx" }],
117
117
  ["rect", { x: "15", y: "4", width: "4", height: "6", ry: "2", key: "1bwicg" }],
@@ -124,7 +124,7 @@ const ri = A("ArrowUp01", [
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
126
  */
127
- const ii = A("ArrowUpAZ", [
127
+ const ll = A("ArrowUpAZ", [
128
128
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
129
129
  ["path", { d: "M7 4v16", key: "1glfcx" }],
130
130
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
@@ -137,7 +137,7 @@ const ii = A("ArrowUpAZ", [
137
137
  * This source code is licensed under the ISC license.
138
138
  * See the LICENSE file in the root directory of this source tree.
139
139
  */
140
- const li = A("Blocks", [
140
+ const il = A("Blocks", [
141
141
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
142
142
  [
143
143
  "path",
@@ -153,7 +153,7 @@ const li = A("Blocks", [
153
153
  * This source code is licensed under the ISC license.
154
154
  * See the LICENSE file in the root directory of this source tree.
155
155
  */
156
- const oi = A("BookOpenText", [
156
+ const ol = A("BookOpenText", [
157
157
  ["path", { d: "M12 7v14", key: "1akyts" }],
158
158
  ["path", { d: "M16 12h2", key: "7q9ll5" }],
159
159
  ["path", { d: "M16 8h2", key: "msurwy" }],
@@ -173,7 +173,7 @@ const oi = A("BookOpenText", [
173
173
  * This source code is licensed under the ISC license.
174
174
  * See the LICENSE file in the root directory of this source tree.
175
175
  */
176
- const ci = A("BookType", [
176
+ const cl = A("BookType", [
177
177
  ["path", { d: "M10 13h4", key: "ytezjc" }],
178
178
  ["path", { d: "M12 6v7", key: "1f6ttz" }],
179
179
  ["path", { d: "M16 8V6H8v2", key: "x8j6u4" }],
@@ -191,7 +191,7 @@ const ci = A("BookType", [
191
191
  * This source code is licensed under the ISC license.
192
192
  * See the LICENSE file in the root directory of this source tree.
193
193
  */
194
- const di = A("Box", [
194
+ const dl = A("Box", [
195
195
  [
196
196
  "path",
197
197
  {
@@ -208,7 +208,7 @@ const di = A("Box", [
208
208
  * This source code is licensed under the ISC license.
209
209
  * See the LICENSE file in the root directory of this source tree.
210
210
  */
211
- const ui = A("Braces", [
211
+ const ul = A("Braces", [
212
212
  [
213
213
  "path",
214
214
  { 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" }
@@ -227,7 +227,7 @@ const ui = A("Braces", [
227
227
  * This source code is licensed under the ISC license.
228
228
  * See the LICENSE file in the root directory of this source tree.
229
229
  */
230
- const mi = A("ChartArea", [
230
+ const ml = A("ChartArea", [
231
231
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
232
232
  [
233
233
  "path",
@@ -319,7 +319,7 @@ const _a = A("ChartScatter", [
319
319
  * This source code is licensed under the ISC license.
320
320
  * See the LICENSE file in the root directory of this source tree.
321
321
  */
322
- const hi = A("CircleArrowRight", [
322
+ const hl = A("CircleArrowRight", [
323
323
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
324
324
  ["path", { d: "M8 12h8", key: "1wcyev" }],
325
325
  ["path", { d: "m12 16 4-4-4-4", key: "1i9zcv" }]
@@ -341,7 +341,7 @@ const Va = A("CircleX", [
341
341
  * This source code is licensed under the ISC license.
342
342
  * See the LICENSE file in the root directory of this source tree.
343
343
  */
344
- const pi = A("Clock", [
344
+ const pl = A("Clock", [
345
345
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
346
346
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
347
347
  ]);
@@ -351,7 +351,7 @@ const pi = A("Clock", [
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 fi = A("Columns3", [
354
+ const fl = A("Columns3", [
355
355
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
356
356
  ["path", { d: "M9 3v18", key: "fh3hqa" }],
357
357
  ["path", { d: "M15 3v18", key: "14nvp0" }]
@@ -362,7 +362,7 @@ const fi = A("Columns3", [
362
362
  * This source code is licensed under the ISC license.
363
363
  * See the LICENSE file in the root directory of this source tree.
364
364
  */
365
- const gi = A("Component", [
365
+ const gl = A("Component", [
366
366
  [
367
367
  "path",
368
368
  {
@@ -398,7 +398,7 @@ const gi = A("Component", [
398
398
  * This source code is licensed under the ISC license.
399
399
  * See the LICENSE file in the root directory of this source tree.
400
400
  */
401
- const yi = A("CopyPlus", [
401
+ const yl = A("CopyPlus", [
402
402
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
403
403
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
404
404
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -410,7 +410,7 @@ const yi = A("CopyPlus", [
410
410
  * This source code is licensed under the ISC license.
411
411
  * See the LICENSE file in the root directory of this source tree.
412
412
  */
413
- const bi = A("Database", [
413
+ const bl = A("Database", [
414
414
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
415
415
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
416
416
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -421,7 +421,7 @@ const bi = A("Database", [
421
421
  * This source code is licensed under the ISC license.
422
422
  * See the LICENSE file in the root directory of this source tree.
423
423
  */
424
- const vi = A("DollarSign", [
424
+ const vl = A("DollarSign", [
425
425
  ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
426
426
  ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
427
427
  ]);
@@ -458,7 +458,7 @@ const Ra = A("EllipsisVertical", [
458
458
  * This source code is licensed under the ISC license.
459
459
  * See the LICENSE file in the root directory of this source tree.
460
460
  */
461
- const xi = A("Eraser", [
461
+ const xl = A("Eraser", [
462
462
  [
463
463
  "path",
464
464
  {
@@ -487,7 +487,7 @@ const ja = A("Expand", [
487
487
  * This source code is licensed under the ISC license.
488
488
  * See the LICENSE file in the root directory of this source tree.
489
489
  */
490
- const Ci = A("EyeClosed", [
490
+ const Cl = A("EyeClosed", [
491
491
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
492
492
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
493
493
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -500,7 +500,7 @@ const Ci = A("EyeClosed", [
500
500
  * This source code is licensed under the ISC license.
501
501
  * See the LICENSE file in the root directory of this source tree.
502
502
  */
503
- const Ni = A("FileCode2", [
503
+ const Nl = A("FileCode2", [
504
504
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
505
505
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
506
506
  ["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
@@ -512,7 +512,7 @@ const Ni = A("FileCode2", [
512
512
  * This source code is licensed under the ISC license.
513
513
  * See the LICENSE file in the root directory of this source tree.
514
514
  */
515
- const Si = A("FileJson2", [
515
+ const Sl = A("FileJson2", [
516
516
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
517
517
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
518
518
  [
@@ -539,7 +539,7 @@ const Ba = A("Filter", [
539
539
  * This source code is licensed under the ISC license.
540
540
  * See the LICENSE file in the root directory of this source tree.
541
541
  */
542
- const wi = A("Fingerprint", [
542
+ const wl = A("Fingerprint", [
543
543
  ["path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4", key: "1nerag" }],
544
544
  ["path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88", key: "o46ks0" }],
545
545
  ["path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02", key: "ptglia" }],
@@ -556,7 +556,7 @@ const wi = A("Fingerprint", [
556
556
  * This source code is licensed under the ISC license.
557
557
  * See the LICENSE file in the root directory of this source tree.
558
558
  */
559
- const ki = A("Glasses", [
559
+ const kl = A("Glasses", [
560
560
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
561
561
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
562
562
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -569,7 +569,7 @@ const ki = A("Glasses", [
569
569
  * This source code is licensed under the ISC license.
570
570
  * See the LICENSE file in the root directory of this source tree.
571
571
  */
572
- const Mi = A("Grid3x3", [
572
+ const Ml = A("Grid3x3", [
573
573
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
574
574
  ["path", { d: "M3 9h18", key: "1pudct" }],
575
575
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -582,7 +582,7 @@ const Mi = A("Grid3x3", [
582
582
  * This source code is licensed under the ISC license.
583
583
  * See the LICENSE file in the root directory of this source tree.
584
584
  */
585
- const Di = A("Hammer", [
585
+ const Dl = A("Hammer", [
586
586
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
587
587
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
588
588
  [
@@ -611,7 +611,7 @@ const Pa = A("Hash", [
611
611
  * This source code is licensed under the ISC license.
612
612
  * See the LICENSE file in the root directory of this source tree.
613
613
  */
614
- const Ii = A("House", [
614
+ const Il = A("House", [
615
615
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
616
616
  [
617
617
  "path",
@@ -627,7 +627,7 @@ const Ii = A("House", [
627
627
  * This source code is licensed under the ISC license.
628
628
  * See the LICENSE file in the root directory of this source tree.
629
629
  */
630
- const Oi = A("LayoutList", [
630
+ const Ol = A("LayoutList", [
631
631
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
632
632
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
633
633
  ["path", { d: "M14 4h7", key: "3xa0d5" }],
@@ -641,7 +641,7 @@ const Oi = A("LayoutList", [
641
641
  * This source code is licensed under the ISC license.
642
642
  * See the LICENSE file in the root directory of this source tree.
643
643
  */
644
- const Ti = A("ListEnd", [
644
+ const Tl = A("ListEnd", [
645
645
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
646
646
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
647
647
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -654,7 +654,7 @@ const Ti = A("ListEnd", [
654
654
  * This source code is licensed under the ISC license.
655
655
  * See the LICENSE file in the root directory of this source tree.
656
656
  */
657
- const zi = A("ListStart", [
657
+ const zl = A("ListStart", [
658
658
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
659
659
  ["path", { d: "M16 18H3", key: "12xzn7" }],
660
660
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -667,7 +667,7 @@ const zi = A("ListStart", [
667
667
  * This source code is licensed under the ISC license.
668
668
  * See the LICENSE file in the root directory of this source tree.
669
669
  */
670
- const Ai = A("ListX", [
670
+ const Al = A("ListX", [
671
671
  ["path", { d: "M11 12H3", key: "51ecnj" }],
672
672
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
673
673
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -689,7 +689,7 @@ const Ke = A("LoaderCircle", [
689
689
  * This source code is licensed under the ISC license.
690
690
  * See the LICENSE file in the root directory of this source tree.
691
691
  */
692
- const Fi = A("Logs", [
692
+ const Fl = A("Logs", [
693
693
  ["path", { d: "M13 12h8", key: "h98zly" }],
694
694
  ["path", { d: "M13 18h8", key: "oe0vm4" }],
695
695
  ["path", { d: "M13 6h8", key: "15sg57" }],
@@ -706,7 +706,7 @@ const Fi = A("Logs", [
706
706
  * This source code is licensed under the ISC license.
707
707
  * See the LICENSE file in the root directory of this source tree.
708
708
  */
709
- const Li = A("Mail", [
709
+ const Ll = A("Mail", [
710
710
  ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
711
711
  ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
712
712
  ]);
@@ -733,7 +733,7 @@ const Ha = A("Map", [
733
733
  * This source code is licensed under the ISC license.
734
734
  * See the LICENSE file in the root directory of this source tree.
735
735
  */
736
- const Ei = A("MessageCircleMore", [
736
+ const El = A("MessageCircleMore", [
737
737
  ["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
738
738
  ["path", { d: "M8 12h.01", key: "czm47f" }],
739
739
  ["path", { d: "M12 12h.01", key: "1mp3jc" }],
@@ -745,7 +745,7 @@ const Ei = A("MessageCircleMore", [
745
745
  * This source code is licensed under the ISC license.
746
746
  * See the LICENSE file in the root directory of this source tree.
747
747
  */
748
- const _i = A("MoveHorizontal", [
748
+ const _l = A("MoveHorizontal", [
749
749
  ["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
750
750
  ["path", { d: "M2 12h20", key: "9i4pu4" }],
751
751
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
@@ -756,7 +756,7 @@ const _i = A("MoveHorizontal", [
756
756
  * This source code is licensed under the ISC license.
757
757
  * See the LICENSE file in the root directory of this source tree.
758
758
  */
759
- const Vi = A("MoveVertical", [
759
+ const Vl = A("MoveVertical", [
760
760
  ["path", { d: "M12 2v20", key: "t6zp3m" }],
761
761
  ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
762
762
  ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
@@ -767,7 +767,7 @@ const Vi = A("MoveVertical", [
767
767
  * This source code is licensed under the ISC license.
768
768
  * See the LICENSE file in the root directory of this source tree.
769
769
  */
770
- const qi = A("Network", [
770
+ const ql = A("Network", [
771
771
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
772
772
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
773
773
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -780,7 +780,7 @@ const qi = A("Network", [
780
780
  * This source code is licensed under the ISC license.
781
781
  * See the LICENSE file in the root directory of this source tree.
782
782
  */
783
- const Ri = A("Plug", [
783
+ const Rl = A("Plug", [
784
784
  ["path", { d: "M12 22v-5", key: "1ega77" }],
785
785
  ["path", { d: "M9 8V2", key: "14iosj" }],
786
786
  ["path", { d: "M15 8V2", key: "18g5xt" }],
@@ -820,7 +820,7 @@ const Ua = A("RefreshCw", [
820
820
  * This source code is licensed under the ISC license.
821
821
  * See the LICENSE file in the root directory of this source tree.
822
822
  */
823
- const ji = A("Rows3", [
823
+ const jl = A("Rows3", [
824
824
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
825
825
  ["path", { d: "M21 9H3", key: "1338ky" }],
826
826
  ["path", { d: "M21 15H3", key: "9uk58r" }]
@@ -831,7 +831,7 @@ const ji = A("Rows3", [
831
831
  * This source code is licensed under the ISC license.
832
832
  * See the LICENSE file in the root directory of this source tree.
833
833
  */
834
- const Bi = A("Save", [
834
+ const Bl = A("Save", [
835
835
  [
836
836
  "path",
837
837
  {
@@ -865,7 +865,7 @@ const $a = A("Shapes", [
865
865
  * This source code is licensed under the ISC license.
866
866
  * See the LICENSE file in the root directory of this source tree.
867
867
  */
868
- const Pi = A("ShieldQuestion", [
868
+ const Pl = A("ShieldQuestion", [
869
869
  [
870
870
  "path",
871
871
  {
@@ -882,7 +882,7 @@ const Pi = A("ShieldQuestion", [
882
882
  * This source code is licensed under the ISC license.
883
883
  * See the LICENSE file in the root directory of this source tree.
884
884
  */
885
- const Hi = A("Shrink", [
885
+ const Hl = A("Shrink", [
886
886
  ["path", { d: "m15 15 6 6m-6-6v4.8m0-4.8h4.8", key: "17vawe" }],
887
887
  ["path", { d: "M9 19.8V15m0 0H4.2M9 15l-6 6", key: "chjx8e" }],
888
888
  ["path", { d: "M15 4.2V9m0 0h4.8M15 9l6-6", key: "lav6yq" }],
@@ -909,7 +909,7 @@ const Qa = A("Sigma", [
909
909
  * This source code is licensed under the ISC license.
910
910
  * See the LICENSE file in the root directory of this source tree.
911
911
  */
912
- const Gi = A("Square", [
912
+ const Gl = A("Square", [
913
913
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
914
914
  ]);
915
915
  /**
@@ -933,7 +933,7 @@ const bn = A("Table2", [
933
933
  * This source code is licensed under the ISC license.
934
934
  * See the LICENSE file in the root directory of this source tree.
935
935
  */
936
- const Ui = A("Tag", [
936
+ const Ul = A("Tag", [
937
937
  [
938
938
  "path",
939
939
  {
@@ -949,7 +949,7 @@ const Ui = A("Tag", [
949
949
  * This source code is licensed under the ISC license.
950
950
  * See the LICENSE file in the root directory of this source tree.
951
951
  */
952
- const $i = A("ToggleLeft", [
952
+ const $l = A("ToggleLeft", [
953
953
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
954
954
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
955
955
  ]);
@@ -972,7 +972,7 @@ const Ka = A("Tornado", [
972
972
  * This source code is licensed under the ISC license.
973
973
  * See the LICENSE file in the root directory of this source tree.
974
974
  */
975
- const Qi = A("Trash2", [
975
+ const Ql = A("Trash2", [
976
976
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
977
977
  ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
978
978
  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
@@ -998,18 +998,18 @@ function Wa(t) {
998
998
  var s;
999
999
  return {
1000
1000
  ...n,
1001
- frames: (s = n.frames) == null ? void 0 : s.map((i) => {
1001
+ frames: (s = n.frames) == null ? void 0 : s.map((l) => {
1002
1002
  var o;
1003
1003
  return {
1004
- ...i,
1005
- cards: (o = i.cards) == null ? void 0 : o.map((l) => Ki(l))
1004
+ ...l,
1005
+ cards: (o = l.cards) == null ? void 0 : o.map((i) => Kl(i))
1006
1006
  };
1007
1007
  })
1008
1008
  };
1009
1009
  })
1010
1010
  };
1011
1011
  }
1012
- function Ki(t) {
1012
+ function Kl(t) {
1013
1013
  return {
1014
1014
  ...t,
1015
1015
  // cfg: {
@@ -1025,12 +1025,12 @@ function Ki(t) {
1025
1025
  // }),
1026
1026
  // },
1027
1027
  // },
1028
- customCfg: Ji(t.customCfg),
1028
+ customCfg: Jl(t.customCfg),
1029
1029
  // if customCfg is present, clean it, otherwise return null{
1030
1030
  data: []
1031
1031
  };
1032
1032
  }
1033
- function Ji(t) {
1033
+ function Jl(t) {
1034
1034
  var a, n;
1035
1035
  return t ? {
1036
1036
  ...t,
@@ -1044,13 +1044,13 @@ function Ji(t) {
1044
1044
  }
1045
1045
  } : null;
1046
1046
  }
1047
- async function Wi(t, a, n, s) {
1047
+ async function Wl(t, a, n, s) {
1048
1048
  if (!s)
1049
1049
  return null;
1050
- const i = JSON.stringify(a);
1050
+ const l = JSON.stringify(a);
1051
1051
  return await nn("https://semaphor.cloud/api/v1/lens", s, {
1052
1052
  name: t,
1053
- template: i,
1053
+ template: l,
1054
1054
  filterValues: n,
1055
1055
  operation: "create"
1056
1056
  });
@@ -1058,35 +1058,35 @@ async function Wi(t, a, n, s) {
1058
1058
  async function Yt(t, a) {
1059
1059
  if (!a)
1060
1060
  return null;
1061
- const { id: n, template: s, filterValues: i, isDefault: o, shared: l } = t;
1061
+ const { id: n, template: s, filterValues: l, isDefault: o, shared: i } = t;
1062
1062
  return await nn("https://semaphor.cloud/api/v1/lens", a, {
1063
1063
  lensId: n,
1064
1064
  template: s,
1065
- filterValues: i,
1065
+ filterValues: l,
1066
1066
  isDefault: o,
1067
- shared: l,
1067
+ shared: i,
1068
1068
  operation: "update"
1069
1069
  });
1070
1070
  }
1071
- async function Yi(t, a) {
1071
+ async function Yl(t, a) {
1072
1072
  return a ? await nn("https://semaphor.cloud/api/v1/lens", a, {
1073
1073
  operation: "delete",
1074
1074
  lensId: t
1075
1075
  }) : null;
1076
1076
  }
1077
- function Zi() {
1078
- const [t, a] = J(""), [n, s] = J(!1), i = _((p) => p.lenses), { setLenses: o, setSelectedLensId: l } = rt(), [u, c] = J(!1), [h, d] = J(!1), y = _((p) => p.dashboard), x = _((p) => p.filterValues), { authToken: m } = Ve();
1077
+ function Zl() {
1078
+ const [t, a] = J(""), [n, s] = J(!1), l = _((p) => p.lenses), { setLenses: o, setSelectedLensId: i } = rt(), [u, c] = J(!1), [h, d] = J(!1), y = _((p) => p.dashboard), x = _((p) => p.filterValues), { authToken: m } = Ve();
1079
1079
  async function C() {
1080
1080
  c(!0);
1081
1081
  const p = Wa(
1082
1082
  y
1083
- ), v = await Wi(
1083
+ ), v = await Wl(
1084
1084
  t,
1085
1085
  p,
1086
1086
  x,
1087
1087
  m == null ? void 0 : m.accessToken
1088
1088
  );
1089
- v && (o([...i || [], v]), l(v.id), d(!1)), c(!1);
1089
+ v && (o([...l || [], v]), i(v.id), d(!1)), c(!1);
1090
1090
  }
1091
1091
  return /* @__PURE__ */ r(jn, { open: h, onOpenChange: d, children: [
1092
1092
  /* @__PURE__ */ e(Bn, { asChild: !0, children: /* @__PURE__ */ r(
@@ -1135,15 +1135,15 @@ function Zi() {
1135
1135
  ] })
1136
1136
  ] });
1137
1137
  }
1138
- function Xi() {
1139
- const [t, a] = J(!1), n = _((d) => d.lenses), s = _((d) => d.selectedLensId), { setLenses: i, setSelectedLensId: o } = rt(), { authToken: l } = Ve();
1138
+ function Xl() {
1139
+ const [t, a] = J(!1), n = _((d) => d.lenses), s = _((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: o } = rt(), { authToken: i } = Ve();
1140
1140
  async function u(d) {
1141
1141
  o(d);
1142
1142
  }
1143
1143
  async function c(d) {
1144
- if (await Yi(d, l == null ? void 0 : l.accessToken)) {
1144
+ if (await Yl(d, i == null ? void 0 : i.accessToken)) {
1145
1145
  const x = n == null ? void 0 : n.filter((m) => m.id !== d);
1146
- i(x || []), o("original");
1146
+ l(x || []), o("original");
1147
1147
  }
1148
1148
  }
1149
1149
  async function h(d) {
@@ -1154,23 +1154,23 @@ function Xi() {
1154
1154
  ...C,
1155
1155
  isDefault: !1
1156
1156
  });
1157
- i(y || []);
1157
+ l(y || []);
1158
1158
  const x = {
1159
1159
  ...d,
1160
1160
  isDefault: !d.isDefault
1161
1161
  };
1162
- await Yt(x, l == null ? void 0 : l.accessToken);
1162
+ await Yt(x, i == null ? void 0 : i.accessToken);
1163
1163
  const m = n == null ? void 0 : n.find((C) => C.isDefault);
1164
1164
  if (m && m.id !== d.id) {
1165
1165
  const C = {
1166
1166
  ...m,
1167
1167
  isDefault: !1
1168
1168
  };
1169
- await Yt(C, l == null ? void 0 : l.accessToken);
1169
+ await Yt(C, i == null ? void 0 : i.accessToken);
1170
1170
  }
1171
1171
  }
1172
1172
  return /* @__PURE__ */ r(Qn, { open: t, onOpenChange: a, children: [
1173
- /* @__PURE__ */ e(Kn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ki, { className: "h-4 w-4" }) }) }),
1173
+ /* @__PURE__ */ e(Kn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(kl, { className: "h-4 w-4" }) }) }),
1174
1174
  /* @__PURE__ */ r(Jn, { align: "end", className: "w-60", children: [
1175
1175
  /* @__PURE__ */ e(Wn, { className: "px-3", children: "Lenses" }),
1176
1176
  /* @__PURE__ */ e(Yn, {}),
@@ -1190,7 +1190,7 @@ function Xi() {
1190
1190
  /* @__PURE__ */ e("p", { children: d.name }),
1191
1191
  /* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
1192
1192
  /* @__PURE__ */ e(
1193
- Ii,
1193
+ Il,
1194
1194
  {
1195
1195
  onClick: (y) => {
1196
1196
  y.preventDefault(), h(d);
@@ -1228,22 +1228,22 @@ function Xi() {
1228
1228
  }
1229
1229
  function Ya() {
1230
1230
  var o;
1231
- const t = _.getState().authToken, a = _.getState().theme, n = _.getState().filterValues, s = (o = _.getState().dashboard) == null ? void 0 : o.title, i = _.getState().selectedSheetId;
1231
+ const t = _.getState().authToken, a = _.getState().theme, n = _.getState().filterValues, s = (o = _.getState().dashboard) == null ? void 0 : o.title, l = _.getState().selectedSheetId;
1232
1232
  return {
1233
1233
  authToken: t,
1234
1234
  theme: a || "light",
1235
1235
  filterValues: n,
1236
1236
  dashboardTitle: s || "",
1237
- selectedSheetId: i || ""
1237
+ selectedSheetId: l || ""
1238
1238
  };
1239
1239
  }
1240
- async function el() {
1241
- const t = _.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: s, dashboardTitle: i, selectedSheetId: o } = Ya();
1240
+ async function ei() {
1241
+ const t = _.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: s, dashboardTitle: l, selectedSheetId: o } = Ya();
1242
1242
  if (t)
1243
1243
  return;
1244
- const l = new URLSearchParams();
1245
- l.set("token", (a == null ? void 0 : a.accessToken) || ""), l.set("theme", n), l.set("filterValues", JSON.stringify(s)), l.set("selectedSheetId", o || "");
1246
- const u = `https://semaphor.cloud/api/v1/generate-pdf?params=${encodeURIComponent(l.toString())}`;
1244
+ const i = new URLSearchParams();
1245
+ i.set("token", (a == null ? void 0 : a.accessToken) || ""), i.set("theme", n), i.set("filterValues", JSON.stringify(s)), i.set("selectedSheetId", o || "");
1246
+ const u = `https://semaphor.cloud/api/v1/generate-pdf?params=${encodeURIComponent(i.toString())}`;
1247
1247
  _.setState({ isDownloadingPdf: !0 });
1248
1248
  const d = (await (await fetch(u, {
1249
1249
  method: "GET",
@@ -1252,20 +1252,20 @@ async function el() {
1252
1252
  }
1253
1253
  })).json()).url, y = document.createElement("a");
1254
1254
  y.href = d;
1255
- const x = `${i}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
1255
+ const x = `${l}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
1256
1256
  y.download = x, y.click(), _.setState({ isDownloadingPdf: !1 });
1257
1257
  }
1258
- function tl({
1258
+ function ti({
1259
1259
  iconClassName: t
1260
1260
  }) {
1261
1261
  const { authToken: a } = Ve();
1262
- _((i) => {
1262
+ _((l) => {
1263
1263
  var o;
1264
- return (o = i.dashboard) == null ? void 0 : o.title;
1265
- }), _((i) => i.theme), _((i) => i.filterValues);
1266
- const n = _((i) => i.isDownloadingPdf);
1264
+ return (o = l.dashboard) == null ? void 0 : o.title;
1265
+ }), _((l) => l.theme), _((l) => l.filterValues);
1266
+ const n = _((l) => l.isDownloadingPdf);
1267
1267
  async function s() {
1268
- await el();
1268
+ await ei();
1269
1269
  }
1270
1270
  return /* @__PURE__ */ e(
1271
1271
  X,
@@ -1282,9 +1282,9 @@ function ye({
1282
1282
  label: a,
1283
1283
  options: n,
1284
1284
  value: s,
1285
- onValueChange: i,
1285
+ onValueChange: l,
1286
1286
  className: o,
1287
- icon: l,
1287
+ icon: i,
1288
1288
  showPlaceholderLabel: u = !0
1289
1289
  }) {
1290
1290
  return /* @__PURE__ */ r(
@@ -1292,14 +1292,14 @@ function ye({
1292
1292
  {
1293
1293
  defaultValue: t,
1294
1294
  value: s,
1295
- onValueChange: i,
1295
+ onValueChange: l,
1296
1296
  children: [
1297
1297
  /* @__PURE__ */ e(
1298
1298
  Me,
1299
1299
  {
1300
1300
  className: G("w-full focus:ring-0 focus:ring-offset-0", o),
1301
1301
  children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1302
- l && /* @__PURE__ */ e("span", { children: l }),
1302
+ i && /* @__PURE__ */ e("span", { children: i }),
1303
1303
  u && /* @__PURE__ */ e(De, { placeholder: a })
1304
1304
  ] })
1305
1305
  }
@@ -1318,24 +1318,24 @@ const En = [
1318
1318
  { value: "biweekly", label: "Bi-Weekly" },
1319
1319
  { value: "monthly", label: "Monthly" }
1320
1320
  ];
1321
- function nl({
1321
+ function ni({
1322
1322
  triggerButtonClassName: t
1323
1323
  }) {
1324
1324
  const {
1325
1325
  data: a,
1326
1326
  handleScheduleSubscription: n,
1327
1327
  handleDeleteSubscription: s,
1328
- status: i,
1328
+ status: l,
1329
1329
  error: o,
1330
- isDeleting: l
1331
- } = al(), [u, c] = J(""), [h, d] = J(En[0].value), [y, x] = J("06:00"), [m, C] = J("");
1330
+ isDeleting: i
1331
+ } = ai(), [u, c] = J(""), [h, d] = J(En[0].value), [y, x] = J("06:00"), [m, C] = J("");
1332
1332
  return /* @__PURE__ */ e(Zn, { delayDuration: 0, children: /* @__PURE__ */ r(Je, { children: [
1333
1333
  /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
1334
1334
  X,
1335
1335
  {
1336
1336
  tooltip: "Schedule Dashboard",
1337
1337
  className: G("h-7 p-2", t),
1338
- children: /* @__PURE__ */ e(pi, { className: "size-4" })
1338
+ children: /* @__PURE__ */ e(pl, { className: "size-4" })
1339
1339
  }
1340
1340
  ) }),
1341
1341
  /* @__PURE__ */ e(It, { align: "end", className: "w-80", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
@@ -1409,11 +1409,11 @@ function nl({
1409
1409
  }), x("00:00"), c(""), C("");
1410
1410
  },
1411
1411
  className: "h-8 p-2",
1412
- disabled: i === "loading" || !u,
1412
+ disabled: l === "loading" || !u,
1413
1413
  children: [
1414
- i === "loading" && /* @__PURE__ */ e(Ke, { className: "mr-2 size-4 animate-spin" }),
1415
- i === "success" && /* @__PURE__ */ e(sn, { className: "mr-2 size-4" }),
1416
- i === "error" && /* @__PURE__ */ r(Ot, { children: [
1414
+ l === "loading" && /* @__PURE__ */ e(Ke, { className: "mr-2 size-4 animate-spin" }),
1415
+ l === "success" && /* @__PURE__ */ e(sn, { className: "mr-2 size-4" }),
1416
+ l === "error" && /* @__PURE__ */ r(Ot, { children: [
1417
1417
  /* @__PURE__ */ e(rn, { children: /* @__PURE__ */ e(Va, { className: "mr-2 size-4 text-destructive" }) }),
1418
1418
  /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e("p", { children: o }) })
1419
1419
  ] }),
@@ -1447,12 +1447,12 @@ function nl({
1447
1447
  _n,
1448
1448
  {
1449
1449
  tooltip: `Next Run: ${new Date(p.nextRun).toLocaleString()} ${p.timezone}`,
1450
- children: /* @__PURE__ */ e(hi, { className: "size-3.5" })
1450
+ children: /* @__PURE__ */ e(hl, { className: "size-3.5" })
1451
1451
  }
1452
1452
  ),
1453
- /* @__PURE__ */ e(_n, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Li, { className: "size-3.5" }) }),
1454
- l === p.id ? /* @__PURE__ */ e(Ke, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1455
- Qi,
1453
+ /* @__PURE__ */ e(_n, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Ll, { className: "size-3.5" }) }),
1454
+ i === p.id ? /* @__PURE__ */ e(Ke, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1455
+ Ql,
1456
1456
  {
1457
1457
  onClick: () => s(p.id),
1458
1458
  className: "size-3.5 cursor-pointer"
@@ -1475,14 +1475,14 @@ const _n = ({
1475
1475
  /* @__PURE__ */ e(rn, { asChild: !0, children: t }),
1476
1476
  /* @__PURE__ */ e(Tt, { children: a })
1477
1477
  ] }) });
1478
- function al() {
1479
- const [t, a] = J("idle"), [n, s] = J(""), [i, o] = J(null), l = _((S) => S.authToken), u = _((S) => S.dashboard.id), c = _((S) => S.dashboard.title), { endUserId: h } = ea((l == null ? void 0 : l.accessToken) || ""), d = "https://semaphor.cloud/api/v1/subscriptions/get", y = {
1478
+ function ai() {
1479
+ const [t, a] = J("idle"), [n, s] = J(""), [l, o] = J(null), i = _((S) => S.authToken), u = _((S) => S.dashboard.id), c = _((S) => S.dashboard.title), { endUserId: h } = ea((i == null ? void 0 : i.accessToken) || ""), d = "https://semaphor.cloud/api/v1/subscriptions/get", y = {
1480
1480
  dashboardId: u,
1481
1481
  endUserId: h
1482
1482
  }, { data: x, isLoading: m, isError: C, isFetching: p, refetch: v } = Ae({
1483
1483
  queryKey: ["subscriptions", u, h],
1484
- queryFn: () => Re(d, (l == null ? void 0 : l.accessToken) || "", y),
1485
- enabled: !!(l != null && l.accessToken) && !!u && !!h
1484
+ queryFn: () => Re(d, (i == null ? void 0 : i.accessToken) || "", y),
1485
+ enabled: !!(i != null && i.accessToken) && !!u && !!h
1486
1486
  });
1487
1487
  async function g({
1488
1488
  email: S,
@@ -1522,7 +1522,7 @@ function al() {
1522
1522
  const z = "https://semaphor.cloud/api/v1/subscriptions/delete";
1523
1523
  o(S);
1524
1524
  try {
1525
- await Tn(z, (l == null ? void 0 : l.accessToken) || "", { id: S }), v(), setTimeout(() => {
1525
+ await Tn(z, (i == null ? void 0 : i.accessToken) || "", { id: S }), v(), setTimeout(() => {
1526
1526
  o(null);
1527
1527
  }, 2e3);
1528
1528
  } catch (k) {
@@ -1534,7 +1534,7 @@ function al() {
1534
1534
  isLoading: m,
1535
1535
  isFetching: p,
1536
1536
  isError: C,
1537
- isDeleting: i,
1537
+ isDeleting: l,
1538
1538
  refetch: v,
1539
1539
  handleScheduleSubscription: g,
1540
1540
  handleDeleteSubscription: N,
@@ -1542,14 +1542,14 @@ function al() {
1542
1542
  error: n
1543
1543
  };
1544
1544
  }
1545
- function sl() {
1545
+ function si() {
1546
1546
  const { authToken: t } = Ve();
1547
1547
  _((M) => M.theme);
1548
- const a = _((M) => M.lenses), n = _((M) => M.selectedLensId), s = a == null ? void 0 : a.find((M) => M.id === n), i = _((M) => M.dashboard);
1548
+ const a = _((M) => M.lenses), n = _((M) => M.selectedLensId), s = a == null ? void 0 : a.find((M) => M.id === n), l = _((M) => M.dashboard);
1549
1549
  _((M) => M.selectedSheetId);
1550
1550
  const o = _(
1551
1551
  (M) => M.isDashboardEditing
1552
- ), l = f(
1552
+ ), i = f(
1553
1553
  (M) => M.selectedConnectionId
1554
1554
  ), [u, c] = J(!1), h = _((M) => M.filterValues), d = _((M) => M.isVisualEditing), y = _((M) => M.showFilters);
1555
1555
  _(
@@ -1565,7 +1565,7 @@ function sl() {
1565
1565
  ), O = Pe(() => z || k, [z, k]), R = () => {
1566
1566
  if (!o || !S) return;
1567
1567
  const M = {
1568
- connectionId: l,
1568
+ connectionId: i,
1569
1569
  id: nt(),
1570
1570
  title: "Title",
1571
1571
  description: "Description",
@@ -1592,7 +1592,7 @@ function sl() {
1592
1592
  async function Y() {
1593
1593
  if (c(!0), !n || !s) return;
1594
1594
  const M = Wa(
1595
- i
1595
+ l
1596
1596
  ), V = JSON.stringify(M), Z = {
1597
1597
  ...s,
1598
1598
  template: V,
@@ -1609,10 +1609,10 @@ function sl() {
1609
1609
  !d && /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e(U, { children: s == null ? void 0 : s.name }) }),
1610
1610
  /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
1611
1611
  !1,
1612
- !d && /* @__PURE__ */ e(tl, {}),
1613
- !d && /* @__PURE__ */ e(nl, {}),
1614
- o && !d && O && /* @__PURE__ */ e(Zi, {}),
1615
- !d && O && /* @__PURE__ */ e(Xi, {}),
1612
+ !d && /* @__PURE__ */ e(ti, {}),
1613
+ !d && /* @__PURE__ */ e(ni, {}),
1614
+ o && !d && O && /* @__PURE__ */ e(Zl, {}),
1615
+ !d && O && /* @__PURE__ */ e(Xl, {}),
1616
1616
  o && !d && /* @__PURE__ */ r(
1617
1617
  ee,
1618
1618
  {
@@ -1655,7 +1655,7 @@ function sl() {
1655
1655
  disabled: u,
1656
1656
  onClick: Y,
1657
1657
  size: "sm",
1658
- children: /* @__PURE__ */ e(Bi, { className: "h-4 w-4" })
1658
+ children: /* @__PURE__ */ e(Bl, { className: "h-4 w-4" })
1659
1659
  }
1660
1660
  ),
1661
1661
  !y && !d && o && /* @__PURE__ */ e(
@@ -1675,14 +1675,14 @@ function sl() {
1675
1675
  }
1676
1676
  );
1677
1677
  }
1678
- function rl({
1678
+ function ri({
1679
1679
  name: t,
1680
1680
  items: a,
1681
1681
  value: n,
1682
1682
  onChange: s,
1683
- isLoading: i,
1683
+ isLoading: l,
1684
1684
  isError: o,
1685
- refetch: l,
1685
+ refetch: i,
1686
1686
  className: u,
1687
1687
  icon: c,
1688
1688
  showNone: h = !1
@@ -1693,7 +1693,7 @@ function rl({
1693
1693
  }, []);
1694
1694
  function v() {
1695
1695
  var N;
1696
- return i ? "Loading..." : o ? "Error" : n ? (N = a == null ? void 0 : a.find((S) => S.id === n)) == null ? void 0 : N.name : `Select ${t}`;
1696
+ return l ? "Loading..." : o ? "Error" : n ? (N = a == null ? void 0 : a.find((S) => S.id === n)) == null ? void 0 : N.name : `Select ${t}`;
1697
1697
  }
1698
1698
  function g(N, S) {
1699
1699
  s(S), x(!1);
@@ -1724,12 +1724,12 @@ function rl({
1724
1724
  children: /* @__PURE__ */ r(na, { children: [
1725
1725
  /* @__PURE__ */ r("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
1726
1726
  /* @__PURE__ */ e(aa, { className: "h-9", placeholder: "Search..." }),
1727
- /* @__PURE__ */ e(X, { className: "h-7", onClick: l, children: /* @__PURE__ */ e(
1727
+ /* @__PURE__ */ e(X, { className: "h-7", onClick: i, children: /* @__PURE__ */ e(
1728
1728
  Ua,
1729
1729
  {
1730
1730
  className: G(
1731
1731
  "size-3.5 opacity-50",
1732
- i && "animate-spin"
1732
+ l && "animate-spin"
1733
1733
  )
1734
1734
  }
1735
1735
  ) })
@@ -1740,8 +1740,8 @@ function rl({
1740
1740
  t == null ? void 0 : t.toLowerCase(),
1741
1741
  " found."
1742
1742
  ] }),
1743
- /* @__PURE__ */ e(ia, { children: p == null ? void 0 : p.map((N) => /* @__PURE__ */ e(
1744
- la,
1743
+ /* @__PURE__ */ e(la, { children: p == null ? void 0 : p.map((N) => /* @__PURE__ */ e(
1744
+ ia,
1745
1745
  {
1746
1746
  className: "overflow-x-auto",
1747
1747
  value: N.name,
@@ -1772,30 +1772,30 @@ function ct({
1772
1772
  items: a,
1773
1773
  value: n,
1774
1774
  isLoading: s,
1775
- isError: i,
1775
+ isError: l,
1776
1776
  refetch: o,
1777
1777
  // connectionTooltip,
1778
- onChange: l,
1778
+ onChange: i,
1779
1779
  showNone: u = !1,
1780
1780
  className: c,
1781
1781
  disabled: h = !1,
1782
1782
  type: d = "combobox"
1783
1783
  }) {
1784
- const y = s ? "Loading..." : i ? "Error" : n;
1784
+ const y = s ? "Loading..." : l ? "Error" : n;
1785
1785
  function x() {
1786
1786
  if (t === "Connection")
1787
- return /* @__PURE__ */ e(Ri, { className: "size-4" });
1787
+ return /* @__PURE__ */ e(Rl, { className: "size-4" });
1788
1788
  if (t === "Database")
1789
- return /* @__PURE__ */ e(bi, { className: "size-4" });
1789
+ return /* @__PURE__ */ e(bl, { className: "size-4" });
1790
1790
  if (t === "Schema")
1791
- return /* @__PURE__ */ e(qi, { className: "size-4" });
1791
+ return /* @__PURE__ */ e(ql, { className: "size-4" });
1792
1792
  if (t === "Table")
1793
1793
  return /* @__PURE__ */ e(bn, { className: "size-4" });
1794
1794
  if (t === "Model")
1795
- return /* @__PURE__ */ e(di, { className: "size-4" });
1795
+ return /* @__PURE__ */ e(dl, { className: "size-4" });
1796
1796
  }
1797
1797
  function m() {
1798
- return /* @__PURE__ */ r(ke, { disabled: h, value: y, onValueChange: l, children: [
1798
+ return /* @__PURE__ */ r(ke, { disabled: h, value: y, onValueChange: i, children: [
1799
1799
  /* @__PURE__ */ e(
1800
1800
  Me,
1801
1801
  {
@@ -1806,7 +1806,7 @@ function ct({
1806
1806
  children: /* @__PURE__ */ e(
1807
1807
  De,
1808
1808
  {
1809
- placeholder: s ? "Loading..." : i ? "Error" : `Select ${t}`
1809
+ placeholder: s ? "Loading..." : l ? "Error" : `Select ${t}`
1810
1810
  }
1811
1811
  )
1812
1812
  }
@@ -1829,21 +1829,21 @@ function ct({
1829
1829
  u && /* @__PURE__ */ e(ue, { value: "none", children: "None" }, "none"),
1830
1830
  a && a.map((p, v) => /* @__PURE__ */ e(ue, { value: p.id, children: p.name }, v))
1831
1831
  ] }),
1832
- (s || i) && /* @__PURE__ */ e(ue, { value: y, children: y })
1832
+ (s || l) && /* @__PURE__ */ e(ue, { value: y, children: y })
1833
1833
  ] }) })
1834
1834
  ] });
1835
1835
  }
1836
1836
  function C() {
1837
1837
  return /* @__PURE__ */ e(
1838
- rl,
1838
+ ri,
1839
1839
  {
1840
1840
  icon: x(),
1841
1841
  items: a,
1842
1842
  value: y,
1843
- onChange: l || (() => {
1843
+ onChange: i || (() => {
1844
1844
  }),
1845
1845
  isLoading: s,
1846
- isError: i,
1846
+ isError: l,
1847
1847
  refetch: o,
1848
1848
  name: t,
1849
1849
  showNone: u
@@ -1852,23 +1852,23 @@ function ct({
1852
1852
  }
1853
1853
  return /* @__PURE__ */ e(oa, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: d === "select" ? m() : C() }) });
1854
1854
  }
1855
- function il({ column: t }) {
1856
- const [a, n] = J(!1), s = f((p) => p.selectedTableName), i = f(
1855
+ function li({ column: t }) {
1856
+ const [a, n] = J(!1), s = f((p) => p.selectedTableName), l = f(
1857
1857
  (p) => p.selectedSchemaName
1858
1858
  ), o = f(
1859
1859
  (p) => p.selectedDatabaseName
1860
- ), l = f(
1860
+ ), i = f(
1861
1861
  (p) => p.selectedDatamodelId
1862
1862
  ), u = f((p) => p.sqlGen), { modelItems: c, connectionType: h } = Ne(), d = f((p) => p.actions.setSqlGen), y = f((p) => p.actions.setCardSql), x = f((p) => p.actions.setRunSql);
1863
1863
  function m(p, v) {
1864
1864
  var z;
1865
1865
  const g = ma(p, u, v), N = (z = c == null ? void 0 : c.find(
1866
- (k) => k.id === l
1866
+ (k) => k.id === i
1867
1867
  )) == null ? void 0 : z.name;
1868
1868
  d(g);
1869
1869
  const S = ha(
1870
1870
  g,
1871
- xe(i || ""),
1871
+ xe(l || ""),
1872
1872
  xe(s),
1873
1873
  N,
1874
1874
  h,
@@ -1934,7 +1934,7 @@ function il({ column: t }) {
1934
1934
  }
1935
1935
  function vn({ column: t }) {
1936
1936
  return /* @__PURE__ */ r(Ot, { children: [
1937
- /* @__PURE__ */ e(Is, { className: "shrink-0", asChild: !0, children: Se(t.data_type) ? /* @__PURE__ */ e(Ja, { className: "size-3 text-muted-foreground" }) : $e(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3 text-muted-foreground" }) : we(t.data_type) ? /* @__PURE__ */ e(Os, { className: "size-3 text-muted-foreground" }) : Ts(t.data_type) ? /* @__PURE__ */ e($i, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(ui, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Pi, { className: "size-3 text-muted-foreground" }) }),
1937
+ /* @__PURE__ */ e(Is, { className: "shrink-0", asChild: !0, children: Se(t.data_type) ? /* @__PURE__ */ e(Ja, { className: "size-3 text-muted-foreground" }) : $e(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3 text-muted-foreground" }) : we(t.data_type) ? /* @__PURE__ */ e(Os, { className: "size-3 text-muted-foreground" }) : Ts(t.data_type) ? /* @__PURE__ */ e($l, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(ul, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Pl, { className: "size-3 text-muted-foreground" }) }),
1938
1938
  /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
1939
1939
  ] });
1940
1940
  }
@@ -1956,27 +1956,27 @@ function Bt({
1956
1956
  }
1957
1957
  );
1958
1958
  }
1959
- function ll({ id: t, children: a, type: n = "column" }) {
1960
- const { attributes: s, listeners: i, setNodeRef: o, transform: l } = zs({
1959
+ function ii({ id: t, children: a, type: n = "column" }) {
1960
+ const { attributes: s, listeners: l, setNodeRef: o, transform: i } = zs({
1961
1961
  id: t,
1962
1962
  data: { type: n }
1963
1963
  // Tag as a column from the left-hand side
1964
- }), u = l ? {
1965
- translate: vt.Translate.toString(l),
1966
- transform: vt.Transform.toString(l)
1964
+ }), u = i ? {
1965
+ translate: vt.Translate.toString(i),
1966
+ transform: vt.Transform.toString(i)
1967
1967
  } : void 0;
1968
1968
  return /* @__PURE__ */ e(
1969
1969
  "div",
1970
1970
  {
1971
1971
  ref: o,
1972
1972
  style: u,
1973
- ...i,
1973
+ ...l,
1974
1974
  ...s,
1975
1975
  children: a
1976
1976
  }
1977
1977
  );
1978
1978
  }
1979
- function ol({
1979
+ function oi({
1980
1980
  onClick: t,
1981
1981
  column: a
1982
1982
  }) {
@@ -1985,7 +1985,7 @@ function ol({
1985
1985
  var y;
1986
1986
  return (y = d.card.queryConfig) == null ? void 0 : y.groupByColumns;
1987
1987
  }
1988
- ), i = f(
1988
+ ), l = f(
1989
1989
  (d) => {
1990
1990
  var y;
1991
1991
  return (y = d.card.queryConfig) == null ? void 0 : y.metricColumns;
@@ -1996,14 +1996,14 @@ function ol({
1996
1996
  return (y = d.card.queryConfig) == null ? void 0 : y.filterColumns;
1997
1997
  }
1998
1998
  );
1999
- function l(d) {
1999
+ function i(d) {
2000
2000
  return u(d) || c(d) || h(d);
2001
2001
  }
2002
2002
  function u(d) {
2003
2003
  return s == null ? void 0 : s.some((y) => y.name === d.column_name);
2004
2004
  }
2005
2005
  function c(d) {
2006
- return i == null ? void 0 : i.some((y) => y.name === d.column_name);
2006
+ return l == null ? void 0 : l.some((y) => y.name === d.column_name);
2007
2007
  }
2008
2008
  function h(d) {
2009
2009
  return o == null ? void 0 : o.some((y) => y.name === d.column_name);
@@ -2017,7 +2017,7 @@ function ol({
2017
2017
  className: G(
2018
2018
  "relative grow overflow-x-hidden overflow-y-hidden rounded-md active:border active:border-dashed active:border-muted-foreground",
2019
2019
  {
2020
- "bg-muted-foreground/10": l(a)
2020
+ "bg-muted-foreground/10": i(a)
2021
2021
  }
2022
2022
  ),
2023
2023
  children: [
@@ -2029,7 +2029,7 @@ function ol({
2029
2029
  }
2030
2030
  ) }),
2031
2031
  n === a.column_name && /* @__PURE__ */ e("div", { className: "absolute inset-0", children: n === a.column_name && /* @__PURE__ */ e(Bt, { column: a }) }),
2032
- /* @__PURE__ */ e(ll, { id: a.column_name, type: "column", children: /* @__PURE__ */ e(Bt, { column: a }) })
2032
+ /* @__PURE__ */ e(ii, { id: a.column_name, type: "column", children: /* @__PURE__ */ e(Bt, { column: a }) })
2033
2033
  ]
2034
2034
  }
2035
2035
  )
@@ -2040,9 +2040,9 @@ function Za(t) {
2040
2040
  (c) => c.selectedConnectionId
2041
2041
  ), {
2042
2042
  refetch: s,
2043
- data: i,
2043
+ data: l,
2044
2044
  isLoading: o,
2045
- isError: l
2045
+ isError: i
2046
2046
  } = Ae({
2047
2047
  queryKey: ["connections"],
2048
2048
  queryFn: () => Re(
@@ -2051,13 +2051,13 @@ function Za(t) {
2051
2051
  ),
2052
2052
  enabled: !!(a != null && a.accessToken)
2053
2053
  // Only fetch if authToken is present
2054
- }), u = i == null ? void 0 : i.connections.find(
2054
+ }), u = l == null ? void 0 : l.connections.find(
2055
2055
  (c) => c.id === n
2056
2056
  );
2057
2057
  return {
2058
- connectionsData: i,
2058
+ connectionsData: l,
2059
2059
  isConnectionsLoading: o,
2060
- isConnectionsError: l,
2060
+ isConnectionsError: i,
2061
2061
  refetchConnections: s,
2062
2062
  currentConnection: u
2063
2063
  };
@@ -2068,11 +2068,11 @@ function xn(t) {
2068
2068
  (g) => g.selectedConnectionId
2069
2069
  ), s = f(
2070
2070
  (g) => g.selectedDatabaseName
2071
- ), i = f(
2071
+ ), l = f(
2072
2072
  (g) => g.selectedDatamodelId
2073
2073
  ), o = f(
2074
2074
  (g) => g.selectedSchemaName
2075
- ), l = f((g) => g.selectedTableName), { currentConnection: u } = Za(), c = u == null ? void 0 : u.type, {
2075
+ ), i = f((g) => g.selectedTableName), { currentConnection: u } = Za(), c = u == null ? void 0 : u.type, {
2076
2076
  data: h,
2077
2077
  isLoading: d,
2078
2078
  isFetching: y,
@@ -2083,20 +2083,20 @@ function xn(t) {
2083
2083
  "columns",
2084
2084
  n,
2085
2085
  s,
2086
- i,
2086
+ l,
2087
2087
  o,
2088
- l
2088
+ i
2089
2089
  ],
2090
2090
  queryFn: () => Re(
2091
2091
  "https://semaphor.cloud/api/v1/columns",
2092
2092
  (a == null ? void 0 : a.accessToken) || "",
2093
2093
  {
2094
2094
  connection_id: n,
2095
- datamodel_id: i || "",
2095
+ datamodel_id: l || "",
2096
2096
  // don't pass undefined. Pass empty string
2097
2097
  database_name: s,
2098
2098
  schema_name: o,
2099
- table_name: l
2099
+ table_name: i
2100
2100
  }
2101
2101
  ),
2102
2102
  enabled: C(c)
@@ -2109,7 +2109,7 @@ function xn(t) {
2109
2109
  // && currentConnection?.type !== 'API', // Only fetch if connectionId, database, and table is present
2110
2110
  });
2111
2111
  function C(g) {
2112
- return a != null && a.accessToken ? !!(n && s && s !== "NA" && o && l || n && (g === "S3" || g === "API") || i && i) : !1;
2112
+ return a != null && a.accessToken ? !!(n && s && s !== "NA" && o && i || n && (g === "S3" || g === "API") || l && l) : !1;
2113
2113
  }
2114
2114
  return {
2115
2115
  columns: (v = h == null ? void 0 : h.columns) == null ? void 0 : v.map(
@@ -2129,11 +2129,11 @@ function Ne(t, a) {
2129
2129
  var wn, kn, Mn, Dn, In;
2130
2130
  const n = Ve().authToken || t, s = f(
2131
2131
  (B) => B.selectedConnectionId
2132
- ), i = f(
2132
+ ), l = f(
2133
2133
  (B) => B.selectedDatamodelId
2134
2134
  ), o = f(
2135
2135
  (B) => B.selectedDatabaseName
2136
- ), l = f(
2136
+ ), i = f(
2137
2137
  (B) => B.selectedSchemaName
2138
2138
  ), u = f((B) => B.selectedTableName), c = f(
2139
2139
  (B) => B.actions.setSelectedConnectionId
@@ -2148,7 +2148,7 @@ function Ne(t, a) {
2148
2148
  );
2149
2149
  f((B) => B.actions.setCardSql);
2150
2150
  function m(B) {
2151
- return s && o && l && o !== "NA" ? !0 : s && B === "API" ? !1 : !!(s && B === "S3");
2151
+ return s && o && i && o !== "NA" ? !0 : s && B === "API" ? !1 : !!(s && B === "S3");
2152
2152
  }
2153
2153
  function C(B) {
2154
2154
  return s && B ? !(B === "API" || B === "S3") : !1;
@@ -2221,7 +2221,7 @@ function Ne(t, a) {
2221
2221
  "tables",
2222
2222
  s,
2223
2223
  o,
2224
- l
2224
+ i
2225
2225
  ],
2226
2226
  queryFn: () => Re(
2227
2227
  "https://semaphor.cloud/api/v1/tables",
@@ -2229,7 +2229,7 @@ function Ne(t, a) {
2229
2229
  {
2230
2230
  connection_id: s,
2231
2231
  database_name: o,
2232
- schema_name: l
2232
+ schema_name: i
2233
2233
  }
2234
2234
  ),
2235
2235
  enabled: m(j)
@@ -2249,7 +2249,7 @@ function Ne(t, a) {
2249
2249
  y,
2250
2250
  h
2251
2251
  ]);
2252
- const q = (S == null ? void 0 : S.type) === "API" ? (wn = S == null ? void 0 : S.type) == null ? void 0 : wn.toLowerCase() : u || "", te = Y ? "" : l || "";
2252
+ const q = (S == null ? void 0 : S.type) === "API" ? (wn = S == null ? void 0 : S.type) == null ? void 0 : wn.toLowerCase() : u || "", te = Y ? "" : i || "";
2253
2253
  function fe(B) {
2254
2254
  y(B), x("");
2255
2255
  }
@@ -2278,11 +2278,11 @@ function Ne(t, a) {
2278
2278
  })), ht = b == null ? void 0 : b.schemas.map((B) => ({
2279
2279
  id: B.schema_name,
2280
2280
  name: B.schema_name
2281
- })), ie = w == null ? void 0 : w.tables.map((B) => ({
2281
+ })), le = w == null ? void 0 : w.tables.map((B) => ({
2282
2282
  id: B.table_name,
2283
2283
  name: B.table_name
2284
2284
  })), be = (In = k == null ? void 0 : k.datamodels.find(
2285
- (B) => B.id === i
2285
+ (B) => B.id === l
2286
2286
  )) == null ? void 0 : In.name, ws = xt({
2287
2287
  schemaName: te,
2288
2288
  tableName: q,
@@ -2296,7 +2296,7 @@ function Ne(t, a) {
2296
2296
  isConnectionsLoading: g,
2297
2297
  isConnectionsError: N,
2298
2298
  modelItems: Vt,
2299
- selectedDatamodelId: i,
2299
+ selectedDatamodelId: l,
2300
2300
  selectedDatamodelName: be,
2301
2301
  isModelsLoading: O,
2302
2302
  isModelsError: R,
@@ -2305,10 +2305,10 @@ function Ne(t, a) {
2305
2305
  isDatabasesLoadingOrFetching: V || Z,
2306
2306
  isDatabaseError: $,
2307
2307
  schemaItems: ht,
2308
- selectedSchemaName: l,
2308
+ selectedSchemaName: i,
2309
2309
  isSchemaLoadingOrFetching: T || H,
2310
2310
  isSchemaError: F,
2311
- tableItems: ie,
2311
+ tableItems: le,
2312
2312
  selectedTableName: u,
2313
2313
  isTableLoadingOrFetching: L || E,
2314
2314
  isTableError: se,
@@ -2352,7 +2352,7 @@ const Pt = {
2352
2352
  }, Xa = {
2353
2353
  id: "__placeholder__"
2354
2354
  }, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by", Zt = "sortable-metrics", kt = "sortable-pivot-by", Xt = "droppable-filters", en = "sortable-filters", Cn = "sortable-order-by";
2355
- function cl() {
2355
+ function ci() {
2356
2356
  const t = Ee((I) => I.insertIndex), a = f(
2357
2357
  (I) => {
2358
2358
  var b;
@@ -2368,7 +2368,7 @@ function cl() {
2368
2368
  var b;
2369
2369
  return ((b = I.card.queryConfig) == null ? void 0 : b.filterColumns) || [];
2370
2370
  }
2371
- ), i = f(
2371
+ ), l = f(
2372
2372
  (I) => {
2373
2373
  var b;
2374
2374
  return ((b = I.card.queryConfig) == null ? void 0 : b.orderBy) || [];
@@ -2379,7 +2379,7 @@ function cl() {
2379
2379
  return ((b = I.card.queryConfig) == null ? void 0 : b.pivotColumns) || [];
2380
2380
  }
2381
2381
  ), {
2382
- setInsertIndex: l,
2382
+ setInsertIndex: i,
2383
2383
  setActiveId: u,
2384
2384
  setPreviewGroupByColumns: c,
2385
2385
  setPreviewMetricColumns: h,
@@ -2414,13 +2414,13 @@ function cl() {
2414
2414
  const Q = a.findIndex(
2415
2415
  (P) => P.id === F
2416
2416
  );
2417
- l(Q);
2417
+ i(Q);
2418
2418
  const re = a.filter(
2419
2419
  (P) => P.id !== Pt.id
2420
2420
  );
2421
2421
  re.splice(Q, 0, Pt), c(re);
2422
2422
  } else if (T.id === He) {
2423
- l(a.length);
2423
+ i(a.length);
2424
2424
  const Q = [...a, Pt];
2425
2425
  c(Q), h(n), d(s);
2426
2426
  }
@@ -2432,13 +2432,13 @@ function cl() {
2432
2432
  const Q = o.findIndex(
2433
2433
  (P) => P.id === F
2434
2434
  );
2435
- l(Q);
2435
+ i(Q);
2436
2436
  const re = o.filter(
2437
2437
  (P) => P.id !== Ht.id
2438
2438
  );
2439
2439
  re.splice(Q, 0, Ht), y(re);
2440
2440
  } else if (T.id === Ue) {
2441
- l(o.length);
2441
+ i(o.length);
2442
2442
  const Q = [...o, Ht];
2443
2443
  y(Q), c(a), h(n), d(s);
2444
2444
  }
@@ -2449,13 +2449,13 @@ function cl() {
2449
2449
  )) {
2450
2450
  console.log("isOverMetricSortable", F);
2451
2451
  const Q = n.findIndex((P) => P.id === F);
2452
- l(Q);
2452
+ i(Q);
2453
2453
  const re = n.filter(
2454
2454
  (P) => P.id !== Gt.id
2455
2455
  );
2456
2456
  re.splice(Q, 0, Gt), h(re);
2457
2457
  } else if (T.id === Ge) {
2458
- l(n.length);
2458
+ i(n.length);
2459
2459
  const Q = [...n, Gt];
2460
2460
  h(Q), d(s), c(a), y(o);
2461
2461
  }
@@ -2465,13 +2465,13 @@ function cl() {
2465
2465
  (Q) => Q.id === F
2466
2466
  )) {
2467
2467
  const Q = s.findIndex((P) => P.id === F);
2468
- l(Q);
2468
+ i(Q);
2469
2469
  const re = s.filter(
2470
2470
  (P) => P.id !== Ut.id
2471
2471
  );
2472
2472
  re.splice(Q, 0, Ut), d(re);
2473
2473
  } else if (T.id === Xt) {
2474
- l(s.length);
2474
+ i(s.length);
2475
2475
  const Q = [...s, Ut];
2476
2476
  d(Q), h(n), c(a), y(o);
2477
2477
  }
@@ -2480,7 +2480,7 @@ function cl() {
2480
2480
  c(a), h(n), d(s), y(o);
2481
2481
  };
2482
2482
  function k(I) {
2483
- u(I.active.id), l(null), c(a), h(n), d(s), y(o);
2483
+ u(I.active.id), i(null), c(a), h(n), d(s), y(o);
2484
2484
  }
2485
2485
  function O(I) {
2486
2486
  return !s.some((b) => b.name === I.column_name);
@@ -2601,24 +2601,24 @@ function cl() {
2601
2601
  K.splice(ne, 0, de), C(K);
2602
2602
  }
2603
2603
  }
2604
- Z(I), u(null), l(null), c(a), h(n), d(s), y(o);
2604
+ Z(I), u(null), i(null), c(a), h(n), d(s), y(o);
2605
2605
  }
2606
2606
  function Z(I) {
2607
2607
  const { active: b, over: T } = I, H = b.data.current;
2608
2608
  if ((H == null ? void 0 : H.type) === Cn && T) {
2609
- const F = i.findIndex(
2609
+ const F = l.findIndex(
2610
2610
  (w) => dt(w.columnId) === b.id
2611
- ), D = i.findIndex(
2611
+ ), D = l.findIndex(
2612
2612
  (w) => dt(w.columnId) === T.id
2613
2613
  );
2614
2614
  if (F !== -1 && D !== -1 && F !== D) {
2615
- const w = [...i], [L] = w.splice(F, 1);
2615
+ const w = [...l], [L] = w.splice(F, 1);
2616
2616
  w.splice(D, 0, L), p(w);
2617
2617
  }
2618
2618
  }
2619
2619
  }
2620
2620
  function $() {
2621
- u(null), l(null), c(a), h(n), d(s);
2621
+ u(null), i(null), c(a), h(n), d(s);
2622
2622
  }
2623
2623
  return {
2624
2624
  handleDragOver: z,
@@ -2668,13 +2668,13 @@ function st(t, a) {
2668
2668
  return n;
2669
2669
  }
2670
2670
  }
2671
- function dl({
2671
+ function di({
2672
2672
  schemaName: t,
2673
2673
  tableName: a,
2674
2674
  columns: n,
2675
2675
  status: s
2676
2676
  }) {
2677
- const i = f((b) => b.sqlGen), o = f((b) => b.isDevMode), l = f(
2677
+ const l = f((b) => b.sqlGen), o = f((b) => b.isDevMode), i = f(
2678
2678
  (b) => b.selectedConnectionId
2679
2679
  ), u = f(
2680
2680
  (b) => {
@@ -2707,7 +2707,7 @@ function dl({
2707
2707
  function j(b) {
2708
2708
  var T;
2709
2709
  if (o) {
2710
- const H = ma(b, i);
2710
+ const H = ma(b, l);
2711
2711
  S(H);
2712
2712
  const F = (T = O == null ? void 0 : O.find(
2713
2713
  (w) => w.id === y
@@ -2771,8 +2771,8 @@ function dl({
2771
2771
  }
2772
2772
  }
2773
2773
  function Y(b) {
2774
- b === !0 && (d || R) && l ? (m({
2775
- connectionId: l,
2774
+ b === !0 && (d || R) && i ? (m({
2775
+ connectionId: i,
2776
2776
  connectionType: k === "S3" || k === "API" ? "DuckDb" : k,
2777
2777
  databaseName: c || "",
2778
2778
  schemaName: h || "",
@@ -2784,7 +2784,7 @@ function dl({
2784
2784
  duration: 2500,
2785
2785
  richColors: !0
2786
2786
  })) : (C({
2787
- connectionId: l || "",
2787
+ connectionId: i || "",
2788
2788
  connectionType: k || "",
2789
2789
  tableName: d || "",
2790
2790
  datamodelName: Ct(R),
@@ -2821,7 +2821,7 @@ function dl({
2821
2821
  }
2822
2822
  function Z() {
2823
2823
  return (x == null ? void 0 : x.find(
2824
- (b) => b.connectionId === l && (b.tableName === d || b.datamodelName === R)
2824
+ (b) => b.connectionId === i && (b.tableName === d || b.datamodelName === R)
2825
2825
  )) !== void 0;
2826
2826
  }
2827
2827
  function $(b) {
@@ -2840,12 +2840,12 @@ function dl({
2840
2840
  {
2841
2841
  onClick: (T) => T.stopPropagation(),
2842
2842
  className: "flex items-center justify-end",
2843
- children: $e(b.data_type) && /* @__PURE__ */ e(il, { column: b })
2843
+ children: $e(b.data_type) && /* @__PURE__ */ e(li, { column: b })
2844
2844
  }
2845
2845
  )
2846
2846
  ]
2847
2847
  }
2848
- ) : /* @__PURE__ */ e(ol, { onClick: j, column: b });
2848
+ ) : /* @__PURE__ */ e(oi, { onClick: j, column: b });
2849
2849
  }
2850
2850
  function I() {
2851
2851
  return /* @__PURE__ */ r(ae, { children: [
@@ -2882,7 +2882,7 @@ function dl({
2882
2882
  variant: "secondary",
2883
2883
  className: "flex",
2884
2884
  children: [
2885
- s !== "Success" ? /* @__PURE__ */ e(Ke, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Fi, { className: "mr-2 size-4" }),
2885
+ s !== "Success" ? /* @__PURE__ */ e(Ke, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Fl, { className: "mr-2 size-4" }),
2886
2886
  "Top 10"
2887
2887
  ]
2888
2888
  }
@@ -2907,7 +2907,7 @@ function dl({
2907
2907
  // <div className="flex h-full w-full items-center justify-center">
2908
2908
  // <Loader2 className="h-6 w-6 animate-spin text-muted-foreground/70" />
2909
2909
  // </div>
2910
- /* @__PURE__ */ e("div", { className: "flex grow flex-col justify-start gap-2 px-6", children: Array.from({ length: 10 }).map((b, T) => /* @__PURE__ */ e(ln, { className: "h-8 w-full" }, T)) })
2910
+ /* @__PURE__ */ e("div", { className: "flex grow flex-col justify-start gap-2 px-6", children: Array.from({ length: 3 }).map((b, T) => /* @__PURE__ */ e(ln, { className: "h-7 w-full" }, T)) })
2911
2911
  ) : /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-4 px-4", children: [
2912
2912
  o && /* @__PURE__ */ e("div", { className: "mx-2 flex items-center justify-center gap-2", children: I() }),
2913
2913
  /* @__PURE__ */ r(
@@ -2937,15 +2937,15 @@ function es({
2937
2937
  type: a
2938
2938
  }) {
2939
2939
  var ht;
2940
- const n = f((ie) => ie.card), s = f(
2941
- (ie) => ie.selectedConnectionId
2942
- ), i = _((ie) => ie.showFilters), o = f(
2943
- (ie) => ie.selectedDatamodelId
2944
- ), l = f(
2945
- (ie) => ie.selectedDatabaseName
2940
+ const n = f((le) => le.card), s = f(
2941
+ (le) => le.selectedConnectionId
2942
+ ), l = _((le) => le.showFilters), o = f(
2943
+ (le) => le.selectedDatamodelId
2944
+ ), i = f(
2945
+ (le) => le.selectedDatabaseName
2946
2946
  ), u = f(
2947
- (ie) => ie.selectedSchemaName
2948
- ), c = f((ie) => ie.selectedTableName), h = f((ie) => ie.isDevMode), { setSelectedTableName: d, setIsDevMode: y, setCardSql: x } = W(), {
2947
+ (le) => le.selectedSchemaName
2948
+ ), c = f((le) => le.selectedTableName), h = f((le) => le.isDevMode), { setSelectedTableName: d, setIsDevMode: y, setCardSql: x } = W(), {
2949
2949
  connectionItems: m,
2950
2950
  modelItems: C,
2951
2951
  schemaItems: p,
@@ -2981,7 +2981,7 @@ function es({
2981
2981
  } = Ne(), { data: de, refetch: q } = ge(n);
2982
2982
  function te() {
2983
2983
  return t ? t(K, ne, N) : /* @__PURE__ */ e(
2984
- dl,
2984
+ di,
2985
2985
  {
2986
2986
  schemaName: K,
2987
2987
  tableName: ne,
@@ -2993,10 +2993,10 @@ function es({
2993
2993
  function fe() {
2994
2994
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
2995
2995
  }
2996
- function Te(ie) {
2997
- ie === !0 ? de && (x(de.userSql), setTimeout(() => {
2996
+ function Te(le) {
2997
+ le === !0 ? de && (x(de.userSql), setTimeout(() => {
2998
2998
  q();
2999
- }, 100)) : x(""), y(ie);
2999
+ }, 100)) : x(""), y(le);
3000
3000
  }
3001
3001
  function Ze() {
3002
3002
  if (!s || b === "S3" || b === "API") return null;
@@ -3010,14 +3010,14 @@ function es({
3010
3010
  isError: j,
3011
3011
  isLoading: R,
3012
3012
  items: v,
3013
- value: l || "",
3013
+ value: i || "",
3014
3014
  title: "Database",
3015
3015
  type: "combobox"
3016
3016
  }
3017
3017
  );
3018
3018
  }
3019
3019
  function Et() {
3020
- if (s && !T && (!l || l === "none") && (!o || o === "none"))
3020
+ if (s && !T && (!i || i === "none") && (!o || o === "none"))
3021
3021
  return /* @__PURE__ */ r("div", { className: "grid grid-cols-3", children: [
3022
3022
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Le, {}) }),
3023
3023
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(U, { children: "OR" }) }),
@@ -3026,7 +3026,7 @@ function es({
3026
3026
  }
3027
3027
  function _t() {
3028
3028
  if (!s || b === "S3" || b === "API") return null;
3029
- if (!l || l === "none")
3029
+ if (!i || i === "none")
3030
3030
  return /* @__PURE__ */ e(
3031
3031
  ct,
3032
3032
  {
@@ -3043,7 +3043,7 @@ function es({
3043
3043
  );
3044
3044
  }
3045
3045
  function Vt() {
3046
- return !s || b === "S3" || b === "API" || !l || l === "none" ? null : /* @__PURE__ */ e(
3046
+ return !s || b === "S3" || b === "API" || !i || i === "none" ? null : /* @__PURE__ */ e(
3047
3047
  ct,
3048
3048
  {
3049
3049
  refetch: D,
@@ -3058,11 +3058,11 @@ function es({
3058
3058
  );
3059
3059
  }
3060
3060
  function qt() {
3061
- function ie() {
3061
+ function le() {
3062
3062
  let be = !1;
3063
- return b === "API" ? (be = !1, be) : ((b === "S3" || s && l && l !== "none" && u) && (be = !0), be);
3063
+ return b === "API" ? (be = !1, be) : ((b === "S3" || s && i && i !== "none" && u) && (be = !0), be);
3064
3064
  }
3065
- return ie() ? /* @__PURE__ */ e(
3065
+ return le() ? /* @__PURE__ */ e(
3066
3066
  ct,
3067
3067
  {
3068
3068
  refetch: w,
@@ -3082,7 +3082,7 @@ function es({
3082
3082
  className: G(
3083
3083
  "flex h-full min-w-[310px] max-w-[310px] flex-col justify-between rounded-none",
3084
3084
  {
3085
- "border-r-[1px]": !i
3085
+ "border-r-[1px]": !l
3086
3086
  }
3087
3087
  ),
3088
3088
  children: [
@@ -3099,7 +3099,7 @@ function es({
3099
3099
  isError: k,
3100
3100
  type: "combobox",
3101
3101
  connectionTooltip: ((ht = m == null ? void 0 : m.find(
3102
- (ie) => ie.id === s
3102
+ (le) => le.id === s
3103
3103
  )) == null ? void 0 : ht.type) || ""
3104
3104
  }
3105
3105
  ),
@@ -3131,7 +3131,7 @@ function es({
3131
3131
  variant: "secondary",
3132
3132
  className: "group flex items-center gap-2 rounded-full",
3133
3133
  children: [
3134
- /* @__PURE__ */ e(Ei, { className: "size-4" }),
3134
+ /* @__PURE__ */ e(El, { className: "size-4" }),
3135
3135
  /* @__PURE__ */ e("span", { className: "hidden group-hover:block", children: "Help" })
3136
3136
  ]
3137
3137
  }
@@ -3144,12 +3144,12 @@ function es({
3144
3144
  function ts({ sql: t, error: a, onClick: n }) {
3145
3145
  const s = f((c) => c.isDevMode);
3146
3146
  f((c) => c.card);
3147
- const { setIsDevMode: i, setCardSql: o, setRunSql: l } = W();
3147
+ const { setIsDevMode: l, setCardSql: o, setRunSql: i } = W();
3148
3148
  if (!t && !a)
3149
3149
  return null;
3150
3150
  function u() {
3151
- i(!s), o(t), setTimeout(() => {
3152
- l(!0);
3151
+ l(!s), o(t), setTimeout(() => {
3152
+ i(!0);
3153
3153
  }, 100);
3154
3154
  }
3155
3155
  return /* @__PURE__ */ r(ca, { openDelay: a ? 0 : 500, children: [
@@ -3160,7 +3160,7 @@ function ts({ sql: t, error: a, onClick: n }) {
3160
3160
  align: "start",
3161
3161
  className: "w-full min-w-fit max-w-[700px]",
3162
3162
  children: /* @__PURE__ */ e("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-2", children: [
3163
- /* @__PURE__ */ r(it, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
3163
+ /* @__PURE__ */ r(lt, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
3164
3164
  a && a,
3165
3165
  t && /* @__PURE__ */ r("div", { className: "flex flex-col space-y-1.5", children: [
3166
3166
  /* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: "Resolved SQL" }),
@@ -3174,13 +3174,13 @@ function ts({ sql: t, error: a, onClick: n }) {
3174
3174
  variant: "secondary",
3175
3175
  size: "sm",
3176
3176
  children: [
3177
- /* @__PURE__ */ e(Ni, { className: "mr-2 h-4 w-4" }),
3177
+ /* @__PURE__ */ e(Nl, { className: "mr-2 h-4 w-4" }),
3178
3178
  "View in SQL Editor"
3179
3179
  ]
3180
3180
  }
3181
3181
  ),
3182
3182
  a && n && /* @__PURE__ */ r(ee, { onClick: n, size: "sm", variant: "secondary", children: [
3183
- /* @__PURE__ */ e(Di, { className: "mr-2 h-4 w-4" }),
3183
+ /* @__PURE__ */ e(Dl, { className: "mr-2 h-4 w-4" }),
3184
3184
  "Debug with Assistant"
3185
3185
  ] })
3186
3186
  ] }) })
@@ -3194,18 +3194,18 @@ var ns = {
3194
3194
  className: void 0,
3195
3195
  style: void 0,
3196
3196
  attr: void 0
3197
- }, Vn = _e.createContext && /* @__PURE__ */ _e.createContext(ns), ul = ["attr", "size", "title"];
3198
- function ml(t, a) {
3197
+ }, Vn = _e.createContext && /* @__PURE__ */ _e.createContext(ns), ui = ["attr", "size", "title"];
3198
+ function mi(t, a) {
3199
3199
  if (t == null) return {};
3200
- var n = hl(t, a), s, i;
3200
+ var n = hi(t, a), s, l;
3201
3201
  if (Object.getOwnPropertySymbols) {
3202
3202
  var o = Object.getOwnPropertySymbols(t);
3203
- for (i = 0; i < o.length; i++)
3204
- s = o[i], !(a.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(t, s) && (n[s] = t[s]);
3203
+ for (l = 0; l < o.length; l++)
3204
+ s = o[l], !(a.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(t, s) && (n[s] = t[s]);
3205
3205
  }
3206
3206
  return n;
3207
3207
  }
3208
- function hl(t, a) {
3208
+ function hi(t, a) {
3209
3209
  if (t == null) return {};
3210
3210
  var n = {};
3211
3211
  for (var s in t)
@@ -3229,8 +3229,8 @@ function qn(t, a) {
3229
3229
  var n = Object.keys(t);
3230
3230
  if (Object.getOwnPropertySymbols) {
3231
3231
  var s = Object.getOwnPropertySymbols(t);
3232
- a && (s = s.filter(function(i) {
3233
- return Object.getOwnPropertyDescriptor(t, i).enumerable;
3232
+ a && (s = s.filter(function(l) {
3233
+ return Object.getOwnPropertyDescriptor(t, l).enumerable;
3234
3234
  })), n.push.apply(n, s);
3235
3235
  }
3236
3236
  return n;
@@ -3239,21 +3239,21 @@ function Dt(t) {
3239
3239
  for (var a = 1; a < arguments.length; a++) {
3240
3240
  var n = arguments[a] != null ? arguments[a] : {};
3241
3241
  a % 2 ? qn(Object(n), !0).forEach(function(s) {
3242
- pl(t, s, n[s]);
3242
+ pi(t, s, n[s]);
3243
3243
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : qn(Object(n)).forEach(function(s) {
3244
3244
  Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
3245
3245
  });
3246
3246
  }
3247
3247
  return t;
3248
3248
  }
3249
- function pl(t, a, n) {
3250
- return a = fl(a), a in t ? Object.defineProperty(t, a, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[a] = n, t;
3249
+ function pi(t, a, n) {
3250
+ return a = fi(a), a in t ? Object.defineProperty(t, a, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[a] = n, t;
3251
3251
  }
3252
- function fl(t) {
3253
- var a = gl(t, "string");
3252
+ function fi(t) {
3253
+ var a = gi(t, "string");
3254
3254
  return typeof a == "symbol" ? a : a + "";
3255
3255
  }
3256
- function gl(t, a) {
3256
+ function gi(t, a) {
3257
3257
  if (typeof t != "object" || !t) return t;
3258
3258
  var n = t[Symbol.toPrimitive];
3259
3259
  if (n !== void 0) {
@@ -3268,23 +3268,23 @@ function as(t) {
3268
3268
  key: n
3269
3269
  }, a.attr), as(a.child)));
3270
3270
  }
3271
- function lt(t) {
3272
- return (a) => /* @__PURE__ */ _e.createElement(yl, Mt({
3271
+ function it(t) {
3272
+ return (a) => /* @__PURE__ */ _e.createElement(yi, Mt({
3273
3273
  attr: Dt({}, t.attr)
3274
3274
  }, a), as(t.child));
3275
3275
  }
3276
- function yl(t) {
3276
+ function yi(t) {
3277
3277
  var a = (n) => {
3278
3278
  var {
3279
3279
  attr: s,
3280
- size: i,
3280
+ size: l,
3281
3281
  title: o
3282
- } = t, l = ml(t, ul), u = i || n.size || "1em", c;
3282
+ } = t, i = mi(t, ui), u = l || n.size || "1em", c;
3283
3283
  return n.className && (c = n.className), t.className && (c = (c ? c + " " : "") + t.className), /* @__PURE__ */ _e.createElement("svg", Mt({
3284
3284
  stroke: "currentColor",
3285
3285
  fill: "currentColor",
3286
3286
  strokeWidth: "0"
3287
- }, n.attr, s, l, {
3287
+ }, n.attr, s, i, {
3288
3288
  className: c,
3289
3289
  style: Dt(Dt({
3290
3290
  color: t.color || n.color
@@ -3296,40 +3296,40 @@ function yl(t) {
3296
3296
  };
3297
3297
  return Vn !== void 0 ? /* @__PURE__ */ _e.createElement(Vn.Consumer, null, (n) => a(n)) : a(ns);
3298
3298
  }
3299
- function bl(t) {
3300
- return lt({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(t);
3299
+ function bi(t) {
3300
+ return it({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(t);
3301
3301
  }
3302
3302
  function ss(t) {
3303
- const { theme: a } = js(), n = _((p) => p.theme), s = f((p) => p.frame), i = f((p) => p.card), o = f((p) => p.activeTabCardId), l = Bs(), { refetch: u } = ge(i), { updateCardTab: c, setRunSql: h } = W(), d = at(), y = at({}), x = s.cards.find((p) => p.id === o), m = za(() => {
3303
+ const { theme: a } = js(), n = _((p) => p.theme), s = f((p) => p.frame), l = f((p) => p.card), o = f((p) => p.activeTabCardId), i = Bs(), { refetch: u } = ge(l), { updateCardTab: c, setRunSql: h } = W(), d = at(), y = at({}), x = s.cards.find((p) => p.id === o), m = za(() => {
3304
3304
  let p = "";
3305
3305
  return t === "python" && (p = (x == null ? void 0 : x.python) || ga), t === "sql" && (p = (x == null ? void 0 : x.sql) || ""), p;
3306
3306
  }, [t, x]);
3307
3307
  me(() => {
3308
- if (o && i.id && i.id !== o) {
3309
- if (d.current && l) {
3308
+ if (o && l.id && l.id !== o) {
3309
+ if (d.current && i) {
3310
3310
  const p = d.current.getModel();
3311
- p && (y.current[i.id] = p);
3311
+ p && (y.current[l.id] = p);
3312
3312
  let v = y.current[o];
3313
3313
  if (!v) {
3314
3314
  const g = m();
3315
- v = l.editor.createModel(g, t), y.current[o] = v;
3315
+ v = i.editor.createModel(g, t), y.current[o] = v;
3316
3316
  }
3317
3317
  d.current.setModel(v);
3318
3318
  }
3319
- c(o, i), h(!0);
3319
+ c(o, l), h(!0);
3320
3320
  }
3321
3321
  }, [
3322
3322
  o,
3323
- i,
3324
- c,
3325
3323
  l,
3324
+ c,
3325
+ i,
3326
3326
  h,
3327
3327
  t,
3328
3328
  m
3329
3329
  ]), me(() => {
3330
- if (!l) return;
3330
+ if (!i) return;
3331
3331
  const p = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", v = n === "system" ? p : n;
3332
- l.editor.defineTheme("default", {
3332
+ i.editor.defineTheme("default", {
3333
3333
  // base: theme === 'light' ? 'hc-light' : 'vs-dark',
3334
3334
  base: v === "light" ? "vs" : "vs-dark",
3335
3335
  inherit: !0,
@@ -3341,29 +3341,29 @@ function ss(t) {
3341
3341
  // ? '#ffffff'
3342
3342
  // : getCssVariableValue('--semaphor-background'),
3343
3343
  }
3344
- }), l.editor.setTheme("default");
3345
- }, [a, n, l]), me(() => {
3344
+ }), i.editor.setTheme("default");
3345
+ }, [a, n, i]), me(() => {
3346
3346
  const p = d.current;
3347
- p && l && i && p.addCommand(
3348
- l.KeyMod.Shift | l.KeyCode.Enter,
3347
+ p && i && l && p.addCommand(
3348
+ i.KeyMod.Shift | i.KeyCode.Enter,
3349
3349
  function() {
3350
3350
  return u(), !1;
3351
3351
  }
3352
3352
  );
3353
- }, [l, u, i]);
3353
+ }, [i, u, l]);
3354
3354
  function C(p, v) {
3355
- if (d.current = p, !y.current[i.id]) {
3355
+ if (d.current = p, !y.current[l.id]) {
3356
3356
  const g = p.getModel(), N = m();
3357
- y.current[i.id] = g || (v == null ? void 0 : v.editor.createModel(N, t)) || p.getModel();
3357
+ y.current[l.id] = g || (v == null ? void 0 : v.editor.createModel(N, t)) || p.getModel();
3358
3358
  }
3359
- p.setModel(y.current[i.id]);
3359
+ p.setModel(y.current[l.id]);
3360
3360
  }
3361
3361
  return { handleEditorDidMount: C };
3362
3362
  }
3363
- function vl() {
3364
- const t = f((l) => l.card.sql), a = f((l) => l.sqlGen), { setCardSql: n, setSqlGen: s } = W(), { handleEditorDidMount: i } = ss("sql");
3365
- function o(l) {
3366
- n(l), Hs(a) || s({});
3363
+ function vi() {
3364
+ const t = f((i) => i.card.sql), a = f((i) => i.sqlGen), { setCardSql: n, setSqlGen: s } = W(), { handleEditorDidMount: l } = ss("sql");
3365
+ function o(i) {
3366
+ n(i), Hs(a) || s({});
3367
3367
  }
3368
3368
  return /* @__PURE__ */ r("div", { className: "relative h-full w-full", children: [
3369
3369
  !t && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-[65px] top-3 z-10 font-mono text-sm text-muted-foreground", children: "Write your SQL here" }),
@@ -3387,15 +3387,15 @@ function vl() {
3387
3387
  renderLineHighlight: "none"
3388
3388
  },
3389
3389
  defaultLanguage: "sql",
3390
- onMount: i
3390
+ onMount: l
3391
3391
  }
3392
3392
  )
3393
3393
  ] });
3394
3394
  }
3395
- function xl() {
3396
- const t = f((i) => i.card.python), { setCardPython: a } = W(), { handleEditorDidMount: n } = ss("python");
3397
- function s(i) {
3398
- a(i);
3395
+ function xi() {
3396
+ const t = f((l) => l.card.python), { setCardPython: a } = W(), { handleEditorDidMount: n } = ss("python");
3397
+ function s(l) {
3398
+ a(l);
3399
3399
  }
3400
3400
  return /* @__PURE__ */ e(
3401
3401
  Ft,
@@ -3421,7 +3421,7 @@ function xl() {
3421
3421
  }
3422
3422
  );
3423
3423
  }
3424
- function Cl({ jsonString: t }) {
3424
+ function Ci({ jsonString: t }) {
3425
3425
  return /* @__PURE__ */ e(
3426
3426
  Ft,
3427
3427
  {
@@ -3449,7 +3449,7 @@ function Cl({ jsonString: t }) {
3449
3449
  }
3450
3450
  function rs(t) {
3451
3451
  var ne, K, de;
3452
- const [a, n] = J(""), [s, i] = J(null), { authToken: o } = Ve(), l = f((q) => {
3452
+ const [a, n] = J(""), [s, l] = J(null), { authToken: o } = Ve(), i = f((q) => {
3453
3453
  var te;
3454
3454
  return (te = q == null ? void 0 : q.card) == null ? void 0 : te.sql;
3455
3455
  }), u = f((q) => {
@@ -3519,9 +3519,9 @@ function rs(t) {
3519
3519
  n("Getting table columns...");
3520
3520
  else {
3521
3521
  if (q.toolName === "getUserSql")
3522
- return l ? {
3522
+ return i ? {
3523
3523
  status: "success",
3524
- sql: l,
3524
+ sql: i,
3525
3525
  python: u || ""
3526
3526
  } : {
3527
3527
  status: "error",
@@ -3536,7 +3536,7 @@ function rs(t) {
3536
3536
  }
3537
3537
  }
3538
3538
  function w(q) {
3539
- i((te) => te ? {
3539
+ l((te) => te ? {
3540
3540
  promptTokens: te.promptTokens + q.promptTokens,
3541
3541
  completionTokens: te.completionTokens + q.completionTokens,
3542
3542
  totalTokens: te.totalTokens + q.totalTokens
@@ -3617,42 +3617,42 @@ function rs(t) {
3617
3617
  errorMessage: P
3618
3618
  };
3619
3619
  }
3620
- function Nl(t) {
3621
- const a = t.toUpperCase().indexOf("WHERE"), n = t.toUpperCase().indexOf("GROUP BY"), s = t.toUpperCase().indexOf("LIMIT"), i = t.toUpperCase().indexOf("ORDER BY");
3620
+ function Ni(t) {
3621
+ const a = t.toUpperCase().indexOf("WHERE"), n = t.toUpperCase().indexOf("GROUP BY"), s = t.toUpperCase().indexOf("LIMIT"), l = t.toUpperCase().indexOf("ORDER BY");
3622
3622
  let o = t.length;
3623
- if (i !== -1 && (o = i), s !== -1 && s < o && (o = s), a !== -1) {
3624
- const l = t.substring(0, a), u = t.substring(a);
3625
- return `${l} {{ filters | where }} AND ${u.substring(
3623
+ if (l !== -1 && (o = l), s !== -1 && s < o && (o = s), a !== -1) {
3624
+ const i = t.substring(0, a), u = t.substring(a);
3625
+ return `${i} {{ filters | where }} AND ${u.substring(
3626
3626
  6
3627
3627
  )}`;
3628
3628
  } else if (n !== -1) {
3629
- const l = t.substring(0, n), u = t.substring(n);
3630
- return `${l} {{ filters | where }} ${u}`;
3629
+ const i = t.substring(0, n), u = t.substring(n);
3630
+ return `${i} {{ filters | where }} ${u}`;
3631
3631
  } else {
3632
- const l = t.substring(0, o), u = t.substring(o);
3633
- return console.log("beforeClause", l), console.log("afterClause", u), u ? `${l} {{ filters | where }} ${u}` : `${l.replace(/;$/, "")} {{ filters | where }}`;
3632
+ const i = t.substring(0, o), u = t.substring(o);
3633
+ return console.log("beforeClause", i), console.log("afterClause", u), u ? `${i} {{ filters | where }} ${u}` : `${i.replace(/;$/, "")} {{ filters | where }}`;
3634
3634
  }
3635
3635
  }
3636
- function is({
3636
+ function ls({
3637
3637
  variant: t = "secondary"
3638
3638
  }) {
3639
- const { setCardSql: a } = W(), n = f((m) => m.frame), s = f((m) => m.card), i = f(
3639
+ const { setCardSql: a } = W(), n = f((m) => m.frame), s = f((m) => m.card), l = f(
3640
3640
  (m) => m.selectedSchemaName
3641
3641
  ), o = f(
3642
3642
  (m) => m.selectedDatamodelId
3643
- ), l = f(
3643
+ ), i = f(
3644
3644
  (m) => m.selectedDatabaseName
3645
3645
  ), u = f((m) => m.selectedTableName), c = f(
3646
3646
  (m) => m.selectedConnectionId
3647
3647
  ), h = f((m) => m.isShowingVisual), d = s.sql, y = f((m) => m.onSave);
3648
3648
  function x() {
3649
3649
  let m = d;
3650
- d && !d.includes("{{") && (m = Nl(d), a(m));
3650
+ d && !d.includes("{{") && (m = Ni(d), a(m));
3651
3651
  const C = {
3652
3652
  ...s,
3653
- lastSelectedSchema: i,
3653
+ lastSelectedSchema: l,
3654
3654
  lastSelectedDatamodelId: o,
3655
- lastSelectedDatabase: l,
3655
+ lastSelectedDatabase: i,
3656
3656
  lastSelectedTable: u,
3657
3657
  connectionId: c,
3658
3658
  type: h ? s.type : "table",
@@ -3663,7 +3663,7 @@ function is({
3663
3663
  ), v = {
3664
3664
  ...n,
3665
3665
  cards: p,
3666
- activeCardId: Sl(p, n.activeCardId)
3666
+ activeCardId: Si(p, n.activeCardId)
3667
3667
  };
3668
3668
  y == null || y(v);
3669
3669
  }
@@ -3680,14 +3680,14 @@ function is({
3680
3680
  }
3681
3681
  );
3682
3682
  }
3683
- function ls() {
3684
- const { setTempQueryData: t, setSqlGen: a } = W(), n = on(), s = f((c) => c.tempQueryData), i = f((c) => c.onClose), o = f((c) => c.card), { queryKey: l } = ge(o);
3683
+ function is() {
3684
+ const { setTempQueryData: t, setSqlGen: a } = W(), n = on(), s = f((c) => c.tempQueryData), l = f((c) => c.onClose), o = f((c) => c.card), { queryKey: i } = ge(o);
3685
3685
  function u() {
3686
3686
  if (s) {
3687
3687
  const { queryKey: c, queryData: h } = s;
3688
3688
  c && h && n.setQueryData(c, h);
3689
3689
  }
3690
- a({}), i == null || i();
3690
+ a({}), l == null || l();
3691
3691
  }
3692
3692
  return /* @__PURE__ */ r(
3693
3693
  ee,
@@ -3703,9 +3703,9 @@ function ls() {
3703
3703
  );
3704
3704
  }
3705
3705
  function os() {
3706
- const { setTempQueryData: t } = W(), a = on(), n = f((m) => m.tempQueryData), s = f((m) => m.card), { queryKey: i } = ge(s), {
3706
+ const { setTempQueryData: t } = W(), a = on(), n = f((m) => m.tempQueryData), s = f((m) => m.card), { queryKey: l } = ge(s), {
3707
3707
  setCardSql: o,
3708
- setSqlGen: l,
3708
+ setSqlGen: i,
3709
3709
  setCardPython: u,
3710
3710
  setCardCustomCfg: c,
3711
3711
  setCardPreferences: h,
@@ -3713,18 +3713,18 @@ function os() {
3713
3713
  clearQueryConfig: y
3714
3714
  } = W();
3715
3715
  function x() {
3716
- const m = a.getQueryData(i);
3716
+ const m = a.getQueryData(l);
3717
3717
  n != null && n.queryData || t({
3718
- queryKey: i,
3718
+ queryKey: l,
3719
3719
  queryData: m
3720
- }), a.setQueryData(i, null), a.removeQueries({ queryKey: i, exact: !0 }), o(""), l({}), y(), u(""), c(""), h({});
3720
+ }), a.setQueryData(l, null), a.removeQueries({ queryKey: l, exact: !0 }), o(""), i({}), y(), u(""), c(""), h({});
3721
3721
  }
3722
3722
  return /* @__PURE__ */ r(ee, { onClick: x, className: "", size: "sm", variant: "secondary", children: [
3723
- /* @__PURE__ */ e(xi, { className: "mr-2 size-4" }),
3723
+ /* @__PURE__ */ e(xl, { className: "mr-2 size-4" }),
3724
3724
  "Clear"
3725
3725
  ] });
3726
3726
  }
3727
- function Sl(t, a) {
3727
+ function Si(t, a) {
3728
3728
  if (t.length === 0)
3729
3729
  return "";
3730
3730
  if (a) {
@@ -3734,18 +3734,18 @@ function Sl(t, a) {
3734
3734
  if (s == "All__Header")
3735
3735
  return t[0].id;
3736
3736
  if (s && s.endsWith("__Header")) {
3737
- const o = s.split("__")[0], l = t.find(
3737
+ const o = s.split("__")[0], i = t.find(
3738
3738
  (u) => u.tabTitle === o
3739
3739
  );
3740
- return l ? l.id : t[0].id;
3740
+ return i ? i.id : t[0].id;
3741
3741
  }
3742
3742
  return a;
3743
3743
  }
3744
3744
  }
3745
3745
  return t[0].id;
3746
3746
  }
3747
- function wl() {
3748
- const t = on(), [a, n] = J(!1), [s, i] = J(!1);
3747
+ function wi() {
3748
+ const t = on(), [a, n] = J(!1), [s, l] = J(!1);
3749
3749
  f((w) => w.frame);
3750
3750
  const o = f((w) => w.card);
3751
3751
  f((w) => w.isShowingVisual), f(
@@ -3757,7 +3757,7 @@ function wl() {
3757
3757
  ), f(
3758
3758
  (w) => w.selectedSchemaName
3759
3759
  );
3760
- const l = f((w) => w.showAIDialog);
3760
+ const i = f((w) => w.showAIDialog);
3761
3761
  f((w) => w.selectedTableName);
3762
3762
  const u = f((w) => {
3763
3763
  var L;
@@ -3835,7 +3835,7 @@ function wl() {
3835
3835
  className: "relative flex w-1/3 min-w-0 grow overflow-hidden text-xs",
3836
3836
  role: "editor-filter-container",
3837
3837
  children: /* @__PURE__ */ e("div", { className: "mt-2 w-[99%]", children: /* @__PURE__ */ e(
3838
- Cl,
3838
+ Ci,
3839
3839
  {
3840
3840
  jsonString: JSON.stringify(c, null, 2)
3841
3841
  }
@@ -3846,7 +3846,7 @@ function wl() {
3846
3846
  ee,
3847
3847
  {
3848
3848
  variant: "ghost",
3849
- onClick: () => i(!s),
3849
+ onClick: () => l(!s),
3850
3850
  className: "absolute bottom-0 right-6 size-7 p-1",
3851
3851
  children: s ? /* @__PURE__ */ e(Ce, { className: "size-3.5 text-muted-foreground" }) : /* @__PURE__ */ e(Ba, { className: "size-3.5 text-muted-foreground" })
3852
3852
  }
@@ -3874,7 +3874,7 @@ function wl() {
3874
3874
  {
3875
3875
  id: "sql-container",
3876
3876
  className: "relative flex w-[99%]",
3877
- children: /* @__PURE__ */ e(vl, {})
3877
+ children: /* @__PURE__ */ e(vi, {})
3878
3878
  }
3879
3879
  ),
3880
3880
  a && /* @__PURE__ */ e("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "sql" })
@@ -3896,7 +3896,7 @@ function wl() {
3896
3896
  {
3897
3897
  id: "python-container",
3898
3898
  className: "relative flex w-[99%] pt-0",
3899
- children: /* @__PURE__ */ e(xl, {})
3899
+ children: /* @__PURE__ */ e(xi, {})
3900
3900
  }
3901
3901
  ),
3902
3902
  /* @__PURE__ */ e("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "python" })
@@ -3948,24 +3948,24 @@ function wl() {
3948
3948
  onPressedChange: (w) => n(w),
3949
3949
  className: "",
3950
3950
  size: "sm",
3951
- children: /* @__PURE__ */ e(bl, { className: "size-4 text-foreground/70" })
3951
+ children: /* @__PURE__ */ e(bi, { className: "size-4 text-foreground/70" })
3952
3952
  }
3953
3953
  ),
3954
3954
  /* @__PURE__ */ e(
3955
3955
  "button",
3956
3956
  {
3957
- disabled: l,
3957
+ disabled: i,
3958
3958
  onClick: () => {
3959
3959
  b(), N(!0);
3960
3960
  },
3961
3961
  className: "h-9 w-full cursor-text px-3 text-left text-sm text-muted-foreground",
3962
- children: l ? "" : "Type your question..."
3962
+ children: i ? "" : "Type your question..."
3963
3963
  }
3964
3964
  )
3965
3965
  ] }),
3966
3966
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3967
- /* @__PURE__ */ e(ls, {}),
3968
- /* @__PURE__ */ e(is, {})
3967
+ /* @__PURE__ */ e(is, {}),
3968
+ /* @__PURE__ */ e(ls, {})
3969
3969
  ] })
3970
3970
  ]
3971
3971
  }
@@ -3989,9 +3989,9 @@ function wl() {
3989
3989
  )
3990
3990
  );
3991
3991
  }
3992
- function kl({ data: t }) {
3993
- var l;
3994
- const [a, n] = _e.useState([]), i = Object.keys(t[0]).map((u) => ({
3992
+ function ki({ data: t }) {
3993
+ var i;
3994
+ const [a, n] = _e.useState([]), l = Object.keys(t[0]).map((u) => ({
3995
3995
  // header: key,
3996
3996
  accessorKey: u,
3997
3997
  header: ({ column: c }) => {
@@ -4010,7 +4010,7 @@ function kl({ data: t }) {
4010
4010
  }
4011
4011
  })), o = Zs({
4012
4012
  data: t,
4013
- columns: i,
4013
+ columns: l,
4014
4014
  getCoreRowModel: sr(),
4015
4015
  getPaginationRowModel: ar(),
4016
4016
  onSortingChange: n,
@@ -4033,7 +4033,7 @@ function kl({ data: t }) {
4033
4033
  },
4034
4034
  c.id
4035
4035
  )) }, u.id)) }),
4036
- /* @__PURE__ */ e(tr, { children: (l = o.getRowModel().rows) != null && l.length ? o.getRowModel().rows.map((u) => /* @__PURE__ */ e(
4036
+ /* @__PURE__ */ e(tr, { children: (i = o.getRowModel().rows) != null && i.length ? o.getRowModel().rows.map((u) => /* @__PURE__ */ e(
4037
4037
  Rt,
4038
4038
  {
4039
4039
  className: "h-11 whitespace-nowrap py-2",
@@ -4041,21 +4041,21 @@ function kl({ data: t }) {
4041
4041
  children: u.getVisibleCells().map((c) => /* @__PURE__ */ e(Fn, { className: "py-2", children: An(c.column.columnDef.cell, c.getContext()) }, c.id))
4042
4042
  },
4043
4043
  u.id
4044
- )) : /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Fn, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
4044
+ )) : /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Fn, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
4045
4045
  ] }),
4046
4046
  /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
4047
4047
  ] });
4048
4048
  }
4049
- function Ml({ card: t }) {
4049
+ function Mi({ card: t }) {
4050
4050
  var N, S, z, k, O, R, j, Y, M, V, Z;
4051
- const [a, n] = J(!1), [s, i] = J(
4051
+ const [a, n] = J(!1), [s, l] = J(
4052
4052
  []
4053
- ), { authToken: o } = Ve(), l = rr(o == null ? void 0 : o.accessToken), u = _(($) => $.themeStyle), c = {
4053
+ ), { authToken: o } = Ve(), i = rr(o == null ? void 0 : o.accessToken), u = _(($) => $.themeStyle), c = {
4054
4054
  colors: ((S = (N = u == null ? void 0 : u.chart) == null ? void 0 : N.dataset) == null ? void 0 : S.backgroundColor) || []
4055
4055
  };
4056
4056
  (z = t.customCardPreferences) != null && z.inputData;
4057
4057
  const { getCard: h } = ya(((k = t.customCardPreferences) == null ? void 0 : k.url) || ""), d = ((O = t.customCardPreferences) == null ? void 0 : O.visualType) || "single", y = f(($) => $.frame), { setCustomCardPreferences: x } = W(), { data: m } = ge(t), C = za(($, I) => {
4058
- i((b) => ({
4058
+ l((b) => ({
4059
4059
  ...b,
4060
4060
  [$]: I
4061
4061
  }));
@@ -4083,7 +4083,7 @@ function Ml({ card: t }) {
4083
4083
  p && d === "single" && /* @__PURE__ */ e(
4084
4084
  p,
4085
4085
  {
4086
- params: l,
4086
+ params: i,
4087
4087
  theme: c,
4088
4088
  settings: (M = t.customCardPreferences) == null ? void 0 : M.settings,
4089
4089
  onDataChange: C,
@@ -4100,7 +4100,7 @@ function Ml({ card: t }) {
4100
4100
  );
4101
4101
  if (b)
4102
4102
  return /* @__PURE__ */ e(
4103
- ir,
4103
+ lr,
4104
4104
  {
4105
4105
  onLoadingStatus: v,
4106
4106
  onDataChange: C,
@@ -4137,9 +4137,9 @@ function cs({
4137
4137
  ...a
4138
4138
  }) {
4139
4139
  var v;
4140
- const n = f((g) => g.card), s = ((v = n.customCardPreferences) == null ? void 0 : v.showCardHeader) ?? !0, i = f((g) => g.frame), o = _((g) => g.dashboard.filters);
4140
+ const n = f((g) => g.card), s = ((v = n.customCardPreferences) == null ? void 0 : v.showCardHeader) ?? !0, l = f((g) => g.frame), o = _((g) => g.dashboard.filters);
4141
4141
  f((g) => g.actions.setRunSql);
4142
- const { updateFilter: l } = rt(), u = o == null ? void 0 : o.find((g) => g.id === i.filterId), { data: c, isLoading: h, isFetching: d } = ge(n), { setCard: y } = W(), { data: x } = cn(n), m = Pe(() => !n.id || !(c != null && c.records) ? null : ba({
4142
+ const { updateFilter: i } = rt(), u = o == null ? void 0 : o.find((g) => g.id === l.filterId), { data: c, isLoading: h, isFetching: d } = ge(n), { setCard: y } = W(), { data: x } = cn(n), m = Pe(() => !n.id || !(c != null && c.records) ? null : ba({
4143
4143
  data: c == null ? void 0 : c.records,
4144
4144
  cardType: n.type,
4145
4145
  queryConfig: n.queryConfig,
@@ -4157,7 +4157,7 @@ function cs({
4157
4157
  x
4158
4158
  ]);
4159
4159
  function C(g) {
4160
- return /* @__PURE__ */ e(Ml, { card: g });
4160
+ return /* @__PURE__ */ e(Mi, { card: g });
4161
4161
  }
4162
4162
  function p() {
4163
4163
  if (c != null && c.records && (c == null ? void 0 : c.records.length) === 0 && !h && !d)
@@ -4176,13 +4176,13 @@ function cs({
4176
4176
  }
4177
4177
  ) });
4178
4178
  if (n.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
4179
- return /* @__PURE__ */ r(it, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
4179
+ return /* @__PURE__ */ r(lt, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
4180
4180
  /* @__PURE__ */ e(pr, { card: n, data: c == null ? void 0 : c.records }),
4181
4181
  /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
4182
4182
  ] });
4183
4183
  }
4184
4184
  return /* @__PURE__ */ r(
4185
- lr,
4185
+ ir,
4186
4186
  {
4187
4187
  role: "editor-visual-card",
4188
4188
  className: G("relative flex h-full flex-col rounded-none", t),
@@ -4193,18 +4193,20 @@ function cs({
4193
4193
  /* @__PURE__ */ e(
4194
4194
  et,
4195
4195
  {
4196
+ enabled: !0,
4196
4197
  text: n.title,
4197
4198
  onSave: (g) => y({ ...n, title: g }),
4198
- children: /* @__PURE__ */ e("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e(cr, { className: "text-base", children: n.title || "Edit title..." }) })
4199
+ children: /* @__PURE__ */ e("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e(cr, { className: "text-base", children: n.title || "Add title" }) })
4199
4200
  },
4200
4201
  n.title
4201
4202
  ),
4202
4203
  /* @__PURE__ */ e(
4203
4204
  et,
4204
4205
  {
4206
+ enabled: !0,
4205
4207
  text: n.description || "",
4206
4208
  onSave: (g) => y({ ...n, description: g }),
4207
- children: /* @__PURE__ */ e(dr, { children: n.description || "Edit description..." })
4209
+ children: /* @__PURE__ */ e(dr, { children: n.description || "Add description" })
4208
4210
  },
4209
4211
  n.description
4210
4212
  )
@@ -4213,9 +4215,10 @@ function cs({
4213
4215
  /* @__PURE__ */ e(
4214
4216
  et,
4215
4217
  {
4218
+ enabled: !0,
4216
4219
  className: "my-1",
4217
4220
  text: u.title || u.column,
4218
- onSave: (g) => l({ ...u, title: g }),
4221
+ onSave: (g) => i({ ...u, title: g }),
4219
4222
  children: /* @__PURE__ */ e(U, { children: u.title })
4220
4223
  }
4221
4224
  ),
@@ -4253,7 +4256,7 @@ const $t = ({
4253
4256
  value: a,
4254
4257
  onChange: n
4255
4258
  }
4256
- ), Dl = () => /* @__PURE__ */ r(Hn, { children: [
4259
+ ), Di = () => /* @__PURE__ */ r(Hn, { children: [
4257
4260
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(Gn, { children: "Customize Card" }) }),
4258
4261
  /* @__PURE__ */ r(Un, { children: [
4259
4262
  "See the configuration options and documentation",
@@ -4267,13 +4270,13 @@ const $t = ({
4267
4270
  }
4268
4271
  )
4269
4272
  ] })
4270
- ] }), Il = ({
4273
+ ] }), Ii = ({
4271
4274
  // defaultConfig,
4272
4275
  customCode: t,
4273
4276
  cardCustomCfgString: a,
4274
4277
  mergedConfig: n,
4275
4278
  onConfigChange: s,
4276
- onCodeChange: i
4279
+ onCodeChange: l
4277
4280
  }) => /* @__PURE__ */ r(dn, { defaultValue: "final-config", className: "flex w-1/2 flex-col", children: [
4278
4281
  /* @__PURE__ */ r(un, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
4279
4282
  /* @__PURE__ */ e(tt, { value: "final-config", children: "Config" }),
@@ -4322,25 +4325,25 @@ const $t = ({
4322
4325
  {
4323
4326
  language: "javascript",
4324
4327
  value: t,
4325
- onChange: i
4328
+ onChange: l
4326
4329
  }
4327
4330
  )
4328
4331
  }
4329
4332
  )
4330
- ] }), Ol = ({
4333
+ ] }), Oi = ({
4331
4334
  error: t,
4332
4335
  hasCardCustomConfig: a,
4333
4336
  onReset: n,
4334
4337
  onApply: s,
4335
- onClose: i
4338
+ onClose: l
4336
4339
  }) => /* @__PURE__ */ r($n, { className: "flex items-center", children: [
4337
4340
  /* @__PURE__ */ e(U, { className: "mr-2 text-red-500", children: t }),
4338
4341
  /* @__PURE__ */ e(ee, { disabled: !a, onClick: n, variant: "outline", children: "Reset" }),
4339
4342
  /* @__PURE__ */ e(ee, { onClick: s, variant: "outline", children: "Apply" }),
4340
- /* @__PURE__ */ e(ee, { onClick: i, variant: "outline", children: "Close" })
4343
+ /* @__PURE__ */ e(ee, { onClick: l, variant: "outline", children: "Close" })
4341
4344
  ] });
4342
- function Tl() {
4343
- const [t, a] = J(!1), [n, s] = J(""), [i, o] = J(""), [l, u] = J(""), [c, h] = J(""), d = f((k) => k.card), y = f((k) => k.card.customCfg), x = y ? JSON.stringify(y, null, 2) : "", { data: m } = ge(d), { data: C } = cn(d), { setCardCustomCfg: p, setCustomVisualCode: v } = W(), g = (k) => {
4345
+ function Ti() {
4346
+ const [t, a] = J(!1), [n, s] = J(""), [l, o] = J(""), [i, u] = J(""), [c, h] = J(""), d = f((k) => k.card), y = f((k) => k.card.customCfg), x = y ? JSON.stringify(y, null, 2) : "", { data: m } = ge(d), { data: C } = cn(d), { setCardCustomCfg: p, setCustomVisualCode: v } = W(), g = (k) => {
4344
4347
  var O, R;
4345
4348
  return JSON.stringify(
4346
4349
  {
@@ -4374,9 +4377,9 @@ function Tl() {
4374
4377
  }
4375
4378
  }, S = () => {
4376
4379
  try {
4377
- if (l && v(l), i) {
4380
+ if (i && v(i), l) {
4378
4381
  const k = JSON.parse(
4379
- i
4382
+ l
4380
4383
  ), O = yr(
4381
4384
  JSON.parse(n),
4382
4385
  k
@@ -4398,22 +4401,22 @@ function Tl() {
4398
4401
  }
4399
4402
  ) }),
4400
4403
  /* @__PURE__ */ r(Pn, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
4401
- /* @__PURE__ */ e(Dl, {}),
4404
+ /* @__PURE__ */ e(Di, {}),
4402
4405
  /* @__PURE__ */ r("div", { className: "flex grow gap-2", children: [
4403
4406
  /* @__PURE__ */ e(Lt, { FallbackComponent: xa, children: /* @__PURE__ */ e(cs, { className: "w-1/2 rounded shadow-none" }) }),
4404
4407
  /* @__PURE__ */ e(
4405
- Il,
4408
+ Ii,
4406
4409
  {
4407
- customCode: l,
4410
+ customCode: i,
4408
4411
  cardCustomCfgString: x,
4409
- mergedConfig: i,
4412
+ mergedConfig: l,
4410
4413
  onConfigChange: (k) => o(k ?? ""),
4411
4414
  onCodeChange: (k) => u(k ?? "")
4412
4415
  }
4413
4416
  )
4414
4417
  ] }),
4415
4418
  /* @__PURE__ */ e(
4416
- Ol,
4419
+ Oi,
4417
4420
  {
4418
4421
  error: c,
4419
4422
  hasCardCustomConfig: !!y,
@@ -4432,24 +4435,24 @@ function ds(t) {
4432
4435
  return a;
4433
4436
  }
4434
4437
  function us() {
4435
- const { authToken: t } = Ve(), { data: a, isLoading: n, isFetching: s, isError: i } = Ae({
4438
+ const { authToken: t } = Ve(), { data: a, isLoading: n, isFetching: s, isError: l } = Ae({
4436
4439
  queryKey: ["plugins", t == null ? void 0 : t.accessToken],
4437
4440
  queryFn: () => br(t == null ? void 0 : t.accessToken)
4438
4441
  // staleTime: Infinity,
4439
4442
  });
4440
- return { data: a, isLoading: n, isFetching: s, isError: i };
4443
+ return { data: a, isLoading: n, isFetching: s, isError: l };
4441
4444
  }
4442
- function zl({
4445
+ function zi({
4443
4446
  onChartTypeChange: t
4444
4447
  }) {
4445
4448
  const [a, n] = J([]), {
4446
4449
  setCardCustomCfg: s,
4447
- setCardPreferences: i,
4450
+ setCardPreferences: l,
4448
4451
  setCardType: o,
4449
- setCustomCardPreferences: l
4452
+ setCustomCardPreferences: i
4450
4453
  } = W(), { data: u } = us();
4451
4454
  function c(h, d) {
4452
- s(null), i({}), o(h), d && l({
4455
+ s(null), l({}), o(h), d && i({
4453
4456
  type: "component",
4454
4457
  visualType: "single",
4455
4458
  url: d.url,
@@ -4474,7 +4477,7 @@ function zl({
4474
4477
  }, [u]), a.length === 0 ? null : /* @__PURE__ */ r(ae, { children: [
4475
4478
  /* @__PURE__ */ e(Le, { className: "my-2" }),
4476
4479
  /* @__PURE__ */ e("div", { className: "grid grid-cols-4 place-items-center", children: a.map((h, d) => /* @__PURE__ */ e(
4477
- Al,
4480
+ Ai,
4478
4481
  {
4479
4482
  text: h.name,
4480
4483
  onClick: () => c("custom", h),
@@ -4484,38 +4487,38 @@ function zl({
4484
4487
  )) })
4485
4488
  ] });
4486
4489
  }
4487
- const Al = ({
4490
+ const Ai = ({
4488
4491
  text: t,
4489
4492
  icon: a,
4490
4493
  onClick: n
4491
4494
  }) => {
4492
- const s = ds(), i = t.charAt(0).toUpperCase();
4493
- return /* @__PURE__ */ e(X, { onClick: n, tooltip: t, children: s ? /* @__PURE__ */ e(s, { className: "h-4 w-4" }) : i });
4495
+ const s = ds(), l = t.charAt(0).toUpperCase();
4496
+ return /* @__PURE__ */ e(X, { onClick: n, tooltip: t, children: s ? /* @__PURE__ */ e(s, { className: "h-4 w-4" }) : l });
4494
4497
  };
4495
4498
  function ms(t) {
4496
- return lt({ 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: [] }] })(t);
4499
+ return it({ 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: [] }] })(t);
4497
4500
  }
4498
- function Fl(t) {
4499
- return lt({ 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: [] }] })(t);
4501
+ function Fi(t) {
4502
+ return it({ 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: [] }] })(t);
4500
4503
  }
4501
4504
  function hs(t) {
4502
- return lt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(t);
4505
+ return it({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(t);
4503
4506
  }
4504
4507
  function ps(t) {
4505
- return lt({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(t);
4508
+ return it({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(t);
4506
4509
  }
4507
4510
  function fs(t) {
4508
- return lt({ attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(t);
4511
+ return it({ attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(t);
4509
4512
  }
4510
4513
  function gs({
4511
4514
  onChartTypeChange: t,
4512
4515
  iconClassName: a
4513
4516
  }) {
4514
- const { setCardType: n, setCardPreferences: s, setIsDevMode: i } = f(
4517
+ const { setCardType: n, setCardPreferences: s, setIsDevMode: l } = f(
4515
4518
  (d) => d.actions
4516
- ), { setCardCustomCfg: o, setCustomCardPreferences: l, setQueryConfig: u } = W();
4519
+ ), { setCardCustomCfg: o, setCustomCardPreferences: i, setQueryConfig: u } = W();
4517
4520
  function c(d, y) {
4518
- o(null), s({}), n(d), ["kpi", "custom", "text", "map"].includes(d) && (i(!0), u(void 0)), t == null || t();
4521
+ o(null), s({}), n(d), ["kpi", "custom", "text", "map"].includes(d) && (l(!0), u(void 0)), t == null || t();
4519
4522
  }
4520
4523
  const h = 1e3;
4521
4524
  return /* @__PURE__ */ r("div", { className: "grid grid-cols-4 place-items-center", children: [
@@ -4671,7 +4674,7 @@ function gs({
4671
4674
  tooltip: "Text",
4672
4675
  onClick: () => c("text"),
4673
4676
  className: "h-10 p-4",
4674
- children: /* @__PURE__ */ e(ci, { className: G("size-5", a) })
4677
+ children: /* @__PURE__ */ e(cl, { className: G("size-5", a) })
4675
4678
  }
4676
4679
  ),
4677
4680
  /* @__PURE__ */ e(
@@ -4695,13 +4698,13 @@ function gs({
4695
4698
  )
4696
4699
  ] });
4697
4700
  }
4698
- function Ll({
4701
+ function Li({
4699
4702
  chartType: t,
4700
4703
  className: a,
4701
4704
  customIcon: n,
4702
4705
  componentName: s
4703
4706
  }) {
4704
- const i = ds();
4707
+ const l = ds();
4705
4708
  switch (t) {
4706
4709
  case "bar":
4707
4710
  return /* @__PURE__ */ e(gn, { className: a });
@@ -4734,22 +4737,22 @@ function Ll({
4734
4737
  case "map":
4735
4738
  return /* @__PURE__ */ e(Ha, { className: a });
4736
4739
  case "custom":
4737
- return n && i ? /* @__PURE__ */ e(i, { className: a }) : s ? s == null ? void 0 : s.charAt(0).toUpperCase() : /* @__PURE__ */ e($a, { className: a });
4740
+ return n && l ? /* @__PURE__ */ e(l, { className: a }) : s ? s == null ? void 0 : s.charAt(0).toUpperCase() : /* @__PURE__ */ e($a, { className: a });
4738
4741
  default:
4739
4742
  return /* @__PURE__ */ e(bn, { className: a });
4740
4743
  }
4741
4744
  }
4742
- function El() {
4743
- var o, l;
4744
- const [t, a] = J(!1), n = f((u) => u.card), s = n.type, i = _((u) => u.isVisualEditing);
4745
+ function Ei() {
4746
+ var o, i;
4747
+ const [t, a] = J(!1), n = f((u) => u.card), s = n.type, l = _((u) => u.isVisualEditing);
4745
4748
  return /* @__PURE__ */ r(Je, { open: t, onOpenChange: a, children: [
4746
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(ee, { size: "sm", variant: i ? "ghost" : "outline", children: /* @__PURE__ */ e(
4747
- Ll,
4749
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(ee, { size: "sm", variant: l ? "ghost" : "outline", children: /* @__PURE__ */ e(
4750
+ Li,
4748
4751
  {
4749
4752
  className: "size-4",
4750
4753
  chartType: s,
4751
4754
  customIcon: (o = n.customCardPreferences) == null ? void 0 : o.icon,
4752
- componentName: (l = n.customCardPreferences) == null ? void 0 : l.componentName
4755
+ componentName: (i = n.customCardPreferences) == null ? void 0 : i.componentName
4753
4756
  }
4754
4757
  ) }) }),
4755
4758
  /* @__PURE__ */ r(
@@ -4764,7 +4767,7 @@ function El() {
4764
4767
  onChartTypeChange: () => a(!1)
4765
4768
  }
4766
4769
  ),
4767
- /* @__PURE__ */ e(zl, { onChartTypeChange: () => a(!1) })
4770
+ /* @__PURE__ */ e(zi, { onChartTypeChange: () => a(!1) })
4768
4771
  ]
4769
4772
  }
4770
4773
  )
@@ -4772,22 +4775,22 @@ function El() {
4772
4775
  }
4773
4776
  const pt = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
4774
4777
  function Rn(t, a) {
4775
- var s, i, o;
4778
+ var s, l, o;
4776
4779
  const n = Ca(t, a);
4777
- return ((o = (i = (s = t == null ? void 0 : t.chartOptions) == null ? void 0 : s.scales) == null ? void 0 : i[n]) == null ? void 0 : o.type) || "linear";
4780
+ return ((o = (l = (s = t == null ? void 0 : t.chartOptions) == null ? void 0 : s.scales) == null ? void 0 : l[n]) == null ? void 0 : o.type) || "linear";
4778
4781
  }
4779
- function _l() {
4782
+ function _i() {
4780
4783
  var b, T, H, F, D, w;
4781
4784
  const [t, a] = J(!1), n = f((L) => {
4782
4785
  var E;
4783
4786
  return (E = L.card) == null ? void 0 : E.preferences;
4784
- }), s = Ca(n, {}), [i, o] = J(
4787
+ }), s = Ca(n, {}), [l, o] = J(
4785
4788
  Rn(n)
4786
- ), [l, u] = J(
4789
+ ), [i, u] = J(
4787
4790
  ((H = (T = (b = n == null ? void 0 : n.chartOptions) == null ? void 0 : b.scales) == null ? void 0 : T[s]) == null ? void 0 : H.min) || ""
4788
4791
  ), [c, h] = J(
4789
4792
  ((w = (D = (F = n == null ? void 0 : n.chartOptions) == null ? void 0 : F.scales) == null ? void 0 : D[s]) == null ? void 0 : w.max) || ""
4790
- ), [d, y] = J(l || c ? "custom" : "auto"), [x, m] = J(""), [C, p] = J(0), [v, g] = J(""), [N, S] = J(""), [z, k] = J(""), O = f(
4793
+ ), [d, y] = J(i || c ? "custom" : "auto"), [x, m] = J(""), [C, p] = J(0), [v, g] = J(""), [N, S] = J(""), [z, k] = J(""), O = f(
4791
4794
  (L) => L.actions.setCardPreferences
4792
4795
  ), { updateCardInFrame: R } = W(), j = f((L) => L.card), Y = f((L) => {
4793
4796
  var E;
@@ -4876,7 +4879,7 @@ function _l() {
4876
4879
  he,
4877
4880
  {
4878
4881
  id: "min",
4879
- value: l,
4882
+ value: i,
4880
4883
  onChange: (L) => u((E) => V(E, L.target.value)),
4881
4884
  className: `col-span-1 h-8 w-full ${pt}`
4882
4885
  }
@@ -4909,7 +4912,7 @@ function _l() {
4909
4912
  var Q;
4910
4913
  let L = {};
4911
4914
  d === "custom" && (L = {
4912
- min: l,
4915
+ min: i,
4913
4916
  max: c,
4914
4917
  ticks: {
4915
4918
  stepSize: x
@@ -4923,8 +4926,8 @@ function _l() {
4923
4926
  ...(Q = n == null ? void 0 : n.chartOptions) == null ? void 0 : Q.scales,
4924
4927
  [s]: {
4925
4928
  // ...cardPreferences?.chartOptions?.scales?.[axis],
4926
- type: i,
4927
- ...i === "linear" ? L : {}
4929
+ type: l,
4930
+ ...l === "linear" ? L : {}
4928
4931
  }
4929
4932
  }
4930
4933
  },
@@ -4943,7 +4946,7 @@ function _l() {
4943
4946
  R(se);
4944
4947
  }
4945
4948
  return /* @__PURE__ */ r(Je, { onOpenChange: (L) => a(L), children: [
4946
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Format Number", children: /* @__PURE__ */ e(vi, { className: "size-4" }) }) }),
4949
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Format Number", children: /* @__PURE__ */ e(vl, { className: "size-4" }) }) }),
4947
4950
  /* @__PURE__ */ e(mn, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
4948
4951
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
4949
4952
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Format Options" }),
@@ -4958,7 +4961,7 @@ function _l() {
4958
4961
  ke,
4959
4962
  {
4960
4963
  disabled: M,
4961
- value: i,
4964
+ value: l,
4962
4965
  onValueChange: (L) => o(L),
4963
4966
  children: [
4964
4967
  /* @__PURE__ */ e(Me, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e(De, {}) }),
@@ -4971,7 +4974,7 @@ function _l() {
4971
4974
  }
4972
4975
  )
4973
4976
  ] }),
4974
- i == "linear" && /* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
4977
+ l == "linear" && /* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
4975
4978
  /* @__PURE__ */ e(U, { htmlFor: "scale-option", children: "Setup" }),
4976
4979
  /* @__PURE__ */ r(
4977
4980
  Na,
@@ -4995,7 +4998,7 @@ function _l() {
4995
4998
  }
4996
4999
  )
4997
5000
  ] }),
4998
- d === "custom" && i == "linear" && $(),
5001
+ d === "custom" && l == "linear" && $(),
4999
5002
  /* @__PURE__ */ e(xr, {}),
5000
5003
  /* @__PURE__ */ e("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e(
5001
5004
  ee,
@@ -5010,7 +5013,7 @@ function _l() {
5010
5013
  ] }) })
5011
5014
  ] });
5012
5015
  }
5013
- function Vl() {
5016
+ function Vi() {
5014
5017
  const t = f(
5015
5018
  (u) => {
5016
5019
  var c, h, d, y;
@@ -5026,7 +5029,7 @@ function Vl() {
5026
5029
  var c, h, d, y;
5027
5030
  return (y = (d = (h = (c = u.card.preferences) == null ? void 0 : c.chartOptions) == null ? void 0 : h.plugins) == null ? void 0 : d.legend) == null ? void 0 : y.display;
5028
5031
  }
5029
- ), { setLegendOptions: s } = W(), i = (u) => {
5032
+ ), { setLegendOptions: s } = W(), l = (u) => {
5030
5033
  s({
5031
5034
  display: u,
5032
5035
  position: t,
@@ -5038,7 +5041,7 @@ function Vl() {
5038
5041
  position: u,
5039
5042
  align: a
5040
5043
  });
5041
- }, l = (u) => {
5044
+ }, i = (u) => {
5042
5045
  s({
5043
5046
  display: n,
5044
5047
  position: t,
@@ -5046,7 +5049,7 @@ function Vl() {
5046
5049
  });
5047
5050
  };
5048
5051
  return /* @__PURE__ */ r(Je, { children: [
5049
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Oi, { className: "size-4" }) }) }),
5052
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Ol, { className: "size-4" }) }) }),
5050
5053
  /* @__PURE__ */ e(mn, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
5051
5054
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5052
5055
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Legend Options" }),
@@ -5059,7 +5062,7 @@ function Vl() {
5059
5062
  Sa,
5060
5063
  {
5061
5064
  checked: n,
5062
- onCheckedChange: i,
5065
+ onCheckedChange: l,
5063
5066
  id: "displayLegend"
5064
5067
  }
5065
5068
  ) })
@@ -5081,7 +5084,7 @@ function Vl() {
5081
5084
  {
5082
5085
  tooltip: "Left",
5083
5086
  onClick: () => o("left"),
5084
- children: /* @__PURE__ */ e(ai, { className: "size-4" })
5087
+ children: /* @__PURE__ */ e(al, { className: "size-4" })
5085
5088
  }
5086
5089
  ),
5087
5090
  /* @__PURE__ */ e(
@@ -5097,7 +5100,7 @@ function Vl() {
5097
5100
  {
5098
5101
  tooltip: "Right",
5099
5102
  onClick: () => o("right"),
5100
- children: /* @__PURE__ */ e(si, { className: "size-4" })
5103
+ children: /* @__PURE__ */ e(sl, { className: "size-4" })
5101
5104
  }
5102
5105
  )
5103
5106
  ] })
@@ -5109,7 +5112,7 @@ function Vl() {
5109
5112
  X,
5110
5113
  {
5111
5114
  tooltip: "Start",
5112
- onClick: () => l("start"),
5115
+ onClick: () => i("start"),
5113
5116
  children: /* @__PURE__ */ e(Zr, { className: "size-4" })
5114
5117
  }
5115
5118
  ),
@@ -5117,7 +5120,7 @@ function Vl() {
5117
5120
  X,
5118
5121
  {
5119
5122
  tooltip: "Center",
5120
- onClick: () => l("center"),
5123
+ onClick: () => i("center"),
5121
5124
  children: /* @__PURE__ */ e(Yr, { className: "size-4" })
5122
5125
  }
5123
5126
  ),
@@ -5125,7 +5128,7 @@ function Vl() {
5125
5128
  X,
5126
5129
  {
5127
5130
  tooltip: "End",
5128
- onClick: () => l("end"),
5131
+ onClick: () => i("end"),
5129
5132
  children: /* @__PURE__ */ e(Xr, { className: "size-4" })
5130
5133
  }
5131
5134
  )
@@ -5136,35 +5139,35 @@ function Vl() {
5136
5139
  ] }) })
5137
5140
  ] });
5138
5141
  }
5139
- function ql() {
5142
+ function qi() {
5140
5143
  var o;
5141
- const t = f((l) => l.card.preferences), { setCardPreferences: a, setChartOrientation: n } = f(
5142
- (l) => l.actions
5144
+ const t = f((i) => i.card.preferences), { setCardPreferences: a, setChartOrientation: n } = f(
5145
+ (i) => i.actions
5143
5146
  );
5144
- function s(l) {
5145
- n(l);
5147
+ function s(i) {
5148
+ n(i);
5146
5149
  }
5147
- const i = ((o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis) || // cardCfg?.options?.indexAxis ||
5150
+ const l = ((o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis) || // cardCfg?.options?.indexAxis ||
5148
5151
  "x";
5149
5152
  return /* @__PURE__ */ e(
5150
5153
  X,
5151
5154
  {
5152
- onClick: () => s(i === "y" ? "x" : "y"),
5155
+ onClick: () => s(l === "y" ? "x" : "y"),
5153
5156
  tooltip: "Chart Orientation",
5154
- children: i === "y" ? /* @__PURE__ */ e(Vi, { className: "size-4" }) : /* @__PURE__ */ e(_i, { className: "size-4" })
5157
+ children: l === "y" ? /* @__PURE__ */ e(Vl, { className: "size-4" }) : /* @__PURE__ */ e(_l, { className: "size-4" })
5155
5158
  }
5156
5159
  );
5157
5160
  }
5158
- function Rl() {
5159
- const t = f((l) => l.card), a = f((l) => l.isShowingVisual), n = f(
5160
- (l) => {
5161
+ function Ri() {
5162
+ const t = f((i) => i.card), a = f((i) => i.isShowingVisual), n = f(
5163
+ (i) => {
5161
5164
  var u, c;
5162
- return (c = (u = l.card) == null ? void 0 : u.preferences) == null ? void 0 : c.chartOptions;
5165
+ return (c = (u = i.card) == null ? void 0 : u.preferences) == null ? void 0 : c.chartOptions;
5163
5166
  }
5164
- ), s = ka(n), { setChartGrid: i } = W();
5167
+ ), s = ka(n), { setChartGrid: l } = W();
5165
5168
  function o() {
5166
- const l = ["xy", "none", "x", "y"], c = (l.indexOf(s) + 1) % l.length;
5167
- i(l[c]);
5169
+ const i = ["xy", "none", "x", "y"], c = (i.indexOf(s) + 1) % i.length;
5170
+ l(i[c]);
5168
5171
  }
5169
5172
  return a ? /* @__PURE__ */ r("div", { "data-info": "visual-settings", className: "flex items-center", children: [
5170
5173
  [
@@ -5174,10 +5177,10 @@ function Rl() {
5174
5177
  "stackedBar",
5175
5178
  "stackedLine",
5176
5179
  "horizontalBar"
5177
- ].includes(t.type) && /* @__PURE__ */ e(ql, {}),
5180
+ ].includes(t.type) && /* @__PURE__ */ e(qi, {}),
5178
5181
  !["kpi", "text", "custom", "table"].includes(t.type) && /* @__PURE__ */ r(ae, { children: [
5179
- /* @__PURE__ */ e(_l, {}),
5180
- /* @__PURE__ */ e(Vl, {})
5182
+ /* @__PURE__ */ e(_i, {}),
5183
+ /* @__PURE__ */ e(Vi, {})
5181
5184
  ] }),
5182
5185
  ![
5183
5186
  "pie",
@@ -5190,16 +5193,16 @@ function Rl() {
5190
5193
  "text",
5191
5194
  "map"
5192
5195
  ].includes(t.type) && /* @__PURE__ */ r(X, { tooltip: "Grid Style", onClick: o, children: [
5193
- (s === "xy" || !s) && /* @__PURE__ */ e(Mi, { className: "size-4" }),
5194
- s === "x" && /* @__PURE__ */ e(fi, { className: "size-4" }),
5195
- s === "y" && /* @__PURE__ */ e(ji, { className: "size-4" }),
5196
- s === "none" && /* @__PURE__ */ e(Gi, { className: "size-4" })
5196
+ (s === "xy" || !s) && /* @__PURE__ */ e(Ml, { className: "size-4" }),
5197
+ s === "x" && /* @__PURE__ */ e(fl, { className: "size-4" }),
5198
+ s === "y" && /* @__PURE__ */ e(jl, { className: "size-4" }),
5199
+ s === "none" && /* @__PURE__ */ e(Gl, { className: "size-4" })
5197
5200
  ] })
5198
5201
  ] }) : null;
5199
5202
  }
5200
5203
  function ft() {
5201
5204
  var F;
5202
- const t = f((D) => D.frame), a = f((D) => D.card), n = f((D) => D.isDevMode), s = f((D) => D.isShowingVisual), i = _((D) => D.isVisualEditing), o = f((D) => D.isSqlRunning), l = f((D) => D.pythonStdOut), u = f(
5205
+ const t = f((D) => D.frame), a = f((D) => D.card), n = f((D) => D.isDevMode), s = f((D) => D.isShowingVisual), l = _((D) => D.isVisualEditing), o = f((D) => D.isSqlRunning), i = f((D) => D.pythonStdOut), u = f(
5203
5206
  (D) => {
5204
5207
  var w;
5205
5208
  return (w = D.card.preferences) == null ? void 0 : w.chartOptions;
@@ -5299,7 +5302,7 @@ function ft() {
5299
5302
  displayTab: L
5300
5303
  });
5301
5304
  },
5302
- children: w.displayTab === !0 || w.displayTab === void 0 ? /* @__PURE__ */ e(wr, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(Ci, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
5305
+ children: w.displayTab === !0 || w.displayTab === void 0 ? /* @__PURE__ */ e(wr, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(Cl, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
5303
5306
  }
5304
5307
  );
5305
5308
  }
@@ -5313,37 +5316,38 @@ function ft() {
5313
5316
  children: [
5314
5317
  t.cards.map((D) => /* @__PURE__ */ e(yt, { className: "mt-0 grow", value: D.id, children: I() }, D.id)),
5315
5318
  /* @__PURE__ */ e(un, { className: "group mx-4 justify-between overflow-x-auto", children: /* @__PURE__ */ r("div", { className: "flex items-center", children: [
5316
- t.cards.map((D, w) => /* @__PURE__ */ e(
5317
- et,
5319
+ t.cards.map((D, w) => /* @__PURE__ */ r(
5320
+ tt,
5318
5321
  {
5319
- text: D.tabTitle || D.title,
5320
- onSave: (L) => {
5321
- d({ ...a, tabTitle: L }), y({ ...a, tabTitle: L });
5322
- },
5323
- children: /* @__PURE__ */ r(
5324
- tt,
5325
- {
5326
- draggable: !0,
5327
- onDragStart: (L) => Y(L, w),
5328
- onDragOver: M,
5329
- onDrop: (L) => V(L, w),
5330
- className: "",
5331
- value: D.id,
5332
- children: [
5333
- Z(t, D),
5334
- D.tabTitle || D.title,
5335
- t.activeCardId === D.id && t.cards.length > 1 && /* @__PURE__ */ e(
5336
- Ce,
5337
- {
5338
- className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
5339
- onClick: () => O(D.id)
5340
- }
5341
- )
5342
- ]
5343
- }
5344
- )
5345
- },
5346
- D.id
5322
+ draggable: !0,
5323
+ onDragStart: (L) => Y(L, w),
5324
+ onDragOver: M,
5325
+ onDrop: (L) => V(L, w),
5326
+ className: "",
5327
+ value: D.id,
5328
+ children: [
5329
+ Z(t, D),
5330
+ /* @__PURE__ */ e(
5331
+ et,
5332
+ {
5333
+ enabled: t.activeCardId === D.id,
5334
+ text: D.tabTitle || D.title,
5335
+ onSave: (L) => {
5336
+ d({ ...a, tabTitle: L }), y({ ...a, tabTitle: L });
5337
+ },
5338
+ children: D.tabTitle || D.title
5339
+ },
5340
+ D.id
5341
+ ),
5342
+ t.activeCardId === D.id && t.cards.length > 1 && /* @__PURE__ */ e(
5343
+ Ce,
5344
+ {
5345
+ className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
5346
+ onClick: () => O(D.id)
5347
+ }
5348
+ )
5349
+ ]
5350
+ }
5347
5351
  )),
5348
5352
  /* @__PURE__ */ e(
5349
5353
  ee,
@@ -5360,7 +5364,7 @@ function ft() {
5360
5364
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
5361
5365
  variant: "outline",
5362
5366
  onClick: k,
5363
- children: /* @__PURE__ */ e(yi, { className: "h-4 w-4" })
5367
+ children: /* @__PURE__ */ e(yl, { className: "h-4 w-4" })
5364
5368
  }
5365
5369
  )
5366
5370
  ] }) })
@@ -5369,7 +5373,7 @@ function ft() {
5369
5373
  );
5370
5374
  }
5371
5375
  function I() {
5372
- return a.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(Nr, { card: a, data: p == null ? void 0 : p.records }) }) }) : a.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(it, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e(
5376
+ return a.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(Nr, { card: a, data: p == null ? void 0 : p.records }) }) }) : a.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(lt, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e(
5373
5377
  Sr,
5374
5378
  {
5375
5379
  isLoading: o,
@@ -5408,9 +5412,9 @@ function ft() {
5408
5412
  className: "z-10 mb-0 flex min-h-10 items-center justify-end gap-2 px-6",
5409
5413
  children: [
5410
5414
  s && /* @__PURE__ */ r("div", { className: "flex grow items-center", children: [
5411
- /* @__PURE__ */ e(El, {}),
5412
- i && /* @__PURE__ */ e(X, { tooltip: "Visual Docs", onClick: H, children: /* @__PURE__ */ e(oi, { className: "size-4" }) }),
5413
- !["table", "custom"].includes(a.type) && i && /* @__PURE__ */ e(Tl, {})
5415
+ /* @__PURE__ */ e(Ei, {}),
5416
+ l && /* @__PURE__ */ e(X, { tooltip: "Visual Docs", onClick: H, children: /* @__PURE__ */ e(ol, { className: "size-4" }) }),
5417
+ !["table", "custom"].includes(a.type) && l && /* @__PURE__ */ e(Ti, {})
5414
5418
  ] }),
5415
5419
  !s && /* @__PURE__ */ r("div", { className: "flex grow items-center gap-1", children: [
5416
5420
  /* @__PURE__ */ e(
@@ -5420,7 +5424,7 @@ function ft() {
5420
5424
  variant: "ghost",
5421
5425
  size: "icon",
5422
5426
  onClick: T,
5423
- children: /* @__PURE__ */ e(Fl, { className: "size-4" })
5427
+ children: /* @__PURE__ */ e(Fi, { className: "size-4" })
5424
5428
  }
5425
5429
  ),
5426
5430
  /* @__PURE__ */ e(
@@ -5430,7 +5434,7 @@ function ft() {
5430
5434
  variant: "ghost",
5431
5435
  size: "icon",
5432
5436
  onClick: b,
5433
- children: /* @__PURE__ */ e(Si, { strokeWidth: 1.5, className: "size-4" })
5437
+ children: /* @__PURE__ */ e(Sl, { strokeWidth: 1.5, className: "size-4" })
5434
5438
  }
5435
5439
  ),
5436
5440
  /* @__PURE__ */ e(
@@ -5441,8 +5445,8 @@ function ft() {
5441
5445
  }
5442
5446
  )
5443
5447
  ] }),
5444
- /* @__PURE__ */ e(Rl, {}),
5445
- n && /* @__PURE__ */ e(Bl, {})
5448
+ /* @__PURE__ */ e(Ri, {}),
5449
+ n && /* @__PURE__ */ e(Bi, {})
5446
5450
  ]
5447
5451
  }
5448
5452
  ),
@@ -5452,7 +5456,7 @@ function ft() {
5452
5456
  className: "px-6",
5453
5457
  direction: "horizontal",
5454
5458
  children: [
5455
- l && /* @__PURE__ */ r(ae, { children: [
5459
+ i && /* @__PURE__ */ r(ae, { children: [
5456
5460
  /* @__PURE__ */ e(
5457
5461
  pe,
5458
5462
  {
@@ -5461,7 +5465,7 @@ function ft() {
5461
5465
  defaultSize: 30,
5462
5466
  minSize: 10,
5463
5467
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
5464
- children: l && /* @__PURE__ */ e(jl, {})
5468
+ children: i && /* @__PURE__ */ e(ji, {})
5465
5469
  }
5466
5470
  ),
5467
5471
  /* @__PURE__ */ e(Be, {})
@@ -5474,7 +5478,7 @@ function ft() {
5474
5478
  minSize: 10,
5475
5479
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
5476
5480
  children: [
5477
- (p == null ? void 0 : p.records) && (p == null ? void 0 : p.records.length) > 0 && /* @__PURE__ */ e(kl, { data: (p == null ? void 0 : p.records) || [] }),
5481
+ (p == null ? void 0 : p.records) && (p == null ? void 0 : p.records.length) > 0 && /* @__PURE__ */ e(ki, { data: (p == null ? void 0 : p.records) || [] }),
5478
5482
  (N || (p == null ? void 0 : p.error)) && /* @__PURE__ */ e("span", { className: "font-mono text-xs", children: (N == null ? void 0 : N.message) || ((F = p == null ? void 0 : p.error) == null ? void 0 : F.message) })
5479
5483
  ]
5480
5484
  }
@@ -5486,19 +5490,19 @@ function ft() {
5486
5490
  }
5487
5491
  );
5488
5492
  }
5489
- function jl() {
5493
+ function ji() {
5490
5494
  const t = f((n) => n.pythonStdOut);
5491
5495
  if (!t) return null;
5492
5496
  const a = t.replace(/\n/g, "<br>");
5493
5497
  return /* @__PURE__ */ r("div", { className: "relative flex w-full flex-col border-r", children: [
5494
5498
  /* @__PURE__ */ e("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" }),
5495
- /* @__PURE__ */ r(it, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
5499
+ /* @__PURE__ */ r(lt, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
5496
5500
  /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: a } }),
5497
5501
  /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
5498
5502
  ] })
5499
5503
  ] });
5500
5504
  }
5501
- function Bl() {
5505
+ function Bi() {
5502
5506
  const t = f((n) => n.isShowingVisual), a = f(
5503
5507
  (n) => n.actions.setIsShowingVisual
5504
5508
  );
@@ -5515,11 +5519,11 @@ function Bl() {
5515
5519
  )
5516
5520
  ] });
5517
5521
  }
5518
- function Pl() {
5522
+ function Pi() {
5519
5523
  var p, v;
5520
5524
  const t = f(
5521
5525
  (g) => g.card.customCardPreferences
5522
- ), { data: a } = us(), n = (a == null ? void 0 : a.plugins) || [], s = f((g) => g.card), i = f((g) => g.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: l } = W(), { components: u, manifest: c } = ya(
5526
+ ), { data: a } = us(), n = (a == null ? void 0 : a.plugins) || [], s = f((g) => g.card), l = f((g) => g.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: i } = W(), { components: u, manifest: c } = ya(
5523
5527
  (t == null ? void 0 : t.url) || ""
5524
5528
  ), h = (p = c == null ? void 0 : c.visuals) == null ? void 0 : p.find(
5525
5529
  (g) => g.name === (t == null ? void 0 : t.componentName)
@@ -5533,14 +5537,14 @@ function Pl() {
5533
5537
  hookRef: null
5534
5538
  }
5535
5539
  };
5536
- l({
5540
+ i({
5537
5541
  ...t,
5538
5542
  dataInputCardIds: z
5539
5543
  });
5540
5544
  }
5541
5545
  function y(g) {
5542
5546
  var S, z;
5543
- const N = (S = i == null ? void 0 : i.cards) == null ? void 0 : S.filter((k) => {
5547
+ const N = (S = l == null ? void 0 : l.cards) == null ? void 0 : S.filter((k) => {
5544
5548
  var O;
5545
5549
  return ((O = k == null ? void 0 : k.customCardPreferences) == null ? void 0 : O.visualType) !== "multiple";
5546
5550
  }).map((k) => ({
@@ -5579,7 +5583,7 @@ function Pl() {
5579
5583
  className: `h-8 w-full ${ze}`,
5580
5584
  value: ((k = t == null ? void 0 : t.settings) == null ? void 0 : k[N]) || z,
5581
5585
  onChange: (R) => {
5582
- l({
5586
+ i({
5583
5587
  ...t,
5584
5588
  settings: {
5585
5589
  ...t == null ? void 0 : t.settings,
@@ -5597,7 +5601,7 @@ function Pl() {
5597
5601
  options: S,
5598
5602
  value: ((O = t == null ? void 0 : t.settings) == null ? void 0 : O[N]) || z,
5599
5603
  onValueChange: (R) => {
5600
- l({
5604
+ i({
5601
5605
  ...t,
5602
5606
  settings: { ...t == null ? void 0 : t.settings, [N]: R }
5603
5607
  });
@@ -5618,7 +5622,7 @@ function Pl() {
5618
5622
  ] }, S)) });
5619
5623
  }
5620
5624
  function C(g) {
5621
- t && l({
5625
+ t && i({
5622
5626
  ...t,
5623
5627
  visualType: g,
5624
5628
  componentName: ""
@@ -5631,19 +5635,19 @@ function Pl() {
5631
5635
  defaultValue: ["component-settings"],
5632
5636
  className: "px-6 py-2",
5633
5637
  children: [
5634
- /* @__PURE__ */ r(le, { value: "plugin-settings", children: [
5638
+ /* @__PURE__ */ r(ie, { value: "plugin-settings", children: [
5635
5639
  /* @__PURE__ */ e(oe, { children: "Plugin" }),
5636
5640
  /* @__PURE__ */ e(ce, { children: /* @__PURE__ */ r("div", { className: "space-y-4 text-sm", children: [
5637
5641
  /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
5638
5642
  /* @__PURE__ */ e(
5639
5643
  ye,
5640
5644
  {
5641
- icon: /* @__PURE__ */ e(li, { className: "h-3.5 w-3.5" }),
5645
+ icon: /* @__PURE__ */ e(il, { className: "h-3.5 w-3.5" }),
5642
5646
  className: "h-9 w-full",
5643
5647
  label: "Select Plugin",
5644
5648
  options: n,
5645
5649
  value: (t == null ? void 0 : t.url) || "",
5646
- onValueChange: (g) => l({
5650
+ onValueChange: (g) => i({
5647
5651
  ...t || {
5648
5652
  url: "",
5649
5653
  componentName: ""
@@ -5667,7 +5671,7 @@ function Pl() {
5667
5671
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(ae, { children: u && /* @__PURE__ */ e(
5668
5672
  ye,
5669
5673
  {
5670
- icon: /* @__PURE__ */ e(gi, { className: "h-3.5 w-3.5" }),
5674
+ icon: /* @__PURE__ */ e(gl, { className: "h-3.5 w-3.5" }),
5671
5675
  className: "h-9 w-full",
5672
5676
  label: "Select Component",
5673
5677
  options: (u == null ? void 0 : u.filter((g) => g.type === o).map((g) => ({
@@ -5676,7 +5680,7 @@ function Pl() {
5676
5680
  }))) || [],
5677
5681
  value: t.componentName,
5678
5682
  onValueChange: (g) => {
5679
- console.log("changing value", g), l({
5683
+ console.log("changing value", g), i({
5680
5684
  ...t,
5681
5685
  componentName: g
5682
5686
  });
@@ -5685,7 +5689,7 @@ function Pl() {
5685
5689
  ) })
5686
5690
  ] }) })
5687
5691
  ] }),
5688
- ((v = s == null ? void 0 : s.customCardPreferences) == null ? void 0 : v.componentName) && /* @__PURE__ */ r(le, { className: "border-none", value: "component-settings", children: [
5692
+ ((v = s == null ? void 0 : s.customCardPreferences) == null ? void 0 : v.componentName) && /* @__PURE__ */ r(ie, { className: "border-none", value: "component-settings", children: [
5689
5693
  /* @__PURE__ */ e(oe, { children: "Settings" }),
5690
5694
  /* @__PURE__ */ r(ce, { children: [
5691
5695
  h && h.dataInputs && /* @__PURE__ */ r("div", { className: "space-y-3", children: [
@@ -5700,7 +5704,7 @@ function Pl() {
5700
5704
  );
5701
5705
  }
5702
5706
  function Ye() {
5703
- const [t, a] = J([]), n = f((h) => h.card.preferences), { setFilterOnClickColumnIndex: s, setCardPreferences: i } = f(
5707
+ const [t, a] = J([]), n = f((h) => h.card.preferences), { setFilterOnClickColumnIndex: s, setCardPreferences: l } = f(
5704
5708
  (h) => h.actions
5705
5709
  ), o = f(
5706
5710
  (h) => h.queryResultColumns
@@ -5713,9 +5717,9 @@ function Ye() {
5713
5717
  ), me(() => {
5714
5718
  o && a(new Array(o.length).fill(!1));
5715
5719
  }, [o]);
5716
- function l(h, d) {
5720
+ function i(h, d) {
5717
5721
  var y, x;
5718
- d ? n != null && n.onClickFilter && ((y = n == null ? void 0 : n.onClickFilter) == null ? void 0 : y.length) > 0 ? i({
5722
+ d ? n != null && n.onClickFilter && ((y = n == null ? void 0 : n.onClickFilter) == null ? void 0 : y.length) > 0 ? l({
5719
5723
  ...n,
5720
5724
  onClickFilter: [
5721
5725
  ...n.onClickFilter,
@@ -5724,7 +5728,7 @@ function Ye() {
5724
5728
  expression: ""
5725
5729
  }
5726
5730
  ]
5727
- }) : i({
5731
+ }) : l({
5728
5732
  ...n,
5729
5733
  onClickFilter: [
5730
5734
  {
@@ -5732,7 +5736,7 @@ function Ye() {
5732
5736
  expression: ""
5733
5737
  }
5734
5738
  ]
5735
- }) : (i({
5739
+ }) : (l({
5736
5740
  ...n,
5737
5741
  onClickFilter: (x = n == null ? void 0 : n.onClickFilter) == null ? void 0 : x.filter(
5738
5742
  (m) => m.columnIndex !== h
@@ -5748,7 +5752,7 @@ function Ye() {
5748
5752
  ...m,
5749
5753
  expression: d.target.value
5750
5754
  } : m);
5751
- i({
5755
+ l({
5752
5756
  ...n,
5753
5757
  onClickFilter: y
5754
5758
  });
@@ -5783,7 +5787,7 @@ function Ye() {
5783
5787
  checked: !!((y = n == null ? void 0 : n.onClickFilter) != null && y.find(
5784
5788
  (m) => m.columnIndex === d
5785
5789
  )),
5786
- onCheckedChange: (m) => l(d, m)
5790
+ onCheckedChange: (m) => i(d, m)
5787
5791
  }
5788
5792
  ),
5789
5793
  /* @__PURE__ */ e(
@@ -5816,7 +5820,7 @@ function Ye() {
5816
5820
  })
5817
5821
  ] });
5818
5822
  }
5819
- function Hl({ idx: t }) {
5823
+ function Hi({ idx: t }) {
5820
5824
  var u;
5821
5825
  const a = f((c) => {
5822
5826
  var h;
@@ -5828,8 +5832,8 @@ function Hl({ idx: t }) {
5828
5832
  }
5829
5833
  ), s = f(
5830
5834
  (c) => c.actions.setCardPreferences
5831
- ), i = (u = a == null ? void 0 : a.chartOptions) == null ? void 0 : u.indexAxis, o = n == null ? void 0 : n.find((c) => c.idx === t);
5832
- function l(c, h) {
5835
+ ), l = (u = a == null ? void 0 : a.chartOptions) == null ? void 0 : u.indexAxis, o = n == null ? void 0 : n.find((c) => c.idx === t);
5836
+ function i(c, h) {
5833
5837
  (c === "end" || c === "start") && kr(Mr());
5834
5838
  const d = {
5835
5839
  display: c !== "none",
@@ -5861,12 +5865,12 @@ function Hl({ idx: t }) {
5861
5865
  }
5862
5866
  }
5863
5867
  return /* @__PURE__ */ r(Je, { children: [
5864
- /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(Ui, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
5868
+ /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(Ul, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
5865
5869
  /* @__PURE__ */ e(It, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
5866
5870
  /* @__PURE__ */ e(
5867
5871
  "button",
5868
5872
  {
5869
- onClick: () => l("none", t),
5873
+ onClick: () => i("none", t),
5870
5874
  className: "h-7 p-1 text-xs font-normal",
5871
5875
  children: /* @__PURE__ */ e(Ce, { className: "size-3.5" })
5872
5876
  }
@@ -5874,13 +5878,13 @@ function Hl({ idx: t }) {
5874
5878
  /* @__PURE__ */ e(
5875
5879
  "button",
5876
5880
  {
5877
- onClick: () => l("start", t),
5881
+ onClick: () => i("start", t),
5878
5882
  className: "h-7 p-1 text-xs font-normal",
5879
5883
  children: /* @__PURE__ */ e(
5880
- Ti,
5884
+ Tl,
5881
5885
  {
5882
5886
  className: G("h-4 w-4", {
5883
- "rotate-90": i === "y"
5887
+ "rotate-90": l === "y"
5884
5888
  })
5885
5889
  }
5886
5890
  )
@@ -5889,13 +5893,13 @@ function Hl({ idx: t }) {
5889
5893
  /* @__PURE__ */ e(
5890
5894
  "button",
5891
5895
  {
5892
- onClick: () => l("center", t),
5896
+ onClick: () => i("center", t),
5893
5897
  className: "h-7 p-1 text-xs font-normal",
5894
5898
  children: /* @__PURE__ */ e(
5895
- Ai,
5899
+ Al,
5896
5900
  {
5897
5901
  className: G("h-4 w-4", {
5898
- "rotate-90": i === "y"
5902
+ "rotate-90": l === "y"
5899
5903
  })
5900
5904
  }
5901
5905
  )
@@ -5904,13 +5908,13 @@ function Hl({ idx: t }) {
5904
5908
  /* @__PURE__ */ e(
5905
5909
  "button",
5906
5910
  {
5907
- onClick: () => l("end", t),
5911
+ onClick: () => i("end", t),
5908
5912
  className: "h-7 p-1 text-xs font-normal",
5909
5913
  children: /* @__PURE__ */ e(
5910
- zi,
5914
+ zl,
5911
5915
  {
5912
5916
  className: G("h-4 w-4", {
5913
- "rotate-90": i === "y"
5917
+ "rotate-90": l === "y"
5914
5918
  })
5915
5919
  }
5916
5920
  )
@@ -5920,25 +5924,25 @@ function Hl({ idx: t }) {
5920
5924
  ] });
5921
5925
  }
5922
5926
  function ys() {
5923
- const t = f((l) => l.card), { data: a } = ge(t), {
5927
+ const t = f((i) => i.card), { data: a } = ge(t), {
5924
5928
  metricKeys: n,
5925
5929
  dimensionKeys: s,
5926
- keys: i
5930
+ keys: l
5927
5931
  } = Wt((a == null ? void 0 : a.records) || []);
5928
5932
  let o = n;
5929
5933
  if (["stackedBar", "stackedLine"].includes(t.type)) {
5930
- const l = Dr({
5934
+ const i = Dr({
5931
5935
  dataArray: (a == null ? void 0 : a.records) || [],
5932
5936
  groupKey: s[0],
5933
5937
  pivotKey: s[1],
5934
5938
  valueKey: o[0]
5935
- }), { metricKeys: u } = Wt(l);
5939
+ }), { metricKeys: u } = Wt(i);
5936
5940
  o = u;
5937
5941
  }
5938
5942
  return {
5939
5943
  transformedMetricKeys: o,
5940
5944
  dimensionKeys: s,
5941
- keys: i,
5945
+ keys: l,
5942
5946
  defaultMetricKeys: n
5943
5947
  };
5944
5948
  }
@@ -5948,7 +5952,7 @@ function bs() {
5948
5952
  var h, d, y;
5949
5953
  return (y = (d = (h = c == null ? void 0 : c.card) == null ? void 0 : h.preferences) == null ? void 0 : d.chartOptions) == null ? void 0 : y.indexAxis;
5950
5954
  }
5951
- ), { data: n } = ge(t), s = a === "y" ? "Metric" : "Dimension", i = a === "y" ? "Dimension" : "Metric", { dimensionKeys: o, transformedMetricKeys: l, keys: u } = ys();
5955
+ ), { data: n } = ge(t), s = a === "y" ? "Metric" : "Dimension", l = a === "y" ? "Dimension" : "Metric", { dimensionKeys: o, transformedMetricKeys: i, keys: u } = ys();
5952
5956
  return u.length === 0 ? null : /* @__PURE__ */ r("div", { className: "space-y-4", children: [
5953
5957
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5954
5958
  /* @__PURE__ */ e(U, { children: s }),
@@ -5963,8 +5967,8 @@ function bs() {
5963
5967
  )) })
5964
5968
  ] }),
5965
5969
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5966
- /* @__PURE__ */ e(U, { children: i }),
5967
- /* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: l.map((c, h) => /* @__PURE__ */ e(
5970
+ /* @__PURE__ */ e(U, { children: l }),
5971
+ /* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: i.map((c, h) => /* @__PURE__ */ e(
5968
5972
  xs,
5969
5973
  {
5970
5974
  className: "bg-muted/70 px-3 py-2 hover:bg-muted",
@@ -5985,23 +5989,23 @@ function xs({
5985
5989
  idx: a,
5986
5990
  className: n,
5987
5991
  iconClassName: s,
5988
- children: i
5992
+ children: l
5989
5993
  }) {
5990
5994
  const o = f((d) => {
5991
5995
  var y;
5992
5996
  return (y = d.card) == null ? void 0 : y.preferences;
5993
- }), l = f(
5997
+ }), i = f(
5994
5998
  (d) => {
5995
5999
  var y, x;
5996
6000
  return (x = (y = d.card) == null ? void 0 : y.preferences) == null ? void 0 : x.datasetOptions;
5997
6001
  }
5998
- ), u = l == null ? void 0 : l.find((d) => d.idx === a), { setCardPreferences: c } = f((d) => d.actions);
6002
+ ), u = i == null ? void 0 : i.find((d) => d.idx === a), { setCardPreferences: c } = f((d) => d.actions);
5999
6003
  function h(d) {
6000
6004
  if (!u)
6001
6005
  c({
6002
6006
  ...o,
6003
6007
  datasetOptions: [
6004
- ...l || [],
6008
+ ...i || [],
6005
6009
  {
6006
6010
  idx: a,
6007
6011
  type: d === "area" ? "line" : d,
@@ -6012,7 +6016,7 @@ function xs({
6012
6016
  else {
6013
6017
  const y = { ...u };
6014
6018
  y.type = d === "area" ? "line" : d, y.fill = d === "area" ? "origin" : "";
6015
- const x = l == null ? void 0 : l.map(
6019
+ const x = i == null ? void 0 : i.map(
6016
6020
  (m) => m.idx === a ? y : m
6017
6021
  );
6018
6022
  c({
@@ -6029,7 +6033,7 @@ function xs({
6029
6033
  n
6030
6034
  ),
6031
6035
  children: [
6032
- i || /* @__PURE__ */ e("p", { title: t, children: vs(t) }),
6036
+ l || /* @__PURE__ */ e("p", { title: t, children: vs(t) }),
6033
6037
  /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
6034
6038
  /* @__PURE__ */ e(
6035
6039
  gn,
@@ -6052,7 +6056,7 @@ function xs({
6052
6056
  }
6053
6057
  ),
6054
6058
  /* @__PURE__ */ e(
6055
- mi,
6059
+ ml,
6056
6060
  {
6057
6061
  onClick: () => h("area"),
6058
6062
  className: G(
@@ -6061,14 +6065,14 @@ function xs({
6061
6065
  )
6062
6066
  }
6063
6067
  ),
6064
- /* @__PURE__ */ e(Hl, { idx: a })
6068
+ /* @__PURE__ */ e(Hi, { idx: a })
6065
6069
  ] })
6066
6070
  ]
6067
6071
  }
6068
6072
  );
6069
6073
  }
6070
6074
  function Cs() {
6071
- const t = f((m) => m.selectedConnectionId), a = f((m) => m.selectedDatamodelId), n = f((m) => m.selectedDatabaseName), s = f((m) => m.selectedSchemaName), i = f((m) => m.selectedTableName), o = _((m) => m.dashboard.filters) || [], l = _((m) => m.actions.addFilter), u = _((m) => m.actions.removeFilter), { removeFilterValues: c } = rt(), { modelItems: h, tableName: d, connectionType: y } = Ne();
6075
+ const t = f((m) => m.selectedConnectionId), a = f((m) => m.selectedDatamodelId), n = f((m) => m.selectedDatabaseName), s = f((m) => m.selectedSchemaName), l = f((m) => m.selectedTableName), o = _((m) => m.dashboard.filters) || [], i = _((m) => m.actions.addFilter), u = _((m) => m.actions.removeFilter), { removeFilterValues: c } = rt(), { modelItems: h, tableName: d, connectionType: y } = Ne();
6072
6076
  function x(m, C = "dashboard") {
6073
6077
  var R;
6074
6078
  const p = xe(m.column_name), v = xe(n || ""), g = xe(s || ""), N = xe(d);
@@ -6089,7 +6093,7 @@ function Cs() {
6089
6093
  c(O.id), u(O.id);
6090
6094
  else {
6091
6095
  const j = nt();
6092
- return d === "api" && t ? (l({
6096
+ return d === "api" && t ? (i({
6093
6097
  location: C,
6094
6098
  id: j,
6095
6099
  //uuidv4(),
@@ -6107,7 +6111,7 @@ function Cs() {
6107
6111
  p
6108
6112
  )
6109
6113
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
6110
- }), j) : (l({
6114
+ }), j) : (i({
6111
6115
  id: j,
6112
6116
  //uuidv4(),
6113
6117
  location: C,
@@ -6115,7 +6119,7 @@ function Cs() {
6115
6119
  //columnName, //`${qualifiedTableName}.${formattedColumnName}`,
6116
6120
  title: m.column_name,
6117
6121
  dataType: m.data_type,
6118
- table: i || "",
6122
+ table: l || "",
6119
6123
  database: n || "",
6120
6124
  connectionId: t || "",
6121
6125
  operation: "in",
@@ -6133,24 +6137,24 @@ function Cs() {
6133
6137
  function ot() {
6134
6138
  const t = _(
6135
6139
  (u) => u.dashboard.filters
6136
- ), a = f((u) => u.frame), { setFrame: n } = W(), { columns: s } = Ne(), { assignFilter: i } = Cs();
6140
+ ), a = f((u) => u.frame), { setFrame: n } = W(), { columns: s } = Ne(), { assignFilter: l } = Cs();
6137
6141
  function o(u) {
6138
- const c = i(u, "frame");
6142
+ const c = l(u, "frame");
6139
6143
  n({ ...a, filterId: c });
6140
6144
  }
6141
- const l = t == null ? void 0 : t.find((u) => u.id === a.filterId);
6145
+ const i = t == null ? void 0 : t.find((u) => u.id === a.filterId);
6142
6146
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
6143
6147
  /* @__PURE__ */ e(U, { children: "Card Filter" }),
6144
- /* @__PURE__ */ e(Gl, { onSelect: o, columns: s }),
6145
- l && /* @__PURE__ */ e(Ma, { filter: l })
6148
+ /* @__PURE__ */ e(Gi, { onSelect: o, columns: s }),
6149
+ i && /* @__PURE__ */ e(Ma, { filter: i })
6146
6150
  ] });
6147
6151
  }
6148
- function Gl({
6152
+ function Gi({
6149
6153
  columns: t,
6150
6154
  onSelect: a
6151
6155
  }) {
6152
- var l;
6153
- const [n, s] = Xe.useState(!1), [i, o] = Xe.useState("");
6156
+ var i;
6157
+ const [n, s] = Xe.useState(!1), [l, o] = Xe.useState("");
6154
6158
  return /* @__PURE__ */ r(Je, { open: n, onOpenChange: s, children: [
6155
6159
  /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ r(
6156
6160
  ee,
@@ -6161,7 +6165,7 @@ function Gl({
6161
6165
  "aria-expanded": n,
6162
6166
  className: "w-full justify-between font-normal",
6163
6167
  children: [
6164
- i ? (l = t.find((u) => u.column_name === i)) == null ? void 0 : l.column_name : "Select Column...",
6168
+ l ? (i = t.find((u) => u.column_name === l)) == null ? void 0 : i.column_name : "Select Column...",
6165
6169
  /* @__PURE__ */ e(Or, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
6166
6170
  ]
6167
6171
  }
@@ -6170,12 +6174,12 @@ function Gl({
6170
6174
  /* @__PURE__ */ e(aa, { placeholder: "Search column", className: "h-9" }),
6171
6175
  /* @__PURE__ */ r(sa, { children: [
6172
6176
  /* @__PURE__ */ e(ra, { children: "No framework found." }),
6173
- /* @__PURE__ */ e(ia, { children: t == null ? void 0 : t.map((u) => /* @__PURE__ */ r(
6174
- la,
6177
+ /* @__PURE__ */ e(la, { children: t == null ? void 0 : t.map((u) => /* @__PURE__ */ r(
6178
+ ia,
6175
6179
  {
6176
6180
  value: u.column_name,
6177
6181
  onSelect: (c) => {
6178
- const h = c === i ? "" : c;
6182
+ const h = c === l ? "" : c;
6179
6183
  o(h), s(!1), h && a(u);
6180
6184
  },
6181
6185
  children: [
@@ -6185,7 +6189,7 @@ function Gl({
6185
6189
  {
6186
6190
  className: G(
6187
6191
  "ml-auto h-4 w-4",
6188
- i === u.column_name ? "opacity-100" : "opacity-0"
6192
+ l === u.column_name ? "opacity-100" : "opacity-0"
6189
6193
  )
6190
6194
  }
6191
6195
  )
@@ -6197,11 +6201,11 @@ function Gl({
6197
6201
  ] }) })
6198
6202
  ] });
6199
6203
  }
6200
- function Ul({
6204
+ function Ui({
6201
6205
  cardType: t
6202
6206
  }) {
6203
6207
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(qe, { defaultValue: ["item-2"], type: "multiple", children: [
6204
- /* @__PURE__ */ r(le, { value: "item-1", children: [
6208
+ /* @__PURE__ */ r(ie, { value: "item-1", children: [
6205
6209
  /* @__PURE__ */ e(oe, { children: `${zt(t)} Chart` }),
6206
6210
  /* @__PURE__ */ r(ce, { className: "space-y-4 font-mono text-xs", children: [
6207
6211
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
@@ -6226,11 +6230,11 @@ function Ul({
6226
6230
  ] })
6227
6231
  ] })
6228
6232
  ] }),
6229
- /* @__PURE__ */ r(le, { value: "item-2", children: [
6233
+ /* @__PURE__ */ r(ie, { value: "item-2", children: [
6230
6234
  /* @__PURE__ */ e(oe, { children: "Settings" }),
6231
6235
  /* @__PURE__ */ e(ce, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(bs, {}) })
6232
6236
  ] }),
6233
- /* @__PURE__ */ r(le, { value: "item-3", children: [
6237
+ /* @__PURE__ */ r(ie, { value: "item-3", children: [
6234
6238
  /* @__PURE__ */ e(oe, { children: "Filters" }),
6235
6239
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
6236
6240
  /* @__PURE__ */ e(Ye, {}),
@@ -6240,7 +6244,7 @@ function Ul({
6240
6244
  ] }) });
6241
6245
  }
6242
6246
  function Nn() {
6243
- var i, o, l;
6247
+ var l, o, i;
6244
6248
  const t = f((u) => u.card.type), a = f((u) => u.card.preferences), { setCardPreferences: n } = f((u) => u.actions);
6245
6249
  function s(u) {
6246
6250
  var d;
@@ -6268,7 +6272,7 @@ function Nn() {
6268
6272
  /* @__PURE__ */ r(
6269
6273
  ke,
6270
6274
  {
6271
- value: ((l = (o = (i = a == null ? void 0 : a.chartOptions) == null ? void 0 : i.plugins) == null ? void 0 : o.datalabels) == null ? void 0 : l.anchor) || "none",
6275
+ value: ((i = (o = (l = a == null ? void 0 : a.chartOptions) == null ? void 0 : l.plugins) == null ? void 0 : o.datalabels) == null ? void 0 : i.anchor) || "none",
6272
6276
  onValueChange: s,
6273
6277
  defaultValue: "none",
6274
6278
  children: [
@@ -6285,7 +6289,7 @@ function Nn() {
6285
6289
  )
6286
6290
  ] });
6287
6291
  }
6288
- function $l({
6292
+ function $i({
6289
6293
  cardType: t
6290
6294
  }) {
6291
6295
  function a(n) {
@@ -6315,15 +6319,15 @@ function $l({
6315
6319
  ] });
6316
6320
  }
6317
6321
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(qe, { defaultValue: ["item-2"], type: "multiple", children: [
6318
- /* @__PURE__ */ r(le, { value: "item-1", children: [
6322
+ /* @__PURE__ */ r(ie, { value: "item-1", children: [
6319
6323
  /* @__PURE__ */ e(oe, { children: `${zt(t)} Chart` }),
6320
6324
  /* @__PURE__ */ e(ce, { className: "space-y-4 font-mono text-xs", children: a(t) })
6321
6325
  ] }),
6322
- /* @__PURE__ */ r(le, { value: "item-2", children: [
6326
+ /* @__PURE__ */ r(ie, { value: "item-2", children: [
6323
6327
  /* @__PURE__ */ e(oe, { children: "Settings" }),
6324
6328
  /* @__PURE__ */ e(ce, { className: "px-2", children: /* @__PURE__ */ e(Nn, {}) })
6325
6329
  ] }),
6326
- /* @__PURE__ */ r(le, { value: "item-3", children: [
6330
+ /* @__PURE__ */ r(ie, { value: "item-3", children: [
6327
6331
  /* @__PURE__ */ e(oe, { children: "Filters" }),
6328
6332
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
6329
6333
  /* @__PURE__ */ e(Ye, {}),
@@ -6332,7 +6336,7 @@ function $l({
6332
6336
  ] })
6333
6337
  ] }) });
6334
6338
  }
6335
- const Ql = {
6339
+ const Qi = {
6336
6340
  datasets: [
6337
6341
  {
6338
6342
  type: "line",
@@ -6345,7 +6349,7 @@ const Ql = {
6345
6349
  data: []
6346
6350
  }
6347
6351
  ]
6348
- }, Kl = {
6352
+ }, Ki = {
6349
6353
  datasets: [
6350
6354
  {
6351
6355
  fill: "origin",
@@ -6355,7 +6359,7 @@ const Ql = {
6355
6359
  }
6356
6360
  ]
6357
6361
  };
6358
- function Jl() {
6362
+ function Ji() {
6359
6363
  const t = f((a) => a.card.type);
6360
6364
  return /* @__PURE__ */ r("div", { className: "space-y-6 p-6", children: [
6361
6365
  /* @__PURE__ */ e(
@@ -6364,7 +6368,7 @@ function Jl() {
6364
6368
  className: " ",
6365
6369
  type: "single",
6366
6370
  collapsible: !0,
6367
- children: Wl(t)
6371
+ children: Wi(t)
6368
6372
  }
6369
6373
  ),
6370
6374
  !["kpi"].includes(t) && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
@@ -6374,10 +6378,10 @@ function Jl() {
6374
6378
  ] })
6375
6379
  ] });
6376
6380
  }
6377
- function Wl(t) {
6381
+ function Wi(t) {
6378
6382
  if (["line", "bar"].includes(t))
6379
6383
  return /* @__PURE__ */ r(ae, { children: [
6380
- /* @__PURE__ */ r(le, { value: "item-1", children: [
6384
+ /* @__PURE__ */ r(ie, { value: "item-1", children: [
6381
6385
  /* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ e("p", { children: "Chart Query" }) }),
6382
6386
  /* @__PURE__ */ r(ce, { className: " ", children: [
6383
6387
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT x-axis, y-axis-1, y-axis-2, y-axis-3,... FROM table" }),
@@ -6387,7 +6391,7 @@ function Wl(t) {
6387
6391
  ] })
6388
6392
  ] })
6389
6393
  ] }),
6390
- /* @__PURE__ */ r(le, { value: "item-2", children: [
6394
+ /* @__PURE__ */ r(ie, { value: "item-2", children: [
6391
6395
  /* @__PURE__ */ e(oe, { className: "font-normal", children: "Mixed Chart" }),
6392
6396
  /* @__PURE__ */ r(ce, { className: "space-y-2 text-xs", children: [
6393
6397
  /* @__PURE__ */ r("p", { children: [
@@ -6395,10 +6399,10 @@ function Wl(t) {
6395
6399
  /* @__PURE__ */ e("b", { children: "Customize" }),
6396
6400
  " and change the `type` property in the dataset."
6397
6401
  ] }),
6398
- /* @__PURE__ */ e("pre", { children: JSON.stringify(Ql, null, 2) })
6402
+ /* @__PURE__ */ e("pre", { children: JSON.stringify(Qi, null, 2) })
6399
6403
  ] })
6400
6404
  ] }),
6401
- /* @__PURE__ */ r(le, { value: "item-3", children: [
6405
+ /* @__PURE__ */ r(ie, { value: "item-3", children: [
6402
6406
  /* @__PURE__ */ e(oe, { className: "font-normal", children: "Area Chart" }),
6403
6407
  /* @__PURE__ */ r(ce, { className: "space-y-2 text-xs", children: [
6404
6408
  /* @__PURE__ */ r("p", { children: [
@@ -6416,12 +6420,12 @@ function Wl(t) {
6416
6420
  ),
6417
6421
  "for more options."
6418
6422
  ] }),
6419
- /* @__PURE__ */ e("pre", { children: JSON.stringify(Kl, null, 2) })
6423
+ /* @__PURE__ */ e("pre", { children: JSON.stringify(Ki, null, 2) })
6420
6424
  ] })
6421
6425
  ] })
6422
6426
  ] });
6423
6427
  if (t === "bubble")
6424
- return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(le, { value: "item-1", children: [
6428
+ return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(ie, { value: "item-1", children: [
6425
6429
  /* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ r("p", { children: [
6426
6430
  "How to create a ",
6427
6431
  /* @__PURE__ */ e("span", { children: t }),
@@ -6439,7 +6443,7 @@ function Wl(t) {
6439
6443
  ] })
6440
6444
  ] }) });
6441
6445
  if (t === "scatter")
6442
- return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(le, { value: "item-1", children: [
6446
+ return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(ie, { value: "item-1", children: [
6443
6447
  /* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ r("p", { children: [
6444
6448
  "How to create a ",
6445
6449
  /* @__PURE__ */ e("span", { children: t }),
@@ -6456,7 +6460,7 @@ function Wl(t) {
6456
6460
  ] })
6457
6461
  ] }) });
6458
6462
  if (["pie", "doughnut", "polarArea"].includes(t))
6459
- return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(le, { value: "item-1", children: [
6463
+ return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(ie, { value: "item-1", children: [
6460
6464
  /* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ r("p", { children: [
6461
6465
  /* @__PURE__ */ e("span", { children: t === "polarArea" ? "Polar" : t.charAt(0).toUpperCase() + t.slice(1) }),
6462
6466
  " ",
@@ -6471,7 +6475,7 @@ function Wl(t) {
6471
6475
  ] })
6472
6476
  ] }) });
6473
6477
  }
6474
- function Yl() {
6478
+ function Yi() {
6475
6479
  var c, h, d, y, x;
6476
6480
  const t = f((m) => m.card.preferences), a = f(
6477
6481
  (m) => m.actions.setCardPreferences
@@ -6489,7 +6493,7 @@ function Yl() {
6489
6493
  var C, p;
6490
6494
  return (p = (C = m.card.preferences) == null ? void 0 : C.formatNumber) == null ? void 0 : p.locale;
6491
6495
  }
6492
- ), i = f(
6496
+ ), l = f(
6493
6497
  (m) => {
6494
6498
  var C, p;
6495
6499
  return (p = (C = m.card.preferences) == null ? void 0 : C.formatNumber) == null ? void 0 : p.currency;
@@ -6503,7 +6507,7 @@ function Yl() {
6503
6507
  var C, p;
6504
6508
  return (p = (C = m.card.preferences) == null ? void 0 : C.formatNumber) == null ? void 0 : p.colorRanges;
6505
6509
  }
6506
- ) || [], l = f(
6510
+ ) || [], i = f(
6507
6511
  (m) => m.actions.setColorRanges
6508
6512
  ), u = [...new Set(St.map((m) => m.currency))];
6509
6513
  return /* @__PURE__ */ r("div", { children: [
@@ -6559,7 +6563,7 @@ function Yl() {
6559
6563
  /* @__PURE__ */ r(
6560
6564
  ke,
6561
6565
  {
6562
- value: i || "none",
6566
+ value: l || "none",
6563
6567
  onValueChange: (m) => {
6564
6568
  var C, p, v;
6565
6569
  console.log("currency", m), n(
@@ -6631,15 +6635,15 @@ function Yl() {
6631
6635
  zr,
6632
6636
  {
6633
6637
  colorRanges: o,
6634
- setColorRanges: l
6638
+ setColorRanges: i
6635
6639
  }
6636
6640
  )
6637
6641
  ] })
6638
6642
  ] });
6639
6643
  }
6640
- function Zl() {
6644
+ function Zi() {
6641
6645
  return /* @__PURE__ */ r("div", { className: "space-y-6 px-6 py-2", children: [
6642
- /* @__PURE__ */ e(qe, { type: "single", collapsible: !0, children: /* @__PURE__ */ r(le, { value: "item-1", children: [
6646
+ /* @__PURE__ */ e(qe, { type: "single", collapsible: !0, children: /* @__PURE__ */ r(ie, { value: "item-1", children: [
6643
6647
  /* @__PURE__ */ e(oe, { className: "", children: "KPI Query" }),
6644
6648
  /* @__PURE__ */ r(ce, { className: "font-mono", children: [
6645
6649
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
@@ -6663,7 +6667,7 @@ function Zl() {
6663
6667
  ] })
6664
6668
  ] })
6665
6669
  ] }) }),
6666
- /* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(Yl, {}) }),
6670
+ /* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(Yi, {}) }),
6667
6671
  /* @__PURE__ */ e("div", {}),
6668
6672
  /* @__PURE__ */ e("div", {})
6669
6673
  ] });
@@ -6689,7 +6693,7 @@ function Qt({
6689
6693
  }
6690
6694
  );
6691
6695
  }
6692
- const Xl = [
6696
+ const Xi = [
6693
6697
  {
6694
6698
  label: "Mercator",
6695
6699
  value: "mercator"
@@ -6793,7 +6797,7 @@ function no() {
6793
6797
  var c, h, d, y, x, m, C, p, v, g, N, S, z, k, O, R, j, Y;
6794
6798
  const t = f((M) => M.card), a = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [n, s] = J(
6795
6799
  ((y = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
6796
- ), { setCardPreferences: i } = W(), { data: o } = cn(t), l = Object.keys((o == null ? void 0 : o.objects) || {}).map((M) => ({
6800
+ ), { setCardPreferences: l } = W(), { data: o } = cn(t), i = Object.keys((o == null ? void 0 : o.objects) || {}).map((M) => ({
6797
6801
  label: M,
6798
6802
  value: M
6799
6803
  })) || [];
@@ -6820,7 +6824,7 @@ function no() {
6820
6824
  }
6821
6825
  ],
6822
6826
  onValueChange: (M) => {
6823
- console.log("value", M), i({
6827
+ console.log("value", M), l({
6824
6828
  ...t.preferences,
6825
6829
  mapVisualOptions: {
6826
6830
  topoJsonUrl: M
@@ -6840,7 +6844,7 @@ function no() {
6840
6844
  },
6841
6845
  onBlur: () => {
6842
6846
  var M;
6843
- console.log("onBlur", n), i({
6847
+ console.log("onBlur", n), l({
6844
6848
  ...t.preferences,
6845
6849
  mapVisualOptions: {
6846
6850
  ...(M = t.preferences) == null ? void 0 : M.mapVisualOptions,
@@ -6860,12 +6864,12 @@ function no() {
6860
6864
  ye,
6861
6865
  {
6862
6866
  className: "h-9",
6863
- options: l,
6867
+ options: i,
6864
6868
  value: ((m = (x = t.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : m.objectKey) || "",
6865
6869
  label: "Map Object",
6866
6870
  onValueChange: (M) => {
6867
6871
  var V;
6868
- i({
6872
+ l({
6869
6873
  ...t.preferences,
6870
6874
  mapVisualOptions: {
6871
6875
  ...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
@@ -6882,12 +6886,12 @@ function no() {
6882
6886
  ye,
6883
6887
  {
6884
6888
  className: "h-9",
6885
- options: Xl,
6889
+ options: Xi,
6886
6890
  value: ((p = (C = t.preferences) == null ? void 0 : C.mapVisualOptions) == null ? void 0 : p.projection) || "",
6887
6891
  label: "Projection",
6888
6892
  onValueChange: (M) => {
6889
6893
  var V;
6890
- i({
6894
+ l({
6891
6895
  ...t.preferences,
6892
6896
  mapVisualOptions: {
6893
6897
  ...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
@@ -6909,7 +6913,7 @@ function no() {
6909
6913
  label: "Select Color Scale",
6910
6914
  onValueChange: (M) => {
6911
6915
  var V;
6912
- i({
6916
+ l({
6913
6917
  ...t.preferences,
6914
6918
  mapVisualOptions: {
6915
6919
  ...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
@@ -6933,7 +6937,7 @@ function no() {
6933
6937
  value: ((S = (N = t.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : S.projectionScale) || 1,
6934
6938
  onChange: (M) => {
6935
6939
  var V;
6936
- i({
6940
+ l({
6937
6941
  ...t.preferences,
6938
6942
  mapVisualOptions: {
6939
6943
  ...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
@@ -6953,7 +6957,7 @@ function no() {
6953
6957
  value: ((O = (k = (z = t.preferences) == null ? void 0 : z.mapVisualOptions) == null ? void 0 : k.projectionOffset) == null ? void 0 : O[0]) || 0,
6954
6958
  onChange: (M) => {
6955
6959
  var V, Z, $, I;
6956
- i({
6960
+ l({
6957
6961
  ...t.preferences,
6958
6962
  mapVisualOptions: {
6959
6963
  ...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
@@ -6976,7 +6980,7 @@ function no() {
6976
6980
  value: ((Y = (j = (R = t.preferences) == null ? void 0 : R.mapVisualOptions) == null ? void 0 : j.projectionOffset) == null ? void 0 : Y[1]) || 0,
6977
6981
  onChange: (M) => {
6978
6982
  var V, Z, $, I;
6979
- i({
6983
+ l({
6980
6984
  ...t.preferences,
6981
6985
  mapVisualOptions: {
6982
6986
  ...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
@@ -6996,13 +7000,13 @@ function no() {
6996
7000
  }
6997
7001
  function ao() {
6998
7002
  var s;
6999
- const t = f((i) => i.card.preferences), { setCardPreferences: a } = f((i) => i.actions);
7000
- function n(i) {
7003
+ const t = f((l) => l.card.preferences), { setCardPreferences: a } = f((l) => l.actions);
7004
+ function n(l) {
7001
7005
  a({
7002
7006
  ...t,
7003
7007
  textVisualOptions: {
7004
7008
  ...t == null ? void 0 : t.textVisualOptions,
7005
- isDynamicText: i === "dynamic"
7009
+ isDynamicText: l === "dynamic"
7006
7010
  }
7007
7011
  });
7008
7012
  }
@@ -7032,7 +7036,7 @@ function gt({
7032
7036
  suffix: n = "Chart"
7033
7037
  }) {
7034
7038
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(qe, { defaultValue: ["item-2"], type: "multiple", children: [
7035
- /* @__PURE__ */ r(le, { value: "item-1", children: [
7039
+ /* @__PURE__ */ r(ie, { value: "item-1", children: [
7036
7040
  /* @__PURE__ */ e(oe, { children: `${zt(t)} ${n}` }),
7037
7041
  /* @__PURE__ */ e(ce, { children: a || /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
7038
7042
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
@@ -7056,14 +7060,14 @@ function gt({
7056
7060
  ] })
7057
7061
  ] }) })
7058
7062
  ] }),
7059
- /* @__PURE__ */ r(le, { value: "item-2", children: [
7063
+ /* @__PURE__ */ r(ie, { value: "item-2", children: [
7060
7064
  /* @__PURE__ */ e(oe, { children: "Settings" }),
7061
7065
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7062
7066
  t !== "text" && /* @__PURE__ */ e(Nn, {}),
7063
7067
  t === "text" && /* @__PURE__ */ e(ao, {})
7064
7068
  ] })
7065
7069
  ] }),
7066
- !["range", "text"].includes(t) && /* @__PURE__ */ r(le, { value: "item-3", children: [
7070
+ !["range", "text"].includes(t) && /* @__PURE__ */ r(ie, { value: "item-3", children: [
7067
7071
  /* @__PURE__ */ e(oe, { children: "Filters" }),
7068
7072
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7069
7073
  /* @__PURE__ */ e(Ye, {}),
@@ -7075,8 +7079,8 @@ function gt({
7075
7079
  function so() {
7076
7080
  const t = f(
7077
7081
  (s) => {
7078
- var i, o;
7079
- return (o = (i = s == null ? void 0 : s.card) == null ? void 0 : i.preferences) == null ? void 0 : o.sortChart;
7082
+ var l, o;
7083
+ return (o = (l = s == null ? void 0 : s.card) == null ? void 0 : l.preferences) == null ? void 0 : o.sortChart;
7080
7084
  }
7081
7085
  ), { setSortChart: a } = W();
7082
7086
  function n() {
@@ -7110,7 +7114,7 @@ function so() {
7110
7114
  ] });
7111
7115
  }
7112
7116
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(qe, { defaultValue: ["item-2"], type: "multiple", children: [
7113
- /* @__PURE__ */ r(le, { value: "item-1", children: [
7117
+ /* @__PURE__ */ r(ie, { value: "item-1", children: [
7114
7118
  /* @__PURE__ */ e(oe, { children: "Stacked Chart" }),
7115
7119
  /* @__PURE__ */ r(ce, { className: "space-y-4 font-mono text-xs", children: [
7116
7120
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, stack-by, y-axis FROM table" }),
@@ -7135,14 +7139,14 @@ function so() {
7135
7139
  ] })
7136
7140
  ] })
7137
7141
  ] }),
7138
- /* @__PURE__ */ r(le, { value: "item-2", children: [
7142
+ /* @__PURE__ */ r(ie, { value: "item-2", children: [
7139
7143
  /* @__PURE__ */ e(oe, { children: "Settings" }),
7140
7144
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7141
7145
  n(),
7142
7146
  /* @__PURE__ */ e(bs, {})
7143
7147
  ] })
7144
7148
  ] }),
7145
- /* @__PURE__ */ r(le, { value: "item-3", children: [
7149
+ /* @__PURE__ */ r(ie, { value: "item-3", children: [
7146
7150
  /* @__PURE__ */ e(oe, { children: "Filters" }),
7147
7151
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7148
7152
  /* @__PURE__ */ e(Ye, {}),
@@ -7155,14 +7159,14 @@ function ro({
7155
7159
  cardType: t = "table"
7156
7160
  }) {
7157
7161
  console.log("cardType", t);
7158
- const a = f((i) => {
7162
+ const a = f((l) => {
7159
7163
  var o;
7160
- return (o = i.card) == null ? void 0 : o.preferences;
7164
+ return (o = l.card) == null ? void 0 : o.preferences;
7161
7165
  }), n = f(
7162
- (i) => i.actions.setCardPreferences
7166
+ (l) => l.actions.setCardPreferences
7163
7167
  );
7164
7168
  return /* @__PURE__ */ r("div", { className: "space-y-6 px-6 py-2", children: [
7165
- /* @__PURE__ */ e(qe, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ r(le, { value: "item-3", children: [
7169
+ /* @__PURE__ */ e(qe, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ r(ie, { value: "item-3", children: [
7166
7170
  /* @__PURE__ */ e(oe, { children: "Filters" }),
7167
7171
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7168
7172
  /* @__PURE__ */ e(Ye, {}),
@@ -7170,10 +7174,10 @@ function ro({
7170
7174
  ] })
7171
7175
  ] }) }),
7172
7176
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
7173
- /* @__PURE__ */ e(hn, { onCheckedChange: (i) => {
7177
+ /* @__PURE__ */ e(hn, { onCheckedChange: (l) => {
7174
7178
  n({
7175
7179
  ...a,
7176
- allowDownload: i
7180
+ allowDownload: l
7177
7181
  });
7178
7182
  }, id: "allow-download" }),
7179
7183
  /* @__PURE__ */ e(
@@ -7187,7 +7191,7 @@ function ro({
7187
7191
  ] })
7188
7192
  ] });
7189
7193
  }
7190
- const io = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
7194
+ const lo = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
7191
7195
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
7192
7196
  /* @__PURE__ */ r("div", { children: [
7193
7197
  "See ",
@@ -7203,7 +7207,7 @@ const io = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs",
7203
7207
  ),
7204
7208
  " in the docs."
7205
7209
  ] })
7206
- ] }), lo = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
7210
+ ] }), io = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
7207
7211
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
7208
7212
  /* @__PURE__ */ r("div", { children: [
7209
7213
  "See ",
@@ -7244,14 +7248,14 @@ function co() {
7244
7248
  case "stackedLine":
7245
7249
  return /* @__PURE__ */ e(so, {});
7246
7250
  case "pyramid":
7247
- return /* @__PURE__ */ e(gt, { docContent: io, cardType: n });
7251
+ return /* @__PURE__ */ e(gt, { docContent: lo, cardType: n });
7248
7252
  case "kpi":
7249
- return /* @__PURE__ */ e(Zl, {});
7253
+ return /* @__PURE__ */ e(Zi, {});
7250
7254
  case "line":
7251
7255
  case "bar":
7252
- return /* @__PURE__ */ e(Ul, { cardType: n });
7256
+ return /* @__PURE__ */ e(Ui, { cardType: n });
7253
7257
  case "range":
7254
- return /* @__PURE__ */ e(gt, { docContent: lo, cardType: n });
7258
+ return /* @__PURE__ */ e(gt, { docContent: io, cardType: n });
7255
7259
  case "pie":
7256
7260
  case "doughnut":
7257
7261
  case "polarArea":
@@ -7259,7 +7263,7 @@ function co() {
7259
7263
  return /* @__PURE__ */ e(gt, { cardType: n });
7260
7264
  case "bubble":
7261
7265
  case "scatter":
7262
- return /* @__PURE__ */ e($l, { cardType: n });
7266
+ return /* @__PURE__ */ e($i, { cardType: n });
7263
7267
  case "table":
7264
7268
  return /* @__PURE__ */ e(ro, { cardType: n });
7265
7269
  case "text":
@@ -7274,12 +7278,12 @@ function co() {
7274
7278
  case "map":
7275
7279
  return /* @__PURE__ */ e(no, {});
7276
7280
  case "custom":
7277
- return /* @__PURE__ */ e(Pl, {});
7281
+ return /* @__PURE__ */ e(Pi, {});
7278
7282
  default:
7279
- return /* @__PURE__ */ e(Jl, {});
7283
+ return /* @__PURE__ */ e(Ji, {});
7280
7284
  }
7281
7285
  }
7282
- return /* @__PURE__ */ r(it, { className: "h-full w-full text-sm", children: [
7286
+ return /* @__PURE__ */ r(lt, { className: "h-full w-full text-sm", children: [
7283
7287
  a(t),
7284
7288
  /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
7285
7289
  ] });
@@ -7290,23 +7294,23 @@ function Ns({
7290
7294
  functions: n,
7291
7295
  onFunctionChange: s
7292
7296
  }) {
7293
- let i = n[0];
7294
- "aggregate" in a ? i = n.find(
7295
- (l) => l.value === a.aggregate
7296
- ) || n[0] : "granularity" in a && (i = n.find(
7297
- (l) => l.value === a.granularity
7297
+ let l = n[0];
7298
+ "aggregate" in a ? l = n.find(
7299
+ (i) => i.value === a.aggregate
7300
+ ) || n[0] : "granularity" in a && (l = n.find(
7301
+ (i) => i.value === a.granularity
7298
7302
  ) || n[0]);
7299
- function o(l) {
7300
- s(l);
7303
+ function o(i) {
7304
+ s(i);
7301
7305
  }
7302
7306
  return /* @__PURE__ */ e(
7303
7307
  ye,
7304
7308
  {
7305
7309
  className: "flex h-8 w-8 justify-center overflow-clip rounded-none border-none bg-muted px-0 [&>svg]:hidden",
7306
- icon: i.logo,
7310
+ icon: l.logo,
7307
7311
  options: n,
7308
- value: i.value,
7309
- onValueChange: (l) => o(l),
7312
+ value: l.value,
7313
+ onValueChange: (i) => o(i),
7310
7314
  label: t,
7311
7315
  showPlaceholderLabel: !1
7312
7316
  }
@@ -7326,12 +7330,12 @@ const uo = [
7326
7330
  {
7327
7331
  label: "Unique",
7328
7332
  value: "DISTINCT",
7329
- logo: /* @__PURE__ */ e(wi, { className: "size-3.5" })
7333
+ logo: /* @__PURE__ */ e(wl, { className: "size-3.5" })
7330
7334
  },
7331
7335
  {
7332
7336
  label: "Average",
7333
7337
  value: "AVG",
7334
- logo: /* @__PURE__ */ e(ni, { className: "size-3.5" })
7338
+ logo: /* @__PURE__ */ e(nl, { className: "size-3.5" })
7335
7339
  },
7336
7340
  {
7337
7341
  label: "Min",
@@ -7348,15 +7352,15 @@ function mo({ column: t }) {
7348
7352
  const { updateMetricColumn: a } = W();
7349
7353
  let n = uo;
7350
7354
  Se(t.type) && (n = n.filter(
7351
- (i) => ["COUNT", "DISTINCT"].includes(i.value)
7355
+ (l) => ["COUNT", "DISTINCT"].includes(l.value)
7352
7356
  )), $e(t.type) && (n = n.filter(
7353
- (i) => !["DISTINCT"].includes(i.value)
7357
+ (l) => !["DISTINCT"].includes(l.value)
7354
7358
  ));
7355
- function s(i) {
7359
+ function s(l) {
7356
7360
  const o = {
7357
7361
  ...t,
7358
- aggregate: i,
7359
- label: ut(t.name, i)
7362
+ aggregate: l,
7363
+ label: ut(t.name, l)
7360
7364
  };
7361
7365
  a(t.id, o);
7362
7366
  }
@@ -7365,7 +7369,7 @@ function mo({ column: t }) {
7365
7369
  {
7366
7370
  column: t,
7367
7371
  functions: n,
7368
- onFunctionChange: (i) => s(i),
7372
+ onFunctionChange: (l) => s(l),
7369
7373
  label: "Aggregation"
7370
7374
  }
7371
7375
  );
@@ -7395,12 +7399,12 @@ const ho = [
7395
7399
  function po({ column: t }) {
7396
7400
  const { updateGroupByColumn: a } = W();
7397
7401
  function n(s) {
7398
- const i = {
7402
+ const l = {
7399
7403
  ...t,
7400
7404
  granularity: s,
7401
7405
  label: st(t.name, s)
7402
7406
  };
7403
- a(t.id, i);
7407
+ a(t.id, l);
7404
7408
  }
7405
7409
  return /* @__PURE__ */ e(
7406
7410
  Ns,
@@ -7417,7 +7421,7 @@ function fo({
7417
7421
  onChange: a,
7418
7422
  droppableId: n
7419
7423
  }) {
7420
- const { columns: s } = xn(), i = Pe(() => {
7424
+ const { columns: s } = xn(), l = Pe(() => {
7421
7425
  let u = [];
7422
7426
  (n === He || n === Ge || n === Ue) && (u = s);
7423
7427
  const c = u == null ? void 0 : u.filter(
@@ -7428,20 +7432,20 @@ function fo({
7428
7432
  value: h.column_name
7429
7433
  }));
7430
7434
  }, [s, n, t.name]), o = [{ id: t.name, value: t.name }];
7431
- function l(u) {
7435
+ function i(u) {
7432
7436
  const c = s == null ? void 0 : s.find((h) => {
7433
7437
  var d;
7434
7438
  return h.column_name === ((d = u[0]) == null ? void 0 : d.id);
7435
7439
  });
7436
7440
  c && a(c);
7437
7441
  }
7438
- return i != null && i.length ? /* @__PURE__ */ e(
7442
+ return l != null && l.length ? /* @__PURE__ */ e(
7439
7443
  pn,
7440
7444
  {
7441
7445
  multiple: !1,
7442
- options: i,
7446
+ options: l,
7443
7447
  selectedOptions: o,
7444
- onChange: l,
7448
+ onChange: i,
7445
7449
  selectAllChecked: !1,
7446
7450
  onSelectAllCheckedChange: () => {
7447
7451
  },
@@ -7479,18 +7483,19 @@ function tn({
7479
7483
  function go({ column: t }) {
7480
7484
  const { updateMetricColumn: a } = W(), { transformedMetricKeys: n, dimensionKeys: s } = ys();
7481
7485
  console.log(n, s);
7482
- const i = f(
7486
+ const l = f(
7483
7487
  (c) => {
7484
7488
  var h;
7485
7489
  return (h = c.card.queryConfig) == null ? void 0 : h.pivotColumns;
7486
7490
  }
7487
- ), o = !!(i && i.length > 0), l = n.find(
7491
+ ), o = !!(l && l.length > 0), i = n.find(
7488
7492
  (c) => c === t.label || c === t.name
7489
- ), u = l ? n.indexOf(l) : -1;
7493
+ ), u = i ? n.indexOf(i) : -1;
7490
7494
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
7491
- l && /* @__PURE__ */ e(xs, { idx: u, col: l, children: /* @__PURE__ */ e(
7495
+ i && /* @__PURE__ */ e(xs, { idx: u, col: i, children: /* @__PURE__ */ e(
7492
7496
  et,
7493
7497
  {
7498
+ enabled: !0,
7494
7499
  className: "w-[130px]",
7495
7500
  text: t.label || "",
7496
7501
  placeholder: "Enter label",
@@ -7508,6 +7513,7 @@ function go({ column: t }) {
7508
7513
  /* @__PURE__ */ e(
7509
7514
  et,
7510
7515
  {
7516
+ enabled: !0,
7511
7517
  text: t.aliasTemplate || "",
7512
7518
  placeholder: "{label} ({pivot})",
7513
7519
  onSave: (c) => {
@@ -7528,7 +7534,7 @@ function yo({
7528
7534
  onRemoveColumn: n,
7529
7535
  droppableId: s
7530
7536
  }) {
7531
- const [i, o] = J(!1), { updateGroupByColumn: l, updateMetricColumn: u, updatePivotByColumn: c } = W(), {
7537
+ const [l, o] = J(!1), { updateGroupByColumn: i, updateMetricColumn: u, updatePivotByColumn: c } = W(), {
7532
7538
  attributes: h,
7533
7539
  listeners: d,
7534
7540
  setNodeRef: y,
@@ -7551,7 +7557,7 @@ function yo({
7551
7557
  type: M,
7552
7558
  role: "groupby"
7553
7559
  };
7554
- l(t.id, V);
7560
+ i(t.id, V);
7555
7561
  }
7556
7562
  if (Y) {
7557
7563
  const V = {
@@ -7563,7 +7569,7 @@ function yo({
7563
7569
  label: st(O.column_name, "month"),
7564
7570
  granularity: "month"
7565
7571
  };
7566
- l(t.id, V);
7572
+ i(t.id, V);
7567
7573
  }
7568
7574
  }
7569
7575
  if (s === Ue) {
@@ -7644,9 +7650,9 @@ function yo({
7644
7650
  "button",
7645
7651
  {
7646
7652
  className: "h-full pl-2",
7647
- onClick: () => o(!i),
7648
- children: i ? /* @__PURE__ */ e(
7649
- Hi,
7653
+ onClick: () => o(!l),
7654
+ children: l ? /* @__PURE__ */ e(
7655
+ Hl,
7650
7656
  {
7651
7657
  className: G(
7652
7658
  "size-3 cursor-pointer items-center justify-center rounded-r-sm text-muted-foreground"
@@ -7670,7 +7676,7 @@ function yo({
7670
7676
  S(),
7671
7677
  z()
7672
7678
  ] }),
7673
- i && N()
7679
+ l && N()
7674
7680
  ] }),
7675
7681
  /* @__PURE__ */ e(
7676
7682
  "div",
@@ -7678,7 +7684,7 @@ function yo({
7678
7684
  className: G(
7679
7685
  "opacity-0 transition-opacity duration-200 group-hover:opacity-100",
7680
7686
  {
7681
- hidden: i
7687
+ hidden: l
7682
7688
  }
7683
7689
  ),
7684
7690
  children: /* @__PURE__ */ e("button", { onClick: () => n(t.id), children: /* @__PURE__ */ e(Ce, { className: "size-3 cursor-pointer text-muted-foreground" }) })
@@ -7691,16 +7697,16 @@ function Kt({
7691
7697
  label: a,
7692
7698
  columns: n,
7693
7699
  previewColumns: s,
7694
- sortableType: i,
7700
+ sortableType: l,
7695
7701
  onRemoveColumn: o
7696
7702
  }) {
7697
7703
  var p, v;
7698
- const { setNodeRef: l, isOver: u, over: c } = Ia({
7704
+ const { setNodeRef: i, isOver: u, over: c } = Ia({
7699
7705
  id: t
7700
7706
  }), h = Ee((g) => g.activeId), d = f((g) => {
7701
7707
  var N;
7702
7708
  return (N = g.card) == null ? void 0 : N.type;
7703
- }), y = u || ((v = (p = c == null ? void 0 : c.data) == null ? void 0 : p.current) == null ? void 0 : v.type) === i, x = h ? s : n, m = i === wt ? "Rows" : i === kt ? "Pivot Columns" : "Columns";
7709
+ }), y = u || ((v = (p = c == null ? void 0 : c.data) == null ? void 0 : p.current) == null ? void 0 : v.type) === l, x = h ? s : n, m = l === wt ? "Rows" : l === kt ? "Pivot Columns" : "Columns";
7704
7710
  function C() {
7705
7711
  if (!x || x.length === 0)
7706
7712
  return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground/80 bg-background px-2 py-1 text-sm text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "invisible text-muted-foreground/70 group-hover:visible", children: "Drag here" }) });
@@ -7712,7 +7718,7 @@ function Kt({
7712
7718
  "group space-y-2 rounded-md p-4",
7713
7719
  y && "border border-muted-foreground/50"
7714
7720
  ),
7715
- ref: l,
7721
+ ref: i,
7716
7722
  children: [
7717
7723
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between pr-5", children: [
7718
7724
  /* @__PURE__ */ e(U, { className: "text-sm", children: a }),
@@ -7724,7 +7730,7 @@ function Kt({
7724
7730
  yo,
7725
7731
  {
7726
7732
  droppableId: t,
7727
- type: i,
7733
+ type: l,
7728
7734
  column: g,
7729
7735
  onRemoveColumn: o
7730
7736
  },
@@ -7741,17 +7747,17 @@ function bo() {
7741
7747
  function Ss({ children: t, id: a, type: n }) {
7742
7748
  const {
7743
7749
  attributes: s,
7744
- listeners: i,
7750
+ listeners: l,
7745
7751
  setNodeRef: o,
7746
- transform: l,
7752
+ transform: i,
7747
7753
  transition: u,
7748
7754
  isDragging: c
7749
- } = Da({ id: a, data: { type: n } }), h = l ? {
7755
+ } = Da({ id: a, data: { type: n } }), h = i ? {
7750
7756
  opacity: c ? 0.5 : void 0,
7751
- transform: vt.Translate.toString(l),
7757
+ transform: vt.Translate.toString(i),
7752
7758
  transition: u
7753
7759
  } : void 0;
7754
- return /* @__PURE__ */ e("div", { ...i, ...s, ref: o, style: h, children: t });
7760
+ return /* @__PURE__ */ e("div", { ...l, ...s, ref: o, style: h, children: t });
7755
7761
  }
7756
7762
  function vo() {
7757
7763
  const t = f((g) => {
@@ -7763,10 +7769,10 @@ function vo() {
7763
7769
  }) || [], n = f((g) => {
7764
7770
  var N;
7765
7771
  return (N = g.card.queryConfig) == null ? void 0 : N.metricColumns;
7766
- }) || [], { addOrderByColumn: s, removeOrderByColumn: i, updateOrderByColumn: o } = W(), l = [...a, ...n];
7767
- if (l.length === 0)
7772
+ }) || [], { addOrderByColumn: s, removeOrderByColumn: l, updateOrderByColumn: o } = W(), i = [...a, ...n];
7773
+ if (i.length === 0)
7768
7774
  return /* @__PURE__ */ e(ae, {});
7769
- const u = /* @__PURE__ */ e(ii, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), c = /* @__PURE__ */ e(ti, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = /* @__PURE__ */ e(ri, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(ei, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), y = l == null ? void 0 : l.filter((g) => !t.some((N) => N.columnId === g.id)).map((g) => ({
7775
+ const u = /* @__PURE__ */ e(ll, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), c = /* @__PURE__ */ e(tl, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = /* @__PURE__ */ e(rl, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(el, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), y = i == null ? void 0 : i.filter((g) => !t.some((N) => N.columnId === g.id)).map((g) => ({
7770
7776
  id: g.id,
7771
7777
  value: g.label || g.name
7772
7778
  }));
@@ -7775,7 +7781,7 @@ function vo() {
7775
7781
  return S ? S.role === "metric" ? N === "asc" ? h : d : N === "asc" ? u : c : null;
7776
7782
  }
7777
7783
  function m(g) {
7778
- return l.find((N) => N.id === g);
7784
+ return i.find((N) => N.id === g);
7779
7785
  }
7780
7786
  function C(g) {
7781
7787
  const N = t.find(
@@ -7799,7 +7805,7 @@ function vo() {
7799
7805
  const N = t.find(
7800
7806
  (S) => S.columnId === g
7801
7807
  );
7802
- N && i(N);
7808
+ N && l(N);
7803
7809
  }
7804
7810
  return /* @__PURE__ */ e(
7805
7811
  fn,
@@ -7880,14 +7886,14 @@ function xo() {
7880
7886
  var g;
7881
7887
  return ((g = v.card.queryConfig) == null ? void 0 : g.metricColumns) || [];
7882
7888
  }
7883
- ), i = Ee(
7889
+ ), l = Ee(
7884
7890
  (v) => v.previewMetricColumns
7885
7891
  ), o = f(
7886
7892
  (v) => {
7887
7893
  var g;
7888
7894
  return ((g = v.card.queryConfig) == null ? void 0 : g.pivotColumns) || [];
7889
7895
  }
7890
- ), l = Ee(
7896
+ ), i = Ee(
7891
7897
  (v) => v.previewPivotColumns
7892
7898
  ), {
7893
7899
  // setSelectedConnectionId,
@@ -7928,7 +7934,7 @@ function xo() {
7928
7934
  id: Ue,
7929
7935
  label: p,
7930
7936
  columns: o,
7931
- previewColumns: l
7937
+ previewColumns: i
7932
7938
  }
7933
7939
  ),
7934
7940
  /* @__PURE__ */ e(
@@ -7939,7 +7945,7 @@ function xo() {
7939
7945
  id: Ge,
7940
7946
  label: C,
7941
7947
  columns: s,
7942
- previewColumns: i
7948
+ previewColumns: l
7943
7949
  }
7944
7950
  ),
7945
7951
  /* @__PURE__ */ e(vo, {})
@@ -7953,9 +7959,9 @@ function Sn({
7953
7959
  column: a,
7954
7960
  id: n,
7955
7961
  sortableType: s,
7956
- className: i
7962
+ className: l
7957
7963
  }) {
7958
- const [o, l] = J(!1), { removeEditorFilter: u } = W();
7964
+ const [o, i] = J(!1), { removeEditorFilter: u } = W();
7959
7965
  function c(h) {
7960
7966
  u(h);
7961
7967
  }
@@ -7995,7 +8001,7 @@ function Sn({
7995
8001
  {
7996
8002
  className: G(
7997
8003
  "grow cursor-pointer overflow-hidden truncate text-ellipsis whitespace-nowrap",
7998
- i
8004
+ l
7999
8005
  ),
8000
8006
  children: t
8001
8007
  }
@@ -8016,7 +8022,7 @@ function Co({
8016
8022
  var S, z;
8017
8023
  return (z = (S = N.card) == null ? void 0 : S.queryConfig) == null ? void 0 : z.filters;
8018
8024
  }
8019
- ), { selectedConnectionId: i, selectedDatabaseName: o, selectedTableName: l } = Ne(), u = Pe(() => {
8025
+ ), { selectedConnectionId: l, selectedDatabaseName: o, selectedTableName: i } = Ne(), u = Pe(() => {
8020
8026
  var N;
8021
8027
  return (N = s == null ? void 0 : s.find(
8022
8028
  (S) => S.filterColumnName === t.name
@@ -8032,7 +8038,7 @@ function Co({
8032
8038
  // this is the sql query to get the data
8033
8039
  id: t.name,
8034
8040
  // not needed
8035
- connectionId: i,
8041
+ connectionId: l,
8036
8042
  // not needed
8037
8043
  dataType: t.type
8038
8044
  }, { data: y, isLoading: x, isFetching: m, isError: C } = Oa(d), p = Pe(() => {
@@ -8087,13 +8093,13 @@ function No({
8087
8093
  column: t,
8088
8094
  sortableType: a
8089
8095
  }) {
8090
- const [n, s] = J(!1), { selectedConnectionId: i, selectedDatabaseName: o, selectedTableName: l } = Ne(), u = {
8096
+ const [n, s] = J(!1), { selectedConnectionId: l, selectedDatabaseName: o, selectedTableName: i } = Ne(), u = {
8091
8097
  column: t.name,
8092
8098
  sql: t.sql,
8093
8099
  // this is the sql query to get the data
8094
8100
  id: t.name,
8095
8101
  // not needed
8096
- connectionId: i,
8102
+ connectionId: l,
8097
8103
  title: "",
8098
8104
  // not needed
8099
8105
  dataType: t.type
@@ -8140,14 +8146,14 @@ function So({
8140
8146
  label: a,
8141
8147
  columns: n,
8142
8148
  previewColumns: s,
8143
- sortableType: i
8149
+ sortableType: l
8144
8150
  }) {
8145
8151
  var C, p;
8146
- const { setNodeRef: o, isOver: l, over: u } = Ia({
8152
+ const { setNodeRef: o, isOver: i, over: u } = Ia({
8147
8153
  id: t
8148
8154
  }), c = Ee((v) => v.activeId), h = {
8149
8155
  // borderColor: isOver ? 'green' : undefined,
8150
- }, d = l || ((p = (C = u == null ? void 0 : u.data) == null ? void 0 : C.current) == null ? void 0 : p.type) === i;
8156
+ }, d = i || ((p = (C = u == null ? void 0 : u.data) == null ? void 0 : C.current) == null ? void 0 : p.type) === l;
8151
8157
  function y() {
8152
8158
  if (!m || m.length === 0)
8153
8159
  return /* @__PURE__ */ e("div", { className: "flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground/80 bg-background px-2 py-1 text-sm text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "invisible text-muted-foreground/70 group-hover:visible", children: "Drag here" }) });
@@ -8158,7 +8164,7 @@ function So({
8158
8164
  Sn,
8159
8165
  {
8160
8166
  id: v.id,
8161
- sortableType: i,
8167
+ sortableType: l,
8162
8168
  column: v,
8163
8169
  children: /* @__PURE__ */ e(wo, {})
8164
8170
  },
@@ -8167,7 +8173,7 @@ function So({
8167
8173
  No,
8168
8174
  {
8169
8175
  droppableId: t,
8170
- sortableType: i,
8176
+ sortableType: l,
8171
8177
  column: v
8172
8178
  },
8173
8179
  v.id
@@ -8175,7 +8181,7 @@ function So({
8175
8181
  Co,
8176
8182
  {
8177
8183
  droppableId: t,
8178
- sortableType: i,
8184
+ sortableType: l,
8179
8185
  column: v
8180
8186
  },
8181
8187
  v.id
@@ -8204,15 +8210,15 @@ function wo() {
8204
8210
  }
8205
8211
  function ko() {
8206
8212
  const t = f(
8207
- (i) => {
8213
+ (l) => {
8208
8214
  var o;
8209
- return ((o = i.card.queryConfig) == null ? void 0 : o.filterColumns) || [];
8215
+ return ((o = l.card.queryConfig) == null ? void 0 : o.filterColumns) || [];
8210
8216
  }
8211
8217
  ), a = Ee(
8212
- (i) => i.previewFilterColumns
8218
+ (l) => l.previewFilterColumns
8213
8219
  ), { removeColumnFromFilterColumns: n } = W();
8214
- function s(i) {
8215
- n(i);
8220
+ function s(l) {
8221
+ n(l);
8216
8222
  }
8217
8223
  return /* @__PURE__ */ e("section", { className: "size-full px-4 pb-4", children: /* @__PURE__ */ e(
8218
8224
  So,
@@ -8235,18 +8241,18 @@ function Mo() {
8235
8241
  ] }),
8236
8242
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
8237
8243
  /* @__PURE__ */ e("div", { className: "rounded-full bg-green-300 px-3 py-1 text-xs font-medium text-black", children: "Preview" }),
8238
- /* @__PURE__ */ e(ls, {}),
8239
- /* @__PURE__ */ e(is, { variant: "default" })
8244
+ /* @__PURE__ */ e(is, {}),
8245
+ /* @__PURE__ */ e(ls, { variant: "default" })
8240
8246
  ] })
8241
8247
  ] });
8242
8248
  }
8243
8249
  function Do() {
8244
- const t = at(null), a = f((l) => l.isShowingVisual), n = f((l) => l.showAIDialog), s = f((l) => l.isDevMode);
8250
+ const t = at(null), a = f((i) => i.isShowingVisual), n = f((i) => i.showAIDialog), s = f((i) => i.isDevMode);
8245
8251
  me(() => {
8246
- var l, u;
8247
- n ? (l = t.current) == null || l.resize(0) : (u = t.current) == null || u.resize(25);
8252
+ var i, u;
8253
+ n ? (i = t.current) == null || i.resize(0) : (u = t.current) == null || u.resize(25);
8248
8254
  }, [n]);
8249
- function i() {
8255
+ function l() {
8250
8256
  return /* @__PURE__ */ r(ae, { children: [
8251
8257
  /* @__PURE__ */ e(
8252
8258
  pe,
@@ -8255,7 +8261,7 @@ function Do() {
8255
8261
  className: "flex",
8256
8262
  minSize: 20,
8257
8263
  defaultSize: 40,
8258
- children: /* @__PURE__ */ e(wl, {})
8264
+ children: /* @__PURE__ */ e(wi, {})
8259
8265
  }
8260
8266
  ),
8261
8267
  /* @__PURE__ */ e(Be, { withHandle: !0 }),
@@ -8327,7 +8333,7 @@ function Do() {
8327
8333
  {
8328
8334
  direction: "vertical",
8329
8335
  className: "min-h-[250px] min-w-full max-w-lg",
8330
- children: s ? i() : o()
8336
+ children: s ? l() : o()
8331
8337
  }
8332
8338
  );
8333
8339
  }
@@ -8342,7 +8348,7 @@ const Io = [
8342
8348
  }
8343
8349
  ];
8344
8350
  function Oo() {
8345
- const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(Xn), [l, u] = J(!1), c = f((F) => F.actions.setCardSql), h = f((F) => F.actions.setRunSql), d = f((F) => F.showAIDialog), { setShowAIDialog: y } = W(), {
8351
+ const t = at(null), a = at(null), [n, s] = J(!1), [l, o] = J(Xn), [i, u] = J(!1), c = f((F) => F.actions.setCardSql), h = f((F) => F.actions.setRunSql), d = f((F) => F.showAIDialog), { setShowAIDialog: y } = W(), {
8346
8352
  messages: x,
8347
8353
  setMessages: m,
8348
8354
  reload: C,
@@ -8396,7 +8402,7 @@ function Oo() {
8396
8402
  /* @__PURE__ */ e(
8397
8403
  jt,
8398
8404
  {
8399
- checked: i,
8405
+ checked: l,
8400
8406
  onCheckedChange: o,
8401
8407
  children: "Tool Invocations"
8402
8408
  }
@@ -8404,7 +8410,7 @@ function Oo() {
8404
8410
  /* @__PURE__ */ e(
8405
8411
  jt,
8406
8412
  {
8407
- checked: l,
8413
+ checked: i,
8408
8414
  onCheckedChange: u,
8409
8415
  children: "System Message"
8410
8416
  }
@@ -8512,9 +8518,9 @@ function Oo() {
8512
8518
  qr,
8513
8519
  {
8514
8520
  messages: x,
8515
- showTools: i,
8521
+ showTools: l,
8516
8522
  handleRun: $,
8517
- showSystemMessage: l
8523
+ showSystemMessage: i
8518
8524
  }
8519
8525
  ),
8520
8526
  /* @__PURE__ */ e(
@@ -8566,23 +8572,23 @@ function Oo() {
8566
8572
  );
8567
8573
  }
8568
8574
  function To({ authToken: t, onSave: a, onClose: n }) {
8569
- const s = at(null), i = f((v) => v.showAIDialog), { setAuthToken: o } = rt(), { setShowAIDialog: l, setOnSave: u, setOnClose: c } = W(), {
8575
+ const s = at(null), l = f((v) => v.showAIDialog), { setAuthToken: o } = rt(), { setShowAIDialog: i, setOnSave: u, setOnClose: c } = W(), {
8570
8576
  handleDragOver: h,
8571
8577
  handleDragEnd: d,
8572
8578
  handleDragStart: y,
8573
8579
  handleDragCancel: x,
8574
8580
  sensors: m
8575
- } = cl();
8581
+ } = ci();
8576
8582
  me(() => {
8577
8583
  a && u(a), n && c(n);
8578
8584
  }, [a, u, n, c]), me(() => {
8579
8585
  t && t.accessToken && o(t);
8580
8586
  }, [t, o]), me(() => {
8581
8587
  var v, g;
8582
- i ? ((v = s.current) == null || v.resize(40), l(!0)) : (l(!1), (g = s.current) == null || g.resize(0));
8583
- }, [i, l]);
8588
+ l ? ((v = s.current) == null || v.resize(40), i(!0)) : (i(!1), (g = s.current) == null || g.resize(0));
8589
+ }, [l, i]);
8584
8590
  function C(v) {
8585
- v < 1 ? l(!1) : i || l(!0);
8591
+ v < 1 ? i(!1) : l || i(!0);
8586
8592
  }
8587
8593
  function p() {
8588
8594
  return /* @__PURE__ */ r(
@@ -8631,10 +8637,10 @@ function To({ authToken: t, onSave: a, onClose: n }) {
8631
8637
  ) });
8632
8638
  }
8633
8639
  function zo() {
8634
- _((l) => l.selectedCardId);
8635
- const t = _((l) => l.selectedSheetId), { setIsVisualEditing: a } = _((l) => l.actions), n = _((l) => l.isVisualEditing), s = _((l) => l.actions.updateFrame);
8636
- function i(l) {
8637
- t && (s(t, l), a(!1));
8640
+ _((i) => i.selectedCardId);
8641
+ const t = _((i) => i.selectedSheetId), { setIsVisualEditing: a } = _((i) => i.actions), n = _((i) => i.isVisualEditing), s = _((i) => i.actions.updateFrame);
8642
+ function l(i) {
8643
+ t && (s(t, i), a(!1));
8638
8644
  }
8639
8645
  function o() {
8640
8646
  a(!1);
@@ -8646,24 +8652,24 @@ function zo() {
8646
8652
  className: G("flex grow", {
8647
8653
  "max-h-0 overflow-hidden": !n
8648
8654
  }),
8649
- children: /* @__PURE__ */ e(To, { onSave: i, onClose: o })
8655
+ children: /* @__PURE__ */ e(To, { onSave: l, onClose: o })
8650
8656
  }
8651
8657
  );
8652
8658
  }
8653
8659
  function Ao() {
8654
- const t = f((o) => o.selectedDatabaseName), a = f((o) => o.selectedTableName), n = _((o) => o.dashboard.filters) || [], { columns: s } = Ne(), { assignFilter: i } = Cs();
8655
- return /* @__PURE__ */ e(it, { className: "flex-1 basis-0 flex-col px-3", children: s == null ? void 0 : s.map((o) => {
8656
- const l = n == null ? void 0 : n.find(
8660
+ const t = f((o) => o.selectedDatabaseName), a = f((o) => o.selectedTableName), n = _((o) => o.dashboard.filters) || [], { columns: s } = Ne(), { assignFilter: l } = Cs();
8661
+ return /* @__PURE__ */ e(lt, { className: "flex-1 basis-0 flex-col px-3", children: s == null ? void 0 : s.map((o) => {
8662
+ const i = n == null ? void 0 : n.find(
8657
8663
  (u) => u.column === xe(o.column_name) && u.table === a && u.database === t
8658
8664
  );
8659
8665
  return /* @__PURE__ */ e(
8660
8666
  "div",
8661
8667
  {
8662
- onClick: () => i(o),
8668
+ onClick: () => l(o),
8663
8669
  className: G(
8664
8670
  "group flex cursor-pointer items-center justify-between border border-dashed border-background px-3 py-[6px] text-sm transition-colors hover:bg-muted/50",
8665
8671
  {
8666
- "bg-muted": l
8672
+ "bg-muted": i
8667
8673
  }
8668
8674
  ),
8669
8675
  children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
@@ -8756,10 +8762,10 @@ function Eo() {
8756
8762
  );
8757
8763
  }
8758
8764
  function _o() {
8759
- const t = _((i) => i.dashboard), a = _((i) => i.actions.setDashboard), n = _(
8760
- (i) => i.showDashboardJSON
8765
+ const t = _((l) => l.dashboard), a = _((l) => l.actions.setDashboard), n = _(
8766
+ (l) => l.showDashboardJSON
8761
8767
  ), s = _(
8762
- (i) => i.actions.setShowDashboardJSON
8768
+ (l) => l.actions.setShowDashboardJSON
8763
8769
  );
8764
8770
  return /* @__PURE__ */ r(
8765
8771
  "div",
@@ -8784,10 +8790,10 @@ function _o() {
8784
8790
  /* @__PURE__ */ e(
8785
8791
  Ur,
8786
8792
  {
8787
- onChange: (i) => {
8788
- if (i)
8793
+ onChange: (l) => {
8794
+ if (l)
8789
8795
  try {
8790
- JSON.parse(i), a(JSON.parse(i));
8796
+ JSON.parse(l), a(JSON.parse(l));
8791
8797
  } catch {
8792
8798
  }
8793
8799
  },
@@ -8824,7 +8830,7 @@ function Bo({
8824
8830
  /* @__PURE__ */ r(Kr, { children: [
8825
8831
  /* @__PURE__ */ e(_o, {}),
8826
8832
  /* @__PURE__ */ r(Jr, { ...n, children: [
8827
- t && /* @__PURE__ */ e(sl, {}),
8833
+ t && /* @__PURE__ */ e(si, {}),
8828
8834
  /* @__PURE__ */ e(zo, {}),
8829
8835
  /* @__PURE__ */ e(Eo, {})
8830
8836
  ] })
@@ -8834,14 +8840,14 @@ function Bo({
8834
8840
  export {
8835
8841
  Go as Dashboard,
8836
8842
  Uo as DashboardWC,
8837
- nl as ScheduleDashboard,
8843
+ ni as ScheduleDashboard,
8838
8844
  ct as SelectComponent,
8839
8845
  $o as SemaphorDataProvider,
8840
8846
  Qo as SemaphorQueryClient,
8841
8847
  Bo as Surfboard,
8842
- Ki as cleanCard,
8848
+ Kl as cleanCard,
8843
8849
  ma as createSqlGenConfig,
8844
- el as downloadPdf,
8850
+ ei as downloadPdf,
8845
8851
  xe as fmt,
8846
8852
  Ko as getColumnDataType,
8847
8853
  Wa as getDashbaordStateWithoutData,