@carto/ps-react-ui 4.3.10 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/types/hooks/use-widget-ref.d.ts +5 -2
  2. package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +21 -0
  3. package/dist/types/widgets/actions/brush-toggle/style.d.ts +13 -0
  4. package/dist/types/widgets/actions/brush-toggle/types.d.ts +33 -0
  5. package/dist/types/widgets/actions/index.d.ts +2 -0
  6. package/dist/types/widgets/echart/types.d.ts +2 -1
  7. package/dist/types/widgets/echart/utils.d.ts +13 -7
  8. package/dist/use-widget-ref-wtFLDFCD.js +25 -0
  9. package/dist/use-widget-ref-wtFLDFCD.js.map +1 -0
  10. package/dist/{utils-idmvq0Oa.js → utils-BOhInag6.js} +95 -70
  11. package/dist/utils-BOhInag6.js.map +1 -0
  12. package/dist/widgets/actions.js +763 -661
  13. package/dist/widgets/actions.js.map +1 -1
  14. package/dist/widgets/bar.js +1 -1
  15. package/dist/widgets/echart.js +85 -82
  16. package/dist/widgets/echart.js.map +1 -1
  17. package/dist/widgets/formula.js +4 -2
  18. package/dist/widgets/formula.js.map +1 -1
  19. package/dist/widgets/histogram.js +1 -1
  20. package/dist/widgets/pie.js +1 -1
  21. package/dist/widgets/scatterplot.js +1 -1
  22. package/dist/widgets/spread.js +4 -2
  23. package/dist/widgets/spread.js.map +1 -1
  24. package/dist/widgets/table.js +4 -2
  25. package/dist/widgets/table.js.map +1 -1
  26. package/dist/widgets/timeseries.js +1 -1
  27. package/dist/widgets.js +1 -1
  28. package/package.json +1 -1
  29. package/src/hooks/use-widget-ref.ts +4 -3
  30. package/src/widgets/actions/brush-toggle/brush-toggle.tsx +220 -0
  31. package/src/widgets/actions/brush-toggle/style.ts +14 -0
  32. package/src/widgets/actions/brush-toggle/types.ts +37 -0
  33. package/src/widgets/actions/index.ts +9 -0
  34. package/src/widgets/actions/lock-selection/lock-selection.tsx +0 -9
  35. package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +4 -4
  36. package/src/widgets/actions/stack-toggle/stack-toggle.tsx +2 -13
  37. package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +2 -12
  38. package/src/widgets/echart/echart-ui.tsx +5 -2
  39. package/src/widgets/echart/echart.tsx +1 -1
  40. package/src/widgets/echart/types.ts +2 -1
  41. package/src/widgets/echart/utils.ts +53 -21
  42. package/src/widgets/formula/formula-ui.tsx +1 -1
  43. package/src/widgets/spread/spread-ui.tsx +1 -1
  44. package/src/widgets/table/table-ui.tsx +1 -1
  45. package/dist/use-widget-ref-P-2i0MJG.js +0 -19
  46. package/dist/use-widget-ref-P-2i0MJG.js.map +0 -1
  47. package/dist/utils-idmvq0Oa.js.map +0 -1
@@ -1,20 +1,20 @@
1
- import { jsx as g, jsxs as re, Fragment as be } from "react/jsx-runtime";
2
- import { c as q } from "react/compiler-runtime";
3
- import { IconButton as J, DialogContent as Pe, Dialog as Ae, Typography as Re, DialogTitle as Be, CircularProgress as Me, MenuItem as Ee, ListItemIcon as Fe, ListItemText as Le, Menu as xe, useTheme as Ze, Box as Ve, TextField as Ge, InputAdornment as ve, SvgIcon as He } from "@mui/material";
4
- import { u as $ } from "../widget-store-CzDt8oSK.js";
5
- import { FullscreenOutlined as Ne, Close as je, FileDownloadOutlined as Ue, PercentOutlined as Ke, SubdirectoryArrowLeftOutlined as Ye, ZoomInOutlined as qe, CheckBoxOutlined as Je, SearchOutlined as $e, ClearOutlined as Qe } from "@mui/icons-material";
1
+ import { jsx as p, jsxs as ie, Fragment as be } from "react/jsx-runtime";
2
+ import { c as Y } from "react/compiler-runtime";
3
+ import { IconButton as q, DialogContent as Pe, Dialog as Ae, Typography as Me, DialogTitle as Re, CircularProgress as Fe, MenuItem as Ee, ListItemIcon as Ve, ListItemText as Le, Menu as xe, useTheme as Ge, Box as $e, TextField as Ze, InputAdornment as Se, SvgIcon as He } from "@mui/material";
4
+ import { u as D } from "../widget-store-CzDt8oSK.js";
5
+ import { FullscreenOutlined as Ne, Close as je, FileDownloadOutlined as Ue, PercentOutlined as Ke, SubdirectoryArrowLeftOutlined as Ye, ZoomInOutlined as qe, CheckBoxOutlined as Je, SearchOutlined as Oe, ClearOutlined as Qe, HighlightAltOutlined as Xe } from "@mui/icons-material";
6
6
  import { useShallow as te } from "zustand/shallow";
7
- import { useState as he, useRef as de, useEffect as K } from "react";
7
+ import { useState as he, useRef as ce, useEffect as K } from "react";
8
8
  import "react-markdown";
9
- import { a as Rn, d as Bn } from "../exports-Cr43OCul.js";
9
+ import { a as Zn, d as Hn } from "../exports-Cr43OCul.js";
10
10
  import "../lasso-tool-BYbxrJ-7.js";
11
11
  import "../cjs-D4KH3azB.js";
12
- import { T as ie } from "../tooltip-BDnrRKrp.js";
13
- import { b as Xe, a as et, D as tt } from "../utils-idmvq0Oa.js";
14
- import { useSensors as nt, useSensor as Ie, PointerSensor as ot, KeyboardSensor as lt, DndContext as st, closestCenter as rt } from "@dnd-kit/core";
15
- import { useSortable as it, sortableKeyboardCoordinates as ct, arrayMove as at, SortableContext as dt, verticalListSortingStrategy as ut } from "@dnd-kit/sortable";
16
- import { CSS as ft } from "@dnd-kit/utilities";
17
- const Ce = {
12
+ import { T as se } from "../tooltip-BDnrRKrp.js";
13
+ import { b as et, a as tt, D as nt, g as Te } from "../utils-BOhInag6.js";
14
+ import { useSensors as ot, useSensor as _e, PointerSensor as lt, KeyboardSensor as st, DndContext as rt, closestCenter as it } from "@dnd-kit/core";
15
+ import { useSortable as ct, sortableKeyboardCoordinates as at, arrayMove as dt, SortableContext as ut, verticalListSortingStrategy as ft } from "@dnd-kit/sortable";
16
+ import { CSS as gt } from "@dnd-kit/utilities";
17
+ const ve = {
18
18
  title: {
19
19
  container: {
20
20
  display: "flex",
@@ -31,258 +31,258 @@ const Ce = {
31
31
  }) => n(1)
32
32
  }
33
33
  }, mt = {};
34
- function En(n) {
35
- const e = q(47), {
34
+ function wn(n) {
35
+ const e = Y(47), {
36
36
  id: t,
37
- labels: a,
38
- children: p,
37
+ labels: d,
38
+ children: b,
39
39
  Icon: c,
40
- IconButtonProps: u,
41
- DialogContentProps: E,
42
- DialogProps: f
43
- } = n, b = E === void 0 ? mt : E;
44
- let d, S;
45
- e[0] !== b ? ({
46
- sx: S,
47
- ...d
48
- } = b, e[0] = b, e[1] = d, e[2] = S) : (d = e[1], S = e[2]);
49
- let r;
50
- e[3] !== t ? (r = (k) => k.getWidget(t)?.isFullScreen, e[3] = t, e[4] = r) : r = e[4];
51
- const s = $(te(r));
52
- let _;
53
- e[5] !== t ? (_ = (k) => k.getWidget(t)?.title, e[5] = t, e[6] = _) : _ = e[6];
54
- const T = $(te(_)), o = $(gt);
40
+ IconButtonProps: S,
41
+ DialogContentProps: v,
42
+ DialogProps: T
43
+ } = n, y = v === void 0 ? mt : v;
44
+ let u, _;
45
+ e[0] !== y ? ({
46
+ sx: _,
47
+ ...u
48
+ } = y, e[0] = y, e[1] = u, e[2] = _) : (u = e[1], _ = e[2]);
49
+ let l;
50
+ e[3] !== t ? (l = (m) => m.getWidget(t)?.isFullScreen, e[3] = t, e[4] = l) : l = e[4];
51
+ const r = D(te(l));
52
+ let a;
53
+ e[5] !== t ? (a = (m) => m.getWidget(t)?.title, e[5] = t, e[6] = a) : a = e[6];
54
+ const s = D(te(a)), i = D(ht);
55
55
  let h;
56
- e[7] !== t || e[8] !== o ? (h = (k) => {
57
- o(t, {
58
- isFullScreen: k.isFullScreen
56
+ e[7] !== t || e[8] !== i ? (h = (m) => {
57
+ i(t, {
58
+ isFullScreen: m.isFullScreen
59
59
  });
60
- }, e[7] = t, e[8] = o, e[9] = h) : h = e[9];
61
- const i = h;
62
- let m;
63
- e[10] !== i ? (m = () => i({
60
+ }, e[7] = t, e[8] = i, e[9] = h) : h = e[9];
61
+ const g = h;
62
+ let o;
63
+ e[10] !== g ? (o = () => g({
64
64
  isFullScreen: !0
65
- }), e[10] = i, e[11] = m) : m = e[11];
66
- let v;
67
- e[12] !== c ? (v = c ?? /* @__PURE__ */ g(Ne, {}), e[12] = c, e[13] = v) : v = e[13];
68
- let l;
69
- e[14] !== u || e[15] !== m || e[16] !== v ? (l = /* @__PURE__ */ g(J, { ...u, onClick: m, children: v }), e[14] = u, e[15] = m, e[16] = v, e[17] = l) : l = e[17];
70
- const O = !!s, P = a?.ariaLabel ?? `fullscreen-dialog-title-${t}`;
71
- let y;
72
- e[18] !== i ? (y = () => i({
65
+ }), e[10] = g, e[11] = o) : o = e[11];
66
+ let C;
67
+ e[12] !== c ? (C = c ?? /* @__PURE__ */ p(Ne, {}), e[12] = c, e[13] = C) : C = e[13];
68
+ let f;
69
+ e[14] !== S || e[15] !== o || e[16] !== C ? (f = /* @__PURE__ */ p(q, { ...S, onClick: o, children: C }), e[14] = S, e[15] = o, e[16] = C, e[17] = f) : f = e[17];
70
+ const x = !!r, O = d?.ariaLabel ?? `fullscreen-dialog-title-${t}`;
71
+ let I;
72
+ e[18] !== g ? (I = () => g({
73
73
  isFullScreen: !1
74
- }), e[18] = i, e[19] = y) : y = e[19];
75
- const A = `fullscreen-dialog-title-${t}`;
74
+ }), e[18] = g, e[19] = I) : I = e[19];
75
+ const z = `fullscreen-dialog-title-${t}`;
76
76
  let w;
77
- e[20] !== T ? (w = /* @__PURE__ */ g(Re, { variant: "subtitle1", component: "span", children: T }), e[20] = T, e[21] = w) : w = e[21];
78
- let D;
79
- e[22] !== i ? (D = () => i({
77
+ e[20] !== s ? (w = /* @__PURE__ */ p(Me, { variant: "subtitle1", component: "span", children: s }), e[20] = s, e[21] = w) : w = e[21];
78
+ let P;
79
+ e[22] !== g ? (P = () => g({
80
80
  isFullScreen: !1
81
- }), e[22] = i, e[23] = D) : D = e[23];
82
- let L;
83
- e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ g(je, {}), e[24] = L) : L = e[24];
84
- let I;
85
- e[25] !== D ? (I = /* @__PURE__ */ g(J, { onClick: D, children: L }), e[25] = D, e[26] = I) : I = e[26];
81
+ }), e[22] = g, e[23] = P) : P = e[23];
82
+ let B;
83
+ e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ p(je, {}), e[24] = B) : B = e[24];
84
+ let $;
85
+ e[25] !== P ? ($ = /* @__PURE__ */ p(q, { onClick: P, children: B }), e[25] = P, e[26] = $) : $ = e[26];
86
86
  let W;
87
- e[27] !== A || e[28] !== w || e[29] !== I ? (W = /* @__PURE__ */ re(Be, { id: A, sx: Ce.title.container, children: [
87
+ e[27] !== z || e[28] !== w || e[29] !== $ ? (W = /* @__PURE__ */ ie(Re, { id: z, sx: ve.title.container, children: [
88
88
  w,
89
- I
90
- ] }), e[27] = A, e[28] = w, e[29] = I, e[30] = W) : W = e[30];
91
- let z;
92
- e[31] !== S ? (z = {
93
- ...Ce.content,
94
- ...S
95
- }, e[31] = S, e[32] = z) : z = e[32];
96
- let R;
97
- e[33] !== d || e[34] !== p || e[35] !== z ? (R = /* @__PURE__ */ g(Pe, { sx: z, ...d, children: p }), e[33] = d, e[34] = p, e[35] = z, e[36] = R) : R = e[36];
98
- let C;
99
- e[37] !== f || e[38] !== P || e[39] !== y || e[40] !== W || e[41] !== R || e[42] !== O ? (C = /* @__PURE__ */ re(Ae, { maxWidth: !1, open: O, keepMounted: !0, "aria-labelledby": P, ...f, onClose: y, children: [
89
+ $
90
+ ] }), e[27] = z, e[28] = w, e[29] = $, e[30] = W) : W = e[30];
91
+ let L;
92
+ e[31] !== _ ? (L = {
93
+ ...ve.content,
94
+ ..._
95
+ }, e[31] = _, e[32] = L) : L = e[32];
96
+ let A;
97
+ e[33] !== u || e[34] !== b || e[35] !== L ? (A = /* @__PURE__ */ p(Pe, { sx: L, ...u, children: b }), e[33] = u, e[34] = b, e[35] = L, e[36] = A) : A = e[36];
98
+ let k;
99
+ e[37] !== T || e[38] !== O || e[39] !== I || e[40] !== W || e[41] !== A || e[42] !== x ? (k = /* @__PURE__ */ ie(Ae, { maxWidth: !1, open: x, keepMounted: !0, "aria-labelledby": O, ...T, onClose: I, children: [
100
100
  W,
101
- R
102
- ] }), e[37] = f, e[38] = P, e[39] = y, e[40] = W, e[41] = R, e[42] = O, e[43] = C) : C = e[43];
103
- let x;
104
- return e[44] !== C || e[45] !== l ? (x = /* @__PURE__ */ re(be, { children: [
105
- l,
106
- C
107
- ] }), e[44] = C, e[45] = l, e[46] = x) : x = e[46], x;
101
+ A
102
+ ] }), e[37] = T, e[38] = O, e[39] = I, e[40] = W, e[41] = A, e[42] = x, e[43] = k) : k = e[43];
103
+ let E;
104
+ return e[44] !== k || e[45] !== f ? (E = /* @__PURE__ */ ie(be, { children: [
105
+ f,
106
+ k
107
+ ] }), e[44] = k, e[45] = f, e[46] = E) : E = e[46], E;
108
108
  }
109
- function gt(n) {
109
+ function ht(n) {
110
110
  return n.setWidget;
111
111
  }
112
112
  const pt = {};
113
- function Ln(n) {
114
- const e = q(33), {
113
+ function Dn(n) {
114
+ const e = Y(33), {
115
115
  id: t,
116
- items: a,
117
- labels: p,
116
+ items: d,
117
+ labels: b,
118
118
  Icon: c,
119
- IconButtonProps: u
120
- } = n, E = p === void 0 ? pt : p;
121
- let f;
122
- e[0] !== t ? (f = (C) => C.getWidget(t)?.data, e[0] = t, e[1] = f) : f = e[1];
123
- const b = $(te(f)), [d, S] = he(!1), [r, s] = he(null);
124
- let _;
125
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = (C) => {
126
- C.stopPropagation(), s(C.currentTarget);
127
- }, e[2] = _) : _ = e[2];
128
- const T = _;
129
- let o;
130
- e[3] !== t ? (o = (C, x) => {
131
- const k = document.createElement("a");
132
- k.href = C, k.download = x.filename ?? t, k.style.display = "none", document.body.appendChild(k), k.click(), document.body.removeChild(k), x.callback?.(k.href);
133
- }, e[3] = t, e[4] = o) : o = e[4];
134
- const h = o;
119
+ IconButtonProps: S
120
+ } = n, v = b === void 0 ? pt : b;
121
+ let T;
122
+ e[0] !== t ? (T = (k) => k.getWidget(t)?.data, e[0] = t, e[1] = T) : T = e[1];
123
+ const y = D(te(T)), [u, _] = he(!1), [l, r] = he(null);
124
+ let a;
125
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (k) => {
126
+ k.stopPropagation(), r(k.currentTarget);
127
+ }, e[2] = a) : a = e[2];
128
+ const s = a;
135
129
  let i;
136
- e[5] !== b || e[6] !== h ? (i = async (C, x) => {
137
- C.stopPropagation(), S(!0), s(null);
138
- const k = await x.modifier(b);
139
- if (!k) {
140
- S(!1);
130
+ e[3] !== t ? (i = (k, E) => {
131
+ const m = document.createElement("a");
132
+ m.href = k, m.download = E.filename ?? t, m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), E.callback?.(m.href);
133
+ }, e[3] = t, e[4] = i) : i = e[4];
134
+ const h = i;
135
+ let g;
136
+ e[5] !== y || e[6] !== h ? (g = async (k, E) => {
137
+ k.stopPropagation(), _(!0), r(null);
138
+ const m = await E.modifier(y);
139
+ if (!m) {
140
+ _(!1);
141
141
  return;
142
142
  }
143
- h(k, x), S(!1);
144
- }, e[5] = b, e[6] = h, e[7] = i) : i = e[7];
145
- const m = i, v = E.ariaLabel ?? "download options", l = d || a.length === 0, O = d || r ? "active" : "";
146
- let P;
147
- e[8] !== c || e[9] !== d ? (P = d ? /* @__PURE__ */ g(Me, { size: 18, color: "inherit" }) : c ?? /* @__PURE__ */ g(Ue, {}), e[8] = c, e[9] = d, e[10] = P) : P = e[10];
148
- let y;
149
- e[11] !== u || e[12] !== v || e[13] !== l || e[14] !== O || e[15] !== P ? (y = /* @__PURE__ */ g(J, { size: "small", "aria-label": v, "aria-controls": "options-menu", "aria-haspopup": "true", onClick: T, ...u, disabled: l, className: O, children: P }), e[11] = u, e[12] = v, e[13] = l, e[14] = O, e[15] = P, e[16] = y) : y = e[16];
150
- let A, w;
151
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
143
+ h(m, E), _(!1);
144
+ }, e[5] = y, e[6] = h, e[7] = g) : g = e[7];
145
+ const o = g, C = v.ariaLabel ?? "download options", f = u || d.length === 0, x = u || l ? "active" : "";
146
+ let O;
147
+ e[8] !== c || e[9] !== u ? (O = u ? /* @__PURE__ */ p(Fe, { size: 18, color: "inherit" }) : c ?? /* @__PURE__ */ p(Ue, {}), e[8] = c, e[9] = u, e[10] = O) : O = e[10];
148
+ let I;
149
+ e[11] !== S || e[12] !== C || e[13] !== f || e[14] !== x || e[15] !== O ? (I = /* @__PURE__ */ p(q, { size: "small", "aria-label": C, "aria-controls": "options-menu", "aria-haspopup": "true", onClick: s, ...S, disabled: f, className: x, children: O }), e[11] = S, e[12] = C, e[13] = f, e[14] = x, e[15] = O, e[16] = I) : I = e[16];
150
+ let z, w;
151
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = {
152
152
  vertical: "bottom",
153
153
  horizontal: "right"
154
154
  }, w = {
155
155
  vertical: "top",
156
156
  horizontal: "right"
157
- }, e[17] = A, e[18] = w) : (A = e[17], w = e[18]);
158
- const D = !!r;
159
- let L, I;
160
- e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => s(null), I = {
157
+ }, e[17] = z, e[18] = w) : (z = e[17], w = e[18]);
158
+ const P = !!l;
159
+ let B, $;
160
+ e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = () => r(null), $ = {
161
161
  sx: {
162
162
  paddingBottom: 0
163
163
  }
164
- }, e[19] = L, e[20] = I) : (L = e[19], I = e[20]);
164
+ }, e[19] = B, e[20] = $) : (B = e[19], $ = e[20]);
165
165
  let W;
166
- if (e[21] !== m || e[22] !== a) {
167
- let C;
168
- e[24] !== m ? (C = (x) => /* @__PURE__ */ re(Ee, { disabled: x.disabled, onClick: (k) => {
169
- m(k, x);
166
+ if (e[21] !== o || e[22] !== d) {
167
+ let k;
168
+ e[24] !== o ? (k = (E) => /* @__PURE__ */ ie(Ee, { disabled: E.disabled, onClick: (m) => {
169
+ o(m, E);
170
170
  }, children: [
171
- x.icon && /* @__PURE__ */ g(Fe, { sx: {
171
+ E.icon && /* @__PURE__ */ p(Ve, { sx: {
172
172
  color: "text.primary"
173
- }, children: x.icon }),
174
- /* @__PURE__ */ g(Le, { children: x.label })
175
- ] }, x.id), e[24] = m, e[25] = C) : C = e[25], W = a.map(C), e[21] = m, e[22] = a, e[23] = W;
173
+ }, children: E.icon }),
174
+ /* @__PURE__ */ p(Le, { children: E.label })
175
+ ] }, E.id), e[24] = o, e[25] = k) : k = e[25], W = d.map(k), e[21] = o, e[22] = d, e[23] = W;
176
176
  } else
177
177
  W = e[23];
178
- let z;
179
- e[26] !== r || e[27] !== D || e[28] !== W ? (z = /* @__PURE__ */ g(xe, { variant: "menu", elevation: 8, anchorOrigin: A, transformOrigin: w, anchorEl: r, open: D, onClose: L, MenuListProps: I, children: W }), e[26] = r, e[27] = D, e[28] = W, e[29] = z) : z = e[29];
180
- let R;
181
- return e[30] !== y || e[31] !== z ? (R = /* @__PURE__ */ re(be, { children: [
182
- y,
183
- z
184
- ] }), e[30] = y, e[31] = z, e[32] = R) : R = e[32], R;
185
- }
186
- const ue = {
178
+ let L;
179
+ e[26] !== l || e[27] !== P || e[28] !== W ? (L = /* @__PURE__ */ p(xe, { variant: "menu", elevation: 8, anchorOrigin: z, transformOrigin: w, anchorEl: l, open: P, onClose: B, MenuListProps: $, children: W }), e[26] = l, e[27] = P, e[28] = W, e[29] = L) : L = e[29];
180
+ let A;
181
+ return e[30] !== I || e[31] !== L ? (A = /* @__PURE__ */ ie(be, { children: [
182
+ I,
183
+ L
184
+ ] }), e[30] = I, e[31] = L, e[32] = A) : A = e[32], A;
185
+ }
186
+ const de = {
187
187
  trigger: {
188
188
  '&[data-active="true"]': {
189
189
  background: (n) => n.palette.primary.relatedLight
190
190
  }
191
191
  }
192
192
  };
193
- function ht(n) {
194
- return n.reduce((e, t) => t.reduce((a, p) => {
195
- if (Array.isArray(p)) {
196
- const c = p.at(-1);
197
- return typeof c == "number" ? a + c : a;
193
+ function bt(n) {
194
+ return n.reduce((e, t) => t.reduce((d, b) => {
195
+ if (Array.isArray(b)) {
196
+ const c = b.at(-1);
197
+ return typeof c == "number" ? d + c : d;
198
198
  }
199
- return Object.entries(p).reduce((c, [u, E]) => u === "name" ? c : typeof E == "number" ? c + E : c, a);
199
+ return Object.entries(b).reduce((c, [S, v]) => S === "name" ? c : typeof v == "number" ? c + v : c, d);
200
200
  }, e), 0);
201
201
  }
202
- function bt(n, e) {
203
- return e === 0 ? n : n.map((t) => t.map((a) => {
204
- if (Array.isArray(a))
205
- return a.map((c, u) => u === a.length - 1 && typeof c == "number" ? c / e * 100 : c);
206
- const p = {};
207
- for (const [c, u] of Object.entries(a)) {
202
+ function St(n, e) {
203
+ return e === 0 ? n : n.map((t) => t.map((d) => {
204
+ if (Array.isArray(d))
205
+ return d.map((c, S) => S === d.length - 1 && typeof c == "number" ? c / e * 100 : c);
206
+ const b = {};
207
+ for (const [c, S] of Object.entries(d)) {
208
208
  if (c === "name") {
209
- p[c] = u;
209
+ b[c] = S;
210
210
  continue;
211
211
  }
212
- p[c] = typeof u == "number" ? u / e * 100 : u;
212
+ b[c] = typeof S == "number" ? S / e * 100 : S;
213
213
  }
214
- return p;
214
+ return b;
215
215
  }));
216
216
  }
217
- const pe = "relative-data";
218
- function xn(n) {
219
- const e = q(32), {
217
+ const me = "relative-data";
218
+ function Wn(n) {
219
+ const e = Y(32), {
220
220
  id: t,
221
- order: a,
222
- defaultIsRelative: p,
221
+ order: d,
222
+ defaultIsRelative: b,
223
223
  labels: c,
224
- Icon: u,
225
- IconButtonProps: E
226
- } = n, f = a === void 0 ? 10 : a, b = p === void 0 ? !1 : p, d = de(void 0), S = de(void 0), r = $(Ct), s = $(It), _ = $(vt), T = $(_t), o = $(Tt);
224
+ Icon: S,
225
+ IconButtonProps: v
226
+ } = n, T = d === void 0 ? 10 : d, y = b === void 0 ? !1 : b, u = ce(void 0), _ = ce(void 0), l = D(Ct), r = D(It), a = D(yt), s = D(vt), i = D(_t);
227
227
  let h;
228
- e[0] !== t ? (h = (z) => z.getWidget(t)?.isRelative, e[0] = t, e[1] = h) : h = e[1];
229
- const m = $(h) ?? b;
230
- let v, l;
231
- e[2] !== b || e[3] !== s || e[4] !== t || e[5] !== r ? (v = () => {
232
- s(t)?.isRelative === void 0 && r(t, {
233
- isRelative: b
228
+ e[0] !== t ? (h = (L) => L.getWidget(t)?.isRelative, e[0] = t, e[1] = h) : h = e[1];
229
+ const o = D(h) ?? y;
230
+ let C, f;
231
+ e[2] !== y || e[3] !== r || e[4] !== t || e[5] !== l ? (C = () => {
232
+ r(t)?.isRelative === void 0 && l(t, {
233
+ isRelative: y
234
234
  });
235
- }, l = [b, s, t, r], e[2] = b, e[3] = s, e[4] = t, e[5] = r, e[6] = v, e[7] = l) : (v = e[6], l = e[7]), K(v, l);
236
- let O, P;
237
- e[8] !== t || e[9] !== m || e[10] !== f || e[11] !== _ || e[12] !== T ? (O = () => (_(t, {
238
- id: pe,
239
- order: f,
240
- enabled: m,
241
- fn: St
242
- }), () => T(t, pe)), P = [t, f, _, T, m], e[8] = t, e[9] = m, e[10] = f, e[11] = _, e[12] = T, e[13] = O, e[14] = P) : (O = e[13], P = e[14]), K(O, P);
243
- let y;
244
- e[15] !== s || e[16] !== t || e[17] !== m || e[18] !== o || e[19] !== r ? (y = () => {
245
- const z = !m;
246
- o(t, pe, z);
247
- let R = d.current;
248
- if (z) {
249
- const C = s(t);
250
- S.current = C?.formatter;
251
- const x = s(t)?.max;
252
- d.current = x, R = 100;
235
+ }, f = [y, r, t, l], e[2] = y, e[3] = r, e[4] = t, e[5] = l, e[6] = C, e[7] = f) : (C = e[6], f = e[7]), K(C, f);
236
+ let x, O;
237
+ e[8] !== t || e[9] !== o || e[10] !== T || e[11] !== a || e[12] !== s ? (x = () => (a(t, {
238
+ id: me,
239
+ order: T,
240
+ enabled: o,
241
+ fn: Tt
242
+ }), () => s(t, me)), O = [t, T, a, s, o], e[8] = t, e[9] = o, e[10] = T, e[11] = a, e[12] = s, e[13] = x, e[14] = O) : (x = e[13], O = e[14]), K(x, O);
243
+ let I;
244
+ e[15] !== r || e[16] !== t || e[17] !== o || e[18] !== i || e[19] !== l ? (I = () => {
245
+ const L = !o;
246
+ i(t, me, L);
247
+ let A = u.current;
248
+ if (L) {
249
+ const k = r(t);
250
+ _.current = k?.formatter;
251
+ const E = r(t)?.max;
252
+ u.current = E, A = 100;
253
253
  }
254
- r(t, {
255
- isRelative: z,
256
- max: R,
257
- formatter: z ? (C) => {
258
- const x = s(t);
259
- return new Intl.NumberFormat(x?.locale, {
254
+ l(t, {
255
+ isRelative: L,
256
+ max: A,
257
+ formatter: L ? (k) => {
258
+ const E = r(t);
259
+ return new Intl.NumberFormat(E?.locale, {
260
260
  style: "percent",
261
261
  minimumFractionDigits: 1,
262
262
  maximumFractionDigits: 1
263
- }).format(C / 100);
264
- } : S.current
263
+ }).format(k / 100);
264
+ } : _.current
265
265
  });
266
- }, e[15] = s, e[16] = t, e[17] = m, e[18] = o, e[19] = r, e[20] = y) : y = e[20];
267
- const A = y, w = m ? c?.absolute ?? "Show absolute values" : c?.relative ?? "Show relative values", D = c?.ariaLabel ?? w;
268
- let L;
269
- e[21] !== u ? (L = u ?? /* @__PURE__ */ g(Ke, {}), e[21] = u, e[22] = L) : L = e[22];
270
- let I;
271
- e[23] !== E || e[24] !== A || e[25] !== m || e[26] !== L || e[27] !== D ? (I = /* @__PURE__ */ g(J, { size: "small", "aria-label": D, onClick: A, sx: ue.trigger, "data-active": m, ...E, children: L }), e[23] = E, e[24] = A, e[25] = m, e[26] = L, e[27] = D, e[28] = I) : I = e[28];
266
+ }, e[15] = r, e[16] = t, e[17] = o, e[18] = i, e[19] = l, e[20] = I) : I = e[20];
267
+ const z = I, w = o ? c?.absolute ?? "Show absolute values" : c?.relative ?? "Show relative values", P = c?.ariaLabel ?? w;
268
+ let B;
269
+ e[21] !== S ? (B = S ?? /* @__PURE__ */ p(Ke, {}), e[21] = S, e[22] = B) : B = e[22];
270
+ let $;
271
+ e[23] !== v || e[24] !== z || e[25] !== o || e[26] !== B || e[27] !== P ? ($ = /* @__PURE__ */ p(q, { size: "small", "aria-label": P, onClick: z, sx: de.trigger, "data-active": o, ...v, children: B }), e[23] = v, e[24] = z, e[25] = o, e[26] = B, e[27] = P, e[28] = $) : $ = e[28];
272
272
  let W;
273
- return e[29] !== I || e[30] !== w ? (W = /* @__PURE__ */ g(ie, { title: w, children: I }), e[29] = I, e[30] = w, e[31] = W) : W = e[31], W;
274
- }
275
- function St(n) {
276
- const e = n, t = ht(e);
277
- return bt(e, t);
273
+ return e[29] !== $ || e[30] !== w ? (W = /* @__PURE__ */ p(se, { title: w, children: $ }), e[29] = $, e[30] = w, e[31] = W) : W = e[31], W;
278
274
  }
279
275
  function Tt(n) {
280
- return n.setToolEnabled;
276
+ const e = n, t = bt(e);
277
+ return St(e, t);
281
278
  }
282
279
  function _t(n) {
283
- return n.unregisterTool;
280
+ return n.setToolEnabled;
284
281
  }
285
282
  function vt(n) {
283
+ return n.unregisterTool;
284
+ }
285
+ function yt(n) {
286
286
  return n.registerTool;
287
287
  }
288
288
  function It(n) {
@@ -305,652 +305,754 @@ const ye = {
305
305
  }
306
306
  }
307
307
  }, ee = "zoom-toggle";
308
- function $n(n) {
309
- const e = q(50), {
308
+ function Bn(n) {
309
+ const e = Y(50), {
310
310
  id: t,
311
- defaultZoom: a,
312
- defaultZoomStart: p,
311
+ defaultZoom: d,
312
+ defaultZoomStart: b,
313
313
  defaultZoomEnd: c,
314
- labels: u,
315
- Icon: E,
316
- ResetIcon: f,
317
- IconButtonProps: b
318
- } = n, d = a === void 0 ? !1 : a, S = p === void 0 ? 0 : p, r = c === void 0 ? 100 : c, s = Ze(), _ = $(Ot), T = $($t), o = $(xt), h = $(Lt), i = $(Et);
319
- let m;
320
- e[0] !== t ? (m = (V) => (V.getWidget(t)?.registeredTools ?? []).find(kt), e[0] = t, e[1] = m) : m = e[1];
321
- const v = $(te(m)), l = v?.enabled ?? d, O = v?.config?.start ?? S, P = v?.config?.end ?? r;
322
- let y;
323
- e[2] !== t || e[3] !== h || e[4] !== i ? (y = (V) => {
324
- const B = V, U = B.start ?? B.batch?.[0]?.start, H = B.end ?? B.batch?.[0]?.end;
325
- U !== void 0 && H !== void 0 && (h(t, ee, !0), i(t, ee, {
326
- enabled: !0,
314
+ labels: S,
315
+ Icon: v,
316
+ ResetIcon: T,
317
+ IconButtonProps: y
318
+ } = n, u = d === void 0 ? !1 : d, _ = b === void 0 ? 0 : b, l = c === void 0 ? 100 : c, r = Ge(), a = D(wt), s = D(Ot), i = D($t), h = D(xt), g = D(Lt);
319
+ let o;
320
+ e[0] !== t ? (o = (F) => (F.getWidget(t)?.registeredTools ?? []).find(Et), e[0] = t, e[1] = o) : o = e[1];
321
+ const C = D(te(o)), f = C?.enabled ?? u, x = C?.config?.start ?? _, O = C?.config?.end ?? l;
322
+ let I;
323
+ e[2] !== t || e[3] !== h || e[4] !== g ? (I = (F) => {
324
+ const M = F, U = M.start ?? M.batch?.[0]?.start, j = M.end ?? M.batch?.[0]?.end;
325
+ U !== void 0 && j !== void 0 && (h(t, ee, !0), g(t, ee, {
327
326
  start: U,
328
- end: H
327
+ end: j
329
328
  }));
330
- }, e[2] = t, e[3] = h, e[4] = i, e[5] = y) : y = e[5];
331
- const A = y;
332
- let w, D;
333
- e[6] !== d || e[7] !== r || e[8] !== S || e[9] !== _ || e[10] !== A || e[11] !== t || e[12] !== T || e[13] !== s || e[14] !== o ? (w = () => {
334
- const V = _(t)?.registeredTools?.find(yt), B = V?.enabled ?? d, U = V?.config?.start ?? S, H = V?.config?.end ?? r;
335
- return T(t, {
329
+ }, e[2] = t, e[3] = h, e[4] = g, e[5] = I) : I = e[5];
330
+ const z = I;
331
+ let w, P;
332
+ e[6] !== u || e[7] !== l || e[8] !== _ || e[9] !== a || e[10] !== z || e[11] !== t || e[12] !== s || e[13] !== r || e[14] !== i ? (w = () => {
333
+ const F = a(t)?.registeredTools?.find(kt), M = F?.enabled ?? u, U = F?.config?.start ?? _, j = F?.config?.end ?? l;
334
+ return s(t, {
336
335
  id: ee,
337
336
  type: "config",
338
337
  order: 20,
339
- enabled: B,
340
- fn: (ne, Y) => {
341
- const Q = ne, se = Q.option, oe = Q.onEvents ?? {}, ce = Y?.enabled ?? !1, X = Y?.start ?? 0, le = Y?.end ?? 100, Se = se?.legend, Oe = Se?.show !== !1 && Se !== void 0, we = parseInt(s?.spacing?.(4) ?? "32"), De = Xe(ce, {
342
- start: X,
343
- end: le
338
+ enabled: M,
339
+ fn: (oe, J) => {
340
+ const Q = oe, re = Q.option, le = Q.onEvents ?? {}, ge = J?.start ?? 0, X = J?.end ?? 100, ne = re?.legend, we = ne?.show !== !1 && ne !== void 0, De = parseInt(r?.spacing?.(4) ?? "32"), We = et({
341
+ start: ge,
342
+ end: X
344
343
  }, {
345
344
  inside: !0,
346
345
  xSlider: !0,
347
346
  ySlider: !1,
348
- bottomOffset: Oe ? 28 : 0
349
- }, s), fe = se?.grid, Te = typeof fe?.bottom == "number" ? fe.bottom : parseInt(fe?.bottom ?? "24"), We = ce ? Te + we + 8 : Te, _e = {
350
- ...oe
347
+ bottomOffset: we ? 28 : 0
348
+ }, r), ue = re?.grid, Be = (typeof ue?.bottom == "number" ? ue.bottom : parseInt(ue?.bottom ?? "24")) + De + 8;
349
+ ({
350
+ ...le
351
+ });
352
+ const ze = {
353
+ ...le,
354
+ dataZoom: z
351
355
  };
352
- delete _e.dataZoom;
353
- const ze = ce ? {
354
- ...oe,
355
- dataZoom: A
356
- } : _e;
357
356
  return {
358
357
  ...Q,
359
358
  option: {
360
- ...se,
361
- ...De,
359
+ ...re,
360
+ ...We,
362
361
  grid: {
363
- ...fe,
364
- bottom: We
362
+ ...ue,
363
+ bottom: Be
365
364
  }
366
365
  },
367
366
  onEvents: ze
368
367
  };
369
368
  },
370
369
  config: {
371
- enabled: B,
372
370
  start: U,
373
- end: H
371
+ end: j
374
372
  }
375
- }), () => o(t, ee);
376
- }, D = [d, r, S, _, A, t, T, s, o], e[6] = d, e[7] = r, e[8] = S, e[9] = _, e[10] = A, e[11] = t, e[12] = T, e[13] = s, e[14] = o, e[15] = w, e[16] = D) : (w = e[15], D = e[16]), K(w, D);
377
- let L;
378
- e[17] !== t || e[18] !== h || e[19] !== i || e[20] !== l || e[21] !== P || e[22] !== O ? (L = () => {
379
- const V = !l;
380
- h(t, ee, V), i(t, ee, {
381
- enabled: V,
382
- start: V ? O : 0,
383
- end: V ? P : 100
373
+ }), () => i(t, ee);
374
+ }, P = [u, l, _, a, z, t, s, r, i], e[6] = u, e[7] = l, e[8] = _, e[9] = a, e[10] = z, e[11] = t, e[12] = s, e[13] = r, e[14] = i, e[15] = w, e[16] = P) : (w = e[15], P = e[16]), K(w, P);
375
+ let B;
376
+ e[17] !== t || e[18] !== h || e[19] !== g || e[20] !== f || e[21] !== O || e[22] !== x ? (B = () => {
377
+ const F = !f;
378
+ h(t, ee, F), g(t, ee, {
379
+ start: F ? x : 0,
380
+ end: F ? O : 100
384
381
  });
385
- }, e[17] = t, e[18] = h, e[19] = i, e[20] = l, e[21] = P, e[22] = O, e[23] = L) : L = e[23];
386
- const I = L;
382
+ }, e[17] = t, e[18] = h, e[19] = g, e[20] = f, e[21] = O, e[22] = x, e[23] = B) : B = e[23];
383
+ const $ = B;
387
384
  let W;
388
- e[24] !== r || e[25] !== S || e[26] !== t || e[27] !== h || e[28] !== i ? (W = () => {
389
- h(t, ee, !0), i(t, ee, {
390
- enabled: !0,
391
- start: S,
392
- end: r
385
+ e[24] !== l || e[25] !== _ || e[26] !== t || e[27] !== h || e[28] !== g ? (W = () => {
386
+ h(t, ee, !0), g(t, ee, {
387
+ start: _,
388
+ end: l
393
389
  });
394
- }, e[24] = r, e[25] = S, e[26] = t, e[27] = h, e[28] = i, e[29] = W) : W = e[29];
395
- const z = W, R = u?.enable ?? "Enable zoom", C = u?.disable ?? "Disable zoom", x = u?.reset ?? "Reset zoom", k = l ? C : R, j = u?.ariaLabel ?? k;
390
+ }, e[24] = l, e[25] = _, e[26] = t, e[27] = h, e[28] = g, e[29] = W) : W = e[29];
391
+ const L = W, A = S?.enable ?? "Enable zoom", k = S?.disable ?? "Disable zoom", E = S?.reset ?? "Reset zoom", m = f ? k : A, R = S?.ariaLabel ?? m;
392
+ let N;
393
+ e[30] !== v ? (N = v ?? /* @__PURE__ */ p(qe, {}), e[30] = v, e[31] = N) : N = e[31];
396
394
  let G;
397
- e[30] !== E ? (G = E ?? /* @__PURE__ */ g(qe, {}), e[30] = E, e[31] = G) : G = e[31];
398
- let F;
399
- e[32] !== b || e[33] !== I || e[34] !== j || e[35] !== G || e[36] !== l ? (F = /* @__PURE__ */ g(J, { size: "small", "aria-label": j, onClick: I, sx: ye.trigger, "data-active": l, ...b, children: G }), e[32] = b, e[33] = I, e[34] = j, e[35] = G, e[36] = l, e[37] = F) : F = e[37];
395
+ e[32] !== y || e[33] !== $ || e[34] !== R || e[35] !== N || e[36] !== f ? (G = /* @__PURE__ */ p(q, { size: "small", "aria-label": R, onClick: $, sx: ye.trigger, "data-active": f, ...y, children: N }), e[32] = y, e[33] = $, e[34] = R, e[35] = N, e[36] = f, e[37] = G) : G = e[37];
396
+ let H;
397
+ e[38] !== G || e[39] !== m ? (H = /* @__PURE__ */ p(se, { title: m, children: G }), e[38] = G, e[39] = m, e[40] = H) : H = e[40];
398
+ let V;
399
+ e[41] !== y || e[42] !== T || e[43] !== L || e[44] !== E || e[45] !== f ? (V = f && /* @__PURE__ */ p(se, { title: E, children: /* @__PURE__ */ p(q, { size: "small", "aria-label": E, onClick: L, ...y, children: T ?? /* @__PURE__ */ p(Ye, {}) }) }), e[41] = y, e[42] = T, e[43] = L, e[44] = E, e[45] = f, e[46] = V) : V = e[46];
400
400
  let Z;
401
- e[38] !== F || e[39] !== k ? (Z = /* @__PURE__ */ g(ie, { title: k, children: F }), e[38] = F, e[39] = k, e[40] = Z) : Z = e[40];
402
- let M;
403
- e[41] !== b || e[42] !== f || e[43] !== z || e[44] !== x || e[45] !== l ? (M = l && /* @__PURE__ */ g(ie, { title: x, children: /* @__PURE__ */ g(J, { size: "small", "aria-label": x, onClick: z, ...b, children: f ?? /* @__PURE__ */ g(Ye, {}) }) }), e[41] = b, e[42] = f, e[43] = z, e[44] = x, e[45] = l, e[46] = M) : M = e[46];
404
- let N;
405
- return e[47] !== Z || e[48] !== M ? (N = /* @__PURE__ */ re(Ve, { sx: ye.container, children: [
406
- Z,
407
- M
408
- ] }), e[47] = Z, e[48] = M, e[49] = N) : N = e[49], N;
409
- }
410
- function yt(n) {
411
- return n.id === ee;
401
+ return e[47] !== H || e[48] !== V ? (Z = /* @__PURE__ */ ie($e, { sx: ye.container, children: [
402
+ H,
403
+ V
404
+ ] }), e[47] = H, e[48] = V, e[49] = Z) : Z = e[49], Z;
412
405
  }
413
406
  function kt(n) {
414
407
  return n.id === ee;
415
408
  }
416
409
  function Et(n) {
417
- return n.updateToolConfig;
410
+ return n.id === ee;
418
411
  }
419
412
  function Lt(n) {
420
- return n.setToolEnabled;
413
+ return n.updateToolConfig;
421
414
  }
422
415
  function xt(n) {
423
- return n.unregisterTool;
416
+ return n.setToolEnabled;
424
417
  }
425
418
  function $t(n) {
426
- return n.registerTool;
419
+ return n.unregisterTool;
427
420
  }
428
421
  function Ot(n) {
422
+ return n.registerTool;
423
+ }
424
+ function wt(n) {
429
425
  return n.getWidget;
430
426
  }
431
- const wt = () => {
432
- const n = q(1);
427
+ const Dt = () => {
428
+ const n = Y(1);
433
429
  let e;
434
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ g("path", { d: "M4 20V8H8V20H4ZM9 20V13H13V20H9ZM16 20V4H20V20H16Z", fill: "currentColor" }) }), n[0] = e) : e = n[0], e;
435
- }, me = "stack-toggle";
436
- function On(n) {
437
- const e = q(47), {
430
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ p("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ p("path", { d: "M4 20V8H8V20H4ZM9 20V13H13V20H9ZM16 20V4H20V20H16Z", fill: "currentColor" }) }), n[0] = e) : e = n[0], e;
431
+ }, Ie = "stack-toggle";
432
+ function zn(n) {
433
+ const e = Y(40), {
438
434
  id: t,
439
- defaultIsStacked: a,
440
- labels: p,
435
+ defaultIsStacked: d,
436
+ labels: b,
441
437
  Icon: c,
442
- IconButtonProps: u
443
- } = n, E = a === void 0 ? !1 : a, f = $(Bt), b = $(Rt), d = $(At), S = $(Pt), r = $(zt);
438
+ IconButtonProps: S
439
+ } = n, v = d === void 0 ? !1 : d, T = D(Mt), y = D(At), u = D(Pt);
440
+ let _;
441
+ e[0] !== t ? (_ = (L) => L.getWidget(t)?.isStacked, e[0] = t, e[1] = _) : _ = e[1];
442
+ const l = D(te(_));
443
+ let r;
444
+ e[2] !== t ? (r = (L) => L.getWidget(t)?.option, e[2] = t, e[3] = r) : r = e[3];
445
+ const a = D(te(r));
444
446
  let s;
445
- e[0] !== t ? (s = (k) => k.getWidget(t)?.isStacked, e[0] = t, e[1] = s) : s = e[1];
446
- const _ = $(te(s));
447
- let T;
448
- e[2] !== t ? (T = (k) => k.getWidget(t)?.option, e[2] = t, e[3] = T) : T = e[3];
449
- const o = $(te(T));
450
- let h;
451
447
  e: {
452
- if (!o) {
453
- let M;
454
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = {
448
+ if (!a) {
449
+ let R;
450
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
455
451
  hasMultiSeries: !1,
456
452
  hasStackInSeries: !1
457
- }, e[4] = M) : M = e[4], h = M;
453
+ }, e[4] = R) : R = e[4], s = R;
458
454
  break e;
459
455
  }
460
- let k;
461
- e[5] !== o.series ? (k = Array.isArray(o.series) ? o.series : [o.series], e[5] = o.series, e[6] = k) : k = e[6];
462
- const j = k, G = j.length > 1;
463
- let F;
464
- e[7] !== j ? (F = j.some(Wt), e[7] = j, e[8] = F) : F = e[8];
465
- let Z;
466
- e[9] !== G || e[10] !== F ? (Z = {
467
- hasMultiSeries: G,
468
- hasStackInSeries: F
469
- }, e[9] = G, e[10] = F, e[11] = Z) : Z = e[11], h = Z;
456
+ let L;
457
+ e[5] !== a.series ? (L = Array.isArray(a.series) ? a.series : [a.series], e[5] = a.series, e[6] = L) : L = e[6];
458
+ const A = L, k = A.length > 1;
459
+ let E;
460
+ e[7] !== A ? (E = A.some(zt), e[7] = A, e[8] = E) : E = e[8];
461
+ let m;
462
+ e[9] !== k || e[10] !== E ? (m = {
463
+ hasMultiSeries: k,
464
+ hasStackInSeries: E
465
+ }, e[9] = k, e[10] = E, e[11] = m) : m = e[11], s = m;
470
466
  }
471
467
  const {
472
468
  hasMultiSeries: i,
473
- hasStackInSeries: m
474
- } = h, v = m || E, l = _ ?? v;
475
- let O, P;
476
- e[12] !== i || e[13] !== t || e[14] !== l || e[15] !== b || e[16] !== d ? (O = () => (b(t, {
477
- id: me,
469
+ hasStackInSeries: h
470
+ } = s, g = h || v, o = l ?? g;
471
+ let C, f;
472
+ e[12] !== i || e[13] !== t || e[14] !== o || e[15] !== y || e[16] !== u ? (C = () => (y(t, {
473
+ id: Ie,
478
474
  type: "config",
479
475
  order: 10,
480
- enabled: l && i,
481
- fn: Dt,
482
- config: {
483
- stacked: l
484
- }
485
- }), () => d(t, me)), P = [t, b, d, l, i], e[12] = i, e[13] = t, e[14] = l, e[15] = b, e[16] = d, e[17] = O, e[18] = P) : (O = e[17], P = e[18]), K(O, P);
486
- let y, A;
487
- e[19] !== i || e[20] !== t || e[21] !== l || e[22] !== S || e[23] !== r ? (y = () => {
488
- S(t, me, l && i), r(t, me, {
489
- stacked: l
490
- });
491
- }, A = [t, l, i, S, r], e[19] = i, e[20] = t, e[21] = l, e[22] = S, e[23] = r, e[24] = y, e[25] = A) : (y = e[24], A = e[25]), K(y, A);
492
- let w, D;
493
- e[26] !== v || e[27] !== t || e[28] !== f || e[29] !== _ ? (D = () => {
494
- _ === void 0 && f(t, {
495
- isStacked: v
476
+ enabled: o && i,
477
+ fn: Wt
478
+ }), () => u(t, Ie)), f = [t, y, u, o, i], e[12] = i, e[13] = t, e[14] = o, e[15] = y, e[16] = u, e[17] = C, e[18] = f) : (C = e[17], f = e[18]), K(C, f);
479
+ let x, O;
480
+ e[19] !== g || e[20] !== t || e[21] !== T || e[22] !== l ? (x = () => {
481
+ l === void 0 && T(t, {
482
+ isStacked: g
496
483
  });
497
- }, w = [v, t, f, _], e[26] = v, e[27] = t, e[28] = f, e[29] = _, e[30] = w, e[31] = D) : (w = e[30], D = e[31]), K(D, w);
498
- let L;
499
- e[32] !== t || e[33] !== l || e[34] !== f ? (L = () => {
500
- f(t, {
501
- isStacked: !l
484
+ }, O = [g, t, T, l], e[19] = g, e[20] = t, e[21] = T, e[22] = l, e[23] = x, e[24] = O) : (x = e[23], O = e[24]), K(x, O);
485
+ let I;
486
+ e[25] !== t || e[26] !== o || e[27] !== T ? (I = () => {
487
+ T(t, {
488
+ isStacked: !o
502
489
  });
503
- }, e[32] = t, e[33] = l, e[34] = f, e[35] = L) : L = e[35];
504
- const I = L, W = l ? p?.unstacked ?? "Disable stacking" : p?.stacked ?? "Enable stacking";
490
+ }, e[25] = t, e[26] = o, e[27] = T, e[28] = I) : I = e[28];
491
+ const z = I, w = o ? b?.unstacked ?? "Disable stacking" : b?.stacked ?? "Enable stacking";
505
492
  if (!i)
506
493
  return null;
507
- const z = p?.ariaLabel ?? W;
508
- let R;
509
- e[36] !== c ? (R = c ?? /* @__PURE__ */ g(wt, {}), e[36] = c, e[37] = R) : R = e[37];
510
- let C;
511
- e[38] !== u || e[39] !== I || e[40] !== l || e[41] !== z || e[42] !== R ? (C = /* @__PURE__ */ g(J, { size: "small", "aria-label": z, onClick: I, sx: ue.trigger, "data-active": l, ...u, children: R }), e[38] = u, e[39] = I, e[40] = l, e[41] = z, e[42] = R, e[43] = C) : C = e[43];
512
- let x;
513
- return e[44] !== C || e[45] !== W ? (x = /* @__PURE__ */ g(ie, { title: W, children: C }), e[44] = C, e[45] = W, e[46] = x) : x = e[46], x;
494
+ const P = b?.ariaLabel ?? w;
495
+ let B;
496
+ e[29] !== c ? (B = c ?? /* @__PURE__ */ p(Dt, {}), e[29] = c, e[30] = B) : B = e[30];
497
+ let $;
498
+ e[31] !== S || e[32] !== z || e[33] !== o || e[34] !== P || e[35] !== B ? ($ = /* @__PURE__ */ p(q, { size: "small", "aria-label": P, onClick: z, sx: de.trigger, "data-active": o, ...S, children: B }), e[31] = S, e[32] = z, e[33] = o, e[34] = P, e[35] = B, e[36] = $) : $ = e[36];
499
+ let W;
500
+ return e[37] !== $ || e[38] !== w ? (W = /* @__PURE__ */ p(se, { title: w, children: $ }), e[37] = $, e[38] = w, e[39] = W) : W = e[39], W;
514
501
  }
515
- function Dt(n, e) {
516
- const t = n, a = t.option;
517
- if (!a)
502
+ function Wt(n) {
503
+ const e = n, t = e.option;
504
+ if (!t)
518
505
  return n;
519
- const p = e?.stacked ?? !1, u = (Array.isArray(a.series) ? a.series : [a.series]).map((E) => {
520
- const f = E?.stack;
521
- return {
522
- ...E,
523
- ...et(p, typeof f == "string" ? f : tt)
524
- };
525
- });
506
+ const b = (Array.isArray(t.series) ? t.series : [t.series]).map(Bt);
526
507
  return {
527
- ...t,
508
+ ...e,
528
509
  option: {
529
- ...a,
530
- series: u
510
+ ...t,
511
+ series: b
531
512
  }
532
513
  };
533
514
  }
534
- function Wt(n) {
535
- return n?.stack;
515
+ function Bt(n) {
516
+ const e = n?.stack;
517
+ return {
518
+ ...n,
519
+ ...tt(typeof e == "string" ? e : nt)
520
+ };
536
521
  }
537
522
  function zt(n) {
538
- return n.updateToolConfig;
523
+ return n?.stack;
539
524
  }
540
525
  function Pt(n) {
541
- return n.setToolEnabled;
542
- }
543
- function At(n) {
544
526
  return n.unregisterTool;
545
527
  }
546
- function Rt(n) {
528
+ function At(n) {
547
529
  return n.registerTool;
548
530
  }
549
- function Bt(n) {
531
+ function Mt(n) {
550
532
  return n.setWidget;
551
533
  }
552
- const ae = "lock-selection";
553
- function wn(n) {
554
- const e = q(36), {
534
+ const pe = "lock-selection";
535
+ function Pn(n) {
536
+ const e = Y(29), {
555
537
  id: t,
556
- selectedItems: a,
557
- order: p,
538
+ selectedItems: d,
539
+ order: b,
558
540
  labels: c,
559
- Icon: u,
560
- IconButtonProps: E
561
- } = n, f = p === void 0 ? 30 : p, b = $(Ht), d = $(Gt), S = $(Vt), r = $(Zt), s = $(Ft);
562
- let _;
563
- e[0] !== t ? (_ = (W) => W.getWidget(t)?.isLocked, e[0] = t, e[1] = _) : _ = e[1];
564
- const o = $(te(_)) ?? !1;
565
- let h;
566
- e[2] !== o || e[3] !== a ? (h = o ? a : [], e[2] = o, e[3] = a, e[4] = h) : h = e[4];
567
- const i = h;
568
- let m, v;
569
- e[5] !== t || e[6] !== o || e[7] !== i || e[8] !== f || e[9] !== d || e[10] !== S ? (m = () => (d(t, {
570
- id: ae,
571
- order: f,
572
- enabled: o,
573
- fn: Mt,
541
+ Icon: S,
542
+ IconButtonProps: v
543
+ } = n, T = b === void 0 ? 30 : b, y = D(Gt), u = D(Vt), _ = D(Ft);
544
+ let l;
545
+ e[0] !== t ? (l = (w) => w.getWidget(t)?.isLocked, e[0] = t, e[1] = l) : l = e[1];
546
+ const a = D(te(l)) ?? !1;
547
+ let s;
548
+ e[2] !== a || e[3] !== d ? (s = a ? d : [], e[2] = a, e[3] = d, e[4] = s) : s = e[4];
549
+ const i = s;
550
+ let h, g;
551
+ e[5] !== t || e[6] !== a || e[7] !== i || e[8] !== T || e[9] !== u || e[10] !== _ ? (h = () => (u(t, {
552
+ id: pe,
553
+ order: T,
554
+ enabled: a,
555
+ fn: Rt,
574
556
  config: {
575
557
  lockedItems: i
576
558
  }
577
- }), () => S(t, ae)), v = [t, f, d, S, o, i], e[5] = t, e[6] = o, e[7] = i, e[8] = f, e[9] = d, e[10] = S, e[11] = m, e[12] = v) : (m = e[11], v = e[12]), K(m, v);
578
- let l, O;
579
- e[13] !== t || e[14] !== o || e[15] !== i || e[16] !== r || e[17] !== s ? (l = () => {
580
- r(t, ae, o), s(t, ae, {
581
- lockedItems: i
582
- });
583
- }, O = [t, o, i, r, s], e[13] = t, e[14] = o, e[15] = i, e[16] = r, e[17] = s, e[18] = l, e[19] = O) : (l = e[18], O = e[19]), K(l, O);
584
- let P;
585
- e[20] !== t || e[21] !== o || e[22] !== a || e[23] !== b ? (P = () => {
586
- o ? b(t, {
559
+ }), () => _(t, pe)), g = [t, T, u, _, a, i], e[5] = t, e[6] = a, e[7] = i, e[8] = T, e[9] = u, e[10] = _, e[11] = h, e[12] = g) : (h = e[11], g = e[12]), K(h, g);
560
+ let o;
561
+ e[13] !== t || e[14] !== a || e[15] !== d || e[16] !== y ? (o = () => {
562
+ a ? y(t, {
587
563
  isLocked: !1,
588
564
  lockedItems: []
589
- }) : b(t, {
565
+ }) : y(t, {
590
566
  isLocked: !0,
591
- lockedItems: a
567
+ lockedItems: d
592
568
  });
593
- }, e[20] = t, e[21] = o, e[22] = a, e[23] = b, e[24] = P) : P = e[24];
594
- const y = P;
595
- if (a.length === 0)
569
+ }, e[13] = t, e[14] = a, e[15] = d, e[16] = y, e[17] = o) : o = e[17];
570
+ const C = o;
571
+ if (d.length === 0)
596
572
  return null;
597
- const A = o ? c?.unlock ?? "Unlock selection" : c?.lock ?? "Lock selection", w = c?.ariaLabel ?? A;
598
- let D;
599
- e[25] !== u ? (D = u ?? /* @__PURE__ */ g(Je, { fontSize: "small" }), e[25] = u, e[26] = D) : D = e[26];
600
- let L;
601
- e[27] !== E || e[28] !== w || e[29] !== y || e[30] !== o || e[31] !== D ? (L = /* @__PURE__ */ g(J, { size: "small", "aria-label": w, onClick: y, sx: ue.trigger, "data-active": o, ...E, children: D }), e[27] = E, e[28] = w, e[29] = y, e[30] = o, e[31] = D, e[32] = L) : L = e[32];
573
+ const f = a ? c?.unlock ?? "Unlock selection" : c?.lock ?? "Lock selection", x = c?.ariaLabel ?? f;
574
+ let O;
575
+ e[18] !== S ? (O = S ?? /* @__PURE__ */ p(Je, { fontSize: "small" }), e[18] = S, e[19] = O) : O = e[19];
602
576
  let I;
603
- return e[33] !== L || e[34] !== A ? (I = /* @__PURE__ */ g(ie, { title: A, children: L }), e[33] = L, e[34] = A, e[35] = I) : I = e[35], I;
577
+ e[20] !== v || e[21] !== x || e[22] !== C || e[23] !== a || e[24] !== O ? (I = /* @__PURE__ */ p(q, { size: "small", "aria-label": x, onClick: C, sx: de.trigger, "data-active": a, ...v, children: O }), e[20] = v, e[21] = x, e[22] = C, e[23] = a, e[24] = O, e[25] = I) : I = e[25];
578
+ let z;
579
+ return e[26] !== I || e[27] !== f ? (z = /* @__PURE__ */ p(se, { title: f, children: I }), e[26] = I, e[27] = f, e[28] = z) : z = e[28], z;
604
580
  }
605
- function Mt(n, e) {
581
+ function Rt(n, e) {
606
582
  const t = e?.lockedItems || [];
607
- return t.length === 0 ? n : Nt(n, t);
583
+ return t.length === 0 ? n : Zt(n, t);
608
584
  }
609
585
  function Ft(n) {
610
- return n.updateToolConfig;
611
- }
612
- function Zt(n) {
613
- return n.setToolEnabled;
614
- }
615
- function Vt(n) {
616
586
  return n.unregisterTool;
617
587
  }
618
- function Gt(n) {
588
+ function Vt(n) {
619
589
  return n.registerTool;
620
590
  }
621
- function Ht(n) {
591
+ function Gt(n) {
622
592
  return n.setWidget;
623
593
  }
624
- function Nt(n, e) {
625
- return n.map((t) => t.filter((a) => {
626
- const p = a.name;
627
- return typeof p == "string" && e.includes(p);
594
+ function Zt(n, e) {
595
+ return n.map((t) => t.filter((d) => {
596
+ const b = d.name;
597
+ return typeof b == "string" && e.includes(b);
628
598
  }));
629
599
  }
630
- const ge = "searcher", jt = 300;
631
- function Dn(n) {
632
- const e = q(44), {
600
+ const fe = "searcher", Ht = 300;
601
+ function An(n) {
602
+ const e = Y(44), {
633
603
  id: t,
634
- filterFn: a,
635
- order: p,
604
+ filterFn: d,
605
+ order: b,
636
606
  labels: c,
637
- TextFieldProps: u,
638
- ClearIcon: E,
639
- debounceDelay: f
640
- } = n, b = p === void 0 ? 20 : p, d = f === void 0 ? jt : f, S = de(null), r = de(null);
641
- let s;
642
- e[0] !== t ? (s = (B) => B.getWidget(t), e[0] = t, e[1] = s) : s = e[1];
643
- const _ = $(s), T = _?.isSearchEnabled ?? !1, o = _?.searchText ?? "", h = de(T), i = a ?? Jt, m = $(qt), v = $(Yt), l = $(Kt), O = $(Ut);
644
- let P;
645
- e[2] !== t || e[3] !== m ? (P = (B) => {
646
- m(t, {
647
- searchText: B
607
+ TextFieldProps: S,
608
+ ClearIcon: v,
609
+ debounceDelay: T
610
+ } = n, y = b === void 0 ? 20 : b, u = T === void 0 ? Ht : T, _ = ce(null), l = ce(null);
611
+ let r;
612
+ e[0] !== t ? (r = (M) => M.getWidget(t), e[0] = t, e[1] = r) : r = e[1];
613
+ const a = D(r), s = a?.isSearchEnabled ?? !1, i = a?.searchText ?? "", h = ce(s), g = d ?? Yt, o = D(Kt), C = D(Ut), f = D(jt), x = D(Nt);
614
+ let O;
615
+ e[2] !== t || e[3] !== o ? (O = (M) => {
616
+ o(t, {
617
+ searchText: M
648
618
  });
649
- }, e[2] = t, e[3] = m, e[4] = P) : P = e[4];
650
- const y = P;
651
- let A, w;
652
- e[5] !== T || e[6] !== i || e[7] !== t || e[8] !== b || e[9] !== v || e[10] !== o || e[11] !== l ? (A = () => (v(t, {
653
- id: ge,
654
- order: b,
655
- enabled: T,
656
- fn: async (B, U) => {
657
- const H = U?.searchText || "";
658
- return i(B, H);
619
+ }, e[2] = t, e[3] = o, e[4] = O) : O = e[4];
620
+ const I = O;
621
+ let z, w;
622
+ e[5] !== s || e[6] !== g || e[7] !== t || e[8] !== y || e[9] !== C || e[10] !== i || e[11] !== f ? (z = () => (C(t, {
623
+ id: fe,
624
+ order: y,
625
+ enabled: s,
626
+ fn: async (M, U) => {
627
+ const j = U?.searchText || "";
628
+ return g(M, j);
659
629
  },
660
630
  config: {
661
- searchText: o
631
+ searchText: i
662
632
  },
663
- disables: [ae]
664
- }), () => l(t, ge)), w = [t, b, i, v, l, T, o], e[5] = T, e[6] = i, e[7] = t, e[8] = b, e[9] = v, e[10] = o, e[11] = l, e[12] = A, e[13] = w) : (A = e[12], w = e[13]), K(A, w);
665
- let D;
666
- e[14] !== d || e[15] !== t || e[16] !== O ? (D = (B) => {
667
- r.current && clearTimeout(r.current), r.current = setTimeout(() => {
668
- O(t, ge, {
669
- searchText: B
633
+ disables: [pe]
634
+ }), () => f(t, fe)), w = [t, y, g, C, f, s, i], e[5] = s, e[6] = g, e[7] = t, e[8] = y, e[9] = C, e[10] = i, e[11] = f, e[12] = z, e[13] = w) : (z = e[12], w = e[13]), K(z, w);
635
+ let P;
636
+ e[14] !== u || e[15] !== t || e[16] !== x ? (P = (M) => {
637
+ l.current && clearTimeout(l.current), l.current = setTimeout(() => {
638
+ x(t, fe, {
639
+ searchText: M
670
640
  });
671
- }, d);
672
- }, e[14] = d, e[15] = t, e[16] = O, e[17] = D) : D = e[17];
673
- const L = D;
674
- let I, W;
675
- e[18] !== T ? (I = () => {
676
- T && !h.current && S.current && S.current.focus(), h.current = T;
677
- }, W = [T], e[18] = T, e[19] = I, e[20] = W) : (I = e[19], W = e[20]), K(I, W);
678
- let z, R;
679
- e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => () => {
680
- r.current && clearTimeout(r.current);
681
- }, R = [], e[21] = z, e[22] = R) : (z = e[21], R = e[22]), K(z, R);
682
- let C;
683
- e[23] !== L || e[24] !== y ? (C = (B) => {
684
- const U = B.target.value;
685
- y(U), L(U);
686
- }, e[23] = L, e[24] = y, e[25] = C) : C = e[25];
687
- const x = C;
641
+ }, u);
642
+ }, e[14] = u, e[15] = t, e[16] = x, e[17] = P) : P = e[17];
643
+ const B = P;
644
+ let $, W;
645
+ e[18] !== s ? ($ = () => {
646
+ s && !h.current && _.current && _.current.focus(), h.current = s;
647
+ }, W = [s], e[18] = s, e[19] = $, e[20] = W) : ($ = e[19], W = e[20]), K($, W);
648
+ let L, A;
649
+ e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => () => {
650
+ l.current && clearTimeout(l.current);
651
+ }, A = [], e[21] = L, e[22] = A) : (L = e[21], A = e[22]), K(L, A);
688
652
  let k;
689
- e[26] !== t || e[27] !== y || e[28] !== O ? (k = () => {
690
- y(""), O(t, ge, {
653
+ e[23] !== B || e[24] !== I ? (k = (M) => {
654
+ const U = M.target.value;
655
+ I(U), B(U);
656
+ }, e[23] = B, e[24] = I, e[25] = k) : k = e[25];
657
+ const E = k;
658
+ let m;
659
+ e[26] !== t || e[27] !== I || e[28] !== x ? (m = () => {
660
+ I(""), x(t, fe, {
691
661
  searchText: ""
692
- }), S.current && S.current.focus();
693
- }, e[26] = t, e[27] = y, e[28] = O, e[29] = k) : k = e[29];
694
- const j = k;
695
- if (!T)
662
+ }), _.current && _.current.focus();
663
+ }, e[26] = t, e[27] = I, e[28] = x, e[29] = m) : m = e[29];
664
+ const R = m;
665
+ if (!s)
696
666
  return null;
697
- const G = c?.placeholder ?? "Search...", F = c?.clearAriaLabel ?? "Clear search";
698
- let Z;
699
- e[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Z = /* @__PURE__ */ g(ve, { position: "start", children: /* @__PURE__ */ g($e, {}) }), e[30] = Z) : Z = e[30];
700
- let M;
701
- e[31] !== E || e[32] !== F || e[33] !== j || e[34] !== o ? (M = o ? /* @__PURE__ */ g(ve, { position: "end", children: /* @__PURE__ */ g(J, { size: "small", "aria-label": F, onClick: j, edge: "end", children: E ?? /* @__PURE__ */ g(Qe, { fontSize: "small" }) }) }) : null, e[31] = E, e[32] = F, e[33] = j, e[34] = o, e[35] = M) : M = e[35];
702
- let N;
703
- e[36] !== M ? (N = {
704
- startAdornment: Z,
705
- endAdornment: M
706
- }, e[36] = M, e[37] = N) : N = e[37];
667
+ const N = c?.placeholder ?? "Search...", G = c?.clearAriaLabel ?? "Clear search";
668
+ let H;
669
+ e[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ p(Se, { position: "start", children: /* @__PURE__ */ p(Oe, {}) }), e[30] = H) : H = e[30];
707
670
  let V;
708
- return e[38] !== u || e[39] !== x || e[40] !== G || e[41] !== o || e[42] !== N ? (V = /* @__PURE__ */ g(Ge, { inputRef: S, size: "small", fullWidth: !0, variant: "filled", placeholder: G, value: o, onChange: x, InputProps: N, ...u }), e[38] = u, e[39] = x, e[40] = G, e[41] = o, e[42] = N, e[43] = V) : V = e[43], V;
671
+ e[31] !== v || e[32] !== G || e[33] !== R || e[34] !== i ? (V = i ? /* @__PURE__ */ p(Se, { position: "end", children: /* @__PURE__ */ p(q, { size: "small", "aria-label": G, onClick: R, edge: "end", children: v ?? /* @__PURE__ */ p(Qe, { fontSize: "small" }) }) }) : null, e[31] = v, e[32] = G, e[33] = R, e[34] = i, e[35] = V) : V = e[35];
672
+ let Z;
673
+ e[36] !== V ? (Z = {
674
+ startAdornment: H,
675
+ endAdornment: V
676
+ }, e[36] = V, e[37] = Z) : Z = e[37];
677
+ let F;
678
+ return e[38] !== S || e[39] !== E || e[40] !== N || e[41] !== i || e[42] !== Z ? (F = /* @__PURE__ */ p(Ze, { inputRef: _, size: "small", fullWidth: !0, variant: "filled", placeholder: N, value: i, onChange: E, InputProps: Z, ...S }), e[38] = S, e[39] = E, e[40] = N, e[41] = i, e[42] = Z, e[43] = F) : F = e[43], F;
709
679
  }
710
- function Ut(n) {
680
+ function Nt(n) {
711
681
  return n.updateToolConfig;
712
682
  }
713
- function Kt(n) {
683
+ function jt(n) {
714
684
  return n.unregisterTool;
715
685
  }
716
- function Yt(n) {
686
+ function Ut(n) {
717
687
  return n.registerTool;
718
688
  }
719
- function qt(n) {
689
+ function Kt(n) {
720
690
  return n.setWidget;
721
691
  }
722
- const Jt = (n, e) => {
692
+ const Yt = (n, e) => {
723
693
  if (!e.trim()) return Promise.resolve(n);
724
694
  const t = e.toLowerCase();
725
- return Promise.resolve(n.map((a) => a.filter((p) => Object.values(p).some((c) => typeof c == "string" && c.toLowerCase().includes(t)))));
695
+ return Promise.resolve(n.map((d) => d.filter((b) => Object.values(b).some((c) => typeof c == "string" && c.toLowerCase().includes(t)))));
726
696
  };
727
- function Wn(n) {
728
- const e = q(23), {
697
+ function Mn(n) {
698
+ const e = Y(23), {
729
699
  id: t,
730
- defaultEnabled: a,
731
- labels: p,
700
+ defaultEnabled: d,
701
+ labels: b,
732
702
  Icon: c,
733
- IconButtonProps: u
734
- } = n, E = a === void 0 ? !1 : a, f = $(Xt), b = $(Qt);
735
- let d;
736
- e[0] !== t ? (d = (O) => O.getWidget(t)?.isSearchEnabled, e[0] = t, e[1] = d) : d = e[1];
737
- const r = $(te(d)) ?? E;
738
- let s, _;
739
- e[2] !== E || e[3] !== b || e[4] !== t || e[5] !== f ? (s = () => {
740
- b(t)?.isSearchEnabled === void 0 && f(t, {
741
- isSearchEnabled: E
703
+ IconButtonProps: S
704
+ } = n, v = d === void 0 ? !1 : d, T = D(Jt), y = D(qt);
705
+ let u;
706
+ e[0] !== t ? (u = (x) => x.getWidget(t)?.isSearchEnabled, e[0] = t, e[1] = u) : u = e[1];
707
+ const l = D(te(u)) ?? v;
708
+ let r, a;
709
+ e[2] !== v || e[3] !== y || e[4] !== t || e[5] !== T ? (r = () => {
710
+ y(t)?.isSearchEnabled === void 0 && T(t, {
711
+ isSearchEnabled: v
742
712
  });
743
- }, _ = [E, b, t, f], e[2] = E, e[3] = b, e[4] = t, e[5] = f, e[6] = s, e[7] = _) : (s = e[6], _ = e[7]), K(s, _);
744
- let T;
745
- e[8] !== t || e[9] !== r || e[10] !== f ? (T = () => {
746
- f(t, {
747
- isSearchEnabled: !r
713
+ }, a = [v, y, t, T], e[2] = v, e[3] = y, e[4] = t, e[5] = T, e[6] = r, e[7] = a) : (r = e[6], a = e[7]), K(r, a);
714
+ let s;
715
+ e[8] !== t || e[9] !== l || e[10] !== T ? (s = () => {
716
+ T(t, {
717
+ isSearchEnabled: !l
748
718
  });
749
- }, e[8] = t, e[9] = r, e[10] = f, e[11] = T) : T = e[11];
750
- const o = T, h = r ? p?.disable ?? "Disable search" : p?.enable ?? "Enable search", i = p?.ariaLabel ?? h;
751
- let m;
752
- e[12] !== c ? (m = c ?? /* @__PURE__ */ g($e, { fontSize: "small" }), e[12] = c, e[13] = m) : m = e[13];
753
- let v;
754
- e[14] !== u || e[15] !== i || e[16] !== o || e[17] !== r || e[18] !== m ? (v = /* @__PURE__ */ g(J, { size: "small", "aria-label": i, onClick: o, sx: ue.trigger, "data-active": r, ...u, children: m }), e[14] = u, e[15] = i, e[16] = o, e[17] = r, e[18] = m, e[19] = v) : v = e[19];
755
- let l;
756
- return e[20] !== v || e[21] !== h ? (l = /* @__PURE__ */ g(ie, { title: h, children: v }), e[20] = v, e[21] = h, e[22] = l) : l = e[22], l;
719
+ }, e[8] = t, e[9] = l, e[10] = T, e[11] = s) : s = e[11];
720
+ const i = s, h = l ? b?.disable ?? "Disable search" : b?.enable ?? "Enable search", g = b?.ariaLabel ?? h;
721
+ let o;
722
+ e[12] !== c ? (o = c ?? /* @__PURE__ */ p(Oe, { fontSize: "small" }), e[12] = c, e[13] = o) : o = e[13];
723
+ let C;
724
+ e[14] !== S || e[15] !== g || e[16] !== i || e[17] !== l || e[18] !== o ? (C = /* @__PURE__ */ p(q, { size: "small", "aria-label": g, onClick: i, sx: de.trigger, "data-active": l, ...S, children: o }), e[14] = S, e[15] = g, e[16] = i, e[17] = l, e[18] = o, e[19] = C) : C = e[19];
725
+ let f;
726
+ return e[20] !== C || e[21] !== h ? (f = /* @__PURE__ */ p(se, { title: h, children: C }), e[20] = C, e[21] = h, e[22] = f) : f = e[22], f;
757
727
  }
758
- function Qt(n) {
728
+ function qt(n) {
759
729
  return n.getWidget;
760
730
  }
761
- function Xt(n) {
731
+ function Jt(n) {
762
732
  return n.setWidget;
763
733
  }
764
- const en = () => {
765
- const n = q(1);
734
+ const Qt = () => {
735
+ const n = Y(1);
766
736
  let e;
767
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 18 18", children: /* @__PURE__ */ g("path", { fill: "currentColor", fillRule: "evenodd", d: "M14.25 2.25H3.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5V3.75c0-.825-.675-1.5-1.5-1.5m-3.75 12h-3V3.75h3zM3.75 3.75H6v10.5H3.75zM12 14.25V3.75h2.25v10.5z", clipRule: "evenodd" }) }), n[0] = e) : e = n[0], e;
737
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 18 18", children: /* @__PURE__ */ p("path", { fill: "currentColor", fillRule: "evenodd", d: "M14.25 2.25H3.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5V3.75c0-.825-.675-1.5-1.5-1.5m-3.75 12h-3V3.75h3zM3.75 3.75H6v10.5H3.75zM12 14.25V3.75h2.25v10.5z", clipRule: "evenodd" }) }), n[0] = e) : e = n[0], e;
768
738
  };
769
- function tn(n) {
770
- const e = q(18), {
739
+ function Xt(n) {
740
+ const e = Y(18), {
771
741
  column: t
772
742
  } = n;
773
- let a;
774
- e[0] !== t.id ? (a = {
743
+ let d;
744
+ e[0] !== t.id ? (d = {
775
745
  id: t.id
776
- }, e[0] = t.id, e[1] = a) : a = e[1];
746
+ }, e[0] = t.id, e[1] = d) : d = e[1];
777
747
  const {
778
- attributes: p,
748
+ attributes: b,
779
749
  listeners: c,
780
- setNodeRef: u,
781
- transform: E,
782
- transition: f,
783
- isDragging: b
784
- } = it(a);
785
- let d;
786
- e[2] !== E ? (d = ft.Transform.toString(E), e[2] = E, e[3] = d) : d = e[3];
787
- const S = b ? 0.5 : 1, r = b ? "grabbing" : "grab";
750
+ setNodeRef: S,
751
+ transform: v,
752
+ transition: T,
753
+ isDragging: y
754
+ } = ct(d);
755
+ let u;
756
+ e[2] !== v ? (u = gt.Transform.toString(v), e[2] = v, e[3] = u) : u = e[3];
757
+ const _ = y ? 0.5 : 1, l = y ? "grabbing" : "grab";
758
+ let r;
759
+ e[4] !== u || e[5] !== _ || e[6] !== l || e[7] !== T ? (r = {
760
+ transform: u,
761
+ transition: T,
762
+ opacity: _,
763
+ cursor: l
764
+ }, e[4] = u, e[5] = _, e[6] = l, e[7] = T, e[8] = r) : r = e[8];
765
+ const a = r;
788
766
  let s;
789
- e[4] !== d || e[5] !== S || e[6] !== r || e[7] !== f ? (s = {
790
- transform: d,
791
- transition: f,
792
- opacity: S,
793
- cursor: r
794
- }, e[4] = d, e[5] = S, e[6] = r, e[7] = f, e[8] = s) : s = e[8];
795
- const _ = s;
796
- let T;
797
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
767
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {
798
768
  "&:focus-visible": {
799
- outline: nn,
769
+ outline: en,
800
770
  outlineOffset: -2
801
771
  }
802
- }, e[9] = T) : T = e[9];
803
- let o;
804
- e[10] !== t.label ? (o = /* @__PURE__ */ g(Le, { children: t.label }), e[10] = t.label, e[11] = o) : o = e[11];
772
+ }, e[9] = s) : s = e[9];
773
+ let i;
774
+ e[10] !== t.label ? (i = /* @__PURE__ */ p(Le, { children: t.label }), e[10] = t.label, e[11] = i) : i = e[11];
805
775
  let h;
806
- return e[12] !== p || e[13] !== c || e[14] !== u || e[15] !== _ || e[16] !== o ? (h = /* @__PURE__ */ g(Ee, { ref: u, style: _, ...p, ...c, role: "menuitem", tabIndex: 0, sx: T, children: o }), e[12] = p, e[13] = c, e[14] = u, e[15] = _, e[16] = o, e[17] = h) : h = e[17], h;
776
+ return e[12] !== b || e[13] !== c || e[14] !== S || e[15] !== a || e[16] !== i ? (h = /* @__PURE__ */ p(Ee, { ref: S, style: a, ...b, ...c, role: "menuitem", tabIndex: 0, sx: s, children: i }), e[12] = b, e[13] = c, e[14] = S, e[15] = a, e[16] = i, e[17] = h) : h = e[17], h;
807
777
  }
808
- function nn(n) {
778
+ function en(n) {
809
779
  return `2px solid ${n.palette.primary.main}`;
810
780
  }
811
- const ke = "change-column";
812
- function zn(n) {
813
- const e = q(50), {
781
+ const Ce = "change-column";
782
+ function Rn(n) {
783
+ const e = Y(50), {
814
784
  id: t,
815
- labels: a,
816
- Icon: p,
785
+ labels: d,
786
+ Icon: b,
817
787
  IconButtonProps: c,
818
- MenuProps: u
819
- } = n, [E, f] = he(null), b = $(an), d = $(cn), S = $(rn);
820
- let r;
821
- e[0] !== t ? (r = (B) => B.getWidget(t)?.columns, e[0] = t, e[1] = r) : r = e[1];
822
- const s = $(te(r));
823
- let _;
824
- e[2] !== t ? (_ = (B) => {
825
- const H = $.getState().getWidget(t)?.columns;
826
- if (!H || H.length === 0)
827
- return B;
828
- const ne = B, Y = ne.columns;
829
- if (!Y || Y.length === 0 || Y.length === H.length && Y.every((X, le) => X.id === H[le]?.id))
830
- return B;
831
- const se = new Map(Y.map(sn)), oe = [];
832
- for (const X of H) {
833
- const le = se.get(X.id);
834
- le && (oe.push(le), se.delete(X.id));
788
+ MenuProps: S
789
+ } = n, [v, T] = he(null), y = D(rn), u = D(sn), _ = D(ln);
790
+ let l;
791
+ e[0] !== t ? (l = (M) => M.getWidget(t)?.columns, e[0] = t, e[1] = l) : l = e[1];
792
+ const r = D(te(l));
793
+ let a;
794
+ e[2] !== t ? (a = (M) => {
795
+ const j = D.getState().getWidget(t)?.columns;
796
+ if (!j || j.length === 0)
797
+ return M;
798
+ const oe = M, J = oe.columns;
799
+ if (!J || J.length === 0 || J.length === j.length && J.every((X, ne) => X.id === j[ne]?.id))
800
+ return M;
801
+ const re = new Map(J.map(on)), le = [];
802
+ for (const X of j) {
803
+ const ne = re.get(X.id);
804
+ ne && (le.push(ne), re.delete(X.id));
835
805
  }
836
- for (const X of se.values())
837
- oe.push(X);
838
- const ce = oe.length === H.length && oe.every((X, le) => X.id === H[le]?.id);
806
+ for (const X of re.values())
807
+ le.push(X);
808
+ const ge = le.length === j.length && le.every((X, ne) => X.id === j[ne]?.id);
839
809
  return {
840
- ...ne,
841
- columns: ce ? H : oe
810
+ ...oe,
811
+ columns: ge ? j : le
842
812
  };
843
- }, e[2] = t, e[3] = _) : _ = e[3];
844
- const T = _;
845
- let o;
846
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {
847
- coordinateGetter: ct
848
- }, e[4] = o) : o = e[4];
849
- const h = nt(Ie(ot), Ie(lt, o));
813
+ }, e[2] = t, e[3] = a) : a = e[3];
814
+ const s = a;
850
815
  let i;
851
- e[5] !== s ? (i = s?.map(ln) ?? [], e[5] = s, e[6] = i) : i = e[6];
852
- const m = i;
853
- let v, l;
854
- e[7] !== t || e[8] !== d || e[9] !== T || e[10] !== S ? (v = () => (d(t, {
855
- id: ke,
816
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
817
+ coordinateGetter: at
818
+ }, e[4] = i) : i = e[4];
819
+ const h = ot(_e(lt), _e(st, i));
820
+ let g;
821
+ e[5] !== r ? (g = r?.map(nn) ?? [], e[5] = r, e[6] = g) : g = e[6];
822
+ const o = g;
823
+ let C, f;
824
+ e[7] !== t || e[8] !== u || e[9] !== s || e[10] !== _ ? (C = () => (u(t, {
825
+ id: Ce,
856
826
  type: "config",
857
827
  order: 100,
858
828
  enabled: !0,
859
- fn: T
860
- }), () => S(t, ke)), l = [t, d, S, T], e[7] = t, e[8] = d, e[9] = T, e[10] = S, e[11] = v, e[12] = l) : (v = e[11], l = e[12]), K(v, l);
861
- let O;
862
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = (B) => {
863
- B.stopPropagation(), f(B.currentTarget);
864
- }, e[13] = O) : O = e[13];
865
- const P = O;
866
- let y;
867
- e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = () => {
868
- f(null);
869
- }, e[14] = y) : y = e[14];
870
- const A = y;
829
+ fn: s
830
+ }), () => _(t, Ce)), f = [t, u, _, s], e[7] = t, e[8] = u, e[9] = s, e[10] = _, e[11] = C, e[12] = f) : (C = e[11], f = e[12]), K(C, f);
831
+ let x;
832
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = (M) => {
833
+ M.stopPropagation(), T(M.currentTarget);
834
+ }, e[13] = x) : x = e[13];
835
+ const O = x;
836
+ let I;
837
+ e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = () => {
838
+ T(null);
839
+ }, e[14] = I) : I = e[14];
840
+ const z = I;
871
841
  let w;
872
- e[15] !== s || e[16] !== t || e[17] !== b ? (w = (B) => {
842
+ e[15] !== r || e[16] !== t || e[17] !== y ? (w = (M) => {
873
843
  const {
874
844
  active: U,
875
- over: H
876
- } = B;
877
- if (!H || U.id === H.id || !s)
845
+ over: j
846
+ } = M;
847
+ if (!j || U.id === j.id || !r)
878
848
  return;
879
- const ne = s.findIndex((Q) => Q.id === U.id), Y = s.findIndex((Q) => Q.id === H.id);
880
- if (ne !== -1 && Y !== -1) {
881
- const Q = at(s, ne, Y);
882
- b(t, {
849
+ const oe = r.findIndex((Q) => Q.id === U.id), J = r.findIndex((Q) => Q.id === j.id);
850
+ if (oe !== -1 && J !== -1) {
851
+ const Q = dt(r, oe, J);
852
+ y(t, {
883
853
  columns: Q
884
854
  });
885
855
  }
886
- }, e[15] = s, e[16] = t, e[17] = b, e[18] = w) : w = e[18];
887
- const D = w;
888
- if (!s || s.length < 2)
856
+ }, e[15] = r, e[16] = t, e[17] = y, e[18] = w) : w = e[18];
857
+ const P = w;
858
+ if (!r || r.length < 2)
889
859
  return null;
890
- const L = a?.tooltip ?? "Change column", I = !!E, W = a?.ariaLabel ?? L, z = I ? "change-column-menu" : void 0, R = I ? "true" : void 0;
891
- let C;
892
- e[19] !== p ? (C = p ?? /* @__PURE__ */ g(He, { children: /* @__PURE__ */ g(en, {}) }), e[19] = p, e[20] = C) : C = e[20];
893
- let x;
894
- e[21] !== c || e[22] !== I || e[23] !== W || e[24] !== z || e[25] !== R || e[26] !== C ? (x = /* @__PURE__ */ g(J, { size: "small", "aria-label": W, "aria-controls": z, "aria-haspopup": "true", "aria-expanded": R, onClick: P, "data-active": I, sx: ue.trigger, ...c, children: C }), e[21] = c, e[22] = I, e[23] = W, e[24] = z, e[25] = R, e[26] = C, e[27] = x) : x = e[27];
860
+ const B = d?.tooltip ?? "Change column", $ = !!v, W = d?.ariaLabel ?? B, L = $ ? "change-column-menu" : void 0, A = $ ? "true" : void 0;
895
861
  let k;
896
- e[28] !== x || e[29] !== L ? (k = /* @__PURE__ */ g(ie, { title: L, children: x }), e[28] = x, e[29] = L, e[30] = k) : k = e[30];
897
- let j, G;
898
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = {
862
+ e[19] !== b ? (k = b ?? /* @__PURE__ */ p(He, { children: /* @__PURE__ */ p(Qt, {}) }), e[19] = b, e[20] = k) : k = e[20];
863
+ let E;
864
+ e[21] !== c || e[22] !== $ || e[23] !== W || e[24] !== L || e[25] !== A || e[26] !== k ? (E = /* @__PURE__ */ p(q, { size: "small", "aria-label": W, "aria-controls": L, "aria-haspopup": "true", "aria-expanded": A, onClick: O, "data-active": $, sx: de.trigger, ...c, children: k }), e[21] = c, e[22] = $, e[23] = W, e[24] = L, e[25] = A, e[26] = k, e[27] = E) : E = e[27];
865
+ let m;
866
+ e[28] !== E || e[29] !== B ? (m = /* @__PURE__ */ p(se, { title: B, children: E }), e[28] = E, e[29] = B, e[30] = m) : m = e[30];
867
+ let R, N;
868
+ e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
899
869
  vertical: "bottom",
900
870
  horizontal: "right"
901
- }, G = {
871
+ }, N = {
902
872
  vertical: "top",
903
873
  horizontal: "right"
904
- }, e[31] = j, e[32] = G) : (j = e[31], G = e[32]);
905
- let F;
906
- e[33] !== s ? (F = s.map(on), e[33] = s, e[34] = F) : F = e[34];
907
- let Z;
908
- e[35] !== m || e[36] !== F ? (Z = /* @__PURE__ */ g(dt, { items: m, strategy: ut, children: F }), e[35] = m, e[36] = F, e[37] = Z) : Z = e[37];
909
- let M;
910
- e[38] !== u || e[39] !== E || e[40] !== I || e[41] !== Z ? (M = /* @__PURE__ */ g(xe, { id: "change-column-menu", anchorEl: E, open: I, onClose: A, anchorOrigin: j, transformOrigin: G, ...u, children: Z }), e[38] = u, e[39] = E, e[40] = I, e[41] = Z, e[42] = M) : M = e[42];
911
- let N;
912
- e[43] !== D || e[44] !== h || e[45] !== M ? (N = /* @__PURE__ */ g(st, { sensors: h, collisionDetection: rt, onDragEnd: D, children: M }), e[43] = D, e[44] = h, e[45] = M, e[46] = N) : N = e[46];
874
+ }, e[31] = R, e[32] = N) : (R = e[31], N = e[32]);
875
+ let G;
876
+ e[33] !== r ? (G = r.map(tn), e[33] = r, e[34] = G) : G = e[34];
877
+ let H;
878
+ e[35] !== o || e[36] !== G ? (H = /* @__PURE__ */ p(ut, { items: o, strategy: ft, children: G }), e[35] = o, e[36] = G, e[37] = H) : H = e[37];
913
879
  let V;
914
- return e[47] !== k || e[48] !== N ? (V = /* @__PURE__ */ re(be, { children: [
915
- k,
916
- N
917
- ] }), e[47] = k, e[48] = N, e[49] = V) : V = e[49], V;
880
+ e[38] !== S || e[39] !== v || e[40] !== $ || e[41] !== H ? (V = /* @__PURE__ */ p(xe, { id: "change-column-menu", anchorEl: v, open: $, onClose: z, anchorOrigin: R, transformOrigin: N, ...S, children: H }), e[38] = S, e[39] = v, e[40] = $, e[41] = H, e[42] = V) : V = e[42];
881
+ let Z;
882
+ e[43] !== P || e[44] !== h || e[45] !== V ? (Z = /* @__PURE__ */ p(rt, { sensors: h, collisionDetection: it, onDragEnd: P, children: V }), e[43] = P, e[44] = h, e[45] = V, e[46] = Z) : Z = e[46];
883
+ let F;
884
+ return e[47] !== m || e[48] !== Z ? (F = /* @__PURE__ */ ie(be, { children: [
885
+ m,
886
+ Z
887
+ ] }), e[47] = m, e[48] = Z, e[49] = F) : F = e[49], F;
888
+ }
889
+ function tn(n) {
890
+ return /* @__PURE__ */ p(Xt, { column: n }, n.id);
891
+ }
892
+ function nn(n) {
893
+ return n.id;
918
894
  }
919
895
  function on(n) {
920
- return /* @__PURE__ */ g(tn, { column: n }, n.id);
896
+ return [n.id, n];
921
897
  }
922
898
  function ln(n) {
923
- return n.id;
899
+ return n.unregisterTool;
924
900
  }
925
901
  function sn(n) {
926
- return [n.id, n];
902
+ return n.registerTool;
927
903
  }
928
904
  function rn(n) {
929
- return n.unregisterTool;
905
+ return n.setWidget;
906
+ }
907
+ const ke = {
908
+ container: {
909
+ display: "flex",
910
+ alignItems: "center",
911
+ gap: ({
912
+ spacing: n
913
+ }) => n(0.25)
914
+ },
915
+ trigger: {
916
+ '&[data-active="true"]': {
917
+ background: (n) => n.palette.primary.relatedLight
918
+ }
919
+ }
920
+ }, ae = "brush-toggle";
921
+ function Fn(n) {
922
+ const e = Y(40), {
923
+ id: t,
924
+ onBrushSelected: d,
925
+ labels: b,
926
+ Icon: c,
927
+ IconButtonProps: S
928
+ } = n, v = D(gn), T = D(fn), y = D(un), u = D(dn);
929
+ let _;
930
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[0] = _) : _ = e[0];
931
+ const l = ce(_);
932
+ let r;
933
+ e[1] !== t ? (r = (m) => (m.getWidget(t)?.registeredTools ?? []).find(an), e[1] = t, e[2] = r) : r = e[2];
934
+ const s = D(te(r))?.enabled;
935
+ let i;
936
+ e[3] !== t || e[4] !== u ? (i = (m) => {
937
+ u(t, ae, m);
938
+ }, e[3] = t, e[4] = u, e[5] = i) : i = e[5];
939
+ const h = i;
940
+ let g;
941
+ e[6] !== s || e[7] !== d || e[8] !== h ? (g = () => {
942
+ const m = !s;
943
+ h(m), m && d?.([]);
944
+ }, e[6] = s, e[7] = d, e[8] = h, e[9] = g) : g = e[9];
945
+ const o = g;
946
+ let C, f;
947
+ e[10] !== s || e[11] !== v || e[12] !== t ? (C = () => {
948
+ if (!s)
949
+ return;
950
+ const m = v(t)?.instance?.current;
951
+ if (!m)
952
+ return;
953
+ const R = () => {
954
+ const N = Te();
955
+ m.dispatchAction({
956
+ type: "takeGlobalCursor",
957
+ key: "brush",
958
+ brushOption: {
959
+ brushType: N.brush.brushType,
960
+ brushMode: N.brush.brushMode
961
+ }
962
+ });
963
+ };
964
+ return R(), m.on("rendered", R), () => {
965
+ m.off("rendered", R);
966
+ };
967
+ }, f = [s, v, t], e[10] = s, e[11] = v, e[12] = t, e[13] = C, e[14] = f) : (C = e[13], f = e[14]), K(C, f);
968
+ let x;
969
+ e[15] !== v || e[16] !== t ? (x = (m) => {
970
+ const R = m, G = v(t)?.data ?? [], H = [...new Set(R.batch?.flatMap((V) => V.selected?.flatMap((Z) => Z.dataIndex?.map((F) => {
971
+ const M = G[Z.seriesIndex ?? 0]?.[F], U = M ? Object.values(M)[0] : void 0;
972
+ return String(typeof U == "string" || typeof U == "number" ? U : F);
973
+ }) ?? []) ?? []))];
974
+ l.current = H ?? [];
975
+ }, e[15] = v, e[16] = t, e[17] = x) : x = e[17];
976
+ const O = x;
977
+ let I;
978
+ e[18] !== d || e[19] !== h ? (I = () => {
979
+ d?.(l.current), h(!1);
980
+ }, e[18] = d, e[19] = h, e[20] = I) : I = e[20];
981
+ const z = I;
982
+ let w, P;
983
+ e[21] !== v || e[22] !== z || e[23] !== O || e[24] !== t || e[25] !== T || e[26] !== y ? (P = () => {
984
+ const R = v(t)?.registeredTools?.find(cn)?.enabled ?? !1;
985
+ return T(t, {
986
+ id: ae,
987
+ type: "config",
988
+ order: 25,
989
+ enabled: R,
990
+ fn: (N) => {
991
+ const G = N, H = G.option, V = G.onEvents ?? {}, Z = Te();
992
+ ({
993
+ ...V
994
+ });
995
+ const F = {
996
+ ...V,
997
+ brushSelected: O,
998
+ brushEnd: z
999
+ };
1000
+ return {
1001
+ ...G,
1002
+ option: {
1003
+ ...H,
1004
+ ...Z
1005
+ },
1006
+ onEvents: F
1007
+ };
1008
+ }
1009
+ }), () => y(t, ae);
1010
+ }, w = [v, z, O, t, T, y], e[21] = v, e[22] = z, e[23] = O, e[24] = t, e[25] = T, e[26] = y, e[27] = w, e[28] = P) : (w = e[27], P = e[28]), K(P, w);
1011
+ const B = b?.enable ?? "Enable brush selection", $ = b?.disable ?? "Disable brush selection", W = s ? $ : B, L = b?.ariaLabel ?? W;
1012
+ let A;
1013
+ e[29] !== c ? (A = c ?? /* @__PURE__ */ p(Xe, {}), e[29] = c, e[30] = A) : A = e[30];
1014
+ let k;
1015
+ e[31] !== S || e[32] !== s || e[33] !== o || e[34] !== L || e[35] !== A ? (k = /* @__PURE__ */ p(q, { size: "small", "aria-label": L, onClick: o, sx: ke.trigger, "data-active": s, ...S, children: A }), e[31] = S, e[32] = s, e[33] = o, e[34] = L, e[35] = A, e[36] = k) : k = e[36];
1016
+ let E;
1017
+ return e[37] !== k || e[38] !== W ? (E = /* @__PURE__ */ p($e, { sx: ke.container, children: /* @__PURE__ */ p(se, { title: W, children: k }) }), e[37] = k, e[38] = W, e[39] = E) : E = e[39], E;
930
1018
  }
931
1019
  function cn(n) {
932
- return n.registerTool;
1020
+ return n.id === ae;
933
1021
  }
934
1022
  function an(n) {
935
- return n.setWidget;
1023
+ return n.id === ae;
1024
+ }
1025
+ function dn(n) {
1026
+ return n.setToolEnabled;
1027
+ }
1028
+ function un(n) {
1029
+ return n.unregisterTool;
1030
+ }
1031
+ function fn(n) {
1032
+ return n.registerTool;
1033
+ }
1034
+ function gn(n) {
1035
+ return n.getWidget;
936
1036
  }
937
1037
  export {
938
- ke as CHANGE_COLUMN_TOOL_ID,
939
- zn as ChangeColumn,
940
- Ln as Download,
941
- En as FullScreen,
942
- ae as LOCK_SELECTION_TOOL_ID,
943
- wn as LockSelection,
944
- pe as RELATIVE_DATA_TOOL_ID,
945
- xn as RelativeData,
946
- ge as SEARCHER_TOOL_ID,
947
- me as STACK_TOGGLE_TOOL_ID,
948
- Dn as Searcher,
949
- Wn as SearcherToggle,
950
- On as StackToggle,
1038
+ ae as BRUSH_TOGGLE_TOOL_ID,
1039
+ Fn as BrushToggle,
1040
+ Ce as CHANGE_COLUMN_TOOL_ID,
1041
+ Rn as ChangeColumn,
1042
+ Dn as Download,
1043
+ wn as FullScreen,
1044
+ pe as LOCK_SELECTION_TOOL_ID,
1045
+ Pn as LockSelection,
1046
+ me as RELATIVE_DATA_TOOL_ID,
1047
+ Wn as RelativeData,
1048
+ fe as SEARCHER_TOOL_ID,
1049
+ Ie as STACK_TOGGLE_TOOL_ID,
1050
+ An as Searcher,
1051
+ Mn as SearcherToggle,
1052
+ zn as StackToggle,
951
1053
  ee as ZOOM_TOGGLE_TOOL_ID,
952
- $n as ZoomToggle,
953
- Rn as downloadToCSV,
954
- Bn as downloadToPNG
1054
+ Bn as ZoomToggle,
1055
+ Zn as downloadToCSV,
1056
+ Hn as downloadToPNG
955
1057
  };
956
1058
  //# sourceMappingURL=actions.js.map