@synnaxlabs/pluto 0.34.0 → 0.35.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 (245) hide show
  1. package/dist/{Animated-CnvOerW9.js → Animated-C7JTBH0T.js} +6 -6
  2. package/dist/{Animated-Ck87AGOu.cjs → Animated-D4IT49PS.cjs} +1 -1
  3. package/dist/{Item--wCat2DH.js → Item-4yG7GmwK.js} +23 -23
  4. package/dist/{Item-DuNQFmgk.cjs → Item-DuYEON-n.cjs} +1 -1
  5. package/dist/{Keyboard-DPs95Etp.cjs → Keyboard-BPoxRive.cjs} +1 -1
  6. package/dist/{Keyboard-Dh_Fhwg4.js → Keyboard-Csje8Cyn.js} +2 -2
  7. package/dist/LinePlot-DbXPZbQH.cjs +34 -0
  8. package/dist/{LinePlot-6KHKqa-2.js → LinePlot-DqoSTxNs.js} +2630 -2365
  9. package/dist/{Link-BHtl4aby.cjs → Link-BRv9hhIc.cjs} +1 -1
  10. package/dist/{Link-CDG2-g6A.js → Link-Crud0q_J.js} +1 -1
  11. package/dist/{List-BjimX8fM.js → List-Cuz80sgI.js} +6 -6
  12. package/dist/{List-C8vXIE2j.cjs → List-Pyj0u9YT.cjs} +1 -1
  13. package/dist/{Pack-D6eMgf33.js → Pack-BzCJQZ58.js} +1 -1
  14. package/dist/{Pack-DijAGcm_.cjs → Pack-Dvf8sQVK.cjs} +1 -1
  15. package/dist/Text-BJ2Pml4B.cjs +1 -0
  16. package/dist/{Text-CzgVM_22.js → Text-DMMYBs-R.js} +12 -12
  17. package/dist/{Toggle-Cdu7WaiC.js → Toggle-CLkPIiQK.js} +10438 -10080
  18. package/dist/Toggle-DnW_7Wr_.cjs +143 -0
  19. package/dist/{Video-DYSz9XOF.js → Video-BGyV37o3.js} +1 -1
  20. package/dist/{Video-BgDjKMJx.cjs → Video-CGe5Hscl.cjs} +1 -1
  21. package/dist/{aggregator-DzdAnRwI.js → aggregator-23mu0FOF.js} +2322 -2177
  22. package/dist/aggregator-y-jNJhKX.cjs +67 -0
  23. package/dist/align.cjs +1 -1
  24. package/dist/align.js +1 -1
  25. package/dist/button.cjs +1 -1
  26. package/dist/button.js +1 -1
  27. package/dist/color.cjs +1 -1
  28. package/dist/color.js +1 -1
  29. package/dist/css-BghghSL0.cjs +1 -0
  30. package/dist/css-DJCM-h5_.js +1178 -0
  31. package/dist/css.cjs +1 -1
  32. package/dist/css.js +2 -2
  33. package/dist/dropdown.cjs +1 -1
  34. package/dist/dropdown.js +1 -1
  35. package/dist/ether.cjs +1 -1
  36. package/dist/ether.js +75 -62
  37. package/dist/{external-k3Jbrj0m.js → external-0a9KHHwz.js} +13 -13
  38. package/dist/external-3DAfrFCZ.cjs +1 -0
  39. package/dist/{external-eI1p10Vf.cjs → external-B7Vpq1ol.cjs} +1 -1
  40. package/dist/{external-DRHWURjA.cjs → external-BV_9eXZJ.cjs} +1 -1
  41. package/dist/{external-lgZ2Gmbx.js → external-BZwFy-XX.js} +16 -16
  42. package/dist/{external-CoQwrjWl.js → external-CIH3tMhP.js} +29 -29
  43. package/dist/{external-BOIjtEGO.js → external-Cf5a9Ia8.js} +2 -2
  44. package/dist/{external-FVIwMFDr.js → external-CgpiH-10.js} +102 -102
  45. package/dist/{external-DcMAC_pY.js → external-Cgq0p0a8.js} +133 -126
  46. package/dist/{external-D9Q5Xjko.js → external-Ci-UP3Vu.js} +2 -2
  47. package/dist/external-CqLAQBcO.cjs +1 -0
  48. package/dist/{external-Cc9o20Al.cjs → external-Ctvxtwfh.cjs} +1 -1
  49. package/dist/{external-CAIE4G3V.cjs → external-D-PsJ1E5.cjs} +1 -1
  50. package/dist/external-D7FmaiqY.js +248 -0
  51. package/dist/{external-DvRQ7lJU.js → external-DAbicix6.js} +2 -2
  52. package/dist/external-DVF3ZJ4z.js +32 -0
  53. package/dist/external-De9tKPlO.js +76 -0
  54. package/dist/{external-CYsmC4uZ.cjs → external-Dk1cXh1i.cjs} +1 -1
  55. package/dist/{external-mtlL4Z3a.cjs → external-DtnrBHvV.cjs} +1 -1
  56. package/dist/external-ZxIaRZdb.cjs +1 -0
  57. package/dist/{external-BbS4QDTb.cjs → external-iiNZw96o.cjs} +1 -1
  58. package/dist/{external-DsKRFJxV.cjs → external-t43feeRt.cjs} +1 -1
  59. package/dist/{external-mE-a2ecU.js → external-xhGCeglf.js} +1 -1
  60. package/dist/{external-CjmMj11F.cjs → external-xtDHiIUX.cjs} +1 -1
  61. package/dist/header.cjs +1 -1
  62. package/dist/header.js +1 -1
  63. package/dist/index.cjs +7 -7
  64. package/dist/index.js +8292 -7208
  65. package/dist/input.cjs +1 -1
  66. package/dist/input.js +1 -1
  67. package/dist/list.cjs +1 -1
  68. package/dist/list.js +1 -1
  69. package/dist/menu.cjs +1 -1
  70. package/dist/menu.js +1 -1
  71. package/dist/src/breadcrumb/Breadcrumb.d.ts +10 -2
  72. package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
  73. package/dist/src/button/Button.d.ts +2 -0
  74. package/dist/src/button/Button.d.ts.map +1 -1
  75. package/dist/src/button/Icon.d.ts +2 -0
  76. package/dist/src/button/Icon.d.ts.map +1 -1
  77. package/dist/src/color/GradientPicker.d.ts +10 -0
  78. package/dist/src/color/GradientPicker.d.ts.map +1 -0
  79. package/dist/src/color/Picker.d.ts +9 -0
  80. package/dist/src/color/Picker.d.ts.map +1 -0
  81. package/dist/src/color/Provider.d.ts +139 -0
  82. package/dist/src/color/Provider.d.ts.map +1 -0
  83. package/dist/src/color/Swatch.d.ts +13 -0
  84. package/dist/src/color/Swatch.d.ts.map +1 -0
  85. package/dist/src/color/core/external.d.ts +4 -0
  86. package/dist/src/color/core/external.d.ts.map +1 -0
  87. package/dist/src/color/core/gradient.d.ts +58 -0
  88. package/dist/src/color/core/gradient.d.ts.map +1 -0
  89. package/dist/src/color/core/index.d.ts +1 -2
  90. package/dist/src/color/core/index.d.ts.map +1 -1
  91. package/dist/src/color/core/palette.d.ts +74 -0
  92. package/dist/src/color/core/palette.d.ts.map +1 -0
  93. package/dist/src/color/external.d.ts +4 -1
  94. package/dist/src/color/external.d.ts.map +1 -1
  95. package/dist/src/haul/Haul.d.ts +0 -1
  96. package/dist/src/haul/Haul.d.ts.map +1 -1
  97. package/dist/src/hooks/index.d.ts +1 -0
  98. package/dist/src/hooks/index.d.ts.map +1 -1
  99. package/dist/src/hooks/useDelayedState.d.ts +11 -0
  100. package/dist/src/hooks/useDelayedState.d.ts.map +1 -0
  101. package/dist/src/index.d.ts +2 -0
  102. package/dist/src/index.d.ts.map +1 -1
  103. package/dist/src/input/Text.d.ts.map +1 -1
  104. package/dist/src/nav/Drawer.d.ts.map +1 -1
  105. package/dist/src/notation/Select.d.ts +8 -0
  106. package/dist/src/notation/Select.d.ts.map +1 -0
  107. package/dist/src/notation/external.d.ts +3 -0
  108. package/dist/src/notation/external.d.ts.map +1 -0
  109. package/dist/src/notation/index.d.ts +2 -0
  110. package/dist/src/notation/index.d.ts.map +1 -0
  111. package/dist/src/notation/notation.d.ts.map +1 -1
  112. package/dist/src/pluto/Pluto.d.ts +3 -1
  113. package/dist/src/pluto/Pluto.d.ts.map +1 -1
  114. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  115. package/dist/src/select/Button.d.ts +5 -3
  116. package/dist/src/select/Button.d.ts.map +1 -1
  117. package/dist/src/select/Direction.d.ts +2 -1
  118. package/dist/src/select/Direction.d.ts.map +1 -1
  119. package/dist/src/select/Single.d.ts +1 -1
  120. package/dist/src/select/Single.d.ts.map +1 -1
  121. package/dist/src/status/Circle.d.ts +1 -1
  122. package/dist/src/status/Circle.d.ts.map +1 -1
  123. package/dist/src/table/Table.d.ts +30 -0
  124. package/dist/src/table/Table.d.ts.map +1 -0
  125. package/dist/src/table/aether/Table.d.ts +493 -0
  126. package/dist/src/table/aether/Table.d.ts.map +1 -0
  127. package/dist/src/table/aether/index.d.ts +2 -0
  128. package/dist/src/table/aether/index.d.ts.map +1 -0
  129. package/dist/src/table/cells/Cells.d.ts +191 -0
  130. package/dist/src/table/cells/Cells.d.ts.map +1 -0
  131. package/dist/src/table/cells/Forms.d.ts +7 -0
  132. package/dist/src/table/cells/Forms.d.ts.map +1 -0
  133. package/dist/src/table/cells/index.d.ts +2 -0
  134. package/dist/src/table/cells/index.d.ts.map +1 -0
  135. package/dist/src/table/cells/registry.d.ts +17 -0
  136. package/dist/src/table/cells/registry.d.ts.map +1 -0
  137. package/dist/src/table/external.d.ts +2 -0
  138. package/dist/src/table/external.d.ts.map +1 -0
  139. package/dist/src/table/index.d.ts +2 -0
  140. package/dist/src/table/index.d.ts.map +1 -0
  141. package/dist/src/telem/aether/pipeline.d.ts +35 -24
  142. package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
  143. package/dist/src/telem/aether/provider.d.ts +7 -6
  144. package/dist/src/telem/aether/provider.d.ts.map +1 -1
  145. package/dist/src/telem/aether/static.d.ts +22 -1
  146. package/dist/src/telem/aether/static.d.ts.map +1 -1
  147. package/dist/src/telem/aether/transformers.d.ts +217 -2
  148. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  149. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  150. package/dist/src/text/Editable.d.ts +2 -1
  151. package/dist/src/text/Editable.d.ts.map +1 -1
  152. package/dist/src/text/Select.d.ts +19 -0
  153. package/dist/src/text/Select.d.ts.map +1 -0
  154. package/dist/src/text/core/types.d.ts +2 -1
  155. package/dist/src/text/core/types.d.ts.map +1 -1
  156. package/dist/src/text/external.d.ts +1 -1
  157. package/dist/src/text/external.d.ts.map +1 -1
  158. package/dist/src/theming/Provider.d.ts.map +1 -1
  159. package/dist/src/theming/aether/provider.d.ts +375 -0
  160. package/dist/src/theming/aether/provider.d.ts.map +1 -1
  161. package/dist/src/theming/core/theme.d.ts +127 -0
  162. package/dist/src/theming/core/theme.d.ts.map +1 -1
  163. package/dist/src/tree/core.d.ts +3 -1
  164. package/dist/src/tree/core.d.ts.map +1 -1
  165. package/dist/src/vis/axis/canvas.d.ts +11 -0
  166. package/dist/src/vis/axis/canvas.d.ts.map +1 -1
  167. package/dist/src/vis/canvas/Canvas.d.ts.map +1 -1
  168. package/dist/src/vis/diagram/Diagram.d.ts +2 -1
  169. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  170. package/dist/src/vis/diagram/aether/types.d.ts +17 -0
  171. package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
  172. package/dist/src/vis/diagram/edge/Edge.d.ts +3 -2
  173. package/dist/src/vis/diagram/edge/Edge.d.ts.map +1 -1
  174. package/dist/src/vis/diagram/edge/paths.d.ts +20 -0
  175. package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -0
  176. package/dist/src/vis/diagram/external.d.ts +1 -0
  177. package/dist/src/vis/diagram/external.d.ts.map +1 -1
  178. package/dist/src/vis/draw2d/canvas.d.ts +19 -0
  179. package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
  180. package/dist/src/vis/legend/Container.d.ts.map +1 -1
  181. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  182. package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
  183. package/dist/src/vis/render/context.d.ts.map +1 -1
  184. package/dist/src/vis/schematic/Forms.d.ts +1 -0
  185. package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
  186. package/dist/src/vis/schematic/Grid.d.ts +16 -0
  187. package/dist/src/vis/schematic/Grid.d.ts.map +1 -0
  188. package/dist/src/vis/schematic/Symbols.d.ts +248 -371
  189. package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
  190. package/dist/src/vis/schematic/primitives/Primitives.d.ts +39 -0
  191. package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
  192. package/dist/src/vis/schematic/registry.d.ts +2 -2
  193. package/dist/src/vis/schematic/registry.d.ts.map +1 -1
  194. package/dist/src/vis/value/Form.d.ts +9 -0
  195. package/dist/src/vis/value/Form.d.ts.map +1 -0
  196. package/dist/src/vis/value/aether/value.d.ts +167 -0
  197. package/dist/src/vis/value/aether/value.d.ts.map +1 -1
  198. package/dist/src/vis/value/external.d.ts +1 -0
  199. package/dist/src/vis/value/external.d.ts.map +1 -1
  200. package/dist/src/vis/value/use.d.ts +56 -1
  201. package/dist/src/vis/value/use.d.ts.map +1 -1
  202. package/dist/src/workMain.d.ts +2 -0
  203. package/dist/src/workMain.d.ts.map +1 -0
  204. package/dist/style.css +1 -1
  205. package/dist/tabs.cjs +1 -1
  206. package/dist/tabs.js +1 -1
  207. package/dist/text.cjs +1 -1
  208. package/dist/text.js +2 -2
  209. package/dist/theming.cjs +1 -1
  210. package/dist/theming.js +2 -2
  211. package/dist/tree.cjs +1 -1
  212. package/dist/tree.js +1 -1
  213. package/dist/triggers.cjs +1 -1
  214. package/dist/triggers.js +1 -1
  215. package/dist/{units-CR-P9eLW.cjs → units-9h1yAbxY.cjs} +1 -1
  216. package/dist/{units-rb5QAWjs.js → units-D19WggGS.js} +1 -1
  217. package/dist/video.cjs +1 -1
  218. package/dist/video.js +1 -1
  219. package/package.json +6 -5
  220. package/dist/LinePlot--yLT9nkT.cjs +0 -34
  221. package/dist/Text-Cg0q7seY.cjs +0 -1
  222. package/dist/Toggle-CP9KtybX.cjs +0 -143
  223. package/dist/aggregator-C0Ab25_o.cjs +0 -67
  224. package/dist/css-B4FcyECk.js +0 -1112
  225. package/dist/css-Dh7n0EGs.cjs +0 -1
  226. package/dist/external-B72rRj4o.js +0 -76
  227. package/dist/external-CsqyDUsJ.js +0 -96
  228. package/dist/external-CsrLjLOh.cjs +0 -1
  229. package/dist/external-Dm2-owlq.cjs +0 -1
  230. package/dist/external-Yf8Lv9AU.js +0 -248
  231. package/dist/external-gz4sf3pG.cjs +0 -1
  232. package/dist/src/color/Picker/Picker.d.ts +0 -7
  233. package/dist/src/color/Picker/Picker.d.ts.map +0 -1
  234. package/dist/src/color/Picker/index.d.ts +0 -2
  235. package/dist/src/color/Picker/index.d.ts.map +0 -1
  236. package/dist/src/color/Swatch/Swatch.d.ts +0 -10
  237. package/dist/src/color/Swatch/Swatch.d.ts.map +0 -1
  238. package/dist/src/color/Swatch/index.d.ts +0 -2
  239. package/dist/src/color/Swatch/index.d.ts.map +0 -1
  240. package/dist/src/notation/SelectNotation.d.ts +0 -12
  241. package/dist/src/notation/SelectNotation.d.ts.map +0 -1
  242. package/dist/src/text/SelectLevel.d.ts +0 -12
  243. package/dist/src/text/SelectLevel.d.ts.map +0 -1
  244. package/dist/src/vis/schematic/Labeled.d.ts +0 -17
  245. package/dist/src/vis/schematic/Labeled.d.ts.map +0 -1
@@ -1,13 +1,13 @@
1
- import { F as re, A as k, g as ae, n as se } from "./aggregator-DzdAnRwI.js";
1
+ import { F as re, A as k, u as ae, n as se } from "./aggregator-23mu0FOF.js";
2
2
  import { j as N } from "./jsx-runtime-B6kdoens.js";
3
- import { a0 as le, a1 as oe, Q as ie, _ as ce, d as de, C as fe, a2 as ue, a3 as he, a4 as pe, V as me, B as ge, a5 as W, a6 as xe, a7 as ye, a8 as Ce, a9 as Ee } from "./Toggle-Cdu7WaiC.js";
3
+ import { a8 as le, a9 as oe, h as ie, aa as ce, d as de, C as fe, ab as ue, ac as he, ad as pe, a7 as me, B as ge, ae as Y, af as xe, ag as ye, ah as Ce, ai as Ee } from "./Toggle-CLkPIiQK.js";
4
4
  import { memo as Ne, useState as be, useCallback as b, useMemo as Te } from "react";
5
- import { L as _e } from "./Link-CDG2-g6A.js";
6
- import { A as ve } from "./Animated-CnvOerW9.js";
7
- import { C as u } from "./css-B4FcyECk.js";
8
- import "./Pack-D6eMgf33.js";
9
- import { L as Ie } from "./List-BjimX8fM.js";
10
- const X = (e, t) => t.includes(e.key), H = (e, t) => {
5
+ import { L as ve } from "./Link-Crud0q_J.js";
6
+ import { A as _e } from "./Animated-C7JTBH0T.js";
7
+ import { C as h } from "./css-DJCM-h5_.js";
8
+ import "./Pack-BzCJQZ58.js";
9
+ import { L as Ie } from "./List-Cuz80sgI.js";
10
+ const z = (e, t) => t.includes(e.key), H = (e, t) => {
11
11
  t && e.sort((n, a) => re.stringsWithNumbers(n.name, a.name));
12
12
  let r = !1;
13
13
  for (let n = 0; n < e.length; n++) {
@@ -19,20 +19,27 @@ const X = (e, t) => t.includes(e.key), H = (e, t) => {
19
19
  nodes: e,
20
20
  expanded: t,
21
21
  depth: r = 0,
22
- sort: n = !0
22
+ sort: n = !0,
23
+ path: a = ""
23
24
  }) => {
24
- r === 0 && n && (e = e.sort((s, o) => s.name.localeCompare(o.name)));
25
- const a = [];
26
- return e.forEach((s, o) => {
27
- const i = X(s, t);
28
- a.push({ ...s, depth: r, expanded: i, index: o }), i && s.children != null && (s.children = H(s.children, n), a.push(
29
- ...K({ nodes: s.children, expanded: t, depth: r + 1, sort: n })
25
+ r === 0 && n && (e = e.sort((l, i) => l.name.localeCompare(i.name)));
26
+ const s = [];
27
+ return e.forEach((l, i) => {
28
+ const o = `${a}${l.key}/`, u = z(l, t);
29
+ s.push({ ...l, depth: r, expanded: u, index: i, path: o }), u && l.children != null && (l.children = H(l.children, n), s.push(
30
+ ...K({
31
+ nodes: l.children,
32
+ expanded: t,
33
+ depth: r + 1,
34
+ sort: n,
35
+ path: o
36
+ })
30
37
  ));
31
- }), a;
38
+ }), s;
32
39
  }, Se = ({ tree: e, destination: t, keys: r }) => (r = k(r), r.forEach((n) => {
33
40
  const a = T({ tree: e, key: n });
34
- a != null && (Y({ tree: e, keys: n }), z({ tree: e, destination: t, additions: a }));
35
- }), e), Y = ({ tree: e, keys: t }) => {
41
+ a != null && (V({ tree: e, keys: n }), q({ tree: e, destination: t, additions: a }));
42
+ }), e), V = ({ tree: e, keys: t }) => {
36
43
  t = k(t);
37
44
  const r = e.map((n) => n.key);
38
45
  return t.forEach((n) => {
@@ -40,11 +47,11 @@ const X = (e, t) => t.includes(e.key), H = (e, t) => {
40
47
  const a = r.indexOf(n);
41
48
  if (a !== -1) e.splice(a, 1);
42
49
  else {
43
- const o = $({ tree: e, key: n });
44
- o != null && (o.children = (s = o.children) == null ? void 0 : s.filter((i) => i.key !== n));
50
+ const l = R({ tree: e, key: n });
51
+ l != null && (l.children = (s = l.children) == null ? void 0 : s.filter((i) => i.key !== n));
45
52
  }
46
53
  }), e;
47
- }, z = ({ tree: e, destination: t, additions: r }) => {
54
+ }, q = ({ tree: e, destination: t, additions: r }) => {
48
55
  r = k(r);
49
56
  const n = T({ tree: e, key: t });
50
57
  if (n == null) throw new Error(`Could not find node with key ${t}`);
@@ -60,19 +67,19 @@ const X = (e, t) => t.includes(e.key), H = (e, t) => {
60
67
  updater: r,
61
68
  throwOnMissing: n = !0
62
69
  }) => {
63
- var o, i;
70
+ var l, i;
64
71
  const a = T({ tree: e, key: t });
65
72
  if (a == null) {
66
73
  if (n) throw new Error(`Could not find node with key ${t}`);
67
74
  return e;
68
75
  }
69
- const s = $({ tree: e, key: t });
76
+ const s = R({ tree: e, key: t });
70
77
  if (s != null) {
71
- const l = (o = s.children) == null ? void 0 : o.findIndex((x) => x.key === t);
72
- l != null && l !== -1 && ((i = s.children) == null || i.splice(l, 1, r(a)));
78
+ const o = (l = s.children) == null ? void 0 : l.findIndex((u) => u.key === t);
79
+ o != null && o !== -1 && ((i = s.children) == null || i.splice(o, 1, r(a)));
73
80
  } else
74
81
  e.splice(
75
- e.findIndex((l) => l.key === t),
82
+ e.findIndex((o) => o.key === t),
76
83
  1,
77
84
  r(a)
78
85
  );
@@ -106,69 +113,69 @@ const X = (e, t) => t.includes(e.key), H = (e, t) => {
106
113
  }
107
114
  }
108
115
  return null;
109
- }, je = ({ tree: e, keys: t }) => {
116
+ }, $e = ({ tree: e, keys: t }) => {
110
117
  const r = [];
111
118
  for (const n of t) {
112
119
  const a = T({ tree: e, key: n });
113
120
  a != null && r.push(a);
114
121
  }
115
122
  return r;
116
- }, $ = ({ tree: e, key: t }) => {
123
+ }, R = ({ tree: e, key: t }) => {
117
124
  for (const r of e)
118
125
  if (r.children != null) {
119
126
  if (r.children.some((a) => a.key === t)) return r;
120
- const n = $({ tree: r.children, key: t });
127
+ const n = R({ tree: r.children, key: t });
121
128
  if (n != null) return n;
122
129
  }
123
130
  return null;
124
- }, q = (e) => e.map((t) => ({ ...t, children: q(t.children ?? []) })), J = (...e) => {
131
+ }, J = (e) => e.map((t) => ({ ...t, children: J(t.children ?? []) })), Q = (...e) => {
125
132
  const t = [];
126
133
  return e.forEach((r) => {
127
- t.push(r), r.children != null && t.push(...J(...r.children));
134
+ t.push(r), r.children != null && t.push(...Q(...r.children));
128
135
  }), t;
129
- }, M = "tree-item", Pe = [["Shift"]], Re = (e) => {
136
+ }, M = "tree-item", je = [["Shift"]], Pe = (e) => {
130
137
  const {
131
138
  onExpand: t,
132
139
  nodes: r,
133
140
  initialExpanded: n = [],
134
141
  sort: a = !0,
135
142
  selected: s,
136
- onSelectedChange: o
137
- } = e ?? {}, [i, l, x] = he(n), [c, _] = ae({
143
+ onSelectedChange: l
144
+ } = e ?? {}, [i, o, u] = he(n), [c, v] = ae({
138
145
  initial: [],
139
146
  value: s,
140
- onChange: o
141
- }), v = Te(
147
+ onChange: l
148
+ }), _ = Te(
142
149
  () => K({ nodes: r, expanded: i, sort: a }),
143
150
  [r, i, a]
144
- ), I = pe(v), L = me({ triggers: Pe }), R = b(
151
+ ), I = pe(_), L = me({ triggers: je }), P = b(
145
152
  (f, { clicked: d }) => {
146
- _(f);
147
- const g = I.current.find((E) => E.key === d);
148
- if ((g == null ? void 0 : g.hasChildren) === !1 || d == null || L.current.held) return;
149
- const y = x.current, w = y.some((E) => E === d) ? "contract" : "expand";
153
+ v(f);
154
+ const x = I.current.find((E) => E.key === d);
155
+ if ((x == null ? void 0 : x.hasChildren) === !1 || d == null || L.current.held) return;
156
+ const y = u.current, w = y.some((E) => E === d) ? "contract" : "expand";
150
157
  let C;
151
- w === "contract" ? C = y.filter((E) => E !== d) : C = [...y, d], l(C), t == null || t({ current: C, action: w, clicked: d });
158
+ w === "contract" ? C = y.filter((E) => E !== d) : C = [...y, d], o(C), t == null || t({ current: C, action: w, clicked: d });
152
159
  },
153
- [t, I, l, _]
154
- ), h = b(
160
+ [t, I, o, v]
161
+ ), p = b(
155
162
  (f) => {
156
- l((d) => se([...d, f])), t == null || t({ current: i, action: "expand", clicked: f });
163
+ o((d) => se([...d, f])), t == null || t({ current: i, action: "expand", clicked: f });
157
164
  },
158
- [l]
159
- ), j = b(
165
+ [o]
166
+ ), $ = b(
160
167
  (f) => {
161
- l((d) => d.filter((g) => g !== f)), t == null || t({ current: i, action: "contract", clicked: f });
168
+ o((d) => d.filter((x) => x !== f)), t == null || t({ current: i, action: "contract", clicked: f });
162
169
  },
163
- [l]
164
- ), S = b(() => l([]), [l]);
170
+ [o]
171
+ ), S = b(() => o([]), [o]);
165
172
  return {
166
- onSelect: R,
173
+ onSelect: P,
167
174
  selected: c,
168
175
  expanded: i,
169
- contract: j,
170
- expand: h,
171
- nodes: v,
176
+ contract: $,
177
+ expand: p,
178
+ nodes: _,
172
179
  clearExpanded: S
173
180
  };
174
181
  }, G = Ne(
@@ -179,130 +186,130 @@ const X = (e, t) => t.includes(e.key), H = (e, t) => {
179
186
  onDrop: n,
180
187
  onRename: a,
181
188
  onSuccessfulDrop: s,
182
- onDoubleClick: o,
189
+ onDoubleClick: l,
183
190
  loading: i = !1,
184
- useMargin: l = !0,
185
- translate: x
191
+ useMargin: o = !0,
192
+ translate: u
186
193
  }) => {
187
194
  const {
188
195
  key: c,
189
- hasChildren: _ = !1,
190
- allowRename: v = !1,
196
+ hasChildren: v = !1,
197
+ allowRename: _ = !1,
191
198
  children: I,
192
199
  icon: L,
193
- name: R,
194
- depth: h,
195
- expanded: j,
200
+ name: P,
201
+ depth: p,
202
+ expanded: $,
196
203
  href: S,
197
204
  haulItems: f = []
198
- } = e, { getSelected: d } = le(), { getSourceData: g } = oe(), y = _ || I != null && I.length > 0, w = [];
205
+ } = e, { getSelected: d } = le(), { getSourceData: x } = oe(), y = v || I != null && I.length > 0, w = [];
199
206
  y && w.push(
200
- /* @__PURE__ */ N.jsx(ve, { enabled: j, enabledLoc: "bottom", disabledLoc: "right" })
207
+ /* @__PURE__ */ N.jsx(_e, { enabled: $, enabledLoc: "bottom", disabledLoc: "right" })
201
208
  ), L != null && w.push(L);
202
209
  const C = [];
203
- i && C.push(/* @__PURE__ */ N.jsx(ie.Loading, { className: u.B("loading-indicator") }));
210
+ i && C.push(/* @__PURE__ */ N.jsx(ie.Loading, { className: h.B("loading-indicator") }));
204
211
  const [E, O] = be(!1), { startDrag: U, ...Z } = ce({
205
212
  type: "Tree.Item",
206
213
  key: c,
207
- canDrop: b(({ items: p, source: A }) => {
208
- const m = p.map((P) => P.key);
209
- return O(!1), A.type === "Tree.Item" && !m.includes(c);
214
+ canDrop: b(({ items: m, source: A }) => {
215
+ const g = m.map((j) => j.key);
216
+ return O(!1), A.type === "Tree.Item" && !g.includes(c);
210
217
  }, []),
211
- onDrop: b((p) => (n == null ? void 0 : n(c, p)) ?? [], [c, n]),
218
+ onDrop: b((m) => (n == null ? void 0 : n(c, m)) ?? [], [c, n]),
212
219
  onDragOver: b(() => O(!0), [])
213
220
  }), D = () => {
214
- const p = d(), A = g().filter(
215
- (m) => p.includes(m.key)
221
+ const m = d(), A = x().filter(
222
+ (g) => m.includes(g.key)
216
223
  );
217
- if (p.includes(c)) {
218
- const m = A.map(({ key: P, haulItems: B, depth: Q }) => [
219
- { type: M, key: P, data: { depth: Q } },
220
- ...(B == null ? void 0 : B.map((V) => ({
221
- ...V,
222
- data: { ...V.data, depth: Q }
224
+ if (m.includes(c)) {
225
+ const g = A.map(({ key: j, haulItems: B, depth: W }) => [
226
+ { type: M, key: j, data: { depth: W } },
227
+ ...(B == null ? void 0 : B.map((X) => ({
228
+ ...X,
229
+ data: { ...X.data, depth: W }
223
230
  }))) ?? []
224
231
  ]).flat();
225
- return U(m, (P) => s == null ? void 0 : s(c, P));
232
+ return U(g, (j) => s == null ? void 0 : s(c, j));
226
233
  }
227
234
  U(
228
235
  [
229
- { type: M, key: c, data: { depth: h } },
230
- ...f.map((m) => ({ ...m, data: { ...m.data, depth: h } }))
236
+ { type: M, key: c, data: { depth: p } },
237
+ ...f.map((g) => ({ ...g, data: { ...g.data, depth: p } }))
231
238
  ],
232
- (m) => s == null ? void 0 : s(c, m)
239
+ (g) => s == null ? void 0 : s(c, g)
233
240
  );
234
- }, ee = l ? "marginLeft" : "paddingLeft";
235
- let F = h * 2 + 1;
236
- y && l && (F -= 1);
241
+ }, ee = o ? "marginLeft" : "paddingLeft";
242
+ let F = p * 2 + 1;
243
+ y && o && (F -= 1);
237
244
  const te = {
238
245
  id: c,
239
246
  variant: "text",
240
247
  draggable: f.length > 0,
241
- className: u(
242
- u.BE("list", "item"),
248
+ className: h(
249
+ h.BE("list", "item"),
243
250
  de,
244
- E && u.M("dragging-over"),
251
+ E && h.M("dragging-over"),
245
252
  t && fe,
246
- u.selected(t),
247
- y && u.M("has-children"),
248
- u.BM("depth", h.toString())
253
+ h.selected(t),
254
+ y && h.M("has-children"),
255
+ h.BM("depth", p.toString())
249
256
  ),
250
257
  onDragLeave: () => O(!1),
251
258
  onDragStart: D,
252
259
  onClick: () => r == null ? void 0 : r(c),
253
260
  style: {
254
261
  border: "none",
255
- position: x != null ? "absolute" : "relative",
256
- transform: `translateY(${x}px)`,
262
+ position: u != null ? "absolute" : "relative",
263
+ transform: `translateY(${u}px)`,
257
264
  [ee]: `${F}rem`,
258
265
  // @ts-expect-error - CSS variable
259
- "--pluto-tree-indicator-offset": `${h * 1.5 + (h === 0 ? 0 : 0.5)}rem`
266
+ "--pluto-tree-indicator-offset": `${p * 1.5 + (p === 0 ? 0 : 0.5)}rem`
260
267
  },
261
268
  startIcon: w,
262
269
  iconSpacing: "small",
263
270
  noWrap: !0,
264
271
  endIcon: C,
265
- onDoubleClick: (p) => o == null ? void 0 : o(c, p),
272
+ onDoubleClick: (m) => l == null ? void 0 : l(c, m),
266
273
  href: S,
267
274
  ...Z
268
- }, ne = S != null ? _e : ge;
269
- return /* @__PURE__ */ N.jsx(ne, { className: u.BE("list", "item"), ...te, children: /* @__PURE__ */ N.jsx(
275
+ }, ne = S != null ? ve : ge;
276
+ return /* @__PURE__ */ N.jsx(ne, { className: h.BE("list", "item"), ...te, children: /* @__PURE__ */ N.jsx(
270
277
  ue,
271
278
  {
272
279
  id: `text-${c}`,
273
280
  level: "p",
274
281
  allowDoubleClick: !1,
275
- value: R,
276
- disabled: !v,
277
- onChange: (p) => a == null ? void 0 : a(c, p)
282
+ value: P,
283
+ disabled: !_,
284
+ onChange: (m) => a == null ? void 0 : a(c, m)
278
285
  }
279
286
  ) });
280
287
  }
281
288
  );
282
289
  G.displayName = "Tree.Item";
283
- const $e = Ee(G), Oe = ({
290
+ const Re = Ee(G), Oe = ({
284
291
  nodes: e,
285
292
  selected: t = [],
286
293
  onSelect: r,
287
294
  onDrop: n,
288
295
  onRename: a,
289
296
  onSuccessfulDrop: s,
290
- onDoubleClick: o,
297
+ onDoubleClick: l,
291
298
  className: i,
292
- children: l = $e,
293
- itemHeight: x = 27,
299
+ children: o = Re,
300
+ itemHeight: u = 27,
294
301
  useMargin: c = !1,
295
- showRules: _ = !1,
296
- virtual: v = !0,
302
+ showRules: v = !1,
303
+ virtual: _ = !0,
297
304
  clearExpanded: I,
298
305
  expand: L,
299
- contract: R,
300
- emptyContent: h,
301
- loading: j,
306
+ contract: P,
307
+ emptyContent: p,
308
+ loading: $,
302
309
  ...S
303
310
  }) => {
304
- const f = v ? W.Virtual : W;
305
- return /* @__PURE__ */ N.jsx(Ie, { data: e, emptyContent: h, children: /* @__PURE__ */ N.jsx(
311
+ const f = _ ? Y.Virtual : Y;
312
+ return /* @__PURE__ */ N.jsx(Ie, { data: e, emptyContent: p, children: /* @__PURE__ */ N.jsx(
306
313
  xe,
307
314
  {
308
315
  value: t,
@@ -312,45 +319,45 @@ const $e = Ee(G), Oe = ({
312
319
  children: /* @__PURE__ */ N.jsx(
313
320
  f,
314
321
  {
315
- itemHeight: x,
316
- className: u(i, u.B("tree"), _ && u.M("rules")),
322
+ itemHeight: u,
323
+ className: h(i, h.B("tree"), v && h.M("rules")),
317
324
  ...S,
318
- children: ({ key: d, ...g }) => l({
319
- ...g,
325
+ children: ({ key: d, ...x }) => o({
326
+ ...x,
320
327
  key: d,
321
- loading: j === d,
328
+ loading: $ === d,
322
329
  useMargin: c,
323
330
  onDrop: n,
324
331
  onRename: a,
325
332
  onSuccessfulDrop: s,
326
- onDoubleClick: o
333
+ onDoubleClick: l
327
334
  })
328
335
  }
329
336
  )
330
337
  }
331
338
  ) });
332
- }, Ae = (e, t) => ye(`text-${e}`, t), Be = (e) => Ce(`text-${e}`), We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
339
+ }, Ae = (e, t) => ye(`text-${e}`, t), Be = (e) => Ce(`text-${e}`), Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
333
340
  __proto__: null,
334
341
  DefaultItem: G,
335
342
  HAUL_TYPE: M,
336
343
  Tree: Oe,
337
344
  asyncRename: Be,
338
- deepCopy: q,
345
+ deepCopy: J,
339
346
  findNode: T,
340
- findNodeParent: $,
341
- findNodes: je,
347
+ findNodeParent: R,
348
+ findNodes: $e,
342
349
  flatten: K,
343
- getDescendants: J,
350
+ getDescendants: Q,
344
351
  moveNode: Se,
345
- removeNode: Y,
346
- setNode: z,
347
- shouldExpand: X,
352
+ removeNode: V,
353
+ setNode: q,
354
+ shouldExpand: z,
348
355
  sortAndSplice: H,
349
356
  startRenaming: Ae,
350
357
  updateNode: we,
351
358
  updateNodeChildren: Le,
352
- use: Re
359
+ use: Pe
353
360
  }, Symbol.toStringTag, { value: "Module" }));
354
361
  export {
355
- We as e
362
+ Ye as e
356
363
  };
@@ -1,5 +1,5 @@
1
- import { C as e, d as t, e as o, f as a } from "./Toggle-Cdu7WaiC.js";
2
- import { C as n, D as s, I as r, a as u, b as C, M as m, c as T, u as i } from "./Item--wCat2DH.js";
1
+ import { C as e, d as t, e as o, f as a } from "./Toggle-CLkPIiQK.js";
2
+ import { C as n, D as s, I as r, a as u, b as C, M as m, c as T, u as i } from "./Item-4yG7GmwK.js";
3
3
  const x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
4
  __proto__: null,
5
5
  CONTEXT_SELECTED: e,
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./css-BghghSL0.cjs"),e=require("./Toggle-DnW_7Wr_.cjs"),r=Object.freeze(Object.defineProperty({__proto__:null,Color:t.Color,GradientPicker:e.GradientPicker,Picker:e.Picker,Provider:e.Provider$1,Swatch:e.Swatch,ZERO:t.ZERO,ZERO_CONTEXT_STATE:e.ZERO_CONTEXT_STATE,contextStateZ:e.contextStateZ,crudeZ:t.crudeZ,cssString:t.cssString,frequentZ:e.frequentZ,fromGradient:t.fromGradient,fromHSLA:t.fromHSLA,gradientZ:t.gradientZ,paletteZ:t.paletteZ,recalculate:e.recalculate,relevancyZ:e.relevancyZ,stopZ:t.stopZ,toHex:t.toHex,useContext:e.useContext$1,useFrequent:e.useFrequent,useFrequentUpdater:e.useFrequentUpdater,usePalette:e.usePalette,useRequiredPalette:e.useRequiredPalette},Symbol.toStringTag,{value:"Module"}));exports.external=r;
@@ -1 +1 @@
1
- "use strict";const y=require("./Toggle-CP9KtybX.cjs"),Fe=require("./jsx-runtime-Cek9Ww4S.cjs"),$e=require("react"),de=require("./aggregator-C0Ab25_o.cjs");require("./css-Dh7n0EGs.cjs");require("./Pack-DijAGcm_.cjs");const Ne=require("./List-C8vXIE2j.cjs"),ge=Symbol(),ee=Symbol(),T="a",N="w";let De=(t,e)=>new Proxy(t,e);const U=Object.getPrototypeOf,ie=new WeakMap,te=t=>t&&(ie.has(t)?ie.get(t):U(t)===Object.prototype||U(t)===Array.prototype),ce=t=>typeof t=="object"&&t!==null,oe=new WeakMap,pe=t=>t[ee]||t,me=(t,e,s)=>{if(!te(t))return t;const r=pe(t),i=(c=>Object.isFrozen(c)||Object.values(Object.getOwnPropertyDescriptors(c)).some(o=>!o.writable))(r);let n=s&&s.get(r);return n&&n[1].f===i||(n=((c,o)=>{const a={f:o};let h=!1;const l=(f,g)=>{if(!h){let p=a[T].get(c);if(p||(p={},a[T].set(c,p)),f===N)p[N]=!0;else{let m=p[f];m||(m=new Set,p[f]=m),m.add(g)}}},u={get:(f,g)=>g===ee?c:(l("k",g),me(Reflect.get(f,g),a[T],a.c)),has:(f,g)=>g===ge?(h=!0,a[T].delete(c),!0):(l("h",g),Reflect.has(f,g)),getOwnPropertyDescriptor:(f,g)=>(l("o",g),Reflect.getOwnPropertyDescriptor(f,g)),ownKeys:f=>(l(N),Reflect.ownKeys(f))};return o&&(u.set=u.deleteProperty=()=>!1),[u,a]})(r,i),n[1].p=De(i?(c=>{let o=oe.get(c);if(!o){if(Array.isArray(c))o=Array.from(c);else{const a=Object.getOwnPropertyDescriptors(c);Object.values(a).forEach(h=>{h.configurable=!0}),o=Object.create(U(c),a)}oe.set(c,o)}return o})(r):r,n[0]),s&&s.set(r,n)),n[1][T]=e,n[1].c=s,n[1].p},ye=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!ce(t)||!ce(e))return!0;const i=s.get(pe(t));if(!i)return!0;if(r){const c=r.get(t);if(c&&c.n===e)return c.g;r.set(t,{n:e,g:!1})}let n=null;try{for(const c of i.h||[])if(n=Reflect.has(t,c)!==Reflect.has(e,c),n)return n;if(i[N]===!0){if(n=((c,o)=>{const a=Reflect.ownKeys(c),h=Reflect.ownKeys(o);return a.length!==h.length||a.some((l,u)=>l!==h[u])})(t,e),n)return n}else for(const c of i.o||[])if(n=!!Reflect.getOwnPropertyDescriptor(t,c)!=!!Reflect.getOwnPropertyDescriptor(e,c),n)return n;for(const c of i.k||[])if(n=ye(t[c],e[c],s,r),n)return n;return n===null&&(n=!0),n}finally{r&&r.set(t,{n:e,g:n})}},je=t=>!!te(t)&&ge in t,Me=t=>te(t)&&t[ee]||null,Ke="h",Ye="w",We="o",ze="k",V=t=>typeof t=="object"&&t!==null,Ee=(t,e)=>{if(!V(t))return t;const s=Me(t);return s!==null?(je(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,i])=>{const n=Ee(i,e);Object.is(n,i)||(t[r]=n)})),t)},B=(t,e,s)=>{var r,i,n;if(!V(t)||!V(e))return;const c=s.get(Me(e)||e);c&&((r=c[Ke])==null||r.forEach(o=>{Reflect.has(t,o)}),c[Ye]===!0&&Reflect.ownKeys(t),(i=c[We])==null||i.forEach(o=>{Reflect.getOwnPropertyDescriptor(t,o)}),(n=c[ze])==null||n.forEach(o=>{B(t[o],e[o],s)}))},Y="o",W="r",z="a";function He(t,e){var s;let r=0;const i=(s=e==null?void 0:e.size)!=null?s:1,n=[],c=e!=null&&e.noWeakMap?null:new WeakMap;return a=>{const h=c==null?void 0:c.get(a);if(h)return h[W];for(let p=0;p<i;p+=1){const m=n[(r+p)%i];if(!m)break;if(!ye(m[Y],a,m[z],new WeakMap))return B(a,m[Y],m[z]),c==null||c.set(a,m),m[W]}const l=new WeakMap,u=me(a,l),f=Ee(t(u),new Set);B(a,a,l);const g={[Y]:a,[W]:f,[z]:l};return r=(r-1+i)%i,n[r]=g,c==null||c.set(a,g),f}}const _e=(t,e)=>de.w.RUNTIME==="browser"?He(t,e):t;function R(t){return Array.isArray?Array.isArray(t):Re(t)==="[object Array]"}const Ue=1/0;function Ve(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Ue?"-0":e}function Be(t){return t==null?"":Ve(t)}function S(t){return typeof t=="string"}function Se(t){return typeof t=="number"}function Ge(t){return t===!0||t===!1||Je(t)&&Re(t)=="[object Boolean]"}function xe(t){return typeof t=="object"}function Je(t){return xe(t)&&t!==null}function M(t){return t!=null}function H(t){return!t.trim().length}function Re(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Qe="Incorrect 'index' type",Xe=t=>`Invalid value for key ${t}`,Ze=t=>`Pattern length exceeds max of ${t}.`,qe=t=>`Missing ${t} property in key`,et=t=>`Property 'weight' in key '${t}' must be a positive integer`,ae=Object.prototype.hasOwnProperty;class tt{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let i=Oe(r);this._keys.push(i),this._keyMap[i.id]=i,s+=i.weight}),this._keys.forEach(r=>{r.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Oe(t){let e=null,s=null,r=null,i=1,n=null;if(S(t)||R(t))r=t,e=le(t),s=G(t);else{if(!ae.call(t,"name"))throw new Error(qe("name"));const c=t.name;if(r=c,ae.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(et(c));e=le(c),s=G(c),n=t.getFn}return{path:e,id:s,weight:i,src:r,getFn:n}}function le(t){return R(t)?t:t.split(".")}function G(t){return R(t)?t.join("."):t}function st(t,e){let s=[],r=!1;const i=(n,c,o)=>{if(M(n))if(!c[o])s.push(n);else{let a=c[o];const h=n[a];if(!M(h))return;if(o===c.length-1&&(S(h)||Se(h)||Ge(h)))s.push(Be(h));else if(R(h)){r=!0;for(let l=0,u=h.length;l<u;l+=1)i(h[l],c,o+1)}else c.length&&i(h,c,o+1)}};return i(t,S(e)?e.split("."):e,0),r?s:s[0]}const rt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},nt={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},it={location:0,threshold:.6,distance:100},ct={useExtendedSearch:!1,getFn:st,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var d={...nt,...rt,...it,...ct};const ot=/[^ ]+/g;function at(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(i){const n=i.match(ot).length;if(s.has(n))return s.get(n);const c=1/Math.pow(n,.5*t),o=parseFloat(Math.round(c*r)/r);return s.set(n,o),o},clear(){s.clear()}}}class se{constructor({getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){this.norm=at(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,r)=>{this._keysMap[s.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,S(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();S(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,r=this.size();s<r;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!M(e)||H(e))return;let r={v:e,i:s,n:this.norm.get(e)};this.records.push(r)}_addObject(e,s){let r={i:s,$:{}};this.keys.forEach((i,n)=>{let c=i.getFn?i.getFn(e):this.getFn(e,i.path);if(M(c)){if(R(c)){let o=[];const a=[{nestedArrIndex:-1,value:c}];for(;a.length;){const{nestedArrIndex:h,value:l}=a.pop();if(M(l))if(S(l)&&!H(l)){let u={v:l,i:h,n:this.norm.get(l)};o.push(u)}else R(l)&&l.forEach((u,f)=>{a.push({nestedArrIndex:f,value:u})})}r.$[n]=o}else if(S(c)&&!H(c)){let o={v:c,n:this.norm.get(c)};r.$[n]=o}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function we(t,e,{getFn:s=d.getFn,fieldNormWeight:r=d.fieldNormWeight}={}){const i=new se({getFn:s,fieldNormWeight:r});return i.setKeys(t.map(Oe)),i.setSources(e),i.create(),i}function lt(t,{getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:r,records:i}=t,n=new se({getFn:e,fieldNormWeight:s});return n.setKeys(r),n.setIndexRecords(i),n}function $(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:i=d.distance,ignoreLocation:n=d.ignoreLocation}={}){const c=e/t.length;if(n)return c;const o=Math.abs(r-s);return i?c+o/i:o?1:c}function ht(t=[],e=d.minMatchCharLength){let s=[],r=-1,i=-1,n=0;for(let c=t.length;n<c;n+=1){let o=t[n];o&&r===-1?r=n:!o&&r!==-1&&(i=n-1,i-r+1>=e&&s.push([r,i]),r=-1)}return t[n-1]&&n-r>=e&&s.push([r,n-1]),s}const L=32;function ut(t,e,s,{location:r=d.location,distance:i=d.distance,threshold:n=d.threshold,findAllMatches:c=d.findAllMatches,minMatchCharLength:o=d.minMatchCharLength,includeMatches:a=d.includeMatches,ignoreLocation:h=d.ignoreLocation}={}){if(e.length>L)throw new Error(Ze(L));const l=e.length,u=t.length,f=Math.max(0,Math.min(r,u));let g=n,p=f;const m=o>1||a,A=m?Array(u):[];let x;for(;(x=t.indexOf(e,p))>-1;){let E=$(e,{currentLocation:x,expectedLocation:f,distance:i,ignoreLocation:h});if(g=Math.min(E,g),p=x+l,m){let O=0;for(;O<l;)A[x+O]=1,O+=1}}p=-1;let P=[],b=1,v=l+u;const ve=1<<l-1;for(let E=0;E<l;E+=1){let O=0,w=v;for(;O<w;)$(e,{errors:E,currentLocation:f+w,expectedLocation:f,distance:i,ignoreLocation:h})<=g?O=w:v=w,w=Math.floor((v-O)/2+O);v=w;let re=Math.max(1,f-w+1),K=c?u:Math.min(f+w,u)+l,C=Array(K+2);C[K+1]=(1<<E)-1;for(let _=K;_>=re;_-=1){let F=_-1,ne=s[t.charAt(F)];if(m&&(A[F]=+!!ne),C[_]=(C[_+1]<<1|1)&ne,E&&(C[_]|=(P[_+1]|P[_])<<1|1|P[_+1]),C[_]&ve&&(b=$(e,{errors:E,currentLocation:F,expectedLocation:f,distance:i,ignoreLocation:h}),b<=g)){if(g=b,p=F,p<=f)break;re=Math.max(1,2*f-p)}}if($(e,{errors:E+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:h})>g)break;P=C}const j={isMatch:p>=0,score:Math.max(.001,b)};if(m){const E=ht(A,o);E.length?a&&(j.indices=E):j.isMatch=!1}return j}function ft(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const i=t.charAt(s);e[i]=(e[i]||0)|1<<r-s-1}return e}class Ie{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:i=d.distance,includeMatches:n=d.includeMatches,findAllMatches:c=d.findAllMatches,minMatchCharLength:o=d.minMatchCharLength,isCaseSensitive:a=d.isCaseSensitive,ignoreLocation:h=d.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:i,includeMatches:n,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(f,g)=>{this.chunks.push({pattern:f,alphabet:ft(f),startIndex:g})},u=this.pattern.length;if(u>L){let f=0;const g=u%L,p=u-g;for(;f<p;)l(this.pattern.substr(f,L),f),f+=L;if(g){const m=u-L;l(this.pattern.substr(m),m)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:r}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:i,distance:n,threshold:c,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],u=0,f=!1;this.chunks.forEach(({pattern:p,alphabet:m,startIndex:A})=>{const{isMatch:x,score:P,indices:b}=ut(e,p,m,{location:i+A,distance:n,threshold:c,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:h});x&&(f=!0),u+=P,x&&b&&(l=[...l,...b])});let g={isMatch:f,score:f?u/this.chunks.length:1};return f&&r&&(g.indices=l),g}}class I{constructor(e){this.pattern=e}static isMultiMatch(e){return he(e,this.multiRegex)}static isSingleMatch(e){return he(e,this.singleRegex)}search(){}}function he(t,e){const s=t.match(e);return s?s[1]:null}class dt extends I{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class gt extends I{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class pt extends I{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class mt extends I{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class yt extends I{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Mt extends I{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class Ae extends I{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:i=d.distance,includeMatches:n=d.includeMatches,findAllMatches:c=d.findAllMatches,minMatchCharLength:o=d.minMatchCharLength,isCaseSensitive:a=d.isCaseSensitive,ignoreLocation:h=d.ignoreLocation}={}){super(e),this._bitapSearch=new Ie(e,{location:s,threshold:r,distance:i,includeMatches:n,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class be extends I{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,r;const i=[],n=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+n,i.push([r,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}}const J=[dt,be,pt,mt,Mt,yt,gt,Ae],ue=J.length,Et=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,_t="|";function St(t,e={}){return t.split(_t).map(s=>{let r=s.trim().split(Et).filter(n=>n&&!!n.trim()),i=[];for(let n=0,c=r.length;n<c;n+=1){const o=r[n];let a=!1,h=-1;for(;!a&&++h<ue;){const l=J[h];let u=l.isMultiMatch(o);u&&(i.push(new l(u,e)),a=!0)}if(!a)for(h=-1;++h<ue;){const l=J[h];let u=l.isSingleMatch(o);if(u){i.push(new l(u,e));break}}}return i})}const xt=new Set([Ae.type,be.type]);class Rt{constructor(e,{isCaseSensitive:s=d.isCaseSensitive,includeMatches:r=d.includeMatches,minMatchCharLength:i=d.minMatchCharLength,ignoreLocation:n=d.ignoreLocation,findAllMatches:c=d.findAllMatches,location:o=d.location,threshold:a=d.threshold,distance:h=d.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:r,minMatchCharLength:i,findAllMatches:c,ignoreLocation:n,location:o,threshold:a,distance:h},this.pattern=s?e:e.toLowerCase(),this.query=St(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let n=0,c=[],o=0;for(let a=0,h=s.length;a<h;a+=1){const l=s[a];c.length=0,n=0;for(let u=0,f=l.length;u<f;u+=1){const g=l[u],{isMatch:p,indices:m,score:A}=g.search(e);if(p){if(n+=1,o+=A,r){const x=g.constructor.type;xt.has(x)?c=[...c,...m]:c.push(m)}}else{o=0,n=0,c.length=0;break}}if(n){let u={isMatch:!0,score:o/n};return r&&(u.indices=c),u}}return{isMatch:!1,score:1}}}const Q=[];function Ot(...t){Q.push(...t)}function X(t,e){for(let s=0,r=Q.length;s<r;s+=1){let i=Q[s];if(i.condition(t,e))return new i(t,e)}return new Ie(t,e)}const D={AND:"$and",OR:"$or"},Z={PATH:"$path",PATTERN:"$val"},q=t=>!!(t[D.AND]||t[D.OR]),wt=t=>!!t[Z.PATH],It=t=>!R(t)&&xe(t)&&!q(t),fe=t=>({[D.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Le(t,e,{auto:s=!0}={}){const r=i=>{let n=Object.keys(i);const c=wt(i);if(!c&&n.length>1&&!q(i))return r(fe(i));if(It(i)){const a=c?i[Z.PATH]:n[0],h=c?i[Z.PATTERN]:i[a];if(!S(h))throw new Error(Xe(a));const l={keyId:G(a),pattern:h};return s&&(l.searcher=X(h,e)),l}let o={children:[],operator:n[0]};return n.forEach(a=>{const h=i[a];R(h)&&h.forEach(l=>{o.children.push(r(l))})}),o};return q(t)||(t=fe(t)),r(t)}function At(t,{ignoreFieldNorm:e=d.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:i,norm:n,score:c})=>{const o=i?i.weight:null;r*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(e?1:n))}),s.score=r})}function bt(t,e){const s=t.matches;e.matches=[],M(s)&&s.forEach(r=>{if(!M(r.indices)||!r.indices.length)return;const{indices:i,value:n}=r;let c={indices:i,value:n};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),e.matches.push(c)})}function Lt(t,e){e.score=t.score}function Pt(t,e,{includeMatches:s=d.includeMatches,includeScore:r=d.includeScore}={}){const i=[];return s&&i.push(bt),r&&i.push(Lt),t.map(n=>{const{idx:c}=n,o={item:e[c],refIndex:c};return i.length&&i.forEach(a=>{a(n,o)}),o})}class k{constructor(e,s={},r){this.options={...d,...s},this.options.useExtendedSearch,this._keyStore=new tt(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof se))throw new Error(Qe);this._myIndex=s||we(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){M(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let r=0,i=this._docs.length;r<i;r+=1){const n=this._docs[r];e(n,r)&&(this.removeAt(r),r-=1,i-=1,s.push(n))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:n,sortFn:c,ignoreFieldNorm:o}=this.options;let a=S(e)?S(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return At(a,{ignoreFieldNorm:o}),n&&a.sort(c),Se(s)&&s>-1&&(a=a.slice(0,s)),Pt(a,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const s=X(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:n,i:c,n:o})=>{if(!M(n))return;const{isMatch:a,score:h,indices:l}=s.searchIn(n);a&&i.push({item:n,idx:c,matches:[{score:h,value:n,norm:o,indices:l}]})}),i}_searchLogical(e){const s=Le(e,this.options),r=(o,a,h)=>{if(!o.children){const{keyId:u,searcher:f}=o,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(a,u),searcher:f});return g&&g.length?[{idx:h,item:a,matches:g}]:[]}const l=[];for(let u=0,f=o.children.length;u<f;u+=1){const g=o.children[u],p=r(g,a,h);if(p.length)l.push(...p);else if(o.operator===D.AND)return[]}return l},i=this._myIndex.records,n={},c=[];return i.forEach(({$:o,i:a})=>{if(M(o)){let h=r(s,o,a);h.length&&(n[a]||(n[a]={idx:a,item:o,matches:[]},c.push(n[a])),h.forEach(({matches:l})=>{n[a].matches.push(...l)}))}}),c}_searchObjectList(e){const s=X(e,this.options),{keys:r,records:i}=this._myIndex,n=[];return i.forEach(({$:c,i:o})=>{if(!M(c))return;let a=[];r.forEach((h,l)=>{a.push(...this._findMatches({key:h,value:c[l],searcher:s}))}),a.length&&n.push({idx:o,item:c,matches:a})}),n}_findMatches({key:e,value:s,searcher:r}){if(!M(s))return[];let i=[];if(R(s))s.forEach(({v:n,i:c,n:o})=>{if(!M(n))return;const{isMatch:a,score:h,indices:l}=r.searchIn(n);a&&i.push({score:h,key:e,value:n,idx:c,norm:o,indices:l})});else{const{v:n,n:c}=s,{isMatch:o,score:a,indices:h}=r.searchIn(n);o&&i.push({score:a,key:e,value:n,norm:c,indices:h})}return i}}k.version="7.0.0";k.createIndex=we;k.parseIndex=lt;k.config=d;k.parseQuery=Le;Ot(Rt);const Ct={threshold:.3},Pe=t=>e=>{const s=new k(e,{keys:Object.keys(e[0]),...Ct,...t});return{type:"fuse",page:(r,i)=>e.slice(r*i,(r+1)*i),search:r=>s.search(r).map(({item:i})=>i),retrieve:r=>e.filter(i=>r.includes(i.key))}},kt=Pe(),Ce=({term:t,searcher:e=kt})=>_e(({data:s})=>typeof e=="function"?t.length===0||(s==null?void 0:s.length)===0?{data:s,transformed:!1}:{data:e(s).search(t),transformed:!0}:{data:e.search(t),transformed:!0}),ke=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[i,n]=de.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:c,deleteTransform:o}=y.useDataUtilContext(),a=y.useDebouncedCallback(c,t,[]),h=$e.useCallback(l=>{n(l),l.length===0?o("filter"):(r!=null&&(l=r(l)),a("filter",Ce({term:l})))},[n,r]);return{value:i,onChange:h}},Te=({children:t=s=>Fe.jsxRuntimeExports.jsx(y.Text$1,{placeholder:"Filter",...s}),...e})=>t(ke(e)),Tt=Object.freeze(Object.defineProperty({__proto__:null,Column:y.Column,ColumnContext:y.ColumnContext,Core:y.Core,DataProvider:y.DataProvider,Filter:Te,Hover:y.Hover,ItemFrame:y.ItemFrame,List:Ne.List,Search:y.Search,Selector:y.Selector,selectValueIsZero:y.selectValueIsZero,useDataContext:y.useDataContext,useDataUtilContext:y.useDataUtilContext,useFilter:ke,useGetTransformedData:y.useGetTransformedData,useHoverContext:y.useHoverContext,useSearch:y.useSearch,useSelect:y.useSelect,useSelection:y.useSelection,useSelectionContext:y.useSelectionContext,useSelectionUtils:y.useSelectionUtils,useSetSourceData:y.useSetSourceData,useSourceData:y.useSourceData,useTransformedData:y.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Te;exports.createFilterTransform=Ce;exports.external=Tt;exports.fuseFilter=Pe;exports.proxyMemo=_e;
1
+ "use strict";const y=require("./Toggle-DnW_7Wr_.cjs"),Fe=require("./jsx-runtime-Cek9Ww4S.cjs"),$e=require("react"),de=require("./aggregator-y-jNJhKX.cjs");require("./css-BghghSL0.cjs");require("./Pack-Dvf8sQVK.cjs");const Ne=require("./List-Pyj0u9YT.cjs"),ge=Symbol(),ee=Symbol(),T="a",N="w";let De=(t,e)=>new Proxy(t,e);const U=Object.getPrototypeOf,ie=new WeakMap,te=t=>t&&(ie.has(t)?ie.get(t):U(t)===Object.prototype||U(t)===Array.prototype),ce=t=>typeof t=="object"&&t!==null,oe=new WeakMap,pe=t=>t[ee]||t,me=(t,e,s)=>{if(!te(t))return t;const r=pe(t),i=(c=>Object.isFrozen(c)||Object.values(Object.getOwnPropertyDescriptors(c)).some(o=>!o.writable))(r);let n=s&&s.get(r);return n&&n[1].f===i||(n=((c,o)=>{const a={f:o};let h=!1;const l=(f,g)=>{if(!h){let p=a[T].get(c);if(p||(p={},a[T].set(c,p)),f===N)p[N]=!0;else{let m=p[f];m||(m=new Set,p[f]=m),m.add(g)}}},u={get:(f,g)=>g===ee?c:(l("k",g),me(Reflect.get(f,g),a[T],a.c)),has:(f,g)=>g===ge?(h=!0,a[T].delete(c),!0):(l("h",g),Reflect.has(f,g)),getOwnPropertyDescriptor:(f,g)=>(l("o",g),Reflect.getOwnPropertyDescriptor(f,g)),ownKeys:f=>(l(N),Reflect.ownKeys(f))};return o&&(u.set=u.deleteProperty=()=>!1),[u,a]})(r,i),n[1].p=De(i?(c=>{let o=oe.get(c);if(!o){if(Array.isArray(c))o=Array.from(c);else{const a=Object.getOwnPropertyDescriptors(c);Object.values(a).forEach(h=>{h.configurable=!0}),o=Object.create(U(c),a)}oe.set(c,o)}return o})(r):r,n[0]),s&&s.set(r,n)),n[1][T]=e,n[1].c=s,n[1].p},ye=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!ce(t)||!ce(e))return!0;const i=s.get(pe(t));if(!i)return!0;if(r){const c=r.get(t);if(c&&c.n===e)return c.g;r.set(t,{n:e,g:!1})}let n=null;try{for(const c of i.h||[])if(n=Reflect.has(t,c)!==Reflect.has(e,c),n)return n;if(i[N]===!0){if(n=((c,o)=>{const a=Reflect.ownKeys(c),h=Reflect.ownKeys(o);return a.length!==h.length||a.some((l,u)=>l!==h[u])})(t,e),n)return n}else for(const c of i.o||[])if(n=!!Reflect.getOwnPropertyDescriptor(t,c)!=!!Reflect.getOwnPropertyDescriptor(e,c),n)return n;for(const c of i.k||[])if(n=ye(t[c],e[c],s,r),n)return n;return n===null&&(n=!0),n}finally{r&&r.set(t,{n:e,g:n})}},je=t=>!!te(t)&&ge in t,Me=t=>te(t)&&t[ee]||null,Ke="h",Ye="w",We="o",ze="k",V=t=>typeof t=="object"&&t!==null,Ee=(t,e)=>{if(!V(t))return t;const s=Me(t);return s!==null?(je(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,i])=>{const n=Ee(i,e);Object.is(n,i)||(t[r]=n)})),t)},B=(t,e,s)=>{var r,i,n;if(!V(t)||!V(e))return;const c=s.get(Me(e)||e);c&&((r=c[Ke])==null||r.forEach(o=>{Reflect.has(t,o)}),c[Ye]===!0&&Reflect.ownKeys(t),(i=c[We])==null||i.forEach(o=>{Reflect.getOwnPropertyDescriptor(t,o)}),(n=c[ze])==null||n.forEach(o=>{B(t[o],e[o],s)}))},Y="o",W="r",z="a";function He(t,e){var s;let r=0;const i=(s=e==null?void 0:e.size)!=null?s:1,n=[],c=e!=null&&e.noWeakMap?null:new WeakMap;return a=>{const h=c==null?void 0:c.get(a);if(h)return h[W];for(let p=0;p<i;p+=1){const m=n[(r+p)%i];if(!m)break;if(!ye(m[Y],a,m[z],new WeakMap))return B(a,m[Y],m[z]),c==null||c.set(a,m),m[W]}const l=new WeakMap,u=me(a,l),f=Ee(t(u),new Set);B(a,a,l);const g={[Y]:a,[W]:f,[z]:l};return r=(r-1+i)%i,n[r]=g,c==null||c.set(a,g),f}}const _e=(t,e)=>de.w.RUNTIME==="browser"?He(t,e):t;function R(t){return Array.isArray?Array.isArray(t):Re(t)==="[object Array]"}const Ue=1/0;function Ve(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Ue?"-0":e}function Be(t){return t==null?"":Ve(t)}function S(t){return typeof t=="string"}function Se(t){return typeof t=="number"}function Ge(t){return t===!0||t===!1||Je(t)&&Re(t)=="[object Boolean]"}function xe(t){return typeof t=="object"}function Je(t){return xe(t)&&t!==null}function M(t){return t!=null}function H(t){return!t.trim().length}function Re(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Qe="Incorrect 'index' type",Xe=t=>`Invalid value for key ${t}`,Ze=t=>`Pattern length exceeds max of ${t}.`,qe=t=>`Missing ${t} property in key`,et=t=>`Property 'weight' in key '${t}' must be a positive integer`,ae=Object.prototype.hasOwnProperty;class tt{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let i=Oe(r);this._keys.push(i),this._keyMap[i.id]=i,s+=i.weight}),this._keys.forEach(r=>{r.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Oe(t){let e=null,s=null,r=null,i=1,n=null;if(S(t)||R(t))r=t,e=le(t),s=G(t);else{if(!ae.call(t,"name"))throw new Error(qe("name"));const c=t.name;if(r=c,ae.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(et(c));e=le(c),s=G(c),n=t.getFn}return{path:e,id:s,weight:i,src:r,getFn:n}}function le(t){return R(t)?t:t.split(".")}function G(t){return R(t)?t.join("."):t}function st(t,e){let s=[],r=!1;const i=(n,c,o)=>{if(M(n))if(!c[o])s.push(n);else{let a=c[o];const h=n[a];if(!M(h))return;if(o===c.length-1&&(S(h)||Se(h)||Ge(h)))s.push(Be(h));else if(R(h)){r=!0;for(let l=0,u=h.length;l<u;l+=1)i(h[l],c,o+1)}else c.length&&i(h,c,o+1)}};return i(t,S(e)?e.split("."):e,0),r?s:s[0]}const rt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},nt={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},it={location:0,threshold:.6,distance:100},ct={useExtendedSearch:!1,getFn:st,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var d={...nt,...rt,...it,...ct};const ot=/[^ ]+/g;function at(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(i){const n=i.match(ot).length;if(s.has(n))return s.get(n);const c=1/Math.pow(n,.5*t),o=parseFloat(Math.round(c*r)/r);return s.set(n,o),o},clear(){s.clear()}}}class se{constructor({getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){this.norm=at(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,r)=>{this._keysMap[s.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,S(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();S(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,r=this.size();s<r;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!M(e)||H(e))return;let r={v:e,i:s,n:this.norm.get(e)};this.records.push(r)}_addObject(e,s){let r={i:s,$:{}};this.keys.forEach((i,n)=>{let c=i.getFn?i.getFn(e):this.getFn(e,i.path);if(M(c)){if(R(c)){let o=[];const a=[{nestedArrIndex:-1,value:c}];for(;a.length;){const{nestedArrIndex:h,value:l}=a.pop();if(M(l))if(S(l)&&!H(l)){let u={v:l,i:h,n:this.norm.get(l)};o.push(u)}else R(l)&&l.forEach((u,f)=>{a.push({nestedArrIndex:f,value:u})})}r.$[n]=o}else if(S(c)&&!H(c)){let o={v:c,n:this.norm.get(c)};r.$[n]=o}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function we(t,e,{getFn:s=d.getFn,fieldNormWeight:r=d.fieldNormWeight}={}){const i=new se({getFn:s,fieldNormWeight:r});return i.setKeys(t.map(Oe)),i.setSources(e),i.create(),i}function lt(t,{getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:r,records:i}=t,n=new se({getFn:e,fieldNormWeight:s});return n.setKeys(r),n.setIndexRecords(i),n}function $(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:i=d.distance,ignoreLocation:n=d.ignoreLocation}={}){const c=e/t.length;if(n)return c;const o=Math.abs(r-s);return i?c+o/i:o?1:c}function ht(t=[],e=d.minMatchCharLength){let s=[],r=-1,i=-1,n=0;for(let c=t.length;n<c;n+=1){let o=t[n];o&&r===-1?r=n:!o&&r!==-1&&(i=n-1,i-r+1>=e&&s.push([r,i]),r=-1)}return t[n-1]&&n-r>=e&&s.push([r,n-1]),s}const L=32;function ut(t,e,s,{location:r=d.location,distance:i=d.distance,threshold:n=d.threshold,findAllMatches:c=d.findAllMatches,minMatchCharLength:o=d.minMatchCharLength,includeMatches:a=d.includeMatches,ignoreLocation:h=d.ignoreLocation}={}){if(e.length>L)throw new Error(Ze(L));const l=e.length,u=t.length,f=Math.max(0,Math.min(r,u));let g=n,p=f;const m=o>1||a,A=m?Array(u):[];let x;for(;(x=t.indexOf(e,p))>-1;){let E=$(e,{currentLocation:x,expectedLocation:f,distance:i,ignoreLocation:h});if(g=Math.min(E,g),p=x+l,m){let O=0;for(;O<l;)A[x+O]=1,O+=1}}p=-1;let P=[],b=1,v=l+u;const ve=1<<l-1;for(let E=0;E<l;E+=1){let O=0,w=v;for(;O<w;)$(e,{errors:E,currentLocation:f+w,expectedLocation:f,distance:i,ignoreLocation:h})<=g?O=w:v=w,w=Math.floor((v-O)/2+O);v=w;let re=Math.max(1,f-w+1),K=c?u:Math.min(f+w,u)+l,C=Array(K+2);C[K+1]=(1<<E)-1;for(let _=K;_>=re;_-=1){let F=_-1,ne=s[t.charAt(F)];if(m&&(A[F]=+!!ne),C[_]=(C[_+1]<<1|1)&ne,E&&(C[_]|=(P[_+1]|P[_])<<1|1|P[_+1]),C[_]&ve&&(b=$(e,{errors:E,currentLocation:F,expectedLocation:f,distance:i,ignoreLocation:h}),b<=g)){if(g=b,p=F,p<=f)break;re=Math.max(1,2*f-p)}}if($(e,{errors:E+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:h})>g)break;P=C}const j={isMatch:p>=0,score:Math.max(.001,b)};if(m){const E=ht(A,o);E.length?a&&(j.indices=E):j.isMatch=!1}return j}function ft(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const i=t.charAt(s);e[i]=(e[i]||0)|1<<r-s-1}return e}class Ie{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:i=d.distance,includeMatches:n=d.includeMatches,findAllMatches:c=d.findAllMatches,minMatchCharLength:o=d.minMatchCharLength,isCaseSensitive:a=d.isCaseSensitive,ignoreLocation:h=d.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:i,includeMatches:n,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(f,g)=>{this.chunks.push({pattern:f,alphabet:ft(f),startIndex:g})},u=this.pattern.length;if(u>L){let f=0;const g=u%L,p=u-g;for(;f<p;)l(this.pattern.substr(f,L),f),f+=L;if(g){const m=u-L;l(this.pattern.substr(m),m)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:r}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:i,distance:n,threshold:c,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],u=0,f=!1;this.chunks.forEach(({pattern:p,alphabet:m,startIndex:A})=>{const{isMatch:x,score:P,indices:b}=ut(e,p,m,{location:i+A,distance:n,threshold:c,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:h});x&&(f=!0),u+=P,x&&b&&(l=[...l,...b])});let g={isMatch:f,score:f?u/this.chunks.length:1};return f&&r&&(g.indices=l),g}}class I{constructor(e){this.pattern=e}static isMultiMatch(e){return he(e,this.multiRegex)}static isSingleMatch(e){return he(e,this.singleRegex)}search(){}}function he(t,e){const s=t.match(e);return s?s[1]:null}class dt extends I{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class gt extends I{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class pt extends I{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class mt extends I{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class yt extends I{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Mt extends I{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class Ae extends I{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:i=d.distance,includeMatches:n=d.includeMatches,findAllMatches:c=d.findAllMatches,minMatchCharLength:o=d.minMatchCharLength,isCaseSensitive:a=d.isCaseSensitive,ignoreLocation:h=d.ignoreLocation}={}){super(e),this._bitapSearch=new Ie(e,{location:s,threshold:r,distance:i,includeMatches:n,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class be extends I{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,r;const i=[],n=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+n,i.push([r,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}}const J=[dt,be,pt,mt,Mt,yt,gt,Ae],ue=J.length,Et=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,_t="|";function St(t,e={}){return t.split(_t).map(s=>{let r=s.trim().split(Et).filter(n=>n&&!!n.trim()),i=[];for(let n=0,c=r.length;n<c;n+=1){const o=r[n];let a=!1,h=-1;for(;!a&&++h<ue;){const l=J[h];let u=l.isMultiMatch(o);u&&(i.push(new l(u,e)),a=!0)}if(!a)for(h=-1;++h<ue;){const l=J[h];let u=l.isSingleMatch(o);if(u){i.push(new l(u,e));break}}}return i})}const xt=new Set([Ae.type,be.type]);class Rt{constructor(e,{isCaseSensitive:s=d.isCaseSensitive,includeMatches:r=d.includeMatches,minMatchCharLength:i=d.minMatchCharLength,ignoreLocation:n=d.ignoreLocation,findAllMatches:c=d.findAllMatches,location:o=d.location,threshold:a=d.threshold,distance:h=d.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:r,minMatchCharLength:i,findAllMatches:c,ignoreLocation:n,location:o,threshold:a,distance:h},this.pattern=s?e:e.toLowerCase(),this.query=St(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let n=0,c=[],o=0;for(let a=0,h=s.length;a<h;a+=1){const l=s[a];c.length=0,n=0;for(let u=0,f=l.length;u<f;u+=1){const g=l[u],{isMatch:p,indices:m,score:A}=g.search(e);if(p){if(n+=1,o+=A,r){const x=g.constructor.type;xt.has(x)?c=[...c,...m]:c.push(m)}}else{o=0,n=0,c.length=0;break}}if(n){let u={isMatch:!0,score:o/n};return r&&(u.indices=c),u}}return{isMatch:!1,score:1}}}const Q=[];function Ot(...t){Q.push(...t)}function X(t,e){for(let s=0,r=Q.length;s<r;s+=1){let i=Q[s];if(i.condition(t,e))return new i(t,e)}return new Ie(t,e)}const D={AND:"$and",OR:"$or"},Z={PATH:"$path",PATTERN:"$val"},q=t=>!!(t[D.AND]||t[D.OR]),wt=t=>!!t[Z.PATH],It=t=>!R(t)&&xe(t)&&!q(t),fe=t=>({[D.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Le(t,e,{auto:s=!0}={}){const r=i=>{let n=Object.keys(i);const c=wt(i);if(!c&&n.length>1&&!q(i))return r(fe(i));if(It(i)){const a=c?i[Z.PATH]:n[0],h=c?i[Z.PATTERN]:i[a];if(!S(h))throw new Error(Xe(a));const l={keyId:G(a),pattern:h};return s&&(l.searcher=X(h,e)),l}let o={children:[],operator:n[0]};return n.forEach(a=>{const h=i[a];R(h)&&h.forEach(l=>{o.children.push(r(l))})}),o};return q(t)||(t=fe(t)),r(t)}function At(t,{ignoreFieldNorm:e=d.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:i,norm:n,score:c})=>{const o=i?i.weight:null;r*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(e?1:n))}),s.score=r})}function bt(t,e){const s=t.matches;e.matches=[],M(s)&&s.forEach(r=>{if(!M(r.indices)||!r.indices.length)return;const{indices:i,value:n}=r;let c={indices:i,value:n};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),e.matches.push(c)})}function Lt(t,e){e.score=t.score}function Pt(t,e,{includeMatches:s=d.includeMatches,includeScore:r=d.includeScore}={}){const i=[];return s&&i.push(bt),r&&i.push(Lt),t.map(n=>{const{idx:c}=n,o={item:e[c],refIndex:c};return i.length&&i.forEach(a=>{a(n,o)}),o})}class k{constructor(e,s={},r){this.options={...d,...s},this.options.useExtendedSearch,this._keyStore=new tt(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof se))throw new Error(Qe);this._myIndex=s||we(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){M(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let r=0,i=this._docs.length;r<i;r+=1){const n=this._docs[r];e(n,r)&&(this.removeAt(r),r-=1,i-=1,s.push(n))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:n,sortFn:c,ignoreFieldNorm:o}=this.options;let a=S(e)?S(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return At(a,{ignoreFieldNorm:o}),n&&a.sort(c),Se(s)&&s>-1&&(a=a.slice(0,s)),Pt(a,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const s=X(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:n,i:c,n:o})=>{if(!M(n))return;const{isMatch:a,score:h,indices:l}=s.searchIn(n);a&&i.push({item:n,idx:c,matches:[{score:h,value:n,norm:o,indices:l}]})}),i}_searchLogical(e){const s=Le(e,this.options),r=(o,a,h)=>{if(!o.children){const{keyId:u,searcher:f}=o,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(a,u),searcher:f});return g&&g.length?[{idx:h,item:a,matches:g}]:[]}const l=[];for(let u=0,f=o.children.length;u<f;u+=1){const g=o.children[u],p=r(g,a,h);if(p.length)l.push(...p);else if(o.operator===D.AND)return[]}return l},i=this._myIndex.records,n={},c=[];return i.forEach(({$:o,i:a})=>{if(M(o)){let h=r(s,o,a);h.length&&(n[a]||(n[a]={idx:a,item:o,matches:[]},c.push(n[a])),h.forEach(({matches:l})=>{n[a].matches.push(...l)}))}}),c}_searchObjectList(e){const s=X(e,this.options),{keys:r,records:i}=this._myIndex,n=[];return i.forEach(({$:c,i:o})=>{if(!M(c))return;let a=[];r.forEach((h,l)=>{a.push(...this._findMatches({key:h,value:c[l],searcher:s}))}),a.length&&n.push({idx:o,item:c,matches:a})}),n}_findMatches({key:e,value:s,searcher:r}){if(!M(s))return[];let i=[];if(R(s))s.forEach(({v:n,i:c,n:o})=>{if(!M(n))return;const{isMatch:a,score:h,indices:l}=r.searchIn(n);a&&i.push({score:h,key:e,value:n,idx:c,norm:o,indices:l})});else{const{v:n,n:c}=s,{isMatch:o,score:a,indices:h}=r.searchIn(n);o&&i.push({score:a,key:e,value:n,norm:c,indices:h})}return i}}k.version="7.0.0";k.createIndex=we;k.parseIndex=lt;k.config=d;k.parseQuery=Le;Ot(Rt);const Ct={threshold:.3},Pe=t=>e=>{const s=new k(e,{keys:Object.keys(e[0]),...Ct,...t});return{type:"fuse",page:(r,i)=>e.slice(r*i,(r+1)*i),search:r=>s.search(r).map(({item:i})=>i),retrieve:r=>e.filter(i=>r.includes(i.key))}},kt=Pe(),Ce=({term:t,searcher:e=kt})=>_e(({data:s})=>typeof e=="function"?t.length===0||(s==null?void 0:s.length)===0?{data:s,transformed:!1}:{data:e(s).search(t),transformed:!0}:{data:e.search(t),transformed:!0}),ke=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[i,n]=de.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:c,deleteTransform:o}=y.useDataUtilContext(),a=y.useDebouncedCallback(c,t,[]),h=$e.useCallback(l=>{n(l),l.length===0?o("filter"):(r!=null&&(l=r(l)),a("filter",Ce({term:l})))},[n,r]);return{value:i,onChange:h}},Te=({children:t=s=>Fe.jsxRuntimeExports.jsx(y.Text$1,{placeholder:"Filter",...s}),...e})=>t(ke(e)),Tt=Object.freeze(Object.defineProperty({__proto__:null,Column:y.Column,ColumnContext:y.ColumnContext,Core:y.Core,DataProvider:y.DataProvider,Filter:Te,Hover:y.Hover,ItemFrame:y.ItemFrame,List:Ne.List,Search:y.Search,Selector:y.Selector,selectValueIsZero:y.selectValueIsZero,useDataContext:y.useDataContext,useDataUtilContext:y.useDataUtilContext,useFilter:ke,useGetTransformedData:y.useGetTransformedData,useHoverContext:y.useHoverContext,useSearch:y.useSearch,useSelect:y.useSelect,useSelection:y.useSelection,useSelectionContext:y.useSelectionContext,useSelectionUtils:y.useSelectionUtils,useSetSourceData:y.useSetSourceData,useSourceData:y.useSourceData,useTransformedData:y.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Te;exports.createFilterTransform=Ce;exports.external=Tt;exports.fuseFilter=Pe;exports.proxyMemo=_e;
@@ -1 +1 @@
1
- "use strict";const l=require("./jsx-runtime-Cek9Ww4S.cjs"),u=require("./Toggle-CP9KtybX.cjs"),S=require("react"),_=require("./Pack-DijAGcm_.cjs"),r=require("./css-Dh7n0EGs.cjs"),z=require("./aggregator-C0Ab25_o.cjs");require("./Item-DuNQFmgk.cjs");const j=require("zod"),N=(n,s)=>S.cloneElement(n,{className:r.CSS(n.props.className,r.CSS.B("sub"),r.CSS.M(s))}),k=({topRight:n,topLeft:s,bottomLeft:e,bottomRight:o,children:t,className:c,...i})=>l.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...i,children:[n&&N(n,"topRight"),s&&N(s,"topLeft"),e&&N(e,"bottomLeft"),o&&N(o,"bottomRight"),t]}),W=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.Qt.Add,{}),...n}),X=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.Qt.Import,{}),...n}),y=(n,s)=>{if(n!=null){if(typeof n=="string"){const e=z._.get(u.Qt,n);return l.jsxRuntimeExports.jsx(e,{...s})}return S.cloneElement(n,s)}},$=Object.freeze(Object.defineProperty({__proto__:null,Create:W,Icon:k,Import:X,resolve:y},Symbol.toStringTag,{value:"Module"})),I=(n="",s=[])=>{var e;if(s.length!==0)return s.find(o=>o.tabKey===n)!=null?n:(e=s[s.length-1])==null?void 0:e.tabKey},M=(n,s,e)=>{if(s=s.trim(),s.length===0)return e;const o=e.find(t=>t.tabKey===n);return o==null||o.name===s?e:e.map(t=>t.tabKey===n?{...t,name:s}:t)},O=({tabs:n,content:s,selected:e,onSelect:o})=>{var x;const[t,c]=z.usePurePassthrough({initial:e??((x=n[0])==null?void 0:x.tabKey)??"",value:e,onChange:o}),i=u.useSyncedRef(e??t),a=S.useCallback(p=>{c(p),i.current==null&&(o==null||o(p))},[t,o]);return{tabs:n,selected:t,content:s,onSelect:a}},P=S.createContext({tabs:[]}),w=P.Provider,q=()=>S.useContext(P),Q=({id:n,content:s,children:e,onSelect:o,selected:t,selectedAltColor:c,closable:i,tabs:a,onClose:x,onDragStart:p,onDragEnd:b,onCreate:C,onRename:g,emptyContent:v,className:B,onDragOver:f,onDrop:R,contextMenu:m,size:E="medium",direction:T="y",...h})=>l.jsxRuntimeExports.jsx(_.Space,{id:n,empty:!0,className:r.CSS(r.CSS.B("tabs"),B),onDragOver:f,onDrop:R,direction:T,...h,children:l.jsxRuntimeExports.jsxs(w,{value:{tabs:a,emptyContent:v,selected:t,closable:i,content:e??s,onSelect:o,onClose:x,onDragStart:p,onDragEnd:b,onRename:g,onCreate:C,onDrop:R},children:[l.jsxRuntimeExports.jsx(A,{size:E,direction:r.g.swap(T),altColor:c,contextMenu:m}),l.jsxRuntimeExports.jsx(L,{})]})}),L=()=>{const{tabs:n,selected:s,content:e,emptyContent:o,onSelect:t}=q();let c=null;const i=n.find(a=>a.tabKey===s);return s==null||i==null?o??null:(e!=null?typeof e=="function"?c=e(i):c=e:i.content!=null&&(c=i.content),l.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>t==null?void 0:t(s),children:c}))},d="tabs-selector",A=({className:n,altColor:s=!1,size:e="medium",direction:o="x",contextMenu:t,...c})=>{const{tabs:i,selected:a,onSelect:x,onClose:p,closable:b,onDragEnd:C,onDragStart:g,onDrop:v,onRename:B,onCreate:f}=q(),R=u.useContextMenu(),m=l.jsxRuntimeExports.jsxs(_.Space,{className:r.CSS(r.CSS.B(d),r.CSS.size(e),n),align:"center",justify:"spaceBetween",onDrop:v,empty:!0,direction:o,...c,children:[l.jsxRuntimeExports.jsx(_.Space,{direction:o,className:r.CSS.BE(d,"tabs"),empty:!0,children:i.map(E=>l.jsxRuntimeExports.jsx(G,{selected:a,altColor:s,onSelect:x,onClose:p,onDragStart:g,onDragEnd:C,onRename:B,closable:E.closable??b,size:e,...E},E.tabKey))}),f!=null&&l.jsxRuntimeExports.jsx(_.Space,{className:r.CSS.BE(d,"actions"),children:l.jsxRuntimeExports.jsx(u.Icon,{size:e,sharp:!0,onClick:f,children:l.jsxRuntimeExports.jsx(u.Qt.Add,{})})})]});return t!=null?l.jsxRuntimeExports.jsx(u.ContextMenu,{style:{height:"fit-content"},...R,menu:t,children:m}):m},G=({selected:n,altColor:s=!1,onSelect:e,onClose:o,tabKey:t,name:c,onDragStart:i,onDragEnd:a,onRename:x,closable:p=!0,icon:b,size:C,editable:g=!0})=>{const v=S.useCallback(h=>i==null?void 0:i(h,{tabKey:t,name:c}),[i,t,c]),B=S.useCallback(h=>a==null?void 0:a(h,{tabKey:t,name:c}),[a,t,c]),f=S.useCallback(h=>{h.stopPropagation(),o==null||o(t)},[o,t]),R=S.useCallback(()=>e==null?void 0:e(t),[e,t]),m=n===t,E=b!=null,T=z.ComponentSizeLevels[C];return l.jsxRuntimeExports.jsxs(_.Pack,{size:C,id:t,className:r.CSS(r.CSS.BE(d,"btn"),u.CONTEXT_TARGET,x==null&&r.CSS.BEM(d,"btn","uneditable"),m&&u.CONTEXT_SELECTED,r.CSS.selected(m),r.CSS.altColor(s),p&&o!=null&&r.CSS.BEM(d,"btn","closable"),E&&r.CSS.BEM(d,"btn","has-icon")),draggable:!0,direction:"x",justify:"center",align:"center",onClick:R,onDragStart:v,onDragEnd:B,bordered:!1,rounded:!1,children:[y(b,{className:r.CSS.BE(d,"icon"),style:{color:r.CSS.shadeVar(7),height:r.CSS.levelSizeVar(T),width:r.CSS.levelSizeVar(T)}}),l.jsxRuntimeExports.jsx(F,{name:c,tabKey:t,onRename:x,editable:g,level:z.ComponentSizeLevels[C]}),p&&o!=null&&l.jsxRuntimeExports.jsx(u.Icon,{onClick:f,children:l.jsxRuntimeExports.jsx(u.Qt.Close,{"aria-label":"pluto-tabs__close"})})]})},F=({onRename:n,name:s,tabKey:e,editable:o=!0,...t})=>n==null||!o?l.jsxRuntimeExports.jsx(u.Text,{noWrap:!0,...t,children:s}):l.jsxRuntimeExports.jsx(u.Editable,{id:r.CSS.B(`tab-${e}`),onChange:c=>n(e,c),value:s,noWrap:!0,...t}),V=j.z.object({tabKey:j.z.string(),name:j.z.string(),closable:j.z.boolean().optional(),icon:j.z.unknown().optional(),editable:j.z.boolean().optional(),visible:j.z.boolean().optional()}),Z=V.extend({content:j.z.unknown().optional()}),H=Object.freeze(Object.defineProperty({__proto__:null,Content:L,Context:P,Provider:w,Selector:A,Tabs:Q,rename:M,resetSelection:I,specZ:V,tabZ:Z,useContext:q,useStatic:O},Symbol.toStringTag,{value:"Module"}));exports.Icon=$;exports.Tabs=Q;exports.external=H;exports.rename=M;exports.resetSelection=I;exports.resolve=y;exports.tabZ=Z;exports.useStatic=O;
1
+ "use strict";const l=require("./jsx-runtime-Cek9Ww4S.cjs"),u=require("./Toggle-DnW_7Wr_.cjs"),S=require("react"),_=require("./Pack-Dvf8sQVK.cjs"),r=require("./css-BghghSL0.cjs"),z=require("./aggregator-y-jNJhKX.cjs");require("./Item-DuYEON-n.cjs");const j=require("zod"),N=(n,s)=>S.cloneElement(n,{className:r.CSS(n.props.className,r.CSS.B("sub"),r.CSS.M(s))}),k=({topRight:n,topLeft:s,bottomLeft:e,bottomRight:o,children:t,className:c,...i})=>l.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...i,children:[n&&N(n,"topRight"),s&&N(s,"topLeft"),e&&N(e,"bottomLeft"),o&&N(o,"bottomRight"),t]}),X=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.e4.Add,{}),...n}),$=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.e4.Import,{}),...n}),y=(n,s)=>{if(n!=null){if(typeof n=="string"){const e=z._.get(u.e4,n);return l.jsxRuntimeExports.jsx(e,{...s})}return S.cloneElement(n,s)}},G=Object.freeze(Object.defineProperty({__proto__:null,Create:X,Icon:k,Import:$,resolve:y},Symbol.toStringTag,{value:"Module"})),I=(n="",s=[])=>{var e;if(s.length!==0)return s.find(o=>o.tabKey===n)!=null?n:(e=s[s.length-1])==null?void 0:e.tabKey},M=(n,s,e)=>{if(s=s.trim(),s.length===0)return e;const o=e.find(t=>t.tabKey===n);return o==null||o.name===s?e:e.map(t=>t.tabKey===n?{...t,name:s}:t)},O=({tabs:n,content:s,selected:e,onSelect:o})=>{var x;const[t,c]=z.usePurePassthrough({initial:e??((x=n[0])==null?void 0:x.tabKey)??"",value:e,onChange:o}),i=u.useSyncedRef(e??t),a=S.useCallback(p=>{c(p),i.current==null&&(o==null||o(p))},[t,o]);return{tabs:n,selected:t,content:s,onSelect:a}},P=S.createContext({tabs:[]}),w=P.Provider,q=()=>S.useContext(P),L=({id:n,content:s,children:e,onSelect:o,selected:t,selectedAltColor:c,closable:i,tabs:a,onClose:x,onDragStart:p,onDragEnd:b,onCreate:C,onRename:g,emptyContent:v,className:B,onDragOver:f,onDrop:R,contextMenu:m,size:E="medium",direction:T="y",...h})=>l.jsxRuntimeExports.jsx(_.Space,{id:n,empty:!0,className:r.CSS(r.CSS.B("tabs"),B),onDragOver:f,onDrop:R,direction:T,...h,children:l.jsxRuntimeExports.jsxs(w,{value:{tabs:a,emptyContent:v,selected:t,closable:i,content:e??s,onSelect:o,onClose:x,onDragStart:p,onDragEnd:b,onRename:g,onCreate:C,onDrop:R},children:[l.jsxRuntimeExports.jsx(V,{size:E,direction:r.g.swap(T),altColor:c,contextMenu:m}),l.jsxRuntimeExports.jsx(A,{})]})}),A=()=>{const{tabs:n,selected:s,content:e,emptyContent:o,onSelect:t}=q();let c=null;const i=n.find(a=>a.tabKey===s);return s==null||i==null?o??null:(e!=null?typeof e=="function"?c=e(i):c=e:i.content!=null&&(c=i.content),l.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>t==null?void 0:t(s),children:c}))},d="tabs-selector",V=({className:n,altColor:s=!1,size:e="medium",direction:o="x",contextMenu:t,...c})=>{const{tabs:i,selected:a,onSelect:x,onClose:p,closable:b,onDragEnd:C,onDragStart:g,onDrop:v,onRename:B,onCreate:f}=q(),R=u.useContextMenu(),m=l.jsxRuntimeExports.jsxs(_.Space,{className:r.CSS(r.CSS.B(d),r.CSS.size(e),n),align:"center",justify:"spaceBetween",onDrop:v,empty:!0,direction:o,...c,children:[l.jsxRuntimeExports.jsx(_.Space,{direction:o,className:r.CSS.BE(d,"tabs"),empty:!0,children:i.map(E=>l.jsxRuntimeExports.jsx(F,{selected:a,altColor:s,onSelect:x,onClose:p,onDragStart:g,onDragEnd:C,onRename:B,closable:E.closable??b,size:e,...E},E.tabKey))}),f!=null&&l.jsxRuntimeExports.jsx(_.Space,{className:r.CSS.BE(d,"actions"),children:l.jsxRuntimeExports.jsx(u.Icon,{size:e,sharp:!0,onClick:f,children:l.jsxRuntimeExports.jsx(u.e4.Add,{})})})]});return t!=null?l.jsxRuntimeExports.jsx(u.ContextMenu,{style:{height:"fit-content"},...R,menu:t,children:m}):m},F=({selected:n,altColor:s=!1,onSelect:e,onClose:o,tabKey:t,name:c,onDragStart:i,onDragEnd:a,onRename:x,closable:p=!0,icon:b,size:C,editable:g=!0})=>{const v=S.useCallback(h=>i==null?void 0:i(h,{tabKey:t,name:c}),[i,t,c]),B=S.useCallback(h=>a==null?void 0:a(h,{tabKey:t,name:c}),[a,t,c]),f=S.useCallback(h=>{h.stopPropagation(),o==null||o(t)},[o,t]),R=S.useCallback(()=>e==null?void 0:e(t),[e,t]),m=n===t,E=b!=null,T=z.ComponentSizeLevels[C];return l.jsxRuntimeExports.jsxs(_.Pack,{size:C,id:t,className:r.CSS(r.CSS.BE(d,"btn"),u.CONTEXT_TARGET,x==null&&r.CSS.BEM(d,"btn","uneditable"),m&&u.CONTEXT_SELECTED,r.CSS.selected(m),r.CSS.altColor(s),p&&o!=null&&r.CSS.BEM(d,"btn","closable"),E&&r.CSS.BEM(d,"btn","has-icon")),draggable:!0,direction:"x",justify:"center",align:"center",onClick:R,onDragStart:v,onDragEnd:B,bordered:!1,rounded:!1,children:[y(b,{className:r.CSS.BE(d,"icon"),style:{color:r.CSS.shadeVar(7),height:r.CSS.levelSizeVar(T),width:r.CSS.levelSizeVar(T)}}),l.jsxRuntimeExports.jsx(H,{name:c,tabKey:t,onRename:x,editable:g,level:z.ComponentSizeLevels[C]}),p&&o!=null&&l.jsxRuntimeExports.jsx(u.Icon,{onClick:f,children:l.jsxRuntimeExports.jsx(u.e4.Close,{"aria-label":"pluto-tabs__close"})})]})},H=({onRename:n,name:s,tabKey:e,editable:o=!0,...t})=>n==null||!o?l.jsxRuntimeExports.jsx(u.Text,{noWrap:!0,...t,children:s}):l.jsxRuntimeExports.jsx(u.Editable,{id:r.CSS.B(`tab-${e}`),onChange:c=>n(e,c),value:s,noWrap:!0,...t}),Z=j.z.object({tabKey:j.z.string(),name:j.z.string(),closable:j.z.boolean().optional(),icon:j.z.unknown().optional(),editable:j.z.boolean().optional(),visible:j.z.boolean().optional()}),W=Z.extend({content:j.z.unknown().optional()}),J=Object.freeze(Object.defineProperty({__proto__:null,Content:A,Context:P,Provider:w,Selector:V,Tabs:L,rename:M,resetSelection:I,specZ:Z,tabZ:W,useContext:q,useStatic:O},Symbol.toStringTag,{value:"Module"}));exports.Icon=G;exports.Tabs=L;exports.external=J;exports.rename=M;exports.resetSelection=I;exports.resolve=y;exports.tabZ=W;exports.useStatic=O;