@cgi-learning-hub/ui 1.4.0-dev.1742207843 → 1.4.0-dev.1742214247

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 (210) hide show
  1. package/dist/{Alert-DdpAZix8.js → Alert-BCd1tHk0.js} +9 -9
  2. package/dist/{Backdrop-BctCVgLy.js → Backdrop-CjDitjBW.js} +20 -19
  3. package/dist/Backdrop-DOdBqGqq.cjs +1 -0
  4. package/dist/{Box-DgqaLb7j.js → Box-GMNejc_m.js} +7 -7
  5. package/dist/{Button-B7kOjNW1.js → Button-x5rtZxJN.js} +6 -6
  6. package/dist/{ButtonBase-IZ_QjbpE.js → ButtonBase-CU1npQuI.js} +4 -4
  7. package/dist/{CardContent-F4-KcZH8.js → CardContent-CL_61cm-.js} +3 -3
  8. package/dist/{Checkbox-qUSjau0g.js → Checkbox-CtRSDqOe.js} +7 -7
  9. package/dist/{Chip-OpRIs-sL.js → Chip-ZIBpWC4I.js} +6 -6
  10. package/dist/{CircularProgress-CQxzJquv.js → CircularProgress-B28FKeiH.js} +4 -4
  11. package/dist/{CloseRounded-BMEGLs8y.js → CloseRounded-pP8asZiP.js} +1 -1
  12. package/dist/Collapse-Bvxtq7n-.cjs +1 -0
  13. package/dist/Collapse-CcMCOZ3q.js +334 -0
  14. package/dist/CustomTreeItem-CG7mGHC9.cjs +3 -0
  15. package/dist/CustomTreeItem-PTf-e74x.js +1003 -0
  16. package/dist/DatePicker-64gpvkmk.cjs +13 -0
  17. package/dist/{DatePicker-fFsWvNFc.js → DatePicker-XdCuICxv.js} +2117 -2535
  18. package/dist/{DefaultPropsProvider-Cqcb4sws.js → DefaultPropsProvider-CQixa6JQ.js} +7 -7
  19. package/dist/Delete-BQA9--_t.js +8 -0
  20. package/dist/Delete-DmeDAs0n.cjs +1 -0
  21. package/dist/{Dialog-CKS7yjT5.js → Dialog-C-Ptqtq-.js} +9 -9
  22. package/dist/{Dialog-B1wnk5BT.cjs → Dialog-CgEvhrbZ.cjs} +1 -1
  23. package/dist/{DialogContent-BzPaz5G8.js → DialogContent-1sjO2rQK.js} +3 -3
  24. package/dist/{DialogTitle-D3E_lDHD.js → DialogTitle-CGpa_QH9.js} +5 -5
  25. package/dist/{DialogTitle-mr9xn4JZ.cjs → DialogTitle-F6JD1f_z.cjs} +1 -1
  26. package/dist/{Divider-D-pZeQTm.js → Divider-CNGfzZqD.js} +8 -8
  27. package/dist/{FormLabel-3-CC-ZGw.js → FormLabel-BlaPVlwX.js} +67 -76
  28. package/dist/FormLabel-XpwTqbs8.cjs +2 -0
  29. package/dist/{Grow-DKgYCxiY.js → Grow-D5UIC41W.js} +14 -13
  30. package/dist/Grow-wjlsaPJ-.cjs +1 -0
  31. package/dist/{IconButton-CCNUMz2l.js → IconButton-CFUIddNg.js} +6 -6
  32. package/dist/{InputAdornment-DL8XIM8r.js → InputAdornment-GcbiriFv.js} +5 -5
  33. package/dist/{InputBase-By7jMrFP.js → InputBase-DJuF09Rf.js} +7 -7
  34. package/dist/{Link-C_GPIs0q.js → Link-DtsZ0d_s.js} +7 -7
  35. package/dist/List-BTPrBGqY.js +130 -0
  36. package/dist/List-Bo4pzQqG.cjs +1 -0
  37. package/dist/ListItem-C9OfYRAP.js +423 -0
  38. package/dist/ListItem-CB4JyjSb.cjs +1 -0
  39. package/dist/ListItemText-B_hEVsaT.js +928 -0
  40. package/dist/ListItemText-Bjd08uk4.cjs +1 -0
  41. package/dist/{Menu-BunOW0ot.js → Menu-DD_bqi6q.js} +306 -428
  42. package/dist/Menu-XypIRgTl.cjs +7 -0
  43. package/dist/{MenuItem-Cu3FTLl8.js → MenuItem-Byj-2QQd.js} +72 -77
  44. package/dist/MenuItem-vb36Ljmd.cjs +1 -0
  45. package/dist/{Modal-u82Ss4h_.cjs → Modal-BG3hPYyH.cjs} +1 -1
  46. package/dist/{Modal-DTJd7JJ6.js → Modal-S2P14Nsp.js} +8 -8
  47. package/dist/{Paper-BiZq6EF2.js → Paper-BrsaeLlu.js} +4 -4
  48. package/dist/{Popper-DjwR55WH.js → Popper-BNftxeQ5.js} +31 -30
  49. package/dist/Popper-BaxEpkdE.cjs +4 -0
  50. package/dist/{Portal-BByeByPq.js → Portal-BLEnzj1v.js} +2 -2
  51. package/dist/Portal-Bw9XOIah.cjs +1 -0
  52. package/dist/{Radio-DSRS-tjj.js → Radio-CRTKwNe5.js} +9 -9
  53. package/dist/{RadioGroup-cPdOWdYD.js → RadioGroup-NjI5PlIb.js} +3 -3
  54. package/dist/{Select-DZAzJA0y.cjs → Select-8kBUq_SZ.cjs} +1 -1
  55. package/dist/{Select-CZnKFG3o.js → Select-C0jrZLRg.js} +30 -30
  56. package/dist/{Stack-hbAJHQhq.js → Stack-Bm7M81n8.js} +22 -22
  57. package/dist/{Switch-B9uT9-d0.js → Switch-D5FnE7HW.js} +6 -6
  58. package/dist/{SwitchBase-CDkmnGAP.js → SwitchBase-91Mand9t.js} +5 -5
  59. package/dist/{Tabs-BYfDlOR9.js → Tabs-C5VIdTSp.js} +25 -24
  60. package/dist/Tabs-Csp29aqN.cjs +4 -0
  61. package/dist/{TextField-CwcPgdgD.cjs → TextField-BzqflYRV.cjs} +1 -1
  62. package/dist/{TextField-BKfXjPdH.js → TextField-D5jS5WjF.js} +8 -8
  63. package/dist/ToggleButtonGroup-Bpi3kmko.cjs +140 -0
  64. package/dist/{ToggleButtonGroup-B1yghh29.js → ToggleButtonGroup-CipWZLXf.js} +2641 -3875
  65. package/dist/Tooltip-DJmbLjU6.cjs +4 -0
  66. package/dist/{Tooltip-B1NGvrJP.js → Tooltip-DgTrUaHJ.js} +10 -10
  67. package/dist/{Typography-SIQ6eleU.js → Typography-Ct2Sc9KM.js} +5 -5
  68. package/dist/{capitalize-3KLkrEtk.js → capitalize-BJ0FEsU7.js} +1 -1
  69. package/dist/components/Alert/Alert.es.js +1 -1
  70. package/dist/components/Alert/index.es.js +1 -1
  71. package/dist/components/Button/Button.es.js +2 -2
  72. package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
  73. package/dist/components/DatePicker/DatePicker.es.js +1 -1
  74. package/dist/components/DatePicker/index.cjs.js +1 -1
  75. package/dist/components/DatePicker/index.es.js +1 -1
  76. package/dist/components/Dialog/Dialog.cjs.js +1 -1
  77. package/dist/components/Dialog/Dialog.es.js +2 -2
  78. package/dist/components/Dropzone/Dropzone.es.js +4 -4
  79. package/dist/components/EmptyState/EmptyState.es.js +3 -3
  80. package/dist/components/FileList/FileIcon.es.js +1 -1
  81. package/dist/components/FileList/FileListItem.es.js +4 -4
  82. package/dist/components/Heading/Heading.es.js +2 -2
  83. package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -1
  84. package/dist/components/ImagePicker/ImagePicker.es.js +45 -46
  85. package/dist/components/Loader/Loader.es.js +1 -1
  86. package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
  87. package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +2 -2
  88. package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
  89. package/dist/components/PasswordInput/PasswordInput.es.js +4 -4
  90. package/dist/components/ResourceCard/ResourceCard.cjs.js +1 -1
  91. package/dist/components/ResourceCard/ResourceCard.es.js +18 -16
  92. package/dist/components/SearchInput/SearchInput.es.js +4 -4
  93. package/dist/components/TreeView/TreeView.cjs.js +7 -0
  94. package/dist/components/TreeView/TreeView.d.ts +4 -0
  95. package/dist/components/TreeView/TreeView.es.js +1892 -0
  96. package/dist/components/TreeView/components/CustomTreeItem.cjs.js +1 -0
  97. package/dist/components/TreeView/components/CustomTreeItem.d.ts +6 -0
  98. package/dist/components/TreeView/components/CustomTreeItem.es.js +8 -0
  99. package/dist/components/TreeView/index.cjs.js +1 -0
  100. package/dist/components/TreeView/index.d.ts +2 -0
  101. package/dist/components/TreeView/index.es.js +6 -0
  102. package/dist/components/TreeView/style.cjs.js +1 -0
  103. package/dist/components/TreeView/style.d.ts +12 -0
  104. package/dist/components/TreeView/style.es.js +24 -0
  105. package/dist/components/TreeView/types.cjs.js +1 -0
  106. package/dist/components/TreeView/types.d.ts +37 -0
  107. package/dist/components/TreeView/types.es.js +4 -0
  108. package/dist/components/TreeView/utils.cjs.js +1 -0
  109. package/dist/components/TreeView/utils.d.ts +6 -0
  110. package/dist/components/TreeView/utils.es.js +51 -0
  111. package/dist/components/index.cjs.js +1 -1
  112. package/dist/components/index.d.ts +0 -1
  113. package/dist/components/index.es.js +302 -299
  114. package/dist/components/stories/Alert.stories.es.js +1 -1
  115. package/dist/components/stories/Button.stories.es.js +1 -1
  116. package/dist/components/stories/Card.stories.es.js +2 -2
  117. package/dist/components/stories/Checkbox.stories.es.js +1 -1
  118. package/dist/components/stories/Chip.stories.es.js +1 -1
  119. package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
  120. package/dist/components/stories/DatePicker.stories.es.js +1 -1
  121. package/dist/components/stories/Dialog.stories.cjs.js +1 -1
  122. package/dist/components/stories/Dialog.stories.es.js +2 -2
  123. package/dist/components/stories/Divider.stories.es.js +1 -1
  124. package/dist/components/stories/FormControlLabel.stories.es.js +3 -3
  125. package/dist/components/stories/Heading.stories.es.js +2 -2
  126. package/dist/components/stories/IconButton.stories.es.js +2 -2
  127. package/dist/components/stories/Link.stories.es.js +1 -1
  128. package/dist/components/stories/Menu.stories.cjs.js +1 -1
  129. package/dist/components/stories/Menu.stories.es.js +2 -2
  130. package/dist/components/stories/Paper.stories.es.js +1 -1
  131. package/dist/components/stories/RadioGroup.stories.cjs.js +1 -1
  132. package/dist/components/stories/RadioGroup.stories.es.js +3 -3
  133. package/dist/components/stories/ResourceCard.stories.es.js +1 -1
  134. package/dist/components/stories/Select.stories.cjs.js +1 -1
  135. package/dist/components/stories/Select.stories.es.js +3 -3
  136. package/dist/components/stories/TabList.stories.cjs.js +1 -1
  137. package/dist/components/stories/TabList.stories.es.js +4 -4
  138. package/dist/components/stories/TextField.stories.cjs.js +1 -1
  139. package/dist/components/stories/TextField.stories.es.js +1 -1
  140. package/dist/components/stories/Tooltip.stories.cjs.js +1 -1
  141. package/dist/components/stories/Tooltip.stories.es.js +2 -2
  142. package/dist/components/stories/TreeView.stories.cjs.js +63 -0
  143. package/dist/components/stories/TreeView.stories.d.ts +12 -0
  144. package/dist/components/stories/TreeView.stories.es.js +663 -0
  145. package/dist/components/stories/Typography.stories.es.js +1 -1
  146. package/dist/{createSvgIcon-K2ZAdASa.js → createSvgIcon-B62eln-G.js} +6 -6
  147. package/dist/{dividerClasses-afsB3Yy1.js → dividerClasses-DjJZQ2Lt.js} +1 -1
  148. package/dist/{elementTypeAcceptingRef-5ESWTE79.js → elementTypeAcceptingRef-B04tk6ag.js} +1 -1
  149. package/dist/{extendSxProp-dlShX1xL.js → extendSxProp-CgS-3O19.js} +1 -1
  150. package/dist/{generateUtilityClasses-DotvgSDH.js → generateUtilityClasses-EXBFO7eY.js} +9 -9
  151. package/dist/getReactElementRef-CTRMtaOQ.cjs +1 -0
  152. package/dist/getReactElementRef-DjLvttrJ.js +31 -0
  153. package/dist/{index-DTTmpNYg.js → index-BZ7ldAwE.js} +4 -4
  154. package/dist/index-Cr54V0sz.cjs +1 -0
  155. package/dist/index-D_xl88AE.js +22 -0
  156. package/dist/{index-B1u7G33_.js → index-DcwdJ8a_.js} +1 -1
  157. package/dist/index.cjs.js +1 -1
  158. package/dist/index.es.js +302 -299
  159. package/dist/isMuiElement-BzDAj3yJ.cjs +1 -0
  160. package/dist/isMuiElement-DnSE4qG4.js +13 -0
  161. package/dist/listItemTextClasses-BCuJjsDp.cjs +1 -0
  162. package/dist/listItemTextClasses-Kxu3VILo.js +9 -0
  163. package/dist/{memoTheme-CqmIydD-.js → memoTheme-DJWQ754x.js} +1 -1
  164. package/dist/{refType-C210ipRY.js → refType-Bpj8bod6.js} +1 -1
  165. package/dist/{resolveComponentProps-CPmhKPdH.js → resolveComponentProps-CIdMNno4.js} +1 -1
  166. package/dist/{useSlot-GZu0V5wJ.js → useSlot-RbAtahZu.js} +1 -1
  167. package/dist/useSlotProps-BTRhbYwP.cjs +1 -0
  168. package/dist/useSlotProps-U2Iu6E0j.js +25 -0
  169. package/dist/{useTheme-tdgDVH1p.js → useTheme-CUKf8NYA.js} +1 -1
  170. package/dist/useTheme-Czi7oO55.js +11 -0
  171. package/dist/{useThemeProps-BQlPXzo3.js → useThemeProps-Bxjrhw9q.js} +2 -2
  172. package/dist/useThemeProps-v-SfXuGn.js +17 -0
  173. package/dist/{utils-CXhh35wP.js → utils-B2jSugkj.js} +76 -104
  174. package/dist/utils-lBmb5bp_.cjs +1 -0
  175. package/dist/warning-C8W811fV.js +11 -0
  176. package/dist/warning-DMUNDgRg.cjs +2 -0
  177. package/package.json +2 -1
  178. package/dist/Backdrop-DWp3AktL.cjs +0 -1
  179. package/dist/DatePicker-DrLKgvkx.cjs +0 -14
  180. package/dist/FormLabel-BV7-a0i5.cjs +0 -2
  181. package/dist/Grow-Z3KzFaK5.cjs +0 -1
  182. package/dist/Menu-Cngt8Va9.cjs +0 -7
  183. package/dist/MenuItem-Bha8aBMr.cjs +0 -1
  184. package/dist/MoreVert-CrM_1EkN.js +0 -8
  185. package/dist/MoreVert-CxgmXooO.cjs +0 -1
  186. package/dist/Popper-BVYscbsI.cjs +0 -4
  187. package/dist/Portal-DUHpWdY1.cjs +0 -1
  188. package/dist/Tabs-AyJ_tKtV.cjs +0 -4
  189. package/dist/ToggleButtonGroup-NqurNgWT.cjs +0 -140
  190. package/dist/Tooltip-oNmnF7Bc.cjs +0 -4
  191. package/dist/components/FolderCard/FolderCard.cjs.js +0 -1
  192. package/dist/components/FolderCard/FolderCard.d.ts +0 -10
  193. package/dist/components/FolderCard/FolderCard.es.js +0 -80
  194. package/dist/components/FolderCard/index.cjs.js +0 -1
  195. package/dist/components/FolderCard/index.d.ts +0 -2
  196. package/dist/components/FolderCard/index.es.js +0 -4
  197. package/dist/components/FolderCard/styles.cjs.js +0 -1
  198. package/dist/components/FolderCard/styles.d.ts +0 -10
  199. package/dist/components/FolderCard/styles.es.js +0 -13
  200. package/dist/components/FolderCard/types.cjs.js +0 -1
  201. package/dist/components/FolderCard/types.d.ts +0 -11
  202. package/dist/components/FolderCard/types.es.js +0 -14
  203. package/dist/components/stories/FolderCard.stories.cjs.js +0 -1
  204. package/dist/components/stories/FolderCard.stories.d.ts +0 -7
  205. package/dist/components/stories/FolderCard.stories.es.js +0 -71
  206. package/dist/useSlotProps-C9tsxDNg.js +0 -45
  207. package/dist/useSlotProps-CvOxvhyy.cjs +0 -1
  208. package/dist/useTheme-BA7tMglY.js +0 -11
  209. package/dist/useThemeProps-BTfGtNci.js +0 -17
  210. package/dist/utils-CFI_-FMV.cjs +0 -1
@@ -0,0 +1,1892 @@
1
+ import { jsx as S, jsxs as je } from "react/jsx-runtime";
2
+ import { B as yt } from "../../Box-GMNejc_m.js";
3
+ import * as E from "react";
4
+ import { useState as Ct, useMemo as wt, useEffect as Rt } from "react";
5
+ import { c as St, T as Pt, g as _e, a as $e, b as Ne, d as se, f as vt, e as kt, h as Mt, i as he, j as ge, k as Dt, l as oe, u as H, m as Ke, n as Ot, o as Vt, p as Ue, q as At, r as Ft, s as Lt, t as jt, v as O, C as _t } from "../../CustomTreeItem-PTf-e74x.js";
6
+ import { treeContainerStyle as $t, DEFAULT_CHILDREN_INDENT as Nt } from "./style.es.js";
7
+ import { buildItemDataMap as Kt, findItemPath as Ut, getItemId as Bt } from "./utils.es.js";
8
+ import { _ as C } from "../../ButtonBase-CU1npQuI.js";
9
+ import { H as zt, G as qt, I as Be, P as a, n as ne } from "../../generateUtilityClasses-EXBFO7eY.js";
10
+ import { a as A } from "../../TransitionGroupContext-DbLioz_6.js";
11
+ import { u as U } from "../../useEventCallback-BAQJJ3ye.js";
12
+ import { o as Ht } from "../../ownerDocument-CUrv0DIK.js";
13
+ import { u as Xt } from "../../index-D_xl88AE.js";
14
+ import { C as Wt } from "../../Checkbox-CtRSDqOe.js";
15
+ import { w as xe } from "../../warning-C8W811fV.js";
16
+ import { u as Ee } from "../../useForkRef-C_4o__cU.js";
17
+ import { u as N } from "../../useSlotProps-U2Iu6E0j.js";
18
+ import { r as $, e as Fe } from "../../resolveComponentProps-CIdMNno4.js";
19
+ import { s as ie, c as ze, f as qe } from "../../DefaultPropsProvider-CQixa6JQ.js";
20
+ import { C as Gt } from "../../Collapse-CcMCOZ3q.js";
21
+ import { u as Jt } from "../../unsupportedProp-BuVD30Gh.js";
22
+ import { e as Yt } from "../../elementTypeAcceptingRef-B04tk6ag.js";
23
+ function Qt(e) {
24
+ return zt("MuiRichTreeView", e);
25
+ }
26
+ qt("MuiRichTreeView", ["root"]);
27
+ const Zt = (e, t) => {
28
+ const n = E.useRef({}), [r, l] = E.useState(() => {
29
+ const g = {};
30
+ return e.forEach((p) => {
31
+ p.models && Object.entries(p.models).forEach(([m, d]) => {
32
+ n.current[m] = {
33
+ isControlled: t[m] !== void 0,
34
+ getDefaultValue: d.getDefaultValue
35
+ }, g[m] = d.getDefaultValue(t);
36
+ });
37
+ }), g;
38
+ }), h = Object.fromEntries(Object.entries(n.current).map(([g, p]) => {
39
+ const m = t[g] ?? r[g];
40
+ return [g, {
41
+ value: m,
42
+ setControlledValue: (d) => {
43
+ p.isControlled || l((o) => C({}, o, {
44
+ [g]: d
45
+ }));
46
+ }
47
+ }];
48
+ }));
49
+ return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([g, p]) => {
50
+ const m = t[g], d = p.getDefaultValue(t);
51
+ E.useEffect(() => {
52
+ p.isControlled !== (m !== void 0) && console.error([`MUI X: A component is changing the ${p.isControlled ? "" : "un"}controlled ${g} state of TreeView to be ${p.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${g} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
53
+ `));
54
+ }, [m]);
55
+ const {
56
+ current: o
57
+ } = E.useRef(d);
58
+ E.useEffect(() => {
59
+ !p.isControlled && o !== d && console.error([`MUI X: A component is changing the default ${g} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
60
+ `));
61
+ }, [JSON.stringify(d)]);
62
+ }), h;
63
+ };
64
+ class en {
65
+ constructor() {
66
+ this.maxListeners = 20, this.warnOnce = !1, this.events = {};
67
+ }
68
+ on(t, n, r = {}) {
69
+ let l = this.events[t];
70
+ if (l || (l = {
71
+ highPriority: /* @__PURE__ */ new Map(),
72
+ regular: /* @__PURE__ */ new Map()
73
+ }, this.events[t] = l), r.isFirst ? l.highPriority.set(n, !0) : l.regular.set(n, !0), process.env.NODE_ENV !== "production") {
74
+ const h = l.highPriority.size + l.regular.size;
75
+ h > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${h} ${t} listeners added.`].join(`
76
+ `)));
77
+ }
78
+ }
79
+ removeListener(t, n) {
80
+ this.events[t] && (this.events[t].regular.delete(n), this.events[t].highPriority.delete(n));
81
+ }
82
+ removeAllListeners() {
83
+ this.events = {};
84
+ }
85
+ emit(t, ...n) {
86
+ const r = this.events[t];
87
+ if (!r)
88
+ return;
89
+ const l = Array.from(r.highPriority.keys()), h = Array.from(r.regular.keys());
90
+ for (let g = l.length - 1; g >= 0; g -= 1) {
91
+ const p = l[g];
92
+ r.highPriority.has(p) && p.apply(this, n);
93
+ }
94
+ for (let g = 0; g < h.length; g += 1) {
95
+ const p = h[g];
96
+ r.regular.has(p) && p.apply(this, n);
97
+ }
98
+ }
99
+ once(t, n) {
100
+ const r = this;
101
+ this.on(t, function l(...h) {
102
+ r.removeListener(t, l), n.apply(r, h);
103
+ });
104
+ }
105
+ }
106
+ const tn = (e) => e.isPropagationStopped !== void 0, He = () => {
107
+ const [e] = E.useState(() => new en()), t = E.useCallback((...r) => {
108
+ const [l, h, g = {}] = r;
109
+ g.defaultMuiPrevented = !1, !(tn(g) && g.isPropagationStopped()) && e.emit(l, h, g);
110
+ }, [e]), n = E.useCallback((r, l) => (e.on(r, l), () => {
111
+ e.removeListener(r, l);
112
+ }), [e]);
113
+ return {
114
+ instance: {
115
+ $$publishEvent: t,
116
+ $$subscribeEvent: n
117
+ }
118
+ };
119
+ };
120
+ He.params = {};
121
+ const Xe = ({
122
+ plugins: e
123
+ }) => {
124
+ const t = new Set(e);
125
+ return {
126
+ instance: {
127
+ getAvailablePlugins: () => t
128
+ }
129
+ };
130
+ };
131
+ Xe.params = {};
132
+ const Te = ({
133
+ params: e,
134
+ state: t,
135
+ setState: n
136
+ }) => {
137
+ E.useEffect(() => {
138
+ n((l) => l.id.treeId === e.id && l.id.treeId !== void 0 ? l : C({}, l, {
139
+ id: C({}, l.id, {
140
+ treeId: e.id ?? St()
141
+ })
142
+ }));
143
+ }, [n, e.id]);
144
+ const r = e.id ?? t.id.treeId;
145
+ return {
146
+ getRootProps: () => ({
147
+ id: r
148
+ }),
149
+ contextValue: {
150
+ treeId: r
151
+ }
152
+ };
153
+ };
154
+ Te.params = {
155
+ id: !0
156
+ };
157
+ Te.getInitialState = ({
158
+ id: e
159
+ }) => ({
160
+ id: {
161
+ treeId: e ?? void 0
162
+ }
163
+ });
164
+ const nn = [He, Xe, Te], on = ["slots", "slotProps", "apiRef", "experimentalFeatures"], rn = (e) => {
165
+ let {
166
+ props: {
167
+ slots: t,
168
+ slotProps: n,
169
+ apiRef: r,
170
+ experimentalFeatures: l
171
+ },
172
+ plugins: h
173
+ } = e, g = A(e.props, on);
174
+ const p = {};
175
+ h.forEach((f) => {
176
+ Object.assign(p, f.params);
177
+ });
178
+ const m = {}, d = {};
179
+ Object.keys(g).forEach((f) => {
180
+ const b = g[f];
181
+ p[f] ? m[f] = b : d[f] = b;
182
+ });
183
+ const o = l ?? {}, s = h.reduce((f, b) => b.getDefaultizedParams ? b.getDefaultizedParams({
184
+ params: f,
185
+ experimentalFeatures: o
186
+ }) : f, m);
187
+ return {
188
+ apiRef: r,
189
+ forwardedProps: d,
190
+ pluginParams: s,
191
+ slots: t ?? {},
192
+ slotProps: n ?? {},
193
+ experimentalFeatures: o
194
+ };
195
+ }, sn = ({
196
+ plugins: e,
197
+ instance: t,
198
+ publicAPI: n,
199
+ rootRef: r
200
+ }) => ({
201
+ runItemPlugins: (p) => {
202
+ let m = null, d = null;
203
+ const o = [], s = {};
204
+ e.forEach((x) => {
205
+ if (!x.itemPlugin)
206
+ return;
207
+ const c = x.itemPlugin({
208
+ props: p,
209
+ rootRef: m,
210
+ contentRef: d
211
+ });
212
+ c != null && c.rootRef && (m = c.rootRef), c != null && c.contentRef && (d = c.contentRef), c != null && c.propsEnhancers && (o.push(c.propsEnhancers), Object.keys(c.propsEnhancers).forEach((i) => {
213
+ s[i] = !0;
214
+ }));
215
+ });
216
+ const f = (x) => (c) => {
217
+ const i = {};
218
+ return o.forEach((u) => {
219
+ const I = u[x];
220
+ I != null && Object.assign(i, I(c));
221
+ }), i;
222
+ }, b = Object.fromEntries(Object.keys(s).map((x) => [x, f(x)]));
223
+ return {
224
+ contentRef: d,
225
+ rootRef: m,
226
+ propsEnhancers: b
227
+ };
228
+ },
229
+ wrapItem: ({
230
+ itemId: p,
231
+ children: m
232
+ }) => {
233
+ let d = m;
234
+ for (let o = e.length - 1; o >= 0; o -= 1) {
235
+ const s = e[o];
236
+ s.wrapItem && (d = s.wrapItem({
237
+ itemId: p,
238
+ children: d,
239
+ instance: t
240
+ }));
241
+ }
242
+ return d;
243
+ },
244
+ wrapRoot: ({
245
+ children: p
246
+ }) => {
247
+ let m = p;
248
+ for (let d = e.length - 1; d >= 0; d -= 1) {
249
+ const o = e[d];
250
+ o.wrapRoot && (m = o.wrapRoot({
251
+ children: m,
252
+ instance: t
253
+ }));
254
+ }
255
+ return m;
256
+ },
257
+ instance: t,
258
+ rootRef: r,
259
+ publicAPI: n
260
+ });
261
+ function ln(e) {
262
+ const t = E.useRef({});
263
+ return e ? (e.current == null && (e.current = {}), e.current) : t.current;
264
+ }
265
+ const an = ({
266
+ plugins: e,
267
+ rootRef: t,
268
+ props: n
269
+ }) => {
270
+ const r = [...nn, ...e], {
271
+ pluginParams: l,
272
+ forwardedProps: h,
273
+ apiRef: g,
274
+ experimentalFeatures: p,
275
+ slots: m,
276
+ slotProps: d
277
+ } = rn({
278
+ plugins: r,
279
+ props: n
280
+ }), o = Zt(r, l), f = E.useRef({}).current, b = ln(g), x = E.useRef(null), c = Ee(x, t), i = sn({
281
+ plugins: r,
282
+ instance: f,
283
+ publicAPI: b,
284
+ rootRef: x
285
+ }), [u, I] = E.useState(() => {
286
+ const R = {};
287
+ return r.forEach((v) => {
288
+ v.getInitialState && Object.assign(R, v.getInitialState(l));
289
+ }), R;
290
+ }), T = [], P = (R) => {
291
+ const v = R({
292
+ instance: f,
293
+ params: l,
294
+ slots: m,
295
+ slotProps: d,
296
+ experimentalFeatures: p,
297
+ state: u,
298
+ setState: I,
299
+ rootRef: x,
300
+ models: o,
301
+ plugins: r
302
+ });
303
+ v.getRootProps && T.push(v.getRootProps), v.publicAPI && Object.assign(b, v.publicAPI), v.instance && Object.assign(f, v.instance), v.contextValue && Object.assign(i, v.contextValue);
304
+ };
305
+ return r.forEach(P), {
306
+ getRootProps: (R = {}) => {
307
+ const v = C({
308
+ role: "tree"
309
+ }, h, R, {
310
+ ref: c
311
+ });
312
+ return T.forEach((F) => {
313
+ Object.assign(v, F(R));
314
+ }), v;
315
+ },
316
+ rootRef: c,
317
+ contextValue: i,
318
+ instance: f
319
+ };
320
+ };
321
+ function cn(e) {
322
+ const {
323
+ value: t,
324
+ children: n
325
+ } = e;
326
+ return /* @__PURE__ */ S(Pt.Provider, {
327
+ value: t,
328
+ children: t.wrapRoot({
329
+ children: n,
330
+ instance: t.instance
331
+ })
332
+ });
333
+ }
334
+ const un = (e, t, n) => {
335
+ e.$$publishEvent(t, n);
336
+ }, K = "__TREE_VIEW_ROOT_PARENT_ID__", dn = (e) => {
337
+ const t = {};
338
+ return e.forEach((n, r) => {
339
+ t[n] = r;
340
+ }), t;
341
+ }, fn = ["children"], We = ({
342
+ items: e,
343
+ isItemDisabled: t,
344
+ getItemLabel: n,
345
+ getItemId: r
346
+ }) => {
347
+ const l = {}, h = {}, g = {
348
+ [K]: []
349
+ }, p = (d, o, s) => {
350
+ var c, i;
351
+ const f = r ? r(d) : d.id;
352
+ if (f == null)
353
+ throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(d)].join(`
354
+ `));
355
+ if (l[f] != null)
356
+ throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${f}"`].join(`
357
+ `));
358
+ const b = n ? n(d) : d.label;
359
+ if (b == null)
360
+ throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(d)].join(`
361
+ `));
362
+ l[f] = {
363
+ id: f,
364
+ label: b,
365
+ parentId: s,
366
+ idAttribute: void 0,
367
+ expandable: !!((c = d.children) != null && c.length),
368
+ disabled: t ? t(d) : !1,
369
+ depth: o
370
+ }, h[f] = d;
371
+ const x = s ?? K;
372
+ g[x] || (g[x] = []), g[x].push(f), (i = d.children) == null || i.forEach((u) => p(u, o + 1, f));
373
+ };
374
+ e.forEach((d) => p(d, 0, null));
375
+ const m = {};
376
+ return Object.keys(g).forEach((d) => {
377
+ m[d] = dn(g[d]);
378
+ }), {
379
+ itemMetaMap: l,
380
+ itemMap: h,
381
+ itemOrderedChildrenIds: g,
382
+ itemChildrenIndexes: m
383
+ };
384
+ }, X = ({
385
+ instance: e,
386
+ params: t,
387
+ state: n,
388
+ setState: r,
389
+ experimentalFeatures: l
390
+ }) => {
391
+ const h = E.useCallback((u) => n.items.itemMetaMap[u], [n.items.itemMetaMap]), g = E.useCallback((u) => n.items.itemMap[u], [n.items.itemMap]), p = E.useCallback(() => {
392
+ const u = (I) => {
393
+ const T = n.items.itemMap[I], P = A(T, fn), y = n.items.itemOrderedChildrenIds[I];
394
+ return y && (P.children = y.map(u)), P;
395
+ };
396
+ return n.items.itemOrderedChildrenIds[K].map(u);
397
+ }, [n.items.itemMap, n.items.itemOrderedChildrenIds]), m = E.useCallback((u) => {
398
+ if (u == null)
399
+ return !1;
400
+ let I = e.getItemMeta(u);
401
+ if (!I)
402
+ return !1;
403
+ if (I.disabled)
404
+ return !0;
405
+ for (; I.parentId != null; )
406
+ if (I = e.getItemMeta(I.parentId), I.disabled)
407
+ return !0;
408
+ return !1;
409
+ }, [e]), d = E.useCallback((u) => {
410
+ const I = e.getItemMeta(u).parentId ?? K;
411
+ return n.items.itemChildrenIndexes[I][u];
412
+ }, [e, n.items.itemChildrenIndexes]), o = E.useCallback((u) => n.items.itemOrderedChildrenIds[u ?? K] ?? [], [n.items.itemOrderedChildrenIds]), s = (u) => {
413
+ const I = e.getItemMeta(u);
414
+ return I == null ? null : document.getElementById(_e({
415
+ treeId: n.id.treeId,
416
+ itemId: u,
417
+ id: I.idAttribute
418
+ }));
419
+ }, f = (u) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(u), b = E.useRef(!1), x = E.useCallback(() => {
420
+ b.current = !0;
421
+ }, []), c = E.useCallback(() => b.current, []);
422
+ return E.useEffect(() => {
423
+ e.areItemUpdatesPrevented() || r((u) => {
424
+ const I = We({
425
+ items: t.items,
426
+ isItemDisabled: t.isItemDisabled,
427
+ getItemId: t.getItemId,
428
+ getItemLabel: t.getItemLabel
429
+ });
430
+ return Object.values(u.items.itemMetaMap).forEach((T) => {
431
+ I.itemMetaMap[T.id] || un(e, "removeItem", {
432
+ id: T.id
433
+ });
434
+ }), C({}, u, {
435
+ items: I
436
+ });
437
+ });
438
+ }, [e, r, t.items, t.isItemDisabled, t.getItemId, t.getItemLabel]), {
439
+ getRootProps: () => ({
440
+ style: {
441
+ "--TreeView-itemChildrenIndentation": typeof t.itemChildrenIndentation == "number" ? `${t.itemChildrenIndentation}px` : t.itemChildrenIndentation
442
+ }
443
+ }),
444
+ publicAPI: {
445
+ getItem: g,
446
+ getItemDOMElement: s,
447
+ getItemTree: p,
448
+ getItemOrderedChildrenIds: o
449
+ },
450
+ instance: {
451
+ getItemMeta: h,
452
+ getItem: g,
453
+ getItemTree: p,
454
+ getItemsToRender: () => {
455
+ const u = (I) => {
456
+ var P;
457
+ const T = n.items.itemMetaMap[I];
458
+ return {
459
+ label: T.label,
460
+ itemId: T.id,
461
+ id: T.idAttribute,
462
+ children: (P = n.items.itemOrderedChildrenIds[I]) == null ? void 0 : P.map(u)
463
+ };
464
+ };
465
+ return n.items.itemOrderedChildrenIds[K].map(u);
466
+ },
467
+ getItemIndex: d,
468
+ getItemDOMElement: s,
469
+ getItemOrderedChildrenIds: o,
470
+ isItemDisabled: m,
471
+ isItemNavigable: f,
472
+ preventItemUpdates: x,
473
+ areItemUpdatesPrevented: c
474
+ },
475
+ contextValue: {
476
+ items: {
477
+ onItemClick: t.onItemClick,
478
+ disabledItemsFocusable: t.disabledItemsFocusable,
479
+ indentationAtItemLevel: l.indentationAtItemLevel ?? !1
480
+ }
481
+ }
482
+ };
483
+ };
484
+ X.getInitialState = (e) => ({
485
+ items: We({
486
+ items: e.items,
487
+ isItemDisabled: e.isItemDisabled,
488
+ getItemId: e.getItemId,
489
+ getItemLabel: e.getItemLabel
490
+ })
491
+ });
492
+ X.getDefaultizedParams = ({
493
+ params: e
494
+ }) => C({}, e, {
495
+ disabledItemsFocusable: e.disabledItemsFocusable ?? !1,
496
+ itemChildrenIndentation: e.itemChildrenIndentation ?? "12px"
497
+ });
498
+ X.wrapRoot = ({
499
+ children: e,
500
+ instance: t
501
+ }) => /* @__PURE__ */ S($e.Provider, {
502
+ value: (n) => {
503
+ var r;
504
+ return ((r = t.getItemMeta(n)) == null ? void 0 : r.depth) ?? 0;
505
+ },
506
+ children: e
507
+ });
508
+ X.params = {
509
+ disabledItemsFocusable: !0,
510
+ items: !0,
511
+ isItemDisabled: !0,
512
+ getItemLabel: !0,
513
+ getItemId: !0,
514
+ onItemClick: !0,
515
+ itemChildrenIndentation: !0
516
+ };
517
+ const le = ({
518
+ instance: e,
519
+ params: t,
520
+ models: n
521
+ }) => {
522
+ const r = E.useMemo(() => {
523
+ const s = /* @__PURE__ */ new Map();
524
+ return n.expandedItems.value.forEach((f) => {
525
+ s.set(f, !0);
526
+ }), s;
527
+ }, [n.expandedItems.value]), l = (s, f) => {
528
+ var b;
529
+ (b = t.onExpandedItemsChange) == null || b.call(t, s, f), n.expandedItems.setControlledValue(f);
530
+ }, h = E.useCallback((s) => r.has(s), [r]), g = E.useCallback((s) => {
531
+ var f;
532
+ return !!((f = e.getItemMeta(s)) != null && f.expandable);
533
+ }, [e]), p = U((s, f) => {
534
+ const b = e.isItemExpanded(f);
535
+ e.setItemExpansion(s, f, !b);
536
+ }), m = U((s, f, b) => {
537
+ if (e.isItemExpanded(f) === b)
538
+ return;
539
+ let c;
540
+ b ? c = [f].concat(n.expandedItems.value) : c = n.expandedItems.value.filter((i) => i !== f), t.onItemExpansionToggle && t.onItemExpansionToggle(s, f, b), l(s, c);
541
+ }), d = (s, f) => {
542
+ const b = e.getItemMeta(f), c = e.getItemOrderedChildrenIds(b.parentId).filter((u) => e.isItemExpandable(u) && !e.isItemExpanded(u)), i = n.expandedItems.value.concat(c);
543
+ c.length > 0 && (t.onItemExpansionToggle && c.forEach((u) => {
544
+ t.onItemExpansionToggle(s, u, !0);
545
+ }), l(s, i));
546
+ }, o = E.useMemo(() => t.expansionTrigger ? t.expansionTrigger : e.isTreeViewEditable ? "iconContainer" : "content", [t.expansionTrigger, e.isTreeViewEditable]);
547
+ return {
548
+ publicAPI: {
549
+ setItemExpansion: m
550
+ },
551
+ instance: {
552
+ isItemExpanded: h,
553
+ isItemExpandable: g,
554
+ setItemExpansion: m,
555
+ toggleItemExpansion: p,
556
+ expandAllSiblings: d
557
+ },
558
+ contextValue: {
559
+ expansion: {
560
+ expansionTrigger: o
561
+ }
562
+ }
563
+ };
564
+ };
565
+ le.models = {
566
+ expandedItems: {
567
+ getDefaultValue: (e) => e.defaultExpandedItems
568
+ }
569
+ };
570
+ const pn = [];
571
+ le.getDefaultizedParams = ({
572
+ params: e
573
+ }) => C({}, e, {
574
+ defaultExpandedItems: e.defaultExpandedItems ?? pn
575
+ });
576
+ le.params = {
577
+ expandedItems: !0,
578
+ defaultExpandedItems: !0,
579
+ onExpandedItemsChange: !0,
580
+ onItemExpansionToggle: !0,
581
+ expansionTrigger: !0
582
+ };
583
+ const re = (e) => Array.isArray(e) ? e : e != null ? [e] : [], be = (e) => {
584
+ const t = {};
585
+ return e.forEach((n) => {
586
+ t[n] = !0;
587
+ }), t;
588
+ }, ae = ({
589
+ instance: e,
590
+ params: t,
591
+ models: n
592
+ }) => {
593
+ const r = E.useRef(null), l = E.useRef({}), h = E.useMemo(() => {
594
+ const c = /* @__PURE__ */ new Map();
595
+ return Array.isArray(n.selectedItems.value) ? n.selectedItems.value.forEach((i) => {
596
+ c.set(i, !0);
597
+ }) : n.selectedItems.value != null && c.set(n.selectedItems.value, !0), c;
598
+ }, [n.selectedItems.value]), g = (c, i) => {
599
+ if (t.onItemSelectionToggle)
600
+ if (t.multiSelect) {
601
+ const u = i.filter((T) => !e.isItemSelected(T)), I = n.selectedItems.value.filter((T) => !i.includes(T));
602
+ u.forEach((T) => {
603
+ t.onItemSelectionToggle(c, T, !0);
604
+ }), I.forEach((T) => {
605
+ t.onItemSelectionToggle(c, T, !1);
606
+ });
607
+ } else i !== n.selectedItems.value && (n.selectedItems.value != null && t.onItemSelectionToggle(c, n.selectedItems.value, !1), i != null && t.onItemSelectionToggle(c, i, !0));
608
+ t.onSelectedItemsChange && t.onSelectedItemsChange(c, i), n.selectedItems.setControlledValue(i);
609
+ }, p = (c) => h.has(c), m = ({
610
+ event: c,
611
+ itemId: i,
612
+ keepExistingSelection: u = !1,
613
+ shouldBeSelected: I
614
+ }) => {
615
+ if (t.disableSelection)
616
+ return;
617
+ let T;
618
+ if (u) {
619
+ const P = re(n.selectedItems.value), y = e.isItemSelected(i);
620
+ y && (I === !1 || I == null) ? T = P.filter((R) => R !== i) : !y && (I === !0 || I == null) ? T = [i].concat(P) : T = P;
621
+ } else
622
+ I === !1 || I == null && e.isItemSelected(i) ? T = t.multiSelect ? [] : null : T = t.multiSelect ? [i] : i;
623
+ g(c, T), r.current = i, l.current = {};
624
+ }, d = (c, [i, u]) => {
625
+ if (t.disableSelection || !t.multiSelect)
626
+ return;
627
+ let I = re(n.selectedItems.value).slice();
628
+ Object.keys(l.current).length > 0 && (I = I.filter((R) => !l.current[R]));
629
+ const T = be(I), P = Mt(e, i, u), y = P.filter((R) => !T[R]);
630
+ I = I.concat(y), g(c, I), l.current = be(P);
631
+ };
632
+ return {
633
+ getRootProps: () => ({
634
+ "aria-multiselectable": t.multiSelect
635
+ }),
636
+ publicAPI: {
637
+ selectItem: m
638
+ },
639
+ instance: {
640
+ isItemSelected: p,
641
+ selectItem: m,
642
+ selectAllNavigableItems: (c) => {
643
+ if (t.disableSelection || !t.multiSelect)
644
+ return;
645
+ const i = kt(e);
646
+ g(c, i), l.current = be(i);
647
+ },
648
+ expandSelectionRange: (c, i) => {
649
+ if (r.current != null) {
650
+ const [u, I] = vt(e, i, r.current);
651
+ d(c, [u, I]);
652
+ }
653
+ },
654
+ selectRangeFromStartToItem: (c, i) => {
655
+ d(c, [se(e), i]);
656
+ },
657
+ selectRangeFromItemToEnd: (c, i) => {
658
+ d(c, [i, Ne(e)]);
659
+ },
660
+ selectItemFromArrowNavigation: (c, i, u) => {
661
+ if (t.disableSelection || !t.multiSelect)
662
+ return;
663
+ let I = re(n.selectedItems.value).slice();
664
+ Object.keys(l.current).length === 0 ? (I.push(u), l.current = {
665
+ [i]: !0,
666
+ [u]: !0
667
+ }) : (l.current[i] || (l.current = {}), l.current[u] ? (I = I.filter((T) => T !== i), delete l.current[i]) : (I.push(u), l.current[u] = !0)), g(c, I);
668
+ }
669
+ },
670
+ contextValue: {
671
+ selection: {
672
+ multiSelect: t.multiSelect,
673
+ checkboxSelection: t.checkboxSelection,
674
+ disableSelection: t.disableSelection
675
+ }
676
+ }
677
+ };
678
+ };
679
+ ae.models = {
680
+ selectedItems: {
681
+ getDefaultValue: (e) => e.defaultSelectedItems
682
+ }
683
+ };
684
+ const mn = [];
685
+ ae.getDefaultizedParams = ({
686
+ params: e
687
+ }) => C({}, e, {
688
+ disableSelection: e.disableSelection ?? !1,
689
+ multiSelect: e.multiSelect ?? !1,
690
+ checkboxSelection: e.checkboxSelection ?? !1,
691
+ defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ? mn : null)
692
+ });
693
+ ae.params = {
694
+ disableSelection: !0,
695
+ multiSelect: !0,
696
+ checkboxSelection: !0,
697
+ defaultSelectedItems: !0,
698
+ selectedItems: !0,
699
+ onSelectedItemsChange: !0,
700
+ onItemSelectionToggle: !0
701
+ };
702
+ const Le = 1e3;
703
+ class In {
704
+ constructor(t = Le) {
705
+ this.timeouts = /* @__PURE__ */ new Map(), this.cleanupTimeout = Le, this.cleanupTimeout = t;
706
+ }
707
+ register(t, n, r) {
708
+ this.timeouts || (this.timeouts = /* @__PURE__ */ new Map());
709
+ const l = setTimeout(() => {
710
+ typeof n == "function" && n(), this.timeouts.delete(r.cleanupToken);
711
+ }, this.cleanupTimeout);
712
+ this.timeouts.set(r.cleanupToken, l);
713
+ }
714
+ unregister(t) {
715
+ const n = this.timeouts.get(t.cleanupToken);
716
+ n && (this.timeouts.delete(t.cleanupToken), clearTimeout(n));
717
+ }
718
+ reset() {
719
+ this.timeouts && (this.timeouts.forEach((t, n) => {
720
+ this.unregister({
721
+ cleanupToken: n
722
+ });
723
+ }), this.timeouts = void 0);
724
+ }
725
+ }
726
+ class gn {
727
+ constructor() {
728
+ this.registry = new FinalizationRegistry((t) => {
729
+ typeof t == "function" && t();
730
+ });
731
+ }
732
+ register(t, n, r) {
733
+ this.registry.register(t, n, r);
734
+ }
735
+ unregister(t) {
736
+ this.registry.unregister(t);
737
+ }
738
+ // eslint-disable-next-line class-methods-use-this
739
+ reset() {
740
+ }
741
+ }
742
+ class bn {
743
+ }
744
+ function hn(e) {
745
+ let t = 0;
746
+ return function(r, l, h) {
747
+ e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new gn() : new In());
748
+ const [g] = E.useState(new bn()), p = E.useRef(null), m = E.useRef(void 0);
749
+ m.current = h;
750
+ const d = E.useRef(null);
751
+ if (!p.current && m.current) {
752
+ const o = (s, f) => {
753
+ var b;
754
+ f.defaultMuiPrevented || (b = m.current) == null || b.call(m, s, f);
755
+ };
756
+ p.current = r.$$subscribeEvent(l, o), t += 1, d.current = {
757
+ cleanupToken: t
758
+ }, e.registry.register(
759
+ g,
760
+ // The callback below will be called once this reference stops being retained
761
+ () => {
762
+ var s;
763
+ (s = p.current) == null || s.call(p), p.current = null, d.current = null;
764
+ },
765
+ d.current
766
+ );
767
+ } else !m.current && p.current && (p.current(), p.current = null, d.current && (e.registry.unregister(d.current), d.current = null));
768
+ E.useEffect(() => {
769
+ if (!p.current && m.current) {
770
+ const o = (s, f) => {
771
+ var b;
772
+ f.defaultMuiPrevented || (b = m.current) == null || b.call(m, s, f);
773
+ };
774
+ p.current = r.$$subscribeEvent(l, o);
775
+ }
776
+ return d.current && e.registry && (e.registry.unregister(d.current), d.current = null), () => {
777
+ var o;
778
+ (o = p.current) == null || o.call(p), p.current = null;
779
+ };
780
+ }, [r, l]);
781
+ };
782
+ }
783
+ const xn = {
784
+ registry: null
785
+ }, En = hn(xn), Ge = (e = document) => {
786
+ const t = e.activeElement;
787
+ return t ? t.shadowRoot ? Ge(t.shadowRoot) : t : null;
788
+ }, Tn = (e, t) => {
789
+ let n = re(t).find((r) => {
790
+ if (!e.isItemNavigable(r))
791
+ return !1;
792
+ const l = e.getItemMeta(r);
793
+ return l && (l.parentId == null || e.isItemExpanded(l.parentId));
794
+ });
795
+ return n == null && (n = se(e)), n;
796
+ }, ye = ({
797
+ instance: e,
798
+ params: t,
799
+ state: n,
800
+ setState: r,
801
+ models: l,
802
+ rootRef: h
803
+ }) => {
804
+ const g = Tn(e, l.selectedItems.value), p = U((i) => {
805
+ const u = typeof i == "function" ? i(n.focusedItemId) : i;
806
+ n.focusedItemId !== u && r((I) => C({}, I, {
807
+ focusedItemId: u
808
+ }));
809
+ }), m = E.useCallback(() => !!h.current && h.current.contains(Ge(Ht(h.current))), [h]), d = E.useCallback((i) => n.focusedItemId === i && m(), [n.focusedItemId, m]), o = (i) => {
810
+ const u = e.getItemMeta(i);
811
+ return u && (u.parentId == null || e.isItemExpanded(u.parentId));
812
+ }, s = (i, u) => {
813
+ const I = e.getItemDOMElement(u);
814
+ I && I.focus(), p(u), t.onItemFocus && t.onItemFocus(i, u);
815
+ }, f = U((i, u) => {
816
+ o(u) && s(i, u);
817
+ }), b = U(() => {
818
+ if (n.focusedItemId == null)
819
+ return;
820
+ if (e.getItemMeta(n.focusedItemId)) {
821
+ const u = e.getItemDOMElement(n.focusedItemId);
822
+ u && u.blur();
823
+ }
824
+ p(null);
825
+ }), x = (i) => i === g;
826
+ En(e, "removeItem", ({
827
+ id: i
828
+ }) => {
829
+ n.focusedItemId === i && s(null, g);
830
+ });
831
+ const c = (i) => (u) => {
832
+ var I;
833
+ (I = i.onFocus) == null || I.call(i, u), !u.defaultMuiPrevented && u.target === u.currentTarget && s(u, g);
834
+ };
835
+ return {
836
+ getRootProps: (i) => ({
837
+ onFocus: c(i)
838
+ }),
839
+ publicAPI: {
840
+ focusItem: f
841
+ },
842
+ instance: {
843
+ isItemFocused: d,
844
+ canItemBeTabbed: x,
845
+ focusItem: f,
846
+ removeFocusedItem: b
847
+ }
848
+ };
849
+ };
850
+ ye.getInitialState = () => ({
851
+ focusedItemId: null
852
+ });
853
+ ye.params = {
854
+ onItemFocus: !0
855
+ };
856
+ function yn(e) {
857
+ return !!e && e.length === 1 && !!e.match(/\S/);
858
+ }
859
+ const Je = ({
860
+ instance: e,
861
+ params: t,
862
+ state: n
863
+ }) => {
864
+ const r = Xt(), l = E.useRef({}), h = U((o) => {
865
+ l.current = o(l.current);
866
+ });
867
+ E.useEffect(() => {
868
+ if (e.areItemUpdatesPrevented())
869
+ return;
870
+ const o = {}, s = (f) => {
871
+ o[f.id] = f.label.substring(0, 1).toLowerCase();
872
+ };
873
+ Object.values(n.items.itemMetaMap).forEach(s), l.current = o;
874
+ }, [n.items.itemMetaMap, t.getItemId, e]);
875
+ const g = (o, s) => {
876
+ const f = s.toLowerCase(), b = (u) => {
877
+ const I = ge(e, u);
878
+ return I === null ? se(e) : I;
879
+ };
880
+ let x = null, c = b(o);
881
+ const i = {};
882
+ for (; x == null && !i[c]; )
883
+ l.current[c] === f ? x = c : (i[c] = !0, c = b(c));
884
+ return x;
885
+ }, p = (o) => !t.disableSelection && !e.isItemDisabled(o), m = (o) => !e.isItemDisabled(o) && e.isItemExpandable(o);
886
+ return {
887
+ instance: {
888
+ updateFirstCharMap: h,
889
+ handleItemKeyDown: (o, s) => {
890
+ if (o.defaultMuiPrevented || o.altKey || he(o.target, o.currentTarget))
891
+ return;
892
+ const f = o.ctrlKey || o.metaKey, b = o.key;
893
+ switch (!0) {
894
+ // Select the item when pressing "Space"
895
+ case (b === " " && p(s)): {
896
+ o.preventDefault(), t.multiSelect && o.shiftKey ? e.expandSelectionRange(o, s) : e.selectItem({
897
+ event: o,
898
+ itemId: s,
899
+ keepExistingSelection: t.multiSelect,
900
+ shouldBeSelected: t.multiSelect ? void 0 : !0
901
+ });
902
+ break;
903
+ }
904
+ // If the focused item has children, we expand it.
905
+ // If the focused item has no children, we select it.
906
+ case b === "Enter": {
907
+ oe(e, H) && e.isItemEditable(s) && !e.isItemBeingEdited(s) ? e.setEditedItemId(s) : m(s) ? (e.toggleItemExpansion(o, s), o.preventDefault()) : p(s) && (t.multiSelect ? (o.preventDefault(), e.selectItem({
908
+ event: o,
909
+ itemId: s,
910
+ keepExistingSelection: !0
911
+ })) : e.isItemSelected(s) || (e.selectItem({
912
+ event: o,
913
+ itemId: s
914
+ }), o.preventDefault()));
915
+ break;
916
+ }
917
+ // Focus the next focusable item
918
+ case b === "ArrowDown": {
919
+ const x = ge(e, s);
920
+ x && (o.preventDefault(), e.focusItem(o, x), t.multiSelect && o.shiftKey && p(x) && e.selectItemFromArrowNavigation(o, s, x));
921
+ break;
922
+ }
923
+ // Focuses the previous focusable item
924
+ case b === "ArrowUp": {
925
+ const x = Dt(e, s);
926
+ x && (o.preventDefault(), e.focusItem(o, x), t.multiSelect && o.shiftKey && p(x) && e.selectItemFromArrowNavigation(o, s, x));
927
+ break;
928
+ }
929
+ // If the focused item is expanded, we move the focus to its first child
930
+ // If the focused item is collapsed and has children, we expand it
931
+ case (b === "ArrowRight" && !r || b === "ArrowLeft" && r): {
932
+ if (f)
933
+ return;
934
+ if (e.isItemExpanded(s)) {
935
+ const x = ge(e, s);
936
+ x && (e.focusItem(o, x), o.preventDefault());
937
+ } else m(s) && (e.toggleItemExpansion(o, s), o.preventDefault());
938
+ break;
939
+ }
940
+ // If the focused item is expanded, we collapse it
941
+ // If the focused item is collapsed and has a parent, we move the focus to this parent
942
+ case (b === "ArrowLeft" && !r || b === "ArrowRight" && r): {
943
+ if (f)
944
+ return;
945
+ if (m(s) && e.isItemExpanded(s))
946
+ e.toggleItemExpansion(o, s), o.preventDefault();
947
+ else {
948
+ const x = e.getItemMeta(s).parentId;
949
+ x && (e.focusItem(o, x), o.preventDefault());
950
+ }
951
+ break;
952
+ }
953
+ // Focuses the first item in the tree
954
+ case b === "Home": {
955
+ p(s) && t.multiSelect && f && o.shiftKey ? e.selectRangeFromStartToItem(o, s) : e.focusItem(o, se(e)), o.preventDefault();
956
+ break;
957
+ }
958
+ // Focuses the last item in the tree
959
+ case b === "End": {
960
+ p(s) && t.multiSelect && f && o.shiftKey ? e.selectRangeFromItemToEnd(o, s) : e.focusItem(o, Ne(e)), o.preventDefault();
961
+ break;
962
+ }
963
+ // Expand all siblings that are at the same level as the focused item
964
+ case b === "*": {
965
+ e.expandAllSiblings(o, s), o.preventDefault();
966
+ break;
967
+ }
968
+ // Multi select behavior when pressing Ctrl + a
969
+ // Selects all the items
970
+ case (String.fromCharCode(o.keyCode) === "A" && f && t.multiSelect && !t.disableSelection): {
971
+ e.selectAllNavigableItems(o), o.preventDefault();
972
+ break;
973
+ }
974
+ // Type-ahead
975
+ // TODO: Support typing multiple characters
976
+ case (!f && !o.shiftKey && yn(b)): {
977
+ const x = g(s, b);
978
+ x != null && (e.focusItem(o, x), o.preventDefault());
979
+ break;
980
+ }
981
+ }
982
+ }
983
+ }
984
+ };
985
+ };
986
+ Je.params = {};
987
+ const Ye = ({
988
+ slots: e,
989
+ slotProps: t
990
+ }) => ({
991
+ contextValue: {
992
+ icons: {
993
+ slots: {
994
+ collapseIcon: e.collapseIcon,
995
+ expandIcon: e.expandIcon,
996
+ endIcon: e.endIcon
997
+ },
998
+ slotProps: {
999
+ collapseIcon: t.collapseIcon,
1000
+ expandIcon: t.expandIcon,
1001
+ endIcon: t.endIcon
1002
+ }
1003
+ }
1004
+ }
1005
+ });
1006
+ Ye.params = {};
1007
+ const Cn = [X, le, ae, ye, Je, Ye, H];
1008
+ function Qe(e) {
1009
+ const {
1010
+ instance: t,
1011
+ items: {
1012
+ onItemClick: n
1013
+ },
1014
+ selection: {
1015
+ multiSelect: r,
1016
+ checkboxSelection: l,
1017
+ disableSelection: h
1018
+ },
1019
+ expansion: {
1020
+ expansionTrigger: g
1021
+ }
1022
+ } = Ke(), p = t.isItemExpandable(e), m = t.isItemExpanded(e), d = t.isItemFocused(e), o = t.isItemSelected(e), s = t.isItemDisabled(e), f = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, b = t.isItemEditable ? t.isItemEditable(e) : !1, x = (y) => {
1023
+ if (!s) {
1024
+ d || t.focusItem(y, e);
1025
+ const R = r && (y.shiftKey || y.ctrlKey || y.metaKey);
1026
+ p && !(R && t.isItemExpanded(e)) && t.toggleItemExpansion(y, e);
1027
+ }
1028
+ }, c = (y) => {
1029
+ s || (d || t.focusItem(y, e), r && (y.shiftKey || y.ctrlKey || y.metaKey) ? y.shiftKey ? t.expandSelectionRange(y, e) : t.selectItem({
1030
+ event: y,
1031
+ itemId: e,
1032
+ keepExistingSelection: !0
1033
+ }) : t.selectItem({
1034
+ event: y,
1035
+ itemId: e,
1036
+ shouldBeSelected: !0
1037
+ }));
1038
+ }, i = (y) => {
1039
+ if (h || s)
1040
+ return;
1041
+ const R = y.nativeEvent.shiftKey;
1042
+ r && R ? t.expandSelectionRange(y, e) : t.selectItem({
1043
+ event: y,
1044
+ itemId: e,
1045
+ keepExistingSelection: r,
1046
+ shouldBeSelected: y.target.checked
1047
+ });
1048
+ }, u = (y) => {
1049
+ (y.shiftKey || y.ctrlKey || y.metaKey || s) && y.preventDefault();
1050
+ }, I = () => {
1051
+ oe(t, H) && t.isItemEditable(e) && (t.isItemBeingEdited(e) ? t.setEditedItemId(null) : t.setEditedItemId(e));
1052
+ };
1053
+ return {
1054
+ disabled: s,
1055
+ expanded: m,
1056
+ selected: o,
1057
+ focused: d,
1058
+ editable: b,
1059
+ editing: f,
1060
+ disableSelection: h,
1061
+ checkboxSelection: l,
1062
+ handleExpansion: x,
1063
+ handleSelection: c,
1064
+ handleCheckboxSelection: i,
1065
+ handleContentClick: n,
1066
+ preventSelection: u,
1067
+ expansionTrigger: g,
1068
+ toggleItemEditing: I,
1069
+ handleSaveItemLabel: (y, R) => {
1070
+ oe(t, H) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, R), I(), t.focusItem(y, e));
1071
+ },
1072
+ handleCancelItemLabelEditing: (y) => {
1073
+ oe(t, H) && t.isItemBeingEditedRef(e) && (I(), t.focusItem(y, e));
1074
+ }
1075
+ };
1076
+ }
1077
+ const wn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "itemId", "onClick", "onMouseDown", "dragAndDropOverlayProps", "labelInputProps"], Ce = /* @__PURE__ */ E.forwardRef(function(t, n) {
1078
+ const {
1079
+ classes: r,
1080
+ className: l,
1081
+ displayIcon: h,
1082
+ expansionIcon: g,
1083
+ icon: p,
1084
+ label: m,
1085
+ itemId: d,
1086
+ onClick: o,
1087
+ onMouseDown: s,
1088
+ dragAndDropOverlayProps: f,
1089
+ labelInputProps: b
1090
+ } = t, x = A(t, wn), {
1091
+ disabled: c,
1092
+ expanded: i,
1093
+ selected: u,
1094
+ focused: I,
1095
+ editing: T,
1096
+ editable: P,
1097
+ disableSelection: y,
1098
+ checkboxSelection: R,
1099
+ handleExpansion: v,
1100
+ handleSelection: F,
1101
+ handleCheckboxSelection: B,
1102
+ handleContentClick: V,
1103
+ preventSelection: L,
1104
+ expansionTrigger: W,
1105
+ toggleItemEditing: G
1106
+ } = Qe(d), j = p || g || h, J = E.useRef(null), ce = (M) => {
1107
+ L(M), s && s(M);
1108
+ }, ue = (M) => {
1109
+ var Y;
1110
+ V == null || V(M, d), !((Y = J.current) != null && Y.contains(M.target)) && (W === "content" && v(M), R || F(M), o && o(M));
1111
+ }, de = (M) => {
1112
+ M.defaultMuiPrevented || G();
1113
+ };
1114
+ return (
1115
+ /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
1116
+ /* @__PURE__ */ je("div", C({}, x, {
1117
+ className: Be(r.root, l, i && r.expanded, u && r.selected, I && r.focused, c && r.disabled, T && r.editing, P && r.editable),
1118
+ onClick: ue,
1119
+ onMouseDown: ce,
1120
+ ref: n,
1121
+ children: [/* @__PURE__ */ S("div", {
1122
+ className: r.iconContainer,
1123
+ children: j
1124
+ }), R && /* @__PURE__ */ S(Wt, {
1125
+ className: r.checkbox,
1126
+ checked: u,
1127
+ onChange: B,
1128
+ disabled: c || y,
1129
+ ref: J,
1130
+ tabIndex: -1
1131
+ }), T ? /* @__PURE__ */ S(Ot, C({}, b, {
1132
+ className: r.labelInput
1133
+ })) : /* @__PURE__ */ S("div", C({
1134
+ className: r.label
1135
+ }, P && {
1136
+ onDoubleClick: de
1137
+ }, {
1138
+ children: m
1139
+ })), f && /* @__PURE__ */ S(Vt, C({}, f))]
1140
+ }))
1141
+ );
1142
+ });
1143
+ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
1144
+ // ----------------------------- Warning --------------------------------
1145
+ // | These PropTypes are generated from the TypeScript type definitions |
1146
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
1147
+ // ----------------------------------------------------------------------
1148
+ /**
1149
+ * Override or extend the styles applied to the component.
1150
+ */
1151
+ classes: a.object.isRequired,
1152
+ className: a.string,
1153
+ /**
1154
+ * The icon to display next to the Tree Item's label. Either a parent or end icon.
1155
+ */
1156
+ displayIcon: a.node,
1157
+ dragAndDropOverlayProps: a.shape({
1158
+ action: a.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
1159
+ style: a.object
1160
+ }),
1161
+ /**
1162
+ * The icon to display next to the Tree Item's label. Either an expansion or collapse icon.
1163
+ */
1164
+ expansionIcon: a.node,
1165
+ /**
1166
+ * The icon to display next to the Tree Item's label.
1167
+ */
1168
+ icon: a.node,
1169
+ /**
1170
+ * The id of the item.
1171
+ */
1172
+ itemId: a.string.isRequired,
1173
+ /**
1174
+ * The Tree Item label.
1175
+ */
1176
+ label: a.node,
1177
+ labelInputProps: a.shape({
1178
+ autoFocus: a.oneOf([!0]),
1179
+ "data-element": a.oneOf(["labelInput"]),
1180
+ onBlur: a.func,
1181
+ onChange: a.func,
1182
+ onKeyDown: a.func,
1183
+ type: a.oneOf(["text"]),
1184
+ value: a.string
1185
+ })
1186
+ });
1187
+ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"], Sn = ["ownerState"], Pn = ["ownerState"], vn = ["ownerState"], kn = Ue(), Mn = (e) => {
1188
+ const {
1189
+ classes: t
1190
+ } = e;
1191
+ return ze({
1192
+ root: ["root"],
1193
+ content: ["content"],
1194
+ expanded: ["expanded"],
1195
+ selected: ["selected"],
1196
+ focused: ["focused"],
1197
+ disabled: ["disabled"],
1198
+ iconContainer: ["iconContainer"],
1199
+ checkbox: ["checkbox"],
1200
+ label: ["label"],
1201
+ labelInput: ["labelInput"],
1202
+ editing: ["editing"],
1203
+ editable: ["editable"],
1204
+ groupTransition: ["groupTransition"]
1205
+ }, jt, t);
1206
+ }, Dn = ie("li", {
1207
+ name: "MuiTreeItem",
1208
+ slot: "Root",
1209
+ overridesResolver: (e, t) => t.root
1210
+ })({
1211
+ listStyle: "none",
1212
+ margin: 0,
1213
+ padding: 0,
1214
+ outline: 0
1215
+ }), On = ie(Ce, {
1216
+ name: "MuiTreeItem",
1217
+ slot: "Content",
1218
+ overridesResolver: (e, t) => [t.content, t.iconContainer && {
1219
+ [`& .${O.iconContainer}`]: t.iconContainer
1220
+ }, t.label && {
1221
+ [`& .${O.label}`]: t.label
1222
+ }],
1223
+ shouldForwardProp: (e) => qe(e) && e !== "indentationAtItemLevel"
1224
+ })(({
1225
+ theme: e
1226
+ }) => ({
1227
+ padding: e.spacing(0.5, 1),
1228
+ borderRadius: e.shape.borderRadius,
1229
+ width: "100%",
1230
+ boxSizing: "border-box",
1231
+ // prevent width + padding to overflow
1232
+ position: "relative",
1233
+ display: "flex",
1234
+ alignItems: "center",
1235
+ gap: e.spacing(1),
1236
+ cursor: "pointer",
1237
+ WebkitTapHighlightColor: "transparent",
1238
+ "&:hover": {
1239
+ backgroundColor: (e.vars || e).palette.action.hover,
1240
+ // Reset on touch devices, it doesn't add specificity
1241
+ "@media (hover: none)": {
1242
+ backgroundColor: "transparent"
1243
+ }
1244
+ },
1245
+ [`&.${O.disabled}`]: {
1246
+ opacity: (e.vars || e).palette.action.disabledOpacity,
1247
+ backgroundColor: "transparent"
1248
+ },
1249
+ [`&.${O.focused}`]: {
1250
+ backgroundColor: (e.vars || e).palette.action.focus
1251
+ },
1252
+ [`&.${O.selected}`]: {
1253
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : ne(e.palette.primary.main, e.palette.action.selectedOpacity),
1254
+ "&:hover": {
1255
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : ne(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
1256
+ // Reset on touch devices, it doesn't add specificity
1257
+ "@media (hover: none)": {
1258
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : ne(e.palette.primary.main, e.palette.action.selectedOpacity)
1259
+ }
1260
+ },
1261
+ [`&.${O.focused}`]: {
1262
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : ne(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1263
+ }
1264
+ },
1265
+ [`& .${O.iconContainer}`]: {
1266
+ width: 16,
1267
+ display: "flex",
1268
+ flexShrink: 0,
1269
+ justifyContent: "center",
1270
+ "& svg": {
1271
+ fontSize: 18
1272
+ }
1273
+ },
1274
+ [`& .${O.label}`]: C({
1275
+ width: "100%",
1276
+ boxSizing: "border-box",
1277
+ // prevent width + padding to overflow
1278
+ // fixes overflow - see https://github.com/mui/material-ui/issues/27372
1279
+ minWidth: 0,
1280
+ position: "relative"
1281
+ }, e.typography.body1),
1282
+ [`& .${O.checkbox}`]: {
1283
+ padding: 0
1284
+ },
1285
+ variants: [{
1286
+ props: {
1287
+ indentationAtItemLevel: !0
1288
+ },
1289
+ style: {
1290
+ paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`
1291
+ }
1292
+ }]
1293
+ })), Vn = ie(Gt, {
1294
+ name: "MuiTreeItem",
1295
+ slot: "GroupTransition",
1296
+ overridesResolver: (e, t) => t.groupTransition,
1297
+ shouldForwardProp: (e) => qe(e) && e !== "indentationAtItemLevel"
1298
+ })({
1299
+ margin: 0,
1300
+ padding: 0,
1301
+ paddingLeft: "var(--TreeView-itemChildrenIndentation)",
1302
+ variants: [{
1303
+ props: {
1304
+ indentationAtItemLevel: !0
1305
+ },
1306
+ style: {
1307
+ paddingLeft: 0
1308
+ }
1309
+ }]
1310
+ }), Ze = /* @__PURE__ */ E.forwardRef(function(t, n) {
1311
+ var ke, Me, De, Oe;
1312
+ const {
1313
+ icons: r,
1314
+ runItemPlugins: l,
1315
+ items: {
1316
+ disabledItemsFocusable: h,
1317
+ indentationAtItemLevel: g
1318
+ },
1319
+ selection: {
1320
+ disableSelection: p
1321
+ },
1322
+ expansion: {
1323
+ expansionTrigger: m
1324
+ },
1325
+ treeId: d,
1326
+ instance: o
1327
+ } = Ke(), s = E.useContext($e), f = kn({
1328
+ props: t,
1329
+ name: "MuiTreeItem"
1330
+ }), {
1331
+ children: b,
1332
+ className: x,
1333
+ slots: c,
1334
+ slotProps: i,
1335
+ ContentComponent: u = Ce,
1336
+ ContentProps: I,
1337
+ itemId: T,
1338
+ id: P,
1339
+ label: y,
1340
+ onClick: R,
1341
+ onMouseDown: v,
1342
+ onBlur: F,
1343
+ onKeyDown: B
1344
+ } = f, V = A(f, Rn), {
1345
+ expanded: L,
1346
+ focused: W,
1347
+ selected: G,
1348
+ disabled: j,
1349
+ editing: J,
1350
+ handleExpansion: ce,
1351
+ handleCancelItemLabelEditing: ue,
1352
+ handleSaveItemLabel: de
1353
+ } = Qe(T);
1354
+ process.env.NODE_ENV !== "production" && (f.ContentComponent && xe(["MUI X: The ContentComponent prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]), f.ContentProps && xe(["MUI X: The ContentProps prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]));
1355
+ const {
1356
+ contentRef: M,
1357
+ rootRef: Y,
1358
+ propsEnhancers: D
1359
+ } = l(f), Q = E.useRef(null), we = E.useRef(null), nt = Ee(n, Y, Q), ot = Ee(I == null ? void 0 : I.ref, M, we), z = {
1360
+ expandIcon: (c == null ? void 0 : c.expandIcon) ?? r.slots.expandIcon ?? Ft,
1361
+ collapseIcon: (c == null ? void 0 : c.collapseIcon) ?? r.slots.collapseIcon ?? At,
1362
+ endIcon: (c == null ? void 0 : c.endIcon) ?? r.slots.endIcon,
1363
+ icon: c == null ? void 0 : c.icon,
1364
+ groupTransition: c == null ? void 0 : c.groupTransition
1365
+ }, Re = (w) => Array.isArray(w) ? w.length > 0 && w.some(Re) : !!w, Z = Re(b), fe = C({}, f, {
1366
+ expanded: L,
1367
+ focused: W,
1368
+ selected: G,
1369
+ disabled: j,
1370
+ indentationAtItemLevel: g
1371
+ }), k = Mn(fe), Se = z.groupTransition ?? void 0, rt = N({
1372
+ elementType: Se,
1373
+ ownerState: {},
1374
+ externalSlotProps: i == null ? void 0 : i.groupTransition,
1375
+ additionalProps: C({
1376
+ unmountOnExit: !0,
1377
+ in: L,
1378
+ component: "ul",
1379
+ role: "group"
1380
+ }, g ? {
1381
+ indentationAtItemLevel: !0
1382
+ } : {}),
1383
+ className: k.groupTransition
1384
+ }), st = (w) => {
1385
+ m === "iconContainer" && ce(w);
1386
+ }, pe = L ? z.collapseIcon : z.expandIcon, it = N({
1387
+ elementType: pe,
1388
+ ownerState: {},
1389
+ externalSlotProps: (w) => L ? C({}, $(r.slotProps.collapseIcon, w), $(i == null ? void 0 : i.collapseIcon, w)) : C({}, $(r.slotProps.expandIcon, w), $(i == null ? void 0 : i.expandIcon, w)),
1390
+ additionalProps: {
1391
+ onClick: st
1392
+ }
1393
+ }), lt = A(it, Sn), at = Z && pe ? /* @__PURE__ */ S(pe, C({}, lt)) : null, me = Z ? void 0 : z.endIcon, ct = N({
1394
+ elementType: me,
1395
+ ownerState: {},
1396
+ externalSlotProps: (w) => Z ? {} : C({}, $(r.slotProps.endIcon, w), $(i == null ? void 0 : i.endIcon, w))
1397
+ }), ut = A(ct, Pn), dt = me ? /* @__PURE__ */ S(me, C({}, ut)) : null, Ie = z.icon, ft = N({
1398
+ elementType: Ie,
1399
+ ownerState: {},
1400
+ externalSlotProps: i == null ? void 0 : i.icon
1401
+ }), pt = A(ft, vn), mt = Ie ? /* @__PURE__ */ S(Ie, C({}, pt)) : null;
1402
+ let ee;
1403
+ G ? ee = !0 : p || j ? ee = void 0 : ee = !1;
1404
+ function It(w) {
1405
+ !W && (!j || h) && w.currentTarget === w.target && o.focusItem(w, T);
1406
+ }
1407
+ function gt(w) {
1408
+ var _, q, Ve, Ae;
1409
+ F == null || F(w), !(J || // we can exit the editing state by clicking outside the input (within the Tree Item) or by pressing Enter or Escape -> we don't want to remove the focused item from the state in these cases
1410
+ // we can also exit the editing state by clicking on the root itself -> want to remove the focused item from the state in this case
1411
+ w.relatedTarget && he(w.relatedTarget, Q.current) && (w.target && ((q = (_ = w.target) == null ? void 0 : _.dataset) == null ? void 0 : q.element) === "labelInput" && he(w.target, Q.current) || ((Ae = (Ve = w.relatedTarget) == null ? void 0 : Ve.dataset) == null ? void 0 : Ae.element) === "labelInput")) && o.removeFocusedItem();
1412
+ }
1413
+ const bt = (w) => {
1414
+ var _, q;
1415
+ B == null || B(w), ((q = (_ = w.target) == null ? void 0 : _.dataset) == null ? void 0 : q.element) !== "labelInput" && o.handleItemKeyDown(w, T);
1416
+ }, ht = _e({
1417
+ itemId: T,
1418
+ treeId: d,
1419
+ id: P
1420
+ }), xt = o.canItemBeTabbed(T) ? 0 : -1, te = {
1421
+ rootRefObject: Q,
1422
+ contentRefObject: we,
1423
+ interactions: {
1424
+ handleSaveItemLabel: de,
1425
+ handleCancelItemLabelEditing: ue
1426
+ }
1427
+ }, Et = ((ke = D.root) == null ? void 0 : ke.call(D, C({}, te, {
1428
+ externalEventHandlers: Fe(V)
1429
+ }))) ?? {}, Tt = ((Me = D.content) == null ? void 0 : Me.call(D, C({}, te, {
1430
+ externalEventHandlers: Fe(I)
1431
+ }))) ?? {}, Pe = ((De = D.dragAndDropOverlay) == null ? void 0 : De.call(D, C({}, te, {
1432
+ externalEventHandlers: {}
1433
+ }))) ?? {}, ve = ((Oe = D.labelInput) == null ? void 0 : Oe.call(D, C({}, te, {
1434
+ externalEventHandlers: {}
1435
+ }))) ?? {};
1436
+ return /* @__PURE__ */ S(Lt, {
1437
+ itemId: T,
1438
+ children: /* @__PURE__ */ je(Dn, C({
1439
+ className: Be(k.root, x),
1440
+ role: "treeitem",
1441
+ "aria-expanded": Z ? L : void 0,
1442
+ "aria-selected": ee,
1443
+ "aria-disabled": j || void 0,
1444
+ id: ht,
1445
+ tabIndex: xt
1446
+ }, V, {
1447
+ ownerState: fe,
1448
+ onFocus: It,
1449
+ onBlur: gt,
1450
+ onKeyDown: bt,
1451
+ ref: nt,
1452
+ style: g ? C({}, V.style, {
1453
+ "--TreeView-itemDepth": typeof s == "function" ? s(T) : s
1454
+ }) : V.style
1455
+ }, Et, {
1456
+ children: [/* @__PURE__ */ S(On, C({
1457
+ as: u,
1458
+ classes: {
1459
+ root: k.content,
1460
+ expanded: k.expanded,
1461
+ selected: k.selected,
1462
+ focused: k.focused,
1463
+ disabled: k.disabled,
1464
+ editable: k.editable,
1465
+ editing: k.editing,
1466
+ iconContainer: k.iconContainer,
1467
+ label: k.label,
1468
+ labelInput: k.labelInput,
1469
+ checkbox: k.checkbox
1470
+ },
1471
+ label: y,
1472
+ itemId: T,
1473
+ onClick: R,
1474
+ onMouseDown: v,
1475
+ icon: mt,
1476
+ expansionIcon: at,
1477
+ displayIcon: dt,
1478
+ ownerState: fe
1479
+ }, I, Tt, Pe.action == null ? {} : {
1480
+ dragAndDropOverlayProps: Pe
1481
+ }, ve.value == null ? {} : {
1482
+ labelInputProps: ve
1483
+ }, {
1484
+ ref: ot
1485
+ })), b && /* @__PURE__ */ S(Vn, C({
1486
+ as: Se
1487
+ }, rt, {
1488
+ children: b
1489
+ }))]
1490
+ }))
1491
+ });
1492
+ });
1493
+ process.env.NODE_ENV !== "production" && (Ze.propTypes = {
1494
+ // ----------------------------- Warning --------------------------------
1495
+ // | These PropTypes are generated from the TypeScript type definitions |
1496
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
1497
+ // ----------------------------------------------------------------------
1498
+ /**
1499
+ * The content of the component.
1500
+ */
1501
+ children: a.node,
1502
+ /**
1503
+ * Override or extend the styles applied to the component.
1504
+ */
1505
+ classes: a.object,
1506
+ className: a.string,
1507
+ /**
1508
+ * The component used to render the content of the item.
1509
+ * @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
1510
+ * @default TreeItemContent
1511
+ */
1512
+ ContentComponent: Yt,
1513
+ /**
1514
+ * Props applied to ContentComponent.
1515
+ * @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
1516
+ */
1517
+ ContentProps: a.object,
1518
+ /**
1519
+ * If `true`, the item is disabled.
1520
+ * @default false
1521
+ */
1522
+ disabled: a.bool,
1523
+ /**
1524
+ * The id of the item.
1525
+ */
1526
+ itemId: a.string.isRequired,
1527
+ /**
1528
+ * The Tree Item label.
1529
+ */
1530
+ label: a.node,
1531
+ /**
1532
+ * This prop isn't supported.
1533
+ * Use the `onItemFocus` callback on the tree if you need to monitor a item's focus.
1534
+ */
1535
+ onFocus: Jt,
1536
+ /**
1537
+ * Callback fired when a key of the keyboard is pressed on the item.
1538
+ */
1539
+ onKeyDown: a.func,
1540
+ /**
1541
+ * The props used for each component slot.
1542
+ * @default {}
1543
+ */
1544
+ slotProps: a.object,
1545
+ /**
1546
+ * Overridable component slots.
1547
+ * @default {}
1548
+ */
1549
+ slots: a.object,
1550
+ /**
1551
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1552
+ */
1553
+ sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object])
1554
+ });
1555
+ const An = ["ownerState"];
1556
+ function Fn({
1557
+ slots: e,
1558
+ slotProps: t,
1559
+ label: n,
1560
+ id: r,
1561
+ itemId: l,
1562
+ itemsToRender: h
1563
+ }) {
1564
+ const g = (e == null ? void 0 : e.item) ?? Ze, p = N({
1565
+ elementType: g,
1566
+ externalSlotProps: t == null ? void 0 : t.item,
1567
+ additionalProps: {
1568
+ itemId: l,
1569
+ id: r,
1570
+ label: n
1571
+ },
1572
+ ownerState: {
1573
+ itemId: l,
1574
+ label: n
1575
+ }
1576
+ }), m = A(p, An), d = E.useMemo(() => h ? /* @__PURE__ */ S(et, {
1577
+ itemsToRender: h,
1578
+ slots: e,
1579
+ slotProps: t
1580
+ }) : null, [h, e, t]);
1581
+ return /* @__PURE__ */ S(g, C({}, m, {
1582
+ children: d
1583
+ }));
1584
+ }
1585
+ function et(e) {
1586
+ const {
1587
+ itemsToRender: t,
1588
+ slots: n,
1589
+ slotProps: r
1590
+ } = e;
1591
+ return /* @__PURE__ */ S(E.Fragment, {
1592
+ children: t.map((l) => /* @__PURE__ */ S(Fn, {
1593
+ slots: n,
1594
+ slotProps: r,
1595
+ label: l.label,
1596
+ id: l.id,
1597
+ itemId: l.itemId,
1598
+ itemsToRender: l.children
1599
+ }, l.itemId))
1600
+ });
1601
+ }
1602
+ const Ln = Ue(), jn = (e) => {
1603
+ const {
1604
+ classes: t
1605
+ } = e;
1606
+ return ze({
1607
+ root: ["root"]
1608
+ }, Qt, t);
1609
+ }, _n = ie("ul", {
1610
+ name: "MuiRichTreeView",
1611
+ slot: "Root",
1612
+ overridesResolver: (e, t) => t.root
1613
+ })({
1614
+ padding: 0,
1615
+ margin: 0,
1616
+ listStyle: "none",
1617
+ outline: 0,
1618
+ position: "relative"
1619
+ }), tt = /* @__PURE__ */ E.forwardRef(function(t, n) {
1620
+ const r = Ln({
1621
+ props: t,
1622
+ name: "MuiRichTreeView"
1623
+ });
1624
+ process.env.NODE_ENV !== "production" && r.children != null && xe(["MUI X: The Rich Tree View component does not support JSX children.", "If you want to add items, you need to use the `items` prop.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/."]);
1625
+ const {
1626
+ getRootProps: l,
1627
+ contextValue: h,
1628
+ instance: g
1629
+ } = an({
1630
+ plugins: Cn,
1631
+ rootRef: n,
1632
+ props: r
1633
+ }), {
1634
+ slots: p,
1635
+ slotProps: m
1636
+ } = r, d = jn(r), o = (p == null ? void 0 : p.root) ?? _n, s = N({
1637
+ elementType: o,
1638
+ externalSlotProps: m == null ? void 0 : m.root,
1639
+ className: d.root,
1640
+ getSlotProps: l,
1641
+ ownerState: r
1642
+ });
1643
+ return /* @__PURE__ */ S(cn, {
1644
+ value: h,
1645
+ children: /* @__PURE__ */ S(o, C({}, s, {
1646
+ children: /* @__PURE__ */ S(et, {
1647
+ slots: p,
1648
+ slotProps: m,
1649
+ itemsToRender: g.getItemsToRender()
1650
+ })
1651
+ }))
1652
+ });
1653
+ });
1654
+ process.env.NODE_ENV !== "production" && (tt.propTypes = {
1655
+ // ----------------------------- Warning --------------------------------
1656
+ // | These PropTypes are generated from the TypeScript type definitions |
1657
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
1658
+ // ----------------------------------------------------------------------
1659
+ /**
1660
+ * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
1661
+ */
1662
+ apiRef: a.shape({
1663
+ current: a.shape({
1664
+ focusItem: a.func.isRequired,
1665
+ getItem: a.func.isRequired,
1666
+ getItemDOMElement: a.func.isRequired,
1667
+ getItemOrderedChildrenIds: a.func.isRequired,
1668
+ getItemTree: a.func.isRequired,
1669
+ selectItem: a.func.isRequired,
1670
+ setItemExpansion: a.func.isRequired,
1671
+ updateItemLabel: a.func.isRequired
1672
+ })
1673
+ }),
1674
+ /**
1675
+ * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
1676
+ * @default false
1677
+ */
1678
+ checkboxSelection: a.bool,
1679
+ /**
1680
+ * Override or extend the styles applied to the component.
1681
+ */
1682
+ classes: a.object,
1683
+ className: a.string,
1684
+ /**
1685
+ * Expanded item ids.
1686
+ * Used when the item's expansion is not controlled.
1687
+ * @default []
1688
+ */
1689
+ defaultExpandedItems: a.arrayOf(a.string),
1690
+ /**
1691
+ * Selected item ids. (Uncontrolled)
1692
+ * When `multiSelect` is true this takes an array of strings; when false (default) a string.
1693
+ * @default []
1694
+ */
1695
+ defaultSelectedItems: a.any,
1696
+ /**
1697
+ * If `true`, will allow focus on disabled items.
1698
+ * @default false
1699
+ */
1700
+ disabledItemsFocusable: a.bool,
1701
+ /**
1702
+ * If `true` selection is disabled.
1703
+ * @default false
1704
+ */
1705
+ disableSelection: a.bool,
1706
+ /**
1707
+ * Expanded item ids.
1708
+ * Used when the item's expansion is controlled.
1709
+ */
1710
+ expandedItems: a.arrayOf(a.string),
1711
+ /**
1712
+ * The slot that triggers the item's expansion when clicked.
1713
+ * @default 'content'
1714
+ */
1715
+ expansionTrigger: a.oneOf(["content", "iconContainer"]),
1716
+ /**
1717
+ * Unstable features, breaking changes might be introduced.
1718
+ * For each feature, if the flag is not explicitly set to `true`,
1719
+ * the feature will be fully disabled and any property / method call will not have any effect.
1720
+ */
1721
+ experimentalFeatures: a.shape({
1722
+ indentationAtItemLevel: a.bool,
1723
+ labelEditing: a.bool
1724
+ }),
1725
+ /**
1726
+ * Used to determine the id of a given item.
1727
+ *
1728
+ * @template R
1729
+ * @param {R} item The item to check.
1730
+ * @returns {string} The id of the item.
1731
+ * @default (item) => item.id
1732
+ */
1733
+ getItemId: a.func,
1734
+ /**
1735
+ * Used to determine the string label for a given item.
1736
+ *
1737
+ * @template R
1738
+ * @param {R} item The item to check.
1739
+ * @returns {string} The label of the item.
1740
+ * @default (item) => item.label
1741
+ */
1742
+ getItemLabel: a.func,
1743
+ /**
1744
+ * This prop is used to help implement the accessibility logic.
1745
+ * If you don't provide this prop. It falls back to a randomly generated id.
1746
+ */
1747
+ id: a.string,
1748
+ /**
1749
+ * Used to determine if a given item should be disabled.
1750
+ * @template R
1751
+ * @param {R} item The item to check.
1752
+ * @returns {boolean} `true` if the item should be disabled.
1753
+ */
1754
+ isItemDisabled: a.func,
1755
+ /**
1756
+ * Determines if a given item is editable or not.
1757
+ * Make sure to also enable the `labelEditing` experimental feature:
1758
+ * `<RichTreeViewPro experimentalFeatures={{ labelEditing: true }} />`.
1759
+ * By default, the items are not editable.
1760
+ * @template R
1761
+ * @param {R} item The item to check.
1762
+ * @returns {boolean} `true` if the item is editable.
1763
+ */
1764
+ isItemEditable: a.oneOfType([a.func, a.bool]),
1765
+ /**
1766
+ * Horizontal indentation between an item and its children.
1767
+ * Examples: 24, "24px", "2rem", "2em".
1768
+ * @default 12px
1769
+ */
1770
+ itemChildrenIndentation: a.oneOfType([a.number, a.string]),
1771
+ items: a.array.isRequired,
1772
+ /**
1773
+ * If `true`, `ctrl` and `shift` will trigger multiselect.
1774
+ * @default false
1775
+ */
1776
+ multiSelect: a.bool,
1777
+ /**
1778
+ * Callback fired when Tree Items are expanded/collapsed.
1779
+ * @param {React.SyntheticEvent} event The DOM event that triggered the change.
1780
+ * @param {array} itemIds The ids of the expanded items.
1781
+ */
1782
+ onExpandedItemsChange: a.func,
1783
+ /**
1784
+ * Callback fired when the `content` slot of a given Tree Item is clicked.
1785
+ * @param {React.MouseEvent} event The DOM event that triggered the change.
1786
+ * @param {string} itemId The id of the focused item.
1787
+ */
1788
+ onItemClick: a.func,
1789
+ /**
1790
+ * Callback fired when a Tree Item is expanded or collapsed.
1791
+ * @param {React.SyntheticEvent} event The DOM event that triggered the change.
1792
+ * @param {array} itemId The itemId of the modified item.
1793
+ * @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
1794
+ */
1795
+ onItemExpansionToggle: a.func,
1796
+ /**
1797
+ * Callback fired when a given Tree Item is focused.
1798
+ * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
1799
+ * @param {string} itemId The id of the focused item.
1800
+ */
1801
+ onItemFocus: a.func,
1802
+ /**
1803
+ * Callback fired when the label of an item changes.
1804
+ * @param {TreeViewItemId} itemId The id of the item that was edited.
1805
+ * @param {string} newLabel The new label of the items.
1806
+ */
1807
+ onItemLabelChange: a.func,
1808
+ /**
1809
+ * Callback fired when a Tree Item is selected or deselected.
1810
+ * @param {React.SyntheticEvent} event The DOM event that triggered the change.
1811
+ * @param {array} itemId The itemId of the modified item.
1812
+ * @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
1813
+ */
1814
+ onItemSelectionToggle: a.func,
1815
+ /**
1816
+ * Callback fired when Tree Items are selected/deselected.
1817
+ * @param {React.SyntheticEvent} event The DOM event that triggered the change.
1818
+ * @param {string[] | string} itemIds The ids of the selected items.
1819
+ * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
1820
+ */
1821
+ onSelectedItemsChange: a.func,
1822
+ /**
1823
+ * Selected item ids. (Controlled)
1824
+ * When `multiSelect` is true this takes an array of strings; when false (default) a string.
1825
+ */
1826
+ selectedItems: a.any,
1827
+ /**
1828
+ * The props used for each component slot.
1829
+ * @default {}
1830
+ */
1831
+ slotProps: a.object,
1832
+ /**
1833
+ * Overridable component slots.
1834
+ * @default {}
1835
+ */
1836
+ slots: a.object,
1837
+ /**
1838
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1839
+ */
1840
+ sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object])
1841
+ });
1842
+ const io = ({
1843
+ items: e,
1844
+ selectedItemId: t,
1845
+ handleSelectedItemChange: n,
1846
+ iconColor: r = "primary"
1847
+ }) => {
1848
+ const [l, h] = Ct([]), g = wt(() => Kt(e), [e]);
1849
+ return Rt(() => {
1850
+ if (t) {
1851
+ const m = Ut(e, t);
1852
+ if (m) {
1853
+ const d = m.slice(0, -1);
1854
+ h((o) => {
1855
+ const s = d.filter(
1856
+ (f) => !o.includes(f)
1857
+ );
1858
+ return s.length > 0 ? [...o, ...s] : o;
1859
+ });
1860
+ }
1861
+ }
1862
+ }, [t, e]), /* @__PURE__ */ S(yt, { sx: $t, "data-treeview-root": "true", children: /* @__PURE__ */ S(
1863
+ tt,
1864
+ {
1865
+ items: e,
1866
+ selectedItems: t,
1867
+ expandedItems: l,
1868
+ onExpandedItemsChange: (m, d) => {
1869
+ h(d);
1870
+ },
1871
+ itemChildrenIndentation: Nt,
1872
+ onSelectedItemsChange: n,
1873
+ getItemId: Bt,
1874
+ slots: {
1875
+ item: (m) => {
1876
+ const d = m.itemId ? g[m.itemId] : void 0;
1877
+ return /* @__PURE__ */ S(
1878
+ _t,
1879
+ {
1880
+ ...m,
1881
+ itemData: d,
1882
+ iconColor: r
1883
+ }
1884
+ );
1885
+ }
1886
+ }
1887
+ }
1888
+ ) });
1889
+ };
1890
+ export {
1891
+ io as default
1892
+ };