@magemetrics/ai 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react/ai.js CHANGED
@@ -9,20 +9,20 @@ import { atomWithLocation as an } from "jotai-location";
9
9
  import { atomWithImmer as rn } from "jotai-immer";
10
10
  import { desc as tn, from as nn } from "arquero";
11
11
  import ye from "dayjs";
12
- import { Paper as Q, Textarea as Dr, ActionIcon as ce, Text as _, Tooltip as de, Stack as C, Title as J, Group as S, RingProgress as Sr, Center as ca, Loader as U, Box as _e, Modal as se, TypographyStylesProvider as Mr, ScrollArea as $e, Image as Ee, Skeleton as we, Select as on, Accordion as G, Tabs as Le, Button as De, Table as I, Popover as pe, Card as ln, Progress as Qa, Divider as cn, Anchor as sn, Badge as Fr, Flex as Pa, Alert as dn, em as Ia, colorsTuple as mn, createTheme as hn, alpha as bn, MantineProvider as pn, MantineThemeProvider as un } from "@mantine/core";
12
+ import { Paper as Q, Textarea as Dr, ActionIcon as ce, Text as _, Tooltip as de, Stack as C, Title as J, Group as S, RingProgress as Sr, Center as ca, Loader as U, Box as _e, Modal as se, TypographyStylesProvider as Mr, ScrollArea as $e, Image as Ee, Skeleton as we, Select as on, Accordion as G, Tabs as Le, Button as De, Table as I, Popover as pe, Card as ln, Progress as Qa, Divider as cn, Anchor as sn, Badge as Fr, Flex as sa, Alert as dn, em as da, colorsTuple as mn, createTheme as hn, alpha as bn, MantineProvider as pn, MantineThemeProvider as un } from "@mantine/core";
13
13
  import { colorsTuple as vd } from "@mantine/core";
14
14
  import { useChat as vn } from "@ai-sdk/react";
15
15
  import { keyframes as gn, createStyles as Ze, emotionTransform as fn, MantineEmotionProvider as wn } from "@mantine/emotion";
16
16
  import Lr from "react-markdown";
17
- import { useMergedRef as yn, useDisclosure as Er, useHover as _n, useElementSize as Ra, useMediaQuery as Ha } from "@mantine/hooks";
17
+ import { useMergedRef as yn, useDisclosure as Er, useHover as _n, useElementSize as Ha, useMediaQuery as ma } from "@mantine/hooks";
18
18
  import { Bar as xn, Doughnut as kn, Line as zn } from "react-chartjs-2";
19
19
  import Cn from "@kurkle/color";
20
20
  import { notifications as Ja, Notifications as Dn } from "@mantine/notifications";
21
21
  import { Chart as Sn, ArcElement as Xa, CategoryScale as Mn, LinearScale as Fn, BarElement as Ln, Title as En, Tooltip as jn, Legend as An, LogarithmicScale as Tn, LineElement as Pn, PointElement as In } from "chart.js";
22
- import { motion as Se, AnimatePresence as sa } from "framer-motion";
22
+ import { motion as Se, AnimatePresence as ha } from "framer-motion";
23
23
  import Va from "lottie-react";
24
24
  import { WidthProvider as Rn, Responsive as Hn } from "react-grid-layout";
25
- import { flexRender as da, createColumnHelper as jr, useReactTable as Ar, getCoreRowModel as Tr } from "@tanstack/react-table";
25
+ import { flexRender as ba, createColumnHelper as jr, useReactTable as Ar, getCoreRowModel as Tr } from "@tanstack/react-table";
26
26
  import { notUndefined as er, useVirtualizer as Vn } from "@tanstack/react-virtual";
27
27
  import { Handle as ea, Position as aa, useNodesState as Pr, useEdgesState as Ir, useReactFlow as Rr, ReactFlow as Hr, MarkerType as Vr, ReactFlowProvider as Yr } from "@xyflow/react";
28
28
  import ra from "@dagrejs/dagre";
@@ -336,7 +336,7 @@ function so(e, a, r) {
336
336
  typeof r == "function" ? r(e(this)) : r
337
337
  );
338
338
  }
339
- const Ya = {}, Fa = Symbol(
339
+ const Ya = {}, ja = Symbol(
340
340
  (Ya ? "production" : void 0) !== "production" ? "RESET" : ""
341
341
  ), mo = (e) => typeof (e == null ? void 0 : e.then) == "function";
342
342
  function ho(e = () => {
@@ -415,7 +415,7 @@ function po(e, a, r = bo, n) {
415
415
  (l) => l(i),
416
416
  (l, d, s) => {
417
417
  const h = typeof s == "function" ? s(l(i)) : s;
418
- return h === Fa ? (d(i, a), r.removeItem(e)) : h instanceof Promise ? h.then((m) => (d(i, m), r.setItem(e, m))) : (d(i, h), r.setItem(e, h));
418
+ return h === ja ? (d(i, a), r.removeItem(e)) : h instanceof Promise ? h.then((m) => (d(i, m), r.setItem(e, m))) : (d(i, h), r.setItem(e, h));
419
419
  }
420
420
  );
421
421
  }
@@ -456,12 +456,12 @@ const je = {
456
456
  "mm-accordion": void 0,
457
457
  "mm-report-mode": void 0,
458
458
  "mm-chat": void 0
459
- }, tr = Object.keys(ie), La = te("none"), _o = (e) => (window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e)), za = an({
459
+ }, tr = Object.keys(ie), Aa = te("none"), _o = (e) => (window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e)), Sa = an({
460
460
  subscribe: _o,
461
461
  replace: !1
462
- }), Ca = te(
462
+ }), Ma = te(
463
463
  (e) => {
464
- const a = e(za).searchParams, r = {};
464
+ const a = e(Sa).searchParams, r = {};
465
465
  if (a)
466
466
  for (const i of tr)
467
467
  r[i] = a.get(i);
@@ -469,7 +469,7 @@ const je = {
469
469
  return n.success ? { ...ie, ...n.data } : (console.error("Failed to parse URL state:", n.error.flatten()), ie);
470
470
  },
471
471
  (e, a, r) => {
472
- const n = e(za).searchParams ?? new URLSearchParams(), i = new URLSearchParams();
472
+ const n = e(Sa).searchParams ?? new URLSearchParams(), i = new URLSearchParams();
473
473
  let c = !1;
474
474
  for (const l of tr) {
475
475
  const d = r[l], s = ie[l];
@@ -478,7 +478,7 @@ const je = {
478
478
  m !== void 0 && i.set(l, m);
479
479
  }
480
480
  }
481
- n.toString() !== i.toString() && (c = !0), c && a(za, (l) => ({
481
+ n.toString() !== i.toString() && (c = !0), c && a(Sa, (l) => ({
482
482
  ...l,
483
483
  searchParams: i
484
484
  // Update with the clean, new params
@@ -488,24 +488,24 @@ const je = {
488
488
  const r = po(e, a), n = te(a), i = te(
489
489
  // Read the specific property from the central URL state object
490
490
  (l) => {
491
- const s = l(Ca)[e];
491
+ const s = l(Ma)[e];
492
492
  return s !== void 0 ? s : a;
493
493
  },
494
494
  // Write the update to the central URL state object
495
495
  (l, d, s) => {
496
- const h = s === Fa ? a : s, m = l(Ca);
496
+ const h = s === ja ? a : s, m = l(Ma);
497
497
  if (m[e] !== h) {
498
498
  const b = {
499
499
  ...m,
500
500
  [e]: h
501
501
  };
502
- d(Ca, b);
502
+ d(Ma, b);
503
503
  }
504
504
  }
505
505
  );
506
506
  return te(
507
507
  (l) => {
508
- switch (l(La)) {
508
+ switch (l(Aa)) {
509
509
  case "localStorage":
510
510
  return l(r);
511
511
  case "queryParam":
@@ -516,7 +516,7 @@ const je = {
516
516
  }
517
517
  },
518
518
  (l, d, s) => {
519
- switch (l(La)) {
519
+ switch (l(Aa)) {
520
520
  case "localStorage":
521
521
  d(r, s);
522
522
  break;
@@ -525,18 +525,18 @@ const je = {
525
525
  break;
526
526
  case "none":
527
527
  default:
528
- s != Fa && d(n, s);
528
+ s != ja && d(n, s);
529
529
  break;
530
530
  }
531
531
  }
532
532
  );
533
- }, Ea = Re(
533
+ }, Ta = Re(
534
534
  "mm-flow-id",
535
535
  ie["mm-flow-id"]
536
536
  ), ta = Re(
537
537
  "mm-modal",
538
538
  ie["mm-modal"]
539
- ), ja = Re(
539
+ ), Pa = Re(
540
540
  "mm-chat",
541
541
  ie["mm-chat"]
542
542
  ), Pe = Re(
@@ -551,21 +551,21 @@ const je = {
551
551
  ), xo = (e) => {
552
552
  e(Ne, { ...Zr });
553
553
  }, ae = te(
554
- (e) => e(Ea),
554
+ (e) => e(Ta),
555
555
  // Setter - with side effects
556
556
  (e, a, r) => {
557
- xo(a), a(Ea, r), r ? a(ta, "flow") : (a(ta, void 0), a(Pe, void 0));
557
+ xo(a), a(Ta, r), r ? a(ta, "flow") : (a(ta, void 0), a(Pe, void 0));
558
558
  }
559
559
  ), ze = te(
560
560
  (e) => e(ta),
561
561
  // Setter - with side effects
562
562
  (e, a, r) => {
563
- a(ta, r), r ? r !== "exploreData" ? a(Pe, void 0) : (a(ja, "chat"), a(qe, void 0)) : (a(Ea, void 0), a(Pe, void 0));
563
+ a(ta, r), r ? r !== "exploreData" ? a(Pe, void 0) : (a(Pa, "chat"), a(qe, void 0)) : (a(Ta, void 0), a(Pe, void 0));
564
564
  }
565
565
  ), Ge = te(
566
- (e) => e(ja),
566
+ (e) => e(Pa),
567
567
  (e, a, r) => {
568
- a(ja, r), r === "chat" && a(qe, void 0);
568
+ a(Pa, r), r === "chat" && a(qe, void 0);
569
569
  }
570
570
  ), me = () => {
571
571
  const e = K(), a = ue(ae), r = ue(Pe), { data: n } = Y({
@@ -1309,7 +1309,7 @@ const $o = (e, a) => {
1309
1309
  }
1310
1310
  }
1311
1311
  })
1312
- ), ma = Ze(() => ({
1312
+ ), pa = Ze(() => ({
1313
1313
  centered: {
1314
1314
  position: "absolute",
1315
1315
  width: "100vw",
@@ -1429,7 +1429,7 @@ function pi(e) {
1429
1429
  function ht(e) {
1430
1430
  return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M2 12h2a7.986 7.986 0 0 1 2.337-5.663 7.91 7.91 0 0 1 2.542-1.71 8.12 8.12 0 0 1 6.13-.041A2.488 2.488 0 0 0 17.5 7C18.886 7 20 5.886 20 4.5S18.886 2 17.5 2c-.689 0-1.312.276-1.763.725-2.431-.973-5.223-.958-7.635.059a9.928 9.928 0 0 0-3.18 2.139 9.92 9.92 0 0 0-2.14 3.179A10.005 10.005 0 0 0 2 12zm17.373 3.122c-.401.952-.977 1.808-1.71 2.541s-1.589 1.309-2.542 1.71a8.12 8.12 0 0 1-6.13.041A2.488 2.488 0 0 0 6.5 17C5.114 17 4 18.114 4 19.5S5.114 22 6.5 22c.689 0 1.312-.276 1.763-.725A9.965 9.965 0 0 0 12 22a9.983 9.983 0 0 0 9.217-6.102A9.992 9.992 0 0 0 22 12h-2a7.993 7.993 0 0 1-.627 3.122z" }, child: [] }, { tag: "path", attr: { d: "M12 7.462c-2.502 0-4.538 2.036-4.538 4.538S9.498 16.538 12 16.538s4.538-2.036 4.538-4.538S14.502 7.462 12 7.462zm0 7.076c-1.399 0-2.538-1.139-2.538-2.538S10.601 9.462 12 9.462s2.538 1.139 2.538 2.538-1.139 2.538-2.538 2.538z" }, child: [] }] })(e);
1431
1431
  }
1432
- function ha(e) {
1432
+ function ua(e) {
1433
1433
  return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 7h-4V4c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H4c-1.103 0-2 .897-2 2v9a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V9c0-1.103-.897-2-2-2zM4 11h4v8H4v-8zm6-1V4h4v15h-4v-9zm10 9h-4V9h4v10z" }, child: [] }] })(e);
1434
1434
  }
1435
1435
  function bt(e) {
@@ -1745,13 +1745,13 @@ const Ae = ({ children: e, tagText: a, isActive: r, ...n }) => {
1745
1745
  example: "status:active,name:John%20Doe"
1746
1746
  },
1747
1747
  type: "string"
1748
- }), ba = o.object({ flowId: o.string().uuid() }).openapi("FlowId", { type: "string" }), Li = xe({
1748
+ }), va = o.object({ flowId: o.string().uuid() }).openapi("FlowId", { type: "string" }), Li = xe({
1749
1749
  method: "get",
1750
1750
  path: "/api/v1/flows/{flowId}/columns",
1751
1751
  operationId: "retrieveFlowColumns",
1752
1752
  request: {
1753
1753
  headers: Ve,
1754
- params: ba,
1754
+ params: va,
1755
1755
  query: o.object({
1756
1756
  flow_data_id: o.string().pipe(o.coerce.number()).optional().openapi({
1757
1757
  param: {
@@ -1795,7 +1795,7 @@ const Ae = ({ children: e, tagText: a, isActive: r, ...n }) => {
1795
1795
  operationId: "retrieveFlowData",
1796
1796
  request: {
1797
1797
  headers: Ve,
1798
- params: ba,
1798
+ params: va,
1799
1799
  query: o.object({
1800
1800
  limit: Di,
1801
1801
  order: Si,
@@ -1843,7 +1843,7 @@ const Ae = ({ children: e, tagText: a, isActive: r, ...n }) => {
1843
1843
  operationId: "retrieveFlowDataCount",
1844
1844
  request: {
1845
1845
  headers: Ve,
1846
- params: ba,
1846
+ params: va,
1847
1847
  query: o.object({
1848
1848
  flow_data_id: o.string().pipe(o.coerce.number()).optional().openapi({
1849
1849
  param: {
@@ -1889,7 +1889,7 @@ const Ae = ({ children: e, tagText: a, isActive: r, ...n }) => {
1889
1889
  operationId: "retrieveFlow",
1890
1890
  request: {
1891
1891
  headers: Ve,
1892
- params: ba
1892
+ params: va
1893
1893
  },
1894
1894
  responses: {
1895
1895
  200: {
@@ -2290,10 +2290,10 @@ function Ni() {
2290
2290
  D && (N = F[2]), s = this.$locale(), !V && N && (s = x.Ls[N]), this.$d = function(ge, ke, be, We) {
2291
2291
  try {
2292
2292
  if (["x", "X"].indexOf(ke) > -1) return new Date((ke === "X" ? 1e3 : 1) * ge);
2293
- var X = u(ke)(ge), va = X.year, Ue = X.month, Vt = X.day, Yt = X.hours, Ot = X.minutes, Bt = X.seconds, $t = X.milliseconds, Ua = X.zone, Ka = X.week, ga = /* @__PURE__ */ new Date(), fa = Vt || (va || Ue ? 1 : ga.getDate()), wa = va || ga.getFullYear(), Ke = 0;
2294
- va && !Ue || (Ke = Ue > 0 ? Ue - 1 : ga.getMonth());
2295
- var Qe, ya = Yt || 0, _a = Ot || 0, xa = Bt || 0, ka = $t || 0;
2296
- return Ua ? new Date(Date.UTC(wa, Ke, fa, ya, _a, xa, ka + 60 * Ua.offset * 1e3)) : be ? new Date(Date.UTC(wa, Ke, fa, ya, _a, xa, ka)) : (Qe = new Date(wa, Ke, fa, ya, _a, xa, ka), Ka && (Qe = We(Qe).week(Ka).toDate()), Qe);
2293
+ var X = u(ke)(ge), wa = X.year, Ue = X.month, Vt = X.day, Yt = X.hours, Ot = X.minutes, Bt = X.seconds, $t = X.milliseconds, Ua = X.zone, Ka = X.week, ya = /* @__PURE__ */ new Date(), _a = Vt || (wa || Ue ? 1 : ya.getDate()), xa = wa || ya.getFullYear(), Ke = 0;
2294
+ wa && !Ue || (Ke = Ue > 0 ? Ue - 1 : ya.getMonth());
2295
+ var Qe, ka = Yt || 0, za = Ot || 0, Ca = Bt || 0, Da = $t || 0;
2296
+ return Ua ? new Date(Date.UTC(xa, Ke, _a, ka, za, Ca, Da + 60 * Ua.offset * 1e3)) : be ? new Date(Date.UTC(xa, Ke, _a, ka, za, Ca, Da)) : (Qe = new Date(xa, Ke, _a, ka, za, Ca, Da), Ka && (Qe = We(Qe).week(Ka).toDate()), Qe);
2297
2297
  } catch {
2298
2298
  return /* @__PURE__ */ new Date("");
2299
2299
  }
@@ -2351,7 +2351,7 @@ const Ce = (e, a = {}) => {
2351
2351
  maximumFractionDigits: d,
2352
2352
  useGrouping: c
2353
2353
  }).format(e);
2354
- }, pr = (e) => typeof e == "object" && !!e && "display" in e && "sortValue" in e, Aa = 1900, Ta = 2200, Wi = [
2354
+ }, pr = (e) => typeof e == "object" && !!e && "display" in e && "sortValue" in e, Ia = 1900, Ra = 2200, Wi = [
2355
2355
  // ISO 8601 formats
2356
2356
  "YYYY-MM-DDTHH:mm:ss.SSSZ",
2357
2357
  "YYYY-MM-DDTHH:mm:ssZ",
@@ -2388,14 +2388,14 @@ const Ce = (e, a = {}) => {
2388
2388
  const r = ye(e);
2389
2389
  if (r.isValid()) {
2390
2390
  const n = r.year();
2391
- return n >= Aa && n <= Ta;
2391
+ return n >= Ia && n <= Ra;
2392
2392
  }
2393
2393
  }
2394
2394
  return Wi.some((r) => {
2395
2395
  const n = ye(e, r, !0);
2396
2396
  if (n.isValid()) {
2397
2397
  const i = n.year();
2398
- return !(i < Aa || i > Ta);
2398
+ return !(i < Ia || i > Ra);
2399
2399
  }
2400
2400
  return !1;
2401
2401
  });
@@ -2440,7 +2440,7 @@ const Ce = (e, a = {}) => {
2440
2440
  display: String(r),
2441
2441
  sortValue: r ? 1 : 0
2442
2442
  } : typeof r == "number" ? {
2443
- display: r >= Aa && r <= Ta && Number.isInteger(r) ? String(r) : Ce(r),
2443
+ display: r >= Ia && r <= Ra && Number.isInteger(r) ? String(r) : Ce(r),
2444
2444
  sortValue: r
2445
2445
  } : {
2446
2446
  // eslint-disable-next-line @typescript-eslint/no-base-to-string
@@ -2738,7 +2738,7 @@ Sn.register(
2738
2738
  In,
2739
2739
  Xa
2740
2740
  );
2741
- const Da = ({ children: e }) => {
2741
+ const Fa = ({ children: e }) => {
2742
2742
  const a = O(null), r = fe(async () => {
2743
2743
  if (a.current)
2744
2744
  try {
@@ -2805,7 +2805,7 @@ const Da = ({ children: e }) => {
2805
2805
  switch (e.configuration.type) {
2806
2806
  case "doughnut": {
2807
2807
  const i = el.array().safeParse(n);
2808
- return i.data ? /* @__PURE__ */ t(Da, { children: /* @__PURE__ */ t(
2808
+ return i.data ? /* @__PURE__ */ t(Fa, { children: /* @__PURE__ */ t(
2809
2809
  rl,
2810
2810
  {
2811
2811
  title: e.configuration.title,
@@ -2816,7 +2816,7 @@ const Da = ({ children: e }) => {
2816
2816
  }
2817
2817
  case "bar": {
2818
2818
  const i = Qi.array().safeParse(n);
2819
- return i.data ? /* @__PURE__ */ t(Da, { children: /* @__PURE__ */ t(
2819
+ return i.data ? /* @__PURE__ */ t(Fa, { children: /* @__PURE__ */ t(
2820
2820
  Xi,
2821
2821
  {
2822
2822
  title: e.configuration.title,
@@ -2828,7 +2828,7 @@ const Da = ({ children: e }) => {
2828
2828
  }
2829
2829
  case "line": {
2830
2830
  const i = tl.array().safeParse(n);
2831
- return i.data ? /* @__PURE__ */ t(Da, { children: /* @__PURE__ */ t(
2831
+ return i.data ? /* @__PURE__ */ t(Fa, { children: /* @__PURE__ */ t(
2832
2832
  ol,
2833
2833
  {
2834
2834
  title: e.configuration.title,
@@ -2867,7 +2867,7 @@ const Da = ({ children: e }) => {
2867
2867
  const { data: a } = await y.from("flow_data_visualizations").select("*, flow_data!inner(id, flow_id)").eq("id", e).single().throwOnError();
2868
2868
  return a;
2869
2869
  }, cl = ({ visualizationId: e }) => {
2870
- const a = K(), [r, { open: n, close: i }] = Er(!1), { classes: c } = ma(), { data: l, isLoading: d } = Y({
2870
+ const a = K(), [r, { open: n, close: i }] = Er(!1), { classes: c } = pa(), { data: l, isLoading: d } = Y({
2871
2871
  queryKey: ["visualization", e],
2872
2872
  queryFn: () => ll(e),
2873
2873
  enabled: a
@@ -2880,7 +2880,7 @@ const Da = ({ children: e }) => {
2880
2880
  onClick: n,
2881
2881
  isActive: r,
2882
2882
  children: /* @__PURE__ */ v(S, { gap: "xs", wrap: "nowrap", style: { overflow: "hidden" }, children: [
2883
- /* @__PURE__ */ t(C, { children: (l == null ? void 0 : l.configuration.type) === "doughnut" ? /* @__PURE__ */ t(fi, {}) : (l == null ? void 0 : l.configuration.type) === "bar" ? /* @__PURE__ */ t(ha, {}) : /* @__PURE__ */ t(gi, {}) }),
2883
+ /* @__PURE__ */ t(C, { children: (l == null ? void 0 : l.configuration.type) === "doughnut" ? /* @__PURE__ */ t(fi, {}) : (l == null ? void 0 : l.configuration.type) === "bar" ? /* @__PURE__ */ t(ua, {}) : /* @__PURE__ */ t(gi, {}) }),
2884
2884
  /* @__PURE__ */ t(
2885
2885
  le,
2886
2886
  {
@@ -2930,7 +2930,7 @@ const Da = ({ children: e }) => {
2930
2930
  ) }),
2931
2931
  /* @__PURE__ */ t(le, { fw: 500, ff: "heading", truncate: "end", children: "Visualizations in creation" })
2932
2932
  ] }) }) : a.status === "error" ? /* @__PURE__ */ t(Ae, { tagText: "Your visualizations", children: /* @__PURE__ */ v(S, { gap: "xs", wrap: "nowrap", style: { overflow: "hidden" }, children: [
2933
- /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ha, { color: "var(--mantine-color-red-8)" }) }),
2933
+ /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ua, { color: "var(--mantine-color-red-8)" }) }),
2934
2934
  /* @__PURE__ */ t(
2935
2935
  le,
2936
2936
  {
@@ -2989,7 +2989,7 @@ const Da = ({ children: e }) => {
2989
2989
  userSelect: "none"
2990
2990
  }),
2991
2991
  children: /* @__PURE__ */ v(S, { flex: 1, gap: "xs", wrap: "nowrap", style: { overflow: "hidden" }, children: [
2992
- /* @__PURE__ */ t(sa, { mode: "wait", children: e || !a ? /* @__PURE__ */ t(wr, { children: /* @__PURE__ */ t(U, { size: "xs" }) }, "loading") : /* @__PURE__ */ t(wr, { children: /* @__PURE__ */ t(
2992
+ /* @__PURE__ */ t(ha, { mode: "wait", children: e || !a ? /* @__PURE__ */ t(wr, { children: /* @__PURE__ */ t(U, { size: "xs" }) }, "loading") : /* @__PURE__ */ t(wr, { children: /* @__PURE__ */ t(
2993
2993
  Va,
2994
2994
  {
2995
2995
  animationData: a.status === "success" ? Na : jl,
@@ -3263,7 +3263,7 @@ const Da = ({ children: e }) => {
3263
3263
  (e, a, r) => {
3264
3264
  r ? a(ze, "flow") : a(ae, void 0);
3265
3265
  }
3266
- ), pa = te(
3266
+ ), ga = te(
3267
3267
  (e) => {
3268
3268
  const a = e(ae), r = e(ze);
3269
3269
  return !!a && r === "exploreData";
@@ -3272,7 +3272,7 @@ const Da = ({ children: e }) => {
3272
3272
  const n = e(ae);
3273
3273
  r && !n || (r ? a(ze, "exploreData") : e(ze) === "exploreData" && a(ze, "flow"));
3274
3274
  }
3275
- ), Ct = te(null), Sa = ({ item: e, itemType: a, disabled: r, children: n, ...i }) => {
3275
+ ), Ct = te(null), La = ({ item: e, itemType: a, disabled: r, children: n, ...i }) => {
3276
3276
  const c = O(null), [l, d] = ve(Ct), s = () => {
3277
3277
  const m = {
3278
3278
  insightId: e.id,
@@ -3423,7 +3423,7 @@ const Da = ({ children: e }) => {
3423
3423
  /* @__PURE__ */ t(G.Control, { icon: /* @__PURE__ */ t(vi, {}), children: "Data Reports" }),
3424
3424
  /* @__PURE__ */ t(G.Panel, { children: /* @__PURE__ */ v(C, { gap: "xs", children: [
3425
3425
  d.map((b) => /* @__PURE__ */ t(
3426
- Sa,
3426
+ La,
3427
3427
  {
3428
3428
  item: b,
3429
3429
  itemType: je.dataReport,
@@ -3450,7 +3450,7 @@ const Da = ({ children: e }) => {
3450
3450
  /* @__PURE__ */ t(G.Control, { icon: /* @__PURE__ */ t(ht, {}), children: "Key Findings" }),
3451
3451
  /* @__PURE__ */ t(G.Panel, { children: /* @__PURE__ */ v(C, { gap: "xs", children: [
3452
3452
  s.map((b) => /* @__PURE__ */ t(
3453
- Sa,
3453
+ La,
3454
3454
  {
3455
3455
  item: b,
3456
3456
  itemType: je.keyFinding,
@@ -3474,10 +3474,10 @@ const Da = ({ children: e }) => {
3474
3474
  ] }) })
3475
3475
  ] }),
3476
3476
  /* @__PURE__ */ v(G.Item, { value: "visualizations", children: [
3477
- /* @__PURE__ */ t(G.Control, { icon: /* @__PURE__ */ t(ha, {}), children: "Visualizations" }),
3477
+ /* @__PURE__ */ t(G.Control, { icon: /* @__PURE__ */ t(ua, {}), children: "Visualizations" }),
3478
3478
  /* @__PURE__ */ t(G.Panel, { children: /* @__PURE__ */ v(C, { gap: "xs", children: [
3479
3479
  h.map((b) => /* @__PURE__ */ t(
3480
- Sa,
3480
+ La,
3481
3481
  {
3482
3482
  item: b,
3483
3483
  itemType: je.visualization,
@@ -3634,7 +3634,7 @@ const Da = ({ children: e }) => {
3634
3634
  }
3635
3635
  ) });
3636
3636
  }, St = () => {
3637
- const e = B(Ge), a = B(pa);
3637
+ const e = B(Ge), a = B(ga);
3638
3638
  return /* @__PURE__ */ t(
3639
3639
  De,
3640
3640
  {
@@ -3685,7 +3685,7 @@ const Da = ({ children: e }) => {
3685
3685
  maxWidth: m.column.columnDef.maxSize,
3686
3686
  minWidth: m.column.columnDef.minSize
3687
3687
  },
3688
- children: /* @__PURE__ */ t(le, { ff: "monospace", size: "sm", truncate: "end", children: da(m.column.columnDef.cell, m.getContext()) })
3688
+ children: /* @__PURE__ */ t(le, { ff: "monospace", size: "sm", truncate: "end", children: ba(m.column.columnDef.cell, m.getContext()) })
3689
3689
  },
3690
3690
  m.id
3691
3691
  ))
@@ -3933,7 +3933,7 @@ const Da = ({ children: e }) => {
3933
3933
  ...r
3934
3934
  }) => /* @__PURE__ */ t(I.Thead, { ...r, children: e.getHeaderGroups().map((n) => /* @__PURE__ */ t(I.Tr, { children: n.headers.map((i) => {
3935
3935
  var l;
3936
- const c = i.isPlaceholder ? null : da(i.column.columnDef.header, i.getContext());
3936
+ const c = i.isPlaceholder ? null : ba(i.column.columnDef.header, i.getContext());
3937
3937
  return /* @__PURE__ */ t(
3938
3938
  ac,
3939
3939
  {
@@ -3946,7 +3946,10 @@ const Da = ({ children: e }) => {
3946
3946
  },
3947
3947
  i.id
3948
3948
  );
3949
- }) }, n.id)) }), tc = ({ formattedValue: { display: e } }) => e === "empty" ? /* @__PURE__ */ t(_, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : e, nc = (e, a, r) => {
3949
+ }) }, n.id)) }), tc = ({ formattedValue: e }) => {
3950
+ const a = e == null ? void 0 : e.display;
3951
+ return !a || a === "empty" ? /* @__PURE__ */ t(_, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : a;
3952
+ }, nc = (e, a, r) => {
3950
3953
  const n = e.getValue(r), i = a.getValue(r), c = pr(n) ? n.sortValue : null, l = pr(i) ? i.sortValue : null;
3951
3954
  return c === null && l === null ? 0 : c === null ? -1 : l === null ? 1 : c instanceof Date && l instanceof Date ? c.getTime() - l.getTime() : typeof c == "number" && typeof l == "number" ? c - l : String(c).localeCompare(String(l));
3952
3955
  }, oc = jr(), ic = (e) => e.split("_").map((n) => n.length === 0 ? "" : n.charAt(0).toUpperCase() + n.slice(1)).join(" "), lc = ({ dataColumns: e, virtualizer: a, data: r, tableRef: n, explainability: i }) => {
@@ -4024,7 +4027,7 @@ const Da = ({ children: e }) => {
4024
4027
  } = Hi(e, { pageSize: 100 }, a), p = q(
4025
4028
  () => (m == null ? void 0 : m.pages.flatMap((H) => H)) || [],
4026
4029
  [m]
4027
- ), { data: w } = gt(e, a), x = (w == null ? void 0 : w.count) || 0, { data: z } = Gr(a), { ref: E, width: A } = Ra(), { classes: T, cx: P } = $a(), { scrollContainerRef: F, leftFade: j, rightFade: V, handleScroll: D } = cc(A), M = Vn({
4030
+ ), { data: w } = gt(e, a), x = (w == null ? void 0 : w.count) || 0, { data: z } = Gr(a), { ref: E, width: A } = Ha(), { classes: T, cx: P } = $a(), { scrollContainerRef: F, leftFade: j, rightFade: V, handleScroll: D } = cc(A), M = Vn({
4028
4031
  count: u ? p.length + 1 : p.length,
4029
4032
  getScrollElement: () => F.current,
4030
4033
  estimateSize: () => 50,
@@ -4688,7 +4691,7 @@ const mc = ({
4688
4691
  style: { borderColor: "var(--mantine-color-mageGunmetal-0)" },
4689
4692
  size: "compact-sm",
4690
4693
  variant: "outline",
4691
- leftSection: e ? /* @__PURE__ */ t(U, { size: 12, color: "var(--mantine-color-dimmed)" }) : /* @__PURE__ */ t(ha, { size: 14 }),
4694
+ leftSection: e ? /* @__PURE__ */ t(U, { size: 12, color: "var(--mantine-color-dimmed)" }) : /* @__PURE__ */ t(ua, { size: 14 }),
4692
4695
  onClick: i,
4693
4696
  disabled: e || !c,
4694
4697
  color: a ? "red" : void 0,
@@ -4777,7 +4780,7 @@ const mc = ({
4777
4780
  e && a && /* @__PURE__ */ t(Ft, { flowId: e, flowDataId: a })
4778
4781
  ] });
4779
4782
  }, Lc = Se.create(se.Root), Ec = () => {
4780
- const e = B(pa), [a, r] = ve(Ge), { classes: n } = ma();
4783
+ const e = B(ga), [a, r] = ve(Ge), { classes: n } = pa();
4781
4784
  return /* @__PURE__ */ v(
4782
4785
  Lc,
4783
4786
  {
@@ -4873,7 +4876,7 @@ const mc = ({
4873
4876
  throw new Error(n.error);
4874
4877
  return r;
4875
4878
  }
4876
- }), Ac = Object.values(Ie), ua = (e) => Y({
4879
+ }), Ac = Object.values(Ie), fa = (e) => Y({
4877
4880
  ...jc(e),
4878
4881
  enabled: !!e,
4879
4882
  refetchIntervalInBackground: !1,
@@ -4955,7 +4958,7 @@ const mc = ({
4955
4958
  ...a,
4956
4959
  children: e
4957
4960
  }
4958
- ), Pc = ({ table: e, ...a }) => /* @__PURE__ */ t(I.Tbody, { ...a, children: e.getRowModel().rows.map((r) => /* @__PURE__ */ t(I.Tr, { children: r.getVisibleCells().map((n) => /* @__PURE__ */ t(I.Td, { maw: 0, children: /* @__PURE__ */ t(_, { span: !0, ff: "monospace", size: "sm", truncate: "end", children: da(n.column.columnDef.cell, n.getContext()) }) }, n.id)) }, r.id)) }), Fe = ({
4961
+ ), Pc = ({ table: e, ...a }) => /* @__PURE__ */ t(I.Tbody, { ...a, children: e.getRowModel().rows.map((r) => /* @__PURE__ */ t(I.Tr, { children: r.getVisibleCells().map((n) => /* @__PURE__ */ t(I.Td, { maw: 0, children: /* @__PURE__ */ t(_, { span: !0, ff: "monospace", size: "sm", truncate: "end", children: ba(n.column.columnDef.cell, n.getContext()) }) }, n.id)) }, r.id)) }), Fe = ({
4959
4962
  title: e,
4960
4963
  data: { explanation: a }
4961
4964
  }) => /* @__PURE__ */ v(
@@ -5181,7 +5184,7 @@ const mc = ({
5181
5184
  }
5182
5185
  )
5183
5186
  ] }) }), Yc = (e) => {
5184
- const { data: a } = ua(e);
5187
+ const { data: a } = fa(e);
5185
5188
  if (!a) return;
5186
5189
  const r = a.flow_steps.find(
5187
5190
  ({ name: n }) => n == Ie.columnsLineage
@@ -5191,7 +5194,7 @@ const mc = ({
5191
5194
  }, Oc = ({ flowId: e, table: a, ...r }) => {
5192
5195
  const n = Yc(e);
5193
5196
  return /* @__PURE__ */ t(I.Thead, { ...r, children: a.getHeaderGroups().map((i) => /* @__PURE__ */ t(I.Tr, { children: i.headers.map((c) => {
5194
- const l = c.isPlaceholder ? null : da(c.column.columnDef.header, c.getContext());
5197
+ const l = c.isPlaceholder ? null : ba(c.column.columnDef.header, c.getContext());
5195
5198
  return /* @__PURE__ */ t(
5196
5199
  Vc,
5197
5200
  {
@@ -5201,13 +5204,16 @@ const mc = ({
5201
5204
  c.id
5202
5205
  );
5203
5206
  }) }, i.id)) });
5204
- }, Bc = 35, $c = ({ formattedValue: { display: e } }) => e === "empty" ? /* @__PURE__ */ t(_, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : e && e.length > Bc ? /* @__PURE__ */ t(de, { multiline: !0, maw: "25rem", label: e, children: /* @__PURE__ */ t(_, { truncate: "end", children: e }) }) : /* @__PURE__ */ t(_, { truncate: "end", children: e }), Zc = jr(), Nc = (e) => e.split("_").map((n) => n.length === 0 ? "" : n.charAt(0).toUpperCase() + n.slice(1)).join(" "), qc = ({
5207
+ }, Bc = 35, $c = ({ formattedValue: e }) => {
5208
+ const a = e == null ? void 0 : e.display;
5209
+ return !a || a === "empty" ? /* @__PURE__ */ t(_, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : a && a.length > Bc ? /* @__PURE__ */ t(de, { multiline: !0, maw: "25rem", label: a, children: /* @__PURE__ */ t(_, { truncate: "end", children: a }) }) : /* @__PURE__ */ t(_, { truncate: "end", children: a });
5210
+ }, Zc = jr(), Nc = (e) => e.split("_").map((n) => n.length === 0 ? "" : n.charAt(0).toUpperCase() + n.slice(1)).join(" "), qc = ({
5205
5211
  flowId: e,
5206
5212
  dataColumns: a,
5207
5213
  data: r,
5208
5214
  emptyTable: n
5209
5215
  }) => {
5210
- const i = O(null), { ref: c, width: l } = Ra(), [d, s] = R(!1), [h, m] = R(!1), { classes: b, cx: g } = $a(), f = (w) => {
5216
+ const i = O(null), { ref: c, width: l } = Ha(), [d, s] = R(!1), [h, m] = R(!1), { classes: b, cx: g } = $a(), f = (w) => {
5211
5217
  if (i.current) {
5212
5218
  const x = i.current, z = x.scrollWidth - x.clientWidth;
5213
5219
  z !== 0 ? (s(w > 0), m(Math.ceil(w) < Math.floor(z))) : (s(!1), m(!1));
@@ -5260,7 +5266,7 @@ const mc = ({
5260
5266
  r && !r.length && n
5261
5267
  ] });
5262
5268
  }, Gc = (e) => {
5263
- const { data: a } = ua(e);
5269
+ const { data: a } = fa(e);
5264
5270
  if (!a) return;
5265
5271
  const r = a.flow_steps.find(
5266
5272
  ({ name: n }) => n == Ie.confidenceScore
@@ -5322,7 +5328,7 @@ const mc = ({
5322
5328
  /* @__PURE__ */ t(Ee, { m: "auto", w: 100, alt: "Empty messages", src: Mt }),
5323
5329
  /* @__PURE__ */ t(_, { size: "sm", c: "dimmed", children: "This resulting data is empty" })
5324
5330
  ] }), Qc = ({ step: e }) => {
5325
- const { classes: a, cx: r } = Uc(), n = B(pa), { data: i, isPending: c } = Tc(e.flow_id), { data: l } = ct(), { data: d, isPending: s } = vt(
5331
+ const { classes: a, cx: r } = Uc(), n = B(ga), { data: i, isPending: c } = Tc(e.flow_id), { data: l } = ct(), { data: d, isPending: s } = vt(
5326
5332
  e.flow_id,
5327
5333
  i
5328
5334
  ), { data: h, isPending: m } = wt(
@@ -5388,7 +5394,7 @@ const mc = ({
5388
5394
  ] });
5389
5395
  }, Wa = (e) => {
5390
5396
  var h, m;
5391
- const a = ua(e), r = (h = a.data) == null ? void 0 : h.flow_steps.find(
5397
+ const a = fa(e), r = (h = a.data) == null ? void 0 : h.flow_steps.find(
5392
5398
  (b) => b.name === Ie.shortlistColumns
5393
5399
  ), n = (m = a.data) == null ? void 0 : m.flow_steps.find(
5394
5400
  (b) => b.name === Ie.executeProcedure
@@ -5432,7 +5438,7 @@ const mc = ({
5432
5438
  highlight: n,
5433
5439
  disabled: !c,
5434
5440
  rightSection: /* @__PURE__ */ v(S, { children: [
5435
- /* @__PURE__ */ t(sa, { mode: "popLayout", children: r == null ? void 0 : r.rightSection }),
5441
+ /* @__PURE__ */ t(ha, { mode: "popLayout", children: r == null ? void 0 : r.rightSection }),
5436
5442
  i && /* @__PURE__ */ t(U, { type: "dots" })
5437
5443
  ] }),
5438
5444
  isOpened: e,
@@ -5440,9 +5446,9 @@ const mc = ({
5440
5446
  }
5441
5447
  );
5442
5448
  }, Xc = ({ flowId: e }) => {
5443
- const { allCompleted: a } = Wa(e), r = B(pa);
5449
+ const { allCompleted: a } = Wa(e), r = B(ga);
5444
5450
  return a ? /* @__PURE__ */ t(
5445
- Pa,
5451
+ sa,
5446
5452
  {
5447
5453
  mx: "xs",
5448
5454
  px: "md",
@@ -5507,7 +5513,7 @@ const mc = ({
5507
5513
  );
5508
5514
  }, zr = () => /* @__PURE__ */ t(_, { children: "We're getting clear on your needs..." }), as = (e) => {
5509
5515
  var h, m;
5510
- const a = ua(e), r = Ha(`(max-width: ${Ia(750)})`), n = (h = a.data) == null ? void 0 : h.flow_steps.find(
5516
+ const a = fa(e), r = ma(`(max-width: ${da(750)})`), n = (h = a.data) == null ? void 0 : h.flow_steps.find(
5511
5517
  (b) => b.name === Ie.analyzeRequest
5512
5518
  ), i = (n == null ? void 0 : n.status) === "completed", c = Tt(i), l = q(() => Or(n).with(void 0, () => ({
5513
5519
  rightSection: /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(_, { children: "Your request" }) }, "tasks-0"),
@@ -5558,7 +5564,7 @@ const mc = ({
5558
5564
  highlight: n,
5559
5565
  disabled: !c,
5560
5566
  rightSection: /* @__PURE__ */ v(S, { children: [
5561
- /* @__PURE__ */ t(sa, { mode: "popLayout", children: r == null ? void 0 : r.rightSection }),
5567
+ /* @__PURE__ */ t(ha, { mode: "popLayout", children: r == null ? void 0 : r.rightSection }),
5562
5568
  i && /* @__PURE__ */ t(U, { type: "dots" })
5563
5569
  ] }),
5564
5570
  isOpened: e,
@@ -5566,7 +5572,7 @@ const mc = ({
5566
5572
  }
5567
5573
  );
5568
5574
  }, ts = ({ flowId: e }) => {
5569
- const a = O(null), { ref: r, height: n } = Ra(), [i, c] = R(!1), [l, d] = R(void 0), { classes: s, cx: h } = $a(), { allCompleted: m } = Wa(e);
5575
+ const a = O(null), { ref: r, height: n } = Ha(), [i, c] = R(!1), [l, d] = R(void 0), { classes: s, cx: h } = $a(), { allCompleted: m } = Wa(e);
5570
5576
  L(() => {
5571
5577
  m && d((f) => [...f || [], "data"]);
5572
5578
  }, [m]), L(() => {
@@ -5655,7 +5661,7 @@ const mc = ({
5655
5661
  }
5656
5662
  }
5657
5663
  }, ns = Se.create(se.Root), os = () => {
5658
- const e = ue(ae), a = B(Nl), { classes: r } = ma();
5664
+ const e = ue(ae), a = B(Nl), { classes: r } = pa();
5659
5665
  return e ? /* @__PURE__ */ v(
5660
5666
  ns,
5661
5667
  {
@@ -5958,13 +5964,13 @@ ${r}`);
5958
5964
  /* @__PURE__ */ t(_, { size: "sm", c: "dimmed", children: r })
5959
5965
  ] })
5960
5966
  }
5961
- ), Ma = () => /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ v(Pa, { direction: "column", gap: "sm", children: [
5967
+ ), Ea = () => /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ v(sa, { direction: "column", gap: "sm", children: [
5962
5968
  /* @__PURE__ */ t(we, { width: "10%", height: 10 }),
5963
5969
  /* @__PURE__ */ t(we, { width: "75%", height: 14 })
5964
5970
  ] }) }), us = ({
5965
5971
  startFlow: e
5966
5972
  }) => {
5967
- const { data: a, status: r } = cs(), n = Ha(`(max-width: ${Ia(750)})`), i = q(() => a == null ? void 0 : a.slice(0, 3), [a]);
5973
+ const { data: a, status: r } = cs(), n = ma(`(max-width: ${da(750)})`), i = q(() => a == null ? void 0 : a.slice(0, 3), [a]);
5968
5974
  return /* @__PURE__ */ v(C, { flex: 1, children: [
5969
5975
  /* @__PURE__ */ t(J, { size: "md", fw: 600, tt: "uppercase", children: "Recommendations based on your data" }),
5970
5976
  /* @__PURE__ */ t(S, { wrap: "nowrap", align: "stretch", gap: n ? "xs" : "md", children: r === "success" ? i == null ? void 0 : i.map((c) => /* @__PURE__ */ t(
@@ -5977,16 +5983,16 @@ ${r}`);
5977
5983
  },
5978
5984
  c.starter
5979
5985
  )) : /* @__PURE__ */ v(ia, { children: [
5980
- /* @__PURE__ */ t(Ma, {}),
5981
- /* @__PURE__ */ t(Ma, {}),
5982
- /* @__PURE__ */ t(Ma, {})
5986
+ /* @__PURE__ */ t(Ea, {}),
5987
+ /* @__PURE__ */ t(Ea, {}),
5988
+ /* @__PURE__ */ t(Ea, {})
5983
5989
  ] }) })
5984
5990
  ] });
5985
5991
  }, vs = Se.create(C), gs = Se.create(se.Root), fs = ({
5986
5992
  children: e,
5987
5993
  onClose: a
5988
5994
  }) => {
5989
- const { classes: r } = ma();
5995
+ const { classes: r } = pa();
5990
5996
  return /* @__PURE__ */ v(
5991
5997
  gs,
5992
5998
  {
@@ -6041,7 +6047,7 @@ ${r}`);
6041
6047
  showRecommendations: a,
6042
6048
  onClose: r
6043
6049
  }) => {
6044
- const [n, i] = R(!1), c = K(), { classes: l } = st({}), d = Ha(`(max-width: ${Ia(750)})`), s = B(ae), { mutate: h } = Ri({
6050
+ const [n, i] = R(!1), c = K(), { classes: l } = st({}), d = ma(`(max-width: ${da(750)})`), s = B(ae), { mutate: h } = Ri({
6045
6051
  onSuccess: (w) => {
6046
6052
  s(w.flowId);
6047
6053
  }
@@ -6070,9 +6076,6 @@ ${r}`);
6070
6076
  vs,
6071
6077
  {
6072
6078
  flex: 1,
6073
- w: d ? "95%" : 600,
6074
- justify: "flex-end",
6075
- style: { alignSelf: "center" },
6076
6079
  initial: "hidden",
6077
6080
  animate: "visible",
6078
6081
  exit: "hidden",
@@ -6117,7 +6120,7 @@ ${r}`);
6117
6120
  px: "sm",
6118
6121
  bg: "var(--mantine-color-whiteGradient)",
6119
6122
  children: /* @__PURE__ */ v(
6120
- Pa,
6123
+ sa,
6121
6124
  {
6122
6125
  gap: n ? "xs" : "lg",
6123
6126
  direction: n ? "column" : "row",
@@ -6192,21 +6195,24 @@ ${r}`);
6192
6195
  showRecentDashboards: e,
6193
6196
  showRecommendations: a,
6194
6197
  onClose: r
6195
- }) => r != null ? /* @__PURE__ */ t(fs, { onClose: r, children: /* @__PURE__ */ t(
6196
- Cr,
6197
- {
6198
- showRecentDashboards: e,
6199
- showRecommendations: a,
6200
- onClose: r
6201
- }
6202
- ) }) : /* @__PURE__ */ t(
6203
- Cr,
6204
- {
6205
- showRecentDashboards: e,
6206
- showRecommendations: a,
6207
- onClose: r
6208
- }
6209
- ), ys = {
6198
+ }) => {
6199
+ const n = ma(`(max-width: ${da(750)})`);
6200
+ return r != null ? /* @__PURE__ */ t(fs, { onClose: r, children: /* @__PURE__ */ t(sa, { h: "100%", align: "end", w: n ? "95%" : 600, mx: "auto", children: /* @__PURE__ */ t(
6201
+ Cr,
6202
+ {
6203
+ showRecentDashboards: e,
6204
+ showRecommendations: a,
6205
+ onClose: r
6206
+ }
6207
+ ) }) }) : /* @__PURE__ */ t(
6208
+ Cr,
6209
+ {
6210
+ showRecentDashboards: e,
6211
+ showRecommendations: a,
6212
+ onClose: r
6213
+ }
6214
+ );
6215
+ }, ys = {
6210
6216
  mageMagenta: [
6211
6217
  "#EED4EB",
6212
6218
  // 0
@@ -6474,7 +6480,7 @@ ${r}`);
6474
6480
  showRecommendations: r
6475
6481
  }) => {
6476
6482
  const n = ue(ae), i = ue(ze), c = !!n, l = c && i === "flow", d = c && i === "exploreData";
6477
- return /* @__PURE__ */ v(sa, { mode: "wait", children: [
6483
+ return /* @__PURE__ */ v(ha, { mode: "wait", children: [
6478
6484
  d && /* @__PURE__ */ t(Ec, {}),
6479
6485
  l && /* @__PURE__ */ t(os, {}),
6480
6486
  !(l || d) && /* @__PURE__ */ t(
@@ -6496,7 +6502,7 @@ ${r}`);
6496
6502
  startOptions: l = void 0,
6497
6503
  theme: d = void 0
6498
6504
  }) => {
6499
- const s = B(La);
6505
+ const s = B(Aa);
6500
6506
  L(() => {
6501
6507
  s(i);
6502
6508
  }, [i, s]);
@@ -6537,7 +6543,7 @@ ${r}`);
6537
6543
  "#shadow-content-root"
6538
6544
  ), f || (console.warn(
6539
6545
  "Shadow root existed but container was missing. Recreating."
6540
- ), f = document.createElement("div"), f.id = "shadow-content-root", g.appendChild(f)), f.style.display = c.display || "contents") : (g = b.attachShadow({ mode: a, delegatesFocus: r }), f = document.createElement("div"), f.id = "shadow-content-root", g.appendChild(f)), s.current = g, !f) {
6546
+ ), f = document.createElement("div"), f.id = "shadow-content-root", g.appendChild(f))) : (g = b.attachShadow({ mode: a, delegatesFocus: r }), f = document.createElement("div"), f.id = "shadow-content-root", g.appendChild(f)), f.style.display = c.display || "contents", s.current = g, !f) {
6541
6547
  console.error(
6542
6548
  "Failed to find or create the React root container inside the shadow DOM."
6543
6549
  ), m(!1);
@@ -1,4 +1,4 @@
1
- import { g as o } from "./web-component-BC-1HsSF.js";
1
+ import { g as o } from "./web-component-CSFSUg2K.js";
2
2
  var r, e;
3
3
  function t() {
4
4
  return e || (e = 1, r = function() {
@@ -12259,7 +12259,7 @@ class RealtimeClient {
12259
12259
  close: () => {
12260
12260
  this.conn = null;
12261
12261
  }
12262
- }), import("./browser-P0ubu0oY.js").then((R) => R.b).then(({ default: R }) => {
12262
+ }), import("./browser-sDEj-xS6.js").then((R) => R.b).then(({ default: R }) => {
12263
12263
  this.conn = new R(this.endpointURL(), void 0, {
12264
12264
  headers: this.headers
12265
12265
  }), this.setupConnection();
@@ -94115,7 +94115,10 @@ const Dagre = /* @__PURE__ */ getDefaultExportFromCjs(dagreExports), getLayouted
94115
94115
  },
94116
94116
  F.id
94117
94117
  );
94118
- }) }, D.id)) }), CellContent$1 = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C, sortingFn = (C, R, M) => {
94118
+ }) }, D.id)) }), CellContent$1 = ({ formattedValue: C }) => {
94119
+ const R = C == null ? void 0 : C.display;
94120
+ return !R || R === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : R;
94121
+ }, sortingFn = (C, R, M) => {
94119
94122
  const D = C.getValue(M), F = R.getValue(M), H = isFormattedData(D) ? D.sortValue : null, U = isFormattedData(F) ? F.sortValue : null;
94120
94123
  return H === null && U === null ? 0 : H === null ? -1 : U === null ? 1 : H instanceof Date && U instanceof Date ? H.getTime() - U.getTime() : typeof H == "number" && typeof U == "number" ? H - U : String(H).localeCompare(String(U));
94121
94124
  }, columnHelper$1 = createColumnHelper(), formatColumnName$1 = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), InfiniteTable = ({ dataColumns: C, virtualizer: R, data: M, tableRef: D, explainability: F }) => {
@@ -95610,7 +95613,10 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95610
95613
  H.id
95611
95614
  );
95612
95615
  }) }, F.id)) });
95613
- }, MAX_CELL_CHAR_LENGTH = 35, CellContent = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C && C.length > MAX_CELL_CHAR_LENGTH ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, maw: "25rem", label: C, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }), columnHelper = createColumnHelper(), formatColumnName = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), Table = ({
95616
+ }, MAX_CELL_CHAR_LENGTH = 35, CellContent = ({ formattedValue: C }) => {
95617
+ const R = C == null ? void 0 : C.display;
95618
+ return !R || R === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : R && R.length > MAX_CELL_CHAR_LENGTH ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, maw: "25rem", label: R, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: R }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: R });
95619
+ }, columnHelper = createColumnHelper(), formatColumnName = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), Table = ({
95614
95620
  flowId: C,
95615
95621
  dataColumns: R,
95616
95622
  data: M,
@@ -97107,9 +97113,6 @@ ${M}`);
97107
97113
  MotionStack,
97108
97114
  {
97109
97115
  flex: 1,
97110
- w: q ? "95%" : 600,
97111
- justify: "flex-end",
97112
- style: { alignSelf: "center" },
97113
97116
  initial: "hidden",
97114
97117
  animate: "visible",
97115
97118
  exit: "hidden",
@@ -97229,21 +97232,24 @@ ${M}`);
97229
97232
  showRecentDashboards: C,
97230
97233
  showRecommendations: R,
97231
97234
  onClose: M
97232
- }) => M != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ControlledMageMetricsModal, { onClose: M, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
97233
- ModalContent,
97234
- {
97235
- showRecentDashboards: C,
97236
- showRecommendations: R,
97237
- onClose: M
97238
- }
97239
- ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
97240
- ModalContent,
97241
- {
97242
- showRecentDashboards: C,
97243
- showRecommendations: R,
97244
- onClose: M
97245
- }
97246
- ), defaultColors = {
97235
+ }) => {
97236
+ const D = useMediaQuery(`(max-width: ${em(750)})`);
97237
+ return M != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ControlledMageMetricsModal, { onClose: M, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { h: "100%", align: "end", w: D ? "95%" : 600, mx: "auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
97238
+ ModalContent,
97239
+ {
97240
+ showRecentDashboards: C,
97241
+ showRecommendations: R,
97242
+ onClose: M
97243
+ }
97244
+ ) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
97245
+ ModalContent,
97246
+ {
97247
+ showRecentDashboards: C,
97248
+ showRecommendations: R,
97249
+ onClose: M
97250
+ }
97251
+ );
97252
+ }, defaultColors = {
97247
97253
  mageMagenta: [
97248
97254
  "#EED4EB",
97249
97255
  // 0
@@ -1,4 +1,4 @@
1
- import { a as o, c as r, l as s } from "./web-component-BC-1HsSF.js";
1
+ import { a as o, c as r, l as s } from "./web-component-CSFSUg2K.js";
2
2
  export {
3
3
  o as colorsTuple,
4
4
  r as createMagemetrics,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magemetrics/ai",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@ai-sdk/react": "^1.2.5",