@sheetxl/studio-vanilla 0.4.20 → 0.4.21

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 (178) hide show
  1. package/browser/cjs/index.cjs +80 -2
  2. package/browser/cjs/{DlL3FUzHZ4HVF-yg.cjs → n6CXzSocLW_BCO8w.cjs} +6 -6
  3. package/browser/esm/{BFUWwMA9uskwVkew.mjs → NBuS53B7u8hItiXf.mjs} +933 -937
  4. package/browser/esm/index.mjs +176 -4
  5. package/cdn/assets/CY8njwo06MWkoPz2.js +21 -0
  6. package/cdn/index.js +2 -2
  7. package/cdn/loader.js +1 -1
  8. package/package.json +3 -3
  9. package/browser/cjs/B3IrGavp2xDl72qi.cjs +0 -15
  10. package/browser/cjs/B4ScrvWBCXLzvNBz.cjs +0 -145
  11. package/browser/cjs/BBNggAKHDP4QyhrD.cjs +0 -6
  12. package/browser/cjs/BC_a9wiziJZdu6Au.cjs +0 -6
  13. package/browser/cjs/BDxykI6GcXpGGGMz.cjs +0 -42
  14. package/browser/cjs/BK6DsykAfJG4V-cJ.cjs +0 -6
  15. package/browser/cjs/BKow6xaj0GHFH5-V.cjs +0 -6
  16. package/browser/cjs/BOAxaoihJZZzZXhd.cjs +0 -6
  17. package/browser/cjs/BSlU398ba-ACAG1g.cjs +0 -11
  18. package/browser/cjs/BSoRD8INLnGqOd24.cjs +0 -7
  19. package/browser/cjs/BTxfWiE-FbVvlbXz.cjs +0 -11
  20. package/browser/cjs/BdltTXLt7iZT8sku.cjs +0 -6
  21. package/browser/cjs/Bf-D_AYDbEeRcsvz.cjs +0 -6
  22. package/browser/cjs/Bhlan81dumwgyb0S.cjs +0 -6
  23. package/browser/cjs/BlJixWFmG-z3n7dN.cjs +0 -6
  24. package/browser/cjs/BndDL5HS4RNIfwOd.cjs +0 -15
  25. package/browser/cjs/Buw8XeqL6XQwxqnQ.cjs +0 -32
  26. package/browser/cjs/C04_CccTUmfnv-ln.cjs +0 -6
  27. package/browser/cjs/C4AWzM1Uh9cuE1A9.cjs +0 -6
  28. package/browser/cjs/C5TLXtw93fBnRGm7.cjs +0 -378
  29. package/browser/cjs/CKa-Z1SfYc0pkIX2.cjs +0 -6
  30. package/browser/cjs/CLiSJrUNaSxa5Mn7.cjs +0 -16
  31. package/browser/cjs/CODi1uYlZ35lFLh9.cjs +0 -6
  32. package/browser/cjs/CSM5H5PTjrTaUgKK.cjs +0 -6
  33. package/browser/cjs/CTPgM-UqKCo4_hd1.cjs +0 -6
  34. package/browser/cjs/CW5RuE4isKBlwHmQ.cjs +0 -6
  35. package/browser/cjs/CX82d7xySIGMF7yM.cjs +0 -6
  36. package/browser/cjs/CXik9BghKbVW93T0.cjs +0 -124
  37. package/browser/cjs/Ccv5NHm99sYZnKE6.cjs +0 -7
  38. package/browser/cjs/CeH0O9zPmIGKjuT9.cjs +0 -19
  39. package/browser/cjs/CeLG8vmgbEkx4oD1.cjs +0 -6
  40. package/browser/cjs/CvYl4W2vXnvHHHoI.cjs +0 -6
  41. package/browser/cjs/D2J4RLkySRIXFbsa.cjs +0 -6
  42. package/browser/cjs/D2bZuhwA7aCEA0It.cjs +0 -6
  43. package/browser/cjs/D3hV1-QRPKCq0om8.cjs +0 -6
  44. package/browser/cjs/D6WxWENDWFXA_esX.cjs +0 -6
  45. package/browser/cjs/DEiPHs81OFnGI_GL.cjs +0 -6
  46. package/browser/cjs/DHiQ_sK8f-95Ft4X.cjs +0 -12
  47. package/browser/cjs/DMpqQkdCfg2AjXjR.cjs +0 -6
  48. package/browser/cjs/DUjgS2e8jjyhZF41.cjs +0 -6
  49. package/browser/cjs/DWIR1gQMiYyoUVpN.cjs +0 -7
  50. package/browser/cjs/DawJBg8LyIArkwdU.cjs +0 -6
  51. package/browser/cjs/Dn5IBCKPuNI0ypyZ.cjs +0 -6
  52. package/browser/cjs/Dp6UwWmFehNr8oln.cjs +0 -6
  53. package/browser/cjs/Dr95ZpJD5KpADFgL.cjs +0 -6
  54. package/browser/cjs/IxfGyvVPF27qqDF3.cjs +0 -6
  55. package/browser/cjs/P7jR9JAKpf5me2pK.cjs +0 -6
  56. package/browser/cjs/QonkTPcCkOm4Mvas.cjs +0 -6
  57. package/browser/cjs/T4zy652TD1RHF35F.cjs +0 -6
  58. package/browser/cjs/d6ywgaNww4eYXcem.cjs +0 -1501
  59. package/browser/cjs/dQ_t_glP-41DsAl-.cjs +0 -6
  60. package/browser/cjs/iIOyWIrlq0JiZyZX.cjs +0 -6
  61. package/browser/cjs/jX_tynzFoHAGPZOz.cjs +0 -6
  62. package/browser/cjs/nlzloz3gqSXQwTl5.cjs +0 -13
  63. package/browser/cjs/xPUjEhL251Mb-kyD.cjs +0 -161
  64. package/browser/cjs/zreCxaXU5L2iHQ99.cjs +0 -6
  65. package/browser/esm/2vIB3gG-Ct-P7aHY.mjs +0 -24
  66. package/browser/esm/B1qmfUH_Mmjtp3JU.mjs +0 -56
  67. package/browser/esm/B4ABRWtE31zu8-wJ.mjs +0 -21
  68. package/browser/esm/B6c_mMwG96t6MlCE.mjs +0 -10
  69. package/browser/esm/B7ohU_quBXWjiBEw.mjs +0 -3934
  70. package/browser/esm/BGJaDv3Ih-M1lFCD.mjs +0 -10
  71. package/browser/esm/BJkeQi-0GTlyPsTT.mjs +0 -52369
  72. package/browser/esm/BR2yOGMlFrbNy1I_.mjs +0 -472
  73. package/browser/esm/BRzxK84abQUinUUx.mjs +0 -10
  74. package/browser/esm/BS_-p_4yMCoR9FTp.mjs +0 -10
  75. package/browser/esm/BTbBL2qySirAIMIH.mjs +0 -1346
  76. package/browser/esm/Be9tvHxvnxnHNRa4.mjs +0 -12
  77. package/browser/esm/BfiejFYnvgVrrJPI.mjs +0 -10
  78. package/browser/esm/Bj4d7nd4XMugBsBg.mjs +0 -39
  79. package/browser/esm/Bmfu8IUFzu9KyCkA.mjs +0 -10
  80. package/browser/esm/BqgjdQ15LFcefVOZ.mjs +0 -425
  81. package/browser/esm/BuX3I7e8lbon25vL.mjs +0 -1702
  82. package/browser/esm/Bz0TojPavQ5NTjyD.mjs +0 -633
  83. package/browser/esm/CA33PnXmPNl09v6w.mjs +0 -84
  84. package/browser/esm/CPchasanZLQiASse.mjs +0 -10
  85. package/browser/esm/CSDiL3gZro2_BYTj.mjs +0 -10
  86. package/browser/esm/CT_g1GDC8_vSGR0o.mjs +0 -48
  87. package/browser/esm/CVvfga1mKyvzrvCr.mjs +0 -20
  88. package/browser/esm/CXSiJ-t5xz78GMwK.mjs +0 -10
  89. package/browser/esm/CYrbG4T_bwbc4Un4.mjs +0 -390
  90. package/browser/esm/CeSDjV2b8w7KibJw.mjs +0 -1466
  91. package/browser/esm/Cjp7NabZ26PaBnIT.mjs +0 -46
  92. package/browser/esm/CmLCIveZbsUFrSOH.mjs +0 -1665
  93. package/browser/esm/CpDyqZXpstRo2buW.mjs +0 -10
  94. package/browser/esm/CpQM3xIeariuqfsN.mjs +0 -47
  95. package/browser/esm/D2L4EVLdv-YwKGoi.mjs +0 -2344
  96. package/browser/esm/D7bqIxhqlHgc3Fih.mjs +0 -10
  97. package/browser/esm/DJx6S7TOhQyWdjS5.mjs +0 -10
  98. package/browser/esm/DR85glElKOQxCdEw.mjs +0 -820
  99. package/browser/esm/DWnopZ6R26qNLVyV.mjs +0 -10
  100. package/browser/esm/DaoqFa2lhVoZvd16.mjs +0 -421
  101. package/browser/esm/DgxaqoqInkc26SCt.mjs +0 -13208
  102. package/browser/esm/Dkf0_o7D9GkUfOZy.mjs +0 -147
  103. package/browser/esm/DlASr70UXrIpKZQO.mjs +0 -2174
  104. package/browser/esm/DmXkRZFP-WnV2YT9.mjs +0 -10
  105. package/browser/esm/DsabS3TdXZB45_O2.mjs +0 -1575
  106. package/browser/esm/Dvo7tXJcgnIXR-H7.mjs +0 -5582
  107. package/browser/esm/JdOvTKCcf5acl7vA.mjs +0 -10
  108. package/browser/esm/KUyPDaQO4D8lwO7O.mjs +0 -21
  109. package/browser/esm/KWZAe-e6U7Po4gCx.mjs +0 -44
  110. package/browser/esm/Qjkn8L0WuEQToAqm.mjs +0 -41
  111. package/browser/esm/RvEM-YtFLw3OMG0V.mjs +0 -29
  112. package/browser/esm/S2TZ7C9tQtDNeeGo.mjs +0 -10
  113. package/browser/esm/VYFESZA0Jc8C13ZT.mjs +0 -10
  114. package/browser/esm/_sUvLBCLSPhV2gF6.mjs +0 -10
  115. package/browser/esm/dWGGn8a_Ez8kVjgZ.mjs +0 -10
  116. package/browser/esm/dwY5oHtoGa_ktt9_.mjs +0 -1365
  117. package/browser/esm/giu63J2gO2p8JJIf.mjs +0 -10
  118. package/browser/esm/glJJyP0v0nlhAzqM.mjs +0 -10
  119. package/browser/esm/q5jyS6wUD9X8N3dI.mjs +0 -3755
  120. package/browser/esm/xbsV0YR05atX96kb.mjs +0 -10
  121. package/cdn/assets/2vIB3gG-Ct-P7aHY.js +0 -24
  122. package/cdn/assets/9GNkN_zTAHpnP-uq.js +0 -1575
  123. package/cdn/assets/B6c_mMwG96t6MlCE.js +0 -10
  124. package/cdn/assets/BBGivbkBG9VS_rL9.js +0 -3756
  125. package/cdn/assets/BCfZ9L4sqA1AhATQ.js +0 -46
  126. package/cdn/assets/BF0szY6Cs6OTiu4J.js +0 -22
  127. package/cdn/assets/BFvB3zk5mbav2VDI.js +0 -52200
  128. package/cdn/assets/BGJaDv3Ih-M1lFCD.js +0 -10
  129. package/cdn/assets/BGQ19MuEoWb0IGOg.js +0 -425
  130. package/cdn/assets/BKAFXvz5L4pnwrYW.js +0 -41
  131. package/cdn/assets/BRzxK84abQUinUUx.js +0 -10
  132. package/cdn/assets/BS_-p_4yMCoR9FTp.js +0 -10
  133. package/cdn/assets/BTbBL2qySirAIMIH.js +0 -1346
  134. package/cdn/assets/Be9tvHxvnxnHNRa4.js +0 -12
  135. package/cdn/assets/BfiejFYnvgVrrJPI.js +0 -10
  136. package/cdn/assets/Bj6XCGohW0EagXDQ.js +0 -1702
  137. package/cdn/assets/Bmfu8IUFzu9KyCkA.js +0 -10
  138. package/cdn/assets/Bnpwlyv8i_gnevRF.js +0 -3934
  139. package/cdn/assets/BnrLDtUMM23rGXOR.js +0 -390
  140. package/cdn/assets/Bz0TojPavQ5NTjyD.js +0 -633
  141. package/cdn/assets/C-saEYaoPI4gaVAh.js +0 -820
  142. package/cdn/assets/CBG91FlGgFb_NSW3.js +0 -1466
  143. package/cdn/assets/CO9eLmNMi1heLPMx.js +0 -2177
  144. package/cdn/assets/CPchasanZLQiASse.js +0 -10
  145. package/cdn/assets/CSDiL3gZro2_BYTj.js +0 -10
  146. package/cdn/assets/CXSiJ-t5xz78GMwK.js +0 -10
  147. package/cdn/assets/Cc_7h2P328hlBcqK.js +0 -472
  148. package/cdn/assets/CmLCIveZbsUFrSOH.js +0 -1665
  149. package/cdn/assets/CpDyqZXpstRo2buW.js +0 -10
  150. package/cdn/assets/Cv2EzXYuphY8Hlz2.js +0 -23
  151. package/cdn/assets/Cz1EUITrDS2M-lu2.js +0 -2346
  152. package/cdn/assets/D7bqIxhqlHgc3Fih.js +0 -10
  153. package/cdn/assets/DDWoPuN8AcPJHNxL.js +0 -58
  154. package/cdn/assets/DJx6S7TOhQyWdjS5.js +0 -10
  155. package/cdn/assets/DU8_1yjWbaEkXcbL.js +0 -12
  156. package/cdn/assets/DWnopZ6R26qNLVyV.js +0 -10
  157. package/cdn/assets/DYE-hWYAUd_f6MX8.js +0 -46
  158. package/cdn/assets/DaoqFa2lhVoZvd16.js +0 -421
  159. package/cdn/assets/DfpCefkqWIezzC8Z.js +0 -49
  160. package/cdn/assets/DgxaqoqInkc26SCt.js +0 -13208
  161. package/cdn/assets/DmXkRZFP-WnV2YT9.js +0 -10
  162. package/cdn/assets/EN4PLLABu5llaV3T.js +0 -21
  163. package/cdn/assets/JdOvTKCcf5acl7vA.js +0 -10
  164. package/cdn/assets/KUyPDaQO4D8lwO7O.js +0 -21
  165. package/cdn/assets/LbFq2oCowUDgCX8L.js +0 -43
  166. package/cdn/assets/S2TZ7C9tQtDNeeGo.js +0 -10
  167. package/cdn/assets/SPvRfEBpgC5rbgPz.js +0 -29
  168. package/cdn/assets/SsQFeDXfmfXHyy1R.js +0 -5582
  169. package/cdn/assets/TP7wJaHcKRz3uH_W.js +0 -50
  170. package/cdn/assets/UhBzX4vQryCjy6ce.js +0 -84
  171. package/cdn/assets/VYFESZA0Jc8C13ZT.js +0 -10
  172. package/cdn/assets/_sUvLBCLSPhV2gF6.js +0 -10
  173. package/cdn/assets/dWGGn8a_Ez8kVjgZ.js +0 -10
  174. package/cdn/assets/dwY5oHtoGa_ktt9_.js +0 -1365
  175. package/cdn/assets/giu63J2gO2p8JJIf.js +0 -10
  176. package/cdn/assets/glJJyP0v0nlhAzqM.js +0 -10
  177. package/cdn/assets/nsmFGDjpeUcAO4is.js +0 -149
  178. package/cdn/assets/xbsV0YR05atX96kb.js +0 -10
@@ -1,2177 +0,0 @@
1
- import { jsx as H, jsxs as We } from "react/jsx-runtime";
2
- import { an as to, ao as oo, ap as no, aq as ro, ar as io, as as Q, at as lo, au as so, av as ao, aw as co, p as Z, a7 as uo, a8 as ho, V as wt, ax as fo, h as he, l as po, ay as mo, az as go, aA as vo, a0 as fe, R as _o, U as So, a1 as yo, aB as wo, aC as Co, aD as De, aE as xo, aF as Ro, aG as bo, aH as ye, aI as zo, aJ as To, aK as q, aL as Io, aM as N, aN as V, aO as Po } from "./BFvB3zk5mbav2VDI.js";
3
- import * as x from "react";
4
- import Ct, { useState as pe, useMemo as ko, useEffect as je, cloneElement as Oo } from "react";
5
- /**
6
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
7
- *
8
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
9
- * License: The license can be found at https://www.sheetxl.com/license.
10
- */
11
- const Mo = x.createContext(), Lo = x.createContext();
12
- function Go(o) {
13
- return oo("MuiTableCell", o);
14
- }
15
- const Ao = to("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "sizeMedium", "paddingCheckbox", "paddingNone", "alignLeft", "alignCenter", "alignRight", "alignJustify", "stickyHeader"]), Eo = ro("td", { name: "MuiTableCell", slot: "Root", overridesResolver: (o, e) => {
16
- const { ownerState: t } = o;
17
- return [e.root, e[t.variant], e[`size${Q(t.size)}`], t.padding !== "normal" && e[`padding${Q(t.padding)}`], t.align !== "inherit" && e[`align${Q(t.align)}`], t.stickyHeader && e.stickyHeader];
18
- } })(so(({ theme: o }) => ({ ...o.typography.body2, display: "table-cell", verticalAlign: "inherit", borderBottom: o.vars ? `1px solid ${o.vars.palette.TableCell.border}` : `1px solid
19
- ${o.palette.mode === "light" ? ao(Z(o.palette.divider, 1), 0.88) : co(Z(o.palette.divider, 1), 0.68)}`, textAlign: "left", padding: 16, variants: [{ props: { variant: "head" }, style: { color: (o.vars || o).palette.text.primary, lineHeight: o.typography.pxToRem(24), fontWeight: o.typography.fontWeightMedium } }, { props: { variant: "body" }, style: { color: (o.vars || o).palette.text.primary } }, { props: { variant: "footer" }, style: { color: (o.vars || o).palette.text.secondary, lineHeight: o.typography.pxToRem(21), fontSize: o.typography.pxToRem(12) } }, { props: { size: "small" }, style: { padding: "6px 16px", [`&.${Ao.paddingCheckbox}`]: { width: 24, padding: "0 12px 0 16px", "& > *": { padding: 0 } } } }, { props: { padding: "checkbox" }, style: { width: 48, padding: "0 0 0 4px" } }, { props: { padding: "none" }, style: { padding: 0 } }, { props: { align: "left" }, style: { textAlign: "left" } }, { props: { align: "center" }, style: { textAlign: "center" } }, { props: { align: "right" }, style: { textAlign: "right", flexDirection: "row-reverse" } }, { props: { align: "justify" }, style: { textAlign: "justify" } }, { props: ({ ownerState: e }) => e.stickyHeader, style: { position: "sticky", top: 0, zIndex: 2, backgroundColor: (o.vars || o).palette.background.default } }] }))), Fe = x.forwardRef(function(o, e) {
20
- const t = no({ props: o, name: "MuiTableCell" }), { align: n = "inherit", className: r, component: l, padding: i, scope: a, size: s, sortDirection: c, variant: d, ...h } = t, f = x.useContext(Mo), u = x.useContext(Lo), v = u && u.variant === "head";
21
- let m;
22
- m = l || (v ? "th" : "td");
23
- let _ = a;
24
- m === "td" ? _ = void 0 : !_ && v && (_ = "col");
25
- const S = d || u && u.variant, y = { ...t, align: n, component: m, padding: i || (f && f.padding ? f.padding : "normal"), size: s || (f && f.size ? f.size : "medium"), sortDirection: c, stickyHeader: S === "head" && f && f.stickyHeader, variant: S }, g = ((C) => {
26
- const { classes: b, variant: R, align: T, padding: I, size: k, stickyHeader: P } = C, z = { root: ["root", R, P && "stickyHeader", T !== "inherit" && `align${Q(T)}`, I !== "normal" && `padding${Q(I)}`, `size${Q(k)}`] };
27
- return lo(z, Go, b);
28
- })(y);
29
- let w = null;
30
- return c && (w = c === "asc" ? "ascending" : "descending"), H(Eo, { as: m, ref: e, className: io(g.root, r), "aria-sort": w, scope: _, ownerState: y, ...h });
31
- }), Ho = wo();
32
- function we(o) {
33
- return o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as";
34
- }
35
- function K(o, e) {
36
- return e && o && typeof o == "object" && o.styles && !o.styles.startsWith("@layer") && (o.styles = `@layer ${e}{${String(o.styles)}}`), o;
37
- }
38
- function Wo(o) {
39
- return o ? (e, t) => t[o] : null;
40
- }
41
- function ve(o, e, t) {
42
- const n = typeof e == "function" ? e(o) : e;
43
- if (Array.isArray(n)) return n.flatMap((r) => ve(o, r, t));
44
- if (Array.isArray(n?.variants)) {
45
- let r;
46
- if (n.isProcessed) r = t ? K(n.style, t) : n.style;
47
- else {
48
- const { variants: l, ...i } = n;
49
- r = t ? K(q(i), t) : i;
50
- }
51
- return xt(o, n.variants, [r], t);
52
- }
53
- return n?.isProcessed ? t ? K(q(n.style), t) : n.style : t ? K(q(n), t) : n;
54
- }
55
- function xt(o, e, t = [], n = void 0) {
56
- let r;
57
- e: for (let l = 0; l < e.length; l += 1) {
58
- const i = e[l];
59
- if (typeof i.props == "function") {
60
- if (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, !i.props(r)) continue;
61
- } else for (const a in i.props) if (o[a] !== i.props[a] && o.ownerState?.[a] !== i.props[a]) continue e;
62
- typeof i.style == "function" ? (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, t.push(n ? K(q(i.style(r)), n) : i.style(r))) : t.push(n ? K(q(i.style), n) : i.style);
63
- }
64
- return t;
65
- }
66
- function Do(o) {
67
- return o && o.charAt(0).toLowerCase() + o.slice(1);
68
- }
69
- const jo = function(o = {}) {
70
- const { themeId: e, defaultTheme: t = Ho, rootShouldForwardProp: n = we, slotShouldForwardProp: r = we } = o;
71
- function l(i) {
72
- var a, s, c;
73
- s = e, c = t, (a = i).theme = function(d) {
74
- for (const h in d) return !1;
75
- return !0;
76
- }(a.theme) ? c : a.theme[s] || a.theme;
77
- }
78
- return (i, a = {}) => {
79
- Co(i, (b) => b.filter((R) => R !== De));
80
- const { name: s, slot: c, skipVariantsResolver: d, skipSx: h, overridesResolver: f = Wo(Do(c)), ...u } = a, v = s && s.startsWith("Mui") || c ? "components" : "custom", m = d !== void 0 ? d : c && c !== "Root" && c !== "root" || !1, _ = h || !1;
81
- let S = we;
82
- var y;
83
- c === "Root" || c === "root" ? S = n : c ? S = r : typeof (y = i) == "string" && y.charCodeAt(0) > 96 && (S = void 0);
84
- const g = xo(i, { shouldForwardProp: S, label: void 0, ...u }), w = (b) => {
85
- if (b.__emotion_real === b) return b;
86
- if (typeof b == "function") return function(R) {
87
- return ve(R, b, R.theme.modularCssLayers ? v : void 0);
88
- };
89
- if (To(b)) {
90
- const R = function(T) {
91
- const { variants: I, ...k } = T, P = { variants: I, style: q(k), isProcessed: !0 };
92
- return P.style === k || I && I.forEach((z) => {
93
- typeof z.style != "function" && (z.style = q(z.style));
94
- }), P;
95
- }(b);
96
- return function(T) {
97
- return R.variants ? ve(T, R, T.theme.modularCssLayers ? v : void 0) : T.theme.modularCssLayers ? K(R.style, v) : R.style;
98
- };
99
- }
100
- return b;
101
- }, C = (...b) => {
102
- const R = [], T = b.map(w), I = [];
103
- if (R.push(l), s && f && I.push(function(z) {
104
- const L = z.theme, G = L.components?.[s]?.styleOverrides;
105
- if (!G) return null;
106
- const B = {};
107
- for (const He in G) B[He] = ve(z, G[He], z.theme.modularCssLayers ? "theme" : void 0);
108
- return f(z, B);
109
- }), s && !m && I.push(function(z) {
110
- const L = z.theme, G = L?.components?.[s]?.variants;
111
- return G ? xt(z, G, [], z.theme.modularCssLayers ? "theme" : void 0) : null;
112
- }), _ || I.push(De), Array.isArray(T[0])) {
113
- const z = T.shift(), L = new Array(R.length).fill(""), G = new Array(I.length).fill("");
114
- let B;
115
- B = [...L, ...z, ...G], B.raw = [...L, ...z.raw, ...G], R.unshift(B);
116
- }
117
- const k = [...R, ...T, ...I], P = g(...k);
118
- return i.muiName && (P.muiName = i.muiName), P;
119
- };
120
- return g.withConfig && (C.withConfig = g.withConfig), C;
121
- };
122
- }({ themeId: Ro, defaultTheme: bo, rootShouldForwardProp: (o) => /* @__PURE__ */ function(e) {
123
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
124
- }(o) && o !== "classes" });
125
- function A(o, e) {
126
- if (!(o instanceof e)) throw new TypeError("Cannot call a class as a function");
127
- }
128
- function ee(o) {
129
- return (ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
130
- return typeof e;
131
- } : function(e) {
132
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
133
- })(o);
134
- }
135
- function Rt(o) {
136
- var e = function(t) {
137
- if (ee(t) != "object" || !t) return t;
138
- var n = t[Symbol.toPrimitive];
139
- if (n !== void 0) {
140
- var r = n.call(t, "string");
141
- if (ee(r) != "object") return r;
142
- throw new TypeError("@@toPrimitive must return a primitive value.");
143
- }
144
- return String(t);
145
- }(o);
146
- return ee(e) == "symbol" ? e : e + "";
147
- }
148
- function Ne(o, e) {
149
- for (var t = 0; t < e.length; t++) {
150
- var n = e[t];
151
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, Rt(n.key), n);
152
- }
153
- }
154
- function E(o, e, t) {
155
- return e && Ne(o.prototype, e), t && Ne(o, t), Object.defineProperty(o, "prototype", { writable: !1 }), o;
156
- }
157
- function W(o, e) {
158
- if (e && (ee(e) == "object" || typeof e == "function")) return e;
159
- if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
160
- return function(t) {
161
- if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
162
- return t;
163
- }(o);
164
- }
165
- function O(o) {
166
- return (O = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
167
- return e.__proto__ || Object.getPrototypeOf(e);
168
- })(o);
169
- }
170
- function D(o, e) {
171
- if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
172
- o.prototype = Object.create(e && e.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), e && Io(o, e);
173
- }
174
- function p(o, e, t) {
175
- return (e = Rt(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
176
- }
177
- function bt() {
178
- var o = this.constructor.getDerivedStateFromProps(this.props, this.state);
179
- o != null && this.setState(o);
180
- }
181
- function zt(o) {
182
- this.setState(function(e) {
183
- return this.constructor.getDerivedStateFromProps(o, e) ?? null;
184
- }.bind(this));
185
- }
186
- function Tt(o, e) {
187
- try {
188
- var t = this.props, n = this.state;
189
- this.props = o, this.state = e, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(t, n);
190
- } finally {
191
- this.props = t, this.state = n;
192
- }
193
- }
194
- function ue(o) {
195
- var e = o.prototype;
196
- if (!e || !e.isReactComponent) throw new Error("Can only polyfill class components");
197
- if (typeof o.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function") return o;
198
- var t = null, n = null, r = null;
199
- if (typeof e.componentWillMount == "function" ? t = "componentWillMount" : typeof e.UNSAFE_componentWillMount == "function" && (t = "UNSAFE_componentWillMount"), typeof e.componentWillReceiveProps == "function" ? n = "componentWillReceiveProps" : typeof e.UNSAFE_componentWillReceiveProps == "function" && (n = "UNSAFE_componentWillReceiveProps"), typeof e.componentWillUpdate == "function" ? r = "componentWillUpdate" : typeof e.UNSAFE_componentWillUpdate == "function" && (r = "UNSAFE_componentWillUpdate"), t !== null || n !== null || r !== null) {
200
- var l = o.displayName || o.name, i = typeof o.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
201
- throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
202
-
203
- ` + l + " uses " + i + " but also contains the following legacy lifecycles:" + (t !== null ? `
204
- ` + t : "") + (n !== null ? `
205
- ` + n : "") + (r !== null ? `
206
- ` + r : "") + `
207
-
208
- The above lifecycles should be removed. Learn more about this warning here:
209
- https://fb.me/react-async-component-lifecycle-hooks`);
210
- }
211
- if (typeof o.getDerivedStateFromProps == "function" && (e.componentWillMount = bt, e.componentWillReceiveProps = zt), typeof e.getSnapshotBeforeUpdate == "function") {
212
- if (typeof e.componentDidUpdate != "function") throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
213
- e.componentWillUpdate = Tt;
214
- var a = e.componentDidUpdate;
215
- e.componentDidUpdate = function(s, c, d) {
216
- var h = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : d;
217
- a.call(this, s, c, h);
218
- };
219
- }
220
- return o;
221
- }
222
- function Be(o, e) {
223
- var t = Object.keys(o);
224
- if (Object.getOwnPropertySymbols) {
225
- var n = Object.getOwnPropertySymbols(o);
226
- e && (n = n.filter(function(r) {
227
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
228
- })), t.push.apply(t, n);
229
- }
230
- return t;
231
- }
232
- function Ue(o) {
233
- for (var e = 1; e < arguments.length; e++) {
234
- var t = arguments[e] != null ? arguments[e] : {};
235
- e % 2 ? Be(Object(t), !0).forEach(function(n) {
236
- p(o, n, t[n]);
237
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Be(Object(t)).forEach(function(n) {
238
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
239
- });
240
- }
241
- return o;
242
- }
243
- function It() {
244
- try {
245
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
246
- }));
247
- } catch {
248
- }
249
- return (It = function() {
250
- return !!o;
251
- })();
252
- }
253
- bt.__suppressDeprecationWarning = !0, zt.__suppressDeprecationWarning = !0, Tt.__suppressDeprecationWarning = !0;
254
- var Ve = function() {
255
- function o() {
256
- var e, t, n, r;
257
- A(this, o);
258
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
259
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, It() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "state", { scrollToColumn: 0, scrollToRow: 0, instanceProps: { prevScrollToColumn: 0, prevScrollToRow: 0 } }), p(e, "_columnStartIndex", 0), p(e, "_columnStopIndex", 0), p(e, "_rowStartIndex", 0), p(e, "_rowStopIndex", 0), p(e, "_onKeyDown", function(s) {
260
- var c = e.props, d = c.columnCount, h = c.disabled, f = c.mode, u = c.rowCount;
261
- if (!h) {
262
- var v = e._getScrollState(), m = v.scrollToColumn, _ = v.scrollToRow, S = e._getScrollState(), y = S.scrollToColumn, g = S.scrollToRow;
263
- switch (s.key) {
264
- case "ArrowDown":
265
- g = Math.min(f === "cells" ? g + 1 : e._rowStopIndex + 1, u - 1);
266
- break;
267
- case "ArrowLeft":
268
- y = Math.max(f === "cells" ? y - 1 : e._columnStartIndex - 1, 0);
269
- break;
270
- case "ArrowRight":
271
- y = Math.min(f === "cells" ? y + 1 : e._columnStopIndex + 1, d - 1);
272
- break;
273
- case "ArrowUp":
274
- g = Math.max(f === "cells" ? g - 1 : e._rowStartIndex - 1, 0);
275
- }
276
- y === m && g === _ || (s.preventDefault(), e._updateScrollState({ scrollToColumn: y, scrollToRow: g }));
277
- }
278
- }), p(e, "_onSectionRendered", function(s) {
279
- var c = s.columnStartIndex, d = s.columnStopIndex, h = s.rowStartIndex, f = s.rowStopIndex;
280
- e._columnStartIndex = c, e._columnStopIndex = d, e._rowStartIndex = h, e._rowStopIndex = f;
281
- }), e;
282
- }
283
- return D(o, x.PureComponent), E(o, [{ key: "setScrollIndexes", value: function(e) {
284
- var t = e.scrollToColumn, n = e.scrollToRow;
285
- this.setState({ scrollToRow: n, scrollToColumn: t });
286
- } }, { key: "render", value: function() {
287
- var e = this.props, t = e.className, n = e.children, r = this._getScrollState(), l = r.scrollToColumn, i = r.scrollToRow;
288
- return x.createElement("div", { className: t, onKeyDown: this._onKeyDown }, n({ onSectionRendered: this._onSectionRendered, scrollToColumn: l, scrollToRow: i }));
289
- } }, { key: "_getScrollState", value: function() {
290
- return this.props.isControlled ? this.props : this.state;
291
- } }, { key: "_updateScrollState", value: function(e) {
292
- var t = e.scrollToColumn, n = e.scrollToRow, r = this.props, l = r.isControlled, i = r.onScrollToChange;
293
- typeof i == "function" && i({ scrollToColumn: t, scrollToRow: n }), l || this.setState({ scrollToColumn: t, scrollToRow: n });
294
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
295
- return e.isControlled ? {} : e.scrollToColumn !== t.instanceProps.prevScrollToColumn || e.scrollToRow !== t.instanceProps.prevScrollToRow ? Ue(Ue({}, t), {}, { scrollToColumn: e.scrollToColumn, scrollToRow: e.scrollToRow, instanceProps: { prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow } }) : {};
296
- } }]);
297
- }();
298
- function Pt(o, e) {
299
- var t, n, r = (t = e !== void 0 ? e : typeof window < "u" ? window : typeof self < "u" ? self : global).document !== void 0 && t.document.attachEvent;
300
- if (!r) {
301
- var l = (n = t.requestAnimationFrame || t.mozRequestAnimationFrame || t.webkitRequestAnimationFrame || function(g) {
302
- return t.setTimeout(g, 20);
303
- }, function(g) {
304
- return n(g);
305
- }), i = function() {
306
- var g = t.cancelAnimationFrame || t.mozCancelAnimationFrame || t.webkitCancelAnimationFrame || t.clearTimeout;
307
- return function(w) {
308
- return g(w);
309
- };
310
- }(), a = function(g) {
311
- var w = g.__resizeTriggers__, C = w.firstElementChild, b = w.lastElementChild, R = C.firstElementChild;
312
- b.scrollLeft = b.scrollWidth, b.scrollTop = b.scrollHeight, R.style.width = C.offsetWidth + 1 + "px", R.style.height = C.offsetHeight + 1 + "px", C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight;
313
- }, s = function(g) {
314
- if (!(g.target.className && typeof g.target.className.indexOf == "function" && g.target.className.indexOf("contract-trigger") < 0 && g.target.className.indexOf("expand-trigger") < 0)) {
315
- var w = this;
316
- a(this), this.__resizeRAF__ && i(this.__resizeRAF__), this.__resizeRAF__ = l(function() {
317
- var C;
318
- ((C = w).offsetWidth != C.__resizeLast__.width || C.offsetHeight != C.__resizeLast__.height) && (w.__resizeLast__.width = w.offsetWidth, w.__resizeLast__.height = w.offsetHeight, w.__resizeListeners__.forEach(function(b) {
319
- b.call(w, g);
320
- }));
321
- });
322
- }
323
- }, c = !1, d = "", h = "animationstart", f = "Webkit Moz O ms".split(" "), u = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = t.document.createElement("fakeelement");
324
- if (v.style.animationName !== void 0 && (c = !0), c === !1) {
325
- for (var m = 0; m < f.length; m++) if (v.style[f[m] + "AnimationName"] !== void 0) {
326
- d = "-" + f[m].toLowerCase() + "-", h = u[m], c = !0;
327
- break;
328
- }
329
- }
330
- var _ = "resizeanim", S = "@" + d + "keyframes " + _ + " { from { opacity: 0; } to { opacity: 0; } } ", y = d + "animation: 1ms " + _ + "; ";
331
- }
332
- return { addResizeListener: function(g, w) {
333
- if (r) g.attachEvent("onresize", w);
334
- else {
335
- if (!g.__resizeTriggers__) {
336
- var C = g.ownerDocument, b = t.getComputedStyle(g);
337
- b && b.position == "static" && (g.style.position = "relative"), function(I) {
338
- if (!I.getElementById("detectElementResize")) {
339
- var k = (S || "") + ".resize-triggers { " + (y || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', P = I.head || I.getElementsByTagName("head")[0], z = I.createElement("style");
340
- z.id = "detectElementResize", z.type = "text/css", o != null && z.setAttribute("nonce", o), z.styleSheet ? z.styleSheet.cssText = k : z.appendChild(I.createTextNode(k)), P.appendChild(z);
341
- }
342
- }(C), g.__resizeLast__ = {}, g.__resizeListeners__ = [], (g.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
343
- var R = C.createElement("div");
344
- R.className = "expand-trigger", R.appendChild(C.createElement("div"));
345
- var T = C.createElement("div");
346
- T.className = "contract-trigger", g.__resizeTriggers__.appendChild(R), g.__resizeTriggers__.appendChild(T), g.appendChild(g.__resizeTriggers__), a(g), g.addEventListener("scroll", s, !0), h && (g.__resizeTriggers__.__animationListener__ = function(I) {
347
- I.animationName == _ && a(g);
348
- }, g.__resizeTriggers__.addEventListener(h, g.__resizeTriggers__.__animationListener__));
349
- }
350
- g.__resizeListeners__.push(w);
351
- }
352
- }, removeResizeListener: function(g, w) {
353
- if (r) g.detachEvent("onresize", w);
354
- else if (g.__resizeListeners__.splice(g.__resizeListeners__.indexOf(w), 1), !g.__resizeListeners__.length) {
355
- g.removeEventListener("scroll", s, !0), g.__resizeTriggers__.__animationListener__ && (g.__resizeTriggers__.removeEventListener(h, g.__resizeTriggers__.__animationListener__), g.__resizeTriggers__.__animationListener__ = null);
356
- try {
357
- g.__resizeTriggers__ = !g.removeChild(g.__resizeTriggers__);
358
- } catch {
359
- }
360
- }
361
- } };
362
- }
363
- function $e(o, e) {
364
- var t = Object.keys(o);
365
- if (Object.getOwnPropertySymbols) {
366
- var n = Object.getOwnPropertySymbols(o);
367
- e && (n = n.filter(function(r) {
368
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
369
- })), t.push.apply(t, n);
370
- }
371
- return t;
372
- }
373
- function Ke(o) {
374
- for (var e = 1; e < arguments.length; e++) {
375
- var t = arguments[e] != null ? arguments[e] : {};
376
- e % 2 ? $e(Object(t), !0).forEach(function(n) {
377
- p(o, n, t[n]);
378
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : $e(Object(t)).forEach(function(n) {
379
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
380
- });
381
- }
382
- return o;
383
- }
384
- function kt() {
385
- try {
386
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
387
- }));
388
- } catch {
389
- }
390
- return (kt = function() {
391
- return !!o;
392
- })();
393
- }
394
- p(Ve, "defaultProps", { disabled: !1, isControlled: !1, mode: "edges", scrollToColumn: 0, scrollToRow: 0 }), ue(Ve);
395
- var Ot = function() {
396
- function o() {
397
- var e, t, n, r;
398
- A(this, o);
399
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
400
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, kt() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "state", { height: e.props.defaultHeight || 0, width: e.props.defaultWidth || 0 }), p(e, "_parentNode", void 0), p(e, "_autoSizer", void 0), p(e, "_window", void 0), p(e, "_detectElementResize", void 0), p(e, "_onResize", function() {
401
- var s = e.props, c = s.disableHeight, d = s.disableWidth, h = s.onResize;
402
- if (e._parentNode) {
403
- var f = e._parentNode.offsetHeight || 0, u = e._parentNode.offsetWidth || 0, v = (e._window || window).getComputedStyle(e._parentNode) || {}, m = parseInt(v.paddingLeft, 10) || 0, _ = parseInt(v.paddingRight, 10) || 0, S = parseInt(v.paddingTop, 10) || 0, y = parseInt(v.paddingBottom, 10) || 0, g = f - S - y, w = u - m - _;
404
- (!c && e.state.height !== g || !d && e.state.width !== w) && (e.setState({ height: f - S - y, width: u - m - _ }), h({ height: f, width: u }));
405
- }
406
- }), p(e, "_setRef", function(s) {
407
- e._autoSizer = s;
408
- }), e;
409
- }
410
- return D(o, x.Component), E(o, [{ key: "componentDidMount", value: function() {
411
- var e = this.props.nonce;
412
- this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._window = this._autoSizer.parentNode.ownerDocument.defaultView, this._detectElementResize = Pt(e, this._window), this._detectElementResize.addResizeListener(this._parentNode, this._onResize), this._onResize());
413
- } }, { key: "componentWillUnmount", value: function() {
414
- this._detectElementResize && this._parentNode && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
415
- } }, { key: "render", value: function() {
416
- var e = this.props, t = e.children, n = e.className, r = e.disableHeight, l = e.disableWidth, i = e.style, a = this.state, s = a.height, c = a.width, d = { overflow: "visible" }, h = {};
417
- return r || (d.height = 0, h.height = s), l || (d.width = 0, h.width = c), x.createElement("div", { className: n, ref: this._setRef, style: Ke(Ke({}, d), i) }, t(h));
418
- } }]);
419
- }();
420
- function Mt() {
421
- try {
422
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
423
- }));
424
- } catch {
425
- }
426
- return (Mt = function() {
427
- return !!o;
428
- })();
429
- }
430
- p(Ot, "defaultProps", { onResize: function() {
431
- }, disableHeight: !1, disableWidth: !1, style: {} });
432
- var Fo = function() {
433
- function o() {
434
- var e, t, n, r;
435
- A(this, o);
436
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
437
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, Mt() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "_child", x.createRef()), p(e, "_measure", function() {
438
- var s = e.props, c = s.cache, d = s.columnIndex, h = d === void 0 ? 0 : d, f = s.parent, u = s.rowIndex, v = u === void 0 ? e.props.index || 0 : u, m = e._getCellMeasurements(), _ = m.height, S = m.width;
439
- _ === c.getHeight(v, h) && S === c.getWidth(v, h) || (c.set(v, h, S, _), f && typeof f.recomputeGridSize == "function" && f.recomputeGridSize({ columnIndex: h, rowIndex: v }));
440
- }), p(e, "_registerChild", function(s) {
441
- !s || s instanceof Element || console.warn("CellMeasurer registerChild expects to be passed Element or null"), e._child.current = s, s && e._maybeMeasureCell();
442
- }), e;
443
- }
444
- return D(o, x.PureComponent), E(o, [{ key: "componentDidMount", value: function() {
445
- this._maybeMeasureCell();
446
- } }, { key: "componentDidUpdate", value: function() {
447
- this._maybeMeasureCell();
448
- } }, { key: "render", value: function() {
449
- var e = this, t = this.props.children, n = typeof t == "function" ? t({ measure: this._measure, registerChild: this._registerChild }) : t;
450
- return n === null ? n : Oo(n, { ref: function(r) {
451
- typeof n.ref == "function" ? n.ref(r) : n.ref && (n.ref.current = r), e._child.current = r;
452
- } });
453
- } }, { key: "_getCellMeasurements", value: function() {
454
- var e = this.props.cache, t = this._child.current;
455
- if (t && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
456
- var n = t.style.width, r = t.style.height;
457
- e.hasFixedWidth() || (t.style.width = "auto"), e.hasFixedHeight() || (t.style.height = "auto");
458
- var l = Math.ceil(t.offsetHeight), i = Math.ceil(t.offsetWidth);
459
- return n && (t.style.width = n), r && (t.style.height = r), { height: l, width: i };
460
- }
461
- return { height: 0, width: 0 };
462
- } }, { key: "_maybeMeasureCell", value: function() {
463
- var e = this.props, t = e.cache, n = e.columnIndex, r = n === void 0 ? 0 : n, l = e.parent, i = e.rowIndex, a = i === void 0 ? this.props.index || 0 : i;
464
- if (!t.has(a, r)) {
465
- var s = this._getCellMeasurements(), c = s.height, d = s.width;
466
- t.set(a, r, d, c), l && typeof l.invalidateCellSizeAfterRender == "function" && l.invalidateCellSizeAfterRender({ columnIndex: r, rowIndex: a });
467
- }
468
- } }]);
469
- }();
470
- function te() {
471
- var o = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0], e = {};
472
- return function(t) {
473
- var n = t.callback, r = t.indices, l = Object.keys(r), i = !o || l.every(function(s) {
474
- var c = r[s];
475
- return Array.isArray(c) ? c.length > 0 : c >= 0;
476
- }), a = l.length !== Object.keys(e).length || l.some(function(s) {
477
- var c = e[s], d = r[s];
478
- return Array.isArray(d) ? c.join(",") !== d.join(",") : c !== d;
479
- });
480
- e = r, i && a && n(r);
481
- };
482
- }
483
- p(Fo, "__internalCellMeasurerFlag", !1);
484
- const No = !(typeof window > "u" || !window.document || !window.document.createElement);
485
- var me;
486
- function ze(o) {
487
- if ((!me && me !== 0 || o) && No) {
488
- var e = document.createElement("div");
489
- e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), me = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
490
- }
491
- return me;
492
- }
493
- function qe(o, e) {
494
- var t = Object.keys(o);
495
- if (Object.getOwnPropertySymbols) {
496
- var n = Object.getOwnPropertySymbols(o);
497
- e && (n = n.filter(function(r) {
498
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
499
- })), t.push.apply(t, n);
500
- }
501
- return t;
502
- }
503
- function Xe(o) {
504
- for (var e = 1; e < arguments.length; e++) {
505
- var t = arguments[e] != null ? arguments[e] : {};
506
- e % 2 ? qe(Object(t), !0).forEach(function(n) {
507
- p(o, n, t[n]);
508
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(n) {
509
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
510
- });
511
- }
512
- return o;
513
- }
514
- function Lt() {
515
- try {
516
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
517
- }));
518
- } catch {
519
- }
520
- return (Lt = function() {
521
- return !!o;
522
- })();
523
- }
524
- var ne = "requested", _e = function() {
525
- function o() {
526
- var e, t, n, r;
527
- A(this, o);
528
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
529
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, Lt() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollLeft: 0, scrollTop: 0 }), p(e, "_calculateSizeAndPositionDataOnNextUpdate", !1), p(e, "_onSectionRenderedMemoizer", te()), p(e, "_onScrollMemoizer", te(!1)), p(e, "_invokeOnSectionRenderedHelper", function() {
530
- var s = e.props, c = s.cellLayoutManager, d = s.onSectionRendered;
531
- e._onSectionRenderedMemoizer({ callback: d, indices: { indices: c.getLastRenderedIndices() } });
532
- }), p(e, "_setScrollingContainerRef", function(s) {
533
- e._scrollingContainer = s;
534
- }), p(e, "_updateScrollPositionForScrollToCell", function() {
535
- var s = e.props, c = s.cellLayoutManager, d = s.height, h = s.scrollToAlignment, f = s.scrollToCell, u = s.width, v = e.state, m = v.scrollLeft, _ = v.scrollTop;
536
- if (f >= 0) {
537
- var S = c.getScrollPositionForCell({ align: h, cellIndex: f, height: d, scrollLeft: m, scrollTop: _, width: u });
538
- S.scrollLeft === m && S.scrollTop === _ || e._setScrollPosition(S);
539
- }
540
- }), p(e, "_onScroll", function(s) {
541
- if (s.target === e._scrollingContainer) {
542
- e._enablePointerEventsAfterDelay();
543
- var c = e.props, d = c.cellLayoutManager, h = c.height, f = c.isScrollingChange, u = c.width, v = e._scrollbarSize, m = d.getTotalSize(), _ = m.height, S = m.width, y = Math.max(0, Math.min(S - u + v, s.target.scrollLeft)), g = Math.max(0, Math.min(_ - h + v, s.target.scrollTop));
544
- if (e.state.scrollLeft !== y || e.state.scrollTop !== g) {
545
- var w = s.cancelable ? "observed" : ne;
546
- e.state.isScrolling || f(!0), e.setState({ isScrolling: !0, scrollLeft: y, scrollPositionChangeReason: w, scrollTop: g });
547
- }
548
- e._invokeOnScrollMemoizer({ scrollLeft: y, scrollTop: g, totalWidth: S, totalHeight: _ });
549
- }
550
- }), e._scrollbarSize = ze(), e._scrollbarSize === void 0 ? (e._scrollbarSizeMeasured = !1, e._scrollbarSize = 0) : e._scrollbarSizeMeasured = !0, e;
551
- }
552
- return D(o, x.PureComponent), E(o, [{ key: "recomputeCellSizesAndPositions", value: function() {
553
- this._calculateSizeAndPositionDataOnNextUpdate = !0, this.forceUpdate();
554
- } }, { key: "componentDidMount", value: function() {
555
- var e = this.props, t = e.cellLayoutManager, n = e.scrollLeft, r = e.scrollToCell, l = e.scrollTop;
556
- this._scrollbarSizeMeasured || (this._scrollbarSize = ze(), this._scrollbarSizeMeasured = !0, this.setState({})), r >= 0 ? this._updateScrollPositionForScrollToCell() : (n >= 0 || l >= 0) && this._setScrollPosition({ scrollLeft: n, scrollTop: l }), this._invokeOnSectionRenderedHelper();
557
- var i = t.getTotalSize(), a = i.height, s = i.width;
558
- this._invokeOnScrollMemoizer({ scrollLeft: n || 0, scrollTop: l || 0, totalHeight: a, totalWidth: s });
559
- } }, { key: "componentDidUpdate", value: function(e, t) {
560
- var n = this.props, r = n.height, l = n.scrollToAlignment, i = n.scrollToCell, a = n.width, s = this.state, c = s.scrollLeft, d = s.scrollPositionChangeReason, h = s.scrollTop;
561
- d === ne && (c >= 0 && c !== t.scrollLeft && c !== this._scrollingContainer.scrollLeft && (this._scrollingContainer.scrollLeft = c), h >= 0 && h !== t.scrollTop && h !== this._scrollingContainer.scrollTop && (this._scrollingContainer.scrollTop = h)), r === e.height && l === e.scrollToAlignment && i === e.scrollToCell && a === e.width || this._updateScrollPositionForScrollToCell(), this._invokeOnSectionRenderedHelper();
562
- } }, { key: "componentWillUnmount", value: function() {
563
- this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId);
564
- } }, { key: "render", value: function() {
565
- var e = this.props, t = e.autoHeight, n = e.cellCount, r = e.cellLayoutManager, l = e.className, i = e.height, a = e.horizontalOverscanSize, s = e.id, c = e.noContentRenderer, d = e.style, h = e.verticalOverscanSize, f = e.width, u = this.state, v = u.isScrolling, m = u.scrollLeft, _ = u.scrollTop;
566
- (this._lastRenderedCellCount !== n || this._lastRenderedCellLayoutManager !== r || this._calculateSizeAndPositionDataOnNextUpdate) && (this._lastRenderedCellCount = n, this._lastRenderedCellLayoutManager = r, this._calculateSizeAndPositionDataOnNextUpdate = !1, r.calculateSizeAndPositionData());
567
- var S = r.getTotalSize(), y = S.height, g = S.width, w = Math.max(0, m - a), C = Math.max(0, _ - h), b = Math.min(g, m + f + a), R = Math.min(y, _ + i + h), T = i > 0 && f > 0 ? r.cellRenderers({ height: R - C, isScrolling: v, width: b - w, x: w, y: C }) : [], I = { boxSizing: "border-box", direction: "ltr", height: t ? "auto" : i, position: "relative", WebkitOverflowScrolling: "touch", width: f, willChange: "transform" }, k = y > i ? this._scrollbarSize : 0, P = g > f ? this._scrollbarSize : 0;
568
- return I.overflowX = g + k <= f ? "hidden" : "auto", I.overflowY = y + P <= i ? "hidden" : "auto", x.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Collection", l), id: s, onScroll: this._onScroll, role: "grid", style: Xe(Xe({}, I), d), tabIndex: 0 }, n > 0 && x.createElement("div", { className: "ReactVirtualized__Collection__innerScrollContainer", style: { height: y, maxHeight: y, maxWidth: g, overflow: "hidden", pointerEvents: v ? "none" : "", width: g } }, T), n === 0 && c());
569
- } }, { key: "_enablePointerEventsAfterDelay", value: function() {
570
- var e = this;
571
- this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = setTimeout(function() {
572
- (0, e.props.isScrollingChange)(!1), e._disablePointerEventsTimeoutId = null, e.setState({ isScrolling: !1 });
573
- }, 150);
574
- } }, { key: "_invokeOnScrollMemoizer", value: function(e) {
575
- var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalHeight, i = e.totalWidth;
576
- this._onScrollMemoizer({ callback: function(a) {
577
- var s = a.scrollLeft, c = a.scrollTop, d = t.props, h = d.height;
578
- (0, d.onScroll)({ clientHeight: h, clientWidth: d.width, scrollHeight: l, scrollLeft: s, scrollTop: c, scrollWidth: i });
579
- }, indices: { scrollLeft: n, scrollTop: r } });
580
- } }, { key: "_setScrollPosition", value: function(e) {
581
- var t = e.scrollLeft, n = e.scrollTop, r = { scrollPositionChangeReason: ne };
582
- t >= 0 && (r.scrollLeft = t), n >= 0 && (r.scrollTop = n), (t >= 0 && t !== this.state.scrollLeft || n >= 0 && n !== this.state.scrollTop) && this.setState(r);
583
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
584
- return e.cellCount !== 0 || t.scrollLeft === 0 && t.scrollTop === 0 ? e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null ? e.scrollTop : t.scrollTop, scrollPositionChangeReason: ne } : null : { scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: ne };
585
- } }]);
586
- }();
587
- p(_e, "defaultProps", { "aria-label": "grid", horizontalOverscanSize: 0, noContentRenderer: function() {
588
- return null;
589
- }, onScroll: function() {
590
- return null;
591
- }, onSectionRendered: function() {
592
- return null;
593
- }, scrollToAlignment: "auto", scrollToCell: -1, style: {}, verticalOverscanSize: 0 }), _e.propTypes = {}, ue(_e);
594
- var Bo = E(function o(e) {
595
- var t = e.height, n = e.width, r = e.x, l = e.y;
596
- A(this, o), this.height = t, this.width = n, this.x = r, this.y = l, this._indexMap = {}, this._indices = [];
597
- }, [{ key: "addCellIndex", value: function(o) {
598
- var e = o.index;
599
- this._indexMap[e] || (this._indexMap[e] = !0, this._indices.push(e));
600
- } }, { key: "getCellIndices", value: function() {
601
- return this._indices;
602
- } }, { key: "toString", value: function() {
603
- return "".concat(this.x, ",").concat(this.y, " ").concat(this.width, "x").concat(this.height);
604
- } }]), Uo = E(function o() {
605
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100;
606
- A(this, o), this._sectionSize = e, this._cellMetadata = [], this._sections = {};
607
- }, [{ key: "getCellIndices", value: function(o) {
608
- var e = o.height, t = o.width, n = o.x, r = o.y, l = {};
609
- return this.getSections({ height: e, width: t, x: n, y: r }).forEach(function(i) {
610
- return i.getCellIndices().forEach(function(a) {
611
- l[a] = a;
612
- });
613
- }), Object.keys(l).map(function(i) {
614
- return l[i];
615
- });
616
- } }, { key: "getCellMetadata", value: function(o) {
617
- var e = o.index;
618
- return this._cellMetadata[e];
619
- } }, { key: "getSections", value: function(o) {
620
- for (var e = o.height, t = o.width, n = o.x, r = o.y, l = Math.floor(n / this._sectionSize), i = Math.floor((n + t - 1) / this._sectionSize), a = Math.floor(r / this._sectionSize), s = Math.floor((r + e - 1) / this._sectionSize), c = [], d = l; d <= i; d++) for (var h = a; h <= s; h++) {
621
- var f = "".concat(d, ".").concat(h);
622
- this._sections[f] || (this._sections[f] = new Bo({ height: this._sectionSize, width: this._sectionSize, x: d * this._sectionSize, y: h * this._sectionSize })), c.push(this._sections[f]);
623
- }
624
- return c;
625
- } }, { key: "getTotalSectionCount", value: function() {
626
- return Object.keys(this._sections).length;
627
- } }, { key: "toString", value: function() {
628
- var o = this;
629
- return Object.keys(this._sections).map(function(e) {
630
- return o._sections[e].toString();
631
- });
632
- } }, { key: "registerCell", value: function(o) {
633
- var e = o.cellMetadatum, t = o.index;
634
- this._cellMetadata[t] = e, this.getSections(e).forEach(function(n) {
635
- return n.addCellIndex({ index: t });
636
- });
637
- } }]);
638
- function Ye(o) {
639
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.cellOffset, r = o.cellSize, l = o.containerSize, i = o.currentOffset, a = n, s = a - l + r;
640
- switch (t) {
641
- case "start":
642
- return a;
643
- case "end":
644
- return s;
645
- case "center":
646
- return a - (l - r) / 2;
647
- default:
648
- return Math.max(s, Math.min(a, i));
649
- }
650
- }
651
- function Gt() {
652
- try {
653
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
654
- }));
655
- } catch {
656
- }
657
- return (Gt = function() {
658
- return !!o;
659
- })();
660
- }
661
- var Je = function() {
662
- function o(e, t) {
663
- var n, r, l, i;
664
- return A(this, o), r = this, i = [e, t], l = O(l = o), (n = W(r, Gt() ? Reflect.construct(l, i || [], O(r).constructor) : l.apply(r, i)))._cellMetadata = [], n._lastRenderedCellIndices = [], n._cellCache = [], n._isScrollingChange = n._isScrollingChange.bind(n), n._setCollectionViewRef = n._setCollectionViewRef.bind(n), n;
665
- }
666
- return D(o, x.PureComponent), E(o, [{ key: "forceUpdate", value: function() {
667
- this._collectionView !== void 0 && this._collectionView.forceUpdate();
668
- } }, { key: "recomputeCellSizesAndPositions", value: function() {
669
- this._cellCache = [], this._collectionView.recomputeCellSizesAndPositions();
670
- } }, { key: "render", value: function() {
671
- var e = V({}, (function(t) {
672
- if (t == null) throw new TypeError("Cannot destructure " + t);
673
- }(this.props), this.props));
674
- return x.createElement(_e, V({ cellLayoutManager: this, isScrollingChange: this._isScrollingChange, ref: this._setCollectionViewRef }, e));
675
- } }, { key: "calculateSizeAndPositionData", value: function() {
676
- var e = this.props, t = function(n) {
677
- for (var r = n.cellCount, l = n.cellSizeAndPositionGetter, i = [], a = new Uo(n.sectionSize), s = 0, c = 0, d = 0; d < r; d++) {
678
- var h = l({ index: d });
679
- if (h.height == null || isNaN(h.height) || h.width == null || isNaN(h.width) || h.x == null || isNaN(h.x) || h.y == null || isNaN(h.y)) throw Error("Invalid metadata returned for cell ".concat(d, `:
680
- x:`).concat(h.x, ", y:").concat(h.y, ", width:").concat(h.width, ", height:").concat(h.height));
681
- s = Math.max(s, h.y + h.height), c = Math.max(c, h.x + h.width), i[d] = h, a.registerCell({ cellMetadatum: h, index: d });
682
- }
683
- return { cellMetadata: i, height: s, sectionManager: a, width: c };
684
- }({ cellCount: e.cellCount, cellSizeAndPositionGetter: e.cellSizeAndPositionGetter, sectionSize: e.sectionSize });
685
- this._cellMetadata = t.cellMetadata, this._sectionManager = t.sectionManager, this._height = t.height, this._width = t.width;
686
- } }, { key: "getLastRenderedIndices", value: function() {
687
- return this._lastRenderedCellIndices;
688
- } }, { key: "getScrollPositionForCell", value: function(e) {
689
- var t = e.align, n = e.cellIndex, r = e.height, l = e.scrollLeft, i = e.scrollTop, a = e.width, s = this.props.cellCount;
690
- if (n >= 0 && n < s) {
691
- var c = this._cellMetadata[n];
692
- l = Ye({ align: t, cellOffset: c.x, cellSize: c.width, containerSize: a, currentOffset: l }), i = Ye({ align: t, cellOffset: c.y, cellSize: c.height, containerSize: r, currentOffset: i });
693
- }
694
- return { scrollLeft: l, scrollTop: i };
695
- } }, { key: "getTotalSize", value: function() {
696
- return { height: this._height, width: this._width };
697
- } }, { key: "cellRenderers", value: function(e) {
698
- var t = this, n = e.height, r = e.isScrolling, l = e.width, i = e.x, a = e.y, s = this.props, c = s.cellGroupRenderer, d = s.cellRenderer;
699
- return this._lastRenderedCellIndices = this._sectionManager.getCellIndices({ height: n, width: l, x: i, y: a }), c({ cellCache: this._cellCache, cellRenderer: d, cellSizeAndPositionGetter: function(h) {
700
- var f = h.index;
701
- return t._sectionManager.getCellMetadata({ index: f });
702
- }, indices: this._lastRenderedCellIndices, isScrolling: r });
703
- } }, { key: "_isScrollingChange", value: function(e) {
704
- e || (this._cellCache = []);
705
- } }, { key: "_setCollectionViewRef", value: function(e) {
706
- this._collectionView = e;
707
- } }]);
708
- }();
709
- function At() {
710
- try {
711
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
712
- }));
713
- } catch {
714
- }
715
- return (At = function() {
716
- return !!o;
717
- })();
718
- }
719
- function Ze(o) {
720
- var e = o.cellCount, t = o.cellSize, n = o.computeMetadataCallback, r = o.computeMetadataCallbackProps, l = o.nextCellsCount, i = o.nextCellSize, a = o.nextScrollToIndex, s = o.scrollToIndex, c = o.updateScrollOffsetForScrollToIndex;
721
- e === l && (typeof t != "number" && typeof i != "number" || t === i) || (n(r), s >= 0 && s === a && c());
722
- }
723
- function ie(o, e) {
724
- if (o == null) return {};
725
- var t, n, r = Po(o, e);
726
- if (Object.getOwnPropertySymbols) {
727
- var l = Object.getOwnPropertySymbols(o);
728
- for (n = 0; n < l.length; n++) t = l[n], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(o, t) && (r[t] = o[t]);
729
- }
730
- return r;
731
- }
732
- p(Je, "defaultProps", { "aria-label": "grid", cellGroupRenderer: function(o) {
733
- var e = o.cellCache, t = o.cellRenderer, n = o.cellSizeAndPositionGetter, r = o.indices, l = o.isScrolling;
734
- return r.map(function(i) {
735
- var a = n({ index: i }), s = { index: i, isScrolling: l, key: i, style: { height: a.height, left: a.x, position: "absolute", top: a.y, width: a.width } };
736
- return l ? (i in e || (e[i] = t(s)), e[i]) : t(s);
737
- }).filter(function(i) {
738
- return !!i;
739
- });
740
- } }), Je.propTypes = {}, function() {
741
- function o(e, t) {
742
- var n, r, l, i;
743
- return A(this, o), r = this, i = [e, t], l = O(l = o), (n = W(r, At() ? Reflect.construct(l, i || [], O(r).constructor) : l.apply(r, i)))._registerChild = n._registerChild.bind(n), n;
744
- }
745
- return D(o, x.PureComponent), E(o, [{ key: "componentDidUpdate", value: function(e) {
746
- var t = this.props, n = t.columnMaxWidth, r = t.columnMinWidth, l = t.columnCount, i = t.width;
747
- n === e.columnMaxWidth && r === e.columnMinWidth && l === e.columnCount && i === e.width || this._registeredChild && this._registeredChild.recomputeGridSize();
748
- } }, { key: "render", value: function() {
749
- var e = this.props, t = e.children, n = e.columnMaxWidth, r = e.columnMinWidth, l = e.columnCount, i = e.width, a = r || 1, s = n ? Math.min(n, i) : i, c = i / l;
750
- return c = Math.max(a, c), c = Math.min(s, c), c = Math.floor(c), t({ adjustedWidth: Math.min(i, c * l), columnWidth: c, getColumnWidth: function() {
751
- return c;
752
- }, registerChild: this._registerChild });
753
- } }, { key: "_registerChild", value: function(e) {
754
- if (e && typeof e.recomputeGridSize != "function") throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");
755
- this._registeredChild = e, this._registeredChild && this._registeredChild.recomputeGridSize();
756
- } }]);
757
- }().propTypes = {};
758
- var F, Vo = E(function o(e) {
759
- var t = e.cellCount, n = e.cellSizeGetter, r = e.estimatedCellSize;
760
- A(this, o), p(this, "_cellSizeAndPositionData", {}), p(this, "_lastMeasuredIndex", -1), p(this, "_lastBatchedIndex", -1), p(this, "_cellCount", void 0), p(this, "_cellSizeGetter", void 0), p(this, "_estimatedCellSize", void 0), this._cellSizeGetter = n, this._cellCount = t, this._estimatedCellSize = r;
761
- }, [{ key: "areOffsetsAdjusted", value: function() {
762
- return !1;
763
- } }, { key: "configure", value: function(o) {
764
- var e = o.cellCount, t = o.estimatedCellSize, n = o.cellSizeGetter;
765
- this._cellCount = e, this._estimatedCellSize = t, this._cellSizeGetter = n;
766
- } }, { key: "getCellCount", value: function() {
767
- return this._cellCount;
768
- } }, { key: "getEstimatedCellSize", value: function() {
769
- return this._estimatedCellSize;
770
- } }, { key: "getLastMeasuredIndex", value: function() {
771
- return this._lastMeasuredIndex;
772
- } }, { key: "getOffsetAdjustment", value: function() {
773
- return 0;
774
- } }, { key: "getSizeAndPositionOfCell", value: function(o) {
775
- if (o < 0 || o >= this._cellCount) throw Error("Requested index ".concat(o, " is outside of range 0..").concat(this._cellCount));
776
- if (o > this._lastMeasuredIndex) for (var e = this.getSizeAndPositionOfLastMeasuredCell(), t = e.offset + e.size, n = this._lastMeasuredIndex + 1; n <= o; n++) {
777
- var r = this._cellSizeGetter({ index: n });
778
- if (r === void 0 || isNaN(r)) throw Error("Invalid size returned for cell ".concat(n, " of value ").concat(r));
779
- r === null ? (this._cellSizeAndPositionData[n] = { offset: t, size: 0 }, this._lastBatchedIndex = o) : (this._cellSizeAndPositionData[n] = { offset: t, size: r }, t += r, this._lastMeasuredIndex = o);
780
- }
781
- return this._cellSizeAndPositionData[o];
782
- } }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
783
- return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : { offset: 0, size: 0 };
784
- } }, { key: "getTotalSize", value: function() {
785
- var o = this.getSizeAndPositionOfLastMeasuredCell();
786
- return o.offset + o.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;
787
- } }, { key: "getUpdatedOffsetForIndex", value: function(o) {
788
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
789
- if (n <= 0) return 0;
790
- var i, a = this.getSizeAndPositionOfCell(l), s = a.offset, c = s - n + a.size;
791
- switch (t) {
792
- case "start":
793
- i = s;
794
- break;
795
- case "end":
796
- i = c;
797
- break;
798
- case "center":
799
- i = s - (n - a.size) / 2;
800
- break;
801
- default:
802
- i = Math.max(c, Math.min(s, r));
803
- }
804
- var d = this.getTotalSize();
805
- return Math.max(0, Math.min(d - n, i));
806
- } }, { key: "getVisibleCellRange", value: function(o) {
807
- var e = o.containerSize, t = o.offset;
808
- if (this.getTotalSize() === 0) return {};
809
- var n = t + e, r = this._findNearestCell(t), l = this.getSizeAndPositionOfCell(r);
810
- t = l.offset + l.size;
811
- for (var i = r; t < n && i < this._cellCount - 1; ) i++, t += this.getSizeAndPositionOfCell(i).size;
812
- return { start: r, stop: i };
813
- } }, { key: "resetCell", value: function(o) {
814
- this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, o - 1);
815
- } }, { key: "_binarySearch", value: function(o, e, t) {
816
- for (; e <= o; ) {
817
- var n = e + Math.floor((o - e) / 2), r = this.getSizeAndPositionOfCell(n).offset;
818
- if (r === t) return n;
819
- r < t ? e = n + 1 : r > t && (o = n - 1);
820
- }
821
- return e > 0 ? e - 1 : 0;
822
- } }, { key: "_exponentialSearch", value: function(o, e) {
823
- for (var t = 1; o < this._cellCount && this.getSizeAndPositionOfCell(o).offset < e; ) o += t, t *= 2;
824
- return this._binarySearch(Math.min(o, this._cellCount - 1), Math.floor(o / 2), e);
825
- } }, { key: "_findNearestCell", value: function(o) {
826
- if (isNaN(o)) throw Error("Invalid offset ".concat(o, " specified"));
827
- o = Math.max(0, o);
828
- var e = this.getSizeAndPositionOfLastMeasuredCell(), t = Math.max(0, this._lastMeasuredIndex);
829
- return e.offset >= o ? this._binarySearch(t, 0, o) : this._exponentialSearch(t, o);
830
- } }]), $o = ["maxScrollSize"], Qe = E(function o(e) {
831
- var t = e.maxScrollSize, n = t === void 0 ? typeof window < "u" && window.chrome ? 16777100 : 15e5 : t, r = ie(e, $o);
832
- A(this, o), p(this, "_cellSizeAndPositionManager", void 0), p(this, "_maxScrollSize", void 0), this._cellSizeAndPositionManager = new Vo(r), this._maxScrollSize = n;
833
- }, [{ key: "areOffsetsAdjusted", value: function() {
834
- return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
835
- } }, { key: "configure", value: function(o) {
836
- this._cellSizeAndPositionManager.configure(o);
837
- } }, { key: "getCellCount", value: function() {
838
- return this._cellSizeAndPositionManager.getCellCount();
839
- } }, { key: "getEstimatedCellSize", value: function() {
840
- return this._cellSizeAndPositionManager.getEstimatedCellSize();
841
- } }, { key: "getLastMeasuredIndex", value: function() {
842
- return this._cellSizeAndPositionManager.getLastMeasuredIndex();
843
- } }, { key: "getOffsetAdjustment", value: function(o) {
844
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize(), l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
845
- return Math.round(l * (r - n));
846
- } }, { key: "getSizeAndPositionOfCell", value: function(o) {
847
- return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(o);
848
- } }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
849
- return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
850
- } }, { key: "getTotalSize", value: function() {
851
- return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
852
- } }, { key: "getUpdatedOffsetForIndex", value: function(o) {
853
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
854
- r = this._safeOffsetToOffset({ containerSize: n, offset: r });
855
- var i = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({ align: t, containerSize: n, currentOffset: r, targetIndex: l });
856
- return this._offsetToSafeOffset({ containerSize: n, offset: i });
857
- } }, { key: "getVisibleCellRange", value: function(o) {
858
- var e = o.containerSize, t = o.offset;
859
- return t = this._safeOffsetToOffset({ containerSize: e, offset: t }), this._cellSizeAndPositionManager.getVisibleCellRange({ containerSize: e, offset: t });
860
- } }, { key: "resetCell", value: function(o) {
861
- this._cellSizeAndPositionManager.resetCell(o);
862
- } }, { key: "_getOffsetPercentage", value: function(o) {
863
- var e = o.containerSize, t = o.offset, n = o.totalSize;
864
- return n <= e ? 0 : t / (n - e);
865
- } }, { key: "_offsetToSafeOffset", value: function(o) {
866
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
867
- if (n === r) return t;
868
- var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: n });
869
- return Math.round(l * (r - e));
870
- } }, { key: "_safeOffsetToOffset", value: function(o) {
871
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
872
- if (n === r) return t;
873
- var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
874
- return Math.round(l * (n - e));
875
- } }]);
876
- function et(o) {
877
- var e = o.cellSize, t = o.cellSizeAndPositionManager, n = o.previousCellsCount, r = o.previousCellSize, l = o.previousScrollToAlignment, i = o.previousScrollToIndex, a = o.previousSize, s = o.scrollOffset, c = o.scrollToAlignment, d = o.scrollToIndex, h = o.size, f = o.sizeJustIncreasedFromZero, u = o.updateScrollIndexCallback, v = t.getCellCount(), m = d >= 0 && d < v;
878
- m && (h !== a || f || !r || typeof e == "number" && e !== r || c !== l || d !== i) ? u(d) : !m && v > 0 && (h < a || v < n) && s > t.getTotalSize() - h && u(v - 1);
879
- }
880
- var Ko = (F = typeof window < "u" ? window : typeof self < "u" ? self : {}).requestAnimationFrame || F.webkitRequestAnimationFrame || F.mozRequestAnimationFrame || F.oRequestAnimationFrame || F.msRequestAnimationFrame || function(o) {
881
- return F.setTimeout(o, 1e3 / 60);
882
- }, qo = F.cancelAnimationFrame || F.webkitCancelAnimationFrame || F.mozCancelAnimationFrame || F.oCancelAnimationFrame || F.msCancelAnimationFrame || function(o) {
883
- F.clearTimeout(o);
884
- }, tt = Ko, Xo = qo, oe = function(o) {
885
- return Xo(o.id);
886
- }, Ge = function(o, e) {
887
- var t;
888
- Promise.resolve().then(function() {
889
- t = Date.now();
890
- });
891
- var n = function() {
892
- Date.now() - t >= e ? o.call() : r.id = tt(n);
893
- }, r = { id: tt(n) };
894
- return r;
895
- };
896
- function ot(o, e) {
897
- var t = Object.keys(o);
898
- if (Object.getOwnPropertySymbols) {
899
- var n = Object.getOwnPropertySymbols(o);
900
- e && (n = n.filter(function(r) {
901
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
902
- })), t.push.apply(t, n);
903
- }
904
- return t;
905
- }
906
- function j(o) {
907
- for (var e = 1; e < arguments.length; e++) {
908
- var t = arguments[e] != null ? arguments[e] : {};
909
- e % 2 ? ot(Object(t), !0).forEach(function(n) {
910
- p(o, n, t[n]);
911
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ot(Object(t)).forEach(function(n) {
912
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
913
- });
914
- }
915
- return o;
916
- }
917
- function Et() {
918
- try {
919
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
920
- }));
921
- } catch {
922
- }
923
- return (Et = function() {
924
- return !!o;
925
- })();
926
- }
927
- var nt = "requested", $ = function() {
928
- function o(e) {
929
- var t, n, r, l;
930
- A(this, o), n = this, l = [e], r = O(r = o), p(t = W(n, Et() ? Reflect.construct(r, l || [], O(n).constructor) : r.apply(n, l)), "_onGridRenderedMemoizer", te()), p(t, "_onScrollMemoizer", te(!1)), p(t, "_deferredInvalidateColumnIndex", null), p(t, "_deferredInvalidateRowIndex", null), p(t, "_recomputeScrollLeftFlag", !1), p(t, "_recomputeScrollTopFlag", !1), p(t, "_horizontalScrollBarSize", 0), p(t, "_verticalScrollBarSize", 0), p(t, "_scrollbarPresenceChanged", !1), p(t, "_scrollingContainer", void 0), p(t, "_childrenToDisplay", void 0), p(t, "_columnStartIndex", void 0), p(t, "_columnStopIndex", void 0), p(t, "_rowStartIndex", void 0), p(t, "_rowStopIndex", void 0), p(t, "_renderedColumnStartIndex", 0), p(t, "_renderedColumnStopIndex", 0), p(t, "_renderedRowStartIndex", 0), p(t, "_renderedRowStopIndex", 0), p(t, "_initialScrollTop", void 0), p(t, "_initialScrollLeft", void 0), p(t, "_disablePointerEventsTimeoutId", void 0), p(t, "_styleCache", {}), p(t, "_cellCache", {}), p(t, "_debounceScrollEndedCallback", function() {
931
- t._disablePointerEventsTimeoutId = null, t.setState({ isScrolling: !1, needToResetStyleCache: !1 });
932
- }), p(t, "_invokeOnGridRenderedHelper", function() {
933
- var s = t.props.onSectionRendered;
934
- t._onGridRenderedMemoizer({ callback: s, indices: { columnOverscanStartIndex: t._columnStartIndex, columnOverscanStopIndex: t._columnStopIndex, columnStartIndex: t._renderedColumnStartIndex, columnStopIndex: t._renderedColumnStopIndex, rowOverscanStartIndex: t._rowStartIndex, rowOverscanStopIndex: t._rowStopIndex, rowStartIndex: t._renderedRowStartIndex, rowStopIndex: t._renderedRowStopIndex } });
935
- }), p(t, "_setScrollingContainerRef", function(s) {
936
- t._scrollingContainer = s, typeof t.props.elementRef == "function" ? t.props.elementRef(s) : ee(t.props.elementRef) === "object" && (t.props.elementRef.current = s);
937
- }), p(t, "_onScroll", function(s) {
938
- s.target === t._scrollingContainer && t.handleScrollEvent(s.target);
939
- });
940
- var i = new Qe({ cellCount: e.columnCount, cellSizeGetter: function(s) {
941
- return o._wrapSizeGetter(e.columnWidth)(s);
942
- }, estimatedCellSize: o._getEstimatedColumnSize(e) }), a = new Qe({ cellCount: e.rowCount, cellSizeGetter: function(s) {
943
- return o._wrapSizeGetter(e.rowHeight)(s);
944
- }, estimatedCellSize: o._getEstimatedRowSize(e) });
945
- return t.state = { instanceProps: { columnSizeAndPositionManager: i, rowSizeAndPositionManager: a, prevColumnWidth: e.columnWidth, prevRowHeight: e.rowHeight, prevColumnCount: e.columnCount, prevRowCount: e.rowCount, prevIsScrolling: e.isScrolling === !0, prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow, scrollbarSize: 0, scrollbarSizeMeasured: !1 }, isScrolling: !1, scrollDirectionHorizontal: 1, scrollDirectionVertical: 1, scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: null, needToResetStyleCache: !1 }, e.scrollToRow > 0 && (t._initialScrollTop = t._getCalculatedScrollTop(e, t.state)), e.scrollToColumn > 0 && (t._initialScrollLeft = t._getCalculatedScrollLeft(e, t.state)), t;
946
- }
947
- return D(o, x.PureComponent), E(o, [{ key: "getOffsetForCell", value: function() {
948
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.alignment, n = t === void 0 ? this.props.scrollToAlignment : t, r = e.columnIndex, l = r === void 0 ? this.props.scrollToColumn : r, i = e.rowIndex, a = i === void 0 ? this.props.scrollToRow : i, s = j(j({}, this.props), {}, { scrollToAlignment: n, scrollToColumn: l, scrollToRow: a });
949
- return { scrollLeft: this._getCalculatedScrollLeft(s), scrollTop: this._getCalculatedScrollTop(s) };
950
- } }, { key: "getTotalRowsHeight", value: function() {
951
- return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
952
- } }, { key: "getTotalColumnsWidth", value: function() {
953
- return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
954
- } }, { key: "handleScrollEvent", value: function(e) {
955
- var t = e.scrollLeft, n = t === void 0 ? 0 : t, r = e.scrollTop, l = r === void 0 ? 0 : r;
956
- if (!(l < 0)) {
957
- this._debounceScrollEnded();
958
- var i = this.props, a = i.autoHeight, s = i.autoWidth, c = i.height, d = i.width, h = this.state.instanceProps, f = h.scrollbarSize, u = h.rowSizeAndPositionManager.getTotalSize(), v = h.columnSizeAndPositionManager.getTotalSize(), m = Math.min(Math.max(0, v - d + f), n), _ = Math.min(Math.max(0, u - c + f), l);
959
- if (this.state.scrollLeft !== m || this.state.scrollTop !== _) {
960
- var S = { isScrolling: !0, scrollDirectionHorizontal: m !== this.state.scrollLeft ? m > this.state.scrollLeft ? 1 : -1 : this.state.scrollDirectionHorizontal, scrollDirectionVertical: _ !== this.state.scrollTop ? _ > this.state.scrollTop ? 1 : -1 : this.state.scrollDirectionVertical, scrollPositionChangeReason: "observed" };
961
- a || (S.scrollTop = _), s || (S.scrollLeft = m), S.needToResetStyleCache = !1, this.setState(S);
962
- }
963
- this._invokeOnScrollMemoizer({ scrollLeft: m, scrollTop: _, totalColumnsWidth: v, totalRowsHeight: u });
964
- }
965
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
966
- var t = e.columnIndex, n = e.rowIndex;
967
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, t) : t, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, n) : n;
968
- } }, { key: "measureAllCells", value: function() {
969
- var e = this.props, t = e.columnCount, n = e.rowCount, r = this.state.instanceProps;
970
- r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t - 1), r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n - 1);
971
- } }, { key: "recomputeGridSize", value: function() {
972
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.scrollToColumn, s = i.scrollToRow, c = this.state.instanceProps;
973
- c.columnSizeAndPositionManager.resetCell(n), c.rowSizeAndPositionManager.resetCell(l), this._recomputeScrollLeftFlag = a >= 0 && (this.state.scrollDirectionHorizontal === 1 ? n <= a : n >= a), this._recomputeScrollTopFlag = s >= 0 && (this.state.scrollDirectionVertical === 1 ? l <= s : l >= s), this._styleCache = {}, this._cellCache = {}, this.forceUpdate();
974
- } }, { key: "scrollToCell", value: function(e) {
975
- var t = e.columnIndex, n = e.rowIndex, r = this.props.columnCount, l = this.props;
976
- r > 1 && t !== void 0 && this._updateScrollLeftForScrollToColumn(j(j({}, l), {}, { scrollToColumn: t })), n !== void 0 && this._updateScrollTopForScrollToRow(j(j({}, l), {}, { scrollToRow: n }));
977
- } }, { key: "componentDidMount", value: function() {
978
- var e = this.props, t = e.getScrollbarSize, n = e.height, r = e.scrollLeft, l = e.scrollToColumn, i = e.scrollTop, a = e.scrollToRow, s = e.width, c = this.state.instanceProps;
979
- if (this._initialScrollTop = 0, this._initialScrollLeft = 0, this._handleInvalidatedGridSize(), c.scrollbarSizeMeasured || this.setState(function(f) {
980
- var u = j(j({}, f), {}, { needToResetStyleCache: !1 });
981
- return u.instanceProps.scrollbarSize = t(), u.instanceProps.scrollbarSizeMeasured = !0, u;
982
- }), typeof r == "number" && r >= 0 || typeof i == "number" && i >= 0) {
983
- var d = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: r, scrollTop: i });
984
- d && (d.needToResetStyleCache = !1, this.setState(d));
985
- }
986
- this._scrollingContainer && (this._scrollingContainer.scrollLeft !== this.state.scrollLeft && (this._scrollingContainer.scrollLeft = this.state.scrollLeft), this._scrollingContainer.scrollTop !== this.state.scrollTop && (this._scrollingContainer.scrollTop = this.state.scrollTop));
987
- var h = n > 0 && s > 0;
988
- l >= 0 && h && this._updateScrollLeftForScrollToColumn(), a >= 0 && h && this._updateScrollTopForScrollToRow(), this._invokeOnGridRenderedHelper(), this._invokeOnScrollMemoizer({ scrollLeft: r || 0, scrollTop: i || 0, totalColumnsWidth: c.columnSizeAndPositionManager.getTotalSize(), totalRowsHeight: c.rowSizeAndPositionManager.getTotalSize() }), this._maybeCallOnScrollbarPresenceChange();
989
- } }, { key: "componentDidUpdate", value: function(e, t) {
990
- var n = this, r = this.props, l = r.autoHeight, i = r.autoWidth, a = r.columnCount, s = r.height, c = r.rowCount, d = r.scrollToAlignment, h = r.scrollToColumn, f = r.scrollToRow, u = r.width, v = this.state, m = v.scrollLeft, _ = v.scrollPositionChangeReason, S = v.scrollTop, y = v.instanceProps;
991
- this._handleInvalidatedGridSize();
992
- var g = a > 0 && e.columnCount === 0 || c > 0 && e.rowCount === 0;
993
- _ === nt && (!i && m >= 0 && (m !== this._scrollingContainer.scrollLeft || g) && (this._scrollingContainer.scrollLeft = m), !l && S >= 0 && (S !== this._scrollingContainer.scrollTop || g) && (this._scrollingContainer.scrollTop = S));
994
- var w = (e.width === 0 || e.height === 0) && s > 0 && u > 0;
995
- if (this._recomputeScrollLeftFlag ? (this._recomputeScrollLeftFlag = !1, this._updateScrollLeftForScrollToColumn(this.props)) : et({ cellSizeAndPositionManager: y.columnSizeAndPositionManager, previousCellsCount: e.columnCount, previousCellSize: e.columnWidth, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToColumn, previousSize: e.width, scrollOffset: m, scrollToAlignment: d, scrollToIndex: h, size: u, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
996
- return n._updateScrollLeftForScrollToColumn(n.props);
997
- } }), this._recomputeScrollTopFlag ? (this._recomputeScrollTopFlag = !1, this._updateScrollTopForScrollToRow(this.props)) : et({ cellSizeAndPositionManager: y.rowSizeAndPositionManager, previousCellsCount: e.rowCount, previousCellSize: e.rowHeight, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToRow, previousSize: e.height, scrollOffset: S, scrollToAlignment: d, scrollToIndex: f, size: s, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
998
- return n._updateScrollTopForScrollToRow(n.props);
999
- } }), this._invokeOnGridRenderedHelper(), m !== t.scrollLeft || S !== t.scrollTop) {
1000
- var C = y.rowSizeAndPositionManager.getTotalSize(), b = y.columnSizeAndPositionManager.getTotalSize();
1001
- this._invokeOnScrollMemoizer({ scrollLeft: m, scrollTop: S, totalColumnsWidth: b, totalRowsHeight: C });
1002
- }
1003
- this._maybeCallOnScrollbarPresenceChange();
1004
- } }, { key: "componentWillUnmount", value: function() {
1005
- this._disablePointerEventsTimeoutId && oe(this._disablePointerEventsTimeoutId);
1006
- } }, { key: "render", value: function() {
1007
- var e = this.props, t = e.autoContainerWidth, n = e.autoHeight, r = e.autoWidth, l = e.className, i = e.containerProps, a = e.containerRole, s = e.containerStyle, c = e.height, d = e.id, h = e.noContentRenderer, f = e.role, u = e.style, v = e.tabIndex, m = e.width, _ = this.state, S = _.instanceProps, y = _.needToResetStyleCache, g = this._isScrolling(), w = { boxSizing: "border-box", direction: "ltr", height: n ? "auto" : c, position: "relative", width: r ? "auto" : m, WebkitOverflowScrolling: "touch", willChange: "transform" };
1008
- y && (this._styleCache = {}), this.state.isScrolling || this._resetStyleCache(), this._calculateChildrenToRender(this.props, this.state);
1009
- var C = S.columnSizeAndPositionManager.getTotalSize(), b = S.rowSizeAndPositionManager.getTotalSize(), R = b > c ? S.scrollbarSize : 0, T = C > m ? S.scrollbarSize : 0;
1010
- T === this._horizontalScrollBarSize && R === this._verticalScrollBarSize || (this._horizontalScrollBarSize = T, this._verticalScrollBarSize = R, this._scrollbarPresenceChanged = !0), w.overflowX = C + R <= m ? "hidden" : "auto", w.overflowY = b + T <= c ? "hidden" : "auto";
1011
- var I = this._childrenToDisplay, k = I.length === 0 && c > 0 && m > 0;
1012
- return x.createElement("div", V({ ref: this._setScrollingContainerRef }, i, { "aria-label": this.props["aria-label"], "aria-readonly": this.props["aria-readonly"], className: N("ReactVirtualized__Grid", l), id: d, onScroll: this._onScroll, role: f, style: j(j({}, w), u), tabIndex: v }), I.length > 0 && x.createElement("div", { className: "ReactVirtualized__Grid__innerScrollContainer", role: a, style: j({ width: t ? "auto" : C, height: b, maxWidth: C, maxHeight: b, overflow: "hidden", pointerEvents: g ? "none" : "", position: "relative" }, s) }, I), k && h());
1013
- } }, { key: "_calculateChildrenToRender", value: function() {
1014
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = e.cellRenderer, r = e.cellRangeRenderer, l = e.columnCount, i = e.deferredMeasurementCache, a = e.height, s = e.overscanColumnCount, c = e.overscanIndicesGetter, d = e.overscanRowCount, h = e.rowCount, f = e.width, u = e.isScrollingOptOut, v = t.scrollDirectionHorizontal, m = t.scrollDirectionVertical, _ = t.instanceProps, S = this._initialScrollTop > 0 ? this._initialScrollTop : t.scrollTop, y = this._initialScrollLeft > 0 ? this._initialScrollLeft : t.scrollLeft, g = this._isScrolling(e, t);
1015
- if (this._childrenToDisplay = [], a > 0 && f > 0) {
1016
- var w = _.columnSizeAndPositionManager.getVisibleCellRange({ containerSize: f, offset: y }), C = _.rowSizeAndPositionManager.getVisibleCellRange({ containerSize: a, offset: S }), b = _.columnSizeAndPositionManager.getOffsetAdjustment({ containerSize: f, offset: y }), R = _.rowSizeAndPositionManager.getOffsetAdjustment({ containerSize: a, offset: S });
1017
- this._renderedColumnStartIndex = w.start, this._renderedColumnStopIndex = w.stop, this._renderedRowStartIndex = C.start, this._renderedRowStopIndex = C.stop;
1018
- var T = c({ direction: "horizontal", cellCount: l, overscanCellsCount: s, scrollDirection: v, startIndex: typeof w.start == "number" ? w.start : 0, stopIndex: typeof w.stop == "number" ? w.stop : -1 }), I = c({ direction: "vertical", cellCount: h, overscanCellsCount: d, scrollDirection: m, startIndex: typeof C.start == "number" ? C.start : 0, stopIndex: typeof C.stop == "number" ? C.stop : -1 }), k = T.overscanStartIndex, P = T.overscanStopIndex, z = I.overscanStartIndex, L = I.overscanStopIndex;
1019
- if (i) {
1020
- if (!i.hasFixedHeight()) {
1021
- for (var G = z; G <= L; G++) if (!i.has(G, 0)) {
1022
- k = 0, P = l - 1;
1023
- break;
1024
- }
1025
- }
1026
- if (!i.hasFixedWidth()) {
1027
- for (var B = k; B <= P; B++) if (!i.has(0, B)) {
1028
- z = 0, L = h - 1;
1029
- break;
1030
- }
1031
- }
1032
- }
1033
- this._childrenToDisplay = r({ cellCache: this._cellCache, cellRenderer: n, columnSizeAndPositionManager: _.columnSizeAndPositionManager, columnStartIndex: k, columnStopIndex: P, deferredMeasurementCache: i, horizontalOffsetAdjustment: b, isScrolling: g, isScrollingOptOut: u, parent: this, rowSizeAndPositionManager: _.rowSizeAndPositionManager, rowStartIndex: z, rowStopIndex: L, scrollLeft: y, scrollTop: S, styleCache: this._styleCache, verticalOffsetAdjustment: R, visibleColumnIndices: w, visibleRowIndices: C }), this._columnStartIndex = k, this._columnStopIndex = P, this._rowStartIndex = z, this._rowStopIndex = L;
1034
- }
1035
- } }, { key: "_debounceScrollEnded", value: function() {
1036
- var e = this.props.scrollingResetTimeInterval;
1037
- this._disablePointerEventsTimeoutId && oe(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = Ge(this._debounceScrollEndedCallback, e);
1038
- } }, { key: "_handleInvalidatedGridSize", value: function() {
1039
- if (typeof this._deferredInvalidateColumnIndex == "number" && typeof this._deferredInvalidateRowIndex == "number") {
1040
- var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
1041
- this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t });
1042
- }
1043
- } }, { key: "_invokeOnScrollMemoizer", value: function(e) {
1044
- var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalColumnsWidth, i = e.totalRowsHeight;
1045
- this._onScrollMemoizer({ callback: function(a) {
1046
- var s = a.scrollLeft, c = a.scrollTop, d = t.props, h = d.height;
1047
- (0, d.onScroll)({ clientHeight: h, clientWidth: d.width, scrollHeight: i, scrollLeft: s, scrollTop: c, scrollWidth: l });
1048
- }, indices: { scrollLeft: n, scrollTop: r } });
1049
- } }, { key: "_isScrolling", value: function() {
1050
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1051
- return Object.hasOwnProperty.call(e, "isScrolling") ? !!e.isScrolling : !!t.isScrolling;
1052
- } }, { key: "_maybeCallOnScrollbarPresenceChange", value: function() {
1053
- if (this._scrollbarPresenceChanged) {
1054
- var e = this.props.onScrollbarPresenceChange;
1055
- this._scrollbarPresenceChanged = !1, e({ horizontal: this._horizontalScrollBarSize > 0, size: this.state.instanceProps.scrollbarSize, vertical: this._verticalScrollBarSize > 0 });
1056
- }
1057
- } }, { key: "scrollToPosition", value: function(e) {
1058
- var t = e.scrollLeft, n = e.scrollTop, r = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: t, scrollTop: n });
1059
- r && (r.needToResetStyleCache = !1, this.setState(r));
1060
- } }, { key: "_getCalculatedScrollLeft", value: function() {
1061
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1062
- return o._getCalculatedScrollLeft(e, t);
1063
- } }, { key: "_updateScrollLeftForScrollToColumn", value: function() {
1064
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
1065
- n && (n.needToResetStyleCache = !1, this.setState(n));
1066
- } }, { key: "_getCalculatedScrollTop", value: function() {
1067
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1068
- return o._getCalculatedScrollTop(e, t);
1069
- } }, { key: "_resetStyleCache", value: function() {
1070
- var e = this._styleCache, t = this._cellCache, n = this.props.isScrollingOptOut;
1071
- this._cellCache = {}, this._styleCache = {};
1072
- for (var r = this._rowStartIndex; r <= this._rowStopIndex; r++) for (var l = this._columnStartIndex; l <= this._columnStopIndex; l++) {
1073
- var i = "".concat(r, "-").concat(l);
1074
- this._styleCache[i] = e[i], n && (this._cellCache[i] = t[i]);
1075
- }
1076
- } }, { key: "_updateScrollTopForScrollToRow", value: function() {
1077
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollTopForScrollToRowStateUpdate(e, t);
1078
- n && (n.needToResetStyleCache = !1, this.setState(n));
1079
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1080
- var n = {};
1081
- e.columnCount === 0 && t.scrollLeft !== 0 || e.rowCount === 0 && t.scrollTop !== 0 ? (n.scrollLeft = 0, n.scrollTop = 0) : (e.scrollLeft !== t.scrollLeft && e.scrollToColumn < 0 || e.scrollTop !== t.scrollTop && e.scrollToRow < 0) && Object.assign(n, o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }));
1082
- var r, l, i = t.instanceProps;
1083
- return n.needToResetStyleCache = !1, e.columnWidth === i.prevColumnWidth && e.rowHeight === i.prevRowHeight || (n.needToResetStyleCache = !0), i.columnSizeAndPositionManager.configure({ cellCount: e.columnCount, estimatedCellSize: o._getEstimatedColumnSize(e), cellSizeGetter: o._wrapSizeGetter(e.columnWidth) }), i.rowSizeAndPositionManager.configure({ cellCount: e.rowCount, estimatedCellSize: o._getEstimatedRowSize(e), cellSizeGetter: o._wrapSizeGetter(e.rowHeight) }), i.prevColumnCount !== 0 && i.prevRowCount !== 0 || (i.prevColumnCount = 0, i.prevRowCount = 0), e.autoHeight && e.isScrolling === !1 && i.prevIsScrolling === !0 && Object.assign(n, { isScrolling: !1 }), Ze({ cellCount: i.prevColumnCount, cellSize: typeof i.prevColumnWidth == "number" ? i.prevColumnWidth : null, computeMetadataCallback: function() {
1084
- return i.columnSizeAndPositionManager.resetCell(0);
1085
- }, computeMetadataCallbackProps: e, nextCellsCount: e.columnCount, nextCellSize: typeof e.columnWidth == "number" ? e.columnWidth : null, nextScrollToIndex: e.scrollToColumn, scrollToIndex: i.prevScrollToColumn, updateScrollOffsetForScrollToIndex: function() {
1086
- r = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
1087
- } }), Ze({ cellCount: i.prevRowCount, cellSize: typeof i.prevRowHeight == "number" ? i.prevRowHeight : null, computeMetadataCallback: function() {
1088
- return i.rowSizeAndPositionManager.resetCell(0);
1089
- }, computeMetadataCallbackProps: e, nextCellsCount: e.rowCount, nextCellSize: typeof e.rowHeight == "number" ? e.rowHeight : null, nextScrollToIndex: e.scrollToRow, scrollToIndex: i.prevScrollToRow, updateScrollOffsetForScrollToIndex: function() {
1090
- l = o._getScrollTopForScrollToRowStateUpdate(e, t);
1091
- } }), i.prevColumnCount = e.columnCount, i.prevColumnWidth = e.columnWidth, i.prevIsScrolling = e.isScrolling === !0, i.prevRowCount = e.rowCount, i.prevRowHeight = e.rowHeight, i.prevScrollToColumn = e.scrollToColumn, i.prevScrollToRow = e.scrollToRow, i.scrollbarSize = e.getScrollbarSize(), i.scrollbarSize === void 0 ? (i.scrollbarSizeMeasured = !1, i.scrollbarSize = 0) : i.scrollbarSizeMeasured = !0, n.instanceProps = i, j(j(j({}, n), r), l);
1092
- } }, { key: "_getEstimatedColumnSize", value: function(e) {
1093
- return typeof e.columnWidth == "number" ? e.columnWidth : e.estimatedColumnSize;
1094
- } }, { key: "_getEstimatedRowSize", value: function(e) {
1095
- return typeof e.rowHeight == "number" ? e.rowHeight : e.estimatedRowSize;
1096
- } }, { key: "_getScrollToPositionStateUpdate", value: function(e) {
1097
- var t = e.prevState, n = e.scrollLeft, r = e.scrollTop, l = { scrollPositionChangeReason: nt };
1098
- return typeof n == "number" && n >= 0 && (l.scrollDirectionHorizontal = n > t.scrollLeft ? 1 : -1, l.scrollLeft = n), typeof r == "number" && r >= 0 && (l.scrollDirectionVertical = r > t.scrollTop ? 1 : -1, l.scrollTop = r), typeof n == "number" && n >= 0 && n !== t.scrollLeft || typeof r == "number" && r >= 0 && r !== t.scrollTop ? l : {};
1099
- } }, { key: "_wrapSizeGetter", value: function(e) {
1100
- return typeof e == "function" ? e : function() {
1101
- return e;
1102
- };
1103
- } }, { key: "_getCalculatedScrollLeft", value: function(e, t) {
1104
- var n = e.columnCount, r = e.height, l = e.scrollToAlignment, i = e.scrollToColumn, a = e.width, s = t.scrollLeft, c = t.instanceProps;
1105
- if (n > 0) {
1106
- var d = n - 1, h = i < 0 ? d : Math.min(d, i), f = c.rowSizeAndPositionManager.getTotalSize(), u = c.scrollbarSizeMeasured && f > r ? c.scrollbarSize : 0;
1107
- return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: a - u, currentOffset: s, targetIndex: h });
1108
- }
1109
- return 0;
1110
- } }, { key: "_getScrollLeftForScrollToColumnStateUpdate", value: function(e, t) {
1111
- var n = t.scrollLeft, r = o._getCalculatedScrollLeft(e, t);
1112
- return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: r, scrollTop: -1 }) : {};
1113
- } }, { key: "_getCalculatedScrollTop", value: function(e, t) {
1114
- var n = e.height, r = e.rowCount, l = e.scrollToAlignment, i = e.scrollToRow, a = e.width, s = t.scrollTop, c = t.instanceProps;
1115
- if (r > 0) {
1116
- var d = r - 1, h = i < 0 ? d : Math.min(d, i), f = c.columnSizeAndPositionManager.getTotalSize(), u = c.scrollbarSizeMeasured && f > a ? c.scrollbarSize : 0;
1117
- return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: n - u, currentOffset: s, targetIndex: h });
1118
- }
1119
- return 0;
1120
- } }, { key: "_getScrollTopForScrollToRowStateUpdate", value: function(e, t) {
1121
- var n = t.scrollTop, r = o._getCalculatedScrollTop(e, t);
1122
- return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: -1, scrollTop: r }) : {};
1123
- } }]);
1124
- }();
1125
- function Ht(o) {
1126
- var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
1127
- return t = Math.max(1, t), n === 1 ? { overscanStartIndex: Math.max(0, r - 1), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l + 1) };
1128
- }
1129
- function Te(o, e) {
1130
- (e == null || e > o.length) && (e = o.length);
1131
- for (var t = 0, n = Array(e); t < e; t++) n[t] = o[t];
1132
- return n;
1133
- }
1134
- function Wt(o, e) {
1135
- if (o) {
1136
- if (typeof o == "string") return Te(o, e);
1137
- var t = {}.toString.call(o).slice(8, -1);
1138
- return t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set" ? Array.from(o) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Te(o, e) : void 0;
1139
- }
1140
- }
1141
- function Dt() {
1142
- try {
1143
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1144
- }));
1145
- } catch {
1146
- }
1147
- return (Dt = function() {
1148
- return !!o;
1149
- })();
1150
- }
1151
- p($, "defaultProps", { "aria-label": "grid", "aria-readonly": !0, autoContainerWidth: !1, autoHeight: !1, autoWidth: !1, cellRangeRenderer: function(o) {
1152
- for (var e = o.cellCache, t = o.cellRenderer, n = o.columnSizeAndPositionManager, r = o.columnStartIndex, l = o.columnStopIndex, i = o.deferredMeasurementCache, a = o.horizontalOffsetAdjustment, s = o.isScrolling, c = o.isScrollingOptOut, d = o.parent, h = o.rowSizeAndPositionManager, f = o.rowStartIndex, u = o.rowStopIndex, v = o.styleCache, m = o.verticalOffsetAdjustment, _ = o.visibleColumnIndices, S = o.visibleRowIndices, y = [], g = n.areOffsetsAdjusted() || h.areOffsetsAdjusted(), w = !s && !g, C = f; C <= u; C++) for (var b = h.getSizeAndPositionOfCell(C), R = r; R <= l; R++) {
1153
- var T = n.getSizeAndPositionOfCell(R), I = R >= _.start && R <= _.stop && C >= S.start && C <= S.stop, k = "".concat(C, "-").concat(R), P = void 0;
1154
- w && v[k] ? P = v[k] : i && !i.has(C, R) ? P = { height: "auto", left: 0, position: "absolute", top: 0, width: "auto" } : (P = { height: b.size, left: T.offset + a, position: "absolute", top: b.offset + m, width: T.size }, v[k] = P);
1155
- var z = { columnIndex: R, isScrolling: s, isVisible: I, key: k, parent: d, rowIndex: C, style: P }, L = void 0;
1156
- !c && !s || a || m ? L = t(z) : (e[k] || (e[k] = t(z)), L = e[k]), L != null && L !== !1 && (L.props.role || (L = Ct.cloneElement(L, { role: "gridcell" })), y.push(L));
1157
- }
1158
- return y;
1159
- }, containerRole: "row", containerStyle: {}, estimatedColumnSize: 100, estimatedRowSize: 30, getScrollbarSize: ze, noContentRenderer: function() {
1160
- return null;
1161
- }, onScroll: function() {
1162
- }, onScrollbarPresenceChange: function() {
1163
- }, onSectionRendered: function() {
1164
- }, overscanColumnCount: 0, overscanIndicesGetter: function(o) {
1165
- var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
1166
- return n === 1 ? { overscanStartIndex: Math.max(0, r), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l) };
1167
- }, overscanRowCount: 10, role: "grid", scrollingResetTimeInterval: 150, scrollToAlignment: "auto", scrollToColumn: -1, scrollToRow: -1, style: {}, tabIndex: 0, isScrollingOptOut: !1 }), ue($);
1168
- var rt = function() {
1169
- function o(e, t) {
1170
- var n, r, l, i;
1171
- return A(this, o), r = this, i = [e, t], l = O(l = o), (n = W(r, Dt() ? Reflect.construct(l, i || [], O(r).constructor) : l.apply(r, i)))._loadMoreRowsMemoizer = te(), n._onRowsRendered = n._onRowsRendered.bind(n), n._registerChild = n._registerChild.bind(n), n;
1172
- }
1173
- return D(o, x.PureComponent), E(o, [{ key: "resetLoadMoreRowsCache", value: function(e) {
1174
- this._loadMoreRowsMemoizer = te(), e && this._doStuff(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1175
- } }, { key: "render", value: function() {
1176
- return (0, this.props.children)({ onRowsRendered: this._onRowsRendered, registerChild: this._registerChild });
1177
- } }, { key: "_loadUnloadedRanges", value: function(e) {
1178
- var t = this, n = this.props.loadMoreRows;
1179
- e.forEach(function(r) {
1180
- var l = n(r);
1181
- l && l.then(function() {
1182
- var i;
1183
- (i = { lastRenderedStartIndex: t._lastRenderedStartIndex, lastRenderedStopIndex: t._lastRenderedStopIndex, startIndex: r.startIndex, stopIndex: r.stopIndex }).startIndex > i.lastRenderedStopIndex || i.stopIndex < i.lastRenderedStartIndex || t._registeredChild && function(a) {
1184
- var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, c = typeof a.recomputeGridSize == "function" ? a.recomputeGridSize : a.recomputeRowHeights;
1185
- c ? c.call(a, s) : a.forceUpdate();
1186
- }(t._registeredChild, t._lastRenderedStartIndex);
1187
- });
1188
- });
1189
- } }, { key: "_onRowsRendered", value: function(e) {
1190
- var t = e.startIndex, n = e.stopIndex;
1191
- this._lastRenderedStartIndex = t, this._lastRenderedStopIndex = n, this._doStuff(t, n);
1192
- } }, { key: "_doStuff", value: function(e, t) {
1193
- var n, r = this, l = this.props, i = l.isRowLoaded, a = l.minimumBatchSize, s = l.rowCount, c = l.threshold, d = function(f) {
1194
- for (var u = f.isRowLoaded, v = f.minimumBatchSize, m = f.rowCount, _ = f.stopIndex, S = [], y = null, g = null, w = f.startIndex; w <= _; w++) u({ index: w }) ? g !== null && (S.push({ startIndex: y, stopIndex: g }), y = g = null) : (g = w, y === null && (y = w));
1195
- if (g !== null) {
1196
- for (var C = Math.min(Math.max(g, y + v - 1), m - 1), b = g + 1; b <= C && !u({ index: b }); b++) g = b;
1197
- S.push({ startIndex: y, stopIndex: g });
1198
- }
1199
- if (S.length) for (var R = S[0]; R.stopIndex - R.startIndex + 1 < v && R.startIndex > 0; ) {
1200
- var T = R.startIndex - 1;
1201
- if (u({ index: T })) break;
1202
- R.startIndex = T;
1203
- }
1204
- return S;
1205
- }({ isRowLoaded: i, minimumBatchSize: a, rowCount: s, startIndex: Math.max(0, e - c), stopIndex: Math.min(s - 1, t + c) }), h = (n = []).concat.apply(n, function(f) {
1206
- return function(u) {
1207
- if (Array.isArray(u)) return Te(u);
1208
- }(f) || function(u) {
1209
- if (typeof Symbol < "u" && u[Symbol.iterator] != null || u["@@iterator"] != null) return Array.from(u);
1210
- }(f) || Wt(f) || function() {
1211
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
1212
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1213
- }();
1214
- }(d.map(function(f) {
1215
- return [f.startIndex, f.stopIndex];
1216
- })));
1217
- this._loadMoreRowsMemoizer({ callback: function() {
1218
- r._loadUnloadedRanges(d);
1219
- }, indices: { squashedUnloadedRanges: h } });
1220
- } }, { key: "_registerChild", value: function(e) {
1221
- this._registeredChild = e;
1222
- } }]);
1223
- }();
1224
- function jt() {
1225
- try {
1226
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1227
- }));
1228
- } catch {
1229
- }
1230
- return (jt = function() {
1231
- return !!o;
1232
- })();
1233
- }
1234
- p(rt, "defaultProps", { minimumBatchSize: 10, rowCount: 0, threshold: 15 }), rt.propTypes = {};
1235
- var Yo = function() {
1236
- function o() {
1237
- var e, t, n, r;
1238
- A(this, o);
1239
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
1240
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, jt() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "Grid", void 0), p(e, "_cellRenderer", function(s) {
1241
- var c = s.parent, d = s.rowIndex, h = s.style, f = s.isScrolling, u = s.isVisible, v = s.key, m = e.props.rowRenderer, _ = Object.getOwnPropertyDescriptor(h, "width");
1242
- return _ && _.writable && (h.width = "100%"), m({ index: d, style: h, isScrolling: f, isVisible: u, key: v, parent: c });
1243
- }), p(e, "_setRef", function(s) {
1244
- e.Grid = s;
1245
- }), p(e, "_onScroll", function(s) {
1246
- var c = s.clientHeight, d = s.scrollHeight, h = s.scrollTop;
1247
- (0, e.props.onScroll)({ clientHeight: c, scrollHeight: d, scrollTop: h });
1248
- }), p(e, "_onSectionRendered", function(s) {
1249
- var c = s.rowOverscanStartIndex, d = s.rowOverscanStopIndex, h = s.rowStartIndex, f = s.rowStopIndex;
1250
- (0, e.props.onRowsRendered)({ overscanStartIndex: c, overscanStopIndex: d, startIndex: h, stopIndex: f });
1251
- }), e;
1252
- }
1253
- return D(o, x.PureComponent), E(o, [{ key: "forceUpdateGrid", value: function() {
1254
- this.Grid && this.Grid.forceUpdate();
1255
- } }, { key: "getOffsetForRow", value: function(e) {
1256
- var t = e.alignment, n = e.index;
1257
- return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n, columnIndex: 0 }).scrollTop : 0;
1258
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1259
- var t = e.columnIndex, n = e.rowIndex;
1260
- this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
1261
- } }, { key: "measureAllRows", value: function() {
1262
- this.Grid && this.Grid.measureAllCells();
1263
- } }, { key: "recomputeGridSize", value: function() {
1264
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1265
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
1266
- } }, { key: "recomputeRowHeights", value: function() {
1267
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1268
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: e, columnIndex: 0 });
1269
- } }, { key: "scrollToPosition", value: function() {
1270
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1271
- this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
1272
- } }, { key: "scrollToRow", value: function() {
1273
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1274
- this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
1275
- } }, { key: "render", value: function() {
1276
- var e = this.props, t = e.className, n = e.noRowsRenderer, r = e.scrollToIndex, l = e.width, i = N("ReactVirtualized__List", t);
1277
- return x.createElement($, V({}, this.props, { autoContainerWidth: !0, cellRenderer: this._cellRenderer, className: i, columnWidth: l, columnCount: 1, noContentRenderer: n, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, scrollToRow: r }));
1278
- } }]);
1279
- }();
1280
- p(Yo, "defaultProps", { autoHeight: !1, estimatedRowSize: 30, onScroll: function() {
1281
- }, noRowsRenderer: function() {
1282
- return null;
1283
- }, onRowsRendered: function() {
1284
- }, overscanIndicesGetter: Ht, overscanRowCount: 10, scrollToAlignment: "auto", scrollToIndex: -1, style: {} });
1285
- const ge = function(o, e, t, n, r) {
1286
- return typeof t == "function" ? function(l, i, a, s, c) {
1287
- for (var d = a + 1; i <= a; ) {
1288
- var h = i + a >>> 1;
1289
- c(l[h], s) >= 0 ? (d = h, a = h - 1) : i = h + 1;
1290
- }
1291
- return d;
1292
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1293
- for (var c = a + 1; i <= a; ) {
1294
- var d = i + a >>> 1;
1295
- l[d] >= s ? (c = d, a = d - 1) : i = d + 1;
1296
- }
1297
- return c;
1298
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1299
- };
1300
- function Ae(o, e, t, n, r) {
1301
- this.mid = o, this.left = e, this.right = t, this.leftPoints = n, this.rightPoints = r, this.count = (e ? e.count : 0) + (t ? t.count : 0) + n.length;
1302
- }
1303
- var re = Ae.prototype;
1304
- function Ce(o, e) {
1305
- o.mid = e.mid, o.left = e.left, o.right = e.right, o.leftPoints = e.leftPoints, o.rightPoints = e.rightPoints, o.count = e.count;
1306
- }
1307
- function Ft(o, e) {
1308
- var t = ce(e);
1309
- o.mid = t.mid, o.left = t.left, o.right = t.right, o.leftPoints = t.leftPoints, o.rightPoints = t.rightPoints, o.count = t.count;
1310
- }
1311
- function it(o, e) {
1312
- var t = o.intervals([]);
1313
- t.push(e), Ft(o, t);
1314
- }
1315
- function lt(o, e) {
1316
- var t = o.intervals([]), n = t.indexOf(e);
1317
- return n < 0 ? 0 : (t.splice(n, 1), Ft(o, t), 1);
1318
- }
1319
- function st(o, e, t) {
1320
- for (var n = 0; n < o.length && o[n][0] <= e; ++n) {
1321
- var r = t(o[n]);
1322
- if (r) return r;
1323
- }
1324
- }
1325
- function at(o, e, t) {
1326
- for (var n = o.length - 1; n >= 0 && o[n][1] >= e; --n) {
1327
- var r = t(o[n]);
1328
- if (r) return r;
1329
- }
1330
- }
1331
- function ct(o, e) {
1332
- for (var t = 0; t < o.length; ++t) {
1333
- var n = e(o[t]);
1334
- if (n) return n;
1335
- }
1336
- }
1337
- function Jo(o, e) {
1338
- return o - e;
1339
- }
1340
- function Ie(o, e) {
1341
- return o[0] - e[0] || o[1] - e[1];
1342
- }
1343
- function Pe(o, e) {
1344
- return o[1] - e[1] || o[0] - e[0];
1345
- }
1346
- function ce(o) {
1347
- if (o.length === 0) return null;
1348
- for (var e = [], t = 0; t < o.length; ++t) e.push(o[t][0], o[t][1]);
1349
- e.sort(Jo);
1350
- var n = e[e.length >> 1], r = [], l = [], i = [];
1351
- for (t = 0; t < o.length; ++t) {
1352
- var a = o[t];
1353
- a[1] < n ? r.push(a) : n < a[0] ? l.push(a) : i.push(a);
1354
- }
1355
- var s = i, c = i.slice();
1356
- return s.sort(Ie), c.sort(Pe), new Ae(n, ce(r), ce(l), s, c);
1357
- }
1358
- function Nt(o) {
1359
- this.root = o;
1360
- }
1361
- re.intervals = function(o) {
1362
- return o.push.apply(o, this.leftPoints), this.left && this.left.intervals(o), this.right && this.right.intervals(o), o;
1363
- }, re.insert = function(o) {
1364
- var e = this.count - this.leftPoints.length;
1365
- if (this.count += 1, o[1] < this.mid) this.left ? 4 * (this.left.count + 1) > 3 * (e + 1) ? it(this, o) : this.left.insert(o) : this.left = ce([o]);
1366
- else if (o[0] > this.mid) this.right ? 4 * (this.right.count + 1) > 3 * (e + 1) ? it(this, o) : this.right.insert(o) : this.right = ce([o]);
1367
- else {
1368
- var t = ge(this.leftPoints, o, Ie), n = ge(this.rightPoints, o, Pe);
1369
- this.leftPoints.splice(t, 0, o), this.rightPoints.splice(n, 0, o);
1370
- }
1371
- }, re.remove = function(o) {
1372
- var e = this.count - this.leftPoints;
1373
- if (o[1] < this.mid) return this.left ? 4 * (this.right ? this.right.count : 0) > 3 * (e - 1) ? lt(this, o) : (l = this.left.remove(o)) === 2 ? (this.left = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
1374
- if (o[0] > this.mid) return this.right ? 4 * (this.left ? this.left.count : 0) > 3 * (e - 1) ? lt(this, o) : (l = this.right.remove(o)) === 2 ? (this.right = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
1375
- if (this.count === 1) return this.leftPoints[0] === o ? 2 : 0;
1376
- if (this.leftPoints.length === 1 && this.leftPoints[0] === o) {
1377
- if (this.left && this.right) {
1378
- for (var t = this, n = this.left; n.right; ) t = n, n = n.right;
1379
- if (t === this) n.right = this.right;
1380
- else {
1381
- var r = this.left, l = this.right;
1382
- t.count -= n.count, t.right = n.left, n.left = r, n.right = l;
1383
- }
1384
- Ce(this, n), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
1385
- } else this.left ? Ce(this, this.left) : Ce(this, this.right);
1386
- return 1;
1387
- }
1388
- for (r = ge(this.leftPoints, o, Ie); r < this.leftPoints.length && this.leftPoints[r][0] === o[0]; ++r) if (this.leftPoints[r] === o) {
1389
- for (this.count -= 1, this.leftPoints.splice(r, 1), l = ge(this.rightPoints, o, Pe); l < this.rightPoints.length && this.rightPoints[l][1] === o[1]; ++l) if (this.rightPoints[l] === o) return this.rightPoints.splice(l, 1), 1;
1390
- }
1391
- return 0;
1392
- }, re.queryPoint = function(o, e) {
1393
- return o < this.mid ? this.left && (t = this.left.queryPoint(o, e)) ? t : st(this.leftPoints, o, e) : o > this.mid ? this.right && (t = this.right.queryPoint(o, e)) ? t : at(this.rightPoints, o, e) : ct(this.leftPoints, e);
1394
- var t;
1395
- }, re.queryInterval = function(o, e, t) {
1396
- var n;
1397
- return o < this.mid && this.left && (n = this.left.queryInterval(o, e, t)) || e > this.mid && this.right && (n = this.right.queryInterval(o, e, t)) ? n : e < this.mid ? st(this.leftPoints, e, t) : o > this.mid ? at(this.rightPoints, o, t) : ct(this.leftPoints, t);
1398
- };
1399
- var J = Nt.prototype;
1400
- J.insert = function(o) {
1401
- this.root ? this.root.insert(o) : this.root = new Ae(o[0], null, null, [o], [o]);
1402
- }, J.remove = function(o) {
1403
- if (this.root) {
1404
- var e = this.root.remove(o);
1405
- return e === 2 && (this.root = null), e !== 0;
1406
- }
1407
- return !1;
1408
- }, J.queryPoint = function(o, e) {
1409
- if (this.root) return this.root.queryPoint(o, e);
1410
- }, J.queryInterval = function(o, e, t) {
1411
- if (o <= e && this.root) return this.root.queryInterval(o, e, t);
1412
- }, Object.defineProperty(J, "count", { get: function() {
1413
- return this.root ? this.root.count : 0;
1414
- } }), Object.defineProperty(J, "intervals", { get: function() {
1415
- return this.root ? this.root.intervals([]) : [];
1416
- } });
1417
- var xe = E(function o() {
1418
- A(this, o), p(this, "_columnSizeMap", {}), p(this, "_intervalTree", new Nt(null)), p(this, "_leftMap", {});
1419
- }, [{ key: "estimateTotalHeight", value: function(o, e, t) {
1420
- var n = o - this.count;
1421
- return this.tallestColumnSize + Math.ceil(n / e) * t;
1422
- } }, { key: "range", value: function(o, e, t) {
1423
- var n = this;
1424
- this._intervalTree.queryInterval(o, o + e, function(r) {
1425
- var l = function(s, c) {
1426
- return function(d) {
1427
- if (Array.isArray(d)) return d;
1428
- }(s) || function(d, h) {
1429
- var f = d == null ? null : typeof Symbol < "u" && d[Symbol.iterator] || d["@@iterator"];
1430
- if (f != null) {
1431
- var u, v, m, _, S = [], y = !0, g = !1;
1432
- try {
1433
- if (m = (f = f.call(d)).next, h !== 0) for (; !(y = (u = m.call(f)).done) && (S.push(u.value), S.length !== h); y = !0) ;
1434
- } catch (w) {
1435
- g = !0, v = w;
1436
- } finally {
1437
- try {
1438
- if (!y && f.return != null && (_ = f.return(), Object(_) !== _)) return;
1439
- } finally {
1440
- if (g) throw v;
1441
- }
1442
- }
1443
- return S;
1444
- }
1445
- }(s, c) || Wt(s, c) || function() {
1446
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1447
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1448
- }();
1449
- }(r, 3), i = l[0];
1450
- l[1];
1451
- var a = l[2];
1452
- return t(a, n._leftMap[a], i);
1453
- });
1454
- } }, { key: "setPosition", value: function(o, e, t, n) {
1455
- this._intervalTree.insert([t, t + n, o]), this._leftMap[o] = e;
1456
- var r = this._columnSizeMap, l = r[e];
1457
- r[e] = l === void 0 ? t + n : Math.max(l, t + n);
1458
- } }, { key: "count", get: function() {
1459
- return this._intervalTree.count;
1460
- } }, { key: "shortestColumnSize", get: function() {
1461
- var o = this._columnSizeMap, e = 0;
1462
- for (var t in o) {
1463
- var n = o[t];
1464
- e = e === 0 ? n : Math.min(e, n);
1465
- }
1466
- return e;
1467
- } }, { key: "tallestColumnSize", get: function() {
1468
- var o = this._columnSizeMap, e = 0;
1469
- for (var t in o) {
1470
- var n = o[t];
1471
- e = Math.max(e, n);
1472
- }
1473
- return e;
1474
- } }]);
1475
- function dt(o, e) {
1476
- var t = Object.keys(o);
1477
- if (Object.getOwnPropertySymbols) {
1478
- var n = Object.getOwnPropertySymbols(o);
1479
- e && (n = n.filter(function(r) {
1480
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1481
- })), t.push.apply(t, n);
1482
- }
1483
- return t;
1484
- }
1485
- function Zo(o) {
1486
- for (var e = 1; e < arguments.length; e++) {
1487
- var t = arguments[e] != null ? arguments[e] : {};
1488
- e % 2 ? dt(Object(t), !0).forEach(function(n) {
1489
- p(o, n, t[n]);
1490
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : dt(Object(t)).forEach(function(n) {
1491
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1492
- });
1493
- }
1494
- return o;
1495
- }
1496
- function Bt() {
1497
- try {
1498
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1499
- }));
1500
- } catch {
1501
- }
1502
- return (Bt = function() {
1503
- return !!o;
1504
- })();
1505
- }
1506
- var ut = function() {
1507
- function o() {
1508
- var e, t, n, r;
1509
- A(this, o);
1510
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
1511
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, Bt() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollTop: 0 }), p(e, "_debounceResetIsScrollingId", void 0), p(e, "_invalidateOnUpdateStartIndex", null), p(e, "_invalidateOnUpdateStopIndex", null), p(e, "_positionCache", new xe()), p(e, "_startIndex", null), p(e, "_startIndexMemoized", null), p(e, "_stopIndex", null), p(e, "_stopIndexMemoized", null), p(e, "_debounceResetIsScrollingCallback", function() {
1512
- e.setState({ isScrolling: !1 });
1513
- }), p(e, "_setScrollingContainerRef", function(s) {
1514
- e._scrollingContainer = s;
1515
- }), p(e, "_onScroll", function(s) {
1516
- var c = e.props.height, d = s.currentTarget.scrollTop, h = Math.min(Math.max(0, e._getEstimatedTotalHeight() - c), d);
1517
- d === h && (e._debounceResetIsScrolling(), e.state.scrollTop !== h && e.setState({ isScrolling: !0, scrollTop: h }));
1518
- }), e;
1519
- }
1520
- return D(o, x.PureComponent), E(o, [{ key: "clearCellPositions", value: function() {
1521
- this._positionCache = new xe(), this.forceUpdate();
1522
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1523
- var t = e.rowIndex;
1524
- this._invalidateOnUpdateStartIndex === null ? (this._invalidateOnUpdateStartIndex = t, this._invalidateOnUpdateStopIndex = t) : (this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, t), this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, t));
1525
- } }, { key: "recomputeCellPositions", value: function() {
1526
- var e = this._positionCache.count - 1;
1527
- this._positionCache = new xe(), this._populatePositionCache(0, e), this.forceUpdate();
1528
- } }, { key: "componentDidMount", value: function() {
1529
- this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback();
1530
- } }, { key: "componentDidUpdate", value: function(e, t) {
1531
- this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback(), this.props.scrollTop !== e.scrollTop && this._debounceResetIsScrolling();
1532
- } }, { key: "componentWillUnmount", value: function() {
1533
- this._debounceResetIsScrollingId && oe(this._debounceResetIsScrollingId);
1534
- } }, { key: "render", value: function() {
1535
- var e, t = this, n = this.props, r = n.autoHeight, l = n.cellCount, i = n.cellMeasurerCache, a = n.cellRenderer, s = n.className, c = n.height, d = n.id, h = n.keyMapper, f = n.overscanByPixels, u = n.role, v = n.style, m = n.tabIndex, _ = n.width, S = n.rowDirection, y = this.state, g = y.isScrolling, w = y.scrollTop, C = [], b = this._getEstimatedTotalHeight(), R = this._positionCache.shortestColumnSize, T = this._positionCache.count, I = 0;
1536
- if (this._positionCache.range(Math.max(0, w - f), c + 2 * f, function(z, L, G) {
1537
- e === void 0 ? (I = z, e = z) : (I = Math.min(I, z), e = Math.max(e, z)), C.push(a({ index: z, isScrolling: g, key: h(z), parent: t, style: p(p(p(p({ height: i.getHeight(z) }, S === "ltr" ? "left" : "right", L), "position", "absolute"), "top", G), "width", i.getWidth(z)) }));
1538
- }), R < w + c + f && T < l) for (var k = Math.min(l - T, Math.ceil((w + c + f - R) / i.defaultHeight * _ / i.defaultWidth)), P = T; P < T + k; P++) e = P, C.push(a({ index: P, isScrolling: g, key: h(P), parent: this, style: { width: i.getWidth(P) } }));
1539
- return this._startIndex = I, this._stopIndex = e, x.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Masonry", s), id: d, onScroll: this._onScroll, role: u, style: Zo({ boxSizing: "border-box", direction: "ltr", height: r ? "auto" : c, overflowX: "hidden", overflowY: b < c ? "hidden" : "auto", position: "relative", width: _, WebkitOverflowScrolling: "touch", willChange: "transform" }, v), tabIndex: m }, x.createElement("div", { className: "ReactVirtualized__Masonry__innerScrollContainer", style: { width: "100%", height: b, maxWidth: "100%", maxHeight: b, overflow: "hidden", pointerEvents: g ? "none" : "", position: "relative" } }, C));
1540
- } }, { key: "_checkInvalidateOnUpdate", value: function() {
1541
- if (typeof this._invalidateOnUpdateStartIndex == "number") {
1542
- var e = this._invalidateOnUpdateStartIndex, t = this._invalidateOnUpdateStopIndex;
1543
- this._invalidateOnUpdateStartIndex = null, this._invalidateOnUpdateStopIndex = null, this._populatePositionCache(e, t), this.forceUpdate();
1544
- }
1545
- } }, { key: "_debounceResetIsScrolling", value: function() {
1546
- var e = this.props.scrollingResetTimeInterval;
1547
- this._debounceResetIsScrollingId && oe(this._debounceResetIsScrollingId), this._debounceResetIsScrollingId = Ge(this._debounceResetIsScrollingCallback, e);
1548
- } }, { key: "_getEstimatedTotalHeight", value: function() {
1549
- var e = this.props, t = e.cellCount, n = e.cellMeasurerCache, r = e.width, l = Math.max(1, Math.floor(r / n.defaultWidth));
1550
- return this._positionCache.estimateTotalHeight(t, l, n.defaultHeight);
1551
- } }, { key: "_invokeOnScrollCallback", value: function() {
1552
- var e = this.props, t = e.height, n = e.onScroll, r = this.state.scrollTop;
1553
- this._onScrollMemoized !== r && (n({ clientHeight: t, scrollHeight: this._getEstimatedTotalHeight(), scrollTop: r }), this._onScrollMemoized = r);
1554
- } }, { key: "_invokeOnCellsRenderedCallback", value: function() {
1555
- this._startIndexMemoized === this._startIndex && this._stopIndexMemoized === this._stopIndex || ((0, this.props.onCellsRendered)({ startIndex: this._startIndex, stopIndex: this._stopIndex }), this._startIndexMemoized = this._startIndex, this._stopIndexMemoized = this._stopIndex);
1556
- } }, { key: "_populatePositionCache", value: function(e, t) {
1557
- for (var n = this.props, r = n.cellMeasurerCache, l = n.cellPositioner, i = e; i <= t; i++) {
1558
- var a = l(i), s = a.left, c = a.top;
1559
- this._positionCache.setPosition(i, s, c, r.getHeight(i));
1560
- }
1561
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1562
- return e.scrollTop !== void 0 && t.scrollTop !== e.scrollTop ? { isScrolling: !0, scrollTop: e.scrollTop } : null;
1563
- } }]);
1564
- }();
1565
- function ht() {
1566
- }
1567
- p(ut, "defaultProps", { autoHeight: !1, keyMapper: function(o) {
1568
- return o;
1569
- }, onCellsRendered: ht, onScroll: ht, overscanByPixels: 20, role: "grid", scrollingResetTimeInterval: 150, style: {}, tabIndex: 0, rowDirection: "ltr" }), ue(ut);
1570
- var Re = E(function o() {
1571
- var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1572
- A(this, o), p(this, "_cellMeasurerCache", void 0), p(this, "_columnIndexOffset", void 0), p(this, "_rowIndexOffset", void 0), p(this, "columnWidth", function(s) {
1573
- var c = s.index;
1574
- e._cellMeasurerCache.columnWidth({ index: c + e._columnIndexOffset });
1575
- }), p(this, "rowHeight", function(s) {
1576
- var c = s.index;
1577
- e._cellMeasurerCache.rowHeight({ index: c + e._rowIndexOffset });
1578
- });
1579
- var n = t.cellMeasurerCache, r = t.columnIndexOffset, l = r === void 0 ? 0 : r, i = t.rowIndexOffset, a = i === void 0 ? 0 : i;
1580
- this._cellMeasurerCache = n, this._columnIndexOffset = l, this._rowIndexOffset = a;
1581
- }, [{ key: "clear", value: function(o, e) {
1582
- this._cellMeasurerCache.clear(o + this._rowIndexOffset, e + this._columnIndexOffset);
1583
- } }, { key: "clearAll", value: function() {
1584
- this._cellMeasurerCache.clearAll();
1585
- } }, { key: "defaultHeight", get: function() {
1586
- return this._cellMeasurerCache.defaultHeight;
1587
- } }, { key: "defaultWidth", get: function() {
1588
- return this._cellMeasurerCache.defaultWidth;
1589
- } }, { key: "hasFixedHeight", value: function() {
1590
- return this._cellMeasurerCache.hasFixedHeight();
1591
- } }, { key: "hasFixedWidth", value: function() {
1592
- return this._cellMeasurerCache.hasFixedWidth();
1593
- } }, { key: "getHeight", value: function(o) {
1594
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1595
- return this._cellMeasurerCache.getHeight(o + this._rowIndexOffset, e + this._columnIndexOffset);
1596
- } }, { key: "getWidth", value: function(o) {
1597
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1598
- return this._cellMeasurerCache.getWidth(o + this._rowIndexOffset, e + this._columnIndexOffset);
1599
- } }, { key: "has", value: function(o) {
1600
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1601
- return this._cellMeasurerCache.has(o + this._rowIndexOffset, e + this._columnIndexOffset);
1602
- } }, { key: "set", value: function(o, e, t, n) {
1603
- this._cellMeasurerCache.set(o + this._rowIndexOffset, e + this._columnIndexOffset, t, n);
1604
- } }]), Qo = ["rowIndex"], en = ["columnIndex", "rowIndex"], tn = ["columnIndex"], on = ["onScroll", "onSectionRendered", "onScrollbarPresenceChange", "scrollLeft", "scrollToColumn", "scrollTop", "scrollToRow"];
1605
- function ft(o, e) {
1606
- var t = Object.keys(o);
1607
- if (Object.getOwnPropertySymbols) {
1608
- var n = Object.getOwnPropertySymbols(o);
1609
- e && (n = n.filter(function(r) {
1610
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1611
- })), t.push.apply(t, n);
1612
- }
1613
- return t;
1614
- }
1615
- function M(o) {
1616
- for (var e = 1; e < arguments.length; e++) {
1617
- var t = arguments[e] != null ? arguments[e] : {};
1618
- e % 2 ? ft(Object(t), !0).forEach(function(n) {
1619
- p(o, n, t[n]);
1620
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ft(Object(t)).forEach(function(n) {
1621
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1622
- });
1623
- }
1624
- return o;
1625
- }
1626
- function Ut() {
1627
- try {
1628
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1629
- }));
1630
- } catch {
1631
- }
1632
- return (Ut = function() {
1633
- return !!o;
1634
- })();
1635
- }
1636
- var be = function() {
1637
- function o(e, t) {
1638
- var n, r, l, i;
1639
- A(this, o), r = this, i = [e, t], l = O(l = o), p(n = W(r, Ut() ? Reflect.construct(l, i || [], O(r).constructor) : l.apply(r, i)), "state", { scrollLeft: 0, scrollTop: 0, scrollbarSize: 0, showHorizontalScrollbar: !1, showVerticalScrollbar: !1 }), p(n, "_deferredInvalidateColumnIndex", null), p(n, "_deferredInvalidateRowIndex", null), p(n, "_bottomLeftGridRef", function(d) {
1640
- n._bottomLeftGrid = d;
1641
- }), p(n, "_bottomRightGridRef", function(d) {
1642
- n._bottomRightGrid = d;
1643
- }), p(n, "_cellRendererBottomLeftGrid", function(d) {
1644
- var h = d.rowIndex, f = ie(d, Qo), u = n.props, v = u.cellRenderer, m = u.fixedRowCount;
1645
- return h === u.rowCount - m ? x.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { height: 20 }) }) : v(M(M({}, f), {}, { parent: n, rowIndex: h + m }));
1646
- }), p(n, "_cellRendererBottomRightGrid", function(d) {
1647
- var h = d.columnIndex, f = d.rowIndex, u = ie(d, en), v = n.props, m = v.cellRenderer, _ = v.fixedColumnCount, S = v.fixedRowCount;
1648
- return m(M(M({}, u), {}, { columnIndex: h + _, parent: n, rowIndex: f + S }));
1649
- }), p(n, "_cellRendererTopRightGrid", function(d) {
1650
- var h = d.columnIndex, f = ie(d, tn), u = n.props, v = u.cellRenderer, m = u.columnCount, _ = u.fixedColumnCount;
1651
- return h === m - _ ? x.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { width: 20 }) }) : v(M(M({}, f), {}, { columnIndex: h + _, parent: n }));
1652
- }), p(n, "_columnWidthRightGrid", function(d) {
1653
- var h = d.index, f = n.props, u = f.columnCount, v = f.fixedColumnCount, m = f.columnWidth, _ = n.state, S = _.scrollbarSize;
1654
- return _.showHorizontalScrollbar && h === u - v ? S : typeof m == "function" ? m({ index: h + v }) : m;
1655
- }), p(n, "_onScroll", function(d) {
1656
- var h = d.scrollLeft, f = d.scrollTop;
1657
- n.setState({ scrollLeft: h, scrollTop: f });
1658
- var u = n.props.onScroll;
1659
- u && u(d);
1660
- }), p(n, "_onScrollbarPresenceChange", function(d) {
1661
- var h = d.horizontal, f = d.size, u = d.vertical, v = n.state, m = v.showHorizontalScrollbar, _ = v.showVerticalScrollbar;
1662
- if (h !== m || u !== _) {
1663
- n.setState({ scrollbarSize: f, showHorizontalScrollbar: h, showVerticalScrollbar: u });
1664
- var S = n.props.onScrollbarPresenceChange;
1665
- typeof S == "function" && S({ horizontal: h, size: f, vertical: u });
1666
- }
1667
- }), p(n, "_onScrollLeft", function(d) {
1668
- var h = d.scrollLeft;
1669
- n._onScroll({ scrollLeft: h, scrollTop: n.state.scrollTop });
1670
- }), p(n, "_onScrollTop", function(d) {
1671
- var h = d.scrollTop;
1672
- n._onScroll({ scrollTop: h, scrollLeft: n.state.scrollLeft });
1673
- }), p(n, "_rowHeightBottomGrid", function(d) {
1674
- var h = d.index, f = n.props, u = f.fixedRowCount, v = f.rowCount, m = f.rowHeight, _ = n.state, S = _.scrollbarSize;
1675
- return _.showVerticalScrollbar && h === v - u ? S : typeof m == "function" ? m({ index: h + u }) : m;
1676
- }), p(n, "_topLeftGridRef", function(d) {
1677
- n._topLeftGrid = d;
1678
- }), p(n, "_topRightGridRef", function(d) {
1679
- n._topRightGrid = d;
1680
- });
1681
- var a = e.deferredMeasurementCache, s = e.fixedColumnCount, c = e.fixedRowCount;
1682
- return n._maybeCalculateCachedStyles(!0), a && (n._deferredMeasurementCacheBottomLeftGrid = c > 0 ? new Re({ cellMeasurerCache: a, columnIndexOffset: 0, rowIndexOffset: c }) : a, n._deferredMeasurementCacheBottomRightGrid = s > 0 || c > 0 ? new Re({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: c }) : a, n._deferredMeasurementCacheTopRightGrid = s > 0 ? new Re({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: 0 }) : a), n;
1683
- }
1684
- return D(o, x.PureComponent), E(o, [{ key: "forceUpdateGrids", value: function() {
1685
- this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate(), this._bottomRightGrid && this._bottomRightGrid.forceUpdate(), this._topLeftGrid && this._topLeftGrid.forceUpdate(), this._topRightGrid && this._topRightGrid.forceUpdate();
1686
- } }, { key: "invalidateCellSizeAfterRender", value: function() {
1687
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1688
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, n) : n, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, l) : l;
1689
- } }, { key: "measureAllCells", value: function() {
1690
- this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells(), this._bottomRightGrid && this._bottomRightGrid.measureAllCells(), this._topLeftGrid && this._topLeftGrid.measureAllCells(), this._topRightGrid && this._topRightGrid.measureAllCells();
1691
- } }, { key: "recomputeGridSize", value: function() {
1692
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.fixedColumnCount, s = i.fixedRowCount, c = Math.max(0, n - a), d = Math.max(0, l - s);
1693
- this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: d }), this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: d }), this._topLeftGrid && this._topLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: l }), this._topRightGrid && this._topRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: l }), this._leftGridWidth = null, this._topGridHeight = null, this._maybeCalculateCachedStyles(!0);
1694
- } }, { key: "componentDidMount", value: function() {
1695
- var e = this.props, t = e.scrollLeft, n = e.scrollTop;
1696
- if (t > 0 || n > 0) {
1697
- var r = {};
1698
- t > 0 && (r.scrollLeft = t), n > 0 && (r.scrollTop = n), this.setState(r);
1699
- }
1700
- this._handleInvalidatedGridSize();
1701
- } }, { key: "componentDidUpdate", value: function() {
1702
- this._handleInvalidatedGridSize();
1703
- } }, { key: "render", value: function() {
1704
- var e = this.props, t = e.onScroll, n = e.onSectionRendered;
1705
- e.onScrollbarPresenceChange, e.scrollLeft;
1706
- var r = e.scrollToColumn;
1707
- e.scrollTop;
1708
- var l = e.scrollToRow, i = ie(e, on);
1709
- if (this._prepareForRender(), this.props.width === 0 || this.props.height === 0) return null;
1710
- var a = this.state, s = a.scrollLeft, c = a.scrollTop;
1711
- return x.createElement("div", { style: this._containerOuterStyle }, x.createElement("div", { style: this._containerTopStyle }, this._renderTopLeftGrid(i), this._renderTopRightGrid(M(M({}, i), {}, { onScroll: t, scrollLeft: s }))), x.createElement("div", { style: this._containerBottomStyle }, this._renderBottomLeftGrid(M(M({}, i), {}, { onScroll: t, scrollTop: c })), this._renderBottomRightGrid(M(M({}, i), {}, { onScroll: t, onSectionRendered: n, scrollLeft: s, scrollToColumn: r, scrollToRow: l, scrollTop: c }))));
1712
- } }, { key: "_getBottomGridHeight", value: function(e) {
1713
- return e.height - this._getTopGridHeight(e);
1714
- } }, { key: "_getLeftGridWidth", value: function(e) {
1715
- var t = e.fixedColumnCount, n = e.columnWidth;
1716
- if (this._leftGridWidth == null) if (typeof n == "function") {
1717
- for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
1718
- this._leftGridWidth = r;
1719
- } else this._leftGridWidth = n * t;
1720
- return this._leftGridWidth;
1721
- } }, { key: "_getRightGridWidth", value: function(e) {
1722
- return e.width - this._getLeftGridWidth(e);
1723
- } }, { key: "_getTopGridHeight", value: function(e) {
1724
- var t = e.fixedRowCount, n = e.rowHeight;
1725
- if (this._topGridHeight == null) if (typeof n == "function") {
1726
- for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
1727
- this._topGridHeight = r;
1728
- } else this._topGridHeight = n * t;
1729
- return this._topGridHeight;
1730
- } }, { key: "_handleInvalidatedGridSize", value: function() {
1731
- if (typeof this._deferredInvalidateColumnIndex == "number") {
1732
- var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
1733
- this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t }), this.forceUpdate();
1734
- }
1735
- } }, { key: "_maybeCalculateCachedStyles", value: function(e) {
1736
- var t = this.props, n = t.columnWidth, r = t.enableFixedColumnScroll, l = t.enableFixedRowScroll, i = t.height, a = t.fixedColumnCount, s = t.fixedRowCount, c = t.rowHeight, d = t.style, h = t.styleBottomLeftGrid, f = t.styleBottomRightGrid, u = t.styleTopLeftGrid, v = t.styleTopRightGrid, m = t.width, _ = e || i !== this._lastRenderedHeight || m !== this._lastRenderedWidth, S = e || n !== this._lastRenderedColumnWidth || a !== this._lastRenderedFixedColumnCount, y = e || s !== this._lastRenderedFixedRowCount || c !== this._lastRenderedRowHeight;
1737
- (e || _ || d !== this._lastRenderedStyle) && (this._containerOuterStyle = M({ height: i, overflow: "visible", width: m }, d)), (e || _ || y) && (this._containerTopStyle = { height: this._getTopGridHeight(this.props), position: "relative", width: m }, this._containerBottomStyle = { height: i - this._getTopGridHeight(this.props), overflow: "visible", position: "relative", width: m }), (e || h !== this._lastRenderedStyleBottomLeftGrid) && (this._bottomLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: r ? "auto" : "hidden", position: "absolute" }, h)), (e || S || f !== this._lastRenderedStyleBottomRightGrid) && (this._bottomRightGridStyle = M({ left: this._getLeftGridWidth(this.props), position: "absolute" }, f)), (e || u !== this._lastRenderedStyleTopLeftGrid) && (this._topLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: "hidden", position: "absolute", top: 0 }, u)), (e || S || v !== this._lastRenderedStyleTopRightGrid) && (this._topRightGridStyle = M({ left: this._getLeftGridWidth(this.props), overflowX: l ? "auto" : "hidden", overflowY: "hidden", position: "absolute", top: 0 }, v)), this._lastRenderedColumnWidth = n, this._lastRenderedFixedColumnCount = a, this._lastRenderedFixedRowCount = s, this._lastRenderedHeight = i, this._lastRenderedRowHeight = c, this._lastRenderedStyle = d, this._lastRenderedStyleBottomLeftGrid = h, this._lastRenderedStyleBottomRightGrid = f, this._lastRenderedStyleTopLeftGrid = u, this._lastRenderedStyleTopRightGrid = v, this._lastRenderedWidth = m;
1738
- } }, { key: "_prepareForRender", value: function() {
1739
- this._lastRenderedColumnWidth === this.props.columnWidth && this._lastRenderedFixedColumnCount === this.props.fixedColumnCount || (this._leftGridWidth = null), this._lastRenderedFixedRowCount === this.props.fixedRowCount && this._lastRenderedRowHeight === this.props.rowHeight || (this._topGridHeight = null), this._maybeCalculateCachedStyles(), this._lastRenderedColumnWidth = this.props.columnWidth, this._lastRenderedFixedColumnCount = this.props.fixedColumnCount, this._lastRenderedFixedRowCount = this.props.fixedRowCount, this._lastRenderedRowHeight = this.props.rowHeight;
1740
- } }, { key: "_renderBottomLeftGrid", value: function(e) {
1741
- var t = e.enableFixedColumnScroll, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.hideBottomLeftGridScrollbar, a = this.state.showVerticalScrollbar;
1742
- if (!n) return null;
1743
- var s = a ? 1 : 0, c = this._getBottomGridHeight(e), d = this._getLeftGridWidth(e), h = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0, f = i ? d + h : d, u = x.createElement($, V({}, e, { cellRenderer: this._cellRendererBottomLeftGrid, className: this.props.classNameBottomLeftGrid, columnCount: n, deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid, height: c, onScroll: t ? this._onScrollTop : void 0, ref: this._bottomLeftGridRef, rowCount: Math.max(0, l - r) + s, rowHeight: this._rowHeightBottomGrid, style: this._bottomLeftGridStyle, tabIndex: null, width: f }));
1744
- return i ? x.createElement("div", { className: "BottomLeftGrid_ScrollWrapper", style: M(M({}, this._bottomLeftGridStyle), {}, { height: c, width: d, overflowY: "hidden" }) }, u) : u;
1745
- } }, { key: "_renderBottomRightGrid", value: function(e) {
1746
- var t = e.columnCount, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.scrollToColumn, a = e.scrollToRow;
1747
- return x.createElement($, V({}, e, { cellRenderer: this._cellRendererBottomRightGrid, className: this.props.classNameBottomRightGrid, columnCount: Math.max(0, t - n), columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid, height: this._getBottomGridHeight(e), onScroll: this._onScroll, onScrollbarPresenceChange: this._onScrollbarPresenceChange, ref: this._bottomRightGridRef, rowCount: Math.max(0, l - r), rowHeight: this._rowHeightBottomGrid, scrollToColumn: i - n, scrollToRow: a - r, style: this._bottomRightGridStyle, width: this._getRightGridWidth(e) }));
1748
- } }, { key: "_renderTopLeftGrid", value: function(e) {
1749
- var t = e.fixedColumnCount, n = e.fixedRowCount;
1750
- return t && n ? x.createElement($, V({}, e, { className: this.props.classNameTopLeftGrid, columnCount: t, height: this._getTopGridHeight(e), ref: this._topLeftGridRef, rowCount: n, style: this._topLeftGridStyle, tabIndex: null, width: this._getLeftGridWidth(e) })) : null;
1751
- } }, { key: "_renderTopRightGrid", value: function(e) {
1752
- var t = e.columnCount, n = e.enableFixedRowScroll, r = e.fixedColumnCount, l = e.fixedRowCount, i = e.scrollLeft, a = e.hideTopRightGridScrollbar, s = this.state, c = s.showHorizontalScrollbar, d = s.scrollbarSize;
1753
- if (!l) return null;
1754
- var h = c ? 1 : 0, f = this._getTopGridHeight(e), u = this._getRightGridWidth(e), v = c ? d : 0, m = f, _ = this._topRightGridStyle;
1755
- a && (m = f + v, _ = M(M({}, this._topRightGridStyle), {}, { left: 0 }));
1756
- var S = x.createElement($, V({}, e, { cellRenderer: this._cellRendererTopRightGrid, className: this.props.classNameTopRightGrid, columnCount: Math.max(0, t - r) + h, columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid, height: m, onScroll: n ? this._onScrollLeft : void 0, ref: this._topRightGridRef, rowCount: l, scrollLeft: i, style: _, tabIndex: null, width: u }));
1757
- return a ? x.createElement("div", { className: "TopRightGrid_ScrollWrapper", style: M(M({}, this._topRightGridStyle), {}, { height: f, width: u, overflowX: "hidden" }) }, S) : S;
1758
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1759
- return e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null && e.scrollLeft >= 0 ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null && e.scrollTop >= 0 ? e.scrollTop : t.scrollTop } : null;
1760
- } }]);
1761
- }();
1762
- function Vt() {
1763
- try {
1764
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1765
- }));
1766
- } catch {
1767
- }
1768
- return (Vt = function() {
1769
- return !!o;
1770
- })();
1771
- }
1772
- p(be, "defaultProps", { classNameBottomLeftGrid: "", classNameBottomRightGrid: "", classNameTopLeftGrid: "", classNameTopRightGrid: "", enableFixedColumnScroll: !1, enableFixedRowScroll: !1, fixedColumnCount: 0, fixedRowCount: 0, scrollToColumn: -1, scrollToRow: -1, style: {}, styleBottomLeftGrid: {}, styleBottomRightGrid: {}, styleTopLeftGrid: {}, styleTopRightGrid: {}, hideTopRightGridScrollbar: !1, hideBottomLeftGridScrollbar: !1 }), be.propTypes = {}, ue(be), function() {
1773
- function o(e, t) {
1774
- var n, r, l, i;
1775
- return A(this, o), r = this, i = [e, t], l = O(l = o), (n = W(r, Vt() ? Reflect.construct(l, i || [], O(r).constructor) : l.apply(r, i))).state = { clientHeight: 0, clientWidth: 0, scrollHeight: 0, scrollLeft: 0, scrollTop: 0, scrollWidth: 0 }, n._onScroll = n._onScroll.bind(n), n;
1776
- }
1777
- return D(o, x.PureComponent), E(o, [{ key: "render", value: function() {
1778
- var e = this.props.children, t = this.state, n = t.clientHeight, r = t.clientWidth, l = t.scrollHeight, i = t.scrollLeft, a = t.scrollTop, s = t.scrollWidth;
1779
- return e({ clientHeight: n, clientWidth: r, onScroll: this._onScroll, scrollHeight: l, scrollLeft: i, scrollTop: a, scrollWidth: s });
1780
- } }, { key: "_onScroll", value: function(e) {
1781
- var t = e.clientHeight, n = e.clientWidth, r = e.scrollHeight, l = e.scrollLeft, i = e.scrollTop, a = e.scrollWidth;
1782
- this.setState({ clientHeight: t, clientWidth: n, scrollHeight: r, scrollLeft: l, scrollTop: i, scrollWidth: a });
1783
- } }]);
1784
- }().propTypes = {};
1785
- var de = "ASC", ke = "DESC";
1786
- function $t(o) {
1787
- var e = o.sortDirection, t = N("ReactVirtualized__Table__sortableHeaderIcon", { "ReactVirtualized__Table__sortableHeaderIcon--ASC": e === de, "ReactVirtualized__Table__sortableHeaderIcon--DESC": e === ke });
1788
- return x.createElement("svg", { className: t, width: 18, height: 18, viewBox: "0 0 24 24" }, e === de ? x.createElement("path", { d: "M7 14l5-5 5 5z" }) : x.createElement("path", { d: "M7 10l5 5 5-5z" }), x.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }));
1789
- }
1790
- function Kt() {
1791
- try {
1792
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1793
- }));
1794
- } catch {
1795
- }
1796
- return (Kt = function() {
1797
- return !!o;
1798
- })();
1799
- }
1800
- $t.propTypes = {};
1801
- var Se = function() {
1802
- function o() {
1803
- return A(this, o), e = this, n = arguments, t = O(t = o), W(e, Kt() ? Reflect.construct(t, n || [], O(e).constructor) : t.apply(e, n));
1804
- var e, t, n;
1805
- }
1806
- return D(o, x.Component), E(o);
1807
- }();
1808
- function pt(o, e) {
1809
- var t = Object.keys(o);
1810
- if (Object.getOwnPropertySymbols) {
1811
- var n = Object.getOwnPropertySymbols(o);
1812
- e && (n = n.filter(function(r) {
1813
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1814
- })), t.push.apply(t, n);
1815
- }
1816
- return t;
1817
- }
1818
- function U(o) {
1819
- for (var e = 1; e < arguments.length; e++) {
1820
- var t = arguments[e] != null ? arguments[e] : {};
1821
- e % 2 ? pt(Object(t), !0).forEach(function(n) {
1822
- p(o, n, t[n]);
1823
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : pt(Object(t)).forEach(function(n) {
1824
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1825
- });
1826
- }
1827
- return o;
1828
- }
1829
- function qt() {
1830
- try {
1831
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1832
- }));
1833
- } catch {
1834
- }
1835
- return (qt = function() {
1836
- return !!o;
1837
- })();
1838
- }
1839
- p(Se, "defaultProps", { cellDataGetter: function(o) {
1840
- var e = o.dataKey, t = o.rowData;
1841
- return typeof t.get == "function" ? t.get(e) : t[e];
1842
- }, cellRenderer: function(o) {
1843
- var e = o.cellData;
1844
- return e == null ? "" : String(e);
1845
- }, defaultSortDirection: de, flexGrow: 0, flexShrink: 1, headerRenderer: function(o) {
1846
- var e = o.dataKey, t = o.label, n = o.sortBy, r = o.sortDirection, l = n === e, i = [x.createElement("span", { className: "ReactVirtualized__Table__headerTruncatedText", key: "label", title: typeof t == "string" ? t : null }, t)];
1847
- return l && i.push(x.createElement($t, { key: "SortIndicator", sortDirection: r })), i;
1848
- }, style: {} }), Se.propTypes = {};
1849
- var Oe = function() {
1850
- function o(e) {
1851
- var t, n, r, l;
1852
- return A(this, o), n = this, l = [e], r = O(r = o), (t = W(n, qt() ? Reflect.construct(r, l || [], O(n).constructor) : r.apply(n, l))).state = { scrollbarWidth: 0 }, t._createColumn = t._createColumn.bind(t), t._createRow = t._createRow.bind(t), t._onScroll = t._onScroll.bind(t), t._onSectionRendered = t._onSectionRendered.bind(t), t._setRef = t._setRef.bind(t), t._setGridElementRef = t._setGridElementRef.bind(t), t;
1853
- }
1854
- return D(o, x.PureComponent), E(o, [{ key: "forceUpdateGrid", value: function() {
1855
- this.Grid && this.Grid.forceUpdate();
1856
- } }, { key: "getOffsetForRow", value: function(e) {
1857
- var t = e.alignment, n = e.index;
1858
- return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n }).scrollTop : 0;
1859
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1860
- var t = e.columnIndex, n = e.rowIndex;
1861
- this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
1862
- } }, { key: "measureAllRows", value: function() {
1863
- this.Grid && this.Grid.measureAllCells();
1864
- } }, { key: "recomputeGridSize", value: function() {
1865
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1866
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
1867
- } }, { key: "recomputeRowHeights", value: function() {
1868
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1869
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: e });
1870
- } }, { key: "scrollToPosition", value: function() {
1871
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1872
- this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
1873
- } }, { key: "scrollToRow", value: function() {
1874
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1875
- this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
1876
- } }, { key: "getScrollbarWidth", value: function() {
1877
- if (this.GridElement) {
1878
- var e = this.GridElement, t = e.clientWidth || 0;
1879
- return (e.offsetWidth || 0) - t;
1880
- }
1881
- return 0;
1882
- } }, { key: "componentDidMount", value: function() {
1883
- this._setScrollbarWidth();
1884
- } }, { key: "componentDidUpdate", value: function() {
1885
- this._setScrollbarWidth();
1886
- } }, { key: "render", value: function() {
1887
- var e = this, t = this.props, n = t.children, r = t.className, l = t.disableHeader, i = t.gridClassName, a = t.gridStyle, s = t.headerHeight, c = t.headerRowRenderer, d = t.height, h = t.id, f = t.noRowsRenderer, u = t.rowClassName, v = t.rowStyle, m = t.scrollToIndex, _ = t.style, S = t.width, y = this.state.scrollbarWidth, g = l ? d : d - s, w = typeof u == "function" ? u({ index: -1 }) : u, C = typeof v == "function" ? v({ index: -1 }) : v;
1888
- return this._cachedColumnStyles = [], x.Children.toArray(n).forEach(function(b, R) {
1889
- var T = e._getFlexStyleForColumn(b, b.props.style || Se.defaultProps.style);
1890
- e._cachedColumnStyles[R] = U({ overflow: "hidden" }, T);
1891
- }), x.createElement("div", { "aria-label": this.props["aria-label"], "aria-labelledby": this.props["aria-labelledby"], "aria-colcount": x.Children.toArray(n).length, "aria-rowcount": this.props.rowCount, className: N("ReactVirtualized__Table", r), id: h, role: "grid", style: _ }, !l && c({ className: N("ReactVirtualized__Table__headerRow", w), columns: this._getHeaderColumns(), style: U({ height: s, overflow: "hidden", paddingRight: y, width: S }, C) }), x.createElement($, V({}, this.props, { elementRef: this._setGridElementRef, "aria-readonly": null, autoContainerWidth: !0, className: N("ReactVirtualized__Table__Grid", i), cellRenderer: this._createRow, columnWidth: S, columnCount: 1, height: g, id: void 0, noContentRenderer: f, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, role: "rowgroup", scrollbarWidth: y, scrollToRow: m, style: U(U({}, a), {}, { overflowX: "hidden" }) })));
1892
- } }, { key: "_createColumn", value: function(e) {
1893
- var t = e.column, n = e.columnIndex, r = e.isScrolling, l = e.parent, i = e.rowData, a = e.rowIndex, s = this.props.onColumnClick, c = t.props, d = c.cellDataGetter, h = c.cellRenderer, f = c.className, u = c.columnData, v = c.dataKey, m = c.id, _ = h({ cellData: d({ columnData: u, dataKey: v, rowData: i }), columnData: u, columnIndex: n, dataKey: v, isScrolling: r, parent: l, rowData: i, rowIndex: a }), S = this._cachedColumnStyles[n], y = typeof _ == "string" ? _ : null;
1894
- return x.createElement("div", { "aria-colindex": n + 1, "aria-describedby": m, className: N("ReactVirtualized__Table__rowColumn", f), key: "Row" + a + "-Col" + n, onClick: function(g) {
1895
- s && s({ columnData: u, dataKey: v, event: g });
1896
- }, role: "gridcell", style: S, title: y }, _);
1897
- } }, { key: "_createHeader", value: function(e) {
1898
- var t, n, r, l, i, a = e.column, s = e.index, c = this.props, d = c.headerClassName, h = c.headerStyle, f = c.onHeaderClick, u = c.sort, v = c.sortBy, m = c.sortDirection, _ = a.props, S = _.columnData, y = _.dataKey, g = _.defaultSortDirection, w = _.disableSort, C = _.headerRenderer, b = _.id, R = _.label, T = !w && u, I = N("ReactVirtualized__Table__headerColumn", d, a.props.headerClassName, { ReactVirtualized__Table__sortableHeaderColumn: T }), k = this._getFlexStyleForColumn(a, U(U({}, h), a.props.headerStyle)), P = C({ columnData: S, dataKey: y, disableSort: w, label: R, sortBy: v, sortDirection: m });
1899
- if (T || f) {
1900
- var z = v !== y ? g : m === ke ? de : ke, L = function(G) {
1901
- T && u({ defaultSortDirection: g, event: G, sortBy: y, sortDirection: z }), f && f({ columnData: S, dataKey: y, event: G });
1902
- };
1903
- i = a.props["aria-label"] || R || y, l = "none", r = 0, t = L, n = function(G) {
1904
- G.key !== "Enter" && G.key !== " " || L(G);
1905
- };
1906
- }
1907
- return v === y && (l = m === de ? "ascending" : "descending"), x.createElement("div", { "aria-label": i, "aria-sort": l, className: I, id: b, key: "Header-Col" + s, onClick: t, onKeyDown: n, role: "columnheader", style: k, tabIndex: r }, P);
1908
- } }, { key: "_createRow", value: function(e) {
1909
- var t = this, n = e.rowIndex, r = e.isScrolling, l = e.key, i = e.parent, a = e.style, s = this.props, c = s.children, d = s.onRowClick, h = s.onRowDoubleClick, f = s.onRowRightClick, u = s.onRowMouseOver, v = s.onRowMouseOut, m = s.rowClassName, _ = s.rowGetter, S = s.rowRenderer, y = s.rowStyle, g = this.state.scrollbarWidth, w = typeof m == "function" ? m({ index: n }) : m, C = typeof y == "function" ? y({ index: n }) : y, b = _({ index: n }), R = x.Children.toArray(c).map(function(k, P) {
1910
- return t._createColumn({ column: k, columnIndex: P, isScrolling: r, parent: i, rowData: b, rowIndex: n, scrollbarWidth: g });
1911
- }), T = N("ReactVirtualized__Table__row", w), I = U(U({}, a), {}, { height: this._getRowHeight(n), overflow: "hidden", paddingRight: g }, C);
1912
- return S({ className: T, columns: R, index: n, isScrolling: r, key: l, onRowClick: d, onRowDoubleClick: h, onRowRightClick: f, onRowMouseOver: u, onRowMouseOut: v, rowData: b, style: I });
1913
- } }, { key: "_getFlexStyleForColumn", value: function(e) {
1914
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = "".concat(e.props.flexGrow, " ").concat(e.props.flexShrink, " ").concat(e.props.width, "px"), r = U(U({}, t), {}, { flex: n, msFlex: n, WebkitFlex: n });
1915
- return e.props.maxWidth && (r.maxWidth = e.props.maxWidth), e.props.minWidth && (r.minWidth = e.props.minWidth), r;
1916
- } }, { key: "_getHeaderColumns", value: function() {
1917
- var e = this, t = this.props, n = t.children;
1918
- return (t.disableHeader ? [] : x.Children.toArray(n)).map(function(r, l) {
1919
- return e._createHeader({ column: r, index: l });
1920
- });
1921
- } }, { key: "_getRowHeight", value: function(e) {
1922
- var t = this.props.rowHeight;
1923
- return typeof t == "function" ? t({ index: e }) : t;
1924
- } }, { key: "_onScroll", value: function(e) {
1925
- var t = e.clientHeight, n = e.scrollHeight, r = e.scrollTop;
1926
- (0, this.props.onScroll)({ clientHeight: t, scrollHeight: n, scrollTop: r });
1927
- } }, { key: "_onSectionRendered", value: function(e) {
1928
- var t = e.rowOverscanStartIndex, n = e.rowOverscanStopIndex, r = e.rowStartIndex, l = e.rowStopIndex;
1929
- (0, this.props.onRowsRendered)({ overscanStartIndex: t, overscanStopIndex: n, startIndex: r, stopIndex: l });
1930
- } }, { key: "_setRef", value: function(e) {
1931
- this.Grid = e;
1932
- } }, { key: "_setGridElementRef", value: function(e) {
1933
- this.GridElement = e;
1934
- } }, { key: "_setScrollbarWidth", value: function() {
1935
- var e = this.getScrollbarWidth();
1936
- this.setState({ scrollbarWidth: e });
1937
- } }]);
1938
- }();
1939
- p(Oe, "defaultProps", { disableHeader: !1, estimatedRowSize: 30, headerHeight: 0, headerStyle: {}, noRowsRenderer: function() {
1940
- return null;
1941
- }, onRowsRendered: function() {
1942
- return null;
1943
- }, onScroll: function() {
1944
- return null;
1945
- }, overscanIndicesGetter: Ht, overscanRowCount: 10, rowRenderer: function(o) {
1946
- var e = o.className, t = o.columns, n = o.index, r = o.key, l = o.onRowClick, i = o.onRowDoubleClick, a = o.onRowMouseOut, s = o.onRowMouseOver, c = o.onRowRightClick, d = o.rowData, h = o.style, f = { "aria-rowindex": n + 1 };
1947
- return (l || i || a || s || c) && (f["aria-label"] = "row", f.tabIndex = 0, l && (f.onClick = function(u) {
1948
- return l({ event: u, index: n, rowData: d });
1949
- }), i && (f.onDoubleClick = function(u) {
1950
- return i({ event: u, index: n, rowData: d });
1951
- }), a && (f.onMouseOut = function(u) {
1952
- return a({ event: u, index: n, rowData: d });
1953
- }), s && (f.onMouseOver = function(u) {
1954
- return s({ event: u, index: n, rowData: d });
1955
- }), c && (f.onContextMenu = function(u) {
1956
- return c({ event: u, index: n, rowData: d });
1957
- })), x.createElement("div", V({}, f, { className: e, key: r, role: "row", style: h }), t);
1958
- }, headerRowRenderer: function(o) {
1959
- var e = o.className, t = o.columns, n = o.style;
1960
- return x.createElement("div", { className: e, role: "row", style: n }, t);
1961
- }, rowStyle: {}, scrollToAlignment: "auto", scrollToIndex: -1, style: {} }), Oe.propTypes = {};
1962
- var Y = [], ae = null, X = null;
1963
- function Xt() {
1964
- X && (X = null, document.body && ae != null && (document.body.style.pointerEvents = ae), ae = null);
1965
- }
1966
- function nn() {
1967
- Xt(), Y.forEach(function(o) {
1968
- return o.__resetIsScrolling();
1969
- });
1970
- }
1971
- function Yt(o) {
1972
- o.currentTarget === window && ae == null && document.body && (ae = document.body.style.pointerEvents, document.body.style.pointerEvents = "none"), function() {
1973
- X && oe(X);
1974
- var e = 0;
1975
- Y.forEach(function(t) {
1976
- e = Math.max(e, t.props.scrollingResetTimeInterval);
1977
- }), X = Ge(nn, e);
1978
- }(), Y.forEach(function(e) {
1979
- e.props.scrollElement === o.currentTarget && e.__handleWindowScrollEvent();
1980
- });
1981
- }
1982
- function mt(o, e) {
1983
- Y.some(function(t) {
1984
- return t.props.scrollElement === e;
1985
- }) || e.addEventListener("scroll", Yt), Y.push(o);
1986
- }
1987
- function gt(o, e) {
1988
- (Y = Y.filter(function(t) {
1989
- return t !== o;
1990
- })).length || (e.removeEventListener("scroll", Yt), X && (oe(X), Xt()));
1991
- }
1992
- var Ee = function(o) {
1993
- return o === window;
1994
- }, le = function(o) {
1995
- return o.getBoundingClientRect();
1996
- };
1997
- function vt(o, e) {
1998
- if (o) {
1999
- if (Ee(o)) {
2000
- var t = window, n = t.innerHeight, r = t.innerWidth;
2001
- return { height: typeof n == "number" ? n : 0, width: typeof r == "number" ? r : 0 };
2002
- }
2003
- return le(o);
2004
- }
2005
- return { height: e.serverHeight, width: e.serverWidth };
2006
- }
2007
- function _t(o) {
2008
- return Ee(o) && document.documentElement ? { top: "scrollY" in window ? window.scrollY : document.documentElement.scrollTop, left: "scrollX" in window ? window.scrollX : document.documentElement.scrollLeft } : { top: o.scrollTop, left: o.scrollLeft };
2009
- }
2010
- function St(o, e) {
2011
- var t = Object.keys(o);
2012
- if (Object.getOwnPropertySymbols) {
2013
- var n = Object.getOwnPropertySymbols(o);
2014
- e && (n = n.filter(function(r) {
2015
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
2016
- })), t.push.apply(t, n);
2017
- }
2018
- return t;
2019
- }
2020
- function yt(o) {
2021
- for (var e = 1; e < arguments.length; e++) {
2022
- var t = arguments[e] != null ? arguments[e] : {};
2023
- e % 2 ? St(Object(t), !0).forEach(function(n) {
2024
- p(o, n, t[n]);
2025
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : St(Object(t)).forEach(function(n) {
2026
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
2027
- });
2028
- }
2029
- return o;
2030
- }
2031
- function Jt() {
2032
- try {
2033
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2034
- }));
2035
- } catch {
2036
- }
2037
- return (Jt = function() {
2038
- return !!o;
2039
- })();
2040
- }
2041
- var Zt = function() {
2042
- return typeof window < "u" ? window : void 0;
2043
- }, rn = function() {
2044
- function o() {
2045
- var e, t, n, r;
2046
- A(this, o);
2047
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
2048
- return t = this, n = o, r = [].concat(i), n = O(n), p(e = W(t, Jt() ? Reflect.construct(n, r || [], O(t).constructor) : n.apply(t, r)), "_window", Zt()), p(e, "_isMounted", !1), p(e, "_positionFromTop", 0), p(e, "_positionFromLeft", 0), p(e, "_detectElementResize", void 0), p(e, "_child", void 0), p(e, "_windowScrollerRef", x.createRef()), p(e, "state", yt(yt({}, vt(e.props.scrollElement, e.props)), {}, { isScrolling: !1, scrollLeft: 0, scrollTop: 0 })), p(e, "_registerChild", function(s) {
2049
- !s || s instanceof Element || console.warn("WindowScroller registerChild expects to be passed Element or null"), e._child = s, e.updatePosition();
2050
- }), p(e, "_onChildScroll", function(s) {
2051
- var c = s.scrollTop;
2052
- if (e.state.scrollTop !== c) {
2053
- var d = e.props.scrollElement;
2054
- d && (typeof d.scrollTo == "function" ? d.scrollTo(0, c + e._positionFromTop) : d.scrollTop = c + e._positionFromTop);
2055
- }
2056
- }), p(e, "_registerResizeListener", function(s) {
2057
- s === window ? window.addEventListener("resize", e._onResize, !1) : e._detectElementResize.addResizeListener(s, e._onResize);
2058
- }), p(e, "_unregisterResizeListener", function(s) {
2059
- s === window ? window.removeEventListener("resize", e._onResize, !1) : s && e._detectElementResize.removeResizeListener(s, e._onResize);
2060
- }), p(e, "_onResize", function() {
2061
- e.updatePosition();
2062
- }), p(e, "__handleWindowScrollEvent", function() {
2063
- if (e._isMounted) {
2064
- var s = e.props.onScroll, c = e.props.scrollElement;
2065
- if (c) {
2066
- var d = _t(c), h = Math.max(0, d.left - e._positionFromLeft), f = Math.max(0, d.top - e._positionFromTop);
2067
- e.setState({ isScrolling: !0, scrollLeft: h, scrollTop: f }), s({ scrollLeft: h, scrollTop: f });
2068
- }
2069
- }
2070
- }), p(e, "__resetIsScrolling", function() {
2071
- e.setState({ isScrolling: !1 });
2072
- }), e;
2073
- }
2074
- return D(o, x.PureComponent), E(o, [{ key: "updatePosition", value: function() {
2075
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props.scrollElement, t = this.props.onResize, n = this.state, r = n.height, l = n.width, i = this._child || this._windowScrollerRef.current;
2076
- if (i instanceof Element && e) {
2077
- var a = function(c, d) {
2078
- if (Ee(d) && document.documentElement) {
2079
- var h = document.documentElement, f = le(c), u = le(h);
2080
- return { top: f.top - u.top, left: f.left - u.left };
2081
- }
2082
- var v = _t(d), m = le(c), _ = le(d);
2083
- return { top: m.top + v.top - _.top, left: m.left + v.left - _.left };
2084
- }(i, e);
2085
- this._positionFromTop = a.top, this._positionFromLeft = a.left;
2086
- }
2087
- var s = vt(e, this.props);
2088
- r === s.height && l === s.width || (this.setState({ height: s.height, width: s.width }), t({ height: s.height, width: s.width })), this.props.updateScrollTopOnUpdatePosition === !0 && (this.__handleWindowScrollEvent(), this.__resetIsScrolling());
2089
- } }, { key: "componentDidMount", value: function() {
2090
- var e = this.props.scrollElement;
2091
- this._detectElementResize = Pt(), this.updatePosition(e), e && (mt(this, e), this._registerResizeListener(e)), this._isMounted = !0;
2092
- } }, { key: "componentDidUpdate", value: function(e, t) {
2093
- var n = this.props.scrollElement, r = e.scrollElement;
2094
- r !== n && r != null && n != null && (this.updatePosition(n), gt(this, r), mt(this, n), this._unregisterResizeListener(r), this._registerResizeListener(n));
2095
- } }, { key: "componentWillUnmount", value: function() {
2096
- var e = this.props.scrollElement;
2097
- e && (gt(this, e), this._unregisterResizeListener(e)), this._isMounted = !1;
2098
- } }, { key: "render", value: function() {
2099
- var e = this.props.children, t = this.state, n = t.isScrolling, r = t.scrollTop, l = t.scrollLeft, i = t.height, a = t.width;
2100
- return x.createElement("div", { ref: this._windowScrollerRef }, e({ onChildScroll: this._onChildScroll, registerChild: this._registerChild, height: i, isScrolling: n, scrollLeft: l, scrollTop: r, width: a }));
2101
- } }]);
2102
- }();
2103
- p(rn, "defaultProps", { onResize: function() {
2104
- }, onScroll: function() {
2105
- }, scrollingResetTimeInterval: 150, scrollElement: Zt(), serverHeight: 0, serverWidth: 0 });
2106
- const se = "ReactVirtualizedDemo-flexContainer", Qt = "ReactVirtualizedDemo-tableRow", eo = "ReactVirtualizedDemo-tableRowHover", Me = "ReactVirtualizedDemo-tableCell", Le = "ReactVirtualizedDemo-noClick";
2107
- class ln extends Ct.PureComponent {
2108
- constructor() {
2109
- super(...arguments), this.getRowClassName = ({ index: e }) => {
2110
- const { onRowClick: t } = this.props;
2111
- return ye(Qt, se, { [eo]: e !== -1 && t != null });
2112
- }, this.cellRenderer = ({ cellData: e, dataKey: t, columnIndex: n, width: r }) => {
2113
- const { columns: l, rowHeight: i, onRowClick: a } = this.props;
2114
- let s = e, c = { height: i, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${r}px`, maxWidth: `${r}px` };
2115
- return t === "shortcut" ? s = zo(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), H(Fe, { component: "div", className: ye(Me, se, { [Le]: a == null }), variant: "body", style: c, align: n != null && l[n].numeric ? "right" : "left", children: s });
2116
- }, this.headerRenderer = ({ label: e, columnIndex: t, width: n }) => {
2117
- const { headerHeight: r, columns: l } = this.props, i = l[t];
2118
- return H(Fe, { component: "div", className: ye(Me, se, Le), variant: "head", sx: { width: n, height: r, backgroundColor: (a) => a.palette.grey[300] }, align: i.numeric ? "right" : "left", children: H("span", { children: i.label }) });
2119
- };
2120
- }
2121
- static {
2122
- this.defaultProps = { headerHeight: 40, rowHeight: 48 };
2123
- }
2124
- render() {
2125
- const { columns: e, rowHeight: t, headerHeight: n, ...r } = this.props;
2126
- return H(Ot, { children: ({ height: l, width: i }) => H(Oe, { height: l, width: i, rowHeight: t, gridStyle: { direction: "inherit" }, headerHeight: n, ...r, rowClassName: this.getRowClassName, children: e.map(({ dataKey: a, width: s, widthLess: c, ...d }, h) => {
2127
- const f = c ? i - c : s;
2128
- return H(Se, { style: { flex: `1 1 ${f}px` }, headerRenderer: (u) => this.headerRenderer({ ...u, width: f, columnIndex: h }), className: se, cellDataGetter: ({ rowData: u, columnData: v, dataKey: m }) => u[m], cellRenderer: (u) => this.cellRenderer({ ...u, width: f, columnIndex: h }), dataKey: a, width: f, ...d }, a);
2129
- }) }) });
2130
- }
2131
- }
2132
- const sn = jo(ln)(({ theme: o }) => ({ "& .ReactVirtualized__Table__headerRow": { ...o.direction === "rtl" && { paddingLeft: "0 !important" }, ...o.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${se}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Qt}`]: { cursor: "pointer" }, [`& .${eo}`]: { "&:hover:not([disabled])": { backgroundColor: o.palette.grey[200] } }, [`& .${Me}`]: { flex: 1 }, [`& .${Le}`]: { cursor: "initial" } }));
2133
- function an(o) {
2134
- const { commands: e, ...t } = o, [n, r] = pe(!1), [l, i] = pe(""), a = ko(() => {
2135
- let u = e.getAllCommands();
2136
- n || (u = u.filter((_) => _.command.shortcut())), u.sort((_, S) => _.command.label().localeCompare(S.command.label()));
2137
- const v = [], m = (_) => _.replace(/\n\n/g, `
2138
- `);
2139
- for (let _ = 0; _ < u.length; _++) {
2140
- const S = u[_].command, y = S.shortcut();
2141
- if (Array.isArray(y)) {
2142
- const g = y;
2143
- for (let w = 0; w < g.length; w++) v.push({ label: S.label(), description: m(S.description()), shortcut: g[w] });
2144
- } else v.push({ label: S.label(), description: m(S.description()), shortcut: S.shortcut() });
2145
- }
2146
- return v;
2147
- }, [n, e]), [s, c] = pe(null);
2148
- je(() => {
2149
- import("./Bz0TojPavQ5NTjyD.js").then((u) => {
2150
- c(new u.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
2151
- });
2152
- }, [a]);
2153
- const [d, h] = pe(a), f = l.length > 0 && d.length === 0;
2154
- return je(() => {
2155
- s && fo.debounce(() => {
2156
- if (l.trim().length === 0) return void h(a);
2157
- const u = s.search(l.trim()), v = new Array(u.length);
2158
- for (let m = 0; m < u.length; m++) v[m] = u[m].item;
2159
- h(v);
2160
- }, 90)();
2161
- }, [s, l]), We(he, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [We(he, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (u) => u.spacing(2), color: (u) => u.palette.text.secondary }, children: [H(po, { InputProps: { sx: { backgroundImage: `linear-gradient(${Z("#fff", fe(5))}, ${Z("#fff", fe(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (u) => u.spacing(1), paddingBottom: (u) => u.spacing(1) } }, endAdornment: H(mo, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: H(go, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: H(vo, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (u) => u.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (u) => f ? `${u.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (u) => f ? `${u.palette.error.main} !important` : void 0 } }, value: l, onChange: (u) => {
2162
- i(u.target.value);
2163
- }, onKeyDown: (u) => {
2164
- u.which === wt.Escape && l.length > 0 && (i(""), u.stopPropagation(), u.preventDefault());
2165
- }, onContextMenu: (u) => {
2166
- u.stopPropagation();
2167
- } }), H(_o, { sx: { flex: "1 1 60%" }, control: H(So, { checked: n, onChange: () => r(!n) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), H(he, { sx: { flex: "1 1 100%", borderRadius: (u) => `${u.shape.borderRadius}px`, border: (u) => `solid ${u.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (u) => u.palette.background.paper, backgroundImage: `linear-gradient(${Z("#fff", fe(5))}, ${Z("#fff", fe(5))})` } }, children: H(sn, { rowCount: d.length, rowGetter: (u) => d[u.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), H(he, { sx: { display: "flex", flexShrink: "0", paddingLeft: (u) => u.spacing(1), paddingTop: (u) => u.spacing(1), paddingRight: (u) => u.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: H(yo, { noWrap: !0, component: "div", sx: { color: (u) => f ? u.palette.error.main : u.palette.text.secondary }, children: `${d.length === 0 ? "No" : d.length} shortcut key${d.length === 1 ? "" : "s"}${l.length > 0 ? " found" : ""}` }) })] });
2168
- }
2169
- const hn = (o) => {
2170
- const { title: e = "Shortcut Keys", commands: t, sx: n, ...r } = o;
2171
- return H(uo, { isModal: !0, onKeyDown: (l) => {
2172
- l.keyCode === wt.F1 && l.preventDefault();
2173
- }, sx: { width: "780px", ...n }, title: e, autoFocusSel: ".input", ...r, children: H(ho, { dividers: !0, children: H(an, { commands: t, sx: { marginBottom: "8px" } }) }) });
2174
- };
2175
- export {
2176
- hn as default
2177
- };