@devtable/dashboard 5.2.0 → 5.3.0

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.
@@ -3,11 +3,11 @@ var Fa = (e, t, n) => t in e ? Va(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var z = (e, t, n) => (Fa(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { Box as B, Text as C, Button as T, Checkbox as st, MultiSelect as On, Select as j, TextInput as E, Group as y, Stack as R, ActionIcon as P, LoadingOverlay as Gt, Table as Bt, Tabs as k, Textarea as Pn, AppShell as zn, Modal as Fe, Divider as Z, SimpleGrid as $a, NumberInput as ke, Menu as ve, Tooltip as Ea, Paper as Ma, Code as Tr, Switch as ze, useMantineTheme as ka, ColorInput as Aa, ColorSwatch as Lr, Slider as so, createStyles as Tn, Popover as pn, Accordion as q, SegmentedControl as Oa, JsonInput as Pa } from "@mantine/core";
5
5
  import { useModals as za, ModalsProvider as uo } from "@mantine/modals";
6
- import { useRequest as jt, useBoolean as _t, useCreation as We, useAsyncEffect as Rt, useLatest as Nr } from "ahooks";
6
+ import { useRequest as jt, useBoolean as _t, useCreation as Ue, useAsyncEffect as Rt, useLatest as Nr } from "ahooks";
7
7
  import { observer as V } from "mobx-react-lite";
8
8
  import * as qr from "react";
9
9
  import w, { useEffect as ne, forwardRef as Ln, useMemo as G, useState as be, createElement as Ht, useCallback as Tt, useRef as Ta, useContext as Le, createContext as La } from "react";
10
- import U, { omit as Ut, get as de, values as co, unset as Na, isObject as go, set as po, orderBy as qa, last as Ga, noop as Ba, defaults as ue, isEqual as Te, defaultsDeep as ot, findLastIndex as ja, isEmpty as fo, isNumber as Ha, isString as ho, range as Ua, cloneDeep as mo, maxBy as vo, merge as bo, minBy as Wa, groupBy as Ya, template as yo, cloneDeepWith as Qa, throttle as Xa } from "lodash";
10
+ import W, { omit as Wt, get as de, values as co, unset as Na, isObject as go, set as po, orderBy as qa, last as Ga, noop as Ba, defaults as ue, isEqual as Te, defaultsDeep as ot, findLastIndex as ja, isEmpty as fo, isNumber as Ha, isString as ho, range as Wa, cloneDeep as mo, maxBy as vo, merge as bo, minBy as Ua, groupBy as Ya, template as yo, cloneDeepWith as Qa, throttle as Xa } from "lodash";
11
11
  import { useForm as Ne, Controller as D, useFieldArray as Ae } from "react-hook-form";
12
12
  import { DateRangePicker as Ja } from "@mantine/dates";
13
13
  import Ye from "dayjs";
@@ -17,7 +17,7 @@ import { Prism as nt } from "@mantine/prism";
17
17
  import { cast as Je, types as x, addDisposer as _o, getRoot as Gr, flow as cl, toGenerator as dl } from "mobx-state-tree";
18
18
  import { randomId as Se, useClipboard as gl, useElementSize as _n, useInputState as Ro } from "@mantine/hooks";
19
19
  import Do, { RichTextEditor as Io } from "@mantine/rte";
20
- import { makeAutoObservable as Nn, runInAction as yt, observable as Vo, toJS as Wt, reaction as Yt } from "mobx";
20
+ import { makeAutoObservable as Nn, runInAction as yt, observable as Vo, toJS as Ut, reaction as Yt } from "mobx";
21
21
  import { showNotification as qn } from "@mantine/notifications";
22
22
  import Br from "eventemitter2";
23
23
  import wt from "chroma-js";
@@ -59,7 +59,7 @@ function Oo(e, t) {
59
59
  return;
60
60
  }
61
61
  Object.entries(o).forEach(([l, s]) => {
62
- e.filters.setValueByKey(l, U.get(a, s));
62
+ e.filters.setValueByKey(l, W.get(a, s));
63
63
  });
64
64
  };
65
65
  return window.addEventListener("set-filter-values", n), () => {
@@ -68,7 +68,7 @@ function Oo(e, t) {
68
68
  }, [e]);
69
69
  }
70
70
  const Sl = {
71
- viewPanelInFullScreen: U.noop,
71
+ viewPanelInFullScreen: W.noop,
72
72
  inFullScreen: !1
73
73
  }, Bn = w.createContext(Sl), Po = w.createContext(null), zo = Po.Provider;
74
74
  function ee() {
@@ -135,8 +135,8 @@ function Rl() {
135
135
  }
136
136
  function A(h, _, I) {
137
137
  {
138
- var M = F.ReactDebugCurrentFrame, W = M.getStackAddendum();
139
- W !== "" && (_ += "%s", I = I.concat([W]));
138
+ var M = F.ReactDebugCurrentFrame, U = M.getStackAddendum();
139
+ U !== "" && (_ += "%s", I = I.concat([U]));
140
140
  var X = I.map(function(H) {
141
141
  return String(H);
142
142
  });
@@ -152,8 +152,8 @@ function Rl() {
152
152
  var M = h.displayName;
153
153
  if (M)
154
154
  return M;
155
- var W = _.displayName || _.name || "";
156
- return W !== "" ? I + "(" + W + ")" : I;
155
+ var U = _.displayName || _.name || "";
156
+ return U !== "" ? I + "(" + U + ")" : I;
157
157
  }
158
158
  function De(h) {
159
159
  return h.displayName || "Context";
@@ -193,7 +193,7 @@ function Rl() {
193
193
  var M = h.displayName || null;
194
194
  return M !== null ? M : he(h.type) || "Memo";
195
195
  case p: {
196
- var W = h, X = W._payload, H = W._init;
196
+ var U = h, X = U._payload, H = U._init;
197
197
  try {
198
198
  return he(H(X));
199
199
  } catch {
@@ -271,8 +271,8 @@ function Rl() {
271
271
  if (an === void 0)
272
272
  try {
273
273
  throw Error();
274
- } catch (W) {
275
- var M = W.stack.trim().match(/\n( *(at )?)/);
274
+ } catch (U) {
275
+ var M = U.stack.trim().match(/\n( *(at )?)/);
276
276
  an = M && M[1] || "";
277
277
  }
278
278
  return `
@@ -294,7 +294,7 @@ function Rl() {
294
294
  }
295
295
  var M;
296
296
  ln = !0;
297
- var W = Error.prepareStackTrace;
297
+ var U = Error.prepareStackTrace;
298
298
  Error.prepareStackTrace = void 0;
299
299
  var X;
300
300
  X = on.current, on.current = null, ra();
@@ -350,7 +350,7 @@ function Rl() {
350
350
  }
351
351
  }
352
352
  } finally {
353
- ln = !1, on.current = X, oa(), Error.prepareStackTrace = W;
353
+ ln = !1, on.current = X, oa(), Error.prepareStackTrace = U;
354
354
  }
355
355
  var at = h ? h.displayName || h.name : "", zr = at ? Vt(at) : "";
356
356
  return typeof h == "function" && Ft.set(h, zr), zr;
@@ -382,9 +382,9 @@ function Rl() {
382
382
  case f:
383
383
  return $t(h.type, _, I);
384
384
  case p: {
385
- var M = h, W = M._payload, X = M._init;
385
+ var M = h, U = M._payload, X = M._init;
386
386
  try {
387
- return $t(X(W), _, I);
387
+ return $t(X(U), _, I);
388
388
  } catch {
389
389
  }
390
390
  }
@@ -399,7 +399,7 @@ function Rl() {
399
399
  } else
400
400
  Dr.setExtraStackFrame(null);
401
401
  }
402
- function sa(h, _, I, M, W) {
402
+ function sa(h, _, I, M, U) {
403
403
  {
404
404
  var X = Function.call.bind(Et);
405
405
  for (var H in h)
@@ -414,7 +414,7 @@ function Rl() {
414
414
  } catch (te) {
415
415
  N = te;
416
416
  }
417
- N && !(N instanceof Error) && (Mt(W), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", M || "React class", I, H, typeof N), Mt(null)), N instanceof Error && !(N.message in Rr) && (Rr[N.message] = !0, Mt(W), $("Failed %s type: %s", I, N.message), Mt(null));
417
+ N && !(N instanceof Error) && (Mt(U), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", M || "React class", I, H, typeof N), Mt(null)), N instanceof Error && !(N.message in Rr) && (Rr[N.message] = !0, Mt(U), $("Failed %s type: %s", I, N.message), Mt(null));
418
418
  }
419
419
  }
420
420
  }
@@ -493,7 +493,7 @@ function Rl() {
493
493
  });
494
494
  }
495
495
  }
496
- var ba = function(h, _, I, M, W, X, H) {
496
+ var ba = function(h, _, I, M, U, X, H) {
497
497
  var N = {
498
498
  $$typeof: t,
499
499
  type: h,
@@ -516,13 +516,13 @@ function Rl() {
516
516
  configurable: !1,
517
517
  enumerable: !1,
518
518
  writable: !1,
519
- value: W
519
+ value: U
520
520
  }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
521
521
  };
522
- function ya(h, _, I, M, W) {
522
+ function ya(h, _, I, M, U) {
523
523
  {
524
524
  var X, H = {}, N = null, ge = null;
525
- I !== void 0 && (Vr(I), N = "" + I), fa(_) && (Vr(_.key), N = "" + _.key), pa(_) && (ge = _.ref, ha(_, W));
525
+ I !== void 0 && (Vr(I), N = "" + I), fa(_) && (Vr(_.key), N = "" + _.key), pa(_) && (ge = _.ref, ha(_, U));
526
526
  for (X in _)
527
527
  Et.call(_, X) && !ga.hasOwnProperty(X) && (H[X] = _[X]);
528
528
  if (h && h.defaultProps) {
@@ -534,7 +534,7 @@ function Rl() {
534
534
  var re = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
535
535
  N && ma(H, re), ge && va(H, re);
536
536
  }
537
- return ba(h, N, ge, W, M, ft.current, H);
537
+ return ba(h, N, ge, U, M, ft.current, H);
538
538
  }
539
539
  }
540
540
  var cn = F.ReactCurrentOwner, Er = F.ReactDebugCurrentFrame;
@@ -611,9 +611,9 @@ Check the top-level render call using <` + I + ">.");
611
611
  else if (gn(h))
612
612
  h._store && (h._store.validated = !0);
613
613
  else if (h) {
614
- var W = S(h);
615
- if (typeof W == "function" && W !== h.entries)
616
- for (var X = W.call(h), H; !(H = X.next()).done; )
614
+ var U = S(h);
615
+ if (typeof U == "function" && U !== h.entries)
616
+ for (var X = U.call(h), H; !(H = X.next()).done; )
617
617
  gn(H.value) && Ar(H.value, _);
618
618
  }
619
619
  }
@@ -635,8 +635,8 @@ Check the top-level render call using <` + I + ">.");
635
635
  sa(I, h.props, "prop", M, h);
636
636
  } else if (_.PropTypes !== void 0 && !dn) {
637
637
  dn = !0;
638
- var W = he(_);
639
- $("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", W || "Unknown");
638
+ var U = he(_);
639
+ $("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", U || "Unknown");
640
640
  }
641
641
  typeof _.getDefaultProps == "function" && !_.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
642
642
  }
@@ -653,18 +653,18 @@ Check the top-level render call using <` + I + ">.");
653
653
  h.ref !== null && (it(h), $("Invalid attribute `ref` supplied to `React.Fragment`."), it(null));
654
654
  }
655
655
  }
656
- function Pr(h, _, I, M, W, X) {
656
+ function Pr(h, _, I, M, U, X) {
657
657
  {
658
658
  var H = Re(h);
659
659
  if (!H) {
660
660
  var N = "";
661
661
  (h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
662
- var ge = xa(W);
662
+ var ge = xa(U);
663
663
  ge ? N += ge : N += Mr();
664
664
  var te;
665
665
  h === null ? te = "null" : sn(h) ? te = "array" : h !== void 0 && h.$$typeof === t ? (te = "<" + (he(h.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : te = typeof h, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", te, N);
666
666
  }
667
- var re = ya(h, _, I, W, X);
667
+ var re = ya(h, _, I, U, X);
668
668
  if (re == null)
669
669
  return re;
670
670
  if (H) {
@@ -762,7 +762,7 @@ const To = V(({
762
762
  value: n = [null, null],
763
763
  onChange: r
764
764
  }) => {
765
- const o = n.map((l) => l ? Ye(l).toDate() : null);
765
+ const o = Array.isArray(n) ? n.map((l) => l ? Ye(l).toDate() : null) : [null, null];
766
766
  return /* @__PURE__ */ i(Ja, {
767
767
  label: e,
768
768
  value: o,
@@ -796,7 +796,7 @@ function jn(e, t = {}) {
796
796
  }
797
797
  function Hn(e, t, n) {
798
798
  const r = { ...e, filters: n }, o = t.reduce((a, l) => (a[l.key] = jn(l.value, r), a), {});
799
- return U.merge({}, o, e, { filters: n });
799
+ return W.merge({}, { context: e, filters: n, sql_snippets: o });
800
800
  }
801
801
  function Lo(e, t, n, r) {
802
802
  try {
@@ -825,7 +825,7 @@ const rt = {
825
825
  return ["POST", "PUT"].includes(e) && (l.data = r.string ? JSON.stringify(n) : n), ul(l).then((s) => s.data).catch((s) => Promise.reject(s));
826
826
  };
827
827
  }
828
- }, Un = ({ type: e, key: t, sql: n }) => async () => {
828
+ }, Wn = ({ type: e, key: t, sql: n }) => async () => {
829
829
  if (!e || !t || !n)
830
830
  return [];
831
831
  try {
@@ -837,13 +837,8 @@ const rt = {
837
837
  async function Vl({ context: e, sqlSnippets: t, title: n, query: r, filterValues: o }) {
838
838
  if (!r.sql)
839
839
  return [];
840
- const { type: a, key: l, sql: s } = r, u = s.includes("$");
841
- try {
842
- const g = Hn(e, t, o), c = jn(s, g);
843
- return u && (console.groupCollapsed(`Final SQL for: ${n}`), console.log(c), console.groupEnd()), await rt.getRequest("POST")("/query", { type: a, key: l, query: c });
844
- } catch (g) {
845
- return console.error(g), [];
846
- }
840
+ const { type: a, key: l, sql: s } = r, u = s.includes("$"), g = Hn(e, t, o), c = jn(s, g);
841
+ return u && (console.groupCollapsed(`Final SQL for: ${n}`), console.log(c), console.groupEnd()), await rt.getRequest("POST")("/query", { type: a, key: l, query: c });
847
842
  }
848
843
  async function Fl() {
849
844
  try {
@@ -871,7 +866,7 @@ function $l({
871
866
  const o = !!t.options_query.sql, {
872
867
  data: a = [],
873
868
  loading: l
874
- } = jt(Un(t.options_query), {
869
+ } = jt(Wn(t.options_query), {
875
870
  refreshDeps: [t.options_query, o]
876
871
  });
877
872
  return /* @__PURE__ */ i(On, {
@@ -894,7 +889,7 @@ function El({
894
889
  const o = !!t.options_query.sql, {
895
890
  data: a = [],
896
891
  loading: l
897
- } = jt(Un(t.options_query), {
892
+ } = jt(Wn(t.options_query), {
898
893
  refreshDeps: [t.options_query, o]
899
894
  });
900
895
  return /* @__PURE__ */ i(j, {
@@ -1020,7 +1015,7 @@ const kl = V(({
1020
1015
  });
1021
1016
  }), Al = {
1022
1017
  layoutFrozen: !1,
1023
- freezeLayout: U.noop,
1018
+ freezeLayout: W.noop,
1024
1019
  inEditMode: !1,
1025
1020
  inUseMode: !0
1026
1021
  }, $e = w.createContext(Al), Go = w.createContext({
@@ -1055,12 +1050,8 @@ WHERE
1055
1050
  context: o,
1056
1051
  filters: r.filters.values
1057
1052
  };
1058
- if (t) {
1059
- const s = r.sqlSnippets.current.reduce((u, g) => (u[g.key] = g.value, u), {});
1060
- l.sql_snippets = s;
1061
- }
1062
- return JSON.stringify(l, null, 2);
1063
- }, [o, r.sqlSnippets.current, r.filters.values, t]);
1053
+ return t && (l.sql_snippets = r.sqlSnippets.record), JSON.stringify(l, null, 2);
1054
+ }, [o, r.sqlSnippets.record, r.filters.values, t]);
1064
1055
  return /* @__PURE__ */ d(R, {
1065
1056
  sx: {
1066
1057
  border: "1px solid #eee",
@@ -1245,7 +1236,7 @@ const jo = V(function({
1245
1236
  });
1246
1237
  }
1247
1238
  });
1248
- }), Uo = V(({
1239
+ }), Wo = V(({
1249
1240
  value: e
1250
1241
  }) => {
1251
1242
  const t = ee(), n = t.context.current, r = w.useMemo(() => Lo(e, n, t.sqlSnippets.current, t.filters.values), [e, n, t.sqlSnippets.current, t.filters.values]);
@@ -1372,7 +1363,7 @@ const jo = V(function({
1372
1363
  }), /* @__PURE__ */ i(k.Panel, {
1373
1364
  value: "Preview",
1374
1365
  pt: "sm",
1375
- children: /* @__PURE__ */ i(Uo, {
1366
+ children: /* @__PURE__ */ i(Wo, {
1376
1367
  value: t.sql
1377
1368
  })
1378
1369
  })]
@@ -1616,7 +1607,7 @@ function Hl() {
1616
1607
  })
1617
1608
  });
1618
1609
  }
1619
- const Ul = V(function({
1610
+ const Wl = V(function({
1620
1611
  opened: t,
1621
1612
  close: n
1622
1613
  }) {
@@ -1658,7 +1649,7 @@ const Ul = V(function({
1658
1649
  });
1659
1650
  });
1660
1651
  var Ce = /* @__PURE__ */ ((e) => (e.Select = "select", e.MultiSelect = "multi-select", e.TextInput = "text-input", e.Checkbox = "checkbox", e.DateRange = "date-range", e))(Ce || {});
1661
- const Wo = x.model({
1652
+ const Uo = x.model({
1662
1653
  type: x.enumeration("DataSourceType", [Me.Postgresql, Me.MySQL, Me.HTTP]),
1663
1654
  key: x.string,
1664
1655
  sql: x.string
@@ -1675,7 +1666,7 @@ const Wo = x.model({
1675
1666
  })), Qo = () => Yo.create({
1676
1667
  required: !1,
1677
1668
  default_value: ""
1678
- }), Wl = V(function({
1669
+ }), Ul = V(function({
1679
1670
  config: t
1680
1671
  }) {
1681
1672
  return /* @__PURE__ */ i(K, {
@@ -1781,7 +1772,7 @@ const Jl = V(function({
1781
1772
  data: n = [],
1782
1773
  loading: r,
1783
1774
  refresh: o
1784
- } = jt(Un(t), {
1775
+ } = jt(Wn(t), {
1785
1776
  refreshDeps: [t]
1786
1777
  });
1787
1778
  return /* @__PURE__ */ d(R, {
@@ -1861,7 +1852,7 @@ const Jl = V(function({
1861
1852
  }), /* @__PURE__ */ i(k.Panel, {
1862
1853
  value: "Preview",
1863
1854
  pt: "sm",
1864
- children: /* @__PURE__ */ i(Uo, {
1855
+ children: /* @__PURE__ */ i(Wo, {
1865
1856
  value: t.sql
1866
1857
  })
1867
1858
  }), /* @__PURE__ */ i(k.Panel, {
@@ -2082,7 +2073,7 @@ const Jl = V(function({
2082
2073
  select: Zl,
2083
2074
  "multi-select": Kl,
2084
2075
  "text-input": es,
2085
- checkbox: Wl,
2076
+ checkbox: Ul,
2086
2077
  "date-range": Ql
2087
2078
  }, rs = [{
2088
2079
  label: "Select",
@@ -2219,6 +2210,10 @@ const is = V(function() {
2219
2210
  },
2220
2211
  children: t.filters.current.map((o) => /* @__PURE__ */ i(k.Tab, {
2221
2212
  value: o.id,
2213
+ sx: {
2214
+ maxWidth: "100%",
2215
+ overflow: "scroll"
2216
+ },
2222
2217
  children: o.label
2223
2218
  }, o.id))
2224
2219
  }), /* @__PURE__ */ i(T, {
@@ -2441,7 +2436,7 @@ const us = V(() => {
2441
2436
  children: e
2442
2437
  })
2443
2438
  })
2444
- })), Ur = "TRIGGER_TO_ADD", ms = V(({
2439
+ })), Wr = "TRIGGER_TO_ADD", ms = V(({
2445
2440
  value: e,
2446
2441
  onChange: t,
2447
2442
  triggerAdd: n,
@@ -2450,7 +2445,7 @@ const us = V(() => {
2450
2445
  }) => {
2451
2446
  const a = G(() => [...o, {
2452
2447
  label: "Add a View",
2453
- value: Ur,
2448
+ value: Wr,
2454
2449
  type: "TRIGGER_TO_ADD"
2455
2450
  }], [o, n]);
2456
2451
  return /* @__PURE__ */ d(y, {
@@ -2462,7 +2457,7 @@ const us = V(() => {
2462
2457
  children: [/* @__PURE__ */ i(j, {
2463
2458
  value: e,
2464
2459
  onChange: (s) => {
2465
- s !== Ur ? t(s) : n();
2460
+ s !== Wr ? t(s) : n();
2466
2461
  },
2467
2462
  placeholder: "Pick a View",
2468
2463
  itemComponent: hs,
@@ -2650,7 +2645,7 @@ const Jo = V(function({
2650
2645
  }), /* @__PURE__ */ i(as, {
2651
2646
  opened: p,
2652
2647
  close: v
2653
- }), /* @__PURE__ */ i(Ul, {
2648
+ }), /* @__PURE__ */ i(Wl, {
2654
2649
  opened: u,
2655
2650
  close: f
2656
2651
  }), /* @__PURE__ */ i(bs, {
@@ -2677,7 +2672,7 @@ const Ko = V(() => {
2677
2672
  children: /* @__PURE__ */ i(Do, {
2678
2673
  readOnly: !0,
2679
2674
  value: r.description,
2680
- onChange: U.noop,
2675
+ onChange: W.noop,
2681
2676
  sx: {
2682
2677
  border: "none"
2683
2678
  }
@@ -2809,7 +2804,7 @@ const _s = V((e) => {
2809
2804
  operationId: a,
2810
2805
  instance: l,
2811
2806
  variables: s
2812
- } = e, u = We(() => new ys(o, l), [o, l]);
2807
+ } = e, u = Ue(() => new ys(o, l), [o, l]);
2813
2808
  return Rt(async () => {
2814
2809
  await u.configOperation(a, s);
2815
2810
  }, [a, u]), xs(u) ? /* @__PURE__ */ d(K, {
@@ -2862,7 +2857,7 @@ function Ds(e) {
2862
2857
  return !!e.triggerId && !!e.triggerSchema;
2863
2858
  }
2864
2859
  function Is(e, t) {
2865
- return We(() => new Rs(e, t), [e, t]);
2860
+ return Ue(() => new Rs(e, t), [e, t]);
2866
2861
  }
2867
2862
  const Vs = V(({
2868
2863
  model: e,
@@ -2937,7 +2932,7 @@ class lt {
2937
2932
  async deleteItem(t) {
2938
2933
  t === null && await this.root.deleteItem(this.path);
2939
2934
  const n = await this.root.getItem(this.path) || {};
2940
- await this.root.setItem(this.path, Ut(n, t));
2935
+ await this.root.setItem(this.path, Wt(n, t));
2941
2936
  }
2942
2937
  async getItem(t) {
2943
2938
  const n = await this.root.getItem(this.path);
@@ -2969,7 +2964,7 @@ class lt {
2969
2964
  );
2970
2965
  }
2971
2966
  }
2972
- class Wn {
2967
+ class Un {
2973
2968
  constructor(t, n, r) {
2974
2969
  z(this, "attachmentStorage");
2975
2970
  this.instance = t, this.attachmentKey = n, this.constructInstance = r, this.attachmentStorage = new lt(t.instanceData, n);
@@ -3008,7 +3003,7 @@ class ei {
3008
3003
  return Promise.resolve(n);
3009
3004
  }
3010
3005
  getValueFromRoot(t) {
3011
- return t === null ? Wt(this.rootRef.current) : de(this.rootRef.current, [t]);
3006
+ return t === null ? Ut(this.rootRef.current) : de(this.rootRef.current, [t]);
3012
3007
  }
3013
3008
  setItem(t, n) {
3014
3009
  if (t === null)
@@ -3105,7 +3100,7 @@ const As = (e) => {
3105
3100
  return /* @__PURE__ */ i(s, {
3106
3101
  context: l,
3107
3102
  instance: a,
3108
- ...Ut(e, ["panel", "vizManager", "data"])
3103
+ ...Wt(e, ["panel", "vizManager", "data"])
3109
3104
  });
3110
3105
  }, Os = (e) => {
3111
3106
  const {
@@ -3120,7 +3115,7 @@ const As = (e) => {
3120
3115
  return /* @__PURE__ */ i(u, {
3121
3116
  context: s,
3122
3117
  instance: l,
3123
- ...Ut(e, ["panel", "vizManager", "data", "panelInfoEditor"])
3118
+ ...Wt(e, ["panel", "vizManager", "data", "panelInfoEditor"])
3124
3119
  });
3125
3120
  }, ni = (e, t) => {
3126
3121
  const n = wt.bezier(e), r = wt.bezier(t);
@@ -3168,7 +3163,7 @@ const As = (e) => {
3168
3163
  getColor: Jt(["#fff7f1", "darkorange", "#b60000"]),
3169
3164
  name: "orange",
3170
3165
  category: "sequential"
3171
- }, Gs = "5.2.0";
3166
+ }, Gs = "5.3.0";
3172
3167
  class Bs {
3173
3168
  constructor(t) {
3174
3169
  z(this, "staticColors", /* @__PURE__ */ new Map());
@@ -3296,7 +3291,7 @@ function ri(e) {
3296
3291
  e && ((o = (r = (n = t.current) == null ? void 0 : n.editor) == null ? void 0 : r.clipboard) == null || o.dangerouslyPasteHTML(e));
3297
3292
  }, [e]), t;
3298
3293
  }
3299
- function Us({
3294
+ function Ws({
3300
3295
  context: e
3301
3296
  }) {
3302
3297
  const {
@@ -3323,7 +3318,7 @@ function Us({
3323
3318
  }
3324
3319
  }) : null;
3325
3320
  }
3326
- function Ws({
3321
+ function Us({
3327
3322
  context: e
3328
3323
  }) {
3329
3324
  const {
@@ -3374,7 +3369,7 @@ function Ws({
3374
3369
  sx: {
3375
3370
  flex: 1
3376
3371
  },
3377
- ...Ut(f, "ref")
3372
+ ...Wt(f, "ref")
3378
3373
  })
3379
3374
  })]
3380
3375
  })
@@ -3399,8 +3394,8 @@ const Qs = {
3399
3394
  displayName: "RichText",
3400
3395
  migrator: new Ys(),
3401
3396
  name: "richText",
3402
- viewRender: Us,
3403
- configRender: Ws,
3397
+ viewRender: Ws,
3398
+ configRender: Us,
3404
3399
  createConfig: () => Yn
3405
3400
  }, Qn = {
3406
3401
  align: "center",
@@ -3744,7 +3739,7 @@ function ru({
3744
3739
  a((p) => [...p, ""]);
3745
3740
  }, [a]), s = w.useCallback((p) => {
3746
3741
  a((m) => (m.splice(p, 1), [...m]));
3747
- }, [a]), u = w.useMemo(() => !U.isEqual(o, t), [o, t]), g = () => {
3742
+ }, [a]), u = w.useMemo(() => !W.isEqual(o, t), [o, t]), g = () => {
3748
3743
  n(o.map((p) => p.toString()));
3749
3744
  }, c = ka(), f = w.useMemo(() => Object.entries(c.colors).map(([p, m]) => m[6]), [c]);
3750
3745
  return /* @__PURE__ */ d(K, {
@@ -3896,7 +3891,7 @@ function su({
3896
3891
  a((c) => [...c, ""]);
3897
3892
  }, [a]), s = w.useCallback((c) => {
3898
3893
  a((f) => (f.splice(c, 1), [...f]));
3899
- }, [a]), u = w.useMemo(() => !U.isEqual(o, t), [o, t]);
3894
+ }, [a]), u = w.useMemo(() => !W.isEqual(o, t), [o, t]);
3900
3895
  return /* @__PURE__ */ d(K, {
3901
3896
  children: [/* @__PURE__ */ d(y, {
3902
3897
  position: "left",
@@ -3948,8 +3943,8 @@ const uu = w.forwardRef(su), cu = w.forwardRef(function({
3948
3943
  onChange: n
3949
3944
  }, r) {
3950
3945
  const o = t.color.type, a = (l, s) => {
3951
- const u = U.cloneDeep(t);
3952
- U.set(u, l, s), n(u);
3946
+ const u = W.cloneDeep(t);
3947
+ W.set(u, l, s), n(u);
3953
3948
  };
3954
3949
  return /* @__PURE__ */ d(K, {
3955
3950
  children: [/* @__PURE__ */ i(Z, {
@@ -4019,8 +4014,8 @@ const uu = w.forwardRef(su), cu = w.forwardRef(function({
4019
4014
  withStyle: o = !0
4020
4015
  }, a) {
4021
4016
  const l = (s, u) => {
4022
- const g = U.cloneDeep(t);
4023
- U.set(g, s, u), n(g);
4017
+ const g = W.cloneDeep(t);
4018
+ W.set(g, s, u), n(g);
4024
4019
  };
4025
4020
  return /* @__PURE__ */ d(B, {
4026
4021
  px: "sm",
@@ -4075,15 +4070,15 @@ function Jn(e, t, n) {
4075
4070
  const r = e.map((u) => u[t]);
4076
4071
  switch (n.type) {
4077
4072
  case "sum":
4078
- return U.sum(r);
4073
+ return W.sum(r);
4079
4074
  case "mean":
4080
- return U.mean(r);
4075
+ return W.mean(r);
4081
4076
  case "median":
4082
4077
  return du(r);
4083
4078
  case "max":
4084
- return (o = U.max(r)) != null ? o : 0;
4079
+ return (o = W.max(r)) != null ? o : 0;
4085
4080
  case "min":
4086
- return (a = U.min(r)) != null ? a : 0;
4081
+ return (a = W.min(r)) != null ? a : 0;
4087
4082
  case "quantile":
4088
4083
  return (l = pl(r, n.config.p)) != null ? l : 0;
4089
4084
  default:
@@ -4189,7 +4184,7 @@ const fi = { test: vu, parse: gi, createTransformer: pi, getAnimatableNone: yu }
4189
4184
  function mn(e, t, n) {
4190
4185
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
4191
4186
  }
4192
- function Wr({ hue: e, saturation: t, lightness: n, alpha: r }) {
4187
+ function Ur({ hue: e, saturation: t, lightness: n, alpha: r }) {
4193
4188
  e /= 360, t /= 100, n /= 100;
4194
4189
  let o = 0, a = 0, l = 0;
4195
4190
  if (!t)
@@ -4212,7 +4207,7 @@ const xu = (e, t, n) => {
4212
4207
  let n = Yr(e), r = Yr(t);
4213
4208
  St(!!n, Qr(e)), St(!!r, Qr(t));
4214
4209
  let o = n.parse(e), a = r.parse(t);
4215
- n === tt && (o = Wr(o), n = je), r === tt && (a = Wr(a), r = je);
4210
+ n === tt && (o = Ur(o), n = je), r === tt && (a = Ur(a), r = je);
4216
4211
  const l = Object.assign({}, o);
4217
4212
  return (s) => {
4218
4213
  for (const u in l)
@@ -4507,7 +4502,7 @@ function qu({
4507
4502
  w.useEffect(() => {
4508
4503
  g(o);
4509
4504
  }, [o]), s(["variables", "template"]);
4510
- const c = u(), f = w.useMemo(() => !U.isEqual(c, n), [c, n]);
4505
+ const c = u(), f = w.useMemo(() => !W.isEqual(c, n), [c, n]);
4511
4506
  return /* @__PURE__ */ i(R, {
4512
4507
  mt: "md",
4513
4508
  spacing: "xs",
@@ -4594,14 +4589,14 @@ const Nt = {
4594
4589
  *
4595
4590
  * @license MIT
4596
4591
  */
4597
- function Ue(e, t) {
4592
+ function We(e, t) {
4598
4593
  return typeof e == "function" ? e(t) : e;
4599
4594
  }
4600
4595
  function _e(e, t) {
4601
4596
  return (n) => {
4602
4597
  t.setState((r) => ({
4603
4598
  ...r,
4604
- [e]: Ue(n, r[e])
4599
+ [e]: We(n, r[e])
4605
4600
  }));
4606
4601
  };
4607
4602
  }
@@ -4926,7 +4921,7 @@ const Ot = {
4926
4921
  deltaPercentage: null,
4927
4922
  isResizingColumn: !1,
4928
4923
  columnSizingStart: []
4929
- }), Uu = {
4924
+ }), Wu = {
4930
4925
  getDefaultColumnDef: () => Ot,
4931
4926
  getInitialState: (e) => ({
4932
4927
  columnSizing: {},
@@ -5026,7 +5021,7 @@ const Ot = {
5026
5021
  upHandler: (m) => {
5027
5022
  document.removeEventListener("mousemove", f.moveHandler), document.removeEventListener("mouseup", f.upHandler), c(m.clientX);
5028
5023
  }
5029
- }, p = Wu() ? {
5024
+ }, p = Uu() ? {
5030
5025
  passive: !1
5031
5026
  } : !1;
5032
5027
  yn(o) || (document.addEventListener("mousemove", f.moveHandler, p), document.addEventListener("mouseup", f.upHandler, p)), t.setColumnSizingInfo((m) => ({
@@ -5071,7 +5066,7 @@ const Ot = {
5071
5066
  })
5072
5067
  };
5073
5068
  let Pt = null;
5074
- function Wu() {
5069
+ function Uu() {
5075
5070
  if (typeof Pt == "boolean")
5076
5071
  return Pt;
5077
5072
  let e = !1;
@@ -5300,7 +5295,7 @@ const Qu = {
5300
5295
  },
5301
5296
  setFilterValue: (n) => {
5302
5297
  t.setColumnFilters((r) => {
5303
- const o = e.getFilterFn(), a = r == null ? void 0 : r.find((c) => c.id === e.id), l = Ue(n, a ? a.value : void 0);
5298
+ const o = e.getFilterFn(), a = r == null ? void 0 : r.find((c) => c.id === e.id), l = We(n, a ? a.value : void 0);
5304
5299
  if (Kr(o, l, e)) {
5305
5300
  var s;
5306
5301
  return (s = r == null ? void 0 : r.filter((c) => c.id !== e.id)) != null ? s : [];
@@ -5342,7 +5337,7 @@ const Qu = {
5342
5337
  setColumnFilters: (t) => {
5343
5338
  const n = e.getAllLeafColumns(), r = (o) => {
5344
5339
  var a;
5345
- return (a = Ue(t, o)) == null ? void 0 : a.filter((l) => {
5340
+ return (a = We(t, o)) == null ? void 0 : a.filter((l) => {
5346
5341
  const s = n.find((u) => u.id === l.id);
5347
5342
  if (s) {
5348
5343
  const u = s.getFilterFn();
@@ -5571,7 +5566,7 @@ const lc = {
5571
5566
  }
5572
5567
  },
5573
5568
  setPagination: (r) => {
5574
- const o = (a) => Ue(r, a);
5569
+ const o = (a) => We(r, a);
5575
5570
  return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(o);
5576
5571
  },
5577
5572
  resetPagination: (r) => {
@@ -5580,7 +5575,7 @@ const lc = {
5580
5575
  },
5581
5576
  setPageIndex: (r) => {
5582
5577
  e.setPagination((o) => {
5583
- let a = Ue(r, o.pageIndex);
5578
+ let a = We(r, o.pageIndex);
5584
5579
  const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
5585
5580
  return a = Math.min(Math.max(0, a), l), {
5586
5581
  ...o,
@@ -5598,7 +5593,7 @@ const lc = {
5598
5593
  },
5599
5594
  setPageSize: (r) => {
5600
5595
  e.setPagination((o) => {
5601
- const a = Math.max(1, Ue(r, o.pageSize)), l = o.pageSize * o.pageIndex, s = Math.floor(l / a);
5596
+ const a = Math.max(1, We(r, o.pageSize)), l = o.pageSize * o.pageIndex, s = Math.floor(l / a);
5602
5597
  return {
5603
5598
  ...o,
5604
5599
  pageIndex: s,
@@ -5608,7 +5603,7 @@ const lc = {
5608
5603
  },
5609
5604
  setPageCount: (r) => e.setPagination((o) => {
5610
5605
  var a;
5611
- let l = Ue(r, (a = e.options.pageCount) != null ? a : -1);
5606
+ let l = We(r, (a = e.options.pageCount) != null ? a : -1);
5612
5607
  return typeof l == "number" && (l = Math.max(-1, l)), {
5613
5608
  ...o,
5614
5609
  pageCount: l
@@ -6170,7 +6165,7 @@ const vt = {
6170
6165
  }
6171
6166
  };
6172
6167
  }
6173
- }, eo = [Hu, bc, lc, uc, Qu, vc, ic, Yu, sc, cc, Uu];
6168
+ }, eo = [Hu, bc, lc, uc, Qu, vc, ic, Yu, sc, cc, Wu];
6174
6169
  function yc(e) {
6175
6170
  var t;
6176
6171
  (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
@@ -6211,7 +6206,7 @@ function yc(e) {
6211
6206
  n.setState(n.initialState);
6212
6207
  },
6213
6208
  setOptions: (c) => {
6214
- const f = Ue(c, n.options);
6209
+ const f = We(c, n.options);
6215
6210
  n.options = o(f);
6216
6211
  },
6217
6212
  getState: () => n.options.state,
@@ -6501,7 +6496,7 @@ function Vc(e) {
6501
6496
  const Fc = ({
6502
6497
  vizManager: e,
6503
6498
  instance: t
6504
- }) => We(
6499
+ }) => Ue(
6505
6500
  () => new Li(t, e.resolveComponent(t.type), pr),
6506
6501
  [t, e]
6507
6502
  ), $c = (e, t) => {
@@ -6696,14 +6691,14 @@ const jc = Tn((e) => ({
6696
6691
  }
6697
6692
  }
6698
6693
  }));
6699
- function Uc(e) {
6694
+ function Wc(e) {
6700
6695
  return e ? wt(e).oklch()[0] > 0.7 ? "black" : "white" : "inherit";
6701
6696
  }
6702
- function Wc(e) {
6697
+ function Uc(e) {
6703
6698
  const t = e.tableCellContext.bgColor;
6704
6699
  return {
6705
6700
  backgroundColor: t,
6706
- color: Uc(t)
6701
+ color: Wc(t)
6707
6702
  };
6708
6703
  }
6709
6704
  function rn(e) {
@@ -6713,7 +6708,7 @@ function rn(e) {
6713
6708
  return /* @__PURE__ */ i("div", {
6714
6709
  className: n.classes.content,
6715
6710
  style: {
6716
- ...Wc(e)
6711
+ ...Uc(e)
6717
6712
  },
6718
6713
  children: /* @__PURE__ */ i(C, {
6719
6714
  className: "table-cell-text",
@@ -6977,7 +6972,7 @@ class rd {
6977
6972
  steps: Vo
6978
6973
  }, {
6979
6974
  deep: !1
6980
- }), Yt(() => Wt(this.steps), () => {
6975
+ }), Yt(() => Ut(this.steps), () => {
6981
6976
  this.notifyStepChange();
6982
6977
  });
6983
6978
  }
@@ -7087,7 +7082,7 @@ const id = V(({
7087
7082
  }) => {
7088
7083
  const {
7089
7084
  classes: t
7090
- } = Ai(), n = Ua(0, 13, 1).map((r) => 100 / 12 * r).map((r) => [e.interpolation.getColor(r), r]);
7085
+ } = Ai(), n = Wa(0, 13, 1).map((r) => 100 / 12 * r).map((r) => [e.interpolation.getColor(r), r]);
7091
7086
  return /* @__PURE__ */ i("div", {
7092
7087
  className: t.palette,
7093
7088
  children: n.map(([r, o], a) => /* @__PURE__ */ i(od, {
@@ -7098,7 +7093,7 @@ const id = V(({
7098
7093
  }, r))
7099
7094
  });
7100
7095
  }), ad = V(function(t) {
7101
- const n = We(() => new rd(), []);
7096
+ const n = Ue(() => new rd(), []);
7102
7097
  return ne(() => {
7103
7098
  n.fromProps(t);
7104
7099
  }), n.interpolation == null ? null : /* @__PURE__ */ i(id, {
@@ -7124,7 +7119,7 @@ const id = V(({
7124
7119
  }));
7125
7120
  }
7126
7121
  const m = () => {
7127
- c(), n == null || n(Wt(a));
7122
+ c(), n == null || n(Ut(a));
7128
7123
  };
7129
7124
  function b(S) {
7130
7125
  l((F) => ({
@@ -7806,7 +7801,7 @@ function Id({
7806
7801
  yAxis3D: g,
7807
7802
  zAxis3D: c
7808
7803
  } = ue({}, t, ar), f = G(() => {
7809
- const b = Wa(n, (v) => v[s]);
7804
+ const b = Ua(n, (v) => v[s]);
7810
7805
  return de(b, s);
7811
7806
  }, [n, s]), p = G(() => {
7812
7807
  const b = vo(n, (v) => v[s]);
@@ -8079,7 +8074,7 @@ function Md({
8079
8074
  xAxisData: c,
8080
8075
  boxplotData: f
8081
8076
  } = G(() => {
8082
- const m = U.groupBy(n, a.data_key);
8077
+ const m = W.groupBy(n, a.data_key);
8083
8078
  return {
8084
8079
  xAxisData: Object.keys(m),
8085
8080
  boxplotData: Object.values(m).map((b) => b.map((v) => v[l.data_key]))
@@ -8557,7 +8552,7 @@ function qd({ regressions: e = [] }, t) {
8557
8552
  }
8558
8553
  function Gd(e, t, n, r) {
8559
8554
  const o = t.map((a) => [a[n], a[r]]);
8560
- return U.unionBy(o, e, 0);
8555
+ return W.unionBy(o, e, 0);
8561
8556
  }
8562
8557
  function Bd(e, t, n) {
8563
8558
  const r = t.reduce((o, a) => {
@@ -8627,7 +8622,7 @@ function Hd(e, t, n, r) {
8627
8622
  const o = t.map((l) => [l, 0]);
8628
8623
  return e.series.map((l) => jd(e, l, o, n, r)).flat().concat(Bd(e.reference_lines, e.variables, n));
8629
8624
  }
8630
- function Ud(e, t) {
8625
+ function Wd(e, t) {
8631
8626
  const n = e.series.reduce(
8632
8627
  (r, { yAxisIndex: o, name: a }) => (r[a] = o, r),
8633
8628
  {}
@@ -8648,7 +8643,7 @@ function Ud(e, t) {
8648
8643
  }
8649
8644
  };
8650
8645
  }
8651
- function Wd(e, t, n) {
8646
+ function Ud(e, t, n) {
8652
8647
  var r;
8653
8648
  return [
8654
8649
  {
@@ -8733,12 +8728,12 @@ function Xd(e, t) {
8733
8728
  {
8734
8729
  default: ({ value: g }) => g
8735
8730
  }
8736
- ), r = U.uniq(t.map((g) => g[e.x_axis_data_key])), o = Hd(e, r, t, n), { regressionDataSets: a, regressionSeries: l, regressionXAxes: s } = qd(e, t), u = {
8737
- xAxis: Wd(e, r, s),
8731
+ ), r = W.uniq(t.map((g) => g[e.x_axis_data_key])), o = Hd(e, r, t, n), { regressionDataSets: a, regressionSeries: l, regressionXAxes: s } = qd(e, t), u = {
8732
+ xAxis: Ud(e, r, s),
8738
8733
  yAxis: Yd(e, n),
8739
8734
  dataset: [...a],
8740
8735
  series: [...o, ...l],
8741
- tooltip: Ud(e, n),
8736
+ tooltip: Wd(e, n),
8742
8737
  grid: Nd(e)
8743
8738
  };
8744
8739
  return ot({}, u, Qd);
@@ -10434,7 +10429,7 @@ function kg(e, t) {
10434
10429
  },
10435
10430
  color: n
10436
10431
  };
10437
- return U.merge({}, Mg, a);
10432
+ return W.merge({}, Mg, a);
10438
10433
  }
10439
10434
  const ur = {
10440
10435
  series_name_key: "name",
@@ -10757,7 +10752,7 @@ const Bg = {
10757
10752
  };
10758
10753
  function jg(e, t) {
10759
10754
  var a, l;
10760
- const n = U.uniqBy(
10755
+ const n = W.uniqBy(
10761
10756
  t.map((s) => [s[e.x_axis.data_key], s[e.regression.y_axis_data_key]]),
10762
10757
  0
10763
10758
  ), { regressionSeries: r } = Gg(e, n), o = {
@@ -10966,7 +10961,7 @@ const cr = {
10966
10961
  };
10967
10962
  ce.use([Qt, Eo, dt, gt, pt, Ze]);
10968
10963
  ce.registerTransform(Mo.regression);
10969
- function Ug({
10964
+ function Wg({
10970
10965
  context: e
10971
10966
  }) {
10972
10967
  const {
@@ -11052,7 +11047,7 @@ function Ug({
11052
11047
  })]
11053
11048
  });
11054
11049
  }
11055
- const Wg = [{
11050
+ const Ug = [{
11056
11051
  label: "Linear",
11057
11052
  value: "linear"
11058
11053
  }, {
@@ -11113,7 +11108,7 @@ function Yg({
11113
11108
  field: o
11114
11109
  }) => /* @__PURE__ */ i(j, {
11115
11110
  label: "Method",
11116
- data: Wg,
11111
+ data: Ug,
11117
11112
  sx: {
11118
11113
  flex: 1
11119
11114
  },
@@ -11281,7 +11276,7 @@ const Jg = {
11281
11276
  displayName: "Regression Chart",
11282
11277
  migrator: new Xg(),
11283
11278
  name: "regressionChart",
11284
- viewRender: Ug,
11279
+ viewRender: Wg,
11285
11280
  configRender: Qg,
11286
11281
  createConfig: () => cr
11287
11282
  }, dr = {
@@ -11875,7 +11870,7 @@ class wp {
11875
11870
  operationData: new lt(o, "data")
11876
11871
  };
11877
11872
  };
11878
- this.attachments = new Wn(t, "__OPERATIONS", r);
11873
+ this.attachments = new Un(t, "__OPERATIONS", r);
11879
11874
  }
11880
11875
  async runOperation(t, n) {
11881
11876
  const r = await this.attachments.getInstance(t);
@@ -11926,7 +11921,7 @@ class Sp {
11926
11921
  triggerData: new lt(o, "data")
11927
11922
  };
11928
11923
  };
11929
- this.attachments = new Wn(t, ro, r);
11924
+ this.attachments = new Un(t, ro, r);
11930
11925
  }
11931
11926
  watchTriggerSnapshotList(t) {
11932
11927
  return this.instance.instanceData.watchItem(
@@ -11936,7 +11931,7 @@ class Sp {
11936
11931
  (o) => ({
11937
11932
  id: de(o, "id"),
11938
11933
  schemaRef: de(o, "schemaRef"),
11939
- config: Wt(de(o, "data.config"))
11934
+ config: Ut(de(o, "data.config"))
11940
11935
  })
11941
11936
  );
11942
11937
  t(r);
@@ -11981,7 +11976,7 @@ class Li {
11981
11976
  operationRef: u
11982
11977
  };
11983
11978
  };
11984
- this.attachments = new Wn(t, "__INTERACTIONS", o);
11979
+ this.attachments = new Un(t, "__INTERACTIONS", o);
11985
11980
  }
11986
11981
  async addInteraction(t, n) {
11987
11982
  const r = t.id, o = n.id, a = `[${r}]:[${o}]`;
@@ -12096,7 +12091,7 @@ const Rp = V(({
12096
12091
  data: t
12097
12092
  } = pe(), n = e.viz, {
12098
12093
  vizManager: r
12099
- } = Le(qe), o = e.json, a = We(() => r.getOrCreateInstance(o), [r, n.type]), l = We(() => new Li(a, r.resolveComponent(n.type), pr), [a, n.type]);
12094
+ } = Le(qe), o = e.json, a = Ue(() => r.getOrCreateInstance(o), [r, n.type]), l = Ue(() => new Li(a, r.resolveComponent(n.type), pr), [a, n.type]);
12100
12095
  return ne(() => a.instanceData.watchItem(
12101
12096
  null,
12102
12097
  Xa((s) => {
@@ -12328,7 +12323,7 @@ const Ap = V(function() {
12328
12323
  });
12329
12324
  });
12330
12325
  function Ni(e, t, n) {
12331
- const r = We(() => /* @__PURE__ */ new Set(), []), o = e.resolveComponent(t.type), [a, l] = be(!1);
12326
+ const r = Ue(() => /* @__PURE__ */ new Set(), []), o = e.resolveComponent(t.type), [a, l] = be(!1);
12332
12327
  return Rt(async () => {
12333
12328
  if (await o.migrator.needMigration(t) && !r.has(t.id))
12334
12329
  try {
@@ -12414,31 +12409,32 @@ const Tp = ["richText"], qi = V(function({
12414
12409
  height: t,
12415
12410
  viz: n,
12416
12411
  data: r,
12417
- loading: o
12412
+ loading: o,
12413
+ error: a
12418
12414
  }) {
12419
12415
  const {
12420
- ref: a,
12421
- width: l,
12422
- height: s
12423
- } = _n(), u = w.useMemo(() => !Array.isArray(r) || r.length === 0, [r]), g = zp(r, {
12424
- w: l,
12425
- h: s
12416
+ ref: l,
12417
+ width: s,
12418
+ height: u
12419
+ } = _n(), g = w.useMemo(() => !Array.isArray(r) || r.length === 0, [r]), c = zp(r, {
12420
+ w: s,
12421
+ h: u
12426
12422
  });
12427
12423
  return Tp.includes(n.type) ? /* @__PURE__ */ i("div", {
12428
12424
  className: "viz-root",
12429
12425
  style: {
12430
12426
  height: t
12431
12427
  },
12432
- ref: a,
12428
+ ref: l,
12433
12429
  children: /* @__PURE__ */ i(ut, {
12434
- children: g
12430
+ children: c
12435
12431
  })
12436
12432
  }) : o ? /* @__PURE__ */ i("div", {
12437
12433
  className: "viz-root",
12438
12434
  style: {
12439
12435
  height: t
12440
12436
  },
12441
- ref: a,
12437
+ ref: l,
12442
12438
  children: /* @__PURE__ */ i(Gt, {
12443
12439
  visible: o,
12444
12440
  exitTransitionDuration: 0
@@ -12448,13 +12444,21 @@ const Tp = ["richText"], qi = V(function({
12448
12444
  style: {
12449
12445
  height: t
12450
12446
  },
12451
- ref: a,
12452
- children: [u && /* @__PURE__ */ i(C, {
12447
+ ref: l,
12448
+ children: [a && /* @__PURE__ */ i(C, {
12449
+ color: "red",
12450
+ size: "md",
12451
+ align: "center",
12452
+ sx: {
12453
+ fontFamily: "monospace"
12454
+ },
12455
+ children: a
12456
+ }), !a && g && /* @__PURE__ */ i(C, {
12453
12457
  color: "gray",
12454
12458
  align: "center",
12455
12459
  children: "Empty Data"
12456
- }), !u && /* @__PURE__ */ i(ut, {
12457
- children: g
12460
+ }), !g && /* @__PURE__ */ i(ut, {
12461
+ children: c
12458
12462
  })]
12459
12463
  });
12460
12464
  }), Lp = V(() => {
@@ -12688,7 +12692,7 @@ const Hp = V(function({
12688
12692
  })
12689
12693
  })
12690
12694
  });
12691
- }), Up = V(({
12695
+ }), Wp = V(({
12692
12696
  view: e
12693
12697
  }) => {
12694
12698
  const t = ee(), n = za(), [r, o] = w.useState(!1), a = () => o(!0), l = () => o(!1), {
@@ -12785,7 +12789,7 @@ const Hp = V(function({
12785
12789
  })]
12786
12790
  });
12787
12791
  });
12788
- const Wp = V(function() {
12792
+ const Up = V(function() {
12789
12793
  const {
12790
12794
  panel: t
12791
12795
  } = pe(), {
@@ -12832,20 +12836,21 @@ const fr = V(function({
12832
12836
  inEditMode: o
12833
12837
  } = Le($e), {
12834
12838
  data: a,
12835
- state: l
12836
- } = r.getDataStuffByID(t.queryID), s = Yp(t.viz.type), u = s && l === "loading", g = t.title ? "calc(100% - 25px - 5px)" : "100%", c = Xp(t, s, o), f = s || o;
12839
+ state: l,
12840
+ error: s
12841
+ } = r.getDataStuffByID(t.queryID), u = Yp(t.viz.type), g = u && l === "loading", c = t.title ? "calc(100% - 25px - 5px)" : "100%", f = Xp(t, u, o), p = u || o;
12837
12842
  return /* @__PURE__ */ i(Ol, {
12838
12843
  value: {
12839
12844
  panel: t,
12840
12845
  data: a,
12841
- loading: u
12846
+ loading: g
12842
12847
  },
12843
12848
  children: /* @__PURE__ */ d(B, {
12844
12849
  className: "panel-root",
12845
12850
  p: 5,
12846
12851
  pt: 0,
12847
12852
  sx: {
12848
- ...c
12853
+ ...f
12849
12854
  },
12850
12855
  children: [/* @__PURE__ */ i(B, {
12851
12856
  sx: {
@@ -12856,13 +12861,14 @@ const fr = V(function({
12856
12861
  zIndex: 310
12857
12862
  },
12858
12863
  children: /* @__PURE__ */ i(Ko, {})
12859
- }), f && /* @__PURE__ */ i(Up, {
12864
+ }), p && /* @__PURE__ */ i(Wp, {
12860
12865
  view: n
12861
- }), /* @__PURE__ */ i(Wp, {}), /* @__PURE__ */ i(qi, {
12866
+ }), /* @__PURE__ */ i(Up, {}), /* @__PURE__ */ i(qi, {
12862
12867
  viz: t.viz,
12863
12868
  data: a,
12864
- loading: u,
12865
- height: g
12869
+ loading: g,
12870
+ error: s,
12871
+ height: c
12866
12872
  })]
12867
12873
  })
12868
12874
  });
@@ -13041,7 +13047,7 @@ const Jp = w.forwardRef(({
13041
13047
  size: t.config.width,
13042
13048
  overflow: "inside",
13043
13049
  opened: !0,
13044
- onClose: U.noop,
13050
+ onClose: W.noop,
13045
13051
  withCloseButton: !1,
13046
13052
  title: t.name,
13047
13053
  trapFocus: !0,
@@ -13210,7 +13216,7 @@ const Jp = w.forwardRef(({
13210
13216
  panel: s,
13211
13217
  exitFullScreen: a
13212
13218
  }), !l && /* @__PURE__ */ i(Jo, {
13213
- saveChanges: U.noop
13219
+ saveChanges: W.noop
13214
13220
  }), /* @__PURE__ */ i(cf, {
13215
13221
  view: t,
13216
13222
  children: /* @__PURE__ */ d(B, {
@@ -13237,11 +13243,11 @@ const Jp = w.forwardRef(({
13237
13243
  setValue(t) {
13238
13244
  e.value = t;
13239
13245
  }
13240
- })), Ui = x.model("FilterConfigModel_Select", {
13246
+ })), Wi = x.model("FilterConfigModel_Select", {
13241
13247
  required: x.boolean,
13242
13248
  default_value: x.string,
13243
13249
  static_options: x.optional(x.array(Hi), []),
13244
- options_query: Wo
13250
+ options_query: Uo
13245
13251
  }).actions((e) => ({
13246
13252
  addStaticOption(t) {
13247
13253
  e.static_options.push(t);
@@ -13258,7 +13264,7 @@ const Jp = w.forwardRef(({
13258
13264
  setOptionsQuery(t) {
13259
13265
  e.options_query = t;
13260
13266
  }
13261
- })), gf = () => Ui.create({
13267
+ })), gf = () => Wi.create({
13262
13268
  required: !1,
13263
13269
  default_value: "",
13264
13270
  static_options: [],
@@ -13267,10 +13273,10 @@ const Jp = w.forwardRef(({
13267
13273
  key: "",
13268
13274
  sql: ""
13269
13275
  }
13270
- }), Wi = x.model("FilterConfigModel_MultiSelect", {
13276
+ }), Ui = x.model("FilterConfigModel_MultiSelect", {
13271
13277
  default_value: x.optional(x.array(x.string), []),
13272
13278
  static_options: x.optional(x.array(Hi), []),
13273
- options_query: Wo
13279
+ options_query: Uo
13274
13280
  }).actions((e) => ({
13275
13281
  addStaticOption(t) {
13276
13282
  e.static_options.push(t);
@@ -13284,7 +13290,7 @@ const Jp = w.forwardRef(({
13284
13290
  setOptionsQuery(t) {
13285
13291
  e.options_query = t;
13286
13292
  }
13287
- })), pf = () => Wi.create({
13293
+ })), pf = () => Ui.create({
13288
13294
  default_value: [],
13289
13295
  static_options: [],
13290
13296
  options_query: {
@@ -13356,8 +13362,8 @@ const Jp = w.forwardRef(({
13356
13362
  Ce.DateRange
13357
13363
  ]),
13358
13364
  config: x.union(
13359
- Ui,
13360
13365
  Wi,
13366
+ Ui,
13361
13367
  Yo,
13362
13368
  Yi,
13363
13369
  Qi
@@ -13424,20 +13430,20 @@ const bf = x.model("FiltersModel", {
13424
13430
  values: x.optional(x.frozen(), {})
13425
13431
  }).views((e) => ({
13426
13432
  get changed() {
13427
- return !U.isEqual(e.original, e.current);
13433
+ return !W.isEqual(e.original, e.current);
13428
13434
  },
13429
13435
  get firstID() {
13430
13436
  if (e.current.length !== 0)
13431
13437
  return e.current[0].id;
13432
13438
  },
13433
13439
  get inOrder() {
13434
- return U.sortBy(e.current, "order");
13440
+ return W.sortBy(e.current, "order");
13435
13441
  },
13436
13442
  get empty() {
13437
13443
  return e.current.length === 0;
13438
13444
  },
13439
13445
  visibleInView(t) {
13440
- return U.sortBy(
13446
+ return W.sortBy(
13441
13447
  e.current.filter((n) => n.visibleInViewsIDs.includes(t)),
13442
13448
  "order"
13443
13449
  );
@@ -13454,7 +13460,7 @@ const bf = x.model("FiltersModel", {
13454
13460
  }
13455
13461
  })).actions((e) => ({
13456
13462
  reset() {
13457
- e.current = U.cloneDeep(e.original);
13463
+ e.current = W.cloneDeep(e.original);
13458
13464
  },
13459
13465
  replace(t) {
13460
13466
  e.current = Je(t);
@@ -13662,7 +13668,9 @@ const Ki = x.model("QueryModel", {
13662
13668
  })
13663
13669
  ), e.state = "idle";
13664
13670
  } catch (t) {
13665
- console.error(t), e.error = t, e.state = "error";
13671
+ e.data.length = 0;
13672
+ const n = t.response.data;
13673
+ e.error = n.detail.message, e.state = "error";
13666
13674
  }
13667
13675
  }
13668
13676
  })
@@ -13681,7 +13689,7 @@ const Ki = x.model("QueryModel", {
13681
13689
  current: x.optional(x.array(wf), [])
13682
13690
  }).views((e) => ({
13683
13691
  get changed() {
13684
- return e.original.length !== e.current.length ? !0 : e.original.some((t, n) => !U.isEqual(t.configurations, e.current[n].configurations));
13692
+ return e.original.length !== e.current.length ? !0 : e.original.some((t, n) => !W.isEqual(t.configurations, e.current[n].configurations));
13685
13693
  },
13686
13694
  get firstID() {
13687
13695
  if (e.current.length !== 0)
@@ -13769,14 +13777,17 @@ const Ki = x.model("QueryModel", {
13769
13777
  current: x.optional(x.array(ao), [])
13770
13778
  }).views((e) => ({
13771
13779
  get changed() {
13772
- return !U.isEqual(e.original, e.current);
13780
+ return !W.isEqual(e.original, e.current);
13773
13781
  },
13774
13782
  get json() {
13775
13783
  return e.current.map((t) => t.json);
13784
+ },
13785
+ get record() {
13786
+ return e.current.reduce((t, n) => (t[n.key] = n.value, t), {});
13776
13787
  }
13777
13788
  })).actions((e) => ({
13778
13789
  reset() {
13779
- e.current = U.cloneDeep(e.original);
13790
+ e.current = W.cloneDeep(e.original);
13780
13791
  },
13781
13792
  replace(t) {
13782
13793
  e.current = Je(t);
@@ -14022,7 +14033,7 @@ const Ki = x.model("QueryModel", {
14022
14033
  idOfVIE: x.string
14023
14034
  }).views((e) => ({
14024
14035
  get changed() {
14025
- return e.original.length !== e.current.length ? !0 : e.original.some((t, n) => !U.isEqual(t.json, e.current[n].json));
14036
+ return e.original.length !== e.current.length ? !0 : e.original.some((t, n) => !W.isEqual(t.json, e.current[n].json));
14026
14037
  },
14027
14038
  get json() {
14028
14039
  return e.current.map((t) => t.json);
@@ -14149,7 +14160,7 @@ const kf = x.model({
14149
14160
  return n ? {
14150
14161
  data: n.data.toJSON(),
14151
14162
  state: n.state,
14152
- error: void 0
14163
+ error: n.error
14153
14164
  } : {
14154
14165
  data: [],
14155
14166
  state: "idle",
@@ -14207,7 +14218,7 @@ const hh = V(function({
14207
14218
  }
14208
14219
  };
14209
14220
  await r(S);
14210
- }, p = We(Ti, []);
14221
+ }, p = Ue(Ti, []);
14211
14222
  return /* @__PURE__ */ i(uo, {
14212
14223
  children: /* @__PURE__ */ i(zo, {
14213
14224
  value: c,
@@ -14254,7 +14265,7 @@ const hh = V(function({
14254
14265
  children: /* @__PURE__ */ i($e.Provider, {
14255
14266
  value: {
14256
14267
  layoutFrozen: !0,
14257
- freezeLayout: U.noop,
14268
+ freezeLayout: W.noop,
14258
14269
  inEditMode: !1,
14259
14270
  inUseMode: !0
14260
14271
  },