@devtable/dashboard 5.1.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.
@@ -1,14 +1,14 @@
1
1
  var Va = Object.defineProperty;
2
2
  var Fa = (e, t, n) => t in e ? Va(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var z = (e, t, n) => (Fa(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { Box as H, Text as C, Button as T, Checkbox as st, MultiSelect as On, Select as B, 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 Ue, 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";
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
- import S, { useEffect as ne, forwardRef as Ln, useMemo as G, useState as be, createElement as Ht, useCallback as Tt, useRef as Ta, useContext as Te, 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 ze, 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";
11
- import { useForm as Le, Controller as D, useFieldArray as Ae } from "react-hook-form";
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 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
+ 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";
14
14
  import { Calendar as Ka, Refresh as xo, DeviceFloppy as ae, Trash as oe, PlaylistAdd as ct, Recycle as Co, Settings as wo, Filter as Za, Database as el, Share as tl, Download as So, Code as nl, InfoCircle as rl, ArrowRight as fn, ArrowsMaximize as ol, Copy as il, ArrowLeft as al, ArrowsMove as ll, ChevronDownRight as sl } from "tabler-icons-react";
@@ -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";
@@ -32,7 +32,7 @@ import { CanvasRenderer as Ze } from "echarts/renderers";
32
32
  import "echarts-gl";
33
33
  import { GridComponent as dt, VisualMapComponent as yl, LegendComponent as gt, TooltipComponent as pt, DataZoomComponent as Qt, MarkLineComponent as xl } from "echarts/components";
34
34
  import { transform as Mo } from "echarts-stat";
35
- import * as Ge from "d3-regression";
35
+ import * as Be from "d3-regression";
36
36
  import Cl from "stickybits";
37
37
  import ko, { WidthProvider as Ao } from "react-grid-layout";
38
38
  import wl from "jszip";
@@ -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,11 +68,11 @@ 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
- }, Bn = S.createContext(Sl), Po = S.createContext(null), zo = Po.Provider;
73
+ }, Bn = w.createContext(Sl), Po = w.createContext(null), zo = Po.Provider;
74
74
  function ee() {
75
- const e = S.useContext(Po);
75
+ const e = w.useContext(Po);
76
76
  if (!e)
77
77
  throw new Error("Please use ModelContextProvider");
78
78
  return e;
@@ -92,7 +92,7 @@ function _l() {
92
92
  if (jr)
93
93
  return ht;
94
94
  jr = 1;
95
- var e = S, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
95
+ var e = w, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
96
96
  function l(s, u, g) {
97
97
  var c, f = {}, p = null, m = null;
98
98
  g !== void 0 && (p = "" + g), u.key !== void 0 && (p = "" + u.key), u.ref !== void 0 && (m = u.ref);
@@ -118,8 +118,8 @@ var mt = {};
118
118
  var Hr;
119
119
  function Rl() {
120
120
  return Hr || (Hr = 1, process.env.NODE_ENV !== "production" && function() {
121
- var e = S, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), b = Symbol.iterator, v = "@@iterator";
122
- function w(h) {
121
+ var e = w, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), b = Symbol.iterator, v = "@@iterator";
122
+ function S(h) {
123
123
  if (h === null || typeof h != "object")
124
124
  return null;
125
125
  var _ = b && h[b] || h[v];
@@ -135,10 +135,10 @@ 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]));
140
- var X = I.map(function(j) {
141
- return String(j);
138
+ var M = F.ReactDebugCurrentFrame, U = M.getStackAddendum();
139
+ U !== "" && (_ += "%s", I = I.concat([U]));
140
+ var X = I.map(function(H) {
141
+ return String(H);
142
142
  });
143
143
  X.unshift("Warning: " + _), Function.prototype.apply.call(console[h], console, X);
144
144
  }
@@ -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,9 +193,9 @@ 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, j = W._init;
196
+ var U = h, X = U._payload, H = U._init;
197
197
  try {
198
- return he(j(X));
198
+ return he(H(X));
199
199
  } catch {
200
200
  return null;
201
201
  }
@@ -203,13 +203,13 @@ function Rl() {
203
203
  }
204
204
  return null;
205
205
  }
206
- var me = Object.assign, qe = 0, mr, vr, br, yr, xr, Cr, wr;
206
+ var me = Object.assign, Ge = 0, mr, vr, br, yr, xr, Cr, wr;
207
207
  function Sr() {
208
208
  }
209
209
  Sr.__reactDisabledLog = !0;
210
210
  function ra() {
211
211
  {
212
- if (qe === 0) {
212
+ if (Ge === 0) {
213
213
  mr = console.log, vr = console.info, br = console.warn, yr = console.error, xr = console.group, Cr = console.groupCollapsed, wr = console.groupEnd;
214
214
  var h = {
215
215
  configurable: !0,
@@ -227,12 +227,12 @@ function Rl() {
227
227
  groupEnd: h
228
228
  });
229
229
  }
230
- qe++;
230
+ Ge++;
231
231
  }
232
232
  }
233
233
  function oa() {
234
234
  {
235
- if (qe--, qe === 0) {
235
+ if (Ge--, Ge === 0) {
236
236
  var h = {
237
237
  configurable: !0,
238
238
  enumerable: !0,
@@ -262,7 +262,7 @@ function Rl() {
262
262
  })
263
263
  });
264
264
  }
265
- qe < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
265
+ Ge < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
266
266
  }
267
267
  }
268
268
  var on = F.ReactCurrentDispatcher, an;
@@ -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,33 +294,33 @@ 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();
301
301
  try {
302
302
  if (_) {
303
- var j = function() {
303
+ var H = function() {
304
304
  throw Error();
305
305
  };
306
- if (Object.defineProperty(j.prototype, "props", {
306
+ if (Object.defineProperty(H.prototype, "props", {
307
307
  set: function() {
308
308
  throw Error();
309
309
  }
310
310
  }), typeof Reflect == "object" && Reflect.construct) {
311
311
  try {
312
- Reflect.construct(j, []);
312
+ Reflect.construct(H, []);
313
313
  } catch (Oe) {
314
314
  M = Oe;
315
315
  }
316
- Reflect.construct(h, [], j);
316
+ Reflect.construct(h, [], H);
317
317
  } else {
318
318
  try {
319
- j.call();
319
+ H.call();
320
320
  } catch (Oe) {
321
321
  M = Oe;
322
322
  }
323
- h.call(j.prototype);
323
+ h.call(H.prototype);
324
324
  }
325
325
  } else {
326
326
  try {
@@ -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,22 +399,22 @@ 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
- for (var j in h)
406
- if (X(h, j)) {
405
+ for (var H in h)
406
+ if (X(h, H)) {
407
407
  var N = void 0;
408
408
  try {
409
- if (typeof h[j] != "function") {
410
- var ge = Error((M || "React class") + ": " + I + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
409
+ if (typeof h[H] != "function") {
410
+ var ge = Error((M || "React class") + ": " + I + " type `" + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[H] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
411
411
  throw ge.name = "Invariant Violation", ge;
412
412
  }
413
- N = h[j](_, j, M, I, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
413
+ N = h[H](_, H, M, I, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
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, j, 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,13 +493,13 @@ function Rl() {
493
493
  });
494
494
  }
495
495
  }
496
- var ba = function(h, _, I, M, W, X, j) {
496
+ var ba = function(h, _, I, M, U, X, H) {
497
497
  var N = {
498
498
  $$typeof: t,
499
499
  type: h,
500
500
  key: _,
501
501
  ref: I,
502
- props: j,
502
+ props: H,
503
503
  _owner: X
504
504
  };
505
505
  return N._store = {}, Object.defineProperty(N._store, "validated", {
@@ -516,25 +516,25 @@ 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
- var X, j = {}, N = null, ge = null;
525
- I !== void 0 && (Vr(I), N = "" + I), fa(_) && (Vr(_.key), N = "" + _.key), pa(_) && (ge = _.ref, ha(_, W));
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(_, U));
526
526
  for (X in _)
527
- Et.call(_, X) && !ga.hasOwnProperty(X) && (j[X] = _[X]);
527
+ Et.call(_, X) && !ga.hasOwnProperty(X) && (H[X] = _[X]);
528
528
  if (h && h.defaultProps) {
529
529
  var te = h.defaultProps;
530
530
  for (X in te)
531
- j[X] === void 0 && (j[X] = te[X]);
531
+ H[X] === void 0 && (H[X] = te[X]);
532
532
  }
533
533
  if (N || ge) {
534
534
  var re = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
535
- N && ma(j, re), ge && va(j, re);
535
+ N && ma(H, re), ge && va(H, re);
536
536
  }
537
- return ba(h, N, ge, W, M, ft.current, j);
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,10 +611,10 @@ 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 = w(h);
615
- if (typeof W == "function" && W !== h.entries)
616
- for (var X = W.call(h), j; !(j = X.next()).done; )
617
- gn(j.value) && Ar(j.value, _);
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
+ gn(H.value) && Ar(H.value, _);
618
618
  }
619
619
  }
620
620
  }
@@ -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,21 +653,21 @@ 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
- var j = Re(h);
659
- if (!j) {
658
+ var H = Re(h);
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
- if (j) {
670
+ if (H) {
671
671
  var xe = _.children;
672
672
  if (xe !== void 0)
673
673
  if (M)
@@ -697,7 +697,7 @@ Check the top-level render call using <` + I + ">.");
697
697
  process.env.NODE_ENV === "production" ? e.exports = _l() : e.exports = Rl();
698
698
  })(Xt);
699
699
  const K = Xt.exports.Fragment, i = Xt.exports.jsx, d = Xt.exports.jsxs;
700
- class ut extends S.Component {
700
+ class ut extends w.Component {
701
701
  constructor(t) {
702
702
  super(t), this.state = {
703
703
  error: null
@@ -716,7 +716,7 @@ class ut extends S.Component {
716
716
  error: null
717
717
  });
718
718
  };
719
- return /* @__PURE__ */ d(H, {
719
+ return /* @__PURE__ */ d(B, {
720
720
  children: [/* @__PURE__ */ i(C, {
721
721
  size: "xs",
722
722
  children: (t = this.state.error) == null ? void 0 : t.message
@@ -745,7 +745,7 @@ function Dl({
745
745
  value: r,
746
746
  onChange: o
747
747
  }) {
748
- return /* @__PURE__ */ d(H, {
748
+ return /* @__PURE__ */ d(B, {
749
749
  children: [/* @__PURE__ */ i(C, {
750
750
  children: "\xA0"
751
751
  }), /* @__PURE__ */ i(st, {
@@ -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,10 +889,10 @@ 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
- return /* @__PURE__ */ i(B, {
895
+ return /* @__PURE__ */ i(j, {
901
896
  label: e,
902
897
  data: o ? a : t.static_options,
903
898
  disabled: o ? l : !1,
@@ -961,7 +956,7 @@ const kl = V(({
961
956
  default:
962
957
  return null;
963
958
  }
964
- }), No = V(S.forwardRef(({
959
+ }), No = V(w.forwardRef(({
965
960
  filter: e,
966
961
  ...t
967
962
  }, n) => /* @__PURE__ */ i("div", {
@@ -979,7 +974,7 @@ const kl = V(({
979
974
  const n = ee(), {
980
975
  control: r,
981
976
  handleSubmit: o
982
- } = Le({
977
+ } = Ne({
983
978
  defaultValues: n.filters.values
984
979
  }), a = n.filters.visibleInView(t.id);
985
980
  return a.length === 0 ? null : /* @__PURE__ */ i("form", {
@@ -1020,16 +1015,16 @@ 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
- }, $e = S.createContext(Al), Go = S.createContext({
1021
+ }, $e = w.createContext(Al), Go = w.createContext({
1027
1022
  panel: null,
1028
1023
  data: [],
1029
1024
  loading: !1
1030
1025
  }), Ol = Go.Provider;
1031
1026
  function pe() {
1032
- const e = S.useContext(Go);
1027
+ const e = w.useContext(Go);
1033
1028
  if (!e.panel)
1034
1029
  throw new Error("Please use PanelContextProvider");
1035
1030
  return e;
@@ -1050,17 +1045,13 @@ WHERE
1050
1045
  showSQLSnippets: t = !0,
1051
1046
  sx: n = {}
1052
1047
  }) {
1053
- const r = ee(), o = r.context.current, a = S.useMemo(() => {
1048
+ const r = ee(), o = r.context.current, a = w.useMemo(() => {
1054
1049
  const l = {
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",
@@ -1116,7 +1107,7 @@ WHERE
1116
1107
  function zl({
1117
1108
  data: e
1118
1109
  }) {
1119
- return e.length === 0 ? /* @__PURE__ */ i(H, {
1110
+ return e.length === 0 ? /* @__PURE__ */ i(B, {
1120
1111
  sx: {
1121
1112
  height: "5em"
1122
1113
  }
@@ -1191,7 +1182,7 @@ const jo = V(function({
1191
1182
  size: 15
1192
1183
  })
1193
1184
  })]
1194
- }), /* @__PURE__ */ d(H, {
1185
+ }), /* @__PURE__ */ d(B, {
1195
1186
  sx: {
1196
1187
  position: "relative"
1197
1188
  },
@@ -1229,7 +1220,7 @@ const jo = V(function({
1229
1220
  value: s.key,
1230
1221
  type: s.type
1231
1222
  })), [r]), l = G(() => a.reduce((s, u) => (s[u.value] = u.type, s), {}), [a]);
1232
- return /* @__PURE__ */ i(B, {
1223
+ return /* @__PURE__ */ i(j, {
1233
1224
  label: "Data Source",
1234
1225
  data: a,
1235
1226
  itemComponent: Tl,
@@ -1245,10 +1236,10 @@ const jo = V(function({
1245
1236
  });
1246
1237
  }
1247
1238
  });
1248
- }), Uo = V(({
1239
+ }), Wo = V(({
1249
1240
  value: e
1250
1241
  }) => {
1251
- const t = ee(), n = t.context.current, r = S.useMemo(() => Lo(e, n, t.sqlSnippets.current, t.filters.values), [e, n, t.sqlSnippets.current, t.filters.values]);
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]);
1252
1243
  return /* @__PURE__ */ i(nt, {
1253
1244
  language: "sql",
1254
1245
  colorScheme: "light",
@@ -1258,12 +1249,12 @@ const jo = V(function({
1258
1249
  queryModel: t,
1259
1250
  setCurrentID: n
1260
1251
  }) {
1261
- const r = S.useRef(t.id), [o, a] = S.useState(r.current);
1262
- S.useEffect(() => {
1252
+ const r = w.useRef(t.id), [o, a] = w.useState(r.current);
1253
+ w.useEffect(() => {
1263
1254
  r.current !== t.id && (a(t.id), r.current = t.id);
1264
1255
  }, [r, t.id]);
1265
- const [l, s] = S.useState(t.sql);
1266
- S.useEffect(() => {
1256
+ const [l, s] = w.useState(t.sql);
1257
+ w.useEffect(() => {
1267
1258
  s((f) => f !== t.sql ? t.sql : f);
1268
1259
  }, [t.sql]);
1269
1260
  const u = l !== t.sql, g = () => {
@@ -1340,7 +1331,7 @@ const jo = V(function({
1340
1331
  }), /* @__PURE__ */ i(k.Panel, {
1341
1332
  value: "SQL",
1342
1333
  pt: "sm",
1343
- children: /* @__PURE__ */ d(H, {
1334
+ children: /* @__PURE__ */ d(B, {
1344
1335
  sx: {
1345
1336
  position: "relative"
1346
1337
  },
@@ -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
  })]
@@ -1383,7 +1374,7 @@ const jo = V(function({
1383
1374
  id: t,
1384
1375
  setID: n
1385
1376
  }) {
1386
- const r = ee(), o = S.useMemo(() => r.queries.findByID(t), [r.queries, t]);
1377
+ const r = ee(), o = w.useMemo(() => r.queries.findByID(t), [r.queries, t]);
1387
1378
  return t ? o ? /* @__PURE__ */ i(Ll, {
1388
1379
  queryModel: o,
1389
1380
  setCurrentID: n
@@ -1400,7 +1391,7 @@ const ql = V(function({
1400
1391
  var l;
1401
1392
  n((l = r.queries.firstID) != null ? l : "");
1402
1393
  };
1403
- S.useEffect(() => {
1394
+ w.useEffect(() => {
1404
1395
  if (!t) {
1405
1396
  o();
1406
1397
  return;
@@ -1426,7 +1417,7 @@ const ql = V(function({
1426
1417
  },
1427
1418
  children: [/* @__PURE__ */ i(C, {
1428
1419
  children: "Select a Query"
1429
- }), /* @__PURE__ */ i(B, {
1420
+ }), /* @__PURE__ */ i(j, {
1430
1421
  data: r.queries.options,
1431
1422
  value: t,
1432
1423
  onChange: n,
@@ -1448,7 +1439,7 @@ const ql = V(function({
1448
1439
  })
1449
1440
  });
1450
1441
  }), Gl = V(function() {
1451
- const [t, n] = S.useState("");
1442
+ const [t, n] = w.useState("");
1452
1443
  return /* @__PURE__ */ d(zn, {
1453
1444
  sx: {
1454
1445
  height: "90vh",
@@ -1489,7 +1480,7 @@ const ql = V(function({
1489
1480
  }), Bl = V(({
1490
1481
  value: e
1491
1482
  }) => {
1492
- const t = ee(), n = t.context.current, r = S.useMemo(() => Il(e, n, t.filters.values), [e, n]);
1483
+ const t = ee(), n = t.context.current, r = w.useMemo(() => Il(e, n, t.filters.values), [e, n]);
1493
1484
  return /* @__PURE__ */ d(R, {
1494
1485
  children: [/* @__PURE__ */ i(C, {
1495
1486
  children: "Preview"
@@ -1616,14 +1607,14 @@ 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
  }) {
1623
1614
  const {
1624
1615
  freezeLayout: r
1625
- } = S.useContext($e);
1626
- return S.useEffect(() => {
1616
+ } = w.useContext($e);
1617
+ return w.useEffect(() => {
1627
1618
  r(t);
1628
1619
  }, [t]), /* @__PURE__ */ i(Fe, {
1629
1620
  size: "96vw",
@@ -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, {
@@ -1714,7 +1705,7 @@ const Wo = x.model({
1714
1705
  onChange: (n) => t.setClearable(n.currentTarget.checked),
1715
1706
  label: "Clearable"
1716
1707
  })]
1717
- }), /* @__PURE__ */ i(B, {
1708
+ }), /* @__PURE__ */ i(j, {
1718
1709
  data: Yl,
1719
1710
  label: "Display Format",
1720
1711
  value: t.inputFormat,
@@ -1730,7 +1721,7 @@ const Wo = x.model({
1730
1721
  function Xl({
1731
1722
  data: e
1732
1723
  }) {
1733
- return e.length === 0 ? /* @__PURE__ */ i(H, {
1724
+ return e.length === 0 ? /* @__PURE__ */ i(B, {
1734
1725
  sx: {
1735
1726
  height: "5em"
1736
1727
  }
@@ -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, {
@@ -1798,7 +1789,7 @@ const Jl = V(function({
1798
1789
  disabled: !t.sql || !t.key,
1799
1790
  children: "Retry"
1800
1791
  })]
1801
- }), /* @__PURE__ */ d(H, {
1792
+ }), /* @__PURE__ */ d(B, {
1802
1793
  sx: {
1803
1794
  position: "relative"
1804
1795
  },
@@ -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, {
@@ -1969,7 +1960,7 @@ const Jl = V(function({
1969
1960
  }), /* @__PURE__ */ i(Z, {
1970
1961
  label: "Configure options",
1971
1962
  labelPosition: "center"
1972
- }), r.length > 0 && /* @__PURE__ */ i(B, {
1963
+ }), r.length > 0 && /* @__PURE__ */ i(j, {
1973
1964
  label: "Default Selection",
1974
1965
  data: o,
1975
1966
  value: t.default_value,
@@ -2051,10 +2042,10 @@ const Jl = V(function({
2051
2042
  }), ts = V(function({
2052
2043
  filter: t
2053
2044
  }) {
2054
- const n = t.plainDefaultValue, [r, o] = S.useState(n);
2055
- return S.useEffect(() => {
2045
+ const n = t.plainDefaultValue, [r, o] = w.useState(n);
2046
+ return w.useEffect(() => {
2056
2047
  o(n);
2057
- }, [n]), /* @__PURE__ */ d(H, {
2048
+ }, [n]), /* @__PURE__ */ d(B, {
2058
2049
  sx: {
2059
2050
  maxWidth: "30em"
2060
2051
  },
@@ -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",
@@ -2103,10 +2094,10 @@ const Jl = V(function({
2103
2094
  filter: t,
2104
2095
  index: n
2105
2096
  }) {
2106
- const r = ee(), o = S.useMemo(() => ns[t.type], [t.type]);
2097
+ const r = ee(), o = w.useMemo(() => ns[t.type], [t.type]);
2107
2098
  return /* @__PURE__ */ d($a, {
2108
2099
  cols: 2,
2109
- children: [/* @__PURE__ */ d(H, {
2100
+ children: [/* @__PURE__ */ d(B, {
2110
2101
  pl: "md",
2111
2102
  children: [/* @__PURE__ */ i(C, {
2112
2103
  pb: "md",
@@ -2143,7 +2134,7 @@ const Jl = V(function({
2143
2134
  onChange: (a) => {
2144
2135
  t.setLabel(a.currentTarget.value);
2145
2136
  }
2146
- }), /* @__PURE__ */ i(B, {
2137
+ }), /* @__PURE__ */ i(j, {
2147
2138
  label: "Widget",
2148
2139
  data: rs,
2149
2140
  required: !0,
@@ -2172,7 +2163,7 @@ const is = V(function() {
2172
2163
  };
2173
2164
  t.filters.append(a);
2174
2165
  };
2175
- return /* @__PURE__ */ d(H, {
2166
+ return /* @__PURE__ */ d(B, {
2176
2167
  sx: {
2177
2168
  height: "90vh",
2178
2169
  maxHeight: "calc(100vh - 185px)"
@@ -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, {
@@ -2230,7 +2225,7 @@ const is = V(function() {
2230
2225
  onClick: r,
2231
2226
  children: "Add a Filter"
2232
2227
  })]
2233
- }), /* @__PURE__ */ i(H, {
2228
+ }), /* @__PURE__ */ i(B, {
2234
2229
  sx: {
2235
2230
  flexGrow: 1,
2236
2231
  height: "100%"
@@ -2245,7 +2240,7 @@ const is = V(function() {
2245
2240
  height: "100%"
2246
2241
  },
2247
2242
  spacing: "sm",
2248
- children: [/* @__PURE__ */ i(H, {
2243
+ children: [/* @__PURE__ */ i(B, {
2249
2244
  sx: {
2250
2245
  flexGrow: 1,
2251
2246
  maxHeight: "calc(100% - 52px)",
@@ -2280,8 +2275,8 @@ const is = V(function() {
2280
2275
  }) {
2281
2276
  const {
2282
2277
  freezeLayout: r
2283
- } = S.useContext($e);
2284
- return S.useEffect(() => {
2278
+ } = w.useContext($e);
2279
+ return w.useEffect(() => {
2285
2280
  r(t);
2286
2281
  }, [t]), /* @__PURE__ */ i(Fe, {
2287
2282
  size: "96vw",
@@ -2355,7 +2350,7 @@ const us = V(() => {
2355
2350
  onChange: (n) => {
2356
2351
  t.setName(n.currentTarget.value);
2357
2352
  }
2358
- }), /* @__PURE__ */ i(B, {
2353
+ }), /* @__PURE__ */ i(j, {
2359
2354
  label: "Type",
2360
2355
  value: t.type,
2361
2356
  onChange: t.setType,
@@ -2369,8 +2364,8 @@ const us = V(() => {
2369
2364
  var o;
2370
2365
  const n = ee(), {
2371
2366
  freezeLayout: r
2372
- } = S.useContext($e);
2373
- return S.useEffect(() => {
2367
+ } = w.useContext($e);
2368
+ return w.useEffect(() => {
2374
2369
  r(e);
2375
2370
  }, [e]), /* @__PURE__ */ i(Fe, {
2376
2371
  size: "500px",
@@ -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, {
@@ -2459,10 +2454,10 @@ const us = V(() => {
2459
2454
  sx: {
2460
2455
  minWidth: "260px"
2461
2456
  },
2462
- children: [/* @__PURE__ */ i(B, {
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,
@@ -2523,11 +2518,11 @@ function bs({
2523
2518
  }) {
2524
2519
  const {
2525
2520
  freezeLayout: r
2526
- } = S.useContext($e);
2527
- S.useEffect(() => {
2521
+ } = w.useContext($e);
2522
+ w.useEffect(() => {
2528
2523
  r(e);
2529
2524
  }, [e]);
2530
- const o = S.useMemo(() => JSON.stringify(n(), null, 2), [e]);
2525
+ const o = w.useMemo(() => JSON.stringify(n(), null, 2), [e]);
2531
2526
  return /* @__PURE__ */ i(Fe, {
2532
2527
  size: "96vw",
2533
2528
  overflow: "inside",
@@ -2551,7 +2546,7 @@ function bs({
2551
2546
  const Jo = V(function({
2552
2547
  saveChanges: t
2553
2548
  }) {
2554
- const n = ee(), r = S.useCallback(() => {
2549
+ const n = ee(), r = w.useCallback(() => {
2555
2550
  const L = n.queries.current, Y = n.views.current, le = n.sqlSnippets.current;
2556
2551
  return {
2557
2552
  filters: n.filters.current,
@@ -2566,7 +2561,7 @@ const Jo = V(function({
2566
2561
  }, a = n.views.changed || n.sqlSnippets.changed || n.queries.changed || n.filters.changed, {
2567
2562
  inEditMode: l,
2568
2563
  inUseMode: s
2569
- } = S.useContext($e), [u, g] = S.useState(!1), c = () => g(!0), f = () => g(!1), [p, m] = S.useState(!1), b = () => m(!0), v = () => m(!1), [w, F] = S.useState(!1), $ = () => F(!0), A = () => F(!1);
2564
+ } = w.useContext($e), [u, g] = w.useState(!1), c = () => g(!0), f = () => g(!1), [p, m] = w.useState(!1), b = () => m(!0), v = () => m(!1), [S, F] = w.useState(!1), $ = () => F(!0), A = () => F(!1);
2570
2565
  return /* @__PURE__ */ d(y, {
2571
2566
  position: "apart",
2572
2567
  pt: 0,
@@ -2650,11 +2645,11 @@ 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, {
2657
- opened: w,
2652
+ opened: S,
2658
2653
  close: A,
2659
2654
  getCurrentSchema: r
2660
2655
  })]
@@ -2663,10 +2658,10 @@ const Jo = V(function({
2663
2658
  const Ko = V(() => {
2664
2659
  const {
2665
2660
  freezeLayout: e
2666
- } = S.useContext($e), [t, n] = S.useState(!1), {
2661
+ } = w.useContext($e), [t, n] = w.useState(!1), {
2667
2662
  panel: r
2668
2663
  } = pe();
2669
- return S.useEffect(() => {
2664
+ return w.useEffect(() => {
2670
2665
  e(t);
2671
2666
  }, [t]), !r.description || r.description === "<p><br></p>" ? null : /* @__PURE__ */ d(K, {
2672
2667
  children: [/* @__PURE__ */ i(Fe, {
@@ -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
  }
@@ -2793,7 +2788,7 @@ function Ss({
2793
2788
  async function r(o) {
2794
2789
  await e.changeSchema(t.find((a) => a.id === o));
2795
2790
  }
2796
- return /* @__PURE__ */ i(B, {
2791
+ return /* @__PURE__ */ i(j, {
2797
2792
  label: "Operation",
2798
2793
  data: n,
2799
2794
  onChange: r,
@@ -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,
@@ -2888,7 +2883,7 @@ const Vs = V(({
2888
2883
  async function r(o) {
2889
2884
  await e.changeSchema(t.find((a) => a.id === o));
2890
2885
  }
2891
- return /* @__PURE__ */ i(B, {
2886
+ return /* @__PURE__ */ i(j, {
2892
2887
  label: "Trigger",
2893
2888
  data: n,
2894
2889
  value: e.triggerSchema.id,
@@ -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.1.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 {
@@ -3334,11 +3329,11 @@ function Ws({
3334
3329
  handleSubmit: a,
3335
3330
  watch: l,
3336
3331
  getValues: s
3337
- } = Le({
3332
+ } = Ne({
3338
3333
  defaultValues: r
3339
3334
  });
3340
3335
  l("content");
3341
- const u = s(), g = G(() => !ze(u, t), [u, t]), c = ri(t == null ? void 0 : t.content);
3336
+ const u = s(), g = G(() => !Te(u, t), [u, t]), c = ri(t == null ? void 0 : t.content);
3342
3337
  return /* @__PURE__ */ i(R, {
3343
3338
  mt: "md",
3344
3339
  spacing: "xs",
@@ -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",
@@ -3514,7 +3509,7 @@ function Ks({
3514
3509
  ref: n,
3515
3510
  children: [/* @__PURE__ */ d(y, {
3516
3511
  grow: !0,
3517
- children: [/* @__PURE__ */ i(B, {
3512
+ children: [/* @__PURE__ */ i(j, {
3518
3513
  label: "Format",
3519
3514
  data: [{
3520
3515
  label: "1234",
@@ -3528,7 +3523,7 @@ function Ks({
3528
3523
  sx: {
3529
3524
  flexGrow: 1
3530
3525
  }
3531
- }), /* @__PURE__ */ i(Ue, {
3526
+ }), /* @__PURE__ */ i(ze, {
3532
3527
  label: /* @__PURE__ */ d(R, {
3533
3528
  spacing: 0,
3534
3529
  children: [/* @__PURE__ */ i(C, {
@@ -3567,7 +3562,7 @@ function Ks({
3567
3562
  max: 4,
3568
3563
  value: e.mantissa,
3569
3564
  onChange: o
3570
- }), /* @__PURE__ */ i(Ue, {
3565
+ }), /* @__PURE__ */ i(ze, {
3571
3566
  label: "Trim mantissa",
3572
3567
  checked: e.trimMantissa,
3573
3568
  onChange: a,
@@ -3613,7 +3608,7 @@ function Ks({
3613
3608
  })]
3614
3609
  });
3615
3610
  }
3616
- const Xn = S.forwardRef(Ks);
3611
+ const Xn = w.forwardRef(Ks);
3617
3612
  function Kt() {
3618
3613
  return {
3619
3614
  name: Se(),
@@ -3683,7 +3678,7 @@ function eu({
3683
3678
  grow: !0,
3684
3679
  noWrap: !0,
3685
3680
  pt: "sm",
3686
- children: [/* @__PURE__ */ i(B, {
3681
+ children: [/* @__PURE__ */ i(j, {
3687
3682
  ref: r,
3688
3683
  label: e,
3689
3684
  data: Zs,
@@ -3700,7 +3695,7 @@ function eu({
3700
3695
  })]
3701
3696
  });
3702
3697
  }
3703
- const tu = S.forwardRef(eu);
3698
+ const tu = w.forwardRef(eu);
3704
3699
  function nu({
3705
3700
  label: e,
3706
3701
  required: t,
@@ -3711,7 +3706,7 @@ function nu({
3711
3706
  sx: l,
3712
3707
  ...s
3713
3708
  }, u) {
3714
- const g = S.useMemo(() => {
3709
+ const g = w.useMemo(() => {
3715
3710
  if (!Array.isArray(o) || o.length === 0)
3716
3711
  return [];
3717
3712
  const f = Object.keys(o[0]).map((p) => ({
@@ -3723,7 +3718,7 @@ function nu({
3723
3718
  value: ""
3724
3719
  }]) : f;
3725
3720
  }, [o]);
3726
- return /* @__PURE__ */ i(B, {
3721
+ return /* @__PURE__ */ i(j, {
3727
3722
  ref: u,
3728
3723
  label: e,
3729
3724
  data: g,
@@ -3734,19 +3729,19 @@ function nu({
3734
3729
  ...s
3735
3730
  });
3736
3731
  }
3737
- const J = S.forwardRef(nu);
3732
+ const J = w.forwardRef(nu);
3738
3733
  function ru({
3739
3734
  label: e,
3740
3735
  value: t,
3741
3736
  onChange: n
3742
3737
  }, r) {
3743
- const [o, a] = S.useState(Array.isArray(t) ? [...t] : []), l = S.useCallback(() => {
3738
+ const [o, a] = w.useState(Array.isArray(t) ? [...t] : []), l = w.useCallback(() => {
3744
3739
  a((p) => [...p, ""]);
3745
- }, [a]), s = S.useCallback((p) => {
3740
+ }, [a]), s = w.useCallback((p) => {
3746
3741
  a((m) => (m.splice(p, 1), [...m]));
3747
- }, [a]), u = S.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
- }, c = ka(), f = S.useMemo(() => Object.entries(c.colors).map(([p, m]) => m[6]), [c]);
3744
+ }, c = ka(), f = w.useMemo(() => Object.entries(c.colors).map(([p, m]) => m[6]), [c]);
3750
3745
  return /* @__PURE__ */ d(K, {
3751
3746
  children: [/* @__PURE__ */ d(y, {
3752
3747
  position: "left",
@@ -3791,18 +3786,18 @@ function ru({
3791
3786
  })]
3792
3787
  });
3793
3788
  }
3794
- const ou = S.forwardRef(ru);
3789
+ const ou = w.forwardRef(ru);
3795
3790
  function iu({
3796
3791
  value: e,
3797
3792
  onChange: t
3798
3793
  }, n) {
3799
3794
  const {
3800
3795
  colorManager: r
3801
- } = Te(Ne), o = S.useMemo(() => r.getStaticColors().map((s) => ({
3796
+ } = Le(qe), o = w.useMemo(() => r.getStaticColors().map((s) => ({
3802
3797
  label: s.name,
3803
3798
  group: s.category,
3804
3799
  value: s.value
3805
- })), [r]), a = S.useMemo(() => o.some((l) => l.value === e), [e, o]);
3800
+ })), [r]), a = w.useMemo(() => o.some((l) => l.value === e), [e, o]);
3806
3801
  return /* @__PURE__ */ d(y, {
3807
3802
  position: "apart",
3808
3803
  spacing: 4,
@@ -3825,7 +3820,7 @@ function iu({
3825
3820
  flexGrow: 0
3826
3821
  },
3827
3822
  children: "or"
3828
- }), /* @__PURE__ */ i(B, {
3823
+ }), /* @__PURE__ */ i(j, {
3829
3824
  data: o,
3830
3825
  value: e,
3831
3826
  onChange: t,
@@ -3842,7 +3837,7 @@ function iu({
3842
3837
  })]
3843
3838
  });
3844
3839
  }
3845
- const Qe = S.forwardRef(iu), kt = [{
3840
+ const Qe = w.forwardRef(iu), kt = [{
3846
3841
  label: "initial",
3847
3842
  value: 0
3848
3843
  }, {
@@ -3864,8 +3859,8 @@ function au({
3864
3859
  onChange: n
3865
3860
  }, r) {
3866
3861
  var l, s;
3867
- const [o, a] = S.useState((s = (l = kt.find((u) => u.label === t)) == null ? void 0 : l.value) != null ? s : kt[0].value);
3868
- return S.useEffect(() => {
3862
+ const [o, a] = w.useState((s = (l = kt.find((u) => u.label === t)) == null ? void 0 : l.value) != null ? s : kt[0].value);
3863
+ return w.useEffect(() => {
3869
3864
  const u = kt.find((g) => g.value === o);
3870
3865
  u && n(u.label);
3871
3866
  }, [o]), /* @__PURE__ */ d(R, {
@@ -3886,17 +3881,17 @@ function au({
3886
3881
  })]
3887
3882
  });
3888
3883
  }
3889
- const lu = S.forwardRef(au);
3884
+ const lu = w.forwardRef(au);
3890
3885
  function su({
3891
3886
  label: e,
3892
3887
  value: t,
3893
3888
  onChange: n
3894
3889
  }, r) {
3895
- const [o, a] = S.useState(Array.isArray(t) ? [...t] : []), l = S.useCallback(() => {
3890
+ const [o, a] = w.useState(Array.isArray(t) ? [...t] : []), l = w.useCallback(() => {
3896
3891
  a((c) => [...c, ""]);
3897
- }, [a]), s = S.useCallback((c) => {
3892
+ }, [a]), s = w.useCallback((c) => {
3898
3893
  a((f) => (f.splice(c, 1), [...f]));
3899
- }, [a]), u = S.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",
@@ -3943,13 +3938,13 @@ function su({
3943
3938
  })]
3944
3939
  });
3945
3940
  }
3946
- const uu = S.forwardRef(su), cu = S.forwardRef(function({
3941
+ const uu = w.forwardRef(su), cu = w.forwardRef(function({
3947
3942
  value: t,
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, {
@@ -3985,7 +3980,7 @@ const uu = S.forwardRef(su), cu = S.forwardRef(function({
3985
3980
  label: "Style",
3986
3981
  labelPosition: "center"
3987
3982
  }), /* @__PURE__ */ d(R, {
3988
- children: [/* @__PURE__ */ i(B, {
3983
+ children: [/* @__PURE__ */ i(j, {
3989
3984
  label: "Color Type",
3990
3985
  data: [{
3991
3986
  label: "Static Color",
@@ -4012,17 +4007,17 @@ const uu = S.forwardRef(su), cu = S.forwardRef(function({
4012
4007
  })]
4013
4008
  })]
4014
4009
  });
4015
- }), Zt = S.forwardRef(function({
4010
+ }), Zt = w.forwardRef(function({
4016
4011
  value: t,
4017
4012
  onChange: n,
4018
4013
  data: r,
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
- return /* @__PURE__ */ d(H, {
4020
+ return /* @__PURE__ */ d(B, {
4026
4021
  px: "sm",
4027
4022
  py: "md",
4028
4023
  ref: a,
@@ -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:
@@ -4132,7 +4127,7 @@ const Zn = (e, t) => (n) => Boolean(It(n) && pu.test(n) && n.startsWith(e) || t
4132
4127
  test: Zn("hsl", "hue"),
4133
4128
  parse: si("hue", "saturation", "lightness"),
4134
4129
  transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + Ct.transform(xt(t)) + ", " + Ct.transform(xt(n)) + ", " + xt(li.transform(r)) + ")"
4135
- }, hu = ai(0, 255), hn = Object.assign(Object.assign({}, en), { transform: (e) => Math.round(hu(e)) }), Be = {
4130
+ }, hu = ai(0, 255), hn = Object.assign(Object.assign({}, en), { transform: (e) => Math.round(hu(e)) }), je = {
4136
4131
  test: Zn("rgb", "red"),
4137
4132
  parse: si("red", "green", "blue"),
4138
4133
  transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + hn.transform(e) + ", " + hn.transform(t) + ", " + hn.transform(n) + ", " + xt(li.transform(r)) + ")"
@@ -4149,11 +4144,11 @@ function mu(e) {
4149
4144
  const In = {
4150
4145
  test: Zn("#"),
4151
4146
  parse: mu,
4152
- transform: Be.transform
4147
+ transform: je.transform
4153
4148
  }, tn = {
4154
- test: (e) => Be.test(e) || In.test(e) || tt.test(e),
4155
- parse: (e) => Be.test(e) ? Be.parse(e) : tt.test(e) ? tt.parse(e) : In.parse(e),
4156
- transform: (e) => It(e) ? e : e.hasOwnProperty("red") ? Be.transform(e) : tt.transform(e)
4149
+ test: (e) => je.test(e) || In.test(e) || tt.test(e),
4150
+ parse: (e) => je.test(e) ? je.parse(e) : tt.test(e) ? tt.parse(e) : In.parse(e),
4151
+ transform: (e) => It(e) ? e : e.hasOwnProperty("red") ? je.transform(e) : tt.transform(e)
4157
4152
  }, ui = "${c}", ci = "${n}";
4158
4153
  function vu(e) {
4159
4154
  var t, n, r, o;
@@ -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)
@@ -4208,11 +4203,11 @@ function Wr({ hue: e, saturation: t, lightness: n, alpha: r }) {
4208
4203
  const xu = (e, t, n) => {
4209
4204
  const r = e * e, o = t * t;
4210
4205
  return Math.sqrt(Math.max(0, n * (o - r) + r));
4211
- }, Cu = [In, Be, tt], Yr = (e) => Cu.find((t) => t.test(e)), Qr = (e) => `'${e}' is not an animatable color. Use the equivalent color code instead.`, hi = (e, t) => {
4206
+ }, Cu = [In, je, tt], Yr = (e) => Cu.find((t) => t.test(e)), Qr = (e) => `'${e}' is not an animatable color. Use the equivalent color code instead.`, hi = (e, t) => {
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 = Be), r === tt && (a = Wr(a), r = Be);
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)
@@ -4484,7 +4479,7 @@ function qu({
4484
4479
  const t = e.data || [], {
4485
4480
  value: n,
4486
4481
  set: r
4487
- } = Q(e.instanceData, "config"), o = S.useMemo(() => {
4482
+ } = Q(e.instanceData, "config"), o = w.useMemo(() => {
4488
4483
  const {
4489
4484
  align: p,
4490
4485
  template: m = "",
@@ -4501,13 +4496,13 @@ function qu({
4501
4496
  watch: s,
4502
4497
  getValues: u,
4503
4498
  reset: g
4504
- } = Le({
4499
+ } = Ne({
4505
4500
  defaultValues: o
4506
4501
  });
4507
- S.useEffect(() => {
4502
+ w.useEffect(() => {
4508
4503
  g(o);
4509
4504
  }, [o]), s(["variables", "template"]);
4510
- const c = u(), f = S.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",
@@ -4573,7 +4568,7 @@ const Gu = {
4573
4568
  viewRender: Tu,
4574
4569
  configRender: qu
4575
4570
  };
4576
- var je = /* @__PURE__ */ ((e) => (e.string = "string", e.number = "number", e.eloc = "eloc", e.percentage = "percentage", e))(je || {});
4571
+ var He = /* @__PURE__ */ ((e) => (e.string = "string", e.number = "number", e.eloc = "eloc", e.percentage = "percentage", e))(He || {});
4577
4572
  const Nt = {
4578
4573
  columns: [],
4579
4574
  fontSize: "1rem",
@@ -4594,14 +4589,14 @@ const Nt = {
4594
4589
  *
4595
4590
  * @license MIT
4596
4591
  */
4597
- function He(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]: He(n, r[e])
4599
+ [e]: We(n, r[e])
4605
4600
  }));
4606
4601
  };
4607
4602
  }
@@ -4876,22 +4871,22 @@ function At(e, t, n, r) {
4876
4871
  id: [r, "" + m].filter(Boolean).join("_"),
4877
4872
  headers: []
4878
4873
  }, v = [];
4879
- p.forEach((w) => {
4880
- const F = [...v].reverse()[0], $ = w.column.depth === b.depth;
4874
+ p.forEach((S) => {
4875
+ const F = [...v].reverse()[0], $ = S.column.depth === b.depth;
4881
4876
  let A, L = !1;
4882
- if ($ && w.column.parent ? A = w.column.parent : (A = w.column, L = !0), F && (F == null ? void 0 : F.column) === A)
4883
- F.subHeaders.push(w);
4877
+ if ($ && S.column.parent ? A = S.column.parent : (A = S.column, L = !0), F && (F == null ? void 0 : F.column) === A)
4878
+ F.subHeaders.push(S);
4884
4879
  else {
4885
4880
  const Y = Jr(n, A, {
4886
- id: [r, m, A.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
4881
+ id: [r, m, A.id, S == null ? void 0 : S.id].filter(Boolean).join("_"),
4887
4882
  isPlaceholder: L,
4888
4883
  placeholderId: L ? "" + v.filter((le) => le.column === A).length : void 0,
4889
4884
  depth: m,
4890
4885
  index: v.length
4891
4886
  });
4892
- Y.subHeaders.push(w), v.push(Y);
4887
+ Y.subHeaders.push(S), v.push(Y);
4893
4888
  }
4894
- b.headers.push(w), w.headerGroup = b;
4889
+ b.headers.push(S), S.headerGroup = b;
4895
4890
  }), u.push(b), m > 0 && g(v, m - 1);
4896
4891
  }, c = t.map((p, m) => Jr(n, p, {
4897
4892
  depth: l,
@@ -4899,7 +4894,7 @@ function At(e, t, n, r) {
4899
4894
  }));
4900
4895
  g(c, l - 1), u.reverse();
4901
4896
  const f = (p) => p.filter((b) => b.column.getIsVisible()).map((b) => {
4902
- let v = 0, w = 0, F = [0];
4897
+ let v = 0, S = 0, F = [0];
4903
4898
  b.subHeaders && b.subHeaders.length ? (F = [], f(b.subHeaders).forEach((A) => {
4904
4899
  let {
4905
4900
  colSpan: L,
@@ -4908,9 +4903,9 @@ function At(e, t, n, r) {
4908
4903
  v += L, F.push(Y);
4909
4904
  })) : v = 1;
4910
4905
  const $ = Math.min(...F);
4911
- return w = w + $, b.colSpan = v, b.rowSpan = w, {
4906
+ return S = S + $, b.colSpan = v, b.rowSpan = S, {
4912
4907
  colSpan: v,
4913
- rowSpan: w
4908
+ rowSpan: S
4914
4909
  };
4915
4910
  });
4916
4911
  return f((o = (a = u[0]) == null ? void 0 : a.headers) != null ? o : []), u;
@@ -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: {},
@@ -4996,19 +4991,19 @@ const Ot = {
4996
4991
  if (typeof b != "number")
4997
4992
  return;
4998
4993
  let v = {};
4999
- t.setColumnSizingInfo((w) => {
4994
+ t.setColumnSizingInfo((S) => {
5000
4995
  var F, $;
5001
- const A = b - ((F = w == null ? void 0 : w.startOffset) != null ? F : 0), L = Math.max(A / (($ = w == null ? void 0 : w.startSize) != null ? $ : 0), -0.999999);
5002
- return w.columnSizingStart.forEach((Y) => {
4996
+ const A = b - ((F = S == null ? void 0 : S.startOffset) != null ? F : 0), L = Math.max(A / (($ = S == null ? void 0 : S.startSize) != null ? $ : 0), -0.999999);
4997
+ return S.columnSizingStart.forEach((Y) => {
5003
4998
  let [le, ie] = Y;
5004
4999
  v[le] = Math.round(Math.max(ie + ie * L, 0) * 100) / 100;
5005
5000
  }), {
5006
- ...w,
5001
+ ...S,
5007
5002
  deltaOffset: A,
5008
5003
  deltaPercentage: L
5009
5004
  };
5010
- }), (t.options.columnResizeMode === "onChange" || m === "end") && t.setColumnSizing((w) => ({
5011
- ...w,
5005
+ }), (t.options.columnResizeMode === "onChange" || m === "end") && t.setColumnSizing((S) => ({
5006
+ ...S,
5012
5007
  ...v
5013
5008
  }));
5014
5009
  }, g = (m) => u("move", m), c = (m) => {
@@ -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 = He(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 = He(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) => He(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 = He(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, He(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 = He(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 = He(c, n.options);
6209
+ const f = We(c, n.options);
6215
6210
  n.options = o(f);
6216
6211
  },
6217
6212
  getState: () => n.options.state,
@@ -6255,8 +6250,8 @@ function yc(e) {
6255
6250
  getAllColumns: O(() => [n._getColumnDefs()], (c) => {
6256
6251
  const f = function(p, m, b) {
6257
6252
  return b === void 0 && (b = 0), p.map((v) => {
6258
- const w = ju(n, v, b, m), F = v;
6259
- return w.columns = F.columns ? f(F.columns, w, b + 1) : [], w;
6253
+ const S = ju(n, v, b, m), F = v;
6254
+ return S.columns = F.columns ? f(F.columns, S, b + 1) : [], S;
6260
6255
  });
6261
6256
  };
6262
6257
  return f(c);
@@ -6428,7 +6423,7 @@ function _c() {
6428
6423
  return g.sort((c, f) => {
6429
6424
  for (let m = 0; m < a.length; m += 1) {
6430
6425
  var p;
6431
- const b = a[m], v = l[b.id], w = (p = b == null ? void 0 : b.desc) != null ? p : !1;
6426
+ const b = a[m], v = l[b.id], S = (p = b == null ? void 0 : b.desc) != null ? p : !1;
6432
6427
  if (v.sortUndefined) {
6433
6428
  const $ = c.getValue(b.id), A = f.getValue(b.id), L = typeof $ > "u", Y = typeof A > "u";
6434
6429
  if (L || Y)
@@ -6436,7 +6431,7 @@ function _c() {
6436
6431
  }
6437
6432
  let F = v.sortingFn(c, f, b.id);
6438
6433
  if (F !== 0)
6439
- return w && (F *= -1), v.invertSorting && (F *= -1), F;
6434
+ return S && (F *= -1), v.invertSorting && (F *= -1), F;
6440
6435
  }
6441
6436
  return c.index - f.index;
6442
6437
  }), g.forEach((c) => {
@@ -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) => {
@@ -6639,7 +6634,7 @@ function qc(e) {
6639
6634
  column: +u
6640
6635
  });
6641
6636
  };
6642
- return /* @__PURE__ */ i(B, {
6637
+ return /* @__PURE__ */ i(j, {
6643
6638
  clearable: !1,
6644
6639
  data: r,
6645
6640
  label: "Choose a column",
@@ -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",
@@ -6757,19 +6752,19 @@ function Jc(e) {
6757
6752
  }
6758
6753
  function Kc(e) {
6759
6754
  switch (e.type) {
6760
- case je.string:
6755
+ case He.string:
6761
6756
  return /* @__PURE__ */ i(Yc, {
6762
6757
  ...e
6763
6758
  });
6764
- case je.eloc:
6759
+ case He.eloc:
6765
6760
  return /* @__PURE__ */ i(Qc, {
6766
6761
  ...e
6767
6762
  });
6768
- case je.number:
6763
+ case He.number:
6769
6764
  return /* @__PURE__ */ i(Xc, {
6770
6765
  ...e
6771
6766
  });
6772
- case je.percentage:
6767
+ case He.percentage:
6773
6768
  return /* @__PURE__ */ i(Jc, {
6774
6769
  ...e
6775
6770
  });
@@ -6778,7 +6773,7 @@ function Kc(e) {
6778
6773
  const Zc = (e) => {
6779
6774
  const t = Fc(e), n = $c(t.triggerManager, rr.id), {
6780
6775
  colorManager: r
6781
- } = Te(Ne);
6776
+ } = Le(qe);
6782
6777
  return Tt((o) => new td(e.getColIndex, o, n, t, r), [n, t, e.getColIndex]);
6783
6778
  };
6784
6779
  function ed({
@@ -6798,19 +6793,19 @@ function ed({
6798
6793
  } = a, {
6799
6794
  classes: g,
6800
6795
  cx: c
6801
- } = jc(), f = S.useMemo(() => l ? Object.keys(n[0]).map((se) => ({
6796
+ } = jc(), f = w.useMemo(() => l ? Object.keys(n[0]).map((se) => ({
6802
6797
  label: se,
6803
6798
  value_field: se,
6804
- value_type: je.string
6799
+ value_type: He.string
6805
6800
  })) : s, [l, s, n]), p = Zc({
6806
6801
  getColIndex: Tt((se) => f.indexOf(se.column.columnDef.meta), [f]),
6807
6802
  vizManager: e.vizManager,
6808
6803
  instance: t
6809
6804
  }), m = G(() => {
6810
6805
  const se = wc(), De = f.map((me) => se.accessor(me.value_field, {
6811
- cell: (qe) => /* @__PURE__ */ i(Kc, {
6812
- tableCellContext: p(qe.cell),
6813
- value: qe.getValue(),
6806
+ cell: (Ge) => /* @__PURE__ */ i(Kc, {
6807
+ tableCellContext: p(Ge.cell),
6808
+ value: Ge.getValue(),
6814
6809
  type: me.value_type
6815
6810
  }),
6816
6811
  header: me.label,
@@ -6823,7 +6818,7 @@ function ed({
6823
6818
  header: "#",
6824
6819
  size: 10 * (n.length.toString().length + 1)
6825
6820
  }), ...De];
6826
- }, [f, p]), [b, v] = be([]), w = Vc({
6821
+ }, [f, p]), [b, v] = be([]), S = Vc({
6827
6822
  data: n,
6828
6823
  state: {
6829
6824
  sorting: b
@@ -6834,7 +6829,7 @@ function ed({
6834
6829
  getSortedRowModel: _c()
6835
6830
  }), {
6836
6831
  rows: F
6837
- } = w.getRowModel(), $ = S.useRef(null), A = fl({
6832
+ } = S.getRowModel(), $ = w.useRef(null), A = fl({
6838
6833
  parentRef: $,
6839
6834
  size: F.length,
6840
6835
  estimateSize: Tt(() => 28, []),
@@ -6860,7 +6855,7 @@ function ed({
6860
6855
  striped: a.striped,
6861
6856
  children: [/* @__PURE__ */ i("thead", {
6862
6857
  className: g.thead,
6863
- children: w.getHeaderGroups().map((se) => /* @__PURE__ */ i("tr", {
6858
+ children: S.getHeaderGroups().map((se) => /* @__PURE__ */ i("tr", {
6864
6859
  children: se.headers.map((De) => /* @__PURE__ */ i("th", {
6865
6860
  style: {
6866
6861
  width: De.getSize()
@@ -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
  }
@@ -7015,7 +7010,7 @@ function od(e) {
7015
7010
  setFalse: c
7016
7011
  }] = _t(!1), f = r % 2 === 1, p = f && o != null, m = !f && o != null, b = `map ${o} to color ${r}`, v = () => {
7017
7012
  s(o), c();
7018
- }, w = () => {
7013
+ }, S = () => {
7019
7014
  c(), t == null || t(l);
7020
7015
  }, F = we(o).format({
7021
7016
  average: !0
@@ -7064,7 +7059,7 @@ function od(e) {
7064
7059
  }), /* @__PURE__ */ i(T, {
7065
7060
  "data-testid": "palette-item-ok",
7066
7061
  size: "xs",
7067
- onClick: w,
7062
+ onClick: S,
7068
7063
  children: "OK"
7069
7064
  })]
7070
7065
  })]
@@ -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, {
@@ -7112,24 +7107,24 @@ const id = V(({
7112
7107
  } = e, o = r.getColorInterpolations(), [a, l] = be(t), s = r.decodeInterpolation(a.interpolation) || o[0], [u, {
7113
7108
  setTrue: g,
7114
7109
  setFalse: c
7115
- }] = _t(), f = o.map((w) => ({
7116
- label: w.displayName,
7117
- value: r.encodeColor(w),
7118
- group: w.category
7110
+ }] = _t(), f = o.map((S) => ({
7111
+ label: S.displayName,
7112
+ value: r.encodeColor(S),
7113
+ group: S.category
7119
7114
  }));
7120
- function p(w) {
7121
- w && l((F) => ({
7115
+ function p(S) {
7116
+ S && l((F) => ({
7122
7117
  ...F,
7123
- interpolation: w
7118
+ interpolation: S
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
- function b(w) {
7124
+ function b(S) {
7130
7125
  l((F) => ({
7131
7126
  ...F,
7132
- steps: w
7127
+ steps: S
7133
7128
  }));
7134
7129
  }
7135
7130
  const v = () => {
@@ -7147,7 +7142,7 @@ const id = V(({
7147
7142
  onClose: c,
7148
7143
  children: u && /* @__PURE__ */ d(R, {
7149
7144
  "data-testid": "color-interpolation-modal",
7150
- children: [/* @__PURE__ */ i(B, {
7145
+ children: [/* @__PURE__ */ i(j, {
7151
7146
  label: "Color style",
7152
7147
  value: a.interpolation,
7153
7148
  data: f,
@@ -7193,15 +7188,15 @@ function dd(e, t) {
7193
7188
  const gd = (e) => {
7194
7189
  const {
7195
7190
  colorManager: t
7196
- } = Te(Ne), [n, r] = be(Oi(e.value)), [o, a] = be(cd(t, e.value)), l = Nr(o), [s, u] = be(dd(t, e.value)), g = Nr(s);
7191
+ } = Le(qe), [n, r] = be(Oi(e.value)), [o, a] = be(cd(t, e.value)), l = Nr(o), [s, u] = be(dd(t, e.value)), g = Nr(s);
7197
7192
  return /* @__PURE__ */ d(y, {
7198
7193
  align: "end",
7199
- children: [/* @__PURE__ */ i(B, {
7194
+ children: [/* @__PURE__ */ i(j, {
7200
7195
  label: "Cell background",
7201
7196
  value: n || "none",
7202
7197
  onChange: (m) => {
7203
- var b, v, w;
7204
- r(m || "none"), m === "static" ? (b = e.onChange) == null || b.call(e, l.current) : m === "none" || !m ? (v = e.onChange) == null || v.call(e, "none") : (w = e.onChange) == null || w.call(e, g.current);
7198
+ var b, v, S;
7199
+ r(m || "none"), m === "static" ? (b = e.onChange) == null || b.call(e, l.current) : m === "none" || !m ? (v = e.onChange) == null || v.call(e, "none") : (S = e.onChange) == null || S.call(e, g.current);
7205
7200
  },
7206
7201
  data: sd
7207
7202
  }), n === "static" && /* @__PURE__ */ i(Qe, {
@@ -7219,7 +7214,7 @@ const gd = (e) => {
7219
7214
  }
7220
7215
  })]
7221
7216
  });
7222
- }, pd = Object.values(je).map((e) => ({
7217
+ }, pd = Object.values(He).map((e) => ({
7223
7218
  label: e,
7224
7219
  value: e
7225
7220
  }));
@@ -7229,7 +7224,7 @@ function fd({
7229
7224
  onChange: n,
7230
7225
  sx: r
7231
7226
  }) {
7232
- return /* @__PURE__ */ i(B, {
7227
+ return /* @__PURE__ */ i(j, {
7233
7228
  label: e,
7234
7229
  data: pd,
7235
7230
  value: t,
@@ -7253,7 +7248,7 @@ function hd({
7253
7248
  const o = e.data || [], a = () => r.insertListItem("columns", {
7254
7249
  label: Se(),
7255
7250
  value_field: "value",
7256
- value_type: je.string
7251
+ value_type: He.string
7257
7252
  });
7258
7253
  return /* @__PURE__ */ i(R, {
7259
7254
  mt: "md",
@@ -7344,12 +7339,12 @@ function hd({
7344
7339
  }), /* @__PURE__ */ d(y, {
7345
7340
  position: "apart",
7346
7341
  grow: !0,
7347
- children: [/* @__PURE__ */ i(Ue, {
7342
+ children: [/* @__PURE__ */ i(ze, {
7348
7343
  label: "Striped",
7349
7344
  ...r.getInputProps("striped", {
7350
7345
  type: "checkbox"
7351
7346
  })
7352
- }), /* @__PURE__ */ i(Ue, {
7347
+ }), /* @__PURE__ */ i(ze, {
7353
7348
  label: "Highlight on hover",
7354
7349
  ...r.getInputProps("highlightOnHover", {
7355
7350
  type: "checkbox"
@@ -7366,7 +7361,7 @@ function hd({
7366
7361
  border: "1px solid #eee",
7367
7362
  borderRadius: "5px"
7368
7363
  },
7369
- children: [/* @__PURE__ */ i(Ue, {
7364
+ children: [/* @__PURE__ */ i(ze, {
7370
7365
  label: "Use Original Data Columns",
7371
7366
  ...r.getInputProps("use_raw_columns", {
7372
7367
  type: "checkbox"
@@ -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]);
@@ -7864,7 +7859,7 @@ function Vd({
7864
7859
  control: a,
7865
7860
  handleSubmit: l,
7866
7861
  reset: s
7867
- } = Le({
7862
+ } = Ne({
7868
7863
  defaultValues: o
7869
7864
  });
7870
7865
  return ne(() => {
@@ -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]))
@@ -8171,7 +8166,7 @@ function kd({
8171
8166
  control: e,
8172
8167
  render: ({
8173
8168
  field: o
8174
- }) => /* @__PURE__ */ i(B, {
8169
+ }) => /* @__PURE__ */ i(j, {
8175
8170
  label: "Value",
8176
8171
  required: !0,
8177
8172
  data: r,
@@ -8332,13 +8327,13 @@ function zd({
8332
8327
  watch: s,
8333
8328
  getValues: u,
8334
8329
  reset: g
8335
- } = Le({
8330
+ } = Ne({
8336
8331
  defaultValues: o
8337
8332
  });
8338
8333
  ne(() => {
8339
8334
  g(o);
8340
8335
  }, [o]), s(["x_axis", "y_axis", "reference_lines", "color"]);
8341
- const c = u(), f = G(() => !ze(c, t), [c, t]);
8336
+ const c = u(), f = G(() => !Te(c, t), [c, t]);
8342
8337
  return /* @__PURE__ */ i(R, {
8343
8338
  mt: "md",
8344
8339
  spacing: "xs",
@@ -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) => {
@@ -8586,33 +8581,48 @@ function Bd(e, t, n) {
8586
8581
  }
8587
8582
  }));
8588
8583
  }
8589
- function jd({ x_axis_data_key: e }, { y_axis_data_key: t, yAxisIndex: n, label_position: r, name: o, group_by_key: a, stack: l, color: s, ...u }, g, c, f) {
8590
- const p = {
8584
+ function jd({ x_axis_data_key: e }, {
8585
+ y_axis_data_key: t,
8586
+ yAxisIndex: n,
8587
+ label_position: r,
8588
+ name: o,
8589
+ group_by_key: a,
8590
+ stack: l,
8591
+ color: s,
8592
+ display_name_on_line: u,
8593
+ ...g
8594
+ }, c, f, p) {
8595
+ const m = {
8591
8596
  label: {
8592
8597
  show: !!r,
8593
8598
  position: r,
8594
- formatter: f[n != null ? n : "default"]
8599
+ formatter: p[n != null ? n : "default"]
8595
8600
  },
8596
8601
  name: o,
8597
8602
  xAxisId: "main-x-axis",
8598
8603
  yAxisIndex: n,
8599
8604
  stack: l,
8600
8605
  color: s,
8601
- ...u
8606
+ ...g
8602
8607
  };
8603
- if (!a)
8604
- return p.data = c.map((b) => b[t]), p;
8605
- const m = Ya(c, a);
8606
- return Object.entries(m).map(([b, v]) => {
8607
- const w = mo(p);
8608
- return w.data = Gd(g, v, e, t), w.name = b, w.color = void 0, w;
8608
+ if (u && (m.endLabel = {
8609
+ show: !0,
8610
+ formatter: o,
8611
+ offset: [-12, 12],
8612
+ align: "right"
8613
+ }), !a)
8614
+ return m.data = f.map((v) => v[t]), m;
8615
+ const b = Ya(f, a);
8616
+ return Object.entries(b).map(([v, S]) => {
8617
+ const F = mo(m);
8618
+ return F.data = Gd(c, S, e, t), F.name = v, F.color = void 0, F;
8609
8619
  });
8610
8620
  }
8611
8621
  function Hd(e, t, n, r) {
8612
8622
  const o = t.map((l) => [l, 0]);
8613
8623
  return e.series.map((l) => jd(e, l, o, n, r)).flat().concat(Bd(e.reference_lines, e.variables, n));
8614
8624
  }
8615
- function Ud(e, t) {
8625
+ function Wd(e, t) {
8616
8626
  const n = e.series.reduce(
8617
8627
  (r, { yAxisIndex: o, name: a }) => (r[a] = o, r),
8618
8628
  {}
@@ -8633,7 +8643,7 @@ function Ud(e, t) {
8633
8643
  }
8634
8644
  };
8635
8645
  }
8636
- function Wd(e, t, n) {
8646
+ function Ud(e, t, n) {
8637
8647
  var r;
8638
8648
  return [
8639
8649
  {
@@ -8718,12 +8728,12 @@ function Xd(e, t) {
8718
8728
  {
8719
8729
  default: ({ value: g }) => g
8720
8730
  }
8721
- ), 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 = {
8722
- 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),
8723
8733
  yAxis: Yd(e, n),
8724
8734
  dataset: [...a],
8725
8735
  series: [...o, ...l],
8726
- tooltip: Ud(e, n),
8736
+ tooltip: Wd(e, n),
8727
8737
  grid: Nd(e)
8728
8738
  };
8729
8739
  return ot({}, u, Qd);
@@ -8761,7 +8771,7 @@ function Jd({
8761
8771
  width: n,
8762
8772
  height: r
8763
8773
  }) {
8764
- const o = S.useMemo(() => Xd(e, t), [e, t]);
8774
+ const o = w.useMemo(() => Xd(e, t), [e, t]);
8765
8775
  return !n || !r ? null : /* @__PURE__ */ i(Ke, {
8766
8776
  echarts: ce,
8767
8777
  option: o,
@@ -8785,7 +8795,7 @@ function Kd({
8785
8795
  } = _n(), {
8786
8796
  ref: u,
8787
8797
  height: g
8788
- } = _n(), c = S.useMemo(() => {
8798
+ } = _n(), c = w.useMemo(() => {
8789
8799
  const {
8790
8800
  stats: {
8791
8801
  templates: p,
@@ -8797,7 +8807,7 @@ function Kd({
8797
8807
  bottom: Vn(p.bottom, m, r)
8798
8808
  };
8799
8809
  }, [n, r]), f = Math.max(0, a - s - g);
8800
- return /* @__PURE__ */ d(H, {
8810
+ return /* @__PURE__ */ d(B, {
8801
8811
  children: [no(n.stats.templates.top) && /* @__PURE__ */ i(C, {
8802
8812
  ref: l,
8803
8813
  align: "left",
@@ -8854,7 +8864,7 @@ function Zd({
8854
8864
  control: e,
8855
8865
  render: ({
8856
8866
  field: o
8857
- }) => /* @__PURE__ */ i(B, {
8867
+ }) => /* @__PURE__ */ i(j, {
8858
8868
  label: "Value",
8859
8869
  required: !0,
8860
8870
  data: r,
@@ -9011,7 +9021,7 @@ function rg({
9011
9021
  }
9012
9022
  }) => {
9013
9023
  var c;
9014
- return /* @__PURE__ */ i(B, {
9024
+ return /* @__PURE__ */ i(j, {
9015
9025
  label: "Y Axis",
9016
9026
  data: o,
9017
9027
  disabled: o.length === 0,
@@ -9038,7 +9048,7 @@ function rg({
9038
9048
  control: e,
9039
9049
  render: ({
9040
9050
  field: s
9041
- }) => /* @__PURE__ */ i(B, {
9051
+ }) => /* @__PURE__ */ i(j, {
9042
9052
  label: "Method",
9043
9053
  data: tg,
9044
9054
  sx: {
@@ -9071,7 +9081,7 @@ function rg({
9071
9081
  control: e,
9072
9082
  render: ({
9073
9083
  field: s
9074
- }) => /* @__PURE__ */ i(B, {
9084
+ }) => /* @__PURE__ */ i(j, {
9075
9085
  label: "Line Type",
9076
9086
  data: ng,
9077
9087
  sx: {
@@ -9138,7 +9148,7 @@ function og({
9138
9148
  }), l = t("regressions"), s = r.map((f, p) => ({
9139
9149
  ...f,
9140
9150
  ...l[p]
9141
- })), u = t("y_axes"), g = S.useMemo(() => u.map(({
9151
+ })), u = t("y_axes"), g = w.useMemo(() => u.map(({
9142
9152
  name: f
9143
9153
  }, p) => ({
9144
9154
  label: f,
@@ -9228,7 +9238,7 @@ function ag({
9228
9238
  control: e,
9229
9239
  render: ({
9230
9240
  field: n
9231
- }) => /* @__PURE__ */ i(B, {
9241
+ }) => /* @__PURE__ */ i(j, {
9232
9242
  label: "Bar Gap",
9233
9243
  data: ig,
9234
9244
  sx: {
@@ -9278,7 +9288,7 @@ function ug({
9278
9288
  control: e,
9279
9289
  render: ({
9280
9290
  field: n
9281
- }) => /* @__PURE__ */ i(B, {
9291
+ }) => /* @__PURE__ */ i(j, {
9282
9292
  label: "Line Type",
9283
9293
  data: sg,
9284
9294
  sx: {
@@ -9309,7 +9319,7 @@ function ug({
9309
9319
  control: e,
9310
9320
  render: ({
9311
9321
  field: n
9312
- }) => /* @__PURE__ */ i(B, {
9322
+ }) => /* @__PURE__ */ i(j, {
9313
9323
  label: "Step",
9314
9324
  data: lg,
9315
9325
  sx: {
@@ -9323,21 +9333,41 @@ function ug({
9323
9333
  n.onChange(o);
9324
9334
  }
9325
9335
  })
9326
- }), /* @__PURE__ */ i(D, {
9327
- name: `series.${t}.smooth`,
9328
- control: e,
9329
- render: ({
9330
- field: n
9331
- }) => /* @__PURE__ */ i(H, {
9332
- sx: {
9333
- flexGrow: 1
9334
- },
9335
- children: /* @__PURE__ */ i(Ue, {
9336
- label: "Smooth Line",
9337
- checked: n.value,
9338
- onChange: (r) => n.onChange(r.currentTarget.checked)
9336
+ }), /* @__PURE__ */ d(R, {
9337
+ children: [/* @__PURE__ */ i(D, {
9338
+ name: `series.${t}.smooth`,
9339
+ control: e,
9340
+ render: ({
9341
+ field: n
9342
+ }) => /* @__PURE__ */ i(B, {
9343
+ sx: {
9344
+ flexGrow: 1
9345
+ },
9346
+ children: /* @__PURE__ */ i(ze, {
9347
+ label: "Smooth Line",
9348
+ checked: n.value,
9349
+ onChange: (r) => n.onChange(r.currentTarget.checked)
9350
+ })
9339
9351
  })
9340
- })
9352
+ }), /* @__PURE__ */ i(D, {
9353
+ name: `series.${t}.display_name_on_line`,
9354
+ control: e,
9355
+ render: ({
9356
+ field: n
9357
+ }) => {
9358
+ var r;
9359
+ return /* @__PURE__ */ i(B, {
9360
+ sx: {
9361
+ flexGrow: 1
9362
+ },
9363
+ children: /* @__PURE__ */ i(ze, {
9364
+ label: "Display Name on Line",
9365
+ checked: (r = n.value) != null ? r : !1,
9366
+ onChange: (o) => n.onChange(o.currentTarget.checked)
9367
+ })
9368
+ });
9369
+ }
9370
+ })]
9341
9371
  })]
9342
9372
  })]
9343
9373
  });
@@ -9509,7 +9539,7 @@ function pg({
9509
9539
  }
9510
9540
  }) => {
9511
9541
  var c;
9512
- return /* @__PURE__ */ i(B, {
9542
+ return /* @__PURE__ */ i(j, {
9513
9543
  label: "Y Axis",
9514
9544
  data: o,
9515
9545
  disabled: o.length === 0,
@@ -9556,7 +9586,7 @@ function pg({
9556
9586
  control: e,
9557
9587
  render: ({
9558
9588
  field: s
9559
- }) => /* @__PURE__ */ i(B, {
9589
+ }) => /* @__PURE__ */ i(j, {
9560
9590
  label: "Label Position",
9561
9591
  data: gg,
9562
9592
  ...s
@@ -9613,6 +9643,7 @@ function fg({
9613
9643
  y_axis_data_key: "value",
9614
9644
  yAxisIndex: 0,
9615
9645
  label_position: "top",
9646
+ display_name_on_line: !1,
9616
9647
  stack: "",
9617
9648
  color: "#000",
9618
9649
  step: !1,
@@ -9623,7 +9654,7 @@ function fg({
9623
9654
  type: "solid",
9624
9655
  width: 1
9625
9656
  }
9626
- }), g = t("y_axes"), c = S.useMemo(() => g.map(({
9657
+ }), g = t("y_axes"), c = w.useMemo(() => g.map(({
9627
9658
  name: f
9628
9659
  }, p) => ({
9629
9660
  label: f,
@@ -9947,7 +9978,7 @@ function wg({
9947
9978
  control: e,
9948
9979
  render: ({
9949
9980
  field: r
9950
- }) => /* @__PURE__ */ i(B, {
9981
+ }) => /* @__PURE__ */ i(j, {
9951
9982
  label: "Align",
9952
9983
  required: !0,
9953
9984
  data: xg,
@@ -9970,7 +10001,7 @@ function wg({
9970
10001
  control: e,
9971
10002
  render: ({
9972
10003
  field: r
9973
- }) => /* @__PURE__ */ i(B, {
10004
+ }) => /* @__PURE__ */ i(j, {
9974
10005
  label: "Position",
9975
10006
  required: !0,
9976
10007
  data: Cg,
@@ -10060,7 +10091,8 @@ function _g(e) {
10060
10091
  smooth: m = !1,
10061
10092
  step: b = !1,
10062
10093
  group_by_key: v = "",
10063
- lineStyle: w = {
10094
+ display_name_on_line: S = !1,
10095
+ lineStyle: F = {
10064
10096
  type: "solid",
10065
10097
  width: 1
10066
10098
  }
@@ -10080,7 +10112,8 @@ function _g(e) {
10080
10112
  smooth: m,
10081
10113
  step: b,
10082
10114
  group_by_key: v,
10083
- lineStyle: w
10115
+ display_name_on_line: S,
10116
+ lineStyle: F
10084
10117
  };
10085
10118
  }
10086
10119
  return e.map(t);
@@ -10113,7 +10146,7 @@ function Ig({
10113
10146
  set: n
10114
10147
  } = Q(e.instanceData, "config"), r = e.data, o = G(() => ot({}, t, sr), [t]), a = G(() => Dg(o), [o]);
10115
10148
  ne(() => {
10116
- !ze(o, a) && (console.log("config malformed, resetting to defaults", o, a), n(a));
10149
+ !Te(o, a) && (console.log("config malformed, resetting to defaults", o, a), n(a));
10117
10150
  }, [o, a]);
10118
10151
  const {
10119
10152
  control: l,
@@ -10121,13 +10154,13 @@ function Ig({
10121
10154
  watch: u,
10122
10155
  getValues: g,
10123
10156
  reset: c
10124
- } = Le({
10157
+ } = Ne({
10125
10158
  defaultValues: a
10126
10159
  });
10127
10160
  ne(() => {
10128
10161
  c(a);
10129
10162
  }, [a]);
10130
- const f = g(), p = G(() => !ze(f, o), [f, o]);
10163
+ const f = g(), p = G(() => !Te(f, o), [f, o]);
10131
10164
  return /* @__PURE__ */ i(R, {
10132
10165
  mt: "md",
10133
10166
  spacing: "xs",
@@ -10396,7 +10429,7 @@ function kg(e, t) {
10396
10429
  },
10397
10430
  color: n
10398
10431
  };
10399
- return U.merge({}, Mg, a);
10432
+ return W.merge({}, Mg, a);
10400
10433
  }
10401
10434
  const ur = {
10402
10435
  series_name_key: "name",
@@ -10412,7 +10445,7 @@ function Ag({
10412
10445
  width: n,
10413
10446
  height: r
10414
10447
  } = e.viewport, o = e.data, a = G(() => kg(ot({}, t, ur), o), [t, o]);
10415
- return !n || !r || !t || fo(t == null ? void 0 : t.dimensions) ? null : /* @__PURE__ */ i(H, {
10448
+ return !n || !r || !t || fo(t == null ? void 0 : t.dimensions) ? null : /* @__PURE__ */ i(B, {
10416
10449
  children: /* @__PURE__ */ i(Ke, {
10417
10450
  echarts: ce,
10418
10451
  option: a,
@@ -10580,7 +10613,7 @@ function Tg({
10580
10613
  series_name_key: l
10581
10614
  }), [a, l]);
10582
10615
  ne(() => {
10583
- !ze(o, s) && r(s);
10616
+ !Te(o, s) && r(s);
10584
10617
  }, [o, s]);
10585
10618
  const {
10586
10619
  control: u,
@@ -10588,13 +10621,13 @@ function Tg({
10588
10621
  watch: c,
10589
10622
  getValues: f,
10590
10623
  reset: p
10591
- } = Le({
10624
+ } = Ne({
10592
10625
  defaultValues: s
10593
10626
  });
10594
10627
  ne(() => {
10595
- ze(f(), s) || p(s);
10628
+ Te(f(), s) || p(s);
10596
10629
  }, [o]), c(["series_name_key"]);
10597
- const m = f(), b = G(() => !ze(m, o), [m, o]);
10630
+ const m = f(), b = G(() => !Te(m, o), [m, o]);
10598
10631
  return /* @__PURE__ */ i(R, {
10599
10632
  mt: "md",
10600
10633
  spacing: "xs",
@@ -10620,7 +10653,7 @@ function Tg({
10620
10653
  size: 20
10621
10654
  })
10622
10655
  })]
10623
- }), /* @__PURE__ */ i(H, {
10656
+ }), /* @__PURE__ */ i(B, {
10624
10657
  py: "sm",
10625
10658
  children: /* @__PURE__ */ i(D, {
10626
10659
  name: "series_name_key",
@@ -10668,13 +10701,13 @@ const Ng = {
10668
10701
  function qg(e, t) {
10669
10702
  switch (e.config.method) {
10670
10703
  case "linear":
10671
- return [...Ge.regressionLinear()(t)];
10704
+ return [...Be.regressionLinear()(t)];
10672
10705
  case "exponential":
10673
- return [...Ge.regressionExp()(t)];
10706
+ return [...Be.regressionExp()(t)];
10674
10707
  case "logarithmic":
10675
- return [...Ge.regressionLog()(t)];
10708
+ return [...Be.regressionLog()(t)];
10676
10709
  case "polynomial":
10677
- return [...Ge.regressionPoly().order(e.config.order)(t)];
10710
+ return [...Be.regressionPoly().order(e.config.order)(t)];
10678
10711
  default:
10679
10712
  return [];
10680
10713
  }
@@ -10719,7 +10752,7 @@ const Bg = {
10719
10752
  };
10720
10753
  function jg(e, t) {
10721
10754
  var a, l;
10722
- const n = U.uniqBy(
10755
+ const n = W.uniqBy(
10723
10756
  t.map((s) => [s[e.x_axis.data_key], s[e.regression.y_axis_data_key]]),
10724
10757
  0
10725
10758
  ), { regressionSeries: r } = Gg(e, n), o = {
@@ -10759,7 +10792,7 @@ function Hg(e, t) {
10759
10792
  y_axis: o
10760
10793
  } = t, a = e.map((l) => [l[r.data_key], l[n.y_axis_data_key]]);
10761
10794
  if (n.transform.config.method === "linear") {
10762
- const l = Ge.regressionLinear()(a), {
10795
+ const l = Be.regressionLinear()(a), {
10763
10796
  a: s,
10764
10797
  b: u,
10765
10798
  rSquared: g
@@ -10798,7 +10831,7 @@ function Hg(e, t) {
10798
10831
  a: l,
10799
10832
  b: s,
10800
10833
  rSquared: u
10801
- } = Ge.regressionExp()(a);
10834
+ } = Be.regressionExp()(a);
10802
10835
  return {
10803
10836
  expression: /* @__PURE__ */ d(y, {
10804
10837
  position: "center",
@@ -10842,7 +10875,7 @@ function Hg(e, t) {
10842
10875
  a: l,
10843
10876
  b: s,
10844
10877
  rSquared: u
10845
- } = Ge.regressionLog()(a);
10878
+ } = Be.regressionLog()(a);
10846
10879
  return {
10847
10880
  expression: /* @__PURE__ */ d(y, {
10848
10881
  position: "center",
@@ -10882,7 +10915,7 @@ function Hg(e, t) {
10882
10915
  };
10883
10916
  }
10884
10917
  if (n.transform.config.method === "polynomial") {
10885
- const l = Ge.regressionPoly().order(n.transform.config.order)(a), {
10918
+ const l = Be.regressionPoly().order(n.transform.config.order)(a), {
10886
10919
  rSquared: s
10887
10920
  } = l;
10888
10921
  return console.log(l), {
@@ -10928,7 +10961,7 @@ const cr = {
10928
10961
  };
10929
10962
  ce.use([Qt, Eo, dt, gt, pt, Ze]);
10930
10963
  ce.registerTransform(Mo.regression);
10931
- function Ug({
10964
+ function Wg({
10932
10965
  context: e
10933
10966
  }) {
10934
10967
  const {
@@ -10951,7 +10984,7 @@ function Ug({
10951
10984
  if (!n || !r || !t)
10952
10985
  return null;
10953
10986
  let g = r;
10954
- return l && (g -= 20), /* @__PURE__ */ d(H, {
10987
+ return l && (g -= 20), /* @__PURE__ */ d(B, {
10955
10988
  children: [l && /* @__PURE__ */ i(C, {
10956
10989
  align: "center",
10957
10990
  size: 12,
@@ -11014,7 +11047,7 @@ function Ug({
11014
11047
  })]
11015
11048
  });
11016
11049
  }
11017
- const Wg = [{
11050
+ const Ug = [{
11018
11051
  label: "Linear",
11019
11052
  value: "linear"
11020
11053
  }, {
@@ -11073,9 +11106,9 @@ function Yg({
11073
11106
  control: e,
11074
11107
  render: ({
11075
11108
  field: o
11076
- }) => /* @__PURE__ */ i(B, {
11109
+ }) => /* @__PURE__ */ i(j, {
11077
11110
  label: "Method",
11078
- data: Wg,
11111
+ data: Ug,
11079
11112
  sx: {
11080
11113
  flex: 1
11081
11114
  },
@@ -11123,13 +11156,13 @@ function Qg({
11123
11156
  watch: s,
11124
11157
  getValues: u,
11125
11158
  reset: g
11126
- } = Le({
11159
+ } = Ne({
11127
11160
  defaultValues: o
11128
11161
  });
11129
11162
  ne(() => {
11130
11163
  g(o);
11131
11164
  }, [o]), s(["x_axis", "y_axis", "regression"]);
11132
- const c = u(), f = G(() => !ze(c, t), [c, t]);
11165
+ const c = u(), f = G(() => !Te(c, t), [c, t]);
11133
11166
  return /* @__PURE__ */ i(R, {
11134
11167
  mt: "md",
11135
11168
  spacing: "xs",
@@ -11243,7 +11276,7 @@ const Jg = {
11243
11276
  displayName: "Regression Chart",
11244
11277
  migrator: new Xg(),
11245
11278
  name: "regressionChart",
11246
- viewRender: Ug,
11279
+ viewRender: Wg,
11247
11280
  configRender: Qg,
11248
11281
  createConfig: () => cr
11249
11282
  }, dr = {
@@ -11303,9 +11336,9 @@ function ep({
11303
11336
  barData: g,
11304
11337
  lineData: c
11305
11338
  } = G(() => {
11306
- const p = n.map((v) => [v[a.data_key], Number(v[l])]).sort((v, w) => w[1] - v[1]), m = p.reduce((v, w) => v + w[1], 0), b = p.reduce((v, w, F) => {
11339
+ const p = n.map((v) => [v[a.data_key], Number(v[l])]).sort((v, S) => S[1] - v[1]), m = p.reduce((v, S) => v + S[1], 0), b = p.reduce((v, S, F) => {
11307
11340
  const $ = F === 0 ? 0 : v[F - 1][1];
11308
- return v.push([w[0], $ + w[1]]), v;
11341
+ return v.push([S[0], $ + S[1]]), v;
11309
11342
  }, []).map((v) => [v[0], v[1] / m]);
11310
11343
  return {
11311
11344
  barData: p,
@@ -11400,13 +11433,13 @@ function tp({
11400
11433
  watch: s,
11401
11434
  getValues: u,
11402
11435
  reset: g
11403
- } = Le({
11436
+ } = Ne({
11404
11437
  defaultValues: o
11405
11438
  });
11406
11439
  ne(() => {
11407
11440
  g(o);
11408
11441
  }, [o]), s(["x_axis", "data_key", "bar", "line"]);
11409
- const c = u(), f = G(() => !ze(c, t), [c, t]);
11442
+ const c = u(), f = G(() => !Te(c, t), [c, t]);
11410
11443
  return /* @__PURE__ */ i(R, {
11411
11444
  mt: "md",
11412
11445
  spacing: "xs",
@@ -11632,7 +11665,7 @@ const rp = {
11632
11665
  vizManager: e,
11633
11666
  colorManager: t
11634
11667
  };
11635
- }, Ne = La(Ti());
11668
+ }, qe = La(Ti());
11636
11669
  try {
11637
11670
  bt.install(zi);
11638
11671
  } catch {
@@ -11680,7 +11713,7 @@ function lp(e) {
11680
11713
  value: t.urlTemplate,
11681
11714
  onChange: l,
11682
11715
  onBlur: o
11683
- }), /* @__PURE__ */ i(Ue, {
11716
+ }), /* @__PURE__ */ i(ze, {
11684
11717
  label: "Open in new Tab",
11685
11718
  checked: t.openInNewTab,
11686
11719
  onChange: (s) => a(s.currentTarget.checked)
@@ -11742,7 +11775,7 @@ const fp = {
11742
11775
  viewID: n == null ? void 0 : n.viewID
11743
11776
  });
11744
11777
  const o = (n == null ? void 0 : n.viewID) || "";
11745
- return /* @__PURE__ */ i(B, {
11778
+ return /* @__PURE__ */ i(j, {
11746
11779
  defaultValue: o,
11747
11780
  value: o,
11748
11781
  onChange: (l) => void r({
@@ -11837,7 +11870,7 @@ class wp {
11837
11870
  operationData: new lt(o, "data")
11838
11871
  };
11839
11872
  };
11840
- this.attachments = new Wn(t, "__OPERATIONS", r);
11873
+ this.attachments = new Un(t, "__OPERATIONS", r);
11841
11874
  }
11842
11875
  async runOperation(t, n) {
11843
11876
  const r = await this.attachments.getInstance(t);
@@ -11888,7 +11921,7 @@ class Sp {
11888
11921
  triggerData: new lt(o, "data")
11889
11922
  };
11890
11923
  };
11891
- this.attachments = new Wn(t, ro, r);
11924
+ this.attachments = new Un(t, ro, r);
11892
11925
  }
11893
11926
  watchTriggerSnapshotList(t) {
11894
11927
  return this.instance.instanceData.watchItem(
@@ -11898,7 +11931,7 @@ class Sp {
11898
11931
  (o) => ({
11899
11932
  id: de(o, "id"),
11900
11933
  schemaRef: de(o, "schemaRef"),
11901
- config: Wt(de(o, "data.config"))
11934
+ config: Ut(de(o, "data.config"))
11902
11935
  })
11903
11936
  );
11904
11937
  t(r);
@@ -11943,7 +11976,7 @@ class Li {
11943
11976
  operationRef: u
11944
11977
  };
11945
11978
  };
11946
- this.attachments = new Wn(t, "__INTERACTIONS", o);
11979
+ this.attachments = new Un(t, "__INTERACTIONS", o);
11947
11980
  }
11948
11981
  async addInteraction(t, n) {
11949
11982
  const r = t.id, o = n.id, a = `[${r}]:[${o}]`;
@@ -12058,7 +12091,7 @@ const Rp = V(({
12058
12091
  data: t
12059
12092
  } = pe(), n = e.viz, {
12060
12093
  vizManager: r
12061
- } = Te(Ne), 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]);
12062
12095
  return ne(() => a.instanceData.watchItem(
12063
12096
  null,
12064
12097
  Xa((s) => {
@@ -12082,7 +12115,7 @@ const Rp = V(({
12082
12115
  }, Fp = V(() => {
12083
12116
  const {
12084
12117
  panel: e
12085
- } = pe(), [t, n] = S.useState(e.description), r = e.description !== t, o = S.useCallback(() => {
12118
+ } = pe(), [t, n] = w.useState(e.description), r = e.description !== t, o = w.useCallback(() => {
12086
12119
  !r || e.setDescription(t);
12087
12120
  }, [r, t]);
12088
12121
  return /* @__PURE__ */ d(R, {
@@ -12123,7 +12156,7 @@ const Rp = V(({
12123
12156
  style: t
12124
12157
  } = e;
12125
12158
  return /* @__PURE__ */ i(K, {
12126
- children: /* @__PURE__ */ i(Ue, {
12159
+ children: /* @__PURE__ */ i(ze, {
12127
12160
  label: "Border",
12128
12161
  checked: t.border.enabled,
12129
12162
  onChange: (n) => t.border.setEnabled(n.currentTarget.checked)
@@ -12190,7 +12223,7 @@ const Rp = V(({
12190
12223
  } = pe(), {
12191
12224
  title: t,
12192
12225
  setTitle: n
12193
- } = e, [r, o] = Ro(t), a = t !== r, l = S.useCallback(() => {
12226
+ } = e, [r, o] = Ro(t), a = t !== r, l = w.useCallback(() => {
12194
12227
  !a || n(r);
12195
12228
  }, [a, r]);
12196
12229
  return /* @__PURE__ */ i(E, {
@@ -12245,7 +12278,7 @@ function kp() {
12245
12278
  labelPosition: "center",
12246
12279
  variant: "dashed"
12247
12280
  }), /* @__PURE__ */ i(Mp, {}), /* @__PURE__ */ i(Fp, {})]
12248
- }), /* @__PURE__ */ i(H, {
12281
+ }), /* @__PURE__ */ i(B, {
12249
12282
  sx: {
12250
12283
  height: "100%",
12251
12284
  flexGrow: 1,
@@ -12261,7 +12294,7 @@ const Ap = V(function() {
12261
12294
  queryID: n,
12262
12295
  setQueryID: r
12263
12296
  }
12264
- } = pe(), o = S.useMemo(() => t.queries.current.map((a) => ({
12297
+ } = pe(), o = w.useMemo(() => t.queries.current.map((a) => ({
12265
12298
  value: a.id,
12266
12299
  label: a.id
12267
12300
  })), [t.queries.current]);
@@ -12274,7 +12307,7 @@ const Ap = V(function() {
12274
12307
  },
12275
12308
  children: [/* @__PURE__ */ i(C, {
12276
12309
  children: "Select a Query"
12277
- }), /* @__PURE__ */ i(B, {
12310
+ }), /* @__PURE__ */ i(j, {
12278
12311
  data: o,
12279
12312
  value: n,
12280
12313
  onChange: r,
@@ -12290,7 +12323,7 @@ const Ap = V(function() {
12290
12323
  });
12291
12324
  });
12292
12325
  function Ni(e, t, n) {
12293
- 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);
12294
12327
  return Rt(async () => {
12295
12328
  if (await o.migrator.needMigration(t) && !r.has(t.id))
12296
12329
  try {
@@ -12344,7 +12377,7 @@ function Pp(e) {
12344
12377
  function zp(e, t) {
12345
12378
  const {
12346
12379
  vizManager: n
12347
- } = Te(Ne), {
12380
+ } = Le(qe), {
12348
12381
  panel: {
12349
12382
  viz: r,
12350
12383
  title: o,
@@ -12376,31 +12409,32 @@ const Tp = ["richText"], qi = V(function({
12376
12409
  height: t,
12377
12410
  viz: n,
12378
12411
  data: r,
12379
- loading: o
12412
+ loading: o,
12413
+ error: a
12380
12414
  }) {
12381
12415
  const {
12382
- ref: a,
12383
- width: l,
12384
- height: s
12385
- } = _n(), u = S.useMemo(() => !Array.isArray(r) || r.length === 0, [r]), g = zp(r, {
12386
- w: l,
12387
- 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
12388
12422
  });
12389
12423
  return Tp.includes(n.type) ? /* @__PURE__ */ i("div", {
12390
12424
  className: "viz-root",
12391
12425
  style: {
12392
12426
  height: t
12393
12427
  },
12394
- ref: a,
12428
+ ref: l,
12395
12429
  children: /* @__PURE__ */ i(ut, {
12396
- children: g
12430
+ children: c
12397
12431
  })
12398
12432
  }) : o ? /* @__PURE__ */ i("div", {
12399
12433
  className: "viz-root",
12400
12434
  style: {
12401
12435
  height: t
12402
12436
  },
12403
- ref: a,
12437
+ ref: l,
12404
12438
  children: /* @__PURE__ */ i(Gt, {
12405
12439
  visible: o,
12406
12440
  exitTransitionDuration: 0
@@ -12410,13 +12444,21 @@ const Tp = ["richText"], qi = V(function({
12410
12444
  style: {
12411
12445
  height: t
12412
12446
  },
12413
- ref: a,
12414
- 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, {
12415
12457
  color: "gray",
12416
12458
  align: "center",
12417
12459
  children: "Empty Data"
12418
- }), !u && /* @__PURE__ */ i(ut, {
12419
- children: g
12460
+ }), !g && /* @__PURE__ */ i(ut, {
12461
+ children: c
12420
12462
  })]
12421
12463
  });
12422
12464
  }), Lp = V(() => {
@@ -12437,7 +12479,7 @@ const Tp = ["richText"], qi = V(function({
12437
12479
  function Np() {
12438
12480
  const {
12439
12481
  vizManager: e
12440
- } = Te(Ne);
12482
+ } = Le(qe);
12441
12483
  return G(() => e.availableVizList.map((t) => ({
12442
12484
  value: t.name,
12443
12485
  label: t.displayName
@@ -12466,7 +12508,7 @@ function Gp() {
12466
12508
  }
12467
12509
  } = pe(), {
12468
12510
  vizManager: c
12469
- } = Te(Ne), f = {
12511
+ } = Le(qe), f = {
12470
12512
  title: n,
12471
12513
  description: o,
12472
12514
  viz: t,
@@ -12498,7 +12540,7 @@ const Bp = V(() => {
12498
12540
  }
12499
12541
  } = pe(), [n, r] = Ro(t.type), o = t.type !== n, {
12500
12542
  vizManager: a
12501
- } = Te(Ne), l = S.useCallback(() => {
12543
+ } = Le(qe), l = w.useCallback(() => {
12502
12544
  if (!o)
12503
12545
  return;
12504
12546
  const m = qp(a, n);
@@ -12509,7 +12551,7 @@ const Bp = V(() => {
12509
12551
  } catch (b) {
12510
12552
  console.error(b);
12511
12553
  }
12512
- }, u = S.useMemo(() => {
12554
+ }, u = w.useMemo(() => {
12513
12555
  var m;
12514
12556
  return (m = An.find((b) => b.value === n)) == null ? void 0 : m.Panel;
12515
12557
  }, [n, An]), g = Gp(), c = u ? Ht(u, {
@@ -12518,7 +12560,7 @@ const Bp = V(() => {
12518
12560
  setConf: t.setConf
12519
12561
  }) : null, f = g || c, p = Np();
12520
12562
  return /* @__PURE__ */ d(K, {
12521
- children: [/* @__PURE__ */ i(B, {
12563
+ children: [/* @__PURE__ */ i(j, {
12522
12564
  label: "Visualization",
12523
12565
  value: n,
12524
12566
  onChange: r,
@@ -12556,7 +12598,7 @@ function jp() {
12556
12598
  height: "100%"
12557
12599
  },
12558
12600
  children: /* @__PURE__ */ i(Bp, {})
12559
- }), /* @__PURE__ */ i(H, {
12601
+ }), /* @__PURE__ */ i(B, {
12560
12602
  sx: {
12561
12603
  height: "100%",
12562
12604
  flexGrow: 1,
@@ -12572,14 +12614,14 @@ const Hp = V(function({
12572
12614
  }) {
12573
12615
  const {
12574
12616
  freezeLayout: r
12575
- } = S.useContext($e), [o, a] = be("Visualization"), {
12617
+ } = w.useContext($e), [o, a] = be("Visualization"), {
12576
12618
  panel: l,
12577
12619
  loading: s
12578
12620
  } = pe(), {
12579
12621
  id: u,
12580
12622
  title: g
12581
12623
  } = l;
12582
- return S.useEffect(() => {
12624
+ return w.useEffect(() => {
12583
12625
  r(t);
12584
12626
  }, [t]), /* @__PURE__ */ i(Fe, {
12585
12627
  size: "96vw",
@@ -12650,20 +12692,20 @@ const Hp = V(function({
12650
12692
  })
12651
12693
  })
12652
12694
  });
12653
- }), Up = V(({
12695
+ }), Wp = V(({
12654
12696
  view: e
12655
12697
  }) => {
12656
- const t = ee(), n = za(), [r, o] = S.useState(!1), a = () => o(!0), l = () => o(!1), {
12698
+ const t = ee(), n = za(), [r, o] = w.useState(!1), a = () => o(!0), l = () => o(!1), {
12657
12699
  panel: s
12658
12700
  } = pe(), {
12659
12701
  id: u,
12660
12702
  queryID: g
12661
12703
  } = s, {
12662
12704
  inEditMode: c
12663
- } = S.useContext($e), f = () => t.queries.refetchDataByQueryID(g), {
12705
+ } = w.useContext($e), f = () => t.queries.refetchDataByQueryID(g), {
12664
12706
  viewPanelInFullScreen: p,
12665
12707
  inFullScreen: m
12666
- } = S.useContext(Bn), b = () => {
12708
+ } = w.useContext(Bn), b = () => {
12667
12709
  e.panels.duplicateByID(u);
12668
12710
  }, v = () => n.openConfirmModal({
12669
12711
  title: "Delete this panel?",
@@ -12673,11 +12715,11 @@ const Hp = V(function({
12673
12715
  },
12674
12716
  onCancel: () => console.log("Cancel"),
12675
12717
  onConfirm: () => e.panels.removeByID(u)
12676
- }), w = S.useCallback(() => {
12718
+ }), S = w.useCallback(() => {
12677
12719
  p(u);
12678
12720
  }, [u, p]);
12679
12721
  return /* @__PURE__ */ d(K, {
12680
- children: [/* @__PURE__ */ i(H, {
12722
+ children: [/* @__PURE__ */ i(B, {
12681
12723
  sx: {
12682
12724
  position: "absolute",
12683
12725
  top: 0,
@@ -12688,7 +12730,7 @@ const Hp = V(function({
12688
12730
  children: /* @__PURE__ */ d(ve, {
12689
12731
  withinPortal: !0,
12690
12732
  children: [/* @__PURE__ */ i(ve.Target, {
12691
- children: /* @__PURE__ */ i(H, {
12733
+ children: /* @__PURE__ */ i(B, {
12692
12734
  className: "panel-dropdown-target",
12693
12735
  sx: {
12694
12736
  width: "100%",
@@ -12709,7 +12751,7 @@ const Hp = V(function({
12709
12751
  }),
12710
12752
  children: "Download Data"
12711
12753
  }), !m && /* @__PURE__ */ i(ve.Item, {
12712
- onClick: w,
12754
+ onClick: S,
12713
12755
  icon: /* @__PURE__ */ i(ol, {
12714
12756
  size: 14
12715
12757
  }),
@@ -12747,7 +12789,7 @@ const Hp = V(function({
12747
12789
  })]
12748
12790
  });
12749
12791
  });
12750
- const Wp = V(function() {
12792
+ const Up = V(function() {
12751
12793
  const {
12752
12794
  panel: t
12753
12795
  } = pe(), {
@@ -12792,24 +12834,25 @@ const fr = V(function({
12792
12834
  }) {
12793
12835
  const r = ee(), {
12794
12836
  inEditMode: o
12795
- } = Te($e), {
12837
+ } = Le($e), {
12796
12838
  data: a,
12797
- state: l
12798
- } = 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;
12799
12842
  return /* @__PURE__ */ i(Ol, {
12800
12843
  value: {
12801
12844
  panel: t,
12802
12845
  data: a,
12803
- loading: u
12846
+ loading: g
12804
12847
  },
12805
- children: /* @__PURE__ */ d(H, {
12848
+ children: /* @__PURE__ */ d(B, {
12806
12849
  className: "panel-root",
12807
12850
  p: 5,
12808
12851
  pt: 0,
12809
12852
  sx: {
12810
- ...c
12853
+ ...f
12811
12854
  },
12812
- children: [/* @__PURE__ */ i(H, {
12855
+ children: [/* @__PURE__ */ i(B, {
12813
12856
  sx: {
12814
12857
  position: "absolute",
12815
12858
  left: 0,
@@ -12818,13 +12861,14 @@ const fr = V(function({
12818
12861
  zIndex: 310
12819
12862
  },
12820
12863
  children: /* @__PURE__ */ i(Ko, {})
12821
- }), f && /* @__PURE__ */ i(Up, {
12864
+ }), p && /* @__PURE__ */ i(Wp, {
12822
12865
  view: n
12823
- }), /* @__PURE__ */ i(Wp, {}), /* @__PURE__ */ i(qi, {
12866
+ }), /* @__PURE__ */ i(Up, {}), /* @__PURE__ */ i(qi, {
12824
12867
  viz: t.viz,
12825
12868
  data: a,
12826
- loading: u,
12827
- height: g
12869
+ loading: g,
12870
+ error: s,
12871
+ height: c
12828
12872
  })]
12829
12873
  })
12830
12874
  });
@@ -12870,9 +12914,9 @@ const fr = V(function({
12870
12914
  });
12871
12915
  });
12872
12916
  function Bi(e, t, n) {
12873
- const r = e.id === "Main", [o, a] = S.useState(() => r && e.panels.findByID(t) ? t : null), l = S.useCallback((c) => {
12917
+ const r = e.id === "Main", [o, a] = w.useState(() => r && e.panels.findByID(t) ? t : null), l = w.useCallback((c) => {
12874
12918
  a(c), r && n(c);
12875
- }, [r, n]), s = S.useCallback(() => {
12919
+ }, [r, n]), s = w.useCallback(() => {
12876
12920
  a(null), r && n("");
12877
12921
  }, [r, n]), u = o ? e.panels.findByID(o) : null;
12878
12922
  return {
@@ -12883,7 +12927,7 @@ function Bi(e, t, n) {
12883
12927
  };
12884
12928
  }
12885
12929
  function ji() {
12886
- S.useEffect(() => {
12930
+ w.useEffect(() => {
12887
12931
  const e = Cl(".dashboard-sticky-area", {
12888
12932
  useStickyClasses: !0,
12889
12933
  parentClass: "dashboard-sticky-parent"
@@ -12893,7 +12937,7 @@ function ji() {
12893
12937
  };
12894
12938
  }, []);
12895
12939
  }
12896
- const Jp = S.forwardRef(({
12940
+ const Jp = w.forwardRef(({
12897
12941
  handleAxis: e
12898
12942
  }, t) => /* @__PURE__ */ i(P, {
12899
12943
  ref: t,
@@ -12913,7 +12957,7 @@ const Jp = S.forwardRef(({
12913
12957
  children: /* @__PURE__ */ i(ll, {
12914
12958
  size: 16
12915
12959
  })
12916
- })), Kp = S.forwardRef(({
12960
+ })), Kp = w.forwardRef(({
12917
12961
  handleAxis: e,
12918
12962
  ...t
12919
12963
  }, n) => /* @__PURE__ */ i(P, {
@@ -12942,7 +12986,7 @@ const Jp = S.forwardRef(({
12942
12986
  isDraggable: o,
12943
12987
  isResizable: a
12944
12988
  }) {
12945
- const l = S.useCallback((s) => {
12989
+ const l = w.useCallback((s) => {
12946
12990
  s.forEach(({
12947
12991
  i: u,
12948
12992
  ...g
@@ -12994,7 +13038,7 @@ const Jp = S.forwardRef(({
12994
13038
  });
12995
13039
  }), rf = V(({
12996
13040
  children: e
12997
- }) => /* @__PURE__ */ i(H, {
13041
+ }) => /* @__PURE__ */ i(B, {
12998
13042
  children: e
12999
13043
  })), of = V(({
13000
13044
  children: e,
@@ -13003,7 +13047,7 @@ const Jp = S.forwardRef(({
13003
13047
  size: t.config.width,
13004
13048
  overflow: "inside",
13005
13049
  opened: !0,
13006
- onClose: U.noop,
13050
+ onClose: W.noop,
13007
13051
  withCloseButton: !1,
13008
13052
  title: t.name,
13009
13053
  trapFocus: !0,
@@ -13064,7 +13108,7 @@ const Jp = S.forwardRef(({
13064
13108
  viewPanelInFullScreen: a,
13065
13109
  inFullScreen: s
13066
13110
  },
13067
- children: /* @__PURE__ */ d(H, {
13111
+ children: /* @__PURE__ */ d(B, {
13068
13112
  className: "dashboard-view",
13069
13113
  mx: -10,
13070
13114
  sx: {
@@ -13079,9 +13123,9 @@ const Jp = S.forwardRef(({
13079
13123
  saveChanges: n
13080
13124
  }), /* @__PURE__ */ i(af, {
13081
13125
  view: t,
13082
- children: /* @__PURE__ */ d(H, {
13126
+ children: /* @__PURE__ */ d(B, {
13083
13127
  className: "dashboard-sticky-parent",
13084
- children: [/* @__PURE__ */ i(H, {
13128
+ children: [/* @__PURE__ */ i(B, {
13085
13129
  className: "dashboard-sticky-area",
13086
13130
  children: /* @__PURE__ */ i(qo, {
13087
13131
  view: t
@@ -13097,7 +13141,7 @@ const Jp = S.forwardRef(({
13097
13141
  });
13098
13142
  }), sf = V(({
13099
13143
  children: e
13100
- }) => /* @__PURE__ */ i(H, {
13144
+ }) => /* @__PURE__ */ i(B, {
13101
13145
  children: e
13102
13146
  })), uf = V(({
13103
13147
  children: e,
@@ -13160,7 +13204,7 @@ const Jp = S.forwardRef(({
13160
13204
  viewPanelInFullScreen: o,
13161
13205
  inFullScreen: l
13162
13206
  },
13163
- children: /* @__PURE__ */ d(H, {
13207
+ children: /* @__PURE__ */ d(B, {
13164
13208
  className: "dashboard-view",
13165
13209
  mx: -10,
13166
13210
  sx: {
@@ -13172,12 +13216,12 @@ const Jp = S.forwardRef(({
13172
13216
  panel: s,
13173
13217
  exitFullScreen: a
13174
13218
  }), !l && /* @__PURE__ */ i(Jo, {
13175
- saveChanges: U.noop
13219
+ saveChanges: W.noop
13176
13220
  }), /* @__PURE__ */ i(cf, {
13177
13221
  view: t,
13178
- children: /* @__PURE__ */ d(H, {
13222
+ children: /* @__PURE__ */ d(B, {
13179
13223
  className: "dashboard-sticky-parent",
13180
- children: [/* @__PURE__ */ i(H, {
13224
+ children: [/* @__PURE__ */ i(B, {
13181
13225
  className: "dashboard-sticky-area",
13182
13226
  children: /* @__PURE__ */ i(qo, {
13183
13227
  view: t
@@ -13199,11 +13243,11 @@ const Jp = S.forwardRef(({
13199
13243
  setValue(t) {
13200
13244
  e.value = t;
13201
13245
  }
13202
- })), Ui = x.model("FilterConfigModel_Select", {
13246
+ })), Wi = x.model("FilterConfigModel_Select", {
13203
13247
  required: x.boolean,
13204
13248
  default_value: x.string,
13205
13249
  static_options: x.optional(x.array(Hi), []),
13206
- options_query: Wo
13250
+ options_query: Uo
13207
13251
  }).actions((e) => ({
13208
13252
  addStaticOption(t) {
13209
13253
  e.static_options.push(t);
@@ -13220,7 +13264,7 @@ const Jp = S.forwardRef(({
13220
13264
  setOptionsQuery(t) {
13221
13265
  e.options_query = t;
13222
13266
  }
13223
- })), gf = () => Ui.create({
13267
+ })), gf = () => Wi.create({
13224
13268
  required: !1,
13225
13269
  default_value: "",
13226
13270
  static_options: [],
@@ -13229,10 +13273,10 @@ const Jp = S.forwardRef(({
13229
13273
  key: "",
13230
13274
  sql: ""
13231
13275
  }
13232
- }), Wi = x.model("FilterConfigModel_MultiSelect", {
13276
+ }), Ui = x.model("FilterConfigModel_MultiSelect", {
13233
13277
  default_value: x.optional(x.array(x.string), []),
13234
13278
  static_options: x.optional(x.array(Hi), []),
13235
- options_query: Wo
13279
+ options_query: Uo
13236
13280
  }).actions((e) => ({
13237
13281
  addStaticOption(t) {
13238
13282
  e.static_options.push(t);
@@ -13246,7 +13290,7 @@ const Jp = S.forwardRef(({
13246
13290
  setOptionsQuery(t) {
13247
13291
  e.options_query = t;
13248
13292
  }
13249
- })), pf = () => Wi.create({
13293
+ })), pf = () => Ui.create({
13250
13294
  default_value: [],
13251
13295
  static_options: [],
13252
13296
  options_query: {
@@ -13318,8 +13362,8 @@ const Jp = S.forwardRef(({
13318
13362
  Ce.DateRange
13319
13363
  ]),
13320
13364
  config: x.union(
13321
- Ui,
13322
13365
  Wi,
13366
+ Ui,
13323
13367
  Yo,
13324
13368
  Yi,
13325
13369
  Qi
@@ -13386,20 +13430,20 @@ const bf = x.model("FiltersModel", {
13386
13430
  values: x.optional(x.frozen(), {})
13387
13431
  }).views((e) => ({
13388
13432
  get changed() {
13389
- return !U.isEqual(e.original, e.current);
13433
+ return !W.isEqual(e.original, e.current);
13390
13434
  },
13391
13435
  get firstID() {
13392
13436
  if (e.current.length !== 0)
13393
13437
  return e.current[0].id;
13394
13438
  },
13395
13439
  get inOrder() {
13396
- return U.sortBy(e.current, "order");
13440
+ return W.sortBy(e.current, "order");
13397
13441
  },
13398
13442
  get empty() {
13399
13443
  return e.current.length === 0;
13400
13444
  },
13401
13445
  visibleInView(t) {
13402
- return U.sortBy(
13446
+ return W.sortBy(
13403
13447
  e.current.filter((n) => n.visibleInViewsIDs.includes(t)),
13404
13448
  "order"
13405
13449
  );
@@ -13416,7 +13460,7 @@ const bf = x.model("FiltersModel", {
13416
13460
  }
13417
13461
  })).actions((e) => ({
13418
13462
  reset() {
13419
- e.current = U.cloneDeep(e.original);
13463
+ e.current = W.cloneDeep(e.original);
13420
13464
  },
13421
13465
  replace(t) {
13422
13466
  e.current = Je(t);
@@ -13519,11 +13563,11 @@ var hr = { exports: {} };
13519
13563
  return r(g, c, f);
13520
13564
  var m = g.type === "application/octet-stream", b = /constructor/i.test(l.HTMLElement) || l.safari, v = /CriOS\/[\d]+/.test(navigator.userAgent);
13521
13565
  if ((v || m && b || s) && typeof FileReader < "u") {
13522
- var w = new FileReader();
13523
- w.onloadend = function() {
13524
- var A = w.result;
13566
+ var S = new FileReader();
13567
+ S.onloadend = function() {
13568
+ var A = S.result;
13525
13569
  A = v ? A : A.replace(/^data:[^;]*;/, "data:attachment/file;"), p ? p.location.href = A : location = A, p = null;
13526
- }, w.readAsDataURL(g);
13570
+ }, S.readAsDataURL(g);
13527
13571
  } else {
13528
13572
  var F = l.URL || l.webkitURL, $ = F.createObjectURL(g);
13529
13573
  p ? p.location = $ : location.href = $, p = null, setTimeout(function() {
@@ -13624,7 +13668,9 @@ const Ki = x.model("QueryModel", {
13624
13668
  })
13625
13669
  ), e.state = "idle";
13626
13670
  } catch (t) {
13627
- 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";
13628
13674
  }
13629
13675
  }
13630
13676
  })
@@ -13643,7 +13689,7 @@ const Ki = x.model("QueryModel", {
13643
13689
  current: x.optional(x.array(wf), [])
13644
13690
  }).views((e) => ({
13645
13691
  get changed() {
13646
- 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));
13647
13693
  },
13648
13694
  get firstID() {
13649
13695
  if (e.current.length !== 0)
@@ -13731,14 +13777,17 @@ const Ki = x.model("QueryModel", {
13731
13777
  current: x.optional(x.array(ao), [])
13732
13778
  }).views((e) => ({
13733
13779
  get changed() {
13734
- return !U.isEqual(e.original, e.current);
13780
+ return !W.isEqual(e.original, e.current);
13735
13781
  },
13736
13782
  get json() {
13737
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), {});
13738
13787
  }
13739
13788
  })).actions((e) => ({
13740
13789
  reset() {
13741
- e.current = U.cloneDeep(e.original);
13790
+ e.current = W.cloneDeep(e.original);
13742
13791
  },
13743
13792
  replace(t) {
13744
13793
  e.current = Je(t);
@@ -13984,7 +14033,7 @@ const Ki = x.model("QueryModel", {
13984
14033
  idOfVIE: x.string
13985
14034
  }).views((e) => ({
13986
14035
  get changed() {
13987
- 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));
13988
14037
  },
13989
14038
  get json() {
13990
14039
  return e.current.map((t) => t.json);
@@ -14111,7 +14160,7 @@ const kf = x.model({
14111
14160
  return n ? {
14112
14161
  data: n.data.toJSON(),
14113
14162
  state: n.state,
14114
- error: void 0
14163
+ error: n.error
14115
14164
  } : {
14116
14165
  data: [],
14117
14166
  state: "idle",
@@ -14154,12 +14203,12 @@ const hh = V(function({
14154
14203
  setFullScreenPanelID: s
14155
14204
  }) {
14156
14205
  rt.baseURL !== a.apiBaseURL && (rt.baseURL = a.apiBaseURL);
14157
- const [u, g] = S.useState(!1), c = S.useMemo(() => ea(n, t), [n]);
14158
- Oo(c, !0), S.useEffect(() => {
14206
+ const [u, g] = w.useState(!1), c = w.useMemo(() => ea(n, t), [n]);
14207
+ Oo(c, !0), w.useEffect(() => {
14159
14208
  c.context.replace(t);
14160
14209
  }, [t]);
14161
14210
  const f = async () => {
14162
- const m = [...c.queries.json], b = [...c.sqlSnippets.json], v = [...c.views.json], w = {
14211
+ const m = [...c.queries.json], b = [...c.sqlSnippets.json], v = [...c.views.json], S = {
14163
14212
  ...n,
14164
14213
  filters: [...c.filters.current],
14165
14214
  views: v,
@@ -14168,8 +14217,8 @@ const hh = V(function({
14168
14217
  queries: m
14169
14218
  }
14170
14219
  };
14171
- await r(w);
14172
- }, p = We(Ti, []);
14220
+ await r(S);
14221
+ }, p = Ue(Ti, []);
14173
14222
  return /* @__PURE__ */ i(uo, {
14174
14223
  children: /* @__PURE__ */ i(zo, {
14175
14224
  value: c,
@@ -14180,12 +14229,12 @@ const hh = V(function({
14180
14229
  inEditMode: !0,
14181
14230
  inUseMode: !1
14182
14231
  },
14183
- children: /* @__PURE__ */ i(H, {
14232
+ children: /* @__PURE__ */ i(B, {
14184
14233
  className: `${o} dashboard-root`,
14185
14234
  sx: {
14186
14235
  position: "relative"
14187
14236
  },
14188
- children: /* @__PURE__ */ i(Ne.Provider, {
14237
+ children: /* @__PURE__ */ i(qe.Provider, {
14189
14238
  value: p,
14190
14239
  children: c.views.visibleViews.map((m) => /* @__PURE__ */ i(lf, {
14191
14240
  view: m,
@@ -14207,8 +14256,8 @@ const hh = V(function({
14207
14256
  setFullScreenPanelID: a
14208
14257
  }) => {
14209
14258
  rt.baseURL !== r.apiBaseURL && (rt.baseURL = r.apiBaseURL);
14210
- const l = S.useMemo(() => ea(t, e), [t]);
14211
- return Oo(l, !1), S.useEffect(() => {
14259
+ const l = w.useMemo(() => ea(t, e), [t]);
14260
+ return Oo(l, !1), w.useEffect(() => {
14212
14261
  l.context.replace(e);
14213
14262
  }, [e]), /* @__PURE__ */ i(uo, {
14214
14263
  children: /* @__PURE__ */ i(zo, {
@@ -14216,11 +14265,11 @@ const hh = V(function({
14216
14265
  children: /* @__PURE__ */ i($e.Provider, {
14217
14266
  value: {
14218
14267
  layoutFrozen: !0,
14219
- freezeLayout: U.noop,
14268
+ freezeLayout: W.noop,
14220
14269
  inEditMode: !1,
14221
14270
  inUseMode: !0
14222
14271
  },
14223
- children: /* @__PURE__ */ i(H, {
14272
+ children: /* @__PURE__ */ i(B, {
14224
14273
  className: `${n} dashboard-root dashboard-sticky-parent`,
14225
14274
  children: l.views.visibleViews.map((s) => /* @__PURE__ */ i(df, {
14226
14275
  view: s,
@@ -14241,15 +14290,15 @@ var ta = { exports: {} };
14241
14290
  return function(o, a, l) {
14242
14291
  var s, u = function(p, m, b) {
14243
14292
  b === void 0 && (b = {});
14244
- var v = new Date(p), w = function(F, $) {
14293
+ var v = new Date(p), S = function(F, $) {
14245
14294
  $ === void 0 && ($ = {});
14246
14295
  var A = $.timeZoneName || "short", L = F + "|" + A, Y = r[L];
14247
14296
  return Y || (Y = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: F, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: A }), r[L] = Y), Y;
14248
14297
  }(m, b);
14249
- return w.formatToParts(v);
14298
+ return S.formatToParts(v);
14250
14299
  }, g = function(p, m) {
14251
- for (var b = u(p, m), v = [], w = 0; w < b.length; w += 1) {
14252
- var F = b[w], $ = F.type, A = F.value, L = n[$];
14300
+ for (var b = u(p, m), v = [], S = 0; S < b.length; S += 1) {
14301
+ var F = b[S], $ = F.type, A = F.value, L = n[$];
14253
14302
  L >= 0 && (v[L] = parseInt(A, 10));
14254
14303
  }
14255
14304
  var Y = v[3], le = Y === 24 ? 0 : Y, ie = v[0] + "-" + v[1] + "-" + v[2] + " " + le + ":" + v[4] + ":" + v[5] + ":000", ye = +p;
@@ -14257,7 +14306,7 @@ var ta = { exports: {} };
14257
14306
  }, c = a.prototype;
14258
14307
  c.tz = function(p, m) {
14259
14308
  p === void 0 && (p = s);
14260
- var b = this.utcOffset(), v = this.toDate(), w = v.toLocaleString("en-US", { timeZone: p }), F = Math.round((v - new Date(w)) / 1e3 / 60), $ = l(w).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(v.getTimezoneOffset() / 15) - F, !0);
14309
+ var b = this.utcOffset(), v = this.toDate(), S = v.toLocaleString("en-US", { timeZone: p }), F = Math.round((v - new Date(S)) / 1e3 / 60), $ = l(S).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(v.getTimezoneOffset() / 15) - F, !0);
14261
14310
  if (m) {
14262
14311
  var A = $.utcOffset();
14263
14312
  $ = $.add(b - A, "minute");
@@ -14276,17 +14325,17 @@ var ta = { exports: {} };
14276
14325
  var b = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"));
14277
14326
  return f.call(b, p, m).tz(this.$x.$timezone, !0);
14278
14327
  }, l.tz = function(p, m, b) {
14279
- var v = b && m, w = b || m || s, F = g(+l(), w);
14328
+ var v = b && m, S = b || m || s, F = g(+l(), S);
14280
14329
  if (typeof p != "string")
14281
- return l(p).tz(w);
14330
+ return l(p).tz(S);
14282
14331
  var $ = function(le, ie, ye) {
14283
14332
  var fe = le - 60 * ie * 1e3, Re = g(fe, ye);
14284
14333
  if (ie === Re)
14285
14334
  return [fe, ie];
14286
14335
  var se = g(fe -= 60 * (Re - ie) * 1e3, ye);
14287
14336
  return Re === se ? [fe, Re] : [le - 60 * Math.min(Re, se) * 1e3, Math.max(Re, se)];
14288
- }(l.utc(p, v).valueOf(), F, w), A = $[0], L = $[1], Y = l(A).utcOffset(L);
14289
- return Y.$x.$timezone = w, Y;
14337
+ }(l.utc(p, v).valueOf(), F, S), A = $[0], L = $[1], Y = l(A).utcOffset(L);
14338
+ return Y.$x.$timezone = S, Y;
14290
14339
  }, l.tz.guess = function() {
14291
14340
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
14292
14341
  }, l.tz.setDefault = function(p) {
@@ -14305,11 +14354,11 @@ var na = { exports: {} };
14305
14354
  return function(a, l, s) {
14306
14355
  var u = l.prototype;
14307
14356
  s.utc = function(v) {
14308
- var w = { date: v, utc: !0, args: arguments };
14309
- return new l(w);
14357
+ var S = { date: v, utc: !0, args: arguments };
14358
+ return new l(S);
14310
14359
  }, u.utc = function(v) {
14311
- var w = s(this.toDate(), { locale: this.$L, utc: !0 });
14312
- return v ? w.add(this.utcOffset(), n) : w;
14360
+ var S = s(this.toDate(), { locale: this.$L, utc: !0 });
14361
+ return v ? S.add(this.utcOffset(), n) : S;
14313
14362
  }, u.local = function() {
14314
14363
  return s(this.toDate(), { locale: this.$L, utc: !1 });
14315
14364
  };
@@ -14326,7 +14375,7 @@ var na = { exports: {} };
14326
14375
  c.call(this);
14327
14376
  };
14328
14377
  var f = u.utcOffset;
14329
- u.utcOffset = function(v, w) {
14378
+ u.utcOffset = function(v, S) {
14330
14379
  var F = this.$utils().u;
14331
14380
  if (F(v))
14332
14381
  return this.$u ? 0 : F(this.$offset) ? f.call(this) : this.$offset;
@@ -14340,7 +14389,7 @@ var na = { exports: {} };
14340
14389
  }(v), v === null))
14341
14390
  return this;
14342
14391
  var $ = Math.abs(v) <= 16 ? 60 * v : v, A = this;
14343
- if (w)
14392
+ if (S)
14344
14393
  return A.$offset = $, A.$u = v === 0, A;
14345
14394
  if (v !== 0) {
14346
14395
  var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
@@ -14351,8 +14400,8 @@ var na = { exports: {} };
14351
14400
  };
14352
14401
  var p = u.format;
14353
14402
  u.format = function(v) {
14354
- var w = v || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
14355
- return p.call(this, w);
14403
+ var S = v || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
14404
+ return p.call(this, S);
14356
14405
  }, u.valueOf = function() {
14357
14406
  var v = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
14358
14407
  return this.$d.valueOf() - 6e4 * v;
@@ -14368,11 +14417,11 @@ var na = { exports: {} };
14368
14417
  return v === "s" && this.$offset ? s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : m.call(this);
14369
14418
  };
14370
14419
  var b = u.diff;
14371
- u.diff = function(v, w, F) {
14420
+ u.diff = function(v, S, F) {
14372
14421
  if (v && this.$u === v.$u)
14373
- return b.call(this, v, w, F);
14422
+ return b.call(this, v, S, F);
14374
14423
  var $ = this.local(), A = s(v).local();
14375
- return b.call($, A, w, F);
14424
+ return b.call($, A, S, F);
14376
14425
  };
14377
14426
  };
14378
14427
  });