react-semaphor 0.1.548 → 0.1.549

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.
Files changed (36) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +1 -1
  3. package/dist/chunks/{assistant-chat-DCcWsoGm.js → assistant-chat-CUSvuESS.js} +1831 -1846
  4. package/dist/chunks/{custom-visual-inputs-BTRnwsfd.js → custom-visual-inputs-CwAcigQS.js} +1 -1
  5. package/dist/chunks/{dashboard-BZHL9a-z.js → dashboard-Cm7WkARH.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-DML-cAzB.js → dashboard-briefing-launcher-X0HzNpS8.js} +627 -629
  7. package/dist/chunks/{dashboard-controls-BGoBTPS7.js → dashboard-controls-BuX6TMNK.js} +219 -219
  8. package/dist/chunks/{dashboard-json-iHPsdn3j.js → dashboard-json-Cc4u2xvy.js} +1 -1
  9. package/dist/chunks/{document-dashboard-inputs-B2AqPfrq.js → document-dashboard-inputs-DPQ_wUGD.js} +2 -2
  10. package/dist/chunks/{edit-dashboard-visual-CLEFFf2T.js → edit-dashboard-visual-DX2CzibK.js} +606 -606
  11. package/dist/chunks/{filter-reach-copy-ByzGadUk.js → filter-reach-copy-Bc-Gei83.js} +3 -3
  12. package/dist/chunks/{global-date-filter-utils-CeeFJ1CP.js → global-date-filter-utils-CnumW4j2.js} +1656 -1651
  13. package/dist/chunks/{index-DeDHr3iz.js → index-DzsdV1o4.js} +3 -3
  14. package/dist/chunks/{raw-temporal-presentation-CrUM2I_o.js → raw-temporal-presentation-CBKeEPYA.js} +1 -1
  15. package/dist/chunks/report-preferences-dialog-B9oYQ6OJ.js +2180 -0
  16. package/dist/chunks/{resolve-dashboard-input-context-BmWF9hSl.js → resolve-dashboard-input-context-DVWF7p5C.js} +1 -1
  17. package/dist/chunks/{saved-dashboard-context-qtfzl9Eb.js → saved-dashboard-context-BMqMzNAo.js} +4 -4
  18. package/dist/chunks/{semaphor-ready-indicator-Ol6VcaR7.js → semaphor-ready-indicator-wWkPH4ue.js} +11743 -11720
  19. package/dist/chunks/{shelf-drop-preview-context-C2SEC3I9.js → shelf-drop-preview-context-B86d8IZO.js} +3 -3
  20. package/dist/chunks/{use-create-flow-overlay-state-CbGIjaVD.js → use-create-flow-overlay-state-DPNjYyi3.js} +2 -2
  21. package/dist/dashboard/index.js +1 -1
  22. package/dist/dashboard-authoring/index.js +7 -7
  23. package/dist/index.js +12 -12
  24. package/dist/live-channel/index.js +124 -0
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.js +1 -1
  27. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  28. package/dist/types/lib/stores/dashboard-store.d.ts +9 -0
  29. package/dist/types/lib/types/common-types.d.ts +26 -1
  30. package/dist/types/live-channel.d.ts +2 -0
  31. package/dist/types/shared/assistant-protocol/parts.d.ts +11 -0
  32. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +14 -44
  33. package/dist/types/shared/live-channel/index.d.ts +1 -0
  34. package/dist/types/shared/live-channel/live-channel-contract.d.ts +126 -0
  35. package/package.json +5 -1
  36. package/dist/chunks/report-preferences-dialog-CM7kXmXp.js +0 -1977
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as n, Fragment as pe } from "react/jsx-runtime";
2
2
  import * as fn from "react";
3
- import gn, { useState as U, useEffect as we, useMemo as ee, useRef as Pe, useCallback as st, useId as ja, useContext as Ar, Suspense as zc } from "react";
4
- import { F as Uc, P as Gc, a as Hc, b as co, u as ot, S as bl, c as vl, r as uo, E as Jc, T as Qc, A as Wc, d as Zc, e as xn, f as Xc, g as ed, h as td } from "./shelf-drop-preview-context-C2SEC3I9.js";
3
+ import gn, { useState as U, useEffect as we, useMemo as ee, useRef as Pe, useCallback as st, useId as qa, useContext as Ar, Suspense as zc } from "react";
4
+ import { F as Uc, P as Gc, a as Hc, b as co, u as ot, S as bl, c as vl, r as uo, E as Jc, T as Qc, A as Wc, d as Xc, e as xn, f as Zc, g as ed, h as td } from "./shelf-drop-preview-context-B86d8IZO.js";
5
5
  import "./index-CuHybtft.js";
6
6
  import { ab as mo, S as ad, B as yl, aO as nd, t as bn, aU as Qn, u as ho } from "./validators-C-aOQlTB.js";
7
7
  import "./matrix-operation-contract-D6vYkZK4.js";
@@ -9,21 +9,21 @@ import "./analytics-base-schemas-BKs3flFS.js";
9
9
  import "zod";
10
10
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Ka } from "../value-format-preferences/index.js";
11
11
  import { c as G } from "./_commonjsHelpers-DimLPMtv.js";
12
- import { dK as po, dL as za, dc as Ua, dM as Rr, dN as en, dO as rd, a4 as Ne, dP as sd, bE as Bt, bF as $t, bG as la, bH as qt, bI as Ut, bC as Ga, aL as Ct, aM as St, dQ as Ge, bD as dt, dR as fo, dS as un, aX as pt, de as Pr, dT as Ea, aO as tn, a3 as R, a$ as xt, dU as go, b2 as Yt, u as xe, c2 as Lr, dV as ld, dW as xo, dX as od, dY as id, dZ as cd, c3 as bo, d_ as dd, d$ as Mn, dE as vo, e0 as ud, di as yo, cs as Yr, cu as md, cv as hd, cw as pd, cx as fd, cy as gd, cz as xd, cA as bd, cB as vd, b0 as _r, a_ as ia, e1 as No, e2 as yd, bh as qa, e3 as Co, bg as Fn, b6 as wo, e4 as Vr, bM as En, bT as Nd, cR as Cd, c$ as br, aS as ca, aT as da, aU as ua, aY as wd, cV as Br, e5 as $r, a1 as So, e6 as qr, e7 as Sd, e8 as kd, e9 as ko, dt as To, ea as Td, eb as Dd, ec as _t, ed as Md, ee as Fd, bj as Ed, ef as Id, eg as Od, eh as Do, I as Mo, M as Ad, d5 as Rd, ei as Pd, dy as Ld, ej as jr, ek as Yd, el as _d, em as Nl, en as Vd, E as In, e as Kr, eo as Fo, ep as Bd, eq as Cl, er as $d, es as Eo, et as qd, eu as jd, ev as Kd, ew as zd, ex as Ud, ey as Gd, ez as Hd, eA as vn, eB as Jd, eC as Qd, eD as Io, eE as Oo, eF as Wd, eG as Zd, cN as Xd, eH as eu, eI as Ao, eJ as tu, dv as au, cO as On, eK as An, cg as zr, ch as Ur, ci as Gr, eL as nu, eM as ru, eN as Ta, eO as Ha, eP as Ja, eQ as Qa, aZ as su, bi as lu, eR as ou, eS as iu, eT as cu, eU as wl, eV as du, eW as Ro, eX as Po, b1 as Lo, b3 as uu, b8 as mu, b9 as hu, b4 as pu, b5 as fu, eY as gu, eZ as xu, e_ as bu, e$ as vu, f0 as Sl, bb as yu, bc as Nu, f1 as Yo, f2 as ya, f3 as Na, f4 as Ca, da as Da, cm as _o, c0 as Pt, cq as kl, cn as Tl, co as vr, f5 as Vo, f6 as Cu, f7 as wu, f8 as Su, f9 as ku, fa as Rn, fb as $e, fc as qe, fd as je, dA as Tu, dB as Du, fe as Bo, ff as $o, fg as Mu, fh as Fu, fi as qo, fj as Dl, fk as jo, fl as Eu, fm as yr, fn as Iu, fo as Ou, fp as Au, fq as Ru, fr as Pu, fs as Lu, ft as Yu, fu as _u, fv as Vu, fw as Bu, fx as $u, fy as ta, fz as Pa, fA as qu, fB as Ml, fC as ju, fD as Ku, fE as Wn, fF as Fl, fG as zu, fH as Uu, fI as Gu, fJ as Hu, bz as Hr, bA as Wa, fK as Zn, fL as Ko, fM as Ju, fN as Qu, fO as Wu, fP as Zu, fQ as zo, fR as Uo, fS as Xu, fT as em, fU as Go, fV as tm, fW as am, fX as Ho, dw as nm, dx as rm, cP as sm, fY as lm, dz as om, fZ as im, f_ as Jo, db as Jr, f$ as Qo, g0 as Wo, g1 as cm, g2 as dm, g3 as um, g4 as mm, g5 as hm, g6 as pm, g7 as fm, g8 as gm, g9 as xm, ga as bm, gb as Qr, gc as Zo, gd as Xo, ge as mn, gf as ei, gg as ti, gh as El, gi as vm, gj as ym, gk as Nm, dG as Cm, gl as wm, gm as Il, gn as ai, go as Sm, bB as km, gp as Tm, gq as Dm, gr as wa, gs as ni, gt as Mm, gu as Fm, gv as Em, gw as Im, gx as Om, gy as Am, gz as yn, gA as ra, gB as Nr, gC as Cr, gD as Nn, gE as ri, gF as si, gG as li, bd as Rm, gH as Ol, dk as Pm, gI as Lm, dl as Ym, dn as _m, dp as Vm, i as Bm, gJ as $m, gK as qm, gL as jm, gM as Km, gN as zm, gO as Um, gP as Gm, dF as Hm, F as Jm, gQ as Qm, cT as Wm } from "./semaphor-ready-indicator-Ol6VcaR7.js";
13
- import { B as te, k as Cn, f as Pn, l as _, r as ne, s as re, t as se, u as le, v as K, p as ut, m as gt, n as mt, o as ht, q as De, j as Wr, a0 as Zm, P as bt, a as Tt, b as vt, a1 as Xm, L as Ia, C as oa, T as Gt, d as Ht, e as tt, g as It, c as ma, I as Ma, a2 as eh, a3 as th, S as wn, a4 as wr, a5 as oi, w as Ee, a6 as ah, R as Al, i as ii, a7 as nh } from "./switch-CEBOR4n7.js";
12
+ import { dM as po, dN as za, dc as Ua, dB as Rr, dO as en, dP as rd, a4 as Ne, dQ as sd, bI as Bt, bJ as $t, bK as la, bL as jt, bM as Ut, bG as Ga, aL as Ct, aM as St, dR as Ge, bH as dt, dS as fo, dT as un, aX as pt, de as Pr, dU as Ea, aO as tn, a3 as R, a$ as xt, dV as go, b2 as Yt, u as xe, c6 as Lr, dW as ld, dX as xo, dY as od, dZ as id, d_ as cd, c7 as bo, d$ as dd, e0 as Mn, dG as vo, e1 as ud, di as yo, ct as Yr, cv as md, cw as hd, cx as pd, cy as fd, cz as gd, cA as xd, cB as bd, cC as vd, b0 as _r, a_ as ia, e2 as No, e3 as yd, bh as ja, e4 as Co, bg as Fn, b6 as wo, e5 as Vr, bQ as En, bX as Nd, cS as Cd, c$ as br, aS as ca, aT as da, aU as ua, aY as wd, cV as Br, e6 as $r, a1 as So, e7 as jr, e8 as Sd, e9 as kd, ea as ko, dt as To, eb as Td, ec as Dd, ed as _t, ee as Md, ef as Fd, bj as Ed, eg as Id, eh as Od, ei as Do, I as Mo, M as Ad, d5 as Rd, ej as Pd, dy as Ld, ek as qr, el as Yd, em as _d, en as Nl, eo as Vd, E as In, e as Kr, ep as Fo, eq as Bd, er as Cl, es as $d, et as Eo, eu as jd, ev as qd, ew as Kd, ex as zd, ey as Ud, ez as Gd, eA as Hd, eB as vn, eC as Jd, eD as Qd, eE as Io, eF as Oo, eG as Wd, eH as Xd, cO as Zd, eI as eu, eJ as Ao, eK as tu, dv as au, cP as On, eL as An, ci as zr, cj as Ur, ck as Gr, eM as nu, eN as ru, eO as Ta, eP as Ha, eQ as Ja, eR as Qa, aZ as su, bi as lu, eS as ou, eT as iu, eU as cu, eV as wl, eW as du, eX as Ro, eY as Po, b1 as Lo, b3 as uu, b8 as mu, b9 as hu, b4 as pu, b5 as fu, eZ as gu, e_ as xu, e$ as bu, f0 as vu, f1 as Sl, bb as yu, bc as Nu, f2 as Yo, f3 as ya, f4 as Na, f5 as Ca, da as Da, cn as _o, c4 as Pt, cr as kl, co as Tl, cp as vr, f6 as Vo, f7 as Cu, f8 as wu, f9 as Su, fa as ku, fb as Rn, fc as $e, fd as je, fe as qe, dC as Tu, dD as Du, ff as Bo, fg as $o, fh as Mu, fi as Fu, fj as jo, fk as Dl, fl as qo, fm as Eu, fn as yr, fo as Iu, fp as Ou, fq as Au, fr as Ru, fs as Pu, ft as Lu, fu as Yu, fv as _u, fw as Vu, fx as Bu, fy as $u, fz as ta, fA as Pa, fB as ju, fC as Ml, fD as qu, fE as Ku, fF as Wn, fG as Fl, fH as zu, fI as Uu, fJ as Gu, fK as Hu, bD as Hr, bE as Wa, fL as Xn, fM as Ko, fN as Ju, fO as Qu, fP as Wu, fQ as Xu, fR as zo, fS as Uo, fT as Zu, fU as em, fV as Go, fW as tm, fX as am, fY as Ho, dw as nm, dx as rm, cQ as sm, fZ as lm, dz as om, f_ as im, f$ as Jo, db as Jr, g0 as Qo, g1 as Wo, g2 as cm, g3 as dm, g4 as um, g5 as mm, g6 as hm, g7 as pm, g8 as fm, g9 as gm, ga as xm, gb as bm, gc as Qr, gd as Xo, ge as Zo, gf as mn, gg as ei, gh as ti, gi as El, gj as vm, gk as ym, gl as Nm, dI as Cm, gm as wm, gn as Il, go as ai, gp as Sm, bF as km, gq as Tm, gr as Dm, gs as wa, gt as ni, gu as Mm, gv as Fm, gw as Em, gx as Im, gy as Om, gz as Am, gA as yn, gB as ra, gC as Nr, gD as Cr, gE as Nn, gF as ri, gG as si, gH as li, bd as Rm, gI as Ol, dk as Pm, gJ as Lm, dl as Ym, dn as _m, dp as Vm, i as Bm, gK as $m, gL as jm, gM as qm, gN as Km, gO as zm, gP as Um, gQ as Gm, dH as Hm, F as Jm, gR as Qm, bu as Wm } from "./semaphor-ready-indicator-wWkPH4ue.js";
13
+ import { B as te, k as Cn, f as Pn, l as _, r as ne, s as re, t as se, u as le, v as K, p as ut, m as gt, n as mt, o as ht, q as De, j as Wr, a0 as Xm, P as bt, a as Tt, b as vt, a1 as Zm, L as Ia, C as oa, T as Gt, d as Ht, e as tt, g as It, c as ma, I as Ma, a2 as eh, a3 as th, S as wn, a4 as wr, a5 as oi, w as Ee, a6 as ah, R as Al, i as ii, a7 as nh } from "./switch-CEBOR4n7.js";
14
14
  import { U as ci } from "./upload-BFX7apKV.js";
15
15
  import { c as Ke, C as Ot, X as Be } from "./x-4f5U2XwU.js";
16
- import { E as Za, C as kt, S as Zr, M as rh, a as sh } from "./selection-reducer-CJzkTZio.js";
17
- import { em as lh, c9 as oh, en as ih, eo as Xr, ep as Fa, eq as di, er as ch, es as Rl, et as dh, eu as uh, ev as Pl, bo as ui, dm as Oa, az as mh, e2 as es, dt as mi, n as hh, Y as ph, ew as fh, ex as Ll, v as sa, dQ as gh, cV as xh, ey as bh, ez as hi, p as vh, bC as yh, eA as pi, e3 as Nh, b_ as Ch, bY as Xn, eB as wh, eC as Sh, eD as kh, eE as Th, cT as Dh, eF as Mh, eG as Fh, eH as ts, c as Kt, eI as on, du as Eh, aT as fi, aW as Ih, aF as Oh, aV as Sr, aX as hn, bF as gi, aE as Ah, bD as Rh, eJ as Ph, eK as Lh, eL as Yh, eM as wt, eN as _h, e5 as Lt, da as Vh, eO as Bh, d9 as $h, eP as qh, eQ as jh, eR as Kh, de as zh, dk as Xa, dv as Uh, eS as xi, di as Gh, e0 as Yl, dj as Hh, aY as Jh, eT as Qh, dZ as er, eU as Wh, eV as Zh, eW as Xh, eX as bi, eY as as, e1 as ep } from "./global-date-filter-utils-CeeFJ1CP.js";
16
+ import { E as Xa, C as kt, S as Xr, M as rh, a as sh } from "./selection-reducer-CJzkTZio.js";
17
+ import { em as lh, c9 as oh, en as ih, eo as Zr, ep as Fa, eq as di, er as ch, es as Rl, et as dh, eu as uh, ev as Pl, bo as ui, dm as Oa, az as mh, e2 as es, dt as mi, n as hh, Y as ph, ew as fh, ex as Ll, v as sa, dQ as gh, cV as xh, ey as bh, ez as hi, p as vh, bC as yh, eA as pi, e3 as Nh, b_ as Ch, bY as Zn, eB as wh, eC as Sh, eD as kh, eE as Th, cT as Dh, eF as Mh, eG as Fh, eH as ts, c as Kt, eI as on, du as Eh, aT as fi, aW as Ih, aF as Oh, aV as Sr, aX as hn, bF as gi, aE as Ah, bD as Rh, eJ as Ph, eK as Lh, eL as Yh, eM as wt, eN as _h, e5 as Lt, da as Vh, eO as Bh, d9 as $h, eP as jh, eQ as qh, eR as Kh, de as zh, dk as Za, dv as Uh, eS as xi, di as Gh, e0 as Yl, dj as Hh, aY as Jh, eT as Qh, dZ as er, eU as Wh, eV as Xh, eW as Zh, eX as bi, eY as as, e1 as ep } from "./global-date-filter-utils-CnumW4j2.js";
18
18
  import { D as tp } from "./token-types-BMqRmT-C.js";
19
- import { b as ap, F as np, V as vi, I as lt, u as rp, C as sp } from "./use-create-flow-overlay-state-CbGIjaVD.js";
19
+ import { b as ap, F as np, V as vi, I as lt, u as rp, C as sp } from "./use-create-flow-overlay-state-DPNjYyi3.js";
20
20
  import { i as yi } from "./index-CtoK1Lgu.js";
21
- import { N as ns, g as lp, A as Sa, B as op, C as ip, E as cp } from "./filter-reach-copy-ByzGadUk.js";
21
+ import { N as ns, g as lp, A as Sa, B as op, C as ip, E as cp } from "./filter-reach-copy-Bc-Gei83.js";
22
22
  import { F as dp, E as Ln, D as rs } from "./pivot-result-lifecycle-pwq3b7LC.js";
23
23
  import "./table-settings-WysCBj62.js";
24
- import { f as ha, r as pa, g as an, a as Vt, c as ka, i as up, d as mp, e as hp, b as Ni, n as pp, h as kr, j as fp, k as gp, l as xp } from "./custom-visual-inputs-BTRnwsfd.js";
24
+ import { f as ha, r as pa, g as an, a as Vt, c as ka, i as up, d as mp, e as hp, b as Ni, n as pp, h as kr, j as fp, k as gp, l as xp } from "./custom-visual-inputs-CwAcigQS.js";
25
25
  import { f as pn } from "./editor-draft-sync-BN5qYHPF.js";
26
- import { a5 as bp, H as vp, aI as yp, aJ as Np, aK as Cp, aL as wp, aM as Sp, e as kp, aN as Tp, aA as Ci, aO as Dp, aB as wi, aP as Mp, av as Fp, x as Ep, aQ as Si, as as Ip, ak as ki, al as Op, aR as Ap, aS as Rp, aT as Pp, E as Lp } from "./resolve-dashboard-input-context-BmWF9hSl.js";
26
+ import { a5 as bp, H as vp, aI as yp, aJ as Np, aK as Cp, aL as wp, aM as Sp, e as kp, aN as Tp, aA as Ci, aO as Dp, aB as wi, aP as Mp, av as Fp, x as Ep, aQ as Si, as as Ip, ak as ki, al as Op, aR as Ap, aS as Rp, aT as Pp, E as Lp } from "./resolve-dashboard-input-context-DVWF7p5C.js";
27
27
  import "react-dom";
28
28
  import { L as _l } from "./list-filter-DsaTbM3J.js";
29
29
  import { j as Yp, t as _p } from "./temporal-bucket-CQOSbv9-.js";
@@ -31,8 +31,8 @@ import { r as Vp } from "./export-file-format-C-tJsxsf.js";
31
31
  import { u as Bp } from "./appearance-context-DEYtWinQ.js";
32
32
  import { D as Vl } from "./metric-comparison-zpGw4lD6.js";
33
33
  import { f as $p, m as Ti } from "./matrix-formatter-DWEeC0_c.js";
34
- import { P as qp } from "./palette-D10o_yYX.js";
35
- import { i as jp, j as Kp } from "./document-dashboard-inputs-B2AqPfrq.js";
34
+ import { P as jp } from "./palette-D10o_yYX.js";
35
+ import { i as qp, j as Kp } from "./document-dashboard-inputs-DPQ_wUGD.js";
36
36
  /**
37
37
  * @license lucide-react v0.453.0 - ISC
38
38
  *
@@ -210,7 +210,7 @@ const Wp = Ke("GitCompareArrows", [
210
210
  * This source code is licensed under the ISC license.
211
211
  * See the LICENSE file in the root directory of this source tree.
212
212
  */
213
- const Zp = Ke("LayoutList", [
213
+ const Xp = Ke("LayoutList", [
214
214
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
215
215
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
216
216
  ["path", { d: "M14 4h7", key: "3xa0d5" }],
@@ -224,7 +224,7 @@ const Zp = Ke("LayoutList", [
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
226
  */
227
- const Xp = Ke("ListEnd", [
227
+ const Zp = Ke("ListEnd", [
228
228
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
229
229
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
230
230
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -384,7 +384,7 @@ function cf(t, a = {}) {
384
384
  case "table":
385
385
  return /* @__PURE__ */ e(rd, { className: s });
386
386
  case "view":
387
- return /* @__PURE__ */ e(Za, { className: s });
387
+ return /* @__PURE__ */ e(Xa, { className: s });
388
388
  case "materialized view":
389
389
  return /* @__PURE__ */ e(Hp, { className: s });
390
390
  case "model":
@@ -434,13 +434,13 @@ function df({
434
434
  }, m = (p) => r.some((x) => Ge(x, p));
435
435
  return d.length === 0 ? /* @__PURE__ */ e(Bt, { open: t, onOpenChange: a, children: /* @__PURE__ */ n($t, { className: "max-w-md", children: [
436
436
  /* @__PURE__ */ n(la, { children: [
437
- /* @__PURE__ */ e(qt, { children: "No Data Available" }),
437
+ /* @__PURE__ */ e(jt, { children: "No Data Available" }),
438
438
  /* @__PURE__ */ e(Ut, { children: "No entities are currently available in the AI context. Please add some data sources to the dashboard first." })
439
439
  ] }),
440
440
  /* @__PURE__ */ e(Ga, { children: /* @__PURE__ */ e(te, { onClick: () => a(!1), children: "Close" }) })
441
441
  ] }) }) : /* @__PURE__ */ e(Bt, { open: t, onOpenChange: a, children: /* @__PURE__ */ n($t, { className: "flex max-w-2xl flex-col", children: [
442
442
  /* @__PURE__ */ n(la, { children: [
443
- /* @__PURE__ */ e(qt, { children: "Select Data to Analyze" }),
443
+ /* @__PURE__ */ e(jt, { children: "Select Data to Analyze" }),
444
444
  /* @__PURE__ */ e(Ut, { children: "Choose entities from the dashboard's context" })
445
445
  ] }),
446
446
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-4", children: [
@@ -604,14 +604,14 @@ function uf({
604
604
  );
605
605
  if ((B = N.source) != null && B.name && ((D = N.target) != null && D.name) && N.joinKeyGroups[0].keys.length === 0) {
606
606
  const Y = a.find(
607
- (q) => {
608
- var j;
609
- return q.name === ((j = N.source) == null ? void 0 : j.name);
607
+ (j) => {
608
+ var q;
609
+ return j.name === ((q = N.source) == null ? void 0 : q.name);
610
610
  }
611
611
  ), O = a.find(
612
- (q) => {
613
- var j;
614
- return q.name === ((j = N.target) == null ? void 0 : j.name);
612
+ (j) => {
613
+ var q;
614
+ return j.name === ((q = N.target) == null ? void 0 : q.name);
615
615
  }
616
616
  ), P = {
617
617
  id: `key-${Date.now()}`,
@@ -640,7 +640,7 @@ function uf({
640
640
  $[0] = {
641
641
  ...$[0],
642
642
  keys: [P]
643
- }, N.joinKeyGroups = $, E[E.findIndex((q) => q.id === A)] = N;
643
+ }, N.joinKeyGroups = $, E[E.findIndex((j) => j.id === A)] = N;
644
644
  }
645
645
  s({
646
646
  ...r,
@@ -891,15 +891,15 @@ function gf({
891
891
  ))
892
892
  O.target.name && !D.includes(O.target.name) && D.push(O.target.name);
893
893
  const Y = (O) => {
894
- const P = O.joinKeyGroups.flatMap((j) => j.keys), $ = P.find(
895
- (j) => {
896
- var H, Z;
897
- return ((H = j.source) == null ? void 0 : H.name) && ((Z = j.target) == null ? void 0 : Z.name);
894
+ const P = O.joinKeyGroups.flatMap((q) => q.keys), $ = P.find(
895
+ (q) => {
896
+ var H, X;
897
+ return ((H = q.source) == null ? void 0 : H.name) && ((X = q.target) == null ? void 0 : X.name);
898
898
  }
899
899
  );
900
900
  if (!$) return null;
901
- const q = P.length > 1 ? ` +${P.length - 1}` : "";
902
- return `${$.source.name} ${$.operator || "="} ${$.target.name}${q}`;
901
+ const j = P.length > 1 ? ` +${P.length - 1}` : "";
902
+ return `${$.source.name} ${$.operator || "="} ${$.target.name}${j}`;
903
903
  };
904
904
  return /* @__PURE__ */ n("div", { className: "min-w-0 space-y-5", children: [
905
905
  /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
@@ -992,11 +992,11 @@ function gf({
992
992
  (z) => z.name === O.source.name
993
993
  ), $ = a.find(
994
994
  (z) => z.name === O.target.name
995
- ), q = h.has(O.id), j = C.has(O.id) || O.joinKeyGroups.length > 1 || O.joinKeyGroups.some((z) => z.operator !== "AND"), H = Y(O), Z = O.relationshipTraversalDirection === "reverse" ? O.relationshipCardinality === "many_to_one" ? "one_to_many" : O.relationshipCardinality === "one_to_many" ? "many_to_one" : O.relationshipCardinality : O.relationshipCardinality;
995
+ ), j = h.has(O.id), q = C.has(O.id) || O.joinKeyGroups.length > 1 || O.joinKeyGroups.some((z) => z.operator !== "AND"), H = Y(O), X = O.relationshipTraversalDirection === "reverse" ? O.relationshipCardinality === "many_to_one" ? "one_to_many" : O.relationshipCardinality === "one_to_many" ? "many_to_one" : O.relationshipCardinality : O.relationshipCardinality;
996
996
  return /* @__PURE__ */ n(
997
997
  "div",
998
998
  {
999
- className: `rounded-[6px] border ${q ? "border-border" : "border-border/60"}`,
999
+ className: `rounded-[6px] border ${j ? "border-border" : "border-border/60"}`,
1000
1000
  children: [
1001
1001
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-2.5", children: [
1002
1002
  /* @__PURE__ */ n(
@@ -1006,7 +1006,7 @@ function gf({
1006
1006
  onClick: () => g(O.id),
1007
1007
  className: "flex min-w-0 flex-1 items-center gap-2 text-left",
1008
1008
  children: [
1009
- q ? /* @__PURE__ */ e(Ot, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(kt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1009
+ j ? /* @__PURE__ */ e(Ot, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(kt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1010
1010
  /* @__PURE__ */ n("span", { className: "flex min-w-0 items-center gap-1.5 text-[12.5px] font-medium text-foreground", children: [
1011
1011
  /* @__PURE__ */ e("span", { className: "truncate", children: O.source.name || "source" }),
1012
1012
  /* @__PURE__ */ e(un, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
@@ -1050,7 +1050,7 @@ function gf({
1050
1050
  onClick: () => g(O.id),
1051
1051
  children: [
1052
1052
  /* @__PURE__ */ e(Pr, { className: "h-3 w-3" }),
1053
- q ? "Editing" : "Edit"
1053
+ j ? "Editing" : "Edit"
1054
1054
  ]
1055
1055
  }
1056
1056
  ),
@@ -1067,7 +1067,7 @@ function gf({
1067
1067
  )
1068
1068
  ] })
1069
1069
  ] }),
1070
- q && /* @__PURE__ */ n("div", { className: "space-y-4 border-t border-border/60 px-3 pb-4 pt-3", children: [
1070
+ j && /* @__PURE__ */ n("div", { className: "space-y-4 border-t border-border/60 px-3 pb-4 pt-3", children: [
1071
1071
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 gap-3 md:grid-cols-3", children: [
1072
1072
  /* @__PURE__ */ n("div", { className: "min-w-0 space-y-1.5", children: [
1073
1073
  /* @__PURE__ */ e(_, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "From" }),
@@ -1174,7 +1174,7 @@ function gf({
1174
1174
  ] }),
1175
1175
  /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
1176
1176
  /* @__PURE__ */ e(_, { className: "text-[11.5px]", children: "Matches per row (optional)" }),
1177
- /* @__PURE__ */ n(ne, { value: Z || "unknown", onValueChange: (z) => p(O.id, {
1177
+ /* @__PURE__ */ n(ne, { value: X || "unknown", onValueChange: (z) => p(O.id, {
1178
1178
  relationshipCardinality: z === "unknown" ? void 0 : z,
1179
1179
  relationshipTraversalDirection: z === "unknown" ? void 0 : "forward"
1180
1180
  }), children: [
@@ -1196,7 +1196,7 @@ function gf({
1196
1196
  ". Repeated matches may increase counts and sums. Declaring the expected matches helps validate this join."
1197
1197
  ] })
1198
1198
  ] }),
1199
- O.source.name && O.target.name && P && $ && /* @__PURE__ */ e("div", { className: "space-y-2", children: j ? /* @__PURE__ */ e(
1199
+ O.source.name && O.target.name && P && $ && /* @__PURE__ */ e("div", { className: "space-y-2", children: q ? /* @__PURE__ */ e(
1200
1200
  vf,
1201
1201
  {
1202
1202
  join: O,
@@ -1572,7 +1572,7 @@ function Ei({
1572
1572
  return /* @__PURE__ */ n(Bt, { open: a, onOpenChange: r, children: [
1573
1573
  /* @__PURE__ */ n($t, { className: "max-h-[88vh] w-[calc(100vw-2rem)] max-w-4xl overflow-y-auto overflow-x-hidden", children: [
1574
1574
  /* @__PURE__ */ n(la, { children: [
1575
- /* @__PURE__ */ e(qt, { className: "text-[15px] font-semibold tracking-tight", children: "How datasets connect" }),
1575
+ /* @__PURE__ */ e(jt, { className: "text-[15px] font-semibold tracking-tight", children: "How datasets connect" }),
1576
1576
  /* @__PURE__ */ e(Ut, { className: "text-[12px] text-muted-foreground", children: "Datasets joined together so a card can use fields from all of them." })
1577
1577
  ] }),
1578
1578
  /* @__PURE__ */ e(
@@ -1689,7 +1689,7 @@ function Nf({
1689
1689
  var M;
1690
1690
  const s = R((T) => T.card), { autoJoinMetadata: o } = xt(s), d = R(
1691
1691
  (T) => T.actions.updateCardConfig
1692
- ), c = Xr(s) || {
1692
+ ), c = Zr(s) || {
1693
1693
  baseEntity: {
1694
1694
  type: "table",
1695
1695
  name: "",
@@ -2890,14 +2890,14 @@ function _f({
2890
2890
  [V]
2891
2891
  ), D = (oe) => {
2892
2892
  m(oe), oe === "semantic" || oe.startsWith("domain:") ? r.mode !== "semanticDomain" && y("semanticDomain") : (oe === "direct" || oe.startsWith("conn:")) && r.mode === "semanticDomain" && y("database");
2893
- }, Y = f.startsWith("domain:"), O = f.startsWith("conn:"), P = Y ? f.slice(7) : void 0, $ = O ? f.slice(5) : void 0, q = !L || f === "all" || f === "semantic" || Y, j = M && !T && (f === "all" || f === "direct" || O), H = ((s == null ? void 0 : s.length) ?? 0) > 0, Z = l.length === 0 && !H, ie = l.length === 0 && H ? "Clear" : "Add", z = I ? "Select dataset" : "Add data";
2893
+ }, Y = f.startsWith("domain:"), O = f.startsWith("conn:"), P = Y ? f.slice(7) : void 0, $ = O ? f.slice(5) : void 0, j = !L || f === "all" || f === "semantic" || Y, q = M && !T && (f === "all" || f === "direct" || O), H = ((s == null ? void 0 : s.length) ?? 0) > 0, X = l.length === 0 && !H, ie = l.length === 0 && H ? "Clear" : "Add", z = I ? "Select dataset" : "Add data";
2894
2894
  return /* @__PURE__ */ e(Bt, { open: t, onOpenChange: a, children: /* @__PURE__ */ n(
2895
2895
  $t,
2896
2896
  {
2897
2897
  showCloseButton: !1,
2898
2898
  className: "flex h-[560px] w-[620px] max-w-[620px] flex-col gap-0 overflow-hidden rounded-[6px] border border-border bg-popover p-0",
2899
2899
  children: [
2900
- /* @__PURE__ */ e(Zm, { children: /* @__PURE__ */ e(qt, { children: z }) }),
2900
+ /* @__PURE__ */ e(Xm, { children: /* @__PURE__ */ e(jt, { children: z }) }),
2901
2901
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between border-b border-border px-4 py-2.5", children: [
2902
2902
  /* @__PURE__ */ n("div", { children: [
2903
2903
  /* @__PURE__ */ e("p", { className: "text-[14px] font-semibold text-foreground", children: z }),
@@ -2916,7 +2916,7 @@ function _f({
2916
2916
  ] }),
2917
2917
  /* @__PURE__ */ n("div", { className: "border-b border-border px-4 py-2.5", children: [
2918
2918
  /* @__PURE__ */ n("div", { className: "flex h-7 items-center gap-1.5 rounded-control border border-input bg-background px-2 focus-within:border-ring", children: [
2919
- /* @__PURE__ */ e(Zr, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
2919
+ /* @__PURE__ */ e(Xr, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
2920
2920
  /* @__PURE__ */ e(
2921
2921
  "input",
2922
2922
  {
@@ -2990,7 +2990,7 @@ function _f({
2990
2990
  ] }) })
2991
2991
  ] }),
2992
2992
  /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto py-1", children: [
2993
- q && /* @__PURE__ */ e(
2993
+ j && /* @__PURE__ */ e(
2994
2994
  Tf,
2995
2995
  {
2996
2996
  domainAccess: c,
@@ -3000,7 +3000,7 @@ function _f({
3000
3000
  onSelectionChange: (oe) => E(oe, "semanticDomain")
3001
3001
  }
3002
3002
  ),
3003
- j && /* @__PURE__ */ e(
3003
+ q && /* @__PURE__ */ e(
3004
3004
  Ff,
3005
3005
  {
3006
3006
  search: h,
@@ -3034,10 +3034,10 @@ function _f({
3034
3034
  {
3035
3035
  type: "button",
3036
3036
  onClick: k,
3037
- disabled: Z,
3037
+ disabled: X,
3038
3038
  className: G(
3039
3039
  "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-2.5 text-[12px] font-medium text-primary-foreground transition-colors hover:bg-primary/90",
3040
- Z && "cursor-not-allowed opacity-50 hover:bg-primary"
3040
+ X && "cursor-not-allowed opacity-50 hover:bg-primary"
3041
3041
  ),
3042
3042
  children: [
3043
3043
  /* @__PURE__ */ e("span", { children: ie }),
@@ -3108,14 +3108,14 @@ function Vf() {
3108
3108
  dataSourceEntities: g
3109
3109
  }),
3110
3110
  [M, T, g]
3111
- ), L = v === 0 ? "Choose dataset" : v === 1 ? Bf(g[0], p) : `${v} datasets`, A = Xr(l), I = ((B = A == null ? void 0 : A.joins) == null ? void 0 : B.length) ?? 0, F = Rl(
3111
+ ), L = v === 0 ? "Choose dataset" : v === 1 ? Bf(g[0], p) : `${v} datasets`, A = Zr(l), I = ((B = A == null ? void 0 : A.joins) == null ? void 0 : B.length) ?? 0, F = Rl(
3112
3112
  A,
3113
3113
  g
3114
3114
  ), y = F.length > 0, N = !i && (v > 1 || I > 0), C = !!(f != null && f.autoResolved);
3115
3115
  ((Y = (D = f == null ? void 0 : f.resolvedJoinPlan) == null ? void 0 : D.joins) == null ? void 0 : Y.length) ?? ((O = f == null ? void 0 : f.relationshipsUsed) == null || O.length);
3116
3116
  const E = I > 0 ? `${I} join${I === 1 ? "" : "s"}` : v < 2 ? null : C ? "auto" : null, k = (P) => {
3117
3117
  const $ = g.filter(
3118
- (q) => !Ge(q, P)
3118
+ (j) => !Ge(j, P)
3119
3119
  );
3120
3120
  l && Rl(A, $).length > 0 && h(l.id, Fa(l, void 0)), u({
3121
3121
  ...b,
@@ -3180,7 +3180,7 @@ function Vf() {
3180
3180
  /* @__PURE__ */ e("span", { className: "font-mono text-[10px] tabular-nums text-muted-foreground/70", children: v })
3181
3181
  ] }),
3182
3182
  v === 0 ? /* @__PURE__ */ e("div", { className: "px-3 pb-2 text-[12px] text-muted-foreground", children: "No datasets selected." }) : /* @__PURE__ */ e("ul", { className: "mb-1", children: g.map((P, $) => {
3183
- const q = S[$], H = (q ? dh(q.state) : !1) ? uh(q == null ? void 0 : q.state).tag : null;
3183
+ const j = S[$], H = (j ? dh(j.state) : !1) ? uh(j == null ? void 0 : j.state).tag : null;
3184
3184
  return /* @__PURE__ */ n(
3185
3185
  "li",
3186
3186
  {
@@ -3195,11 +3195,11 @@ function Vf() {
3195
3195
  ),
3196
3196
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
3197
3197
  /* @__PURE__ */ e("p", { className: "truncate text-[13px] text-foreground", children: cs(P) }),
3198
- /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: qf(P, p) }),
3199
- H && q && /* @__PURE__ */ e(
3198
+ /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: jf(P, p) }),
3199
+ H && j && /* @__PURE__ */ e(
3200
3200
  "p",
3201
3201
  {
3202
- title: [q.reason, q.action].filter(Boolean).join(" "),
3202
+ title: [j.reason, j.action].filter(Boolean).join(" "),
3203
3203
  className: "text-[10px] font-medium leading-[1.4] text-destructive",
3204
3204
  children: H
3205
3205
  }
@@ -3336,7 +3336,7 @@ function $f(t, a) {
3336
3336
  const r = cs(t), s = _n(t, a);
3337
3337
  return s ? `${r} from ${s}` : r;
3338
3338
  }
3339
- function qf(t, a) {
3339
+ function jf(t, a) {
3340
3340
  const r = _n(t, a);
3341
3341
  if (r) return r;
3342
3342
  const s = [];
@@ -3397,7 +3397,7 @@ const Dr = ({
3397
3397
  ...r,
3398
3398
  children: t && /* @__PURE__ */ e("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ e(Mn, { className: "h-2.5 w-2.5" }) })
3399
3399
  }
3400
- ), jf = 3, Mr = "Self-heal", rr = {
3400
+ ), qf = 3, Mr = "Self-heal", rr = {
3401
3401
  grounding: "Analyzing context",
3402
3402
  drafting: "Drafting SQL",
3403
3403
  validating: "Validating SQL",
@@ -3428,7 +3428,7 @@ const Va = {
3428
3428
  errorMessage: ""
3429
3429
  };
3430
3430
  function Uf(t, a) {
3431
- return t === Mr && a > 0 ? `${Mr} ${a}/${jf}` : t;
3431
+ return t === Mr && a > 0 ? `${Mr} ${a}/${qf}` : t;
3432
3432
  }
3433
3433
  async function Gf(t, a) {
3434
3434
  try {
@@ -3470,7 +3470,7 @@ function Jf({
3470
3470
  autoFocus: d,
3471
3471
  onDismiss: c
3472
3472
  }) {
3473
- var ft, Xe;
3473
+ var ft, Ze;
3474
3474
  const { authToken: l, tokenProps: i } = Yt(), h = R((ce) => ce.card.id), u = R(
3475
3475
  (ce) => {
3476
3476
  var ke;
@@ -3626,11 +3626,11 @@ function Jf({
3626
3626
  );
3627
3627
  }
3628
3628
  const Y = T.status === "done" ? T.sql : "", O = T.prompt, P = T.mode, $ = T.baselineSql;
3629
- function q(ce) {
3629
+ function j(ce) {
3630
3630
  const ke = Y.trim();
3631
3631
  ke && (o(ke, ce), ce || M(!1));
3632
3632
  }
3633
- const j = Y.length > 0, H = ((Xe = T.validation) == null ? void 0 : Xe.status) === "invalid", Z = j && O.length > 0 && O === f.trim(), ie = B.length > 0, z = f.trim().length > 0, W = !!c && !z && !j && !k, ae = Z && P === "draft", ue = Z && P === "refine" && $ === B, oe = p === "refine" && !ie ? "draft" : p, fe = (oe === "refine" ? ue : ae) ? "Open composer preview" : "Generate composer SQL", be = f.trim().length > 0 || O.trim().length > 0 || j || T.status !== "idle" || T.timelineSteps.length > 0;
3633
+ const q = Y.length > 0, H = ((Ze = T.validation) == null ? void 0 : Ze.status) === "invalid", X = q && O.length > 0 && O === f.trim(), ie = B.length > 0, z = f.trim().length > 0, W = !!c && !z && !q && !k, ae = X && P === "draft", ue = X && P === "refine" && $ === B, oe = p === "refine" && !ie ? "draft" : p, fe = (oe === "refine" ? ue : ae) ? "Open composer preview" : "Generate composer SQL", be = f.trim().length > 0 || O.trim().length > 0 || q || T.status !== "idle" || T.timelineSteps.length > 0;
3634
3634
  function Ae(ce = "draft") {
3635
3635
  if (k)
3636
3636
  return;
@@ -3654,7 +3654,7 @@ function Jf({
3654
3654
  }
3655
3655
  const _e = T.timelineSteps.findIndex(
3656
3656
  (ce) => ce === T.activeStep
3657
- ), Qe = T.activeStep === rr.repairing ? "Fixing validation issue" : T.activeStep || rr.drafting, Ve = !j || !T.validation ? null : T.validation.status === "valid" ? {
3657
+ ), Qe = T.activeStep === rr.repairing ? "Fixing validation issue" : T.activeStep || rr.drafting, Ve = !q || !T.validation ? null : T.validation.status === "valid" ? {
3658
3658
  label: "Validation passed",
3659
3659
  className: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700",
3660
3660
  detail: "SQL validation passed."
@@ -3693,7 +3693,7 @@ function Jf({
3693
3693
  }
3694
3694
  ),
3695
3695
  /* @__PURE__ */ n(bt, { open: v, onOpenChange: ye, children: [
3696
- /* @__PURE__ */ e(Xm, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0" }) }),
3696
+ /* @__PURE__ */ e(Zm, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0" }) }),
3697
3697
  /* @__PURE__ */ n("div", { className: "absolute right-1 flex items-center gap-1", children: [
3698
3698
  (z || c) && /* @__PURE__ */ e(
3699
3699
  te,
@@ -3870,7 +3870,7 @@ function Jf({
3870
3870
  }
3871
3871
  ) })
3872
3872
  ] }),
3873
- j ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3873
+ q ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3874
3874
  P === "refine" && /* @__PURE__ */ e("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Refined SQL" }),
3875
3875
  /* @__PURE__ */ e("div", { className: "max-h-[200px] overflow-auto rounded-[5px] border border-border/60", children: /* @__PURE__ */ e(
3876
3876
  oa,
@@ -3894,8 +3894,8 @@ function Jf({
3894
3894
  {
3895
3895
  variant: "secondary",
3896
3896
  size: "xs",
3897
- disabled: k || !j,
3898
- onClick: () => q(!1),
3897
+ disabled: k || !q,
3898
+ onClick: () => j(!1),
3899
3899
  children: "Replace SQL"
3900
3900
  }
3901
3901
  ),
@@ -3903,8 +3903,8 @@ function Jf({
3903
3903
  te,
3904
3904
  {
3905
3905
  size: "xs",
3906
- disabled: k || !j || H,
3907
- onClick: () => q(!0),
3906
+ disabled: k || !q || H,
3907
+ onClick: () => j(!0),
3908
3908
  children: "Replace & Run"
3909
3909
  }
3910
3910
  )
@@ -3940,7 +3940,7 @@ function Qf({
3940
3940
  children: [
3941
3941
  /* @__PURE__ */ n(la, { className: "h-11 flex-row items-center justify-between space-y-0 border-b border-border/60 px-4 py-0 text-left", children: [
3942
3942
  /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-4 self-stretch", children: [
3943
- /* @__PURE__ */ e(qt, { className: "shrink-0 text-sm", children: "Query editor" }),
3943
+ /* @__PURE__ */ e(jt, { className: "shrink-0 text-sm", children: "Query editor" }),
3944
3944
  /* @__PURE__ */ n(
3945
3945
  Ht,
3946
3946
  {
@@ -4082,7 +4082,7 @@ function Li({
4082
4082
  }
4083
4083
  };
4084
4084
  }
4085
- function Zf({ value: t }) {
4085
+ function Xf({ value: t }) {
4086
4086
  const [a, r] = U(!1), s = Pe(null);
4087
4087
  we(() => () => {
4088
4088
  s.current && clearTimeout(s.current);
@@ -4126,7 +4126,7 @@ function Zf({ value: t }) {
4126
4126
  }
4127
4127
  );
4128
4128
  }
4129
- function Xf({
4129
+ function Zf({
4130
4130
  hint: t
4131
4131
  }) {
4132
4132
  const { popoverProps: a, triggerProps: r, contentProps: s } = Li();
@@ -4159,7 +4159,7 @@ function Xf({
4159
4159
  /* @__PURE__ */ e("p", { className: "text-[13px] font-medium", children: "Dashboard filters aren’t applied" }),
4160
4160
  /* @__PURE__ */ e("p", { className: "text-[12px] leading-relaxed text-muted-foreground", children: t.description })
4161
4161
  ] }),
4162
- /* @__PURE__ */ e(Zf, { value: t.helper }),
4162
+ /* @__PURE__ */ e(Xf, { value: t.helper }),
4163
4163
  /* @__PURE__ */ e(
4164
4164
  "a",
4165
4165
  {
@@ -4378,7 +4378,7 @@ function sg() {
4378
4378
  }
4379
4379
  return M;
4380
4380
  }
4381
- const ql = "[&_.code-editor-pre]:!pb-14 [&_.code-editor-textarea]:!pb-14";
4381
+ const jl = "[&_.code-editor-pre]:!pb-14 [&_.code-editor-textarea]:!pb-14";
4382
4382
  function lg() {
4383
4383
  var at, yt, Me, We;
4384
4384
  const t = _r(), { tokenProps: a } = Yt(), r = ((yt = (at = a.config) == null ? void 0 : at.projectFeatures) == null ? void 0 : yt.features.aiWritingHelpers) !== !1, [s, o] = U("sql"), [d, c] = U(!1), [l, i] = U(!1), h = sg(), [u, f] = U(!1), [m, p] = U(null), x = R((Q) => Q.frame), b = R((Q) => Q.card), {
@@ -4441,11 +4441,11 @@ function lg() {
4441
4441
  ) ?? b.type, [N, k, w, b, E == null ? void 0 : E.slots]), D = ee(() => B !== b.type ? { ...b, type: B } : b, [b, B]), Y = ee(() => F === 0 ? null : lp(b == null ? void 0 : b.sql), [b == null ? void 0 : b.sql, F]), O = Pe(!0), {
4442
4442
  setCardCustomCfg: P,
4443
4443
  setQueryResultColumns: $,
4444
- setCardSql: q,
4445
- setTempQueryData: j,
4444
+ setCardSql: j,
4445
+ setTempQueryData: q,
4446
4446
  // setQueryError,
4447
4447
  setCardPreferences: H,
4448
- setCardType: Z,
4448
+ setCardType: X,
4449
4449
  setCardPython: ie,
4450
4450
  setCard: z,
4451
4451
  updateCardInFrame: W
@@ -4501,8 +4501,8 @@ function lg() {
4501
4501
  }
4502
4502
  ft.current();
4503
4503
  }, [y]);
4504
- function Xe(Q, Se) {
4505
- q(Q), Se && ue(!0);
4504
+ function Ze(Q, Se) {
4505
+ j(Q), Se && ue(!0);
4506
4506
  }
4507
4507
  function ce() {
4508
4508
  uo({
@@ -4536,7 +4536,7 @@ function lg() {
4536
4536
  /* @__PURE__ */ n("div", { className: "flex shrink-0 flex-col gap-1.5 px-4 pb-1 pt-3", children: [
4537
4537
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4538
4538
  /* @__PURE__ */ e("div", { className: G("min-w-0", u && "flex-1"), children: /* @__PURE__ */ e(
4539
- qa,
4539
+ ja,
4540
4540
  {
4541
4541
  value: b.title,
4542
4542
  onSave: (Q) => z({ ...b, title: Q }),
@@ -4550,7 +4550,7 @@ function lg() {
4550
4550
  /* @__PURE__ */ e(Co, { card: b })
4551
4551
  ] }),
4552
4552
  /* @__PURE__ */ e(
4553
- qa,
4553
+ ja,
4554
4554
  {
4555
4555
  value: (b.description || "").trim(),
4556
4556
  onSave: (Q) => z({ ...b, description: Q.trim() }),
@@ -4575,7 +4575,7 @@ function lg() {
4575
4575
  onExpand: () => ke(s),
4576
4576
  trailing: /* @__PURE__ */ n(pe, { children: [
4577
4577
  Y ? /* @__PURE__ */ e(
4578
- Xf,
4578
+ Zf,
4579
4579
  {
4580
4580
  hint: Y
4581
4581
  }
@@ -4600,7 +4600,7 @@ function lg() {
4600
4600
  bl,
4601
4601
  {
4602
4602
  ref: g,
4603
- className: ql
4603
+ className: jl
4604
4604
  },
4605
4605
  `inline-sql-${b.id}`
4606
4606
  ) : null
@@ -4623,7 +4623,7 @@ function lg() {
4623
4623
  vl,
4624
4624
  {
4625
4625
  ref: v,
4626
- className: ql
4626
+ className: jl
4627
4627
  },
4628
4628
  `inline-python-${b.id}`
4629
4629
  ) : null
@@ -4644,7 +4644,7 @@ function lg() {
4644
4644
  selectedDatabaseName: L,
4645
4645
  selectedSchemaName: A,
4646
4646
  selectedTableName: I,
4647
- onApplySql: Xe,
4647
+ onApplySql: Ze,
4648
4648
  autoFocus: !0,
4649
4649
  onDismiss: () => c(!1)
4650
4650
  }
@@ -4774,7 +4774,7 @@ function ds() {
4774
4774
  [t, a, r]
4775
4775
  );
4776
4776
  }
4777
- const jl = [
4777
+ const ql = [
4778
4778
  { value: "table", label: "Table" },
4779
4779
  { value: "aggregateTable", label: "Hierarchical" },
4780
4780
  { value: "pivotTable", label: "Pivot" },
@@ -4784,9 +4784,9 @@ const jl = [
4784
4784
  "pivotTable"
4785
4785
  ];
4786
4786
  function cg({ className: t }) {
4787
- const a = R((p) => p.card), r = R((p) => p.frame), s = R((p) => p.editorContext), o = ot(), { setCard: d, updateCardInFrame: c } = Ne(), l = (s == null ? void 0 : s.type) === "documentSection" && !!s.lockedKind, i = ((s == null ? void 0 : s.type) === "documentSection" ? jl.filter(
4787
+ const a = R((p) => p.card), r = R((p) => p.frame), s = R((p) => p.editorContext), o = ot(), { setCard: d, updateCardInFrame: c } = Ne(), l = (s == null ? void 0 : s.type) === "documentSection" && !!s.lockedKind, i = ((s == null ? void 0 : s.type) === "documentSection" ? ql.filter(
4788
4788
  (p) => ["table", "pivotTable"].includes(p.value)
4789
- ) : jl).filter(
4789
+ ) : ql).filter(
4790
4790
  (p) => !ig.includes(p.value) || p.value === o
4791
4791
  ), h = [
4792
4792
  "table",
@@ -4924,7 +4924,7 @@ function Bi({
4924
4924
  className: G(Sn, t && "bg-accent"),
4925
4925
  "aria-pressed": t,
4926
4926
  children: [
4927
- /* @__PURE__ */ e(Za, {}),
4927
+ /* @__PURE__ */ e(Xa, {}),
4928
4928
  "Inspect payload"
4929
4929
  ]
4930
4930
  }
@@ -5038,7 +5038,7 @@ function pg(t) {
5038
5038
  const r = (s = t.currentTarget.ownerDocument.defaultView) == null ? void 0 : s.getSelection();
5039
5039
  return !!(r && !r.isCollapsed);
5040
5040
  }
5041
- function qi({
5041
+ function ji({
5042
5042
  text: t,
5043
5043
  children: a,
5044
5044
  className: r,
@@ -5114,7 +5114,7 @@ function qi({
5114
5114
  ) });
5115
5115
  }
5116
5116
  const fg = "This visual couldn't load its data.";
5117
- function ji({
5117
+ function qi({
5118
5118
  title: t = fg,
5119
5119
  hint: a,
5120
5120
  detail: r,
@@ -5123,7 +5123,7 @@ function ji({
5123
5123
  actions: d,
5124
5124
  className: c
5125
5125
  }) {
5126
- const l = ja(), [i, h] = U(s);
5126
+ const l = qa(), [i, h] = U(s);
5127
5127
  return /* @__PURE__ */ n(
5128
5128
  "div",
5129
5129
  {
@@ -5155,7 +5155,7 @@ function ji({
5155
5155
  children: [
5156
5156
  /* @__PURE__ */ e("summary", { className: "w-fit cursor-pointer list-none underline underline-offset-2 hover:text-foreground [&::-webkit-details-marker]:hidden", children: "Details" }),
5157
5157
  i ? /* @__PURE__ */ e(
5158
- qi,
5158
+ ji,
5159
5159
  {
5160
5160
  text: r,
5161
5161
  "aria-label": "Copy error message",
@@ -5204,7 +5204,7 @@ function Ki({
5204
5204
  {
5205
5205
  className: G("min-h-[80px] overflow-auto px-1 py-1", h),
5206
5206
  children: /* @__PURE__ */ e(
5207
- qi,
5207
+ ji,
5208
5208
  {
5209
5209
  as: "div",
5210
5210
  text: t,
@@ -5276,7 +5276,7 @@ function zi({
5276
5276
  ) : null;
5277
5277
  return /* @__PURE__ */ n(Yi, { className: G("w-full", f), children: [
5278
5278
  /* @__PURE__ */ e(
5279
- ji,
5279
+ qi,
5280
5280
  {
5281
5281
  title: r,
5282
5282
  hint: s,
@@ -5477,7 +5477,7 @@ function ms({
5477
5477
  className: "max-h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-[520px] gap-0 overflow-y-auto overscroll-contain rounded-card border-border/60 p-0 sm:rounded-card [&>button]:right-3 [&>button]:top-3",
5478
5478
  children: [
5479
5479
  /* @__PURE__ */ n(la, { className: "flex h-10 flex-row items-center space-y-0 border-b border-border px-3 pr-10 text-left", children: [
5480
- /* @__PURE__ */ e(qt, { className: "truncate text-[13px] font-medium", children: b }),
5480
+ /* @__PURE__ */ e(jt, { className: "truncate text-[13px] font-medium", children: b }),
5481
5481
  f && /* @__PURE__ */ e(Ut, { className: "sr-only", children: g })
5482
5482
  ] }),
5483
5483
  !f && /* @__PURE__ */ n(pe, { children: [
@@ -5747,8 +5747,8 @@ function Hi({
5747
5747
  feedbackDialogOpen: O,
5748
5748
  setFeedbackDialogOpen: P,
5749
5749
  handleSendFeedback: $,
5750
- feedbackPayload: q
5751
- } = Gi(V, w || s.sql || s.python), j = ee(() => (C == null ? void 0 : C.records) || [], [C == null ? void 0 : C.records]), { setCard: H, updateCardInFrame: Z } = Ne(), { data: ie } = qr(F), z = F.id, W = F.config, ae = F.interactionConfig, ue = F.controls, oe = F.controlBindings, ge = F.customCfg, fe = F.preferences, be = F.queryConfig, Ae = Cg({
5750
+ feedbackPayload: j
5751
+ } = Gi(V, w || s.sql || s.python), q = ee(() => (C == null ? void 0 : C.records) || [], [C == null ? void 0 : C.records]), { setCard: H, updateCardInFrame: X } = Ne(), { data: ie } = jr(F), z = F.id, W = F.config, ae = F.interactionConfig, ue = F.controls, oe = F.controlBindings, ge = F.customCfg, fe = F.preferences, be = F.queryConfig, Ae = Cg({
5752
5752
  sql: F.sql,
5753
5753
  python: F.python
5754
5754
  }), me = Ae.sql, Le = Ae.python, Ye = C == null ? void 0 : C.records, ye = ee(
@@ -5796,7 +5796,7 @@ function Hi({
5796
5796
  pageSize: Se
5797
5797
  }
5798
5798
  };
5799
- H(ve), Z(ve), s.sql && ((At = (Ie = s.preferences) == null ? void 0 : Ie.tablePrefs) != null && At.enableDevModePagination) && m(!0);
5799
+ H(ve), X(ve), s.sql && ((At = (Ie = s.preferences) == null ? void 0 : Ie.tablePrefs) != null && At.enableDevModePagination) && m(!0);
5800
5800
  }, ft = (Q) => {
5801
5801
  var Ie, At, Jt, Qt, Wt;
5802
5802
  const Se = Fo(
@@ -5811,8 +5811,8 @@ function Hi({
5811
5811
  sortByColumns: Se
5812
5812
  }
5813
5813
  };
5814
- H(ve), Z(ve), s.sql && ((Wt = (Qt = s.preferences) == null ? void 0 : Qt.tablePrefs) != null && Wt.enableDevModePagination) && m(!0);
5815
- }, Xe = ko(
5814
+ H(ve), X(ve), s.sql && ((Wt = (Qt = s.preferences) == null ? void 0 : Qt.tablePrefs) != null && Wt.enableDevModePagination) && m(!0);
5815
+ }, Ze = ko(
5816
5816
  ye,
5817
5817
  Ye || void 0
5818
5818
  ), ce = ee(() => {
@@ -5827,7 +5827,7 @@ function Hi({
5827
5827
  preferences: fe,
5828
5828
  topoJson: ie,
5829
5829
  comparisonMetadata: (Q = C == null ? void 0 : C.metadata) == null ? void 0 : Q.comparisonMetadata,
5830
- numericPresentation: Xe,
5830
+ numericPresentation: Ze,
5831
5831
  resultColumns: C == null ? void 0 : C.columns,
5832
5832
  columnKeyMap: C == null ? void 0 : C.columnKeyMap
5833
5833
  });
@@ -5844,7 +5844,7 @@ function Hi({
5844
5844
  C == null ? void 0 : C.columnKeyMap,
5845
5845
  (We = C == null ? void 0 : C.metadata) == null ? void 0 : We.comparisonMetadata,
5846
5846
  I,
5847
- Xe,
5847
+ Ze,
5848
5848
  ie
5849
5849
  ]);
5850
5850
  function ke(Q) {
@@ -5888,10 +5888,10 @@ function Hi({
5888
5888
  ) });
5889
5889
  if (I === "table" || I === "detailTable")
5890
5890
  return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
5891
- jr,
5891
+ qr,
5892
5892
  {
5893
5893
  card: F,
5894
- data: j,
5894
+ data: q,
5895
5895
  resultColumns: C == null ? void 0 : C.columns,
5896
5896
  columnKeyMap: C == null ? void 0 : C.columnKeyMap,
5897
5897
  totalsByColumnId: C == null ? void 0 : C.tableTotalsByColumnId,
@@ -5914,14 +5914,14 @@ function Hi({
5914
5914
  Se,
5915
5915
  s.config
5916
5916
  ), Ie = { ...s, config: ve };
5917
- H(Ie), Z(Ie);
5917
+ H(Ie), X(Ie);
5918
5918
  },
5919
5919
  onAggregationLabelChange: (Se) => {
5920
5920
  const ve = _d(
5921
5921
  Se,
5922
5922
  s.config
5923
5923
  ), Ie = { ...s, config: ve };
5924
- H(Ie), Z(Ie);
5924
+ H(Ie), X(Ie);
5925
5925
  }
5926
5926
  }
5927
5927
  ) });
@@ -5942,7 +5942,7 @@ function Hi({
5942
5942
  Se,
5943
5943
  s.config
5944
5944
  ), Ie = { ...s, config: ve };
5945
- H(Ie), Z(Ie);
5945
+ H(Ie), X(Ie);
5946
5946
  },
5947
5947
  isLoading: E || k
5948
5948
  }
@@ -5974,7 +5974,7 @@ function Hi({
5974
5974
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1 space-y-1", children: [
5975
5975
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
5976
5976
  /* @__PURE__ */ e(Fd, { className: "min-w-0 text-[17px] font-semibold leading-tight tracking-[-0.005em]", children: /* @__PURE__ */ e(
5977
- qa,
5977
+ ja,
5978
5978
  {
5979
5979
  value: s.title,
5980
5980
  onSave: (Q) => H({ ...s, title: Q }),
@@ -5989,7 +5989,7 @@ function Hi({
5989
5989
  /* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(cg, {}) })
5990
5990
  ] }),
5991
5991
  /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(
5992
- qa,
5992
+ ja,
5993
5993
  {
5994
5994
  value: (s.description || "").trim(),
5995
5995
  onSave: (Q) => H({ ...s, description: Q.trim() }),
@@ -6002,7 +6002,7 @@ function Hi({
6002
6002
  ] }),
6003
6003
  u && /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
6004
6004
  /* @__PURE__ */ e(_, { className: "my-1", children: /* @__PURE__ */ e(
6005
- qa,
6005
+ ja,
6006
6006
  {
6007
6007
  value: u.title || u.column,
6008
6008
  onSave: (Q) => b(
@@ -6063,7 +6063,7 @@ function Hi({
6063
6063
  {
6064
6064
  open: O,
6065
6065
  onOpenChange: P,
6066
- feedbackData: q,
6066
+ feedbackData: j,
6067
6067
  showDebugInfo: !0
6068
6068
  }
6069
6069
  )
@@ -6109,7 +6109,7 @@ const sr = ({
6109
6109
  embedded: !0
6110
6110
  }
6111
6111
  ), wg = () => /* @__PURE__ */ n(la, { children: [
6112
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(qt, { children: "Customize Card" }) }),
6112
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(jt, { children: "Customize Card" }) }),
6113
6113
  /* @__PURE__ */ n(Ut, { children: [
6114
6114
  "See the configuration options and documentation",
6115
6115
  /* @__PURE__ */ e(
@@ -6199,7 +6199,7 @@ function Tg({
6199
6199
  className: a,
6200
6200
  label: r = "Customize Visual"
6201
6201
  } = {}) {
6202
- const [s, o] = U(!1), [d, c] = U(""), [l, i] = U(""), [h, u] = U(""), [f, m] = U(""), p = R((N) => N.card), x = ot(), b = R((N) => N.card.customCfg), g = b ? JSON.stringify(b, null, 2) : "", v = ee(() => x !== p.type ? { ...p, type: x } : p, [p, x]), { data: M } = xt(v), { data: T } = qr(p), S = ko(p, M == null ? void 0 : M.records), { setCardCustomCfg: L, setCustomVisualCode: A } = Ne(), I = () => {
6202
+ const [s, o] = U(!1), [d, c] = U(""), [l, i] = U(""), [h, u] = U(""), [f, m] = U(""), p = R((N) => N.card), x = ot(), b = R((N) => N.card.customCfg), g = b ? JSON.stringify(b, null, 2) : "", v = ee(() => x !== p.type ? { ...p, type: x } : p, [p, x]), { data: M } = xt(v), { data: T } = jr(p), S = ko(p, M == null ? void 0 : M.records), { setCardCustomCfg: L, setCustomVisualCode: A } = Ne(), I = () => {
6203
6203
  var C, E, k;
6204
6204
  if (!((C = M == null ? void 0 : M.records) != null && C.length)) return;
6205
6205
  const N = To({
@@ -6311,7 +6311,7 @@ function Ji({
6311
6311
  }) {
6312
6312
  if (!r && t)
6313
6313
  return Eo(t, s);
6314
- const o = qd(a);
6314
+ const o = jd(a);
6315
6315
  if (o)
6316
6316
  return gn.cloneElement(o, { className: s });
6317
6317
  const d = Mg(a), c = Dg(a);
@@ -6423,7 +6423,7 @@ function Ig({
6423
6423
  onClose: r
6424
6424
  }) {
6425
6425
  var B;
6426
- const [s, o] = U(""), [d, c] = U(0), l = Pe(null), { data: i = [], isLoading: h } = jd(), u = ds(), { setCardPreferences: f } = R((D) => D.actions), m = R((D) => D.card), p = R((D) => D.isDevMode), x = t ?? m.type, b = x === "custom" ? (B = m.customCardPreferences) == null ? void 0 : B.componentName : void 0, {
6426
+ const [s, o] = U(""), [d, c] = U(0), l = Pe(null), { data: i = [], isLoading: h } = qd(), u = ds(), { setCardPreferences: f } = R((D) => D.actions), m = R((D) => D.card), p = R((D) => D.isDevMode), x = t ?? m.type, b = x === "custom" ? (B = m.customCardPreferences) == null ? void 0 : B.componentName : void 0, {
6427
6427
  setCardCustomCfg: g,
6428
6428
  setQueryConfig: v,
6429
6429
  replaceFrameCards: M,
@@ -6514,7 +6514,7 @@ function Ig({
6514
6514
  let w = 0;
6515
6515
  return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
6516
6516
  /* @__PURE__ */ n("div", { className: "flex h-9 items-center gap-2 border-b border-border px-3", children: [
6517
- /* @__PURE__ */ e(Zr, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
6517
+ /* @__PURE__ */ e(Xr, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
6518
6518
  /* @__PURE__ */ e(
6519
6519
  "input",
6520
6520
  {
@@ -6590,8 +6590,8 @@ const or = {
6590
6590
  stackedLine: tu,
6591
6591
  scatter: Ao,
6592
6592
  bubble: eu,
6593
- pie: Xd,
6594
- doughnut: Zd,
6593
+ pie: Zd,
6594
+ doughnut: Xd,
6595
6595
  kpi: Wd,
6596
6596
  treemap: Oo,
6597
6597
  bullet: Io,
@@ -6887,7 +6887,7 @@ function ps({
6887
6887
  variant: "ghost",
6888
6888
  className: "h-auto w-full justify-start gap-2 rounded-sm px-2 py-1.5 text-[13px] font-normal",
6889
6889
  children: [
6890
- /* @__PURE__ */ e(Za, { className: "h-3.5 w-3.5 text-muted-foreground" }),
6890
+ /* @__PURE__ */ e(Xa, { className: "h-3.5 w-3.5 text-muted-foreground" }),
6891
6891
  /* @__PURE__ */ e("span", { children: r })
6892
6892
  ]
6893
6893
  }
@@ -7337,26 +7337,26 @@ function $g({
7337
7337
  ] }) : null,
7338
7338
  r.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "This card is not using any controls yet." }) : r.map((y, N) => {
7339
7339
  const C = v[y.target] || [], E = m.find(
7340
- (j) => j.id === y.controlId
7341
- ), k = E ? vh(E) : null, V = (k == null ? void 0 : k.source.kind) === "manual" ? k.source.options : [], w = L(y.target), B = f(y.target), D = y.matrixTargetId !== void 0 && !B.some((j) => j.id === y.matrixTargetId), Y = Array.from(
7340
+ (q) => q.id === y.controlId
7341
+ ), k = E ? vh(E) : null, V = (k == null ? void 0 : k.source.kind) === "manual" ? k.source.options : [], w = L(y.target), B = f(y.target), D = y.matrixTargetId !== void 0 && !B.some((q) => q.id === y.matrixTargetId), Y = Array.from(
7342
7342
  /* @__PURE__ */ new Set([
7343
- ...V.map((j) => j.value),
7343
+ ...V.map((q) => q.value),
7344
7344
  ...Object.keys(y.mapping)
7345
7345
  ])
7346
- ).map((j) => {
7347
- const H = V.find((Z) => Z.value === j);
7346
+ ).map((q) => {
7347
+ const H = V.find((X) => X.value === q);
7348
7348
  return {
7349
- value: j,
7350
- label: (H == null ? void 0 : H.label) || j
7349
+ value: q,
7350
+ label: (H == null ? void 0 : H.label) || q
7351
7351
  };
7352
- }), O = `${y.controlId}-${y.target}-${N}`, P = p[O] ?? N === 0, $ = Object.keys(y.mapping).length, q = E != null && E.type ? Yg[E.type] || E.type : null;
7352
+ }), O = `${y.controlId}-${y.target}-${N}`, P = p[O] ?? N === 0, $ = Object.keys(y.mapping).length, j = E != null && E.type ? Yg[E.type] || E.type : null;
7353
7353
  return /* @__PURE__ */ n(
7354
7354
  ca,
7355
7355
  {
7356
7356
  open: P,
7357
- onOpenChange: (j) => x((H) => ({
7357
+ onOpenChange: (q) => x((H) => ({
7358
7358
  ...H,
7359
- [O]: j
7359
+ [O]: q
7360
7360
  })),
7361
7361
  className: "rounded-md border",
7362
7362
  children: [
@@ -7371,12 +7371,12 @@ function $g({
7371
7371
  /* @__PURE__ */ n("div", { className: "min-w-0", children: [
7372
7372
  /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-2", children: [
7373
7373
  /* @__PURE__ */ e("div", { className: "truncate text-sm font-medium", children: (E == null ? void 0 : E.label) || "Control" }),
7374
- q ? /* @__PURE__ */ e(
7374
+ j ? /* @__PURE__ */ e(
7375
7375
  Ct,
7376
7376
  {
7377
7377
  variant: "secondary",
7378
7378
  className: "shrink-0 text-[11px] font-normal text-muted-foreground",
7379
- children: q
7379
+ children: j
7380
7380
  }
7381
7381
  ) : null
7382
7382
  ] }),
@@ -7404,16 +7404,16 @@ function $g({
7404
7404
  ne,
7405
7405
  {
7406
7406
  value: y.matrixTargetId ?? "__none__",
7407
- onValueChange: (j) => A(N, (H) => {
7408
- const { matrixTargetId: Z, ...ie } = H;
7409
- return j === "__none__" ? ie : { ...ie, matrixTargetId: j };
7407
+ onValueChange: (q) => A(N, (H) => {
7408
+ const { matrixTargetId: X, ...ie } = H;
7409
+ return q === "__none__" ? ie : { ...ie, matrixTargetId: q };
7410
7410
  }),
7411
7411
  children: [
7412
7412
  /* @__PURE__ */ e(re, { id: `matrix-target-${O}`, "aria-label": "Matrix target", children: /* @__PURE__ */ e(se, { placeholder: "Choose target" }) }),
7413
7413
  /* @__PURE__ */ n(le, { children: [
7414
7414
  /* @__PURE__ */ e(K, { value: "__none__", children: B.length === 1 ? `Automatic: ${B[0].label}` : "Choose target" }),
7415
7415
  D ? /* @__PURE__ */ e(K, { value: y.matrixTargetId, disabled: !0, children: "Missing target" }) : null,
7416
- B.map((j) => /* @__PURE__ */ e(K, { value: j.id, children: j.label }, j.id))
7416
+ B.map((q) => /* @__PURE__ */ e(K, { value: q.id, children: q.label }, q.id))
7417
7417
  ] })
7418
7418
  ]
7419
7419
  }
@@ -7422,14 +7422,14 @@ function $g({
7422
7422
  ] }) : null,
7423
7423
  Y.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "Add choices to this control first so you can decide what each choice changes in the card." }) : w.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "No matching targets are available for this binding yet." }) : /* @__PURE__ */ n("div", { className: "space-y-2", children: [
7424
7424
  /* @__PURE__ */ e(_, { className: "text-xs", children: "Map each choice" }),
7425
- /* @__PURE__ */ e("div", { className: "space-y-2", children: Y.map((j) => {
7426
- const H = y.mapping[j.value], Z = y.target === "config_metric_selector" || y.target === "config_field_selector" ? typeof H == "string" ? H : H == null ? void 0 : H.id : typeof H == "string" ? H : void 0, ie = !l && typeof Z == "string" && !w.some((ae) => ae.value === Z), z = _g(
7425
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: Y.map((q) => {
7426
+ const H = y.mapping[q.value], X = y.target === "config_metric_selector" || y.target === "config_field_selector" ? typeof H == "string" ? H : H == null ? void 0 : H.id : typeof H == "string" ? H : void 0, ie = !l && typeof X == "string" && !w.some((ae) => ae.value === X), z = _g(
7427
7427
  H,
7428
- Z
7429
- ), W = Z && ie ? [
7428
+ X
7429
+ ), W = X && ie ? [
7430
7430
  ...w,
7431
7431
  {
7432
- value: Z,
7432
+ value: X,
7433
7433
  label: "Needs remap",
7434
7434
  target: H
7435
7435
  }
@@ -7441,24 +7441,24 @@ function $g({
7441
7441
  children: [
7442
7442
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
7443
7443
  /* @__PURE__ */ e(_, { className: "text-[11px] text-muted-foreground", children: "Viewer picks" }),
7444
- /* @__PURE__ */ e("div", { className: "rounded-md bg-muted/50 px-3 py-2 text-sm", children: j.label })
7444
+ /* @__PURE__ */ e("div", { className: "rounded-md bg-muted/50 px-3 py-2 text-sm", children: q.label })
7445
7445
  ] }),
7446
7446
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
7447
7447
  /* @__PURE__ */ e(_, { className: "text-[11px] text-muted-foreground", children: "Switch to" }),
7448
7448
  /* @__PURE__ */ n(
7449
7449
  ne,
7450
7450
  {
7451
- value: Z || "__none__",
7451
+ value: X || "__none__",
7452
7452
  onValueChange: (ae) => A(N, (ue) => {
7453
7453
  if (ue.target === "config_metric_selector") {
7454
7454
  const ge = { ...ue.mapping };
7455
7455
  if (ae === "__none__")
7456
- delete ge[j.value];
7456
+ delete ge[q.value];
7457
7457
  else {
7458
7458
  const fe = W.find(
7459
7459
  (be) => be.value === ae
7460
7460
  );
7461
- fe != null && fe.target ? ge[j.value] = fe.target : delete ge[j.value];
7461
+ fe != null && fe.target ? ge[q.value] = fe.target : delete ge[q.value];
7462
7462
  }
7463
7463
  return {
7464
7464
  ...ue,
@@ -7468,12 +7468,12 @@ function $g({
7468
7468
  if (ue.target === "config_field_selector") {
7469
7469
  const ge = { ...ue.mapping };
7470
7470
  if (ae === "__none__")
7471
- delete ge[j.value];
7471
+ delete ge[q.value];
7472
7472
  else {
7473
7473
  const fe = W.find(
7474
7474
  (be) => be.value === ae
7475
7475
  );
7476
- fe != null && fe.target ? ge[j.value] = fe.target : delete ge[j.value];
7476
+ fe != null && fe.target ? ge[q.value] = fe.target : delete ge[q.value];
7477
7477
  }
7478
7478
  return {
7479
7479
  ...ue,
@@ -7481,7 +7481,7 @@ function $g({
7481
7481
  };
7482
7482
  }
7483
7483
  const oe = { ...ue.mapping };
7484
- return ae === "__none__" ? delete oe[j.value] : oe[j.value] = ae, {
7484
+ return ae === "__none__" ? delete oe[q.value] : oe[q.value] = ae, {
7485
7485
  ...ue,
7486
7486
  mapping: oe
7487
7487
  };
@@ -7505,7 +7505,7 @@ function $g({
7505
7505
  ] })
7506
7506
  ]
7507
7507
  },
7508
- `${y.controlId}-${y.target}-${j.value}`
7508
+ `${y.controlId}-${y.target}-${q.value}`
7509
7509
  );
7510
7510
  }) }),
7511
7511
  C.length > 0 && /* @__PURE__ */ n("p", { className: "text-[11px] text-muted-foreground", children: [
@@ -7525,7 +7525,7 @@ function $g({
7525
7525
  ] }) : null
7526
7526
  ] });
7527
7527
  }
7528
- function qg(t, a, r) {
7528
+ function jg(t, a, r) {
7529
7529
  const { eligibleTargets: s } = Ci(
7530
7530
  t,
7531
7531
  a,
@@ -7547,7 +7547,7 @@ function qg(t, a, r) {
7547
7547
  };
7548
7548
  });
7549
7549
  }
7550
- function jg(t) {
7550
+ function qg(t) {
7551
7551
  return t ? t.kind === "metric" ? t.metricId : t.kind === "column" ? t.columnKey : t.measureId : "invalid target";
7552
7552
  }
7553
7553
  function Kg({
@@ -7559,7 +7559,7 @@ function Kg({
7559
7559
  onChange: d
7560
7560
  }) {
7561
7561
  const c = [...r, ...a.controls || []], l = c.filter(Tp), i = ee(
7562
- () => qg(a, s, t),
7562
+ () => jg(a, s, t),
7563
7563
  [a, s, t]
7564
7564
  ), h = ee(
7565
7565
  () => Ci(a, s, t),
@@ -7598,7 +7598,7 @@ function Kg({
7598
7598
  S.controlId,
7599
7599
  " →",
7600
7600
  " ",
7601
- jg(S.presentationTarget),
7601
+ qg(S.presentationTarget),
7602
7602
  S.presentationTarget ? ` · ${T(S.presentationTarget) ?? "unavailable"}` : null
7603
7603
  ] }),
7604
7604
  /* @__PURE__ */ e(
@@ -7661,98 +7661,98 @@ function gs({
7661
7661
  preventPassiveDismissDuringCreate: o,
7662
7662
  resolvedOpen: d,
7663
7663
  setIsCreateFlowActive: c
7664
- } = rp({}), l = R((q) => q.card), i = R((q) => q.frame), h = R(
7665
- (q) => q.queryResultColumns
7666
- ), u = xe((q) => q.dashboard), m = xe(
7667
- (q) => q.dashboard.controls
7664
+ } = rp({}), l = R((j) => j.card), i = R((j) => j.frame), h = R(
7665
+ (j) => j.queryResultColumns
7666
+ ), u = xe((j) => j.dashboard), m = xe(
7667
+ (j) => j.dashboard.controls
7668
7668
  ) || zg, { setCard: p, updateCardInFrame: x } = Ne(), [b, g] = U(null);
7669
7669
  we(() => {
7670
7670
  d && !b && (l != null && l.id) && g(l.id);
7671
7671
  }, [l == null ? void 0 : l.id, d, b]), we(() => {
7672
7672
  !d && b !== null && g(null);
7673
7673
  }, [d, b]);
7674
- const v = ee(() => b ? (i == null ? void 0 : i.cards.find((q) => q.id === b)) || ((l == null ? void 0 : l.id) === b ? l : void 0) : l, [l, i == null ? void 0 : i.cards, b]), M = (v == null ? void 0 : v.type) === "matrixTable" ? (O = v.config) == null ? void 0 : O.matrix : void 0, T = ee(
7674
+ const v = ee(() => b ? (i == null ? void 0 : i.cards.find((j) => j.id === b)) || ((l == null ? void 0 : l.id) === b ? l : void 0) : l, [l, i == null ? void 0 : i.cards, b]), M = (v == null ? void 0 : v.type) === "matrixTable" ? (O = v.config) == null ? void 0 : O.matrix : void 0, T = ee(
7675
7675
  () => d && M ? Ep(M.spec, v == null ? void 0 : v.controlBindings) : [],
7676
7676
  [d, M, v == null ? void 0 : v.controlBindings]
7677
- ), S = iu(T), L = ee(() => S.catalog.map((q) => ({
7678
- ...q.field,
7679
- dataType: mo(q.resolvedField.dataType)
7680
- })), [S.catalog]), A = (v == null ? void 0 : v.controls) || [], I = v ? Nh(u, { excludeCardId: v.id }) : m.map((q) => q.id), F = ((v == null ? void 0 : v.controlBindings) || []).filter(
7677
+ ), S = iu(T), L = ee(() => S.catalog.map((j) => ({
7678
+ ...j.field,
7679
+ dataType: mo(j.resolvedField.dataType)
7680
+ })), [S.catalog]), A = (v == null ? void 0 : v.controls) || [], I = v ? Nh(u, { excludeCardId: v.id }) : m.map((j) => j.id), F = ((v == null ? void 0 : v.controlBindings) || []).filter(
7681
7681
  Ch
7682
7682
  ), y = ((v == null ? void 0 : v.controlBindings) || []).filter(
7683
- Xn
7683
+ Zn
7684
7684
  ), N = cu({
7685
7685
  card: v,
7686
7686
  controls: A
7687
7687
  }), C = {
7688
7688
  choices: wh(v),
7689
7689
  targetMap: Object.fromEntries(
7690
- (((P = v == null ? void 0 : v.config) == null ? void 0 : P.groupByColumns) || []).map((q) => [
7691
- q.id,
7692
- q
7690
+ (((P = v == null ? void 0 : v.config) == null ? void 0 : P.groupByColumns) || []).map((j) => [
7691
+ j.id,
7692
+ j
7693
7693
  ])
7694
7694
  )
7695
7695
  }, E = {
7696
7696
  choices: Sh(v),
7697
7697
  targetMap: Object.fromEntries(
7698
- ((($ = v == null ? void 0 : v.config) == null ? void 0 : $.metricColumns) || []).map((q) => [
7699
- q.id,
7700
- q
7698
+ ((($ = v == null ? void 0 : v.config) == null ? void 0 : $.metricColumns) || []).map((j) => [
7699
+ j.id,
7700
+ j
7701
7701
  ])
7702
7702
  )
7703
- }, k = C.choices.map((q) => ({
7704
- option: q,
7705
- target: C.targetMap[q.value]
7706
- })), V = E.choices.map((q) => ({
7707
- option: q,
7708
- target: E.targetMap[q.value]
7709
- })), w = (q, j) => {
7703
+ }, k = C.choices.map((j) => ({
7704
+ option: j,
7705
+ target: C.targetMap[j.value]
7706
+ })), V = E.choices.map((j) => ({
7707
+ option: j,
7708
+ target: E.targetMap[j.value]
7709
+ })), w = (j, q) => {
7710
7710
  if (!v)
7711
7711
  return;
7712
- const H = (j == null ? void 0 : j.type) === "rename" ? wl(v, {
7712
+ const H = (q == null ? void 0 : q.type) === "rename" ? wl(v, {
7713
7713
  type: "rename",
7714
- oldId: j.oldId,
7715
- newId: j.newId
7716
- }) : (j == null ? void 0 : j.type) === "remove" ? wl(v, {
7714
+ oldId: q.oldId,
7715
+ newId: q.newId
7716
+ }) : (q == null ? void 0 : q.type) === "remove" ? wl(v, {
7717
7717
  type: "remove",
7718
- controlId: j.controlId
7719
- }) : v, Z = {
7718
+ controlId: q.controlId
7719
+ }) : v, X = {
7720
7720
  ...H,
7721
- controls: q,
7721
+ controls: j,
7722
7722
  controlBindings: kh(
7723
7723
  H.controlBindings,
7724
- q
7724
+ j
7725
7725
  )
7726
7726
  };
7727
- x(Z), (l == null ? void 0 : l.id) === Z.id && p(Z);
7728
- }, B = (q) => {
7727
+ x(X), (l == null ? void 0 : l.id) === X.id && p(X);
7728
+ }, B = (j) => {
7729
7729
  if (!v)
7730
7730
  return;
7731
- const j = {
7731
+ const q = {
7732
7732
  ...v,
7733
7733
  controlBindings: [
7734
7734
  ...Th(
7735
- q,
7735
+ j,
7736
7736
  (v.controlBindings || []).filter(
7737
- (H) => !Xn(H)
7737
+ (H) => !Zn(H)
7738
7738
  )
7739
7739
  ),
7740
7740
  ...y
7741
7741
  ]
7742
7742
  };
7743
- x(j), (l == null ? void 0 : l.id) === j.id && p(j);
7744
- }, D = (q) => {
7743
+ x(q), (l == null ? void 0 : l.id) === q.id && p(q);
7744
+ }, D = (j) => {
7745
7745
  if (!v) return;
7746
- const j = {
7746
+ const q = {
7747
7747
  ...v,
7748
7748
  controlBindings: [
7749
7749
  ...(v.controlBindings || []).filter(
7750
- (H) => !Xn(H)
7750
+ (H) => !Zn(H)
7751
7751
  ),
7752
- ...q
7752
+ ...j
7753
7753
  ]
7754
7754
  };
7755
- x(j), (l == null ? void 0 : l.id) === j.id && p(j);
7755
+ x(q), (l == null ? void 0 : l.id) === q.id && p(q);
7756
7756
  }, Y = a === "menu";
7757
7757
  return /* @__PURE__ */ e(
7758
7758
  "div",
@@ -7815,7 +7815,7 @@ function gs({
7815
7815
  availableFieldChoices: k,
7816
7816
  availableMetricChoices: V,
7817
7817
  onCreateFlowActiveChange: c,
7818
- onChange: (q, j, H) => w(q, H),
7818
+ onChange: (j, q, H) => w(j, H),
7819
7819
  emptyMessage: "No card-scoped controls yet."
7820
7820
  }
7821
7821
  ),
@@ -7974,8 +7974,8 @@ function Gg({
7974
7974
  ((B = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : B.url) || ""
7975
7975
  ), x = (D = p == null ? void 0 : p.visuals) == null ? void 0 : D.find(
7976
7976
  ($) => {
7977
- var q;
7978
- return $.name === ((q = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : q.componentName);
7977
+ var j;
7978
+ return $.name === ((j = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : j.componentName);
7979
7979
  }
7980
7980
  ), g = pa(r, x) === "multiple", v = (x == null ? void 0 : x.minInputs) ?? ((Y = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : Y.minInputs) ?? 1, M = (x == null ? void 0 : x.maxInputs) ?? ((O = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : O.maxInputs), T = ee(
7981
7981
  () => an({
@@ -7984,37 +7984,37 @@ function Gg({
7984
7984
  isMultiInputVisual: g
7985
7985
  }),
7986
7986
  [s, r, g]
7987
- ), S = g ? T.filter(Boolean).length : s.cards.length, L = c ? !1 : M ? S < M : !0, A = S > Math.max(v || 1, 1), I = !!((P = r == null ? void 0 : r.customCardPreferences) != null && P.dataInputCardIds), F = ($, q) => {
7988
- $.dataTransfer.setData("tabIndex", q.toString());
7987
+ ), S = g ? T.filter(Boolean).length : s.cards.length, L = c ? !1 : M ? S < M : !0, A = S > Math.max(v || 1, 1), I = !!((P = r == null ? void 0 : r.customCardPreferences) != null && P.dataInputCardIds), F = ($, j) => {
7988
+ $.dataTransfer.setData("tabIndex", j.toString());
7989
7989
  }, y = ($) => {
7990
7990
  $.preventDefault();
7991
- }, N = ($, q) => {
7992
- const j = $.dataTransfer.getData("tabIndex");
7993
- if (j === q.toString()) return;
7994
- const H = Array.from(s.cards), [Z] = H.splice(parseInt(j), 1);
7995
- H.splice(q, 0, Z), l({ ...s, cards: H });
7991
+ }, N = ($, j) => {
7992
+ const q = $.dataTransfer.getData("tabIndex");
7993
+ if (q === j.toString()) return;
7994
+ const H = Array.from(s.cards), [X] = H.splice(parseInt(q), 1);
7995
+ H.splice(j, 0, X), l({ ...s, cards: H });
7996
7996
  };
7997
7997
  function C($) {
7998
- const q = (r == null ? void 0 : r.id) === $;
7999
- if (!(I && q ? s.cards.length > 1 : A)) return;
7998
+ const j = (r == null ? void 0 : r.id) === $;
7999
+ if (!(I && j ? s.cards.length > 1 : A)) return;
8000
8000
  const H = Mh(s, $);
8001
- let Z = H.cards;
8002
- g && !I && (Z = fp(Z));
8003
- const ie = Z[0], z = {
8001
+ let X = H.cards;
8002
+ g && !I && (X = fp(X));
8003
+ const ie = X[0], z = {
8004
8004
  ...H,
8005
- cards: Z,
8005
+ cards: X,
8006
8006
  activeCardId: ie.id
8007
8007
  }, W = $ === o.id;
8008
8008
  W && f(), l(z), i(ie.id), h(ie), W && m(ie);
8009
8009
  }
8010
- function E($, q) {
8010
+ function E($, j) {
8011
8011
  if (!L) return;
8012
- const j = {
8012
+ const q = {
8013
8013
  ...s,
8014
- cards: [...s.cards, q],
8014
+ cards: [...s.cards, j],
8015
8015
  activeCardId: $.id
8016
8016
  };
8017
- l(j), i(q.id);
8017
+ l(q), i(j.id);
8018
8018
  }
8019
8019
  function k() {
8020
8020
  if (c) return;
@@ -8032,7 +8032,7 @@ function Gg({
8032
8032
  slotIndex: g ? Math.max(
8033
8033
  -1,
8034
8034
  ...T.map(
8035
- (q, j) => Vt(q, j)
8035
+ (j, q) => Vt(j, q)
8036
8036
  )
8037
8037
  ) + 1 : o.customCardPreferences.slotIndex
8038
8038
  } : void 0
@@ -8043,8 +8043,8 @@ function Gg({
8043
8043
  function V($) {
8044
8044
  var z;
8045
8045
  if (c || !L) return;
8046
- let q = g ? "table" : ns, j = "Title", H = "";
8047
- const Z = g ? Math.max(
8046
+ let j = g ? "table" : ns, q = "Title", H = "";
8047
+ const X = g ? Math.max(
8048
8048
  -1,
8049
8049
  ...T.map(
8050
8050
  (W, ae) => Vt(W, ae)
@@ -8053,16 +8053,16 @@ function Gg({
8053
8053
  if (g && ((z = x == null ? void 0 : x.slots) != null && z.length)) {
8054
8054
  const W = kr(
8055
8055
  x.slots,
8056
- Z
8056
+ X
8057
8057
  );
8058
- W && (q = gp(W), j = W.label || `Tab ${Z + 1}`, H = W.description || "");
8058
+ W && (j = gp(W), q = W.label || `Tab ${X + 1}`, H = W.description || "");
8059
8059
  }
8060
8060
  const ie = {
8061
8061
  dataSource: $.dataSource,
8062
8062
  connectionId: $.connectionId,
8063
8063
  id: sa(),
8064
- title: j,
8065
- tabTitle: j,
8064
+ title: q,
8065
+ tabTitle: q,
8066
8066
  description: H,
8067
8067
  preferences: {
8068
8068
  onClickFilter: [
@@ -8071,37 +8071,37 @@ function Gg({
8071
8071
  expression: ""
8072
8072
  }
8073
8073
  ],
8074
- ...q === "text" ? {
8074
+ ...j === "text" ? {
8075
8075
  textVisualOptions: {
8076
8076
  richContent: Fh()
8077
8077
  }
8078
8078
  } : {}
8079
8079
  },
8080
- type: q,
8080
+ type: j,
8081
8081
  sql: "",
8082
8082
  data: [],
8083
8083
  mode: "explorer",
8084
8084
  // Set default mode for new cards
8085
8085
  ...g && {
8086
8086
  customCardPreferences: {
8087
- slotIndex: Z
8087
+ slotIndex: X
8088
8088
  }
8089
8089
  }
8090
8090
  };
8091
8091
  E($, ie);
8092
8092
  }
8093
- function w($, q) {
8094
- return $.cards.length === 1 && (q.displayTab === !0 || q.displayTab === void 0) || $.activeCardId !== q.id && (q.displayTab === !0 || q.displayTab === void 0) ? null : /* @__PURE__ */ e(
8093
+ function w($, j) {
8094
+ return $.cards.length === 1 && (j.displayTab === !0 || j.displayTab === void 0) || $.activeCardId !== j.id && (j.displayTab === !0 || j.displayTab === void 0) ? null : /* @__PURE__ */ e(
8095
8095
  "div",
8096
8096
  {
8097
8097
  onClick: () => {
8098
- const j = q.displayTab === void 0 ? !1 : !q.displayTab;
8099
- h({ ...q, displayTab: j }), u({
8100
- ...q,
8101
- displayTab: j
8098
+ const q = j.displayTab === void 0 ? !1 : !j.displayTab;
8099
+ h({ ...j, displayTab: q }), u({
8100
+ ...j,
8101
+ displayTab: q
8102
8102
  });
8103
8103
  },
8104
- children: q.displayTab === !0 || q.displayTab === void 0 ? /* @__PURE__ */ e(Za, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(Sl, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" })
8104
+ children: j.displayTab === !0 || j.displayTab === void 0 ? /* @__PURE__ */ e(Xa, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(Sl, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" })
8105
8105
  }
8106
8106
  );
8107
8107
  }
@@ -8111,18 +8111,18 @@ function Gg({
8111
8111
  variant: "underline",
8112
8112
  className: "group flex h-9 shrink-0 items-center justify-start gap-1 overflow-x-auto rounded-none border-b-0 border-t border-border bg-background px-4",
8113
8113
  children: /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
8114
- s.cards.map(($, q) => {
8114
+ s.cards.map(($, j) => {
8115
8115
  var z, W;
8116
- const j = g ? Vt($, q) : -1, H = g && ((z = x == null ? void 0 : x.slots) != null && z.length) && j >= 0 ? kr(x.slots, j) : null, Z = H ? (Array.isArray(H.expectedType) ? H.expectedType[0] : H.expectedType) || "table" : $.type, ie = g && ((W = x == null ? void 0 : x.slots) == null ? void 0 : W.length) && x.slots.every(
8116
+ const q = g ? Vt($, j) : -1, H = g && ((z = x == null ? void 0 : x.slots) != null && z.length) && q >= 0 ? kr(x.slots, q) : null, X = H ? (Array.isArray(H.expectedType) ? H.expectedType[0] : H.expectedType) || "table" : $.type, ie = g && ((W = x == null ? void 0 : x.slots) == null ? void 0 : W.length) && x.slots.every(
8117
8117
  (ae) => typeof ae.position == "number" || typeof ae.position == "string" && !ae.position.includes("+")
8118
8118
  );
8119
8119
  return /* @__PURE__ */ n(
8120
8120
  tt,
8121
8121
  {
8122
8122
  draggable: !g && !c,
8123
- onDragStart: g || c ? void 0 : (ae) => F(ae, q),
8123
+ onDragStart: g || c ? void 0 : (ae) => F(ae, j),
8124
8124
  onDragOver: g || c ? void 0 : y,
8125
- onDrop: g || c ? void 0 : (ae) => N(ae, q),
8125
+ onDrop: g || c ? void 0 : (ae) => N(ae, j),
8126
8126
  className: G(
8127
8127
  "inline-flex h-6 shrink-0 items-center gap-1.5 rounded-[5px] border px-2 text-[12px] font-normal text-muted-foreground transition-colors",
8128
8128
  "mb-0 border-transparent pb-0",
@@ -8135,8 +8135,8 @@ function Gg({
8135
8135
  // Multi-input visual: Icon + Slot Label (non-editable, no eye icon)
8136
8136
  /* @__PURE__ */ e(gt, { delayDuration: 0, children: /* @__PURE__ */ n(mt, { children: [
8137
8137
  /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
8138
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Eo(Z, "size-3.5") }),
8139
- /* @__PURE__ */ e("span", { children: H.label || `Tab ${j + 1}` })
8138
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Eo(X, "size-3.5") }),
8139
+ /* @__PURE__ */ e("span", { children: H.label || `Tab ${q + 1}` })
8140
8140
  ] }) }),
8141
8141
  /* @__PURE__ */ e(
8142
8142
  ut,
@@ -8212,7 +8212,7 @@ function Gg({
8212
8212
  className: "ml-1 h-6 gap-1 rounded-[5px] px-2 text-[11px] data-[state=on]:bg-muted data-[state=on]:text-foreground",
8213
8213
  "aria-label": "Toggle preview",
8214
8214
  children: [
8215
- t ? /* @__PURE__ */ e(Sl, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Za, { className: "h-3 w-3" }),
8215
+ t ? /* @__PURE__ */ e(Sl, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Xa, { className: "h-3 w-3" }),
8216
8216
  /* @__PURE__ */ e("span", { children: "Preview" })
8217
8217
  ]
8218
8218
  }
@@ -8269,7 +8269,7 @@ function Er({
8269
8269
  o,
8270
8270
  P,
8271
8271
  w == null ? void 0 : w.slots
8272
- ) ?? o.type, [l, B, P, o, w == null ? void 0 : w.slots]), q = ee(() => D ? {
8272
+ ) ?? o.type, [l, B, P, o, w == null ? void 0 : w.slots]), j = ee(() => D ? {
8273
8273
  ...o,
8274
8274
  connectionId: void 0,
8275
8275
  dataSource: void 0,
@@ -8278,15 +8278,15 @@ function Er({
8278
8278
  config: void 0,
8279
8279
  queryConfig: void 0
8280
8280
  } : $ !== o.type ? { ...o, type: $ } : o, [o, $, D]), {
8281
- data: j,
8281
+ data: q,
8282
8282
  dataUpdatedAt: H,
8283
- isLoading: Z,
8283
+ isLoading: X,
8284
8284
  isFetching: ie,
8285
8285
  isError: z,
8286
8286
  errorMessage: W,
8287
8287
  errorSql: ae,
8288
8288
  queryKey: ue
8289
- } = xt(q), oe = JSON.stringify(ue), { handleOpenInEditor: ge } = Ui(
8289
+ } = xt(j), oe = JSON.stringify(ue), { handleOpenInEditor: ge } = Ui(
8290
8290
  ae || o.sql || o.python
8291
8291
  ), fe = o.type === "text" && ((Wt = (Qt = o.preferences) == null ? void 0 : Qt.textVisualOptions) == null ? void 0 : Wt.isDynamicText) === !0 && !!W, be = st(
8292
8292
  (he, Fe) => {
@@ -8332,7 +8332,7 @@ function Er({
8332
8332
  var Fe;
8333
8333
  return ((Fe = he.reportContext) == null ? void 0 : Fe.calendar) ?? null;
8334
8334
  }
8335
- ), Xe = xe((he) => he.selectedSheetId), ce = R(
8335
+ ), Ze = xe((he) => he.selectedSheetId), ce = R(
8336
8336
  (he) => he.inlineFilterValuesMap[(l == null ? void 0 : l.id) || ""]
8337
8337
  ), ke = R(
8338
8338
  (he) => he.actions.setCardInlineFilterValue
@@ -8341,14 +8341,14 @@ function Er({
8341
8341
  ), He = ee(
8342
8342
  () => l ? fu({
8343
8343
  card: l,
8344
- sheetId: Xe || "",
8344
+ sheetId: Ze || "",
8345
8345
  inlineFilterValues: ce,
8346
8346
  setInlineFilterValue: (he) => ke(l.id, he),
8347
8347
  removeInlineFilterValue: (he) => Re(l.id, he)
8348
8348
  }) : [],
8349
8349
  [
8350
8350
  l,
8351
- Xe,
8351
+ Ze,
8352
8352
  ce,
8353
8353
  ke,
8354
8354
  Re
@@ -8361,7 +8361,7 @@ function Er({
8361
8361
  () => l ? wo({
8362
8362
  dashboard: _e,
8363
8363
  card: l,
8364
- sheetId: Xe,
8364
+ sheetId: Ze,
8365
8365
  dashboardInputValues: Qe,
8366
8366
  adHocFilterValues: Ve,
8367
8367
  transientContexts: ye,
@@ -8373,7 +8373,7 @@ function Er({
8373
8373
  Qe,
8374
8374
  ft,
8375
8375
  _e,
8376
- Xe,
8376
+ Ze,
8377
8377
  ye
8378
8378
  ]
8379
8379
  );
@@ -8384,18 +8384,18 @@ function Er({
8384
8384
  function Me(he) {
8385
8385
  const Fe = R.getState().card, Nt = R.getState().frame, nt = {
8386
8386
  ...Nt,
8387
- cards: Nt.cards.map((jt) => jt.id === Fe.id ? Fe : jt),
8387
+ cards: Nt.cards.map((qt) => qt.id === Fe.id ? Fe : qt),
8388
8388
  activeCardId: he
8389
8389
  };
8390
8390
  h(nt);
8391
- const Zt = nt.cards.find((jt) => jt.id === he);
8392
- Zt.sql && m(!0), f(Zt);
8391
+ const Xt = nt.cards.find((qt) => qt.id === he);
8392
+ Xt.sql && m(!0), f(Xt);
8393
8393
  }
8394
8394
  function We() {
8395
8395
  return E ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(_t, { size: "md", color: "muted", "aria-label": "Loading manifest" }) }) : V ? /* @__PURE__ */ n("div", { className: "relative flex h-full flex-col pl-2 pr-4", children: [
8396
8396
  Y.map((Fe, Nt) => {
8397
8397
  if (!Fe) return null;
8398
- const nt = Vt(Fe, Nt), Zt = ka(
8398
+ const nt = Vt(Fe, Nt), Xt = ka(
8399
8399
  Fe,
8400
8400
  nt,
8401
8401
  w == null ? void 0 : w.slots
@@ -8406,7 +8406,7 @@ function Er({
8406
8406
  onLoadingStatus: Ae,
8407
8407
  onDataChange: be,
8408
8408
  card: Fe,
8409
- effectiveCardType: Zt
8409
+ effectiveCardType: Xt
8410
8410
  },
8411
8411
  `${Fe.id}-${nt}`
8412
8412
  );
@@ -8453,13 +8453,13 @@ function Er({
8453
8453
  }
8454
8454
  function Q() {
8455
8455
  var he;
8456
- return D ? We() : t && (a || !Z && !ie && !z && !W) ? t({
8456
+ return D ? We() : t && (a || !X && !ie && !z && !W) ? t({
8457
8457
  card: o,
8458
- data: j,
8459
- isLoading: Z,
8458
+ data: q,
8459
+ isLoading: X,
8460
8460
  isFetching: ie,
8461
8461
  isError: z
8462
- }) : o.type === "kpi" ? Z || ie ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(_t, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : W ? /* @__PURE__ */ e(
8462
+ }) : o.type === "kpi" ? X || ie ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(_t, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : W ? /* @__PURE__ */ e(
8463
8463
  Ug,
8464
8464
  {
8465
8465
  errorMessage: W,
@@ -8471,14 +8471,14 @@ function Er({
8471
8471
  gu,
8472
8472
  {
8473
8473
  card: o,
8474
- data: j == null ? void 0 : j.records,
8475
- isPending: Z || ie,
8474
+ data: q == null ? void 0 : q.records,
8475
+ isPending: X || ie,
8476
8476
  isError: z,
8477
- comparisonMetadata: (he = j == null ? void 0 : j.metadata) == null ? void 0 : he.comparisonMetadata
8477
+ comparisonMetadata: (he = q == null ? void 0 : q.metadata) == null ? void 0 : he.comparisonMetadata
8478
8478
  }
8479
8479
  ) }),
8480
- Do(o) && /* @__PURE__ */ e(Mo, { card: o, mode: "editor", records: j == null ? void 0 : j.records })
8481
- ] }) }) : o.type === "text" ? Z || ie ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(_t, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : fe ? /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col overflow-auto px-4 py-0", children: /* @__PURE__ */ e(
8480
+ Do(o) && /* @__PURE__ */ e(Mo, { card: o, mode: "editor", records: q == null ? void 0 : q.records })
8481
+ ] }) }) : o.type === "text" ? X || ie ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(_t, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : fe ? /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col overflow-auto px-4 py-0", children: /* @__PURE__ */ e(
8482
8482
  us,
8483
8483
  {
8484
8484
  error: W,
@@ -8486,7 +8486,7 @@ function Er({
8486
8486
  onOpenInEditor: ge,
8487
8487
  showFeedbackButton: !1
8488
8488
  }
8489
- ) }) : /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col px-4 py-4", children: /* @__PURE__ */ e(xu, { isLoading: i, card: o, data: j == null ? void 0 : j.records }) }) : /* @__PURE__ */ e(
8489
+ ) }) : /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col px-4 py-4", children: /* @__PURE__ */ e(xu, { isLoading: i, card: o, data: q == null ? void 0 : q.records }) }) : /* @__PURE__ */ e(
8490
8490
  In,
8491
8491
  {
8492
8492
  fallbackRender: (Fe) => /* @__PURE__ */ e(
@@ -8529,7 +8529,7 @@ function Er({
8529
8529
  }
8530
8530
  );
8531
8531
  }
8532
- function Zi({
8532
+ function Xi({
8533
8533
  sql: t,
8534
8534
  debugPayloads: a,
8535
8535
  variant: r = "panel",
@@ -8631,14 +8631,14 @@ function cr({
8631
8631
  D.current = V;
8632
8632
  const Y = ee(() => (y == null ? void 0 : y.records) || [], [y == null ? void 0 : y.records]), { cardFilterValues: O } = og(
8633
8633
  (d == null ? void 0 : d.id) ?? ""
8634
- ), [P, $] = U(!1), q = Yo(d), [j, H] = U();
8634
+ ), [P, $] = U(!1), j = Yo(d), [q, H] = U();
8635
8635
  we(() => {
8636
8636
  C || $(!1);
8637
8637
  }, [C]);
8638
- const Z = () => {
8638
+ const X = () => {
8639
8639
  var ye;
8640
- if (q) {
8641
- (ye = q.refresh) == null || ye.call(q);
8640
+ if (j) {
8641
+ (ye = j.refresh) == null || ye.call(j);
8642
8642
  return;
8643
8643
  }
8644
8644
  if ($(!0), c) {
@@ -8693,7 +8693,7 @@ function cr({
8693
8693
  align: "end",
8694
8694
  collisionPadding: 16,
8695
8695
  className: "w-[500px] overflow-hidden p-0",
8696
- children: /* @__PURE__ */ e(Zi, { sql: y.sql, variant: "popover" })
8696
+ children: /* @__PURE__ */ e(Xi, { sql: y.sql, variant: "popover" })
8697
8697
  }
8698
8698
  )
8699
8699
  ] }) }) : null, Ae = typeof (y == null ? void 0 : y.output) == "string" ? y.output.trim() : "", me = fe && !N && !C && !E && Ae ? /* @__PURE__ */ n(ya, { openDelay: 200, children: [
@@ -8861,12 +8861,12 @@ function cr({
8861
8861
  tooltip: "Refresh",
8862
8862
  disabled: N || C,
8863
8863
  className: "h-7 w-7 px-0",
8864
- onClick: Z,
8864
+ onClick: X,
8865
8865
  children: /* @__PURE__ */ e(
8866
8866
  Tr,
8867
8867
  {
8868
8868
  className: G("h-3.5 w-3.5", {
8869
- "animate-spin": (q == null ? void 0 : q.isFetching) ?? P
8869
+ "animate-spin": (j == null ? void 0 : j.isFetching) ?? P
8870
8870
  })
8871
8871
  }
8872
8872
  )
@@ -8894,7 +8894,7 @@ function cr({
8894
8894
  Pt,
8895
8895
  {
8896
8896
  disabled: N || C,
8897
- onSelect: Z,
8897
+ onSelect: X,
8898
8898
  children: [
8899
8899
  /* @__PURE__ */ e(Tr, { className: "h-3.5 w-3.5" }),
8900
8900
  "Refresh result"
@@ -8904,12 +8904,12 @@ function cr({
8904
8904
  /* @__PURE__ */ e(kl, {})
8905
8905
  ] }),
8906
8906
  /* @__PURE__ */ e(Tl, { children: "Export" }),
8907
- q ? /* @__PURE__ */ n(
8907
+ j ? /* @__PURE__ */ n(
8908
8908
  Pt,
8909
8909
  {
8910
- disabled: N || C || !q.hasDelivery,
8911
- title: q.hasDelivery ? void 0 : "Available once the preview has loaded.",
8912
- onSelect: () => H(q.readDelivery()),
8910
+ disabled: N || C || !j.hasDelivery,
8911
+ title: j.hasDelivery ? void 0 : "Available once the preview has loaded.",
8912
+ onSelect: () => H(j.readDelivery()),
8913
8913
  className: "gap-2 text-[13px]",
8914
8914
  children: [
8915
8915
  /* @__PURE__ */ e(vr, { className: "h-3.5 w-3.5" }),
@@ -8996,14 +8996,14 @@ function cr({
8996
8996
  }
8997
8997
  )
8998
8998
  ] }),
8999
- j && /* @__PURE__ */ e(
8999
+ q && /* @__PURE__ */ e(
9000
9000
  Vo,
9001
9001
  {
9002
9002
  isOpen: !0,
9003
9003
  onClose: () => H(void 0),
9004
9004
  card: d,
9005
9005
  frame: o,
9006
- matrix: j
9006
+ matrix: q
9007
9007
  }
9008
9008
  )
9009
9009
  ]
@@ -9198,7 +9198,7 @@ function Wg({
9198
9198
  }));
9199
9199
  })), s;
9200
9200
  }
9201
- const Zg = {
9201
+ const Xg = {
9202
9202
  table: ({ children: t }) => /* @__PURE__ */ e("table", { className: "my-3 w-full border-collapse overflow-hidden rounded-md border border-border text-sm", children: t }),
9203
9203
  thead: ({ children: t }) => /* @__PURE__ */ e("thead", { className: "bg-muted", children: t }),
9204
9204
  th: ({ children: t }) => /* @__PURE__ */ e("th", { className: "border border-border px-3 py-2 text-left font-medium", children: t }),
@@ -9206,7 +9206,7 @@ const Zg = {
9206
9206
  code: ({ children: t, className: a }) => (a == null ? void 0 : a.includes("language-")) ? /* @__PURE__ */ e("pre", { className: "my-3 overflow-x-auto rounded-md bg-muted p-3 text-xs", children: /* @__PURE__ */ e("code", { children: t }) }) : /* @__PURE__ */ e("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: t }),
9207
9207
  pre: ({ children: t }) => /* @__PURE__ */ e(pe, { children: t })
9208
9208
  };
9209
- function Xi() {
9209
+ function Zi() {
9210
9210
  var E, k, V;
9211
9211
  const t = R(
9212
9212
  (w) => w.card.customCardPreferences
@@ -9272,7 +9272,7 @@ function Xi() {
9272
9272
  return w ? (Array.isArray(w) ? w : [w]).join(", ") : null;
9273
9273
  }
9274
9274
  function I(w, B, D = [], Y = "", O, P, $) {
9275
- const q = F({
9275
+ const j = F({
9276
9276
  key: B,
9277
9277
  defaultValue: Y,
9278
9278
  settingsValue: P,
@@ -9283,12 +9283,12 @@ function Xi() {
9283
9283
  {
9284
9284
  className: `h-8 w-full ${Kt}`,
9285
9285
  value: String(
9286
- q ?? ""
9286
+ j ?? ""
9287
9287
  ),
9288
- onCommit: (j) => {
9288
+ onCommit: (q) => {
9289
9289
  y({
9290
9290
  key: B,
9291
- value: j,
9291
+ value: q,
9292
9292
  settingsField: O,
9293
9293
  settingsValue: P,
9294
9294
  sourceCard: $
@@ -9303,12 +9303,12 @@ function Xi() {
9303
9303
  label: "",
9304
9304
  options: D,
9305
9305
  value: String(
9306
- q !== void 0 ? q : Y ?? ""
9306
+ j !== void 0 ? j : Y ?? ""
9307
9307
  ),
9308
- onValueChange: (j) => {
9308
+ onValueChange: (q) => {
9309
9309
  y({
9310
9310
  key: B,
9311
- value: j,
9311
+ value: q,
9312
9312
  settingsField: O,
9313
9313
  settingsValue: P,
9314
9314
  sourceCard: $
@@ -9333,8 +9333,8 @@ function Xi() {
9333
9333
  settingsValue: Y,
9334
9334
  sourceCard: O
9335
9335
  }) {
9336
- const P = { ...Y || {} }, $ = w === "title" && (O == null ? void 0 : O.title) !== void 0, q = w === "description" && (O == null ? void 0 : O.description) !== void 0;
9337
- $ && B === String((O == null ? void 0 : O.title) ?? "") || q && B === String((O == null ? void 0 : O.description) ?? "") ? delete P[w] : P[w] = B, d({
9336
+ const P = { ...Y || {} }, $ = w === "title" && (O == null ? void 0 : O.title) !== void 0, j = w === "description" && (O == null ? void 0 : O.description) !== void 0;
9337
+ $ && B === String((O == null ? void 0 : O.title) ?? "") || j && B === String((O == null ? void 0 : O.description) ?? "") ? delete P[w] : P[w] = B, d({
9338
9338
  ...t || {},
9339
9339
  [D]: P
9340
9340
  });
@@ -9349,21 +9349,21 @@ function Xi() {
9349
9349
  const P = Object.entries(w || {});
9350
9350
  return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
9351
9351
  O && /* @__PURE__ */ e(_, { children: O }),
9352
- P.map(([$, q]) => {
9353
- var j;
9352
+ P.map(([$, j]) => {
9353
+ var q;
9354
9354
  return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
9355
9355
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
9356
- /* @__PURE__ */ e(_, { children: q.title }),
9357
- ((j = q.docs) == null ? void 0 : j.description) && /* @__PURE__ */ e(gt, { delayDuration: 0, children: /* @__PURE__ */ n(mt, { children: [
9356
+ /* @__PURE__ */ e(_, { children: j.title }),
9357
+ ((q = j.docs) == null ? void 0 : q.description) && /* @__PURE__ */ e(gt, { delayDuration: 0, children: /* @__PURE__ */ n(mt, { children: [
9358
9358
  /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e(Ma, { className: "h-3.5 w-3.5 cursor-help text-muted-foreground" }) }),
9359
- /* @__PURE__ */ e(ut, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { className: "text-xs", children: q.docs.description }) })
9359
+ /* @__PURE__ */ e(ut, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { className: "text-xs", children: j.docs.description }) })
9360
9360
  ] }) })
9361
9361
  ] }),
9362
9362
  I(
9363
- q.ui,
9363
+ j.ui,
9364
9364
  $,
9365
- q.options,
9366
- q.defaultValue,
9365
+ j.options,
9366
+ j.defaultValue,
9367
9367
  B,
9368
9368
  D,
9369
9369
  Y
@@ -9399,7 +9399,7 @@ function Xi() {
9399
9399
  ] })
9400
9400
  ] }) })
9401
9401
  ] }),
9402
- m && T.length > 0 && /* @__PURE__ */ e(Wc, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(Zc, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: T.map((w, B) => /* @__PURE__ */ e("li", { children: w.message }, `${w.type}-${B}`)) }) }) }),
9402
+ m && T.length > 0 && /* @__PURE__ */ e(Wc, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(Xc, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: T.map((w, B) => /* @__PURE__ */ e("li", { children: w.message }, `${w.type}-${B}`)) }) }) }),
9403
9403
  u && !m && u.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: N({
9404
9404
  settingsSchema: u.settings,
9405
9405
  settingsField: "settings",
@@ -9435,8 +9435,8 @@ function Xi() {
9435
9435
  className: "",
9436
9436
  children: [
9437
9437
  /* @__PURE__ */ n($e, { value: "plugin-settings", children: [
9438
- /* @__PURE__ */ e(qe, { children: "Plugin" }),
9439
- /* @__PURE__ */ e(je, { children: /* @__PURE__ */ n("div", { className: "space-y-4 text-sm", children: [
9438
+ /* @__PURE__ */ e(je, { children: "Plugin" }),
9439
+ /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ n("div", { className: "space-y-4 text-sm", children: [
9440
9440
  /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
9441
9441
  (!m || p) && /* @__PURE__ */ e(
9442
9442
  zt,
@@ -9489,7 +9489,7 @@ function Xi() {
9489
9489
  ] }) })
9490
9490
  ] }),
9491
9491
  ((l == null ? void 0 : l.componentName) || (t == null ? void 0 : t.componentName)) && /* @__PURE__ */ n($e, { className: "border-none", value: "component-settings", children: [
9492
- /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
9492
+ /* @__PURE__ */ e(je, { children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
9493
9493
  /* @__PURE__ */ e("span", { children: (u == null ? void 0 : u.name) || "Settings" }),
9494
9494
  (u == null ? void 0 : u.docs) && /* @__PURE__ */ n(ya, { openDelay: 0, closeDelay: 100, children: [
9495
9495
  /* @__PURE__ */ e(
@@ -9514,7 +9514,7 @@ function Xi() {
9514
9514
  Tu,
9515
9515
  {
9516
9516
  remarkPlugins: [Du],
9517
- components: Zg,
9517
+ components: Xg,
9518
9518
  children: u.docs.dataSchema
9519
9519
  }
9520
9520
  ) })
@@ -9542,7 +9542,7 @@ function Xi() {
9542
9542
  )
9543
9543
  ] })
9544
9544
  ] }) }),
9545
- /* @__PURE__ */ e(je, { children: C() })
9545
+ /* @__PURE__ */ e(qe, { children: C() })
9546
9546
  ] })
9547
9547
  ]
9548
9548
  }
@@ -9583,7 +9583,7 @@ function ec(t, a, r) {
9583
9583
  Tn(a)
9584
9584
  ) : s;
9585
9585
  }
9586
- function Xg(t, a) {
9586
+ function Zg(t, a) {
9587
9587
  return {
9588
9588
  ...t,
9589
9589
  decimalPlaces: void 0,
@@ -9764,7 +9764,7 @@ function nn({
9764
9764
  a(
9765
9765
  d && k === "currency" && t.type !== "currency" ? Jl(V) : V
9766
9766
  );
9767
- }, I = (k) => d && i === "currency" ? Xg(
9767
+ }, I = (k) => d && i === "currency" ? Zg(
9768
9768
  h,
9769
9769
  k
9770
9770
  ) : tc(h, k), F = ((C = Ql.find(
@@ -10174,7 +10174,7 @@ function nn({
10174
10174
  ] })
10175
10175
  ] });
10176
10176
  }
10177
- function Zl({
10177
+ function Xl({
10178
10178
  colorRanges: t,
10179
10179
  setColorRanges: a
10180
10180
  }) {
@@ -10271,7 +10271,7 @@ function ox(t) {
10271
10271
  maximumFractionDigits: 0
10272
10272
  };
10273
10273
  }
10274
- function Xl(t) {
10274
+ function Zl(t) {
10275
10275
  return {
10276
10276
  enabled: !0,
10277
10277
  colorRanges: t == null ? void 0 : t.colorRanges
@@ -10294,7 +10294,7 @@ function ix() {
10294
10294
  const v = R.getState().card.preferences ?? {};
10295
10295
  a({
10296
10296
  ...v,
10297
- formatNumber: Xl(v.formatNumber),
10297
+ formatNumber: Zl(v.formatNumber),
10298
10298
  kpiVisualOptions: {
10299
10299
  ...v.kpiVisualOptions,
10300
10300
  formatOptions: g
@@ -10305,7 +10305,7 @@ function ix() {
10305
10305
  if (g) {
10306
10306
  a({
10307
10307
  ...v,
10308
- formatNumber: Xl(v.formatNumber),
10308
+ formatNumber: Zl(v.formatNumber),
10309
10309
  kpiVisualOptions: {
10310
10310
  ...v.kpiVisualOptions,
10311
10311
  formatOptions: l
@@ -10321,7 +10321,7 @@ function ix() {
10321
10321
  }
10322
10322
  });
10323
10323
  };
10324
- return c ? /* @__PURE__ */ e(Zl, { colorRanges: r, setColorRanges: s }) : /* @__PURE__ */ n("div", { children: [
10324
+ return c ? /* @__PURE__ */ e(Xl, { colorRanges: r, setColorRanges: s }) : /* @__PURE__ */ n("div", { children: [
10325
10325
  /* @__PURE__ */ n("div", { className: "mb-3 flex items-center gap-2", children: [
10326
10326
  /* @__PURE__ */ e(
10327
10327
  St,
@@ -10349,7 +10349,7 @@ function ix() {
10349
10349
  ),
10350
10350
  /* @__PURE__ */ e(Cn, { className: "my-3" }),
10351
10351
  /* @__PURE__ */ e(
10352
- Zl,
10352
+ Xl,
10353
10353
  {
10354
10354
  colorRanges: r,
10355
10355
  setColorRanges: s
@@ -11003,7 +11003,7 @@ function xx() {
11003
11003
  var i, h, u, f, m, p, x, b, g, v, M, T, S, L, A, I, F, y;
11004
11004
  const t = R((N) => N.card), a = (h = (i = t == null ? void 0 : t.preferences) == null ? void 0 : i.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [r, s] = U(
11005
11005
  ((f = (u = t == null ? void 0 : t.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : f.customTopoJsonUrl) || ""
11006
- ), { setCardPreferences: o } = Ne(), { data: d } = qr(t), c = Object.keys((d == null ? void 0 : d.objects) || {}).map((N) => ({
11006
+ ), { setCardPreferences: o } = Ne(), { data: d } = jr(t), c = Object.keys((d == null ? void 0 : d.objects) || {}).map((N) => ({
11007
11007
  label: N,
11008
11008
  value: N
11009
11009
  })) || [];
@@ -11203,14 +11203,14 @@ function xx() {
11203
11203
  /* @__PURE__ */ e(hx, {})
11204
11204
  ] });
11205
11205
  }
11206
- function Ze({
11206
+ function Xe({
11207
11207
  label: t,
11208
11208
  value: a,
11209
11209
  options: r,
11210
11210
  onChange: s,
11211
11211
  disabled: o
11212
11212
  }) {
11213
- const d = ja();
11213
+ const d = qa();
11214
11214
  return /* @__PURE__ */ n("div", { className: "min-w-0 space-y-1", children: [
11215
11215
  /* @__PURE__ */ e(_, { htmlFor: d, className: "text-xs", children: t }),
11216
11216
  /* @__PURE__ */ n(ne, { value: a, onValueChange: s, disabled: o, children: [
@@ -11245,7 +11245,7 @@ function na({
11245
11245
  placeholder: c,
11246
11246
  hint: l
11247
11247
  }) {
11248
- const i = ja(), h = ja();
11248
+ const i = qa(), h = qa();
11249
11249
  return /* @__PURE__ */ n("div", { className: "min-w-0 space-y-1", children: [
11250
11250
  /* @__PURE__ */ e(_, { htmlFor: i, className: "text-xs", children: t }),
11251
11251
  /* @__PURE__ */ e(
@@ -11270,7 +11270,7 @@ function Dn({
11270
11270
  checked: a,
11271
11271
  onChange: r
11272
11272
  }) {
11273
- const s = ja();
11273
+ const s = qa();
11274
11274
  return /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center justify-between gap-2 py-1", children: [
11275
11275
  /* @__PURE__ */ e(_, { className: "text-xs", htmlFor: s, children: t }),
11276
11276
  /* @__PURE__ */ e(Ee, { id: s, size: "xs", checked: a, onCheckedChange: r })
@@ -11312,7 +11312,7 @@ function to({
11312
11312
  }
11313
11313
  ),
11314
11314
  /* @__PURE__ */ e(
11315
- Ze,
11315
+ Xe,
11316
11316
  {
11317
11317
  label: `${t} position`,
11318
11318
  value: a.position,
@@ -11465,7 +11465,7 @@ function yx({
11465
11465
  };
11466
11466
  return /* @__PURE__ */ n("div", { className: "space-y-2 border-t pt-2", children: [
11467
11467
  /* @__PURE__ */ e(
11468
- Ze,
11468
+ Xe,
11469
11469
  {
11470
11470
  label: "Sort by",
11471
11471
  value: d ? d.target.kind === "member" ? "member" : d.target.measureId : "default",
@@ -11487,7 +11487,7 @@ function yx({
11487
11487
  ),
11488
11488
  d && /* @__PURE__ */ n(pe, { children: [
11489
11489
  /* @__PURE__ */ e(
11490
- Ze,
11490
+ Xe,
11491
11491
  {
11492
11492
  label: "Sort direction",
11493
11493
  value: d.direction,
@@ -11499,7 +11499,7 @@ function yx({
11499
11499
  }
11500
11500
  ),
11501
11501
  /* @__PURE__ */ e(
11502
- Ze,
11502
+ Xe,
11503
11503
  {
11504
11504
  label: "Null order",
11505
11505
  value: d.nulls,
@@ -11512,7 +11512,7 @@ function yx({
11512
11512
  )
11513
11513
  ] }),
11514
11514
  /* @__PURE__ */ e(
11515
- Ze,
11515
+ Xe,
11516
11516
  {
11517
11517
  label: "Ranking",
11518
11518
  disabled: !r.spec.measures.length,
@@ -11541,7 +11541,7 @@ function yx({
11541
11541
  }
11542
11542
  ),
11543
11543
  /* @__PURE__ */ e(
11544
- Ze,
11544
+ Xe,
11545
11545
  {
11546
11546
  label: "Rank by measure",
11547
11547
  value: c.measureId,
@@ -11558,7 +11558,7 @@ function yx({
11558
11558
  }
11559
11559
  ),
11560
11560
  /* @__PURE__ */ e(
11561
- Ze,
11561
+ Xe,
11562
11562
  {
11563
11563
  label: "Ranking context",
11564
11564
  value: c.oppositePath.length ? bn(c.oppositePath) : "total",
@@ -11613,7 +11613,7 @@ function Nx({
11613
11613
  x
11614
11614
  ] }),
11615
11615
  /* @__PURE__ */ e(
11616
- jo,
11616
+ qo,
11617
11617
  {
11618
11618
  columnId: b.id,
11619
11619
  availableColumns: t.spec.measures.map((T) => ({
@@ -11643,7 +11643,7 @@ function Nx({
11643
11643
  " scope"
11644
11644
  ] }),
11645
11645
  /* @__PURE__ */ e(
11646
- Ze,
11646
+ Xe,
11647
11647
  {
11648
11648
  label: "Cell role",
11649
11649
  value: ((N = T.target.rowRoles) == null ? void 0 : N.length) === 1 ? T.target.rowRoles[0] : "all",
@@ -11665,7 +11665,7 @@ function Nx({
11665
11665
  }
11666
11666
  ),
11667
11667
  /* @__PURE__ */ e(
11668
- Ze,
11668
+ Xe,
11669
11669
  {
11670
11670
  label: "Rule axis",
11671
11671
  value: (L == null ? void 0 : L.axis) ?? "all",
@@ -11681,7 +11681,7 @@ function Nx({
11681
11681
  ),
11682
11682
  L && /* @__PURE__ */ n(pe, { children: [
11683
11683
  /* @__PURE__ */ e(
11684
- Ze,
11684
+ Xe,
11685
11685
  {
11686
11686
  label: "Rule level",
11687
11687
  value: L.levelId ?? "all",
@@ -11699,7 +11699,7 @@ function Nx({
11699
11699
  }
11700
11700
  ),
11701
11701
  /* @__PURE__ */ e(
11702
- Ze,
11702
+ Xe,
11703
11703
  {
11704
11704
  label: "Opposite members",
11705
11705
  value: L.oppositePath === void 0 ? "all" : L.oppositePath.length ? bn(L.oppositePath) : "total",
@@ -11816,7 +11816,7 @@ function Cx({
11816
11816
  }
11817
11817
  ),
11818
11818
  /* @__PURE__ */ e(
11819
- Ze,
11819
+ Xe,
11820
11820
  {
11821
11821
  label: "Axis",
11822
11822
  value: b,
@@ -11830,13 +11830,13 @@ function Cx({
11830
11830
  }
11831
11831
  ),
11832
11832
  S && /* @__PURE__ */ e(
11833
- Ze,
11833
+ Xe,
11834
11834
  {
11835
11835
  label: "Time grain",
11836
11836
  value: g.grain ?? "none",
11837
11837
  options: [
11838
11838
  { value: "none", label: "No grouping" },
11839
- ...qo(
11839
+ ...jo(
11840
11840
  T
11841
11841
  ).map((F) => ({ value: F, label: F }))
11842
11842
  ],
@@ -11848,7 +11848,7 @@ function Cx({
11848
11848
  ),
11849
11849
  g.grain ? /* @__PURE__ */ n(pe, { children: [
11850
11850
  /* @__PURE__ */ e(
11851
- Ze,
11851
+ Xe,
11852
11852
  {
11853
11853
  label: "Date format",
11854
11854
  value: I.value,
@@ -11954,7 +11954,7 @@ function Cx({
11954
11954
  }
11955
11955
  ),
11956
11956
  /* @__PURE__ */ e(
11957
- Ze,
11957
+ Xe,
11958
11958
  {
11959
11959
  label: "Default expanded levels",
11960
11960
  value: String(
@@ -12010,7 +12010,7 @@ function Cx({
12010
12010
  }
12011
12011
  ),
12012
12012
  b.kind === "aggregate" && /* @__PURE__ */ e(
12013
- Ze,
12013
+ Xe,
12014
12014
  {
12015
12015
  label: "Aggregation",
12016
12016
  value: b.aggregate,
@@ -12034,7 +12034,7 @@ function Cx({
12034
12034
  t.kind === "table" && /* @__PURE__ */ n("section", { "aria-label": "Presentation", className: "space-y-2 border-b p-3", children: [
12035
12035
  /* @__PURE__ */ e("h2", { className: "text-xs font-semibold", children: "Presentation" }),
12036
12036
  /* @__PURE__ */ e(
12037
- Ze,
12037
+ Xe,
12038
12038
  {
12039
12039
  label: "Row layout",
12040
12040
  value: a.presentation.layout.kind,
@@ -12313,11 +12313,11 @@ function kx() {
12313
12313
  comparisonPresentation: { ...l, ...g }
12314
12314
  }), h = r === "kpi" && ((x = t.preferences) == null ? void 0 : x.metricPairComparisonEnabled) === !0, u = d || h;
12315
12315
  return /* @__PURE__ */ n($e, { value: "comparison", className: "border-none", children: [
12316
- /* @__PURE__ */ e(qe, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12316
+ /* @__PURE__ */ e(je, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12317
12317
  /* @__PURE__ */ e(Wp, { className: "h-3.5 w-3.5 text-foreground/60" }),
12318
12318
  /* @__PURE__ */ e("span", { children: "Comparison" })
12319
12319
  ] }) }),
12320
- /* @__PURE__ */ n(je, { className: "space-y-4 pb-4 pt-2", children: [
12320
+ /* @__PURE__ */ n(qe, { className: "space-y-4 pb-4 pt-2", children: [
12321
12321
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3", children: [
12322
12322
  /* @__PURE__ */ n("div", { children: [
12323
12323
  /* @__PURE__ */ e(_, { htmlFor: "inherit-global-date-comparison", className: "text-xs", children: "Inherit Global Date comparison" }),
@@ -12495,14 +12495,14 @@ function sc({
12495
12495
  )
12496
12496
  }
12497
12497
  });
12498
- }, q = (ae) => {
12498
+ }, j = (ae) => {
12499
12499
  const { allowViewerColumnCustomization: ue, ...oe } = i ?? {};
12500
12500
  h({
12501
12501
  ...l,
12502
12502
  // Absent means on (PLAN B4); only `false` is stored.
12503
12503
  tablePrefs: ae ? oe : { ...oe, allowViewerColumnCustomization: !1 }
12504
12504
  });
12505
- }, j = () => {
12505
+ }, q = () => {
12506
12506
  h({
12507
12507
  ...l,
12508
12508
  tablePrefs: {
@@ -12533,7 +12533,7 @@ function sc({
12533
12533
  }
12534
12534
  }
12535
12535
  });
12536
- }, Z = k ? /* @__PURE__ */ n("div", { className: "space-y-2", children: [
12536
+ }, X = k ? /* @__PURE__ */ n("div", { className: "space-y-2", children: [
12537
12537
  /* @__PURE__ */ e("div", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Comparison" }),
12538
12538
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-3", children: [
12539
12539
  /* @__PURE__ */ e(_, { htmlFor: "show-table-comparison", className: "text-xs", children: "Show comparison" }),
@@ -12588,7 +12588,7 @@ function sc({
12588
12588
  onEnabledChange: P,
12589
12589
  onStyleChange: O
12590
12590
  } : void 0,
12591
- extraSection: Z,
12591
+ extraSection: X,
12592
12592
  onReset: M ? H : void 0
12593
12593
  }
12594
12594
  ),
@@ -12606,7 +12606,7 @@ function sc({
12606
12606
  id: "allow-viewer-column-customization",
12607
12607
  size: "xs",
12608
12608
  checked: (i == null ? void 0 : i.allowViewerColumnCustomization) !== !1,
12609
- onCheckedChange: q
12609
+ onCheckedChange: j
12610
12610
  }
12611
12611
  )
12612
12612
  ] }) : null,
@@ -12616,12 +12616,12 @@ function sc({
12616
12616
  columns: g,
12617
12617
  columnVisibility: i == null ? void 0 : i.columnVisibility,
12618
12618
  onColumnVisibilityChange: $,
12619
- onShowAllColumns: j
12619
+ onShowAllColumns: q
12620
12620
  }
12621
12621
  ) : null
12622
12622
  ] }),
12623
12623
  /* @__PURE__ */ e(It, { value: "conditional-formatting", className: "mt-0", children: m === "matrixTable" ? /* @__PURE__ */ e(Or, { section: "conditional-formatting" }) : v ? A ? /* @__PURE__ */ e(
12624
- jo,
12624
+ qo,
12625
12625
  {
12626
12626
  columnId: A,
12627
12627
  availableColumns: b,
@@ -12876,18 +12876,18 @@ function Ox() {
12876
12876
  }), r = ot(), { setCardPreferences: s, updateCardInFrame: o } = Ne(), d = ee(() => r !== t.type ? { ...t, type: r } : t, [t, r]), { data: c } = xt(d), [l, i] = U({}), [h, u] = U(
12877
12877
  null
12878
12878
  ), [f, m] = U(null), p = ee(() => {
12879
- var Y, O, P, $, q, j, H;
12879
+ var Y, O, P, $, j, q, H;
12880
12880
  if (!(c != null && c.records) || c.records.length === 0) return [];
12881
12881
  const w = r === "stackedBar" || r === "stackedLine", B = r === "bar" || r === "line" || r === "horizontalBar" || r === "bullet" || r === "combo" || r === "area" || r === "stackedArea", D = ((Y = t == null ? void 0 : t.config) == null ? void 0 : Y.pivotByColumns) && t.config.pivotByColumns.length > 0;
12882
12882
  if ((w || B) && D) {
12883
12883
  if (c.pivotSchema && Array.isArray(c.pivotSchema)) {
12884
- const Z = /* @__PURE__ */ new Set();
12884
+ const X = /* @__PURE__ */ new Set();
12885
12885
  return c.pivotSchema.forEach((ie) => {
12886
- ie.alias && Z.add(ie.alias);
12887
- }), Array.from(Z);
12886
+ ie.alias && X.add(ie.alias);
12887
+ }), Array.from(X);
12888
12888
  }
12889
12889
  if (c.records.length > 0) {
12890
- const Z = c.records[0], ie = Object.keys(Z), z = /* @__PURE__ */ new Set();
12890
+ const X = c.records[0], ie = Object.keys(X), z = /* @__PURE__ */ new Set();
12891
12891
  (O = t == null ? void 0 : t.config) != null && O.groupByColumns && t.config.groupByColumns.forEach((ue) => {
12892
12892
  z.add(ue.label || ue.name), z.add(ue.alias || ue.name);
12893
12893
  });
@@ -12902,12 +12902,12 @@ function Ox() {
12902
12902
  );
12903
12903
  }
12904
12904
  }
12905
- if ((B || w) && !D && ((q = ($ = t == null ? void 0 : t.config) == null ? void 0 : $.metricColumns) != null && q.length))
12905
+ if ((B || w) && !D && ((j = ($ = t == null ? void 0 : t.config) == null ? void 0 : $.metricColumns) != null && j.length))
12906
12906
  return t.config.metricColumns.map(
12907
- (Z) => Z.alias || Z.label || Z.name
12907
+ (X) => X.alias || X.label || X.name
12908
12908
  );
12909
- if ((H = (j = t == null ? void 0 : t.config) == null ? void 0 : j.groupByColumns) != null && H.length) {
12910
- const Z = t.config.groupByColumns[0], ie = Z.label || Z.name, z = /* @__PURE__ */ new Set();
12909
+ if ((H = (q = t == null ? void 0 : t.config) == null ? void 0 : q.groupByColumns) != null && H.length) {
12910
+ const X = t.config.groupByColumns[0], ie = X.label || X.name, z = /* @__PURE__ */ new Set();
12911
12911
  return c.records.forEach((W) => {
12912
12912
  const ae = W[ie];
12913
12913
  ae != null && z.add(String(ae));
@@ -12920,7 +12920,7 @@ function Ox() {
12920
12920
  (A = t == null ? void 0 : t.config) == null ? void 0 : A.pivotByColumns,
12921
12921
  (I = t == null ? void 0 : t.config) == null ? void 0 : I.metricColumns,
12922
12922
  r
12923
- ]), x = ee(() => qu(), []);
12923
+ ]), x = ee(() => ju(), []);
12924
12924
  we(() => {
12925
12925
  const w = {};
12926
12926
  p.forEach((B, D) => {
@@ -12950,8 +12950,8 @@ function Ox() {
12950
12950
  };
12951
12951
  o(O);
12952
12952
  }, g = (w, B) => {
12953
- var q;
12954
- const D = x[B % x.length], { [w]: Y, ...O } = ((q = a == null ? void 0 : a.colorConfig) == null ? void 0 : q.segments) || {}, P = {
12953
+ var j;
12954
+ const D = x[B % x.length], { [w]: Y, ...O } = ((j = a == null ? void 0 : a.colorConfig) == null ? void 0 : j.segments) || {}, P = {
12955
12955
  ...a || {},
12956
12956
  colorConfig: {
12957
12957
  segments: O
@@ -12962,8 +12962,8 @@ function Ox() {
12962
12962
  ...t,
12963
12963
  preferences: P
12964
12964
  };
12965
- o($), i((j) => ({
12966
- ...j,
12965
+ o($), i((q) => ({
12966
+ ...q,
12967
12967
  [w]: D
12968
12968
  }));
12969
12969
  };
@@ -12988,11 +12988,11 @@ function Ox() {
12988
12988
  }), i(D);
12989
12989
  }, S = Object.keys(((V = a == null ? void 0 : a.colorConfig) == null ? void 0 : V.segments) || {}).length > 0;
12990
12990
  return /* @__PURE__ */ n($e, { value: "colors", className: "border-b-0", children: [
12991
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12992
- /* @__PURE__ */ e(qp, { className: "h-4 w-4 text-muted-foreground" }),
12991
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12992
+ /* @__PURE__ */ e(jp, { className: "h-4 w-4 text-muted-foreground" }),
12993
12993
  /* @__PURE__ */ e("span", { children: "Colors" })
12994
12994
  ] }) }),
12995
- /* @__PURE__ */ e(je, { className: "", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
12995
+ /* @__PURE__ */ e(qe, { className: "", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
12996
12996
  /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: S && /* @__PURE__ */ n(
12997
12997
  "button",
12998
12998
  {
@@ -13005,7 +13005,7 @@ function Ox() {
13005
13005
  }
13006
13006
  ) }) }),
13007
13007
  /* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: p.map((w, B) => {
13008
- const D = ju(l[w], B), Y = !D;
13008
+ const D = qu(l[w], B), Y = !D;
13009
13009
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13010
13010
  /* @__PURE__ */ n(
13011
13011
  bt,
@@ -13223,7 +13223,7 @@ function mr({ axis: t, label: a, type: r, config: s, onChange: o, defaultTitle:
13223
13223
  }, m = t === "x" ? ["auto", "top", "bottom"] : ["auto", "left", "right"], p = ["auto", "0", "45", "90", "-45", "-90"];
13224
13224
  return /* @__PURE__ */ n($e, { value: `${t}-axis`, className: "border-b-0", children: [
13225
13225
  /* @__PURE__ */ n("div", { className: "flex w-full items-center justify-between gap-2", children: [
13226
- /* @__PURE__ */ e(qe, { className: "flex grow items-center justify-between gap-3 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ e("div", { className: "flex grow items-center justify-between gap-2", children: /* @__PURE__ */ e("span", { children: a }) }) }),
13226
+ /* @__PURE__ */ e(je, { className: "flex grow items-center justify-between gap-3 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ e("div", { className: "flex grow items-center justify-between gap-2", children: /* @__PURE__ */ e("span", { children: a }) }) }),
13227
13227
  /* @__PURE__ */ e(
13228
13228
  Ee,
13229
13229
  {
@@ -13234,7 +13234,7 @@ function mr({ axis: t, label: a, type: r, config: s, onChange: o, defaultTitle:
13234
13234
  }
13235
13235
  )
13236
13236
  ] }),
13237
- /* @__PURE__ */ n(je, { className: "space-y-4 pt-2", children: [
13237
+ /* @__PURE__ */ n(qe, { className: "space-y-4 pt-2", children: [
13238
13238
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
13239
13239
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13240
13240
  /* @__PURE__ */ e(
@@ -13471,11 +13471,11 @@ function Ax() {
13471
13471
  s(m);
13472
13472
  }, l = d.hasY2Axis && o === "combo";
13473
13473
  return /* @__PURE__ */ n($e, { value: "axes", className: "border-b-0", children: [
13474
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13474
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13475
13475
  /* @__PURE__ */ e(wn, { className: "h-4 w-4 text-muted-foreground" }),
13476
13476
  /* @__PURE__ */ e("span", { children: "Axes" })
13477
13477
  ] }) }),
13478
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ n(Rn, { type: "single", collapsible: !0, className: "w-full", children: [
13478
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ n(Rn, { type: "single", collapsible: !0, className: "w-full", children: [
13479
13479
  d.hasXAxis && /* @__PURE__ */ e(
13480
13480
  mr,
13481
13481
  {
@@ -13539,11 +13539,11 @@ function Rx() {
13539
13539
  s(p);
13540
13540
  }, h = ["top", "bottom", "left", "right"], u = ["start", "center", "end"];
13541
13541
  return /* @__PURE__ */ n($e, { value: "legend", className: "border-b-0", children: [
13542
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13543
- /* @__PURE__ */ e(Zp, { className: "h-4 w-4 text-muted-foreground" }),
13542
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13543
+ /* @__PURE__ */ e(Xp, { className: "h-4 w-4 text-muted-foreground" }),
13544
13544
  /* @__PURE__ */ e("span", { children: "Legend" })
13545
13545
  ] }) }),
13546
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
13546
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
13547
13547
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
13548
13548
  /* @__PURE__ */ e(_, { className: "text-xs font-medium", children: "Display" }),
13549
13549
  /* @__PURE__ */ e(
@@ -13592,8 +13592,8 @@ function Px() {
13592
13592
  var k, V, w, B, D, Y, O;
13593
13593
  const t = R((P) => P.card), a = ot(), r = R(
13594
13594
  (P) => {
13595
- var $, q;
13596
- return (q = ($ = P.card) == null ? void 0 : $.preferences) == null ? void 0 : q.dataLabelsConfig;
13595
+ var $, j;
13596
+ return (j = ($ = P.card) == null ? void 0 : $.preferences) == null ? void 0 : j.dataLabelsConfig;
13597
13597
  }
13598
13598
  ), s = R((P) => {
13599
13599
  var $;
@@ -13611,32 +13611,32 @@ function Px() {
13611
13611
  [P]: $
13612
13612
  };
13613
13613
  P === "enabled" && (H.display = $, $ && u && !H.position && (H.position = "bottom")), P === "position" && u && (H.position = "bottom"), P === "formatMode" && $ === "inherit" && (H.format = void 0, H.formatOptions = void 0);
13614
- const Z = {
13614
+ const X = {
13615
13615
  ...t.preferences || {},
13616
13616
  dataLabelsConfig: H
13617
13617
  };
13618
- o(Z);
13618
+ o(X);
13619
13619
  const ie = {
13620
13620
  ...t,
13621
- preferences: Z
13621
+ preferences: X
13622
13622
  };
13623
13623
  d(ie);
13624
13624
  }, M = (P, $) => {
13625
- const q = r ?? {}, H = {
13625
+ const j = r ?? {}, H = {
13626
13626
  ...p ?? {},
13627
- ...q,
13627
+ ...j,
13628
13628
  font: {
13629
- ...q.font || {},
13629
+ ...j.font || {},
13630
13630
  [P]: $
13631
13631
  }
13632
- }, Z = {
13632
+ }, X = {
13633
13633
  ...t.preferences || {},
13634
13634
  dataLabelsConfig: H
13635
13635
  };
13636
- o(Z);
13636
+ o(X);
13637
13637
  const ie = {
13638
13638
  ...t,
13639
- preferences: Z
13639
+ preferences: X
13640
13640
  };
13641
13641
  d(ie);
13642
13642
  }, T = () => {
@@ -13651,15 +13651,15 @@ function Px() {
13651
13651
  I = ["center"];
13652
13652
  else {
13653
13653
  const P = l ? ["center", "left", "right"] : ["center", "top", "bottom"];
13654
- I = ["auto", ...a === "bullet" ? P : P.filter((q) => q !== A), "custom"];
13654
+ I = ["auto", ...a === "bullet" ? P : P.filter((j) => j !== A), "custom"];
13655
13655
  }
13656
13656
  const F = () => wt(A), y = ["center", "start", "end"], N = ["center", "start", "end", "top", "bottom"], C = (x == null ? void 0 : x.formatMode) || (x != null && x.format && !["auto"].includes(x.format) ? "override" : "inherit"), E = (x == null ? void 0 : x.format) === "none";
13657
13657
  return /* @__PURE__ */ n($e, { value: "data-labels", className: "border-b-0", children: [
13658
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13658
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13659
13659
  /* @__PURE__ */ e(lf, { className: "h-4 w-4 text-muted-foreground" }),
13660
13660
  /* @__PURE__ */ e("span", { children: "Data Labels" })
13661
13661
  ] }) }),
13662
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
13662
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
13663
13663
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
13664
13664
  /* @__PURE__ */ e(_, { className: "text-xs font-medium", children: "Display" }),
13665
13665
  /* @__PURE__ */ e(
@@ -13754,7 +13754,7 @@ function Px() {
13754
13754
  size: "sm",
13755
13755
  checked: E,
13756
13756
  onCheckedChange: (P) => {
13757
- const $ = r ?? {}, j = {
13757
+ const $ = r ?? {}, q = {
13758
13758
  ...p ?? {},
13759
13759
  ...$,
13760
13760
  formatMode: "override",
@@ -13762,7 +13762,7 @@ function Px() {
13762
13762
  formatOptions: P ? void 0 : $.formatOptions
13763
13763
  }, H = {
13764
13764
  ...t.preferences || {},
13765
- dataLabelsConfig: j
13765
+ dataLabelsConfig: q
13766
13766
  };
13767
13767
  o(H), d({
13768
13768
  ...t,
@@ -13777,7 +13777,7 @@ function Px() {
13777
13777
  {
13778
13778
  formatOptions: (x == null ? void 0 : x.formatOptions) || {},
13779
13779
  onFormatOptionsChange: (P) => {
13780
- const j = {
13780
+ const q = {
13781
13781
  ...p ?? {},
13782
13782
  ...r ?? {},
13783
13783
  formatMode: "override",
@@ -13785,7 +13785,7 @@ function Px() {
13785
13785
  formatOptions: P
13786
13786
  }, H = {
13787
13787
  ...t.preferences || {},
13788
- dataLabelsConfig: j
13788
+ dataLabelsConfig: q
13789
13789
  };
13790
13790
  o(H), d({
13791
13791
  ...t,
@@ -13889,11 +13889,11 @@ function Lx() {
13889
13889
  r(l);
13890
13890
  };
13891
13891
  return /* @__PURE__ */ n($e, { value: "treemap-color-mode", className: "border-none", children: [
13892
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13892
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13893
13893
  /* @__PURE__ */ e(Oo, { className: "h-4 w-4 text-muted-foreground" }),
13894
13894
  /* @__PURE__ */ e("span", { children: "Treemap Colors" })
13895
13895
  ] }) }),
13896
- /* @__PURE__ */ e(je, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ n(
13896
+ /* @__PURE__ */ e(qe, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ n(
13897
13897
  Hr,
13898
13898
  {
13899
13899
  value: s,
@@ -13938,19 +13938,19 @@ function _x() {
13938
13938
  const t = R((m) => m.card), a = R((m) => {
13939
13939
  var p;
13940
13940
  return (p = m.card) == null ? void 0 : p.preferences;
13941
- }), { setCardPreferences: r } = Ne(), s = (t == null ? void 0 : t.type) === "heatmap", o = (a == null ? void 0 : a.heatmapConfig) || {}, d = o.colorPalette ?? "green", c = o.legendPosition ?? "bottom", l = ee(() => o.colorRange && o.colorRange[0] && o.colorRange[1] ? [o.colorRange[0], o.colorRange[1]] : [...Zn], [o.colorRange]), i = (m) => {
13941
+ }), { setCardPreferences: r } = Ne(), s = (t == null ? void 0 : t.type) === "heatmap", o = (a == null ? void 0 : a.heatmapConfig) || {}, d = o.colorPalette ?? "green", c = o.legendPosition ?? "bottom", l = ee(() => o.colorRange && o.colorRange[0] && o.colorRange[1] ? [o.colorRange[0], o.colorRange[1]] : [...Xn], [o.colorRange]), i = (m) => {
13942
13942
  const p = {
13943
13943
  ...o,
13944
13944
  ...m
13945
13945
  };
13946
- p.colorPalette !== "custom" ? delete p.colorRange : (!p.colorRange || !p.colorRange[0] || !p.colorRange[1]) && (p.colorRange = [...Zn]), r({
13946
+ p.colorPalette !== "custom" ? delete p.colorRange : (!p.colorRange || !p.colorRange[0] || !p.colorRange[1]) && (p.colorRange = [...Xn]), r({
13947
13947
  ...a || {},
13948
13948
  heatmapConfig: p
13949
13949
  });
13950
13950
  }, h = (m) => {
13951
13951
  i({
13952
13952
  colorPalette: m,
13953
- colorRange: m === "custom" ? o.colorRange ?? [...Zn] : void 0
13953
+ colorRange: m === "custom" ? o.colorRange ?? [...Xn] : void 0
13954
13954
  });
13955
13955
  }, u = (m, p) => {
13956
13956
  const x = [...l];
@@ -13962,11 +13962,11 @@ function _x() {
13962
13962
  i({ legendPosition: m });
13963
13963
  };
13964
13964
  return s ? /* @__PURE__ */ n($e, { value: "heatmap-color-config", className: "border-none", children: [
13965
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13965
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
13966
13966
  /* @__PURE__ */ e(vn, { className: "h-4 w-4 text-muted-foreground" }),
13967
13967
  /* @__PURE__ */ e("span", { children: "Heatmap Settings" })
13968
13968
  ] }) }),
13969
- /* @__PURE__ */ n(je, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
13969
+ /* @__PURE__ */ n(qe, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
13970
13970
  /* @__PURE__ */ n(
13971
13971
  Hr,
13972
13972
  {
@@ -14103,21 +14103,21 @@ function Vx() {
14103
14103
  })) || [];
14104
14104
  }, [(k = a == null ? void 0 : a.config) == null ? void 0 : k.metricColumns]);
14105
14105
  we(() => {
14106
- var q, j;
14106
+ var j, q;
14107
14107
  if (!t || g.length === 0)
14108
14108
  return;
14109
14109
  const w = {};
14110
14110
  let B = !1;
14111
- const D = (q = g[1]) == null ? void 0 : q.value;
14111
+ const D = (j = g[1]) == null ? void 0 : j.value;
14112
14112
  !d.targetMetricKey && D && (w.targetMetricKey = D, B = !0);
14113
- const Y = (j = g[2]) == null ? void 0 : j.value;
14113
+ const Y = (q = g[2]) == null ? void 0 : q.value;
14114
14114
  !d.comparativeMetricKey && !d.disableAutoComparative && Y && (w.comparativeMetricKey = Y, B = !0);
14115
14115
  const O = g.slice(3), P = {
14116
14116
  ...d.rangeKeys || {}
14117
14117
  };
14118
14118
  let $ = !1;
14119
- if (ro.forEach((H, Z) => {
14120
- !P[H] && O[Z] && (P[H] = O[Z].value, $ = !0);
14119
+ if (ro.forEach((H, X) => {
14120
+ !P[H] && O[X] && (P[H] = O[X].value, $ = !0);
14121
14121
  }), $ && (w.rangeKeys = P, B = !0, d.showRanges === void 0 && (w.showRanges = !0)), B) {
14122
14122
  const H = so({
14123
14123
  ...d,
@@ -14206,11 +14206,11 @@ function Vx() {
14206
14206
  }
14207
14207
  };
14208
14208
  return /* @__PURE__ */ n($e, { value: "bullet-config", className: "border-b-0", children: [
14209
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14209
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14210
14210
  /* @__PURE__ */ e(Io, { className: "h-4 w-4 text-muted-foreground" }),
14211
14211
  /* @__PURE__ */ e("span", { children: "Bullet Chart" })
14212
14212
  ] }) }),
14213
- /* @__PURE__ */ n(je, { className: "space-y-6 border-t border-border/50 py-4", children: [
14213
+ /* @__PURE__ */ n(qe, { className: "space-y-6 border-t border-border/50 py-4", children: [
14214
14214
  /* @__PURE__ */ n("section", { className: "space-y-4", children: [
14215
14215
  /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
14216
14216
  /* @__PURE__ */ e(_, { className: "text-xs font-medium", children: "ORIENTATION" }),
@@ -14511,14 +14511,14 @@ function Bx() {
14511
14511
  });
14512
14512
  };
14513
14513
  return !c && !l ? null : /* @__PURE__ */ n($e, { value: "bubble-scatter-config", children: [
14514
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14514
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14515
14515
  /* @__PURE__ */ e(c ? Ju : Ao, { className: "h-3.5 w-3.5 text-foreground/60" }),
14516
14516
  /* @__PURE__ */ n("span", { children: [
14517
14517
  c ? "Bubble" : "Scatter",
14518
14518
  " Configuration"
14519
14519
  ] })
14520
14520
  ] }) }),
14521
- /* @__PURE__ */ n(je, { className: "space-y-4 px-1 pb-4", children: [
14521
+ /* @__PURE__ */ n(qe, { className: "space-y-4 px-1 pb-4", children: [
14522
14522
  /* @__PURE__ */ n("div", { className: "space-y-3", children: [
14523
14523
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
14524
14524
  "Dimensions",
@@ -14747,7 +14747,7 @@ function Bx() {
14747
14747
  size: "sm",
14748
14748
  checked: ((N = (y = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : y.name) == null ? void 0 : N.enabled) ?? !1,
14749
14749
  onCheckedChange: (D) => {
14750
- var P, $, q, j;
14750
+ var P, $, j, q;
14751
14751
  const Y = i.xMetricKey || "X Axis", O = i.yMetricKey || "Y Axis";
14752
14752
  v({
14753
14753
  ...t ?? {},
@@ -14762,7 +14762,7 @@ function Bx() {
14762
14762
  ...t == null ? void 0 : t.yAxisConfig,
14763
14763
  name: {
14764
14764
  enabled: D,
14765
- text: ((j = (q = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : q.name) == null ? void 0 : j.text) || O
14765
+ text: ((q = (j = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : j.name) == null ? void 0 : q.text) || O
14766
14766
  }
14767
14767
  }
14768
14768
  });
@@ -14838,7 +14838,7 @@ const $x = [
14838
14838
  description: "First stage = 100%, others relative to first stage"
14839
14839
  }
14840
14840
  ];
14841
- function qx() {
14841
+ function jx() {
14842
14842
  const t = R((m) => m.card), a = R((m) => {
14843
14843
  var p;
14844
14844
  return (p = m.card) == null ? void 0 : p.preferences;
@@ -14859,11 +14859,11 @@ function qx() {
14859
14859
  i({ labelThreshold: m[0] });
14860
14860
  };
14861
14861
  return s ? /* @__PURE__ */ n($e, { value: "funnel-config", className: "border-none", children: [
14862
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14862
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14863
14863
  /* @__PURE__ */ e(Da, { className: "h-4 w-4 text-muted-foreground" }),
14864
14864
  /* @__PURE__ */ e("span", { children: "Funnel Settings" })
14865
14865
  ] }) }),
14866
- /* @__PURE__ */ n(je, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
14866
+ /* @__PURE__ */ n(qe, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
14867
14867
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
14868
14868
  /* @__PURE__ */ e(_, { className: "text-xs font-medium", children: "PERCENTAGE MODE" }),
14869
14869
  /* @__PURE__ */ e(
@@ -14952,7 +14952,7 @@ function Vn() {
14952
14952
  var c, l;
14953
14953
  const t = R((i) => i.card), { data: a, comparisonMetadata: r } = xt(t), s = (a == null ? void 0 : a.records) || [], { keys: o } = No(s, r), d = o.slice(1).filter((i) => !_h.includes(i));
14954
14954
  if (Qu(t.type)) {
14955
- const i = t.config, h = (c = i == null ? void 0 : i.pivotByColumns) != null && c.length && ((l = i == null ? void 0 : i.groupByColumns) != null && l.length) ? Wu(s, i.metricColumns || []) : s, u = Zu({
14955
+ const i = t.config, h = (c = i == null ? void 0 : i.pivotByColumns) != null && c.length && ((l = i == null ? void 0 : i.groupByColumns) != null && l.length) ? Wu(s, i.metricColumns || []) : s, u = Xu({
14956
14956
  card: t,
14957
14957
  cardType: t.type,
14958
14958
  records: h,
@@ -14973,7 +14973,7 @@ function Vn() {
14973
14973
  defaultMetricKeys: d
14974
14974
  };
14975
14975
  }
14976
- const jx = [
14976
+ const qx = [
14977
14977
  { value: "USD", label: "USD - US Dollar" },
14978
14978
  { value: "EUR", label: "EUR - Euro" },
14979
14979
  { value: "GBP", label: "GBP - British Pound" },
@@ -15110,7 +15110,7 @@ function Bn({
15110
15110
  onValueChange: (S) => u("currency", S),
15111
15111
  children: [
15112
15112
  /* @__PURE__ */ e(re, { className: "h-7 w-28 text-xs", children: /* @__PURE__ */ e(se, {}) }),
15113
- /* @__PURE__ */ e(le, { children: jx.map((S) => /* @__PURE__ */ e(
15113
+ /* @__PURE__ */ e(le, { children: qx.map((S) => /* @__PURE__ */ e(
15114
15114
  K,
15115
15115
  {
15116
15116
  value: S.value,
@@ -15254,18 +15254,18 @@ function Wx() {
15254
15254
  var r;
15255
15255
  return (r = a.card) == null ? void 0 : r.type;
15256
15256
  }) !== "combo" ? null : /* @__PURE__ */ n($e, { value: "combo-series", className: "border-b-0", children: [
15257
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15257
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15258
15258
  /* @__PURE__ */ e(en, { className: "h-4 w-4 text-muted-foreground" }),
15259
15259
  /* @__PURE__ */ e("span", { children: "Series" })
15260
15260
  ] }) }),
15261
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ e(Zx, {}) })
15261
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ e(Xx, {}) })
15262
15262
  ] });
15263
15263
  }
15264
- function Zx() {
15264
+ function Xx() {
15265
15265
  const { transformedMetricKeys: t } = Vn();
15266
- return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Xx, { metricKey: a, idx: r }, a)) });
15266
+ return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Zx, { metricKey: a, idx: r }, a)) });
15267
15267
  }
15268
- function Xx({ metricKey: t, idx: a }) {
15268
+ function Zx({ metricKey: t, idx: a }) {
15269
15269
  var v;
15270
15270
  const [r, s] = U(!1), o = R((M) => {
15271
15271
  var T;
@@ -15526,11 +15526,11 @@ function rb() {
15526
15526
  return (r = a.card) == null ? void 0 : r.type;
15527
15527
  });
15528
15528
  return t !== "area" && t !== "stackedArea" ? null : /* @__PURE__ */ n($e, { value: "area-series", className: "border-b-0", children: [
15529
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15529
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15530
15530
  /* @__PURE__ */ e(en, { className: "h-4 w-4 text-muted-foreground" }),
15531
15531
  /* @__PURE__ */ e("span", { children: "Series" })
15532
15532
  ] }) }),
15533
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ e(sb, {}) })
15533
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ e(sb, {}) })
15534
15534
  ] });
15535
15535
  }
15536
15536
  function sb() {
@@ -15756,11 +15756,11 @@ function cb() {
15756
15756
  var r;
15757
15757
  return (r = a.card) == null ? void 0 : r.type;
15758
15758
  }) !== "line" ? null : /* @__PURE__ */ n($e, { value: "line-series", className: "border-b-0", children: [
15759
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15759
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15760
15760
  /* @__PURE__ */ e(en, { className: "h-4 w-4 text-muted-foreground" }),
15761
15761
  /* @__PURE__ */ e("span", { children: "Series" })
15762
15762
  ] }) }),
15763
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ e(db, {}) })
15763
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ e(db, {}) })
15764
15764
  ] });
15765
15765
  }
15766
15766
  function db() {
@@ -15948,11 +15948,11 @@ function hb() {
15948
15948
  return (r = a.card) == null ? void 0 : r.type;
15949
15949
  });
15950
15950
  return !t || !["bar", "horizontalBar", "stackedBar"].includes(t) ? null : /* @__PURE__ */ n($e, { value: "bar-series", className: "border-b-0", children: [
15951
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15951
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
15952
15952
  /* @__PURE__ */ e(en, { className: "h-4 w-4 text-muted-foreground" }),
15953
15953
  /* @__PURE__ */ e("span", { children: "Series" })
15954
15954
  ] }) }),
15955
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ e(pb, {}) })
15955
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ e(pb, {}) })
15956
15956
  ] });
15957
15957
  }
15958
15958
  function pb() {
@@ -16125,11 +16125,11 @@ function vb() {
16125
16125
  o(h), d({ ...t, preferences: h });
16126
16126
  };
16127
16127
  return /* @__PURE__ */ n($e, { value: "line-style", className: "border-b-0", children: [
16128
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16128
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16129
16129
  /* @__PURE__ */ e(rf, { className: "h-4 w-4 text-muted-foreground" }),
16130
16130
  /* @__PURE__ */ e("span", { children: "Line Style" })
16131
16131
  ] }) }),
16132
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
16132
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
16133
16133
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Default styles for all series. Override per-series in the Series section." }),
16134
16134
  /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
16135
16135
  /* @__PURE__ */ e(_, { className: "text-xs font-medium", children: "Line Pattern" }),
@@ -16217,11 +16217,11 @@ function wb() {
16217
16217
  o(h), d({ ...t, preferences: h });
16218
16218
  };
16219
16219
  return /* @__PURE__ */ n($e, { value: "bar-style", className: "border-b-0", children: [
16220
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16220
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16221
16221
  /* @__PURE__ */ e(ii, { className: "h-4 w-4 text-muted-foreground" }),
16222
16222
  /* @__PURE__ */ e("span", { children: "Bar Style" })
16223
16223
  ] }) }),
16224
- /* @__PURE__ */ e(je, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
16224
+ /* @__PURE__ */ e(qe, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
16225
16225
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Default styles for all bars. Override per-series in the Series section." }),
16226
16226
  /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
16227
16227
  /* @__PURE__ */ e(_, { className: "text-xs font-medium", children: "Corner Radius" }),
@@ -16284,11 +16284,11 @@ function Sb() {
16284
16284
  }
16285
16285
  ), { setSortChart: a } = Ne();
16286
16286
  return /* @__PURE__ */ n($e, { value: "stacked-sort", children: [
16287
- /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16287
+ /* @__PURE__ */ e(je, { children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16288
16288
  /* @__PURE__ */ e(Di, { className: "h-3.5 w-3.5 text-foreground/60" }),
16289
16289
  "Sort"
16290
16290
  ] }) }),
16291
- /* @__PURE__ */ e(je, { className: "space-y-4 px-1", children: /* @__PURE__ */ n("div", { className: "space-y-2", children: [
16291
+ /* @__PURE__ */ e(qe, { className: "space-y-4 px-1", children: /* @__PURE__ */ n("div", { className: "space-y-2", children: [
16292
16292
  /* @__PURE__ */ e(_, { children: "Sort Order" }),
16293
16293
  /* @__PURE__ */ e(
16294
16294
  zt,
@@ -16359,7 +16359,7 @@ function Mb() {
16359
16359
  });
16360
16360
  };
16361
16361
  return /* @__PURE__ */ n($e, { value: "summary", className: "border-none", children: [
16362
- /* @__PURE__ */ n(qe, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: [
16362
+ /* @__PURE__ */ n(je, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: [
16363
16363
  /* @__PURE__ */ n("div", { className: "flex flex-1 items-center gap-2", children: [
16364
16364
  /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5 text-foreground/60" }),
16365
16365
  /* @__PURE__ */ e("span", { children: "Summary" })
@@ -16391,7 +16391,7 @@ function Mb() {
16391
16391
  }
16392
16392
  )
16393
16393
  ] }),
16394
- /* @__PURE__ */ e(je, { className: "pb-4 pt-2", children: /* @__PURE__ */ n(
16394
+ /* @__PURE__ */ e(qe, { className: "pb-4 pt-2", children: /* @__PURE__ */ n(
16395
16395
  "div",
16396
16396
  {
16397
16397
  className: G(
@@ -16522,11 +16522,11 @@ function Eb() {
16522
16522
  });
16523
16523
  };
16524
16524
  return /* @__PURE__ */ n($e, { value: "tooltip-format", className: "border-b-0", children: [
16525
- /* @__PURE__ */ e(qe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16525
+ /* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
16526
16526
  /* @__PURE__ */ e(Ma, { className: "h-3.5 w-3.5 text-foreground/60" }),
16527
16527
  /* @__PURE__ */ e("span", { children: "Tooltip Format" })
16528
16528
  ] }) }),
16529
- /* @__PURE__ */ n(je, { className: "space-y-4 pt-2", children: [
16529
+ /* @__PURE__ */ n(qe, { className: "space-y-4 pt-2", children: [
16530
16530
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
16531
16531
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
16532
16532
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Override metric format" }),
@@ -16576,7 +16576,7 @@ function lc({ mode: t }) {
16576
16576
  t === "config" && /* @__PURE__ */ e(Mb, {}),
16577
16577
  /* @__PURE__ */ e(_x, {}),
16578
16578
  a === "bullet" && /* @__PURE__ */ e(Vx, {}),
16579
- a === "funnel" && /* @__PURE__ */ e(qx, {}),
16579
+ a === "funnel" && /* @__PURE__ */ e(jx, {}),
16580
16580
  (a === "bubble" || a === "scatter") && /* @__PURE__ */ e(Bx, {}),
16581
16581
  (a === "stackedBar" || a === "stackedLine") && /* @__PURE__ */ e(Sb, {}),
16582
16582
  /* @__PURE__ */ e(Ox, {}),
@@ -16614,7 +16614,7 @@ function Ob({
16614
16614
  case "map":
16615
16615
  return /* @__PURE__ */ e(xx, {});
16616
16616
  case "custom":
16617
- return /* @__PURE__ */ e("div", { className: "px-6 py-2", children: /* @__PURE__ */ e(Xi, {}) });
16617
+ return /* @__PURE__ */ e("div", { className: "px-6 py-2", children: /* @__PURE__ */ e(Zi, {}) });
16618
16618
  case "text":
16619
16619
  return /* @__PURE__ */ e(Dx, {});
16620
16620
  default:
@@ -16742,7 +16742,7 @@ function oc({
16742
16742
  listeners: x,
16743
16743
  setNodeRef: b,
16744
16744
  isDragging: g
16745
- } = Xu({
16745
+ } = Zu({
16746
16746
  id: em(t),
16747
16747
  data: { origin: r, field: a }
16748
16748
  }), { setNodeRef: v } = Go({
@@ -17178,7 +17178,7 @@ function Bb({ idx: t }) {
17178
17178
  (i) => i.actions.setCardPreferences
17179
17179
  ), o = (l = a == null ? void 0 : a.chartOptions) == null ? void 0 : l.indexAxis, d = r == null ? void 0 : r.find((i) => i.idx === t);
17180
17180
  function c(i, h) {
17181
- (i === "end" || i === "start") && qh(jh());
17181
+ (i === "end" || i === "start") && jh(qh());
17182
17182
  const u = {
17183
17183
  display: i !== "none",
17184
17184
  align: i,
@@ -17225,7 +17225,7 @@ function Bb({ idx: t }) {
17225
17225
  onClick: () => c("start", t),
17226
17226
  className: "h-7 p-1 text-xs font-normal",
17227
17227
  children: /* @__PURE__ */ e(
17228
- Xp,
17228
+ Zp,
17229
17229
  {
17230
17230
  className: G("h-4 w-4", {
17231
17231
  "rotate-90": o === "y"
@@ -17270,7 +17270,7 @@ function Bb({ idx: t }) {
17270
17270
  function $b(t, a = 30) {
17271
17271
  return t.length > a ? t.slice(0, a) + "..." : t;
17272
17272
  }
17273
- function qb({
17273
+ function jb({
17274
17274
  col: t,
17275
17275
  idx: a,
17276
17276
  className: r,
@@ -17357,7 +17357,7 @@ function qb({
17357
17357
  }
17358
17358
  );
17359
17359
  }
17360
- function jb() {
17360
+ function qb() {
17361
17361
  const t = R((l) => l.card.type), a = R((l) => l.isDevMode), r = R((l) => l.card.preferences), { setCardPreferences: s } = R((l) => l.actions);
17362
17362
  function o(l) {
17363
17363
  var u;
@@ -17438,12 +17438,12 @@ function Kb({
17438
17438
  (i) => i === t.label || i === t.name
17439
17439
  ), d = o ? s.indexOf(o) : -1;
17440
17440
  function c() {
17441
- return /* @__PURE__ */ e("div", { className: "pr-1", children: o && /* @__PURE__ */ e(qb, { idx: d, col: o, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
17441
+ return /* @__PURE__ */ e("div", { className: "pr-1", children: o && /* @__PURE__ */ e(jb, { idx: d, col: o, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
17442
17442
  }
17443
17443
  function l() {
17444
17444
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17445
17445
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Data Labels" }),
17446
- /* @__PURE__ */ e(jb, {})
17446
+ /* @__PURE__ */ e(qb, {})
17447
17447
  ] });
17448
17448
  }
17449
17449
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
@@ -17628,7 +17628,7 @@ function Gb({
17628
17628
  return we(() => {
17629
17629
  t && M();
17630
17630
  }, [t, c, o]), /* @__PURE__ */ e(Bt, { open: t, onOpenChange: a, children: /* @__PURE__ */ n($t, { className: "max-w-2xl", children: [
17631
- /* @__PURE__ */ e(la, { children: /* @__PURE__ */ e(qt, { children: c ? `Edit Filter: ${f.field ? Sa(f.field) : ""}` : l === "fields" ? "Select Field to Filter" : `Select Values for ${f.field ? Sa(f.field) : ""}` }) }),
17631
+ /* @__PURE__ */ e(la, { children: /* @__PURE__ */ e(jt, { children: c ? `Edit Filter: ${f.field ? Sa(f.field) : ""}` : l === "fields" ? "Select Field to Filter" : `Select Values for ${f.field ? Sa(f.field) : ""}` }) }),
17632
17632
  /* @__PURE__ */ n("div", { className: "space-y-4", children: [
17633
17633
  !c && (s == null ? void 0 : s.conditions) && s.conditions.length > 0 && l === "fields" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
17634
17634
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Current Filters:" }),
@@ -17718,7 +17718,7 @@ function Hb({
17718
17718
  ] })
17719
17719
  ] }),
17720
17720
  /* @__PURE__ */ n("div", { className: "relative", children: [
17721
- /* @__PURE__ */ e(Zr, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
17721
+ /* @__PURE__ */ e(Xr, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
17722
17722
  /* @__PURE__ */ e(
17723
17723
  De,
17724
17724
  {
@@ -17778,7 +17778,7 @@ function Wb({
17778
17778
  hasPivotColumns: d = !1,
17779
17779
  cardType: c
17780
17780
  }) {
17781
- var Vs, Bs, $s, qs, js, Ks, zs, Us, Gs, Hs, Js, Qs, Ws, Zs, Xs, el, tl, al, nl, rl, sl, ll, ol, il, cl, dl, ul, ml, hl, pl, fl, gl, xl;
17781
+ var Vs, Bs, $s, js, qs, Ks, zs, Us, Gs, Hs, Js, Qs, Ws, Xs, Zs, el, tl, al, nl, rl, sl, ll, ol, il, cl, dl, ul, ml, hl, pl, fl, gl, xl;
17782
17782
  const l = R((J) => J.card), i = R((J) => J.frame), h = xe((J) => J.isVisualEditing), u = xe((J) => J.selectedSheetId), f = xe(
17783
17783
  (J) => J.actions.updateSheetCalculatedFields
17784
17784
  ), m = xe(
@@ -17808,10 +17808,10 @@ function Wb({
17808
17808
  removeField: O,
17809
17809
  handleMetricComparisonChange: P,
17810
17810
  handleMetricComparisonSpecChange: $,
17811
- handleMetricComparisonPolarityChange: q,
17812
- handleMetricWindowTransformChange: j,
17811
+ handleMetricComparisonPolarityChange: j,
17812
+ handleMetricWindowTransformChange: q,
17813
17813
  handleMetricWindowOrderByChange: H,
17814
- handleMetricWindowDirectionChange: Z,
17814
+ handleMetricWindowDirectionChange: X,
17815
17815
  handleMetricWindowPartitionToggle: ie,
17816
17816
  handleMetricMovingAverageWindowSizeChange: z,
17817
17817
  handleMetricMovingAverageMinPeriodsChange: W,
@@ -17823,15 +17823,15 @@ function Wb({
17823
17823
  var J;
17824
17824
  return !!((J = t.parameters) != null && J.windowTransform);
17825
17825
  }), [Le, Ye] = U(!1), [ye, _e] = U(!1), [Qe, Ve] = U(null), ft = ee(() => {
17826
- const J = (de) => de != null && de.startsWith("card-source-") ? de.replace("card-source-", "") : de, Te = J(t.id), X = b.find((de) => {
17826
+ const J = (de) => de != null && de.startsWith("card-source-") ? de.replace("card-source-", "") : de, Te = J(t.id), Z = b.find((de) => {
17827
17827
  if (t.qualifiedFieldName && de.qualifiedFieldName && de.qualifiedFieldName === t.qualifiedFieldName || t.qualifiedEntityName && de.qualifiedEntityName && de.qualifiedEntityName === t.qualifiedEntityName && de.name === t.name)
17828
17828
  return !0;
17829
17829
  const Ce = J(de.id);
17830
17830
  return !!(Te && Ce && Te === Ce);
17831
17831
  });
17832
17832
  return {
17833
- dataType: (X == null ? void 0 : X.dataType) || t.dataType,
17834
- resolvedFromScopedField: !!X
17833
+ dataType: (Z == null ? void 0 : Z.dataType) || t.dataType,
17834
+ resolvedFromScopedField: !!Z
17835
17835
  };
17836
17836
  }, [
17837
17837
  t.dataType,
@@ -17840,7 +17840,7 @@ function Wb({
17840
17840
  t.qualifiedEntityName,
17841
17841
  t.qualifiedFieldName,
17842
17842
  b
17843
- ]), Xe = qo(
17843
+ ]), Ze = jo(
17844
17844
  ft.dataType
17845
17845
  ), ce = ee(
17846
17846
  () => Kh({
@@ -17861,7 +17861,7 @@ function Wb({
17861
17861
  t.granularity,
17862
17862
  t.semanticTemporalPresentation
17863
17863
  ]
17864
- ), ke = a === "groupBy" ? ce.ok && Xe.includes(ce.granularity) ? ce.granularity : void 0 : Xe.includes(t.granularity) ? t.granularity : "day", Re = ce.ok ? ce.selection : {
17864
+ ), ke = a === "groupBy" ? ce.ok && Ze.includes(ce.granularity) ? ce.granularity : void 0 : Ze.includes(t.granularity) ? t.granularity : "day", Re = ce.ok ? ce.selection : {
17865
17865
  value: "auto",
17866
17866
  customPattern: "",
17867
17867
  format: fi
@@ -17874,7 +17874,7 @@ function Wb({
17874
17874
  ), [Q, Se] = U(
17875
17875
  t.valueAliases || {}
17876
17876
  ), [ve, Ie] = U((Vs = t.parameters) == null ? void 0 : Vs.filters), At = (J) => {
17877
- var X;
17877
+ var Z;
17878
17878
  if (a === "groupBy" && !ke) return;
17879
17879
  const Te = ke ?? "day";
17880
17880
  if (J === "custom") {
@@ -17884,7 +17884,7 @@ function Wb({
17884
17884
  F
17885
17885
  ).find(
17886
17886
  (Ue) => Ue.value === "custom"
17887
- ) : void 0, Ce = a === "groupBy" ? ze || (((X = de == null ? void 0 : de.format) == null ? void 0 : X.presentation.mode) === "pattern" ? de.format.presentation.pattern : "") : ze;
17887
+ ) : void 0, Ce = a === "groupBy" ? ze || (((Z = de == null ? void 0 : de.format) == null ? void 0 : Z.presentation.mode) === "pattern" ? de.format.presentation.pattern : "") : ze;
17888
17888
  Je(J), at(Ce), a === "groupBy" && k(
17889
17889
  r,
17890
17890
  hn(
@@ -17914,14 +17914,14 @@ function Wb({
17914
17914
  const Te = Jh(
17915
17915
  Re.format,
17916
17916
  J
17917
- ), X = Qh({
17917
+ ), Z = Qh({
17918
17918
  fieldId: t.id,
17919
17919
  dataType: t.dataType,
17920
17920
  granularity: J,
17921
17921
  format: Te,
17922
17922
  semanticTemporalPresentation: t.semanticTemporalPresentation
17923
17923
  });
17924
- Je(X.value), at(X.customPattern), V(r, J);
17924
+ Je(Z.value), at(Z.customPattern), V(r, J);
17925
17925
  }
17926
17926
  }, Wt = (J) => {
17927
17927
  We(J), a === "metrics" && w(r, J);
@@ -17933,39 +17933,39 @@ function Wb({
17933
17933
  y(a, r, J);
17934
17934
  }, nt = cm(t);
17935
17935
  dm(t);
17936
- const Zt = um(t), jt = t.role === "metric" && Zt, $n = Zt && (nt === "user_calculated" || nt === "inline_expression" && t.fieldScope !== "domain"), Rt = $n ? cp({
17936
+ const Xt = um(t), qt = t.role === "metric" && Xt, $n = Xt && (nt === "user_calculated" || nt === "inline_expression" && t.fieldScope !== "domain"), Rt = $n ? cp({
17937
17937
  field: t,
17938
17938
  sheetFields: (i == null ? void 0 : i.calculatedFields) || [],
17939
17939
  dashboardFields: x
17940
17940
  }) : void 0, Cs = $n && (Rt == null ? void 0 : Rt.scope) === "sheet", ws = $n && (Rt == null ? void 0 : Rt.scope) === "dashboard", Aa = nt === "domain_calculated" || t.fieldScope === "domain", Ss = Aa ? mm(t, b) : void 0, fa = Aa ? "domain" : Cs ? "sheet" : ws ? "dashboard" : "card", rn = Aa ? Ss || t : (Cs || ws) && (Rt != null && Rt.matchedField) ? Rt.matchedField : t, pc = Aa ? Ss ? "effective" : v ? "loading" : M ? "unavailable" : "unverified" : void 0, ks = (J) => {
17941
17941
  var Te;
17942
17942
  if (Ie(J), a === "metrics") {
17943
- const X = {
17943
+ const Z = {
17944
17944
  ...t,
17945
17945
  parameters: {
17946
17946
  ...t.parameters,
17947
17947
  filters: J
17948
17948
  }
17949
17949
  }, de = [...((Te = l.config) == null ? void 0 : Te.metricColumns) || []];
17950
- de[r] = X, R.getState().actions.updateCardConfig(l.id, {
17950
+ de[r] = Z, R.getState().actions.updateCardConfig(l.id, {
17951
17951
  metricColumns: de
17952
17952
  });
17953
17953
  }
17954
17954
  Ye(!1);
17955
17955
  }, fc = () => {
17956
17956
  O(a, r);
17957
- }, qn = Lt(
17957
+ }, jn = Lt(
17958
17958
  ft.dataType || t.dataType
17959
- ), Ts = qn === "date", jn = c === "kpi", Kn = a === "detailColumns", Ds = (Bs = l.config) == null ? void 0 : Bs.metricColumns, ga = ($s = l.config) == null ? void 0 : $s.groupByColumns, Ms = hm(l), Fs = xe((J) => J.dashboard), sn = xe(
17959
+ ), Ts = jn === "date", qn = c === "kpi", Kn = a === "detailColumns", Ds = (Bs = l.config) == null ? void 0 : Bs.metricColumns, ga = ($s = l.config) == null ? void 0 : $s.groupByColumns, Ms = hm(l), Fs = xe((J) => J.dashboard), sn = xe(
17960
17960
  (J) => J.semanticExecutionPayload
17961
17961
  ), zn = a === "groupBy" && ke ? Sr(
17962
17962
  ke,
17963
17963
  Re.format,
17964
17964
  F
17965
- ) : a === "detailColumns" ? Yb(ke ?? "day") : [], gc = yt ? "custom" : !ke && a === "groupBy" ? void 0 : zn.some((J) => J.value === He) ? He : ((qs = zn[0]) == null ? void 0 : qs.value) ?? "YYYY-MM-DD", xc = !!c && Gh.includes(c), bc = !!c && Hh.includes(c), Es = ee(
17965
+ ) : a === "detailColumns" ? Yb(ke ?? "day") : [], gc = yt ? "custom" : !ke && a === "groupBy" ? void 0 : zn.some((J) => J.value === He) ? He : ((js = zn[0]) == null ? void 0 : js.value) ?? "YYYY-MM-DD", xc = !!c && Gh.includes(c), bc = !!c && Hh.includes(c), Es = ee(
17966
17966
  () => ga == null ? void 0 : ga.find((J) => Lt(J.dataType || "") === "date"),
17967
17967
  [ga]
17968
- ), Xt = ee(
17968
+ ), Zt = ee(
17969
17969
  () => zh({
17970
17970
  card: l,
17971
17971
  cardConfig: l.config || {},
@@ -17973,25 +17973,25 @@ function Wb({
17973
17973
  }),
17974
17974
  [l, sn]
17975
17975
  ), rt = ee(
17976
- () => Es || (Xt ? {
17977
- ...Xt,
17978
- id: `semantic-primary:${Xt.entityId}:${Xt.name}`,
17979
- label: Xt.name,
17976
+ () => Es || (Zt ? {
17977
+ ...Zt,
17978
+ id: `semantic-primary:${Zt.entityId}:${Zt.name}`,
17979
+ label: Zt.name,
17980
17980
  role: "groupby",
17981
- granularity: Xt.defaultGranularity || "day"
17981
+ granularity: Zt.defaultGranularity || "day"
17982
17982
  } : void 0),
17983
- [Es, Xt]
17984
- ), Is = Xa(l), vc = ee(() => {
17983
+ [Es, Zt]
17984
+ ), Is = Za(l), vc = ee(() => {
17985
17985
  if (!rt) return !1;
17986
17986
  const J = Is;
17987
17987
  if (!J) return !1;
17988
17988
  const Te = (de) => {
17989
17989
  const Ce = de.field;
17990
17990
  return Ce ? rt.id && Ce.id === rt.id || rt.qualifiedFieldName && Ce.qualifiedFieldName === rt.qualifiedFieldName ? !0 : Ce.name === rt.name : !1;
17991
- }, X = (de) => de.conditions.some((Ue) => Lt(Ue.field.dataType || "") === "date" && Te(Ue)) ? !0 : de.groups.some((Ue) => X(Ue));
17992
- return X(J);
17991
+ }, Z = (de) => de.conditions.some((Ue) => Lt(Ue.field.dataType || "") === "date" && Te(Ue)) ? !0 : de.groups.some((Ue) => Z(Ue));
17992
+ return Z(J);
17993
17993
  }, [Is, rt]), yc = ee(() => {
17994
- const J = jp(
17994
+ const J = qp(
17995
17995
  Ms,
17996
17996
  Kp(Fs, sn, I)
17997
17997
  );
@@ -17999,21 +17999,21 @@ function Wb({
17999
17999
  l,
18000
18000
  J.status === "ready" ? { status: "ready", ...J.compiledFilters } : J
18001
18001
  );
18002
- }, [l, Ms, Fs, sn, I]), Os = vc || yc, Oe = t, it = ((js = Oe.comparison) == null ? void 0 : js.mode) === "explicit" ? Oe.comparison.spec : void 0, Un = ((zs = (Ks = Oe.parameters) == null ? void 0 : Ks.windowTransform) == null ? void 0 : zs.function) || "none", Dt = pm(Oe), Mt = Dt ? Un : null, Gn = fm({
18002
+ }, [l, Ms, Fs, sn, I]), Os = vc || yc, Oe = t, it = ((qs = Oe.comparison) == null ? void 0 : qs.mode) === "explicit" ? Oe.comparison.spec : void 0, Un = ((zs = (Ks = Oe.parameters) == null ? void 0 : Ks.windowTransform) == null ? void 0 : zs.function) || "none", Dt = pm(Oe), Mt = Dt ? Un : null, Gn = fm({
18003
18003
  cardType: c || "table",
18004
18004
  cardConfig: l.config || {},
18005
18005
  metric: Oe,
18006
18006
  transformMode: Mt || "running_total"
18007
18007
  }), Ra = ((Us = Oe.comparison) == null ? void 0 : Us.mode) === "explicit", As = gm(
18008
18008
  ga || []
18009
- ), xa = ((Js = (Hs = (Gs = Oe.parameters) == null ? void 0 : Gs.windowTransform) == null ? void 0 : Hs.orderBy) == null ? void 0 : Js.fieldId) || "", Nc = ((Zs = (Ws = (Qs = Oe.parameters) == null ? void 0 : Qs.windowTransform) == null ? void 0 : Ws.orderBy) == null ? void 0 : Zs.direction) || "asc", Rs = As.find(
18009
+ ), xa = ((Js = (Hs = (Gs = Oe.parameters) == null ? void 0 : Gs.windowTransform) == null ? void 0 : Hs.orderBy) == null ? void 0 : Js.fieldId) || "", Nc = ((Xs = (Ws = (Qs = Oe.parameters) == null ? void 0 : Qs.windowTransform) == null ? void 0 : Ws.orderBy) == null ? void 0 : Xs.direction) || "asc", Rs = As.find(
18010
18010
  (J) => J.id === xa
18011
18011
  ), Hn = Mt === "running_total" || Mt === "moving_average" || Mt === "previous_period_delta", Cc = Dt && Hn && !!Rs && Lt(Rs.dataType || "") !== "date", wc = xm({
18012
18012
  cardType: c || "table",
18013
18013
  cardConfig: l.config || {},
18014
18014
  orderByFieldId: xa || void 0
18015
18015
  }), Sc = new Set(
18016
- ((el = (Xs = Oe.parameters) == null ? void 0 : Xs.windowTransform) == null ? void 0 : el.partitionByFieldIds) || wc
18016
+ ((el = (Zs = Oe.parameters) == null ? void 0 : Zs.windowTransform) == null ? void 0 : el.partitionByFieldIds) || wc
18017
18017
  ), kc = c === "pivotTable" || bm(
18018
18018
  c || "table",
18019
18019
  l.config || {}
@@ -18032,15 +18032,15 @@ function Wb({
18032
18032
  const Ec = a !== "pivotBy" && a !== "sortBy", Ic = Jb(
18033
18033
  a,
18034
18034
  c
18035
- ), Oc = t.memberOrder ?? "auto", Ac = Ts && a === "groupBy" && (!jn || Fc), Rc = !jn && Ts && (a === "groupBy" || Kn), Pc = a === "metrics", Lc = !jn && qn === "number" && (a === "groupBy" || Kn) && Uh(c), ln = xc && !l.sql && !l.python && a === "metrics", Yc = () => {
18036
- const J = t, Te = a === "metrics" && jt;
18035
+ ), Oc = t.memberOrder ?? "auto", Ac = Ts && a === "groupBy" && (!qn || Fc), Rc = !qn && Ts && (a === "groupBy" || Kn), Pc = a === "metrics", Lc = !qn && jn === "number" && (a === "groupBy" || Kn) && Uh(c), ln = xc && !l.sql && !l.python && a === "metrics", Yc = () => {
18036
+ const J = t, Te = a === "metrics" && qt;
18037
18037
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
18038
18038
  !Te && /* @__PURE__ */ e(
18039
18039
  "div",
18040
18040
  {
18041
18041
  title: `${t.entityName}.${t.name}`,
18042
- onPointerDown: (X) => {
18043
- X.stopPropagation();
18042
+ onPointerDown: (Z) => {
18043
+ Z.stopPropagation();
18044
18044
  },
18045
18045
  className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap px-0.5 text-xs text-muted-foreground/80",
18046
18046
  children: `${t.entityName}.${t.name}`
@@ -18050,8 +18050,8 @@ function Wb({
18050
18050
  "div",
18051
18051
  {
18052
18052
  title: El(J.calculatedFormula),
18053
- onPointerDown: (X) => {
18054
- X.stopPropagation();
18053
+ onPointerDown: (Z) => {
18054
+ Z.stopPropagation();
18055
18055
  },
18056
18056
  className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap rounded bg-muted/50 px-1.5 py-0.5 font-mono text-xs text-primary",
18057
18057
  children: [
@@ -18114,7 +18114,7 @@ function Wb({
18114
18114
  onValueChange: Qt,
18115
18115
  children: [
18116
18116
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select granularity..." }) }),
18117
- /* @__PURE__ */ e(le, { children: Xe.map((J) => /* @__PURE__ */ e(K, { className: "text-xs", value: J, children: Yl(J) }, J)) })
18117
+ /* @__PURE__ */ e(le, { children: Ze.map((J) => /* @__PURE__ */ e(K, { className: "text-xs", value: J, children: Yl(J) }, J)) })
18118
18118
  ]
18119
18119
  }
18120
18120
  )
@@ -18158,7 +18158,7 @@ function Wb({
18158
18158
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Examples: YYYY-MM-DD, MM/DD/YY, DD-MMM-YYYY HH:mm" })
18159
18159
  ] })
18160
18160
  ] })
18161
- ] }) : null, qc = () => Lc ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
18161
+ ] }) : null, jc = () => Lc ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
18162
18162
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Number Format" }),
18163
18163
  /* @__PURE__ */ e(
18164
18164
  Ir,
@@ -18173,10 +18173,10 @@ function Wb({
18173
18173
  showTitle: !1
18174
18174
  }
18175
18175
  )
18176
- ] }) : null, jc = () => {
18176
+ ] }) : null, qc = () => {
18177
18177
  var Te;
18178
18178
  if (!Pc) return null;
18179
- const J = jt;
18179
+ const J = qt;
18180
18180
  return /* @__PURE__ */ n(pe, { children: [
18181
18181
  J && A && !Aa && /* @__PURE__ */ n("div", { className: "space-y-1", children: [
18182
18182
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Formula" }),
@@ -18200,13 +18200,13 @@ function Wb({
18200
18200
  ne,
18201
18201
  {
18202
18202
  value: t.aggregate,
18203
- onValueChange: (X) => {
18204
- N(r, X);
18203
+ onValueChange: (Z) => {
18204
+ N(r, Z);
18205
18205
  },
18206
18206
  disabled: J,
18207
18207
  children: [
18208
18208
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select function..." }) }),
18209
- /* @__PURE__ */ e(le, { children: gi(t.dataType).map((X) => /* @__PURE__ */ e(K, { className: "text-xs", value: X.value, children: X.label }, X.value)) })
18209
+ /* @__PURE__ */ e(le, { children: gi(t.dataType).map((Z) => /* @__PURE__ */ e(K, { className: "text-xs", value: Z.value, children: Z.label }, Z.value)) })
18210
18210
  ]
18211
18211
  }
18212
18212
  )
@@ -18217,7 +18217,7 @@ function Wb({
18217
18217
  Ir,
18218
18218
  {
18219
18219
  value: Oe.format,
18220
- onChange: (X) => Y(r, X),
18220
+ onChange: (Z) => Y(r, Z),
18221
18221
  cardType: c,
18222
18222
  showTitle: !1
18223
18223
  }
@@ -18258,9 +18258,9 @@ function Wb({
18258
18258
  ne,
18259
18259
  {
18260
18260
  value: Dt ? Un : "none",
18261
- onValueChange: (X) => j(
18261
+ onValueChange: (Z) => q(
18262
18262
  r,
18263
- X
18263
+ Z
18264
18264
  ),
18265
18265
  disabled: !Gn.supported && !Dt,
18266
18266
  children: [
@@ -18314,17 +18314,17 @@ function Wb({
18314
18314
  ne,
18315
18315
  {
18316
18316
  value: xa,
18317
- onValueChange: (X) => H(r, X),
18317
+ onValueChange: (Z) => H(r, Z),
18318
18318
  children: [
18319
18319
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select order field..." }) }),
18320
- /* @__PURE__ */ e(le, { children: As.filter((X) => !!X.id).map((X) => /* @__PURE__ */ e(
18320
+ /* @__PURE__ */ e(le, { children: As.filter((Z) => !!Z.id).map((Z) => /* @__PURE__ */ e(
18321
18321
  K,
18322
18322
  {
18323
- value: X.id,
18323
+ value: Z.id,
18324
18324
  className: "text-xs",
18325
- children: X.label || X.name
18325
+ children: Z.label || Z.name
18326
18326
  },
18327
- X.id
18327
+ Z.id
18328
18328
  )) })
18329
18329
  ]
18330
18330
  }
@@ -18338,9 +18338,9 @@ function Wb({
18338
18338
  ne,
18339
18339
  {
18340
18340
  value: Nc,
18341
- onValueChange: (X) => Z(
18341
+ onValueChange: (Z) => X(
18342
18342
  r,
18343
- X
18343
+ Z
18344
18344
  ),
18345
18345
  disabled: !xa,
18346
18346
  children: [
@@ -18363,9 +18363,9 @@ function Wb({
18363
18363
  min: 1,
18364
18364
  className: "h-8 text-xs",
18365
18365
  value: Ls,
18366
- onChange: (X) => z(
18366
+ onChange: (Z) => z(
18367
18367
  r,
18368
- Number(X.target.value)
18368
+ Number(Z.target.value)
18369
18369
  )
18370
18370
  }
18371
18371
  ),
@@ -18378,9 +18378,9 @@ function Wb({
18378
18378
  max: Ls,
18379
18379
  className: "h-8 text-xs",
18380
18380
  value: Tc,
18381
- onChange: (X) => W(
18381
+ onChange: (Z) => W(
18382
18382
  r,
18383
- Number(X.target.value)
18383
+ Number(Z.target.value)
18384
18384
  )
18385
18385
  }
18386
18386
  )
@@ -18391,9 +18391,9 @@ function Wb({
18391
18391
  ne,
18392
18392
  {
18393
18393
  value: Dc,
18394
- onValueChange: (X) => ae(
18394
+ onValueChange: (Z) => ae(
18395
18395
  r,
18396
- X
18396
+ Z
18397
18397
  ),
18398
18398
  children: [
18399
18399
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select output..." }) }),
@@ -18412,9 +18412,9 @@ function Wb({
18412
18412
  ne,
18413
18413
  {
18414
18414
  value: Ys,
18415
- onValueChange: (X) => ue(
18415
+ onValueChange: (Z) => ue(
18416
18416
  r,
18417
- X
18417
+ Z
18418
18418
  ),
18419
18419
  children: [
18420
18420
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select scope..." }) }),
@@ -18432,9 +18432,9 @@ function Wb({
18432
18432
  ne,
18433
18433
  {
18434
18434
  value: Mc,
18435
- onValueChange: (X) => oe(
18435
+ onValueChange: (Z) => oe(
18436
18436
  r,
18437
- X
18437
+ Z
18438
18438
  ),
18439
18439
  children: [
18440
18440
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select output..." }) }),
@@ -18450,26 +18450,26 @@ function Wb({
18450
18450
  (Mt === "running_total" || Mt === "moving_average" || Mt === "previous_period_delta" || Mt === "percent_of_total" && Ys === "partition_total") && Ps.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1", children: [
18451
18451
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Reset By" }),
18452
18452
  /* @__PURE__ */ e("div", { className: "space-y-1", children: Ps.map(
18453
- (X) => {
18454
- const de = !!X.id && Sc.has(X.id);
18453
+ (Z) => {
18454
+ const de = !!Z.id && Sc.has(Z.id);
18455
18455
  return /* @__PURE__ */ n(
18456
18456
  "button",
18457
18457
  {
18458
18458
  type: "button",
18459
- onClick: () => X.id && ie(
18459
+ onClick: () => Z.id && ie(
18460
18460
  r,
18461
- X.id
18461
+ Z.id
18462
18462
  ),
18463
18463
  className: G(
18464
18464
  "flex h-7 w-full items-center justify-between rounded border px-2 text-xs",
18465
18465
  de ? "border-primary bg-primary/5 text-primary" : "border-border text-muted-foreground"
18466
18466
  ),
18467
18467
  children: [
18468
- /* @__PURE__ */ e("span", { children: X.label || X.name }),
18468
+ /* @__PURE__ */ e("span", { children: Z.label || Z.name }),
18469
18469
  de ? /* @__PURE__ */ e(ma, { className: "h-3 w-3" }) : null
18470
18470
  ]
18471
18471
  },
18472
- X.id
18472
+ Z.id
18473
18473
  );
18474
18474
  }
18475
18475
  ) })
@@ -18486,9 +18486,9 @@ function Wb({
18486
18486
  {
18487
18487
  value: Oe.comparison ? Oe.comparison.mode === "off" ? "off" : Oe.comparison.spec.kind : "inherit",
18488
18488
  disabled: Dt,
18489
- onValueChange: (X) => P(
18489
+ onValueChange: (Z) => P(
18490
18490
  r,
18491
- X
18491
+ Z
18492
18492
  ),
18493
18493
  children: [
18494
18494
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select comparison type..." }) }),
@@ -18496,17 +18496,17 @@ function Wb({
18496
18496
  /* @__PURE__ */ e(K, { value: "inherit", children: "Inherit dashboard comparison (default)" }),
18497
18497
  /* @__PURE__ */ e(K, { value: "off", children: "Off" }),
18498
18498
  (() => {
18499
- const X = !rt || !Os, de = rt ? Os ? void 0 : "Add a date filter to enable" : "Configure a semantic primary date or add a date axis", Ce = (Ue, et) => /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ n(mt, { children: [
18499
+ const Z = !rt || !Os, de = rt ? Os ? void 0 : "Add a date filter to enable" : "Configure a semantic primary date or add a date axis", Ce = (Ue, et) => /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ n(mt, { children: [
18500
18500
  /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e(
18501
18501
  K,
18502
18502
  {
18503
18503
  value: Ue,
18504
- disabled: X,
18504
+ disabled: Z,
18505
18505
  title: de,
18506
18506
  children: et
18507
18507
  }
18508
18508
  ) }),
18509
- X && de && /* @__PURE__ */ e(ut, { side: "right", children: de })
18509
+ Z && de && /* @__PURE__ */ e(ut, { side: "right", children: de })
18510
18510
  ] }) });
18511
18511
  return /* @__PURE__ */ n(pe, { children: [
18512
18512
  Ce("previous_period", "Previous Period"),
@@ -18530,8 +18530,8 @@ function Wb({
18530
18530
  min: 1,
18531
18531
  step: 1,
18532
18532
  value: it.kind === "previous_year" ? it.offsetYears || 1 : it.offsetPeriods || 1,
18533
- onChange: (X) => {
18534
- const de = Number(X.target.value);
18533
+ onChange: (Z) => {
18534
+ const de = Number(Z.target.value);
18535
18535
  !Number.isSafeInteger(de) || de <= 0 || (it.kind === "previous_year" ? $(r, {
18536
18536
  ...it,
18537
18537
  offsetYears: de === 1 ? void 0 : de
@@ -18550,9 +18550,9 @@ function Wb({
18550
18550
  ne,
18551
18551
  {
18552
18552
  value: it.alignment || "calendar",
18553
- onValueChange: (X) => $(r, {
18553
+ onValueChange: (Z) => $(r, {
18554
18554
  ...it,
18555
- alignment: X === "calendar" ? void 0 : X
18555
+ alignment: Z === "calendar" ? void 0 : Z
18556
18556
  }),
18557
18557
  children: [
18558
18558
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, {}) }),
@@ -18574,9 +18574,9 @@ function Wb({
18574
18574
  {
18575
18575
  size: "xs",
18576
18576
  checked: it.toDate === !0,
18577
- onCheckedChange: (X) => $(r, {
18577
+ onCheckedChange: (Z) => $(r, {
18578
18578
  ...it,
18579
- toDate: X ? !0 : void 0
18579
+ toDate: Z ? !0 : void 0
18580
18580
  })
18581
18581
  }
18582
18582
  )
@@ -18595,9 +18595,9 @@ function Wb({
18595
18595
  {
18596
18596
  value: Pp(Oe),
18597
18597
  disabled: !!Oe.semanticComparisonPolarity,
18598
- onValueChange: (X) => q(
18598
+ onValueChange: (Z) => j(
18599
18599
  r,
18600
- X
18600
+ Z
18601
18601
  ),
18602
18602
  children: [
18603
18603
  /* @__PURE__ */ e(re, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, {}) }),
@@ -18618,8 +18618,8 @@ function Wb({
18618
18618
  {
18619
18619
  type: "number",
18620
18620
  value: Oe.comparison.spec.targetValue !== void 0 && Oe.comparison.spec.targetValue !== null ? String(Oe.comparison.spec.targetValue) : "",
18621
- onChange: (X) => {
18622
- const de = X.target.value;
18621
+ onChange: (Z) => {
18622
+ const de = Z.target.value;
18623
18623
  if (de === "") {
18624
18624
  ge(r, void 0);
18625
18625
  return;
@@ -18637,21 +18637,21 @@ function Wb({
18637
18637
  ] }),
18638
18638
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
18639
18639
  /* @__PURE__ */ e(_, { className: "text-xs font-medium text-muted-foreground", children: "Attribute Filters" }),
18640
- (ve == null ? void 0 : ve.conditions) && ve.conditions.length > 0 && /* @__PURE__ */ e("div", { className: "mb-2 space-y-1", children: ve.conditions.map((X) => /* @__PURE__ */ n(
18640
+ (ve == null ? void 0 : ve.conditions) && ve.conditions.length > 0 && /* @__PURE__ */ e("div", { className: "mb-2 space-y-1", children: ve.conditions.map((Z) => /* @__PURE__ */ n(
18641
18641
  "div",
18642
18642
  {
18643
18643
  className: "flex cursor-pointer items-center gap-2 rounded bg-muted/50 p-2 text-xs transition-colors hover:bg-muted/70",
18644
18644
  onClick: () => {
18645
- Ve(X), Ye(!0);
18645
+ Ve(Z), Ye(!0);
18646
18646
  },
18647
18647
  children: [
18648
18648
  /* @__PURE__ */ n("span", { className: "font-medium", children: [
18649
- X.field.label,
18649
+ Z.field.label,
18650
18650
  ":"
18651
18651
  ] }),
18652
18652
  /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ n(mt, { children: [
18653
- /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(X.value) ? X.value.length === 1 ? String(X.value[0]) : X.value.length <= 2 ? X.value.join(", ") : `${X.value.slice(0, 2).join(", ")} +${X.value.length - 2}` : String(X.value) }) }),
18654
- Array.isArray(X.value) && X.value.length > 1 && /* @__PURE__ */ e(
18653
+ /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(Z.value) ? Z.value.length === 1 ? String(Z.value[0]) : Z.value.length <= 2 ? Z.value.join(", ") : `${Z.value.slice(0, 2).join(", ")} +${Z.value.length - 2}` : String(Z.value) }) }),
18654
+ Array.isArray(Z.value) && Z.value.length > 1 && /* @__PURE__ */ e(
18655
18655
  ut,
18656
18656
  {
18657
18657
  side: "top",
@@ -18659,10 +18659,10 @@ function Wb({
18659
18659
  children: /* @__PURE__ */ n("div", { className: "text-xs", children: [
18660
18660
  /* @__PURE__ */ n("div", { className: "mb-1 font-medium", children: [
18661
18661
  "Selected values (",
18662
- X.value.length,
18662
+ Z.value.length,
18663
18663
  "):"
18664
18664
  ] }),
18665
- /* @__PURE__ */ e("div", { className: "max-h-[200px] overflow-y-auto", children: X.value.map((de, Ce) => /* @__PURE__ */ e("div", { children: String(de) }, Ce)) })
18665
+ /* @__PURE__ */ e("div", { className: "max-h-[200px] overflow-y-auto", children: Z.value.map((de, Ce) => /* @__PURE__ */ e("div", { children: String(de) }, Ce)) })
18666
18666
  ] })
18667
18667
  }
18668
18668
  )
@@ -18677,7 +18677,7 @@ function Wb({
18677
18677
  var Ue;
18678
18678
  de.stopPropagation();
18679
18679
  const Ce = ve.conditions.filter(
18680
- (et) => et.id !== X.id
18680
+ (et) => et.id !== Z.id
18681
18681
  );
18682
18682
  if (Ce.length > 0) {
18683
18683
  const et = {
@@ -18705,7 +18705,7 @@ function Wb({
18705
18705
  )
18706
18706
  ]
18707
18707
  },
18708
- X.id
18708
+ Z.id
18709
18709
  )) }),
18710
18710
  /* @__PURE__ */ n(
18711
18711
  te,
@@ -18752,7 +18752,7 @@ function Wb({
18752
18752
  field: t,
18753
18753
  zone: a,
18754
18754
  label: xi(t),
18755
- dataType: qn,
18755
+ dataType: jn,
18756
18756
  calculated: Qr(t),
18757
18757
  open: fe,
18758
18758
  onOpenChange: be,
@@ -18778,8 +18778,8 @@ function Wb({
18778
18778
  _c(),
18779
18779
  c === "kpi" && _s(),
18780
18780
  $c(),
18781
- qc(),
18782
- jc()
18781
+ jc(),
18782
+ qc()
18783
18783
  ] })
18784
18784
  }
18785
18785
  ),
@@ -18798,14 +18798,14 @@ function Wb({
18798
18798
  if (J)
18799
18799
  ks(J);
18800
18800
  else if (Ie(void 0), a === "metrics") {
18801
- const X = {
18801
+ const Z = {
18802
18802
  ...t,
18803
18803
  parameters: {
18804
18804
  ...t.parameters,
18805
18805
  filters: void 0
18806
18806
  }
18807
18807
  }, de = [...((Te = l.config) == null ? void 0 : Te.metricColumns) || []];
18808
- de[r] = X, R.getState().actions.updateCardConfig(l.id, {
18808
+ de[r] = Z, R.getState().actions.updateCardConfig(l.id, {
18809
18809
  metricColumns: de
18810
18810
  });
18811
18811
  }
@@ -18813,8 +18813,8 @@ function Wb({
18813
18813
  }
18814
18814
  }
18815
18815
  ),
18816
- ye && a === "metrics" && jt && /* @__PURE__ */ e(
18817
- Zo,
18816
+ ye && a === "metrics" && qt && /* @__PURE__ */ e(
18817
+ Xo,
18818
18818
  {
18819
18819
  open: ye,
18820
18820
  onOpenChange: _e,
@@ -18828,9 +18828,9 @@ function Wb({
18828
18828
  if (J.role !== "metric") return;
18829
18829
  const {
18830
18830
  card: Te,
18831
- frame: X,
18831
+ frame: Z,
18832
18832
  actions: de
18833
- } = R.getState(), Ce = fa === "dashboard" ? x : X.calculatedFields || [], {
18833
+ } = R.getState(), Ce = fa === "dashboard" ? x : Z.calculatedFields || [], {
18834
18834
  cardConfigPatch: Ue,
18835
18835
  nextStoredFields: et,
18836
18836
  nextSharedFields: Ft
@@ -18857,9 +18857,9 @@ function Wb({
18857
18857
  if (J.role !== "metric") return;
18858
18858
  const {
18859
18859
  card: Te,
18860
- frame: X,
18860
+ frame: Z,
18861
18861
  actions: de
18862
- } = R.getState(), Ce = t, Ue = X.calculatedFields || [], {
18862
+ } = R.getState(), Ce = t, Ue = Z.calculatedFields || [], {
18863
18863
  cardConfigPatch: et,
18864
18864
  nextStoredFields: Ft,
18865
18865
  nextSheetFields: Jn,
@@ -18895,14 +18895,14 @@ function Wb({
18895
18895
  if (J.role !== "metric") return;
18896
18896
  const {
18897
18897
  card: Te,
18898
- frame: X,
18898
+ frame: Z,
18899
18899
  actions: de
18900
- } = R.getState(), Ce = t, Ue = X.calculatedFields || [], {
18900
+ } = R.getState(), Ce = t, Ue = Z.calculatedFields || [], {
18901
18901
  cardConfigPatch: et,
18902
18902
  nextStoredFields: Ft,
18903
18903
  nextSharedFields: Jn,
18904
18904
  nextSheetFields: ea
18905
- } = Xo({
18905
+ } = Zo({
18906
18906
  cardConfig: Te.config,
18907
18907
  storedFields: Te.calculatedFields || [],
18908
18908
  sharedFields: x,
@@ -18934,7 +18934,7 @@ function Wb({
18934
18934
  )
18935
18935
  ] });
18936
18936
  }
18937
- function Zb({
18937
+ function Xb({
18938
18938
  field: t,
18939
18939
  zone: a,
18940
18940
  onRemove: r
@@ -18956,7 +18956,7 @@ function Zb({
18956
18956
  }
18957
18957
  );
18958
18958
  }
18959
- function Xb({ concept: t }) {
18959
+ function Zb({ concept: t }) {
18960
18960
  const { title: a, description: r } = ev[t];
18961
18961
  return /* @__PURE__ */ n(ya, { openDelay: 150, closeDelay: 50, children: [
18962
18962
  /* @__PURE__ */ e(Na, { asChild: !0, children: /* @__PURE__ */ e(
@@ -19083,7 +19083,7 @@ function $a({
19083
19083
  zone: a,
19084
19084
  pillIds: r.map((S) => S.id)
19085
19085
  }
19086
- }), i = Xc(a), { updateSortByColumn: h } = Ne(), u = R((S) => S.card), f = R((S) => S.card.type), m = r.length > 0, p = i !== null, x = (i == null ? void 0 : i.kind) !== "refused", b = (i == null ? void 0 : i.kind) === "refused" ? vm(i.notice, s) : null, g = st((S, L) => {
19086
+ }), i = Zc(a), { updateSortByColumn: h } = Ne(), u = R((S) => S.card), f = R((S) => S.card.type), m = r.length > 0, p = i !== null, x = (i == null ? void 0 : i.kind) !== "refused", b = (i == null ? void 0 : i.kind) === "refused" ? vm(i.notice, s) : null, g = st((S, L) => {
19087
19087
  var I;
19088
19088
  !((I = u.config) != null && I.sortByColumns) || u.config.sortByColumns.findIndex(
19089
19089
  (F) => F.id === S
@@ -19101,7 +19101,7 @@ function $a({
19101
19101
  }
19102
19102
  ),
19103
19103
  f === "matrixTable" ? /* @__PURE__ */ e(
19104
- Zb,
19104
+ Xb,
19105
19105
  {
19106
19106
  field: S,
19107
19107
  zone: a,
@@ -19151,7 +19151,7 @@ function $a({
19151
19151
  children: r.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-9 items-center justify-center gap-1.5 text-[11px] text-muted-foreground/80", children: [
19152
19152
  /* @__PURE__ */ e(T, { className: "h-3 w-3 shrink-0 text-muted-foreground/60" }),
19153
19153
  /* @__PURE__ */ e("span", { children: o }),
19154
- M && /* @__PURE__ */ e(Xb, { concept: a })
19154
+ M && /* @__PURE__ */ e(Zb, { concept: a })
19155
19155
  ] }) : v
19156
19156
  }
19157
19157
  )
@@ -19189,7 +19189,7 @@ function sv({
19189
19189
  sortByFields: d,
19190
19190
  detailFields: c
19191
19191
  }) {
19192
- var H, Z, ie;
19192
+ var H, X, ie;
19193
19193
  const [l, i] = U(!1);
19194
19194
  R(
19195
19195
  (z) => {
@@ -19199,7 +19199,7 @@ function sv({
19199
19199
  );
19200
19200
  const h = R((z) => z.card), u = R((z) => z.frame), f = ha(u, h), { manifest: m } = ia(
19201
19201
  ((H = f == null ? void 0 : f.customCardPreferences) == null ? void 0 : H.url) || ""
19202
- ), p = (Z = m == null ? void 0 : m.visuals) == null ? void 0 : Z.find(
19202
+ ), p = (X = m == null ? void 0 : m.visuals) == null ? void 0 : X.find(
19203
19203
  (z) => {
19204
19204
  var W;
19205
19205
  return z.name === ((W = f == null ? void 0 : f.customCardPreferences) == null ? void 0 : W.componentName);
@@ -19227,13 +19227,13 @@ function sv({
19227
19227
  "aggregateTable",
19228
19228
  "bubble",
19229
19229
  "scatter"
19230
- ].includes(N), $ = w && !P, q = () => N === "kpi" ? {
19230
+ ].includes(N), $ = w && !P, j = () => N === "kpi" ? {
19231
19231
  label: "Trend By",
19232
19232
  placeholder: "Drop trend field here"
19233
19233
  } : {
19234
19234
  label: "Rows",
19235
19235
  placeholder: "Drop dimensions here"
19236
- }, j = () => N === "kpi" ? {
19236
+ }, q = () => N === "kpi" ? {
19237
19237
  label: "Metric",
19238
19238
  placeholder: "Drop metric here"
19239
19239
  } : {
@@ -19268,8 +19268,8 @@ function sv({
19268
19268
  zone: "groupBy",
19269
19269
  onRemoveField: t,
19270
19270
  fields: r,
19271
- label: q().label,
19272
- placeholder: q().placeholder
19271
+ label: j().label,
19272
+ placeholder: j().placeholder
19273
19273
  }
19274
19274
  ),
19275
19275
  $ && /* @__PURE__ */ e(
@@ -19288,8 +19288,8 @@ function sv({
19288
19288
  zone: "metrics",
19289
19289
  onRemoveField: t,
19290
19290
  fields: o,
19291
- label: j().label,
19292
- placeholder: j().placeholder,
19291
+ label: q().label,
19292
+ placeholder: q().placeholder,
19293
19293
  hasPivotColumns: s.length > 0
19294
19294
  }
19295
19295
  ),
@@ -19328,7 +19328,7 @@ function sv({
19328
19328
  )
19329
19329
  ] }),
19330
19330
  /* @__PURE__ */ e(
19331
- Zo,
19331
+ Xo,
19332
19332
  {
19333
19333
  open: l,
19334
19334
  onOpenChange: i,
@@ -19366,7 +19366,7 @@ function sv({
19366
19366
  },
19367
19367
  onSaveToDashboard: (z) => {
19368
19368
  if (z.role !== "metric") return;
19369
- const { nextSharedFields: W } = Xo({
19369
+ const { nextSharedFields: W } = Zo({
19370
19370
  storedFields: h.calculatedFields || [],
19371
19371
  sharedFields: I,
19372
19372
  updatedField: z,
@@ -19442,7 +19442,7 @@ function lv() {
19442
19442
  ]
19443
19443
  }
19444
19444
  ),
19445
- b && o && /* @__PURE__ */ e("div", { className: "max-h-[40vh] overflow-y-auto border-b border-t border-border px-4", children: /* @__PURE__ */ e(Xi, {}) }),
19445
+ b && o && /* @__PURE__ */ e("div", { className: "max-h-[40vh] overflow-y-auto border-b border-t border-border px-4", children: /* @__PURE__ */ e(Zi, {}) }),
19446
19446
  b && /* @__PURE__ */ n(
19447
19447
  "button",
19448
19448
  {
@@ -19585,7 +19585,7 @@ function iv({
19585
19585
  var F;
19586
19586
  const [f, m] = U(!1), p = R((y) => y.card), x = R((y) => y.editorContext), b = R(
19587
19587
  (y) => y.actions.updateCardConfig
19588
- ), g = (x == null ? void 0 : x.type) === "documentSection", { autoJoinMetadata: v } = xt(p), M = Xr(p) || (v != null && v.autoResolved ? v.resolvedJoinPlan : {
19588
+ ), g = (x == null ? void 0 : x.type) === "documentSection", { autoJoinMetadata: v } = xt(p), M = Zr(p) || (v != null && v.autoResolved ? v.resolvedJoinPlan : {
19589
19589
  baseEntity: {
19590
19590
  type: "table",
19591
19591
  name: "",
@@ -20222,7 +20222,7 @@ function gv({
20222
20222
  if (!t || i || s) return;
20223
20223
  const g = Array.isArray(t) ? t[0] : t;
20224
20224
  return er(g, c, "start");
20225
- }, [t, i, s, c]), m = (g) => a === "<=" || a === ">" ? Zh(g, c) : Xh(g, c);
20225
+ }, [t, i, s, c]), m = (g) => a === "<=" || a === ">" ? Xh(g, c) : Zh(g, c);
20226
20226
  return /* @__PURE__ */ e(
20227
20227
  Om,
20228
20228
  {
@@ -20988,7 +20988,7 @@ function Tv({
20988
20988
  children: [
20989
20989
  /* @__PURE__ */ n("div", { className: "flex h-10 shrink-0 items-center gap-2 border-b border-border pl-3 pr-10", children: [
20990
20990
  /* @__PURE__ */ e(Da, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
20991
- /* @__PURE__ */ e(qt, { className: "truncate text-[13px] font-medium", children: "Card filters" }),
20991
+ /* @__PURE__ */ e(jt, { className: "truncate text-[13px] font-medium", children: "Card filters" }),
20992
20992
  /* @__PURE__ */ e(Ut, { className: "sr-only", children: "Add filters to the card to limit the data that is displayed." })
20993
20993
  ] }),
20994
20994
  /* @__PURE__ */ e(
@@ -21172,7 +21172,7 @@ function Iv({
21172
21172
  children: /* @__PURE__ */ n("div", { className: "relative flex h-full min-h-0 max-w-full flex-1 grow basis-0 py-4 pl-2 pr-4", children: [
21173
21173
  (r || s) && (a == null ? void 0 : a.records) && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(_t, { size: "md", color: "muted", "aria-label": "Loading data" }) }),
21174
21174
  (a == null ? void 0 : a.records) && /* @__PURE__ */ e(
21175
- jr,
21175
+ qr,
21176
21176
  {
21177
21177
  card: t,
21178
21178
  data: h,
@@ -21210,7 +21210,7 @@ function Pv({
21210
21210
  showInfoTab: a
21211
21211
  }) {
21212
21212
  return /* @__PURE__ */ e(
21213
- ji,
21213
+ qi,
21214
21214
  {
21215
21215
  className: "mx-4 mt-3",
21216
21216
  hint: a ? "The Error tab has the query and its payload." : "Contact your administrator for help resolving this issue.",
@@ -21332,15 +21332,15 @@ function _v({
21332
21332
  generatedSql: C == null ? void 0 : C.sql
21333
21333
  });
21334
21334
  g(Le), x(!0);
21335
- }, q = () => {
21335
+ }, j = () => {
21336
21336
  const me = R.getState().actions;
21337
21337
  me.setIsDevMode(!0), me.setCardSql(w || ""), setTimeout(() => {
21338
21338
  me.setRunSql(!0);
21339
21339
  }, 100);
21340
- }, j = T ? { queryRequest: O, queryResponse: C } : void 0, H = ee(
21340
+ }, q = T ? { queryRequest: O, queryResponse: C } : void 0, H = ee(
21341
21341
  () => (C == null ? void 0 : C.records) || [],
21342
21342
  [C == null ? void 0 : C.records]
21343
- ), Z = ee(
21343
+ ), X = ee(
21344
21344
  () => !V && H.length > 0 ? Object.keys(H[0]) : [],
21345
21345
  [V, H]
21346
21346
  ), ie = Yo(s), z = R((me) => me.frame), [W, ae] = U(), ue = () => {
@@ -21372,7 +21372,7 @@ function _v({
21372
21372
  var me;
21373
21373
  return $m((me = o.config) == null ? void 0 : me.sortByColumns);
21374
21374
  }, [(Ae = o.config) == null ? void 0 : Ae.sortByColumns]), be = ri(
21375
- Xa(s) || null
21375
+ Za(s) || null
21376
21376
  );
21377
21377
  return /* @__PURE__ */ e("div", { className: "relative flex w-0 grow flex-col", children: /* @__PURE__ */ n("div", { className: "group/visualization relative flex h-full max-w-full grow flex-col", children: [
21378
21378
  /* @__PURE__ */ n("div", { className: "flex h-11 items-center gap-3 border-b border-border px-4", children: [
@@ -21388,7 +21388,7 @@ function _v({
21388
21388
  ) }),
21389
21389
  N === "kpi" && /* @__PURE__ */ e(Yv, { visible: !0, className: "self-center" }),
21390
21390
  Y && o.type !== "table" && /* @__PURE__ */ e(
21391
- qm,
21391
+ jm,
21392
21392
  {
21393
21393
  metadata: Y,
21394
21394
  variant: "compact"
@@ -21396,12 +21396,12 @@ function _v({
21396
21396
  )
21397
21397
  ] }),
21398
21398
  /* @__PURE__ */ n("div", { className: "flex grow items-center justify-end gap-1", children: [
21399
- !jm(N) && /* @__PURE__ */ e(Ev, {}),
21399
+ !qm(N) && /* @__PURE__ */ e(Ev, {}),
21400
21400
  /* @__PURE__ */ e(
21401
21401
  Km,
21402
21402
  {
21403
21403
  cardId: s.id,
21404
- cardFilters: Xa(s),
21404
+ cardFilters: Za(s),
21405
21405
  cardFilterCount: be,
21406
21406
  onFiltersClick: r,
21407
21407
  inlineFilters: s.inlineFilters,
@@ -21416,7 +21416,7 @@ function _v({
21416
21416
  {
21417
21417
  card: s,
21418
21418
  effectiveCardType: N,
21419
- queryResultColumns: Z
21419
+ queryResultColumns: X
21420
21420
  }
21421
21421
  ),
21422
21422
  y === "chart" && /* @__PURE__ */ e(
@@ -21511,7 +21511,7 @@ function _v({
21511
21511
  error: E,
21512
21512
  errorSql: w,
21513
21513
  onSendFeedback: $,
21514
- onOpenInEditor: es(o.type) ? q : void 0
21514
+ onOpenInEditor: es(o.type) ? j : void 0
21515
21515
  }
21516
21516
  ) }) : /* @__PURE__ */ e(
21517
21517
  Pv,
@@ -21543,7 +21543,7 @@ function _v({
21543
21543
  }
21544
21544
  ) }),
21545
21545
  /* @__PURE__ */ e(
21546
- jr,
21546
+ qr,
21547
21547
  {
21548
21548
  card: s,
21549
21549
  data: H,
@@ -21565,17 +21565,17 @@ function _v({
21565
21565
  error: E,
21566
21566
  errorSql: w,
21567
21567
  defaultDetailsOpen: !0,
21568
- debugPayloads: j,
21568
+ debugPayloads: q,
21569
21569
  onSendFeedback: $,
21570
- onOpenInEditor: q
21570
+ onOpenInEditor: j
21571
21571
  }
21572
21572
  ) : (
21573
21573
  /* Show normal SQL display when there's no error */
21574
21574
  (C == null ? void 0 : C.sql) && /* @__PURE__ */ e(
21575
- Zi,
21575
+ Xi,
21576
21576
  {
21577
21577
  sql: C.sql,
21578
- debugPayloads: j
21578
+ debugPayloads: q
21579
21579
  }
21580
21580
  )
21581
21581
  ) }) })
@@ -21648,16 +21648,16 @@ const $v = () => {
21648
21648
  );
21649
21649
  };
21650
21650
  };
21651
- function qv() {
21651
+ function jv() {
21652
21652
  const [t, a] = U(
21653
21653
  "chart"
21654
- ), [r, s] = U(!1), [o, d] = U(!0), [c, l] = U(!0), i = xe((Z) => Z.isVisualEditing), h = ds(), u = R((Z) => Z.card.type);
21654
+ ), [r, s] = U(!1), [o, d] = U(!0), [c, l] = U(!0), i = xe((X) => X.isVisualEditing), h = ds(), u = R((X) => X.card.type);
21655
21655
  we(() => $v(), []);
21656
- const f = (Z) => {
21657
- h(Z);
21658
- }, m = R((Z) => Z.frame), p = R((Z) => Z.card);
21659
- R((Z) => Z.activeTabCardId), R(
21660
- (Z) => Z.actions.getAvailableFields
21656
+ const f = (X) => {
21657
+ h(X);
21658
+ }, m = R((X) => X.frame), p = R((X) => X.card);
21659
+ R((X) => X.activeTabCardId), R(
21660
+ (X) => X.actions.getAvailableFields
21661
21661
  );
21662
21662
  const { addCard: x, removeCard: b, updateCard: g, setActiveCard: v, updateFilters: M, clearFilters: T } = Ne(), {
21663
21663
  scopedFields: S = [],
@@ -21685,17 +21685,17 @@ function qv() {
21685
21685
  activeCardId: m.activeCardId,
21686
21686
  placeField: y,
21687
21687
  previewFieldPlacement: N
21688
- }), O = ee(() => Um(), []), P = (Z, ie) => {
21689
- ie && M(Z, ie);
21690
- }, $ = (Z) => {
21691
- T(Z);
21692
- }, q = L, j = (Z) => {
21693
- if (!Z) return 0;
21694
- let ie = Z.conditions.length;
21695
- return Z.groups.forEach((z) => {
21696
- ie += j(z);
21688
+ }), O = ee(() => Um(), []), P = (X, ie) => {
21689
+ ie && M(X, ie);
21690
+ }, $ = (X) => {
21691
+ T(X);
21692
+ }, j = L, q = (X) => {
21693
+ if (!X) return 0;
21694
+ let ie = X.conditions.length;
21695
+ return X.groups.forEach((z) => {
21696
+ ie += q(z);
21697
21697
  }), ie;
21698
- }, H = j(Xa(I) || null);
21698
+ }, H = q(Za(I) || null);
21699
21699
  return /* @__PURE__ */ n(
21700
21700
  Ta,
21701
21701
  {
@@ -21766,10 +21766,10 @@ function qv() {
21766
21766
  Tv,
21767
21767
  {
21768
21768
  cardId: I.id,
21769
- filters: Xa(I) || null,
21769
+ filters: Za(I) || null,
21770
21770
  onFiltersChange: P,
21771
21771
  onClearFilters: $,
21772
- availableFields: q,
21772
+ availableFields: j,
21773
21773
  isOpen: r,
21774
21774
  onOpenChange: s
21775
21775
  }
@@ -21780,7 +21780,7 @@ function qv() {
21780
21780
  }
21781
21781
  );
21782
21782
  }
21783
- function jv({ authToken: t, onSave: a, onClose: r }) {
21783
+ function qv({ authToken: t, onSave: a, onClose: r }) {
21784
21784
  const s = R((u) => u.isDevMode), o = $r(), { setAuthToken: d } = So(), { setOnSave: c, setOnClose: l } = Ne();
21785
21785
  we(() => {
21786
21786
  a && c(a), r && l(r);
@@ -21807,7 +21807,7 @@ function jv({ authToken: t, onSave: a, onClose: r }) {
21807
21807
  {
21808
21808
  "data-content": "explorer",
21809
21809
  className: "min-w-[510px] flex-1 basis-0 overflow-hidden",
21810
- children: /* @__PURE__ */ e(qv, {})
21810
+ children: /* @__PURE__ */ e(jv, {})
21811
21811
  }
21812
21812
  ) });
21813
21813
  }
@@ -21884,7 +21884,7 @@ function Sy() {
21884
21884
  "max-h-0 overflow-hidden": !i
21885
21885
  }),
21886
21886
  style: l.dashboardContainerStyle,
21887
- children: /* @__PURE__ */ e(jv, { onSave: f, onClose: m })
21887
+ children: /* @__PURE__ */ e(qv, { onSave: f, onClose: m })
21888
21888
  }
21889
21889
  );
21890
21890
  }