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